Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

ASoC: fsl_audmix: Support the i.MX952 platform

Merge series from Shengjiu Wang <shengjiu.wang@nxp.com>:

Enable AUDMIX on i.MX952 platform, update dt binding document and
driver.

SAI is connected to AUDMIX, and the AUDMIX can be bypassed, so
add 'fsl,sai-amix-mode' property in SAI binding document for this
case.

+60 -2
+14 -2
Documentation/devicetree/bindings/sound/fsl,audmix.yaml
··· 34 34 35 35 properties: 36 36 compatible: 37 - const: fsl,imx8qm-audmix 37 + enum: 38 + - fsl,imx8qm-audmix 39 + - fsl,imx952-audmix 38 40 39 41 reg: 40 42 maxItems: 1 ··· 82 80 - reg 83 81 - clocks 84 82 - clock-names 85 - - power-domains 83 + 84 + allOf: 85 + - if: 86 + properties: 87 + compatible: 88 + contains: 89 + enum: 90 + - fsl,imx8qm-audmix 91 + then: 92 + required: 93 + - power-domains 86 94 87 95 unevaluatedProperties: false 88 96
+16
Documentation/devicetree/bindings/sound/fsl,sai.yaml
··· 132 132 - description: dataline mask for 'rx' 133 133 - description: dataline mask for 'tx' 134 134 135 + fsl,sai-amix-mode: 136 + $ref: /schemas/types.yaml#/definitions/string 137 + description: 138 + The audmix module is bypassed from hardware or not. 139 + enum: [none, bypass, audmix] 140 + default: none 141 + 135 142 fsl,sai-mclk-direction-output: 136 143 description: SAI will output the SAI MCLK clock. 137 144 type: boolean ··· 185 178 then: 186 179 properties: 187 180 fsl,sai-synchronous-rx: false 181 + 182 + - if: 183 + required: 184 + - fsl,sai-amix-mode 185 + then: 186 + properties: 187 + compatible: 188 + contains: 189 + const: fsl,imx952-sai 188 190 189 191 required: 190 192 - compatible
+2
include/linux/firmware/imx/sm.h
··· 26 26 #define SCMI_IMX94_CTRL_SAI3_MCLK 5U /*!< WAKE SAI3 MCLK */ 27 27 #define SCMI_IMX94_CTRL_SAI4_MCLK 6U /*!< WAKE SAI4 MCLK */ 28 28 29 + #define SCMI_IMX952_CTRL_BYPASS_AUDMIX 8U /* WAKE AUDMIX */ 30 + 29 31 #if IS_ENABLED(CONFIG_IMX_SCMI_MISC_DRV) 30 32 int scmi_imx_misc_ctrl_get(u32 id, u32 *num, u32 *val); 31 33 int scmi_imx_misc_ctrl_set(u32 id, u32 val);
+3
sound/soc/fsl/fsl_audmix.c
··· 444 444 { 445 445 .compatible = "fsl,imx8qm-audmix", 446 446 }, 447 + { 448 + .compatible = "fsl,imx952-audmix", 449 + }, 447 450 { /* sentinel */ } 448 451 }; 449 452 MODULE_DEVICE_TABLE(of, fsl_audmix_ids);
+21
sound/soc/fsl/fsl_sai.c
··· 7 7 #include <linux/clk.h> 8 8 #include <linux/delay.h> 9 9 #include <linux/dmaengine.h> 10 + #include <linux/firmware/imx/sm.h> 10 11 #include <linux/module.h> 11 12 #include <linux/of.h> 12 13 #include <linux/pinctrl/consumer.h> ··· 1426 1425 struct fsl_sai *sai; 1427 1426 struct regmap *gpr; 1428 1427 void __iomem *base; 1428 + const char *str = NULL; 1429 1429 char tmp[8]; 1430 1430 int irq, ret, i; 1431 1431 int index; 1432 1432 u32 dmas[4]; 1433 + u32 val; 1433 1434 1434 1435 sai = devm_kzalloc(dev, sizeof(*sai), GFP_KERNEL); 1435 1436 if (!sai) ··· 1600 1597 ret = pm_runtime_put_sync(dev); 1601 1598 if (ret < 0 && ret != -ENOSYS) 1602 1599 goto err_pm_get_sync; 1600 + 1601 + if (of_device_is_compatible(np, "fsl,imx952-sai") && 1602 + !of_property_read_string(np, "fsl,sai-amix-mode", &str)) { 1603 + if (!strcmp(str, "bypass")) 1604 + val = FSL_SAI_AMIX_BYPASS; 1605 + else if (!strcmp(str, "audmix")) 1606 + val = FSL_SAI_AMIX_AUDMIX; 1607 + else 1608 + val = FSL_SAI_AMIX_NONE; 1609 + 1610 + if (val < FSL_SAI_AMIX_NONE) { 1611 + ret = scmi_imx_misc_ctrl_set(SCMI_IMX952_CTRL_BYPASS_AUDMIX, val); 1612 + if (ret) { 1613 + dev_err_probe(dev, ret, "Error setting audmix mode\n"); 1614 + goto err_pm_get_sync; 1615 + } 1616 + } 1617 + } 1603 1618 1604 1619 /* 1605 1620 * Register platform component before registering cpu dai for there
+4
sound/soc/fsl/fsl_sai.h
··· 230 230 #define FSL_SAI_DL_I2S BIT(0) 231 231 #define FSL_SAI_DL_PDM BIT(1) 232 232 233 + #define FSL_SAI_AMIX_BYPASS 0 234 + #define FSL_SAI_AMIX_AUDMIX 1 235 + #define FSL_SAI_AMIX_NONE 2 236 + 233 237 struct fsl_sai_soc_data { 234 238 bool use_imx_pcm; 235 239 bool use_edma;