* [PATCH] ARM: dts: imx6ul-14x14-evk: Add audio support
@ 2016-05-02 23:56 Fabio Estevam
2016-05-03 12:48 ` Shawn Guo
2016-05-03 12:52 ` Shawn Guo
0 siblings, 2 replies; 4+ messages in thread
From: Fabio Estevam @ 2016-05-02 23:56 UTC (permalink / raw)
To: linux-arm-kernel
From: Fabio Estevam <fabio.estevam@nxp.com>
imx6ul-14x14-evk has a wm8960 codec connected via SAI2 port.
Add support for it.
Thanks to Petr Kulhavy <brain@jikos.cz> for the hint on initializing
the PLL4 frequency to get a correct MCLK.
Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
---
Shawn,
In order to get audio functional it is still needed to get bit 20
of GPR1 register.
This is a separate patch though and I will discuss it on another thread.
arch/arm/boot/dts/imx6ul-14x14-evk.dts | 75 ++++++++++++++++++++++++++++++++++
1 file changed, 75 insertions(+)
diff --git a/arch/arm/boot/dts/imx6ul-14x14-evk.dts b/arch/arm/boot/dts/imx6ul-14x14-evk.dts
index 7207280..8b4776a 100644
--- a/arch/arm/boot/dts/imx6ul-14x14-evk.dts
+++ b/arch/arm/boot/dts/imx6ul-14x14-evk.dts
@@ -36,6 +36,45 @@
enable-active-high;
};
};
+
+ sound {
+ compatible = "simple-audio-card";
+ simple-audio-card,name = "mx6ul-wm8960";
+ simple-audio-card,format = "i2s";
+ simple-audio-card,bitclock-master = <&dailink_master>;
+ simple-audio-card,frame-master = <&dailink_master>;
+ simple-audio-card,widgets =
+ "Microphone", "Mic Jack",
+ "Line", "Line In",
+ "Line", "Line Out",
+ "Speaker", "Speaker",
+ "Headphone", "Headphone Jack";
+ simple-audio-card,routing =
+ "Headphone Jack", "HP_L",
+ "Headphone Jack", "HP_R",
+ "Speaker", "SPK_LP",
+ "Speaker", "SPK_LN",
+ "Speaker", "SPK_RP",
+ "Speaker", "SPK_RN",
+ "LINPUT1", "Mic Jack",
+ "LINPUT3", "Mic Jack",
+ "RINPUT1", "Mic Jack",
+ "RINPUT2", "Mic Jack";
+
+ simple-audio-card,cpu {
+ sound-dai = <&sai2>;
+ };
+
+ dailink_master: simple-audio-card,codec {
+ sound-dai = <&codec>;
+ clocks = <&clks IMX6UL_CLK_SAI2>;
+ };
+ };
+};
+
+&clks {
+ assigned-clocks = <&clks IMX6UL_CLK_PLL4_AUDIO_DIV>;
+ assigned-clock-rates = <786432000>;
};
&cpu0 {
@@ -43,6 +82,20 @@
soc-supply = <®_soc>;
};
+&i2c2 {
+ clock_frequency = <100000>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_i2c2>;
+ status = "okay";
+
+ codec: wm8960 at 1a {
+ #sound-dai-cells = <0>;
+ compatible = "wlf,wm8960";
+ reg = <0x1a>;
+ wlf,shared-lrclk;
+ };
+};
+
&fec1 {
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_enet1>;
@@ -86,6 +139,17 @@
};
};
+&sai2 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_sai2>;
+
+ assigned-clocks = <&clks IMX6UL_CLK_SAI2_SEL>,
+ <&clks IMX6UL_CLK_SAI2>;
+ assigned-clock-parents = <&clks IMX6UL_CLK_PLL4_AUDIO_DIV>;
+ assigned-clock-rates = <0>, <12288000>;
+ status = "okay";
+};
+
&snvs_poweroff {
status = "okay";
};
@@ -272,6 +336,17 @@
>;
};
+ pinctrl_sai2: sai2grp {
+ fsl,pins = <
+ MX6UL_PAD_JTAG_TDI__SAI2_TX_BCLK 0x17088
+ MX6UL_PAD_JTAG_TDO__SAI2_TX_SYNC 0x17088
+ MX6UL_PAD_JTAG_TRST_B__SAI2_TX_DATA 0x11088
+ MX6UL_PAD_JTAG_TCK__SAI2_RX_DATA 0x11088
+ MX6UL_PAD_JTAG_TMS__SAI2_MCLK 0x17088
+ MX6UL_PAD_SNVS_TAMPER4__GPIO5_IO04 0x17059
+ >;
+ };
+
pinctrl_pwm1: pwm1grp {
fsl,pins = <
MX6UL_PAD_GPIO1_IO08__PWM1_OUT 0x110b0
--
1.9.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH] ARM: dts: imx6ul-14x14-evk: Add audio support
2016-05-02 23:56 [PATCH] ARM: dts: imx6ul-14x14-evk: Add audio support Fabio Estevam
@ 2016-05-03 12:48 ` Shawn Guo
2016-05-03 12:52 ` Shawn Guo
1 sibling, 0 replies; 4+ messages in thread
From: Shawn Guo @ 2016-05-03 12:48 UTC (permalink / raw)
To: linux-arm-kernel
On Mon, May 02, 2016 at 08:56:26PM -0300, Fabio Estevam wrote:
> From: Fabio Estevam <fabio.estevam@nxp.com>
>
> imx6ul-14x14-evk has a wm8960 codec connected via SAI2 port.
>
> Add support for it.
>
> Thanks to Petr Kulhavy <brain@jikos.cz> for the hint on initializing
> the PLL4 frequency to get a correct MCLK.
>
> Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
Applied, thanks.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH] ARM: dts: imx6ul-14x14-evk: Add audio support
2016-05-02 23:56 [PATCH] ARM: dts: imx6ul-14x14-evk: Add audio support Fabio Estevam
2016-05-03 12:48 ` Shawn Guo
@ 2016-05-03 12:52 ` Shawn Guo
2016-05-03 12:59 ` Fabio Estevam
1 sibling, 1 reply; 4+ messages in thread
From: Shawn Guo @ 2016-05-03 12:52 UTC (permalink / raw)
To: linux-arm-kernel
On Mon, May 02, 2016 at 08:56:26PM -0300, Fabio Estevam wrote:
> @@ -86,6 +139,17 @@
> };
> };
>
> +&sai2 {
> + pinctrl-names = "default";
> + pinctrl-0 = <&pinctrl_sai2>;
> +
Forgot to mention that I dropped this newline when applying.
Shawn
> + assigned-clocks = <&clks IMX6UL_CLK_SAI2_SEL>,
> + <&clks IMX6UL_CLK_SAI2>;
> + assigned-clock-parents = <&clks IMX6UL_CLK_PLL4_AUDIO_DIV>;
> + assigned-clock-rates = <0>, <12288000>;
> + status = "okay";
> +};
> +
> &snvs_poweroff {
> status = "okay";
> };
> @@ -272,6 +336,17 @@
> >;
> };
>
> + pinctrl_sai2: sai2grp {
> + fsl,pins = <
> + MX6UL_PAD_JTAG_TDI__SAI2_TX_BCLK 0x17088
> + MX6UL_PAD_JTAG_TDO__SAI2_TX_SYNC 0x17088
> + MX6UL_PAD_JTAG_TRST_B__SAI2_TX_DATA 0x11088
> + MX6UL_PAD_JTAG_TCK__SAI2_RX_DATA 0x11088
> + MX6UL_PAD_JTAG_TMS__SAI2_MCLK 0x17088
> + MX6UL_PAD_SNVS_TAMPER4__GPIO5_IO04 0x17059
> + >;
> + };
> +
> pinctrl_pwm1: pwm1grp {
> fsl,pins = <
> MX6UL_PAD_GPIO1_IO08__PWM1_OUT 0x110b0
> --
> 1.9.1
>
>
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH] ARM: dts: imx6ul-14x14-evk: Add audio support
2016-05-03 12:52 ` Shawn Guo
@ 2016-05-03 12:59 ` Fabio Estevam
0 siblings, 0 replies; 4+ messages in thread
From: Fabio Estevam @ 2016-05-03 12:59 UTC (permalink / raw)
To: linux-arm-kernel
On Tue, May 3, 2016 at 9:52 AM, Shawn Guo <shawnguo@kernel.org> wrote:
> On Mon, May 02, 2016 at 08:56:26PM -0300, Fabio Estevam wrote:
>> @@ -86,6 +139,17 @@
>> };
>> };
>>
>> +&sai2 {
>> + pinctrl-names = "default";
>> + pinctrl-0 = <&pinctrl_sai2>;
>> +
>
> Forgot to mention that I dropped this newline when applying.
Thanks, Shawn!
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2016-05-03 12:59 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-05-02 23:56 [PATCH] ARM: dts: imx6ul-14x14-evk: Add audio support Fabio Estevam
2016-05-03 12:48 ` Shawn Guo
2016-05-03 12:52 ` Shawn Guo
2016-05-03 12:59 ` Fabio Estevam
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).