ARM: dts: imx6qdl-icore: Add Sound card support
Subsystems (2)
PATCH v5 1/5 ARM: dts: imx6qdl-icore: Add Sound card support
From: Jagan Teki <[email protected]>
Linux Sound card now uses generic simple-audio-card, so add the same along with related audmux and codec(via u2c3) for i.CoreM6 QDL module boards.
---
Changes for v5:
- Add adumux
- Update simple-audio-card,widgets
- Add ssi1 fsl,mode
- Add #sound-dai-cells in codec
Changes for v4:
- Moved sgtl5000 node into dtsi instead of multiple copies of same in dts files
Changes for v3:
- Replace fsl,imx-audio-sgtl5000 and use simple-audio-card Changes for v2:
- Use proper [label:] node-name[@unit-address] for codec
arch/arm/boot/dts/imx6qdl-icore.dtsi | 97 ++++++++++++++++++++++++++++++++++++ 1 file changed, 97 insertions(+)
arch/arm/boot/dts/imx6qdl-icore.dtsi +97 -0
@@ -42,6 +42,7 @@ #include <dt-bindings/gpio/gpio.h> #include <dt-bindings/input/input.h> +#include <dt-bindings/sound/fsl-imx-audmux.h> / { memory {
@@ -55,6 +56,25 @@ default-brightness-level = <7>; }; + reg_1p8v: regulator-1p8v { + compatible = "regulator-fixed"; + regulator-name = "1P8V"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + regulator-boot-on; + regulator-always-on; + }; + + + reg_2p5v: regulator-3p3v { + compatible = "regulator-fixed"; + regulator-name = "2P5V"; + regulator-min-microvolt = <2500000>; + regulator-max-microvolt = <2500000>; + regulator-boot-on; + regulator-always-on; + }; + reg_3p3v: regulator-3p3v { compatible = "regulator-fixed"; regulator-name = "3P3V";
@@ -87,6 +107,59 @@ #clock-cells = <0>; clock-frequency = <25000000>; /* 25MHz for example */ }; + + sound { + compatible = "simple-audio-card"; + simple-audio-card,name = "imx6qdl-icore-sgtl5000"; + 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", + "Headphone", "Headphone Jack", + "Line", "Line In Jack", + "Speaker", "Line Out Jack", + "Speaker", "Ext Spk"; + simple-audio-card,routing = + "MIC_IN", "Mic Jack", + "Mic Jack", "Mic Bias", + "Headphone Jack", "HP_OUT"; + + simple-audio-card,cpu { + sound-dai = <&ssi1>; + }; + + dailink_master: simple-audio-card,codec { + sound-dai = <&sgtl5000>; + }; + }; +}; + +&audmux { + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_audmux>; + status = "okay"; + + + audmux_ssi1 { + fsl,audmux-port = <MX51_AUDMUX_PORT1_SSI0>; + fsl,port-config = < + (IMX_AUDMUX_V2_PTCR_TFSDIR | + IMX_AUDMUX_V2_PTCR_TFSEL(MX51_AUDMUX_PORT4) | + IMX_AUDMUX_V2_PTCR_TCLKDIR | + IMX_AUDMUX_V2_PTCR_TCSEL(MX51_AUDMUX_PORT4) | + IMX_AUDMUX_V2_PTCR_SYN) + IMX_AUDMUX_V2_PDCR_RXDSEL(MX51_AUDMUX_PORT4) + >; + }; + + audmux_aud4 { + fsl,audmux-port = <MX51_AUDMUX_PORT4>; + fsl,port-config = < + IMX_AUDMUX_V2_PTCR_SYN + IMX_AUDMUX_V2_PDCR_RXDSEL(MX51_AUDMUX_PORT1_SSI0) + >; + }; }; &can1 {
@@ -141,6 +214,16 @@ pinctrl-names = "default"; pinctrl-0 = <&pinctrl_i2c3>; status = "okay"; + + sgtl5000: codec at a { + #sound-dai-cells = <0>; + compatible = "fsl,sgtl5000"; + reg = <0x0a>; + clocks = <&clks IMX6QDL_CLK_CKO>; + VDDA-supply = <®_2p5v>; + VDDIO-supply = <®_3p3v>; + VDDD-supply = <®_1p8v>; + }; }; &pwm3 {
@@ -149,6 +232,11 @@ status = "okay"; }; +&ssi1 { + fsl,mode = "i2s-slave"; + status = "okay"; +}; + &uart4 { pinctrl-names = "default"; pinctrl-0 = <&pinctrl_uart4>;
@@ -178,6 +266,15 @@ }; &iomuxc { + pinctrl_audmux: audmux { + fsl,pins = < + MX6QDL_PAD_DISP0_DAT20__AUD4_TXC 0x130b0 + MX6QDL_PAD_DISP0_DAT21__AUD4_TXD 0x110b0 + MX6QDL_PAD_DISP0_DAT22__AUD4_TXFS 0x130b0 + MX6QDL_PAD_DISP0_DAT23__AUD4_RXD 0x130b0 + >; + }; + pinctrl_enet: enetgrp { fsl,pins = < MX6QDL_PAD_ENET_CRS_DV__ENET_RX_EN 0x1b0b0
Signature · 1 line
2.7.4
PATCH v5 2/5 ARM: dts: imx6qdl-icore-rqs: Move Sound nodes to dtsi
From: Jagan Teki <[email protected]>
imx6q, imx6dl icore-rqs modules share common sound nodes, so move the sound nodes from imx6q-icore-rqs into dtsi so-that both can share the common node details.
And also replace codec: sgtl5000 at 0a => sgtl5000: codec at a on imx6q-icore-rqs.dts to [label:] node-name[@unit-address] according to devicetree specification from ePAPER v1.1
---
Changes for v4, v5:
- None
Changes for v3:
- New patch
arch/arm/boot/dts/imx6q-icore-rqs.dts | 24 ------------------------ arch/arm/boot/dts/imx6qdl-icore-rqs.dtsi | 22 ++++++++++++++++++++++ 2 files changed, 22 insertions(+), 24 deletions(-)
arch/arm/boot/dts/imx6q-icore-rqs.dts +0 -24
@@ -47,30 +47,6 @@ / { model = "Engicam i.CoreM6 Quad/Dual RQS Starter Kit"; compatible = "engicam,imx6-icore-rqs", "fsl,imx6q"; - - sound { - compatible = "fsl,imx-audio-sgtl5000"; - model = "imx-audio-sgtl5000"; - ssi-controller = <&ssi1>; - audio-codec = <&codec>; - audio-routing = - "MIC_IN", "Mic Jack", - "Mic Jack", "Mic Bias", - "Headphone Jack", "HP_OUT"; - mux-int-port = <1>; - mux-ext-port = <4>; - }; -}; - -&i2c3 { - codec: sgtl5000 at 0a { - compatible = "fsl,sgtl5000"; - reg = <0x0a>; - clocks = <&clks IMX6QDL_CLK_CKO>; - VDDA-supply = <®_2p5v>; - VDDIO-supply = <®_3p3v>; - VDDD-supply = <®_1p8v>; - }; }; &sata {
arch/arm/boot/dts/imx6qdl-icore-rqs.dtsi +22 -0
@@ -118,6 +118,19 @@ clocks = <&clks IMX6QDL_CLK_LVDS2_GATE>; clock-names = "refclk"; }; + + sound { + compatible = "fsl,imx-audio-sgtl5000"; + model = "imx-audio-sgtl5000"; + ssi-controller = <&ssi1>; + audio-codec = <&sgtl5000>; + audio-routing = + "MIC_IN", "Mic Jack", + "Mic Jack", "Mic Bias", + "Headphone Jack", "HP_OUT"; + mux-int-port = <1>; + mux-ext-port = <4>; + }; }; &clks {
@@ -174,6 +187,15 @@ pinctrl-names = "default"; pinctrl-0 = <&pinctrl_i2c3>; status = "okay"; + + sgtl5000: codec at a { + compatible = "fsl,sgtl5000"; + reg = <0x0a>; + clocks = <&clks IMX6QDL_CLK_CKO>; + VDDA-supply = <®_2p5v>; + VDDIO-supply = <®_3p3v>; + VDDD-supply = <®_1p8v>; + }; }; &pcie {
Signature · 1 line
2.7.4
PATCH v5 3/5 ARM: dts: imx6qdl-icore-rqs: Switch to use simple-audio-card
In reply to Jagan TekiFrom: Jagan Teki <[email protected]>
This patch replace fsl,imx-audio-sgtl5000 and use simple-audio-card for Engicam i.CoreM6 RQS QDL platform boards.
This patch also fix, pinctrl_adumux.
---
Changes for v5:
- Update commit message
- Add adumux
- Update simple-audio-card,widgets
- Add ssi1 fsl,mode
- Add #sound-dai-cells in codec
Changes for v4:
- None
Changes for v3:
- Newly added
arch/arm/boot/dts/imx6qdl-icore-rqs.dtsi | 60 +++++++++++++++++++++++++------- arch/arm/boot/dts/imx6qdl-icore.dtsi | 4 +-- 2 files changed, 50 insertions(+), 14 deletions(-)
arch/arm/boot/dts/imx6qdl-icore-rqs.dtsi +48 -12
@@ -41,6 +41,7 @@ #include <dt-bindings/gpio/gpio.h> #include <dt-bindings/clock/imx6qdl-clock.h> +#include <dt-bindings/sound/fsl-imx-audmux.h> / { memory {
@@ -120,28 +121,61 @@ }; sound { - compatible = "fsl,imx-audio-sgtl5000"; - model = "imx-audio-sgtl5000"; - ssi-controller = <&ssi1>; - audio-codec = <&sgtl5000>; - audio-routing = + compatible = "simple-audio-card"; + simple-audio-card,name = "imx6qdl-icore-rqs-sgtl5000"; + 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", + "Headphone", "Headphone Jack", + "Line", "Line In Jack", + "Speaker", "Line Out Jack", + "Speaker", "Ext Spk"; + simple-audio-card,routing = "MIC_IN", "Mic Jack", "Mic Jack", "Mic Bias", "Headphone Jack", "HP_OUT"; - mux-int-port = <1>; - mux-ext-port = <4>; - }; -}; -&clks { - assigned-clocks = <&clks IMX6QDL_CLK_LVDS2_SEL>; - assigned-clock-parents = <&clks IMX6QDL_CLK_OSC>; + simple-audio-card,cpu { + sound-dai = <&ssi1>; + }; + + dailink_master: simple-audio-card,codec { + sound-dai = <&sgtl5000>; + }; + }; }; &audmux { pinctrl-names = "default"; pinctrl-0 = <&pinctrl_audmux>; status = "okay"; + + audmux_ssi1 { + fsl,audmux-port = <MX51_AUDMUX_PORT1_SSI0>; + fsl,port-config = < + (IMX_AUDMUX_V2_PTCR_TFSDIR | + IMX_AUDMUX_V2_PTCR_TFSEL(MX51_AUDMUX_PORT4) | + IMX_AUDMUX_V2_PTCR_TCLKDIR | + IMX_AUDMUX_V2_PTCR_TCSEL(MX51_AUDMUX_PORT4) | + IMX_AUDMUX_V2_PTCR_SYN) + IMX_AUDMUX_V2_PDCR_RXDSEL(MX51_AUDMUX_PORT4) + >; + }; + + audmux_aud4 { + fsl,audmux-port = <MX51_AUDMUX_PORT4>; + fsl,port-config = < + IMX_AUDMUX_V2_PTCR_SYN + IMX_AUDMUX_V2_PDCR_RXDSEL(MX51_AUDMUX_PORT1_SSI0) + >; + }; +}; + +&clks { + assigned-clocks = <&clks IMX6QDL_CLK_LVDS2_SEL>; + assigned-clock-parents = <&clks IMX6QDL_CLK_OSC>; }; &fec {
@@ -189,6 +223,7 @@ status = "okay"; sgtl5000: codec at a { + #sound-dai-cells = <0>; compatible = "fsl,sgtl5000"; reg = <0x0a>; clocks = <&clks IMX6QDL_CLK_CKO>;
@@ -206,6 +241,7 @@ }; &ssi1 { + fsl,mode = "i2s-slave"; status = "okay"; };
arch/arm/boot/dts/imx6qdl-icore.dtsi +2 -2
@@ -269,8 +269,8 @@ pinctrl_audmux: audmux { fsl,pins = < MX6QDL_PAD_DISP0_DAT20__AUD4_TXC 0x130b0 - MX6QDL_PAD_DISP0_DAT21__AUD4_TXD 0x110b0 - MX6QDL_PAD_DISP0_DAT22__AUD4_TXFS 0x130b0 + MX6QDL_PAD_DISP0_DAT21__AUD4_TXD 0x110b0 + MX6QDL_PAD_DISP0_DAT22__AUD4_TXFS 0x130b0 MX6QDL_PAD_DISP0_DAT23__AUD4_RXD 0x130b0 >; };
Signature · 1 line
2.7.4
PATCH v5 4/5 ARM: dts: imx6dl-icore: Add touchscreen node
In reply to Jagan TekiFrom: Jagan Teki <[email protected]>
max11801 touchscreen on Engicam iCoreM6 DualLite/Solo module is connected via i2c1, so add max11801: touchscreen at 48 on i2c1.
---
Changes for v5, v4, v3,v2:
- none
arch/arm/boot/dts/imx6dl-icore.dts | 9 +++++++++ 1 file changed, 9 insertions(+)
arch/arm/boot/dts/imx6dl-icore.dts +9 -0
@@ -57,3 +57,12 @@ &can2 { status = "okay"; }; + +&i2c1 { + max11801: touchscreen at 48 { + compatible = "maxim,max11801"; + reg = <0x48>; + interrupt-parent = <&gpio3>; + interrupts = <31 IRQ_TYPE_EDGE_FALLING>; + }; +};
Signature · 1 line
2.7.4
PATCH v5 5/5 ARM: dts: imx6qdl-icore-rqs: Add CAN nodes
In reply to Jagan TekiFrom: Jagan Teki <[email protected]>
Add support for can1 and can2 nodes on Engicam i.CoreM6 RQS QDL module boards.
---
Changes for v5:
- none
Changes for v4:
- Moved can nodes from dts to dtsi
Changes for v3:
- none
Changes for v2:
- s/flexcan/can
arch/arm/boot/dts/imx6qdl-icore-rqs.dtsi | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+)
arch/arm/boot/dts/imx6qdl-icore-rqs.dtsi +28 -0
@@ -173,6 +173,20 @@ }; }; +&can1 { + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_can1>; + xceiver-supply = <®_3p3v>; + status = "okay"; +}; + +&can2 { + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_can2>; + xceiver-supply = <®_3p3v>; + status = "okay"; +}; + &clks { assigned-clocks = <&clks IMX6QDL_CLK_LVDS2_SEL>; assigned-clock-parents = <&clks IMX6QDL_CLK_OSC>;
@@ -328,6 +342,20 @@ >; }; + pinctrl_can1: can1grp { + fsl,pins = < + MX6QDL_PAD_KEY_ROW2__FLEXCAN1_RX 0x1b020 + MX6QDL_PAD_KEY_COL2__FLEXCAN1_TX 0x1b020 + >; + }; + + pinctrl_can2: can2grp { + fsl,pins = < + MX6QDL_PAD_KEY_COL4__FLEXCAN2_TX 0x1b020 + MX6QDL_PAD_KEY_ROW4__FLEXCAN2_RX 0x1b020 + >; + }; + pinctrl_i2c1: i2c1grp { fsl,pins = < MX6QDL_PAD_EIM_D21__I2C1_SCL 0x4001b8b1
Signature · 1 line
2.7.4
Hi Shawn,
Quoted 10 lines · Jagan Teki
From: Jagan Teki <[email protected]>
Linux Sound card now uses generic simple-audio-card, so add the same along with related audmux and codec(via u2c3) for i.CoreM6 QDL module boards.
Cc Shawn Guo <[email protected]>Cc Matteo Lisi <[email protected]>Cc Michael Trimarchi <[email protected]>Signed-off-by Jagan Teki <[email protected]>
Quoted 13 lines
---
Changes for v5:
- Add adumux
- Update simple-audio-card,widgets
- Add ssi1 fsl,mode
- Add #sound-dai-cells in codec
Changes for v4:
- Moved sgtl5000 node into dtsi instead of multiple copies of same in dts files
Changes for v3:
- Replace fsl,imx-audio-sgtl5000 and use simple-audio-card Changes for v2:
- Use proper [label:] node-name[@unit-address] for codec
Series has tested, request for comments?
thanks!
Signature · 4 lines
Jagan Teki Free Software Engineer | www.openedev.com U-Boot, Linux | Upstream Maintainer Hyderabad, India.
Shawn Guo
AppliedQuoted 10 lines · Jagan Teki
From: Jagan Teki <[email protected]>
Linux Sound card now uses generic simple-audio-card, so add the same along with related audmux and codec(via u2c3) for i.CoreM6 QDL module boards.
Cc Shawn Guo <[email protected]>Cc Matteo Lisi <[email protected]>Cc Michael Trimarchi <[email protected]>Signed-off-by Jagan Teki <[email protected]>
Applied all, thanks.