2014-02-19 06:43:12

by Xiubo Li

[permalink] [raw]
Subject: [PATCH 0/4] Add audio card support for Vybird-TWR board


Add audio card support for Vybird-TWR board


Xiubo Li (4):
ARM: dts: Add Freescale SAI ALSA SoC Digital Audio Interface node for
VF610.
ARM: dts: Enable SAI ALSA SoC DAI device for Vybrid VF610 TOWER board.
ARM: dts: Enable SGTL5000 codec based audio driver node for VF610
TOWER.
ARM: dts: Add simple-card support for Vybird-TWR board

arch/arm/boot/dts/vf610-twr.dts | 68 +++++++++++++++++++++++++++++++++++++++++
arch/arm/boot/dts/vf610.dtsi | 3 ++
2 files changed, 71 insertions(+)

--
1.8.4


2014-02-19 06:43:31

by Xiubo Li

[permalink] [raw]
Subject: [PATCH 1/4] ARM: dts: Add Freescale SAI ALSA SoC Digital Audio Interface node for VF610.

This patch adds the SAI's edma mux Tx and Rx support.

Signed-off-by: Xiubo Li <[email protected]>
---
arch/arm/boot/dts/vf610.dtsi | 3 +++
1 file changed, 3 insertions(+)

diff --git a/arch/arm/boot/dts/vf610.dtsi b/arch/arm/boot/dts/vf610.dtsi
index 91a7757..f08df47 100644
--- a/arch/arm/boot/dts/vf610.dtsi
+++ b/arch/arm/boot/dts/vf610.dtsi
@@ -169,6 +169,9 @@
interrupts = <0 86 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&clks VF610_CLK_SAI2>;
clock-names = "sai";
+ dma-names = "tx", "rx";
+ dmas = <&edma0 0 21>,
+ <&edma0 0 20>;
status = "disabled";
};

--
1.8.4

2014-02-19 06:43:57

by Xiubo Li

[permalink] [raw]
Subject: [PATCH 2/4] ARM: dts: Enable SAI ALSA SoC DAI device for Vybrid VF610 TOWER board.

This patch adds and enables the SAI device.

Signed-off-by: Xiubo Li <[email protected]>
---
arch/arm/boot/dts/vf610-twr.dts | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)

diff --git a/arch/arm/boot/dts/vf610-twr.dts b/arch/arm/boot/dts/vf610-twr.dts
index e3a3805..8217854 100644
--- a/arch/arm/boot/dts/vf610-twr.dts
+++ b/arch/arm/boot/dts/vf610-twr.dts
@@ -127,9 +127,27 @@
VF610_PAD_PTB5__UART1_RX 0x21a1
>;
};
+
+ pinctrl_sai2: sai2grp {
+ fsl,pins = <
+ VF610_PAD_PTA16__SAI2_TX_BCLK 0x02ed
+ VF610_PAD_PTA18__SAI2_TX_DATA 0x02ee
+ VF610_PAD_PTA19__SAI2_TX_SYNC 0x02ed
+ VF610_PAD_PTA21__SAI2_RX_BCLK 0x02ed
+ VF610_PAD_PTA22__SAI2_RX_DATA 0x02ed
+ VF610_PAD_PTA23__SAI2_RX_SYNC 0x02ed
+ VF610_PAD_PTB18__EXT_AUDIO_MCLK 0x02ed
+ >;
+ };
};
};

+&sai2 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_sai2>;
+ status = "okay";
+};
+
&uart1 {
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_uart1>;
--
1.8.4

2014-02-19 06:44:30

by Xiubo Li

[permalink] [raw]
Subject: [PATCH 3/4] ARM: dts: Enable SGTL5000 codec based audio driver node for VF610 TOWER.

This patch adds and enables SGTL5000 codec support.

Signed-off-by: Xiubo Li <[email protected]>
---
arch/arm/boot/dts/vf610-twr.dts | 19 +++++++++++++++++++
1 file changed, 19 insertions(+)

diff --git a/arch/arm/boot/dts/vf610-twr.dts b/arch/arm/boot/dts/vf610-twr.dts
index 8217854..29790c9 100644
--- a/arch/arm/boot/dts/vf610-twr.dts
+++ b/arch/arm/boot/dts/vf610-twr.dts
@@ -34,6 +34,17 @@
};
};

+ regulators {
+ compatible = "simple-bus";
+
+ reg_3p3v: 3p3v {
+ compatible = "regulator-fixed";
+ regulator-name = "3P3V";
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ regulator-always-on;
+ };
+ };
};

&dspi0 {
@@ -72,6 +83,14 @@
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_i2c0>;
status = "okay";
+
+ codec: sgtl5000@0a {
+ compatible = "fsl,sgtl5000";
+ reg = <0x0a>;
+ VDDA-supply = <&reg_3p3v>;
+ VDDIO-supply = <&reg_3p3v>;
+ clocks = <&clks VF610_CLK_SAI2>;
+ };
};

&iomuxc {
--
1.8.4

2014-02-19 06:45:07

by Xiubo Li

[permalink] [raw]
Subject: [PATCH 4/4] ARM: dts: Add simple-card support for Vybird-TWR board

This patch adds and enables simple-card support in DT node.

Signed-off-by: Xiubo Li <[email protected]>
---
arch/arm/boot/dts/vf610-twr.dts | 31 +++++++++++++++++++++++++++++++
1 file changed, 31 insertions(+)

diff --git a/arch/arm/boot/dts/vf610-twr.dts b/arch/arm/boot/dts/vf610-twr.dts
index 29790c9..ff27dce 100644
--- a/arch/arm/boot/dts/vf610-twr.dts
+++ b/arch/arm/boot/dts/vf610-twr.dts
@@ -45,6 +45,35 @@
regulator-always-on;
};
};
+
+ sound {
+ compatible = "simple-audio-card";
+ simple-audio-card,format = "i2s";
+ simple-audio-card,widgets =
+ "Microphone", "Microphone Jack",
+ "Headphone", "Headphone Jack",
+ "Speaker", "Speaker Ext",
+ "Line", "Line In Jack";
+ simple-audio-card,routing =
+ "MIC_IN", "Microphone Jack",
+ "Microphone Jack", "Mic Bias",
+ "LINE_IN", "Line In Jack",
+ "Headphone Jack", "HP_OUT",
+ "Speaker Ext", "LINE_OUT";
+
+ simple-audio-card,cpu {
+ sound-dai = <&sai2>;
+ master-clkdir-out;
+ frame-master;
+ bitclock-master;
+ };
+
+ simple-audio-card,codec {
+ sound-dai = <&codec>;
+ frame-master;
+ bitclock-master;
+ };
+ };
};

&dspi0 {
@@ -85,6 +114,7 @@
status = "okay";

codec: sgtl5000@0a {
+ #sound-dai-cells = <0>;
compatible = "fsl,sgtl5000";
reg = <0x0a>;
VDDA-supply = <&reg_3p3v>;
@@ -162,6 +192,7 @@
};

&sai2 {
+ #sound-dai-cells = <0>;
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_sai2>;
status = "okay";
--
1.8.4

2014-02-19 07:06:53

by Shawn Guo

[permalink] [raw]
Subject: Re: [PATCH 2/4] ARM: dts: Enable SAI ALSA SoC DAI device for Vybrid VF610 TOWER board.

On Wed, Feb 19, 2014 at 01:38:41PM +0800, Xiubo Li wrote:
> This patch adds and enables the SAI device.
>
> Signed-off-by: Xiubo Li <[email protected]>
> ---
> arch/arm/boot/dts/vf610-twr.dts | 18 ++++++++++++++++++
> 1 file changed, 18 insertions(+)
>
> diff --git a/arch/arm/boot/dts/vf610-twr.dts b/arch/arm/boot/dts/vf610-twr.dts
> index e3a3805..8217854 100644
> --- a/arch/arm/boot/dts/vf610-twr.dts
> +++ b/arch/arm/boot/dts/vf610-twr.dts
> @@ -127,9 +127,27 @@
> VF610_PAD_PTB5__UART1_RX 0x21a1
> >;
> };
> +
> + pinctrl_sai2: sai2grp {

To sort it alphabetically, the entry should be added before
pinctrl_uart1.

> + fsl,pins = <
> + VF610_PAD_PTA16__SAI2_TX_BCLK 0x02ed
> + VF610_PAD_PTA18__SAI2_TX_DATA 0x02ee
> + VF610_PAD_PTA19__SAI2_TX_SYNC 0x02ed
> + VF610_PAD_PTA21__SAI2_RX_BCLK 0x02ed
> + VF610_PAD_PTA22__SAI2_RX_DATA 0x02ed
> + VF610_PAD_PTA23__SAI2_RX_SYNC 0x02ed
> + VF610_PAD_PTB18__EXT_AUDIO_MCLK 0x02ed

Use tabs instead of spaces.

Shawn

> + >;
> + };
> };
> };
>
> +&sai2 {
> + pinctrl-names = "default";
> + pinctrl-0 = <&pinctrl_sai2>;
> + status = "okay";
> +};
> +
> &uart1 {
> pinctrl-names = "default";
> pinctrl-0 = <&pinctrl_uart1>;
> --
> 1.8.4
>
>

2014-02-19 07:07:52

by Shawn Guo

[permalink] [raw]
Subject: Re: [PATCH 1/4] ARM: dts: Add Freescale SAI ALSA SoC Digital Audio Interface node for VF610.

On Wed, Feb 19, 2014 at 01:38:40PM +0800, Xiubo Li wrote:
> This patch adds the SAI's edma mux Tx and Rx support.
>
> Signed-off-by: Xiubo Li <[email protected]>

'ARM: dts: vf610: ...' for patch prefix.

Shawn

> ---
> arch/arm/boot/dts/vf610.dtsi | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/arch/arm/boot/dts/vf610.dtsi b/arch/arm/boot/dts/vf610.dtsi
> index 91a7757..f08df47 100644
> --- a/arch/arm/boot/dts/vf610.dtsi
> +++ b/arch/arm/boot/dts/vf610.dtsi
> @@ -169,6 +169,9 @@
> interrupts = <0 86 IRQ_TYPE_LEVEL_HIGH>;
> clocks = <&clks VF610_CLK_SAI2>;
> clock-names = "sai";
> + dma-names = "tx", "rx";
> + dmas = <&edma0 0 21>,
> + <&edma0 0 20>;
> status = "disabled";
> };
>
> --
> 1.8.4
>
>

2014-02-19 07:12:09

by Shawn Guo

[permalink] [raw]
Subject: Re: [PATCH 2/4] ARM: dts: Enable SAI ALSA SoC DAI device for Vybrid VF610 TOWER board.

On Wed, Feb 19, 2014 at 01:38:41PM +0800, Xiubo Li wrote:
> This patch adds and enables the SAI device.
>
> Signed-off-by: Xiubo Li <[email protected]>

The patch subject can be a little short like

ARM: dts: vf610-twr: Enable SAI ALSA SoC DAI device

Shawn

> ---
> arch/arm/boot/dts/vf610-twr.dts | 18 ++++++++++++++++++
> 1 file changed, 18 insertions(+)
>
> diff --git a/arch/arm/boot/dts/vf610-twr.dts b/arch/arm/boot/dts/vf610-twr.dts
> index e3a3805..8217854 100644
> --- a/arch/arm/boot/dts/vf610-twr.dts
> +++ b/arch/arm/boot/dts/vf610-twr.dts
> @@ -127,9 +127,27 @@
> VF610_PAD_PTB5__UART1_RX 0x21a1
> >;
> };
> +
> + pinctrl_sai2: sai2grp {
> + fsl,pins = <
> + VF610_PAD_PTA16__SAI2_TX_BCLK 0x02ed
> + VF610_PAD_PTA18__SAI2_TX_DATA 0x02ee
> + VF610_PAD_PTA19__SAI2_TX_SYNC 0x02ed
> + VF610_PAD_PTA21__SAI2_RX_BCLK 0x02ed
> + VF610_PAD_PTA22__SAI2_RX_DATA 0x02ed
> + VF610_PAD_PTA23__SAI2_RX_SYNC 0x02ed
> + VF610_PAD_PTB18__EXT_AUDIO_MCLK 0x02ed
> + >;
> + };
> };
> };
>
> +&sai2 {
> + pinctrl-names = "default";
> + pinctrl-0 = <&pinctrl_sai2>;
> + status = "okay";
> +};
> +
> &uart1 {
> pinctrl-names = "default";
> pinctrl-0 = <&pinctrl_uart1>;
> --
> 1.8.4
>
>

2014-02-19 07:14:10

by Shawn Guo

[permalink] [raw]
Subject: Re: [PATCH 3/4] ARM: dts: Enable SGTL5000 codec based audio driver node for VF610 TOWER.

On Wed, Feb 19, 2014 at 01:38:42PM +0800, Xiubo Li wrote:
> This patch adds and enables SGTL5000 codec support.
>
> Signed-off-by: Xiubo Li <[email protected]>
> ---
> arch/arm/boot/dts/vf610-twr.dts | 19 +++++++++++++++++++
> 1 file changed, 19 insertions(+)
>
> diff --git a/arch/arm/boot/dts/vf610-twr.dts b/arch/arm/boot/dts/vf610-twr.dts
> index 8217854..29790c9 100644
> --- a/arch/arm/boot/dts/vf610-twr.dts
> +++ b/arch/arm/boot/dts/vf610-twr.dts
> @@ -34,6 +34,17 @@
> };
> };
>
> + regulators {
> + compatible = "simple-bus";

#address-cells = <1>;
#size-cells = <0>;

> +
> + reg_3p3v: 3p3v {

reg_3p3v: regulator@0 {

> + compatible = "regulator-fixed";

reg = <0>;

Shawn

> + regulator-name = "3P3V";
> + regulator-min-microvolt = <3300000>;
> + regulator-max-microvolt = <3300000>;
> + regulator-always-on;
> + };
> + };
> };
>
> &dspi0 {
> @@ -72,6 +83,14 @@
> pinctrl-names = "default";
> pinctrl-0 = <&pinctrl_i2c0>;
> status = "okay";
> +
> + codec: sgtl5000@0a {
> + compatible = "fsl,sgtl5000";
> + reg = <0x0a>;
> + VDDA-supply = <&reg_3p3v>;
> + VDDIO-supply = <&reg_3p3v>;
> + clocks = <&clks VF610_CLK_SAI2>;
> + };
> };
>
> &iomuxc {
> --
> 1.8.4
>
>

2014-02-19 07:25:50

by Xiubo Li

[permalink] [raw]
Subject: RE: [PATCH 2/4] ARM: dts: Enable SAI ALSA SoC DAI device for Vybrid VF610 TOWER board.


> > @@ -127,9 +127,27 @@
> > VF610_PAD_PTB5__UART1_RX 0x21a1
> > >;
> > };
> > +
> > + pinctrl_sai2: sai2grp {
>
> To sort it alphabetically, the entry should be added before
> pinctrl_uart1.
>
> > + fsl,pins = <
> > + VF610_PAD_PTA16__SAI2_TX_BCLK 0x02ed
> > + VF610_PAD_PTA18__SAI2_TX_DATA 0x02ee
> > + VF610_PAD_PTA19__SAI2_TX_SYNC 0x02ed
> > + VF610_PAD_PTA21__SAI2_RX_BCLK 0x02ed
> > + VF610_PAD_PTA22__SAI2_RX_DATA 0x02ed
> > + VF610_PAD_PTA23__SAI2_RX_SYNC 0x02ed
> > + VF610_PAD_PTB18__EXT_AUDIO_MCLK 0x02ed
>
> Use tabs instead of spaces.
>
> Shawn
>

Yes, I'll fix these two issues above.

Thanks,

--
Best Regards,
Xiubo

2014-02-19 07:26:40

by Xiubo Li

[permalink] [raw]
Subject: RE: [PATCH 1/4] ARM: dts: Add Freescale SAI ALSA SoC Digital Audio Interface node for VF610.


>
> 'ARM: dts: vf610: ...' for patch prefix.
>
> Shawn

Please see the next version.


Thanks,

--
Best Regards,
Xiubo

2014-02-19 07:29:02

by Xiubo Li

[permalink] [raw]
Subject: RE: [PATCH 2/4] ARM: dts: Enable SAI ALSA SoC DAI device for Vybrid VF610 TOWER board.


> The patch subject can be a little short like
>
> ARM: dts: vf610-twr: Enable SAI ALSA SoC DAI device
>

Yes, that looks better.

Thanks,

--
Best Regards,
Xiubo