1
0
Fork 0

MLK-16077-5: ARM64: dts: support wm8960 in imx8qxp mek board

Add sound card node for imx8qxp mek board

Signed-off-by: Shengjiu Wang <shengjiu.wang@freescale.com>
pull/10/head
Shengjiu Wang 2017-07-25 18:20:00 +08:00 committed by Jason Liu
parent d52f649e08
commit 1102389cb3
2 changed files with 165 additions and 0 deletions

View File

@ -0,0 +1,68 @@
Freescale i.MX audio complex with WM8960 codec
Required properties:
- compatible : "fsl,imx-audio-wm8960", "fsl,imx7d-evk-wm8960"
- model : The user-visible name of this sound complex
- cpu-dai : The phandle of CPU DAI
- audio-codec : The phandle of the WM8960 audio codec
- audio-routing : A list of the connections between audio components.
Each entry is a pair of strings, the first being the
connection's sink, the second being the connection's
source. Valid names could be power supplies, WM8960
pins, and the jacks on the board:
Power supplies:
* Mic Bias
Board connectors:
* Mic Jack
* Headphone Jack
* Ext Spk
Optional properties:
- hp-det-gpios : The gpio pin to detect plug in/out event that happens to
Headphone jack.
- mic-det-gpios: The gpio pin to detect plug in/out event that happens to
Microphone jack.
Example:
sound: sound {
compatible = "fsl,imx7d-evk-wm8960",
"fsl,imx-audio-wm8960";
model = "wm8960-audio";
cpu-dai = <&sai1>;
audio-codec = <&wm8960>;
codec-master;
/*
* hp-det = <hp-det-pin hp-det-polarity>;
* hp-det-pin: JD1 JD2 or JD3
* hp-det-polarity = 0: hp detect high for headphone
* hp-det-polarity = 1: hp detect high for speaker
*/
hp-det = <2 0>;
hp-det-gpios = <&gpio1 0 0>;
mic-det-gpios = <&gpio1 0 0>;
audio-routing =
"Headphone Jack", "HP_L",
"Headphone Jack", "HP_R",
"Ext Spk", "SPK_LP",
"Ext Spk", "SPK_LN",
"Ext Spk", "SPK_RP",
"Ext Spk", "SPK_RN",
"LINPUT2", "Mic Jack",
"LINPUT3", "Mic Jack",
"RINPUT1", "Main MIC",
"RINPUT2", "Main MIC",
"Mic Jack", "MICB",
"Main MIC", "MICB",
"CPU-Playback", "ASRC-Playback",
"Playback", "CPU-Playback",
"ASRC-Capture", "CPU-Capture",
"CPU-Capture", "Capture";
};

View File

@ -44,6 +44,55 @@
};
};
sound: sound {
compatible = "fsl,imx7d-evk-wm8960",
"fsl,imx-audio-wm8960";
model = "wm8960-audio";
cpu-dai = <&sai1>;
audio-codec = <&wm8960>;
asrc-controller = <&asrc0>;
codec-master;
/*
* hp-det = <hp-det-pin hp-det-polarity>;
* hp-det-pin: JD1 JD2 or JD3
* hp-det-polarity = 0: hp detect high for headphone
* hp-det-polarity = 1: hp detect high for speaker
*/
hp-det = <2 0>;
hp-det-gpios = <&gpio1 0 0>;
mic-det-gpios = <&gpio1 0 0>;
audio-routing =
"Headphone Jack", "HP_L",
"Headphone Jack", "HP_R",
"Ext Spk", "SPK_LP",
"Ext Spk", "SPK_LN",
"Ext Spk", "SPK_RP",
"Ext Spk", "SPK_RN",
"LINPUT2", "Mic Jack",
"LINPUT3", "Mic Jack",
"RINPUT1", "Main MIC",
"RINPUT2", "Main MIC",
"Mic Jack", "MICB",
"Main MIC", "MICB",
"CPU-Playback", "ASRC-Playback",
"Playback", "CPU-Playback",
"ASRC-Capture", "CPU-Capture",
"CPU-Capture", "Capture";
};
};
&acm {
assigned-clocks = <&clk IMX8QXP_AUD_PLL0_DIV>,
<&clk IMX8QXP_AUD_ACM_AUD_PLL_CLK0_DIV>,
<&clk IMX8QXP_AUD_ACM_AUD_REC_CLK0_DIV>;
assigned-clock-rates = <786432000>, <24576000>, <24576000>;
status = "okay";
};
&asrc0 {
fsl,asrc-rate = <48000>;
status = "okay";
};
&iomuxc {
@ -76,6 +125,24 @@
>;
};
pinctrl_cm40_i2c: cm40i2cgrp {
fsl,pins = <
SC_P_ADC_IN1_M40_I2C0_SDA 0x0600004c
SC_P_ADC_IN0_M40_I2C0_SCL 0x0600004c
>;
};
pinctrl_sai1: sai1grp {
fsl,pins = <
SC_P_SAI1_RXD_ADMA_SAI1_RXD 0x0600004c
SC_P_SAI1_RXC_ADMA_SAI1_TXC 0x0600004c
SC_P_SAI1_RXFS_ADMA_SAI1_TXFS 0x0600004c
SC_P_SPI0_CS1_ADMA_SAI1_TXD 0x0600004c
SC_P_SPI2_CS0_LSIO_GPIO1_IO00 0x0600004c
SC_P_MCLK_OUT0_ADMA_ACM_MCLK_OUT0 0x0600004c
>;
};
pinctrl_usdhc1: usdhc1grp {
fsl,pins = <
SC_P_EMMC0_CLK_CONN_EMMC0_CLK 0x06000041
@ -205,6 +272,36 @@
};
};
&intmux_cm40 {
status = "okay";
};
&i2c0_cm40 {
#address-cells = <1>;
#size-cells = <0>;
clock-frequency = <100000>;
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_cm40_i2c>;
status = "okay";
wm8960: wm8960@1a {
compatible = "wlf,wm8960";
reg = <0x1a>;
clocks = <&clk IMX8QXP_AUD_MCLKOUT0>;
clock-names = "mclk";
wlf,shared-lrclk;
power-domains = <&pd_mclk_out0>;
assigned-clocks = <&clk IMX8QXP_AUD_MCLKOUT0>;
assigned-clock-rates = <12288000>;
};
};
&sai1 {
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_sai1>;
status = "okay";
};
&usdhc1 {
pinctrl-names = "default", "state_100mhz", "state_200mhz";
pinctrl-0 = <&pinctrl_usdhc1>;