devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [alsa-devel] [PATCH RESEND] ARM: dts: Support audio on Exynos5422-odroidxu3 using simple-audio-card
@ 2015-03-23  2:51 Inha Song
  2015-03-23 10:54 ` Sylwester Nawrocki
  0 siblings, 1 reply; 4+ messages in thread
From: Inha Song @ 2015-03-23  2:51 UTC (permalink / raw)
  To: s.nawrocki, broonie
  Cc: kgene, robh+dt, pawel.moll, mark.rutland, galak, alsa-devel,
	devicetree, linux-samsung-soc, cw00.choi, Inha Song

Add MAX98090 audio codec, I2S interface and the sound nodes to support
audio on Exynos5422 SoC Based Odroid-XU3 board. Now we can support audio
in Odroid-XU3 board using simple-audio-card DT binding.

Signed-off-by: Inha Song <ideal.song@samsung.com>
---
 arch/arm/boot/dts/exynos5420.dtsi          |  9 +++++
 arch/arm/boot/dts/exynos5422-odroidxu3.dts | 57 ++++++++++++++++++++++++++++++
 2 files changed, 66 insertions(+)

diff --git a/arch/arm/boot/dts/exynos5420.dtsi b/arch/arm/boot/dts/exynos5420.dtsi
index 4eaeabe..e459c1d 100644
--- a/arch/arm/boot/dts/exynos5420.dtsi
+++ b/arch/arm/boot/dts/exynos5420.dtsi
@@ -415,6 +415,9 @@
 			<&clock_audss EXYNOS_I2S_BUS>,
 			<&clock_audss EXYNOS_SCLK_I2S>;
 		clock-names = "iis", "i2s_opclk0", "i2s_opclk1";
+		#clock-cells = <1>;
+		clock-output-names = "i2s_cdclk0";
+		#sound-dai-cells = <1>;
 		samsung,idma-addr = <0x03000000>;
 		pinctrl-names = "default";
 		pinctrl-0 = <&i2s0_bus>;
@@ -429,6 +432,9 @@
 		dma-names = "tx", "rx";
 		clocks = <&clock CLK_I2S1>, <&clock CLK_SCLK_I2S1>;
 		clock-names = "iis", "i2s_opclk0";
+		#clock-cells = <1>;
+		clock-output-names = "i2s_cdclk1";
+		#sound-dai-cells = <1>;
 		pinctrl-names = "default";
 		pinctrl-0 = <&i2s1_bus>;
 		status = "disabled";
@@ -442,6 +448,9 @@
 		dma-names = "tx", "rx";
 		clocks = <&clock CLK_I2S2>, <&clock CLK_SCLK_I2S2>;
 		clock-names = "iis", "i2s_opclk0";
+		#clock-cells = <1>;
+		clock-output-names = "i2s_cdclk2";
+		#sound-dai-cells = <1>;
 		pinctrl-names = "default";
 		pinctrl-0 = <&i2s2_bus>;
 		status = "disabled";
diff --git a/arch/arm/boot/dts/exynos5422-odroidxu3.dts b/arch/arm/boot/dts/exynos5422-odroidxu3.dts
index edc25cf..9275ad6 100644
--- a/arch/arm/boot/dts/exynos5422-odroidxu3.dts
+++ b/arch/arm/boot/dts/exynos5422-odroidxu3.dts
@@ -11,6 +11,7 @@
 */
 
 /dts-v1/;
+#include <dt-bindings/sound/samsung-i2s.h>
 #include "exynos5800.dtsi"
 
 / {
@@ -285,6 +286,62 @@
 	rtc@101E0000 {
 		status = "okay";
 	};
+
+	sound: sound {
+		compatible = "simple-audio-card";
+		assigned-clocks = <&clock_audss EXYNOS_MOUT_AUDSS>,
+				<&clock_audss EXYNOS_MOUT_I2S>,
+				<&clock_audss EXYNOS_DOUT_AUD_BUS>;
+		assigned-clock-parents = <&clock CLK_FIN_PLL>,
+				<&clock_audss EXYNOS_MOUT_AUDSS>;
+		assigned-clock-rates = <0>,
+				<0>,
+				<19200000>;
+
+		simple-audio-card,name = "Odroid-XU3";
+
+		simple-audio-card,widgets =
+			"Headphone", "Headphone Jack",
+			"Speakers", "Speakers";
+		simple-audio-card,routing =
+			"Headphone Jack", "HPL",
+			"Headphone Jack", "HPR",
+			"Headphone Jack", "MICBIAS",
+			"IN1", "Headphone Jack",
+			"Speakers", "SPKL",
+			"Speakers", "SPKR";
+
+		simple-audio-card,format = "i2s";
+		simple-audio-card,bitclock-master = <&link0_codec>;
+		simple-audio-card,frame-master = <&link0_codec>;
+
+		simple-audio-card,cpu {
+			sound-dai = <&i2s0 0>;
+			system-clock-frequency = <19200000>;
+		};
+
+		link0_codec: simple-audio-card,codec {
+			sound-dai = <&max98090>;
+			clocks = <&i2s0 CLK_I2S_CDCLK>;
+		};
+	};
+};
+
+&hsi2c_5 {
+	status = "okay";
+	max98090: max98090@10 {
+		compatible = "maxim,max98090";
+		reg = <0x10>;
+		interrupt-parent = <&gpx3>;
+		interrupts = <2 0>;
+		clocks = <&i2s0 CLK_I2S_CDCLK>;
+		clock-names = "mclk";
+		#sound-dai-cells = <0>;
+	};
+};
+
+&i2s0 {
+	status = "okay";
 };
 
 &hdmi {
-- 
2.0.0.390.gcb682f8

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [alsa-devel] [PATCH RESEND] ARM: dts: Support audio on Exynos5422-odroidxu3 using simple-audio-card
  2015-03-23  2:51 [alsa-devel] [PATCH RESEND] ARM: dts: Support audio on Exynos5422-odroidxu3 using simple-audio-card Inha Song
@ 2015-03-23 10:54 ` Sylwester Nawrocki
  2015-03-23 11:09   ` Inha Song
  2015-03-24 12:58   ` Kukjin Kim
  0 siblings, 2 replies; 4+ messages in thread
From: Sylwester Nawrocki @ 2015-03-23 10:54 UTC (permalink / raw)
  To: Inha Song
  Cc: broonie, kgene, robh+dt, pawel.moll, mark.rutland, galak,
	alsa-devel, devicetree, linux-samsung-soc, cw00.choi

On 23/03/15 03:51, Inha Song wrote:
> Add MAX98090 audio codec, I2S interface and the sound nodes to support
> audio on Exynos5422 SoC Based Odroid-XU3 board. Now we can support audio
> in Odroid-XU3 board using simple-audio-card DT binding.
> 
> Signed-off-by: Inha Song <ideal.song@samsung.com>
> ---
>  arch/arm/boot/dts/exynos5420.dtsi          |  9 +++++
>  arch/arm/boot/dts/exynos5422-odroidxu3.dts | 57 ++++++++++++++++++++++++++++++
>  2 files changed, 66 insertions(+)
> 
> diff --git a/arch/arm/boot/dts/exynos5420.dtsi b/arch/arm/boot/dts/exynos5420.dtsi
> index 4eaeabe..e459c1d 100644
> --- a/arch/arm/boot/dts/exynos5420.dtsi
> +++ b/arch/arm/boot/dts/exynos5420.dtsi
> @@ -415,6 +415,9 @@
>  			<&clock_audss EXYNOS_I2S_BUS>,
>  			<&clock_audss EXYNOS_SCLK_I2S>;
>  		clock-names = "iis", "i2s_opclk0", "i2s_opclk1";
> +		#clock-cells = <1>;
> +		clock-output-names = "i2s_cdclk0";
> +		#sound-dai-cells = <1>;
>  		samsung,idma-addr = <0x03000000>;
>  		pinctrl-names = "default";
>  		pinctrl-0 = <&i2s0_bus>;
> @@ -429,6 +432,9 @@
>  		dma-names = "tx", "rx";
>  		clocks = <&clock CLK_I2S1>, <&clock CLK_SCLK_I2S1>;
>  		clock-names = "iis", "i2s_opclk0";
> +		#clock-cells = <1>;
> +		clock-output-names = "i2s_cdclk1";
> +		#sound-dai-cells = <1>;
>  		pinctrl-names = "default";
>  		pinctrl-0 = <&i2s1_bus>;
>  		status = "disabled";
> @@ -442,6 +448,9 @@
>  		dma-names = "tx", "rx";
>  		clocks = <&clock CLK_I2S2>, <&clock CLK_SCLK_I2S2>;
>  		clock-names = "iis", "i2s_opclk0";
> +		#clock-cells = <1>;
> +		clock-output-names = "i2s_cdclk2";
> +		#sound-dai-cells = <1>;
>  		pinctrl-names = "default";
>  		pinctrl-0 = <&i2s2_bus>;
>  		status = "disabled";
> diff --git a/arch/arm/boot/dts/exynos5422-odroidxu3.dts b/arch/arm/boot/dts/exynos5422-odroidxu3.dts
> index edc25cf..9275ad6 100644
> --- a/arch/arm/boot/dts/exynos5422-odroidxu3.dts
> +++ b/arch/arm/boot/dts/exynos5422-odroidxu3.dts
> @@ -11,6 +11,7 @@
>  */
>  
>  /dts-v1/;
> +#include <dt-bindings/sound/samsung-i2s.h>
>  #include "exynos5800.dtsi"
>  
>  / {
> @@ -285,6 +286,62 @@
>  	rtc@101E0000 {
>  		status = "okay";
>  	};
> +
> +	sound: sound {
> +		compatible = "simple-audio-card";
> +		assigned-clocks = <&clock_audss EXYNOS_MOUT_AUDSS>,
> +				<&clock_audss EXYNOS_MOUT_I2S>,
> +				<&clock_audss EXYNOS_DOUT_AUD_BUS>;
> +		assigned-clock-parents = <&clock CLK_FIN_PLL>,
> +				<&clock_audss EXYNOS_MOUT_AUDSS>;
> +		assigned-clock-rates = <0>,
> +				<0>,
> +				<19200000>;

The patch looks good, except it would be more appropriate to move the
above properties to &clock_audss { }; node in this file.
With that change feel free to add:
Reviewed-by: Sylwester Nawrocki <s.nawrocki@samsung.com>

As a side note, this is a dts patch and of course Kukjin maintains that.
You would likely get it applied sooner if you would have addressed it
directly to Kukjin, rather than Mark or me.

-- 
Thanks,
Sylwester

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [alsa-devel] [PATCH RESEND] ARM: dts: Support audio on Exynos5422-odroidxu3 using simple-audio-card
  2015-03-23 10:54 ` Sylwester Nawrocki
@ 2015-03-23 11:09   ` Inha Song
  2015-03-24 12:58   ` Kukjin Kim
  1 sibling, 0 replies; 4+ messages in thread
From: Inha Song @ 2015-03-23 11:09 UTC (permalink / raw)
  To: Sylwester Nawrocki
  Cc: broonie, kgene, robh+dt, pawel.moll, mark.rutland, galak,
	alsa-devel, devicetree, linux-samsung-soc, cw00.choi

Hi Sylwester,

Thanks for your review.

On Mon, 23 Mar 2015 11:54:55 +0100
Sylwester Nawrocki <s.nawrocki@samsung.com> wrote:

> On 23/03/15 03:51, Inha Song wrote:
> > Add MAX98090 audio codec, I2S interface and the sound nodes to support
> > audio on Exynos5422 SoC Based Odroid-XU3 board. Now we can support audio
> > in Odroid-XU3 board using simple-audio-card DT binding.
> > 
> > Signed-off-by: Inha Song <ideal.song@samsung.com>
> > ---
> >  arch/arm/boot/dts/exynos5420.dtsi          |  9 +++++
> >  arch/arm/boot/dts/exynos5422-odroidxu3.dts | 57 ++++++++++++++++++++++++++++++
> >  2 files changed, 66 insertions(+)
> > 
> > diff --git a/arch/arm/boot/dts/exynos5420.dtsi b/arch/arm/boot/dts/exynos5420.dtsi
> > index 4eaeabe..e459c1d 100644
> > --- a/arch/arm/boot/dts/exynos5420.dtsi
> > +++ b/arch/arm/boot/dts/exynos5420.dtsi
> > @@ -415,6 +415,9 @@
> >  			<&clock_audss EXYNOS_I2S_BUS>,
> >  			<&clock_audss EXYNOS_SCLK_I2S>;
> >  		clock-names = "iis", "i2s_opclk0", "i2s_opclk1";
> > +		#clock-cells = <1>;
> > +		clock-output-names = "i2s_cdclk0";
> > +		#sound-dai-cells = <1>;
> >  		samsung,idma-addr = <0x03000000>;
> >  		pinctrl-names = "default";
> >  		pinctrl-0 = <&i2s0_bus>;
> > @@ -429,6 +432,9 @@
> >  		dma-names = "tx", "rx";
> >  		clocks = <&clock CLK_I2S1>, <&clock CLK_SCLK_I2S1>;
> >  		clock-names = "iis", "i2s_opclk0";
> > +		#clock-cells = <1>;
> > +		clock-output-names = "i2s_cdclk1";
> > +		#sound-dai-cells = <1>;
> >  		pinctrl-names = "default";
> >  		pinctrl-0 = <&i2s1_bus>;
> >  		status = "disabled";
> > @@ -442,6 +448,9 @@
> >  		dma-names = "tx", "rx";
> >  		clocks = <&clock CLK_I2S2>, <&clock CLK_SCLK_I2S2>;
> >  		clock-names = "iis", "i2s_opclk0";
> > +		#clock-cells = <1>;
> > +		clock-output-names = "i2s_cdclk2";
> > +		#sound-dai-cells = <1>;
> >  		pinctrl-names = "default";
> >  		pinctrl-0 = <&i2s2_bus>;
> >  		status = "disabled";
> > diff --git a/arch/arm/boot/dts/exynos5422-odroidxu3.dts b/arch/arm/boot/dts/exynos5422-odroidxu3.dts
> > index edc25cf..9275ad6 100644
> > --- a/arch/arm/boot/dts/exynos5422-odroidxu3.dts
> > +++ b/arch/arm/boot/dts/exynos5422-odroidxu3.dts
> > @@ -11,6 +11,7 @@
> >  */
> >  
> >  /dts-v1/;
> > +#include <dt-bindings/sound/samsung-i2s.h>
> >  #include "exynos5800.dtsi"
> >  
> >  / {
> > @@ -285,6 +286,62 @@
> >  	rtc@101E0000 {
> >  		status = "okay";
> >  	};
> > +
> > +	sound: sound {
> > +		compatible = "simple-audio-card";
> > +		assigned-clocks = <&clock_audss EXYNOS_MOUT_AUDSS>,
> > +				<&clock_audss EXYNOS_MOUT_I2S>,
> > +				<&clock_audss EXYNOS_DOUT_AUD_BUS>;
> > +		assigned-clock-parents = <&clock CLK_FIN_PLL>,
> > +				<&clock_audss EXYNOS_MOUT_AUDSS>;
> > +		assigned-clock-rates = <0>,
> > +				<0>,
> > +				<19200000>;
> 
> The patch looks good, except it would be more appropriate to move the
> above properties to &clock_audss { }; node in this file.

Ok. I will fix and send v2 with your sign.

--
+++ b/arch/arm/boot/dts/exynos5422-odroidxu3.dts

+&clock_audss {
+       assigned-clocks = <&clock_audss EXYNOS_MOUT_AUDSS>,
+                       <&clock_audss EXYNOS_MOUT_I2S>,
+                       <&clock_audss EXYNOS_DOUT_AUD_BUS>;
+       assigned-clock-parents = <&clock CLK_FIN_PLL>,
+                       <&clock_audss EXYNOS_MOUT_AUDSS>;
+       assigned-clock-rates = <0>,
+                       <0>,
+                       <19200000>;
+};
+

> With that change feel free to add:
> Reviewed-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
> 
> As a side note, this is a dts patch and of course Kukjin maintains that.
> You would likely get it applied sooner if you would have addressed it
> directly to Kukjin, rather than Mark or me.

Ok.

Best Regrads,
Inha Song.

> 
> -- 
> Thanks,
> Sylwester

^ permalink raw reply	[flat|nested] 4+ messages in thread

* RE: [alsa-devel] [PATCH RESEND] ARM: dts: Support audio on Exynos5422-odroidxu3 using simple-audio-card
  2015-03-23 10:54 ` Sylwester Nawrocki
  2015-03-23 11:09   ` Inha Song
@ 2015-03-24 12:58   ` Kukjin Kim
  1 sibling, 0 replies; 4+ messages in thread
From: Kukjin Kim @ 2015-03-24 12:58 UTC (permalink / raw)
  To: 'Sylwester Nawrocki', 'Inha Song'
  Cc: broonie, kgene, robh+dt, pawel.moll, mark.rutland, galak,
	alsa-devel, devicetree, linux-samsung-soc, cw00.choi

Sylwester Nawrocki wrote:
> 
> On 23/03/15 03:51, Inha Song wrote:
> > Add MAX98090 audio codec, I2S interface and the sound nodes to support
> > audio on Exynos5422 SoC Based Odroid-XU3 board. Now we can support audio
> > in Odroid-XU3 board using simple-audio-card DT binding.
> >
> > Signed-off-by: Inha Song <ideal.song@samsung.com>
> > ---
> >  arch/arm/boot/dts/exynos5420.dtsi          |  9 +++++
> >  arch/arm/boot/dts/exynos5422-odroidxu3.dts | 57 ++++++++++++++++++++++++++++++
> >  2 files changed, 66 insertions(+)
> >
> > diff --git a/arch/arm/boot/dts/exynos5420.dtsi b/arch/arm/boot/dts/exynos5420.dtsi
> > index 4eaeabe..e459c1d 100644
> > --- a/arch/arm/boot/dts/exynos5420.dtsi
> > +++ b/arch/arm/boot/dts/exynos5420.dtsi
> > @@ -415,6 +415,9 @@
> >  			<&clock_audss EXYNOS_I2S_BUS>,
> >  			<&clock_audss EXYNOS_SCLK_I2S>;
> >  		clock-names = "iis", "i2s_opclk0", "i2s_opclk1";
> > +		#clock-cells = <1>;
> > +		clock-output-names = "i2s_cdclk0";
> > +		#sound-dai-cells = <1>;
> >  		samsung,idma-addr = <0x03000000>;
> >  		pinctrl-names = "default";
> >  		pinctrl-0 = <&i2s0_bus>;
> > @@ -429,6 +432,9 @@
> >  		dma-names = "tx", "rx";
> >  		clocks = <&clock CLK_I2S1>, <&clock CLK_SCLK_I2S1>;
> >  		clock-names = "iis", "i2s_opclk0";
> > +		#clock-cells = <1>;
> > +		clock-output-names = "i2s_cdclk1";
> > +		#sound-dai-cells = <1>;
> >  		pinctrl-names = "default";
> >  		pinctrl-0 = <&i2s1_bus>;
> >  		status = "disabled";
> > @@ -442,6 +448,9 @@
> >  		dma-names = "tx", "rx";
> >  		clocks = <&clock CLK_I2S2>, <&clock CLK_SCLK_I2S2>;
> >  		clock-names = "iis", "i2s_opclk0";
> > +		#clock-cells = <1>;
> > +		clock-output-names = "i2s_cdclk2";
> > +		#sound-dai-cells = <1>;
> >  		pinctrl-names = "default";
> >  		pinctrl-0 = <&i2s2_bus>;
> >  		status = "disabled";
> > diff --git a/arch/arm/boot/dts/exynos5422-odroidxu3.dts b/arch/arm/boot/dts/exynos5422-odroidxu3.dts
> > index edc25cf..9275ad6 100644
> > --- a/arch/arm/boot/dts/exynos5422-odroidxu3.dts
> > +++ b/arch/arm/boot/dts/exynos5422-odroidxu3.dts
> > @@ -11,6 +11,7 @@
> >  */
> >
> >  /dts-v1/;
> > +#include <dt-bindings/sound/samsung-i2s.h>
> >  #include "exynos5800.dtsi"
> >
> >  / {
> > @@ -285,6 +286,62 @@
> >  	rtc@101E0000 {
> >  		status = "okay";
> >  	};
> > +
> > +	sound: sound {
> > +		compatible = "simple-audio-card";
> > +		assigned-clocks = <&clock_audss EXYNOS_MOUT_AUDSS>,
> > +				<&clock_audss EXYNOS_MOUT_I2S>,
> > +				<&clock_audss EXYNOS_DOUT_AUD_BUS>;
> > +		assigned-clock-parents = <&clock CLK_FIN_PLL>,
> > +				<&clock_audss EXYNOS_MOUT_AUDSS>;
> > +		assigned-clock-rates = <0>,
> > +				<0>,
> > +				<19200000>;
> 
> The patch looks good, except it would be more appropriate to move the
> above properties to &clock_audss { }; node in this file.
> With that change feel free to add:
> Reviewed-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
> 
> As a side note, this is a dts patch and of course Kukjin maintains that.
> You would likely get it applied sooner if you would have addressed it
> directly to Kukjin, rather than Mark or me.
> 
Yes, please. I'll apply this once you address comments per Sylwester's
suggestion.

Thanks,
Kukjin

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2015-03-24 12:58 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-03-23  2:51 [alsa-devel] [PATCH RESEND] ARM: dts: Support audio on Exynos5422-odroidxu3 using simple-audio-card Inha Song
2015-03-23 10:54 ` Sylwester Nawrocki
2015-03-23 11:09   ` Inha Song
2015-03-24 12:58   ` Kukjin Kim

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).