mirror of https://gitee.com/openkylin/linux.git
arm64: dts: imx8mm-evk: Enable audio codec wm8524
i.MX8MM has one wm8524 audio codec connected with SAI3 digital audio interface. This patch uses simple-card machine driver in order to enable wm8524 codec. We need to set: * SAI3 pinctrl configuration * codec reset gpio pinctrl configuration * clock hierarchy * codec node * simple-card configuration Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com> Reviewed-by: Fabio Estevam <festevam@gmail.com> Signed-off-by: Shawn Guo <shawnguo@kernel.org>
This commit is contained in:
parent
eb4ea0857c
commit
13f3b9fdef
|
@ -37,6 +37,37 @@ reg_usdhc2_vmmc: regulator-usdhc2 {
|
|||
gpio = <&gpio2 19 GPIO_ACTIVE_HIGH>;
|
||||
enable-active-high;
|
||||
};
|
||||
|
||||
wm8524: audio-codec {
|
||||
#sound-dai-cells = <0>;
|
||||
compatible = "wlf,wm8524";
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&pinctrl_gpio_wlf>;
|
||||
wlf,mute-gpios = <&gpio5 21 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
|
||||
sound-wm8524 {
|
||||
compatible = "simple-audio-card";
|
||||
simple-audio-card,name = "wm8524-audio";
|
||||
simple-audio-card,format = "i2s";
|
||||
simple-audio-card,frame-master = <&cpudai>;
|
||||
simple-audio-card,bitclock-master = <&cpudai>;
|
||||
simple-audio-card,widgets =
|
||||
"Line", "Left Line Out Jack",
|
||||
"Line", "Right Line Out Jack";
|
||||
simple-audio-card,routing =
|
||||
"Left Line Out Jack", "LINEVOUTL",
|
||||
"Right Line Out Jack", "LINEVOUTR";
|
||||
|
||||
cpudai: simple-audio-card,cpu {
|
||||
sound-dai = <&sai3>;
|
||||
};
|
||||
|
||||
simple-audio-card,codec {
|
||||
sound-dai = <&wm8524>;
|
||||
clocks = <&clk IMX8MM_CLK_SAI3_ROOT>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&A53_0 {
|
||||
|
@ -65,6 +96,15 @@ ethphy0: ethernet-phy@0 {
|
|||
};
|
||||
};
|
||||
|
||||
&sai3 {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&pinctrl_sai3>;
|
||||
assigned-clocks = <&clk IMX8MM_CLK_SAI3>;
|
||||
assigned-clock-parents = <&clk IMX8MM_AUDIO_PLL1_OUT>;
|
||||
assigned-clock-rates = <24576000>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&snvs_pwrkey {
|
||||
status = "okay";
|
||||
};
|
||||
|
@ -246,6 +286,12 @@ MX8MM_IOMUXC_NAND_READY_B_GPIO3_IO16 0x19
|
|||
>;
|
||||
};
|
||||
|
||||
pinctrl_gpio_wlf: gpiowlfgrp {
|
||||
fsl,pins = <
|
||||
MX8MM_IOMUXC_I2C4_SDA_GPIO5_IO21 0xd6
|
||||
>;
|
||||
};
|
||||
|
||||
pinctrl_i2c1: i2c1grp {
|
||||
fsl,pins = <
|
||||
MX8MM_IOMUXC_I2C1_SCL_I2C1_SCL 0x400001c3
|
||||
|
@ -265,6 +311,15 @@ MX8MM_IOMUXC_SD2_RESET_B_GPIO2_IO19 0x41
|
|||
>;
|
||||
};
|
||||
|
||||
pinctrl_sai3: sai3grp {
|
||||
fsl,pins = <
|
||||
MX8MM_IOMUXC_SAI3_TXFS_SAI3_TX_SYNC 0xd6
|
||||
MX8MM_IOMUXC_SAI3_TXC_SAI3_TX_BCLK 0xd6
|
||||
MX8MM_IOMUXC_SAI3_MCLK_SAI3_MCLK 0xd6
|
||||
MX8MM_IOMUXC_SAI3_TXD_SAI3_TX_DATA0 0xd6
|
||||
>;
|
||||
};
|
||||
|
||||
pinctrl_uart2: uart2grp {
|
||||
fsl,pins = <
|
||||
MX8MM_IOMUXC_UART2_RXD_UART2_DCE_RX 0x140
|
||||
|
|
Loading…
Reference in New Issue