diff mbox

[3/3] ARM: gr8: evb: Add i2s codec

Message ID 4d99da31af41b26d9109113e19223ee8b88f76ae.1478524066.git-series.maxime.ripard@free-electrons.com (mailing list archive)
State New, archived
Headers show

Commit Message

Maxime Ripard Nov. 7, 2016, 1:08 p.m. UTC
The GR8-EVB comes with a wm8978 codec connected to the i2s bus.

Add a card in order to have it working

Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
---
 arch/arm/boot/dts/ntc-gr8-evb.dts | 14 ++++++++++++++
 1 file changed, 14 insertions(+), 0 deletions(-)

Comments

Chen-Yu Tsai Nov. 7, 2016, 2:11 p.m. UTC | #1
On Mon, Nov 7, 2016 at 9:08 PM, Maxime Ripard
<maxime.ripard@free-electrons.com> wrote:
> The GR8-EVB comes with a wm8978 codec connected to the i2s bus.
>
> Add a card in order to have it working
>
> Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
> ---
>  arch/arm/boot/dts/ntc-gr8-evb.dts | 14 ++++++++++++++
>  1 file changed, 14 insertions(+), 0 deletions(-)
>
> diff --git a/arch/arm/boot/dts/ntc-gr8-evb.dts b/arch/arm/boot/dts/ntc-gr8-evb.dts
> index 12b4317a4383..5291e425caf9 100644
> --- a/arch/arm/boot/dts/ntc-gr8-evb.dts
> +++ b/arch/arm/boot/dts/ntc-gr8-evb.dts
> @@ -76,6 +76,20 @@
>                 default-brightness-level = <8>;
>         };
>
> +       i2s {

"sound" might be a better node name? The I2S controllers are also named "i2s".

Otherwise,

Acked-by: Chen-Yu Tsai <wens@csie.org>

> +               compatible = "simple-audio-card";
> +               simple-audio-card,name = "gr8-evb-wm8978";
> +               simple-audio-card,format = "i2s";
> +               simple-audio-card,mclk-fs = <512>;
> +
> +               simple-audio-card,cpu {
> +                       sound-dai = <&i2s0>;
> +               };
> +
> +               simple-audio-card,codec {
> +                       sound-dai = <&wm8978>;
> +               };
> +       };
>
>         panel {
>                 compatible = "allwinner,sun4i-a10-sub-evb-5-lcd";
> --
> git-series 0.8.11
Maxime Ripard Nov. 8, 2016, 7:44 a.m. UTC | #2
On Mon, Nov 07, 2016 at 10:11:45PM +0800, Chen-Yu Tsai wrote:
> On Mon, Nov 7, 2016 at 9:08 PM, Maxime Ripard
> <maxime.ripard@free-electrons.com> wrote:
> > The GR8-EVB comes with a wm8978 codec connected to the i2s bus.
> >
> > Add a card in order to have it working
> >
> > Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
> > ---
> >  arch/arm/boot/dts/ntc-gr8-evb.dts | 14 ++++++++++++++
> >  1 file changed, 14 insertions(+), 0 deletions(-)
> >
> > diff --git a/arch/arm/boot/dts/ntc-gr8-evb.dts b/arch/arm/boot/dts/ntc-gr8-evb.dts
> > index 12b4317a4383..5291e425caf9 100644
> > --- a/arch/arm/boot/dts/ntc-gr8-evb.dts
> > +++ b/arch/arm/boot/dts/ntc-gr8-evb.dts
> > @@ -76,6 +76,20 @@
> >                 default-brightness-level = <8>;
> >         };
> >
> > +       i2s {
> 
> "sound" might be a better node name? The I2S controllers are also
> named "i2s".

I know, but we also had the codec and SPDIF on this board, so sound
was too generic to be meaningful I guess. I don't really care about
the name though, if you have any suggestion...

> Otherwise,
> 
> Acked-by: Chen-Yu Tsai <wens@csie.org>

Thanks!
Maxime
Chen-Yu Tsai Nov. 8, 2016, 7:57 a.m. UTC | #3
On Tue, Nov 8, 2016 at 3:44 PM, Maxime Ripard
<maxime.ripard@free-electrons.com> wrote:
> On Mon, Nov 07, 2016 at 10:11:45PM +0800, Chen-Yu Tsai wrote:
>> On Mon, Nov 7, 2016 at 9:08 PM, Maxime Ripard
>> <maxime.ripard@free-electrons.com> wrote:
>> > The GR8-EVB comes with a wm8978 codec connected to the i2s bus.
>> >
>> > Add a card in order to have it working
>> >
>> > Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
>> > ---
>> >  arch/arm/boot/dts/ntc-gr8-evb.dts | 14 ++++++++++++++
>> >  1 file changed, 14 insertions(+), 0 deletions(-)
>> >
>> > diff --git a/arch/arm/boot/dts/ntc-gr8-evb.dts b/arch/arm/boot/dts/ntc-gr8-evb.dts
>> > index 12b4317a4383..5291e425caf9 100644
>> > --- a/arch/arm/boot/dts/ntc-gr8-evb.dts
>> > +++ b/arch/arm/boot/dts/ntc-gr8-evb.dts
>> > @@ -76,6 +76,20 @@
>> >                 default-brightness-level = <8>;
>> >         };
>> >
>> > +       i2s {
>>
>> "sound" might be a better node name? The I2S controllers are also
>> named "i2s".
>
> I know, but we also had the codec and SPDIF on this board, so sound
> was too generic to be meaningful I guess. I don't really care about
> the name though, if you have any suggestion...

Well people seem to use "sound" for the sound card nodes...

What about "sound-analog" for this one, and "sound-spdif" for the
SPDIF simple card? Or "analog-sound" and "spdif-sound" if that looks
better.


ChenYu

>> Otherwise,
>>
>> Acked-by: Chen-Yu Tsai <wens@csie.org>
>
> Thanks!
> Maxime
>
> --
> Maxime Ripard, Free Electrons
> Embedded Linux and Kernel engineering
> http://free-electrons.com
Maxime Ripard Nov. 8, 2016, 8:39 p.m. UTC | #4
On Tue, Nov 08, 2016 at 03:57:48PM +0800, Chen-Yu Tsai wrote:
> On Tue, Nov 8, 2016 at 3:44 PM, Maxime Ripard
> <maxime.ripard@free-electrons.com> wrote:
> > On Mon, Nov 07, 2016 at 10:11:45PM +0800, Chen-Yu Tsai wrote:
> >> On Mon, Nov 7, 2016 at 9:08 PM, Maxime Ripard
> >> <maxime.ripard@free-electrons.com> wrote:
> >> > The GR8-EVB comes with a wm8978 codec connected to the i2s bus.
> >> >
> >> > Add a card in order to have it working
> >> >
> >> > Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
> >> > ---
> >> >  arch/arm/boot/dts/ntc-gr8-evb.dts | 14 ++++++++++++++
> >> >  1 file changed, 14 insertions(+), 0 deletions(-)
> >> >
> >> > diff --git a/arch/arm/boot/dts/ntc-gr8-evb.dts b/arch/arm/boot/dts/ntc-gr8-evb.dts
> >> > index 12b4317a4383..5291e425caf9 100644
> >> > --- a/arch/arm/boot/dts/ntc-gr8-evb.dts
> >> > +++ b/arch/arm/boot/dts/ntc-gr8-evb.dts
> >> > @@ -76,6 +76,20 @@
> >> >                 default-brightness-level = <8>;
> >> >         };
> >> >
> >> > +       i2s {
> >>
> >> "sound" might be a better node name? The I2S controllers are also
> >> named "i2s".
> >
> > I know, but we also had the codec and SPDIF on this board, so sound
> > was too generic to be meaningful I guess. I don't really care about
> > the name though, if you have any suggestion...
> 
> Well people seem to use "sound" for the sound card nodes...
> 
> What about "sound-analog" for this one, and "sound-spdif" for the
> SPDIF simple card? Or "analog-sound" and "spdif-sound" if that looks
> better.

sound-analog works for me. I'll either fix it in the v2, or while
applying.

Thanks!
Maxime
Maxime Ripard Nov. 10, 2016, 10:53 a.m. UTC | #5
1;4600;0c
On Tue, Nov 08, 2016 at 03:57:48PM +0800, Chen-Yu Tsai wrote:
> On Tue, Nov 8, 2016 at 3:44 PM, Maxime Ripard
> <maxime.ripard@free-electrons.com> wrote:
> > On Mon, Nov 07, 2016 at 10:11:45PM +0800, Chen-Yu Tsai wrote:
> >> On Mon, Nov 7, 2016 at 9:08 PM, Maxime Ripard
> >> <maxime.ripard@free-electrons.com> wrote:
> >> > The GR8-EVB comes with a wm8978 codec connected to the i2s bus.
> >> >
> >> > Add a card in order to have it working
> >> >
> >> > Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
> >> > ---
> >> >  arch/arm/boot/dts/ntc-gr8-evb.dts | 14 ++++++++++++++
> >> >  1 file changed, 14 insertions(+), 0 deletions(-)
> >> >
> >> > diff --git a/arch/arm/boot/dts/ntc-gr8-evb.dts b/arch/arm/boot/dts/ntc-gr8-evb.dts
> >> > index 12b4317a4383..5291e425caf9 100644
> >> > --- a/arch/arm/boot/dts/ntc-gr8-evb.dts
> >> > +++ b/arch/arm/boot/dts/ntc-gr8-evb.dts
> >> > @@ -76,6 +76,20 @@
> >> >                 default-brightness-level = <8>;
> >> >         };
> >> >
> >> > +       i2s {
> >>
> >> "sound" might be a better node name? The I2S controllers are also
> >> named "i2s".
> >
> > I know, but we also had the codec and SPDIF on this board, so sound
> > was too generic to be meaningful I guess. I don't really care about
> > the name though, if you have any suggestion...
> 
> Well people seem to use "sound" for the sound card nodes...
> 
> What about "sound-analog" for this one, and "sound-spdif" for the
> SPDIF simple card? Or "analog-sound" and "spdif-sound" if that looks
> better.

I fixed it and applied.

Thanks!
Maxime
diff mbox

Patch

diff --git a/arch/arm/boot/dts/ntc-gr8-evb.dts b/arch/arm/boot/dts/ntc-gr8-evb.dts
index 12b4317a4383..5291e425caf9 100644
--- a/arch/arm/boot/dts/ntc-gr8-evb.dts
+++ b/arch/arm/boot/dts/ntc-gr8-evb.dts
@@ -76,6 +76,20 @@ 
 		default-brightness-level = <8>;
 	};
 
+	i2s {
+		compatible = "simple-audio-card";
+		simple-audio-card,name = "gr8-evb-wm8978";
+		simple-audio-card,format = "i2s";
+		simple-audio-card,mclk-fs = <512>;
+
+		simple-audio-card,cpu {
+			sound-dai = <&i2s0>;
+		};
+
+		simple-audio-card,codec {
+			sound-dai = <&wm8978>;
+		};
+	};
 
 	panel {
 		compatible = "allwinner,sun4i-a10-sub-evb-5-lcd";