Message ID | 20200426104115.22630-8-peron.clem@gmail.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | Add H6 I2S support | expand |
Hi, On Sun, 26 Apr 2020 at 12:41, Clément Péron <peron.clem@gmail.com> wrote: > > From: Jernej Skrabec <jernej.skrabec@siol.net> > > Add a simple-soundcard to link audio between HDMI and I2S. > > Signed-off-by: Jernej Skrabec <jernej.skrabec@siol.net> > Signed-off-by: Marcus Cooper <codekipper@gmail.com> > Signed-off-by: Clément Péron <peron.clem@gmail.com> > --- > arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi | 31 ++++++++++++++++++++ > 1 file changed, 31 insertions(+) > > diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi > index a5ee68388bd3..558fe63739cb 100644 > --- a/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi > +++ b/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi > @@ -88,6 +88,24 @@ > (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_HIGH)>; > }; > > + sound_hdmi: sound { I will rename this to hdmi_sound: hdmi-sound { in the next version > + compatible = "simple-audio-card"; > + simple-audio-card,format = "i2s"; > + simple-audio-card,name = "allwinner-hdmi"; > + simple-audio-card,mclk-fs = <128>; > + simple-audio-card,frame-inversion; And I will add a status="disabled" here as not all board have an hdmi connector Regards, Clement > + > + simple-audio-card,codec { > + sound-dai = <&hdmi>; > + }; > + > + simple-audio-card,cpu { > + sound-dai = <&i2s1>; > + dai-tdm-slot-num = <2>; > + dai-tdm-slot-width = <32>; > + }; > + }; > + > soc { > compatible = "simple-bus"; > #address-cells = <1>; > @@ -581,6 +599,18 @@ > }; > }; > > + i2s1: i2s@5091000 { > + #sound-dai-cells = <0>; > + compatible = "allwinner,sun50i-h6-i2s"; > + reg = <0x05091000 0x1000>; > + interrupts = <GIC_SPI 19 IRQ_TYPE_LEVEL_HIGH>; > + clocks = <&ccu CLK_BUS_I2S1>, <&ccu CLK_I2S1>; > + clock-names = "apb", "mod"; > + dmas = <&dma 4>, <&dma 4>; > + resets = <&ccu RST_BUS_I2S1>; > + dma-names = "rx", "tx"; > + }; > + > spdif: spdif@5093000 { > #sound-dai-cells = <0>; > compatible = "allwinner,sun50i-h6-spdif"; > @@ -711,6 +741,7 @@ > }; > > hdmi: hdmi@6000000 { > + #sound-dai-cells = <0>; > compatible = "allwinner,sun50i-h6-dw-hdmi"; > reg = <0x06000000 0x10000>; > reg-io-width = <1>; > -- > 2.20.1 >
On Sun, Apr 26, 2020 at 12:41:15PM +0200, Clément Péron wrote: > From: Jernej Skrabec <jernej.skrabec@siol.net> > > Add a simple-soundcard to link audio between HDMI and I2S. > > Signed-off-by: Jernej Skrabec <jernej.skrabec@siol.net> > Signed-off-by: Marcus Cooper <codekipper@gmail.com> > Signed-off-by: Clément Péron <peron.clem@gmail.com> > --- > arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi | 31 ++++++++++++++++++++ > 1 file changed, 31 insertions(+) > > diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi > index a5ee68388bd3..558fe63739cb 100644 > --- a/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi > +++ b/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi > @@ -88,6 +88,24 @@ > (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_HIGH)>; > }; > > + sound_hdmi: sound { > + compatible = "simple-audio-card"; > + simple-audio-card,format = "i2s"; > + simple-audio-card,name = "allwinner-hdmi"; It doesn't seem to be on purpose, but the name is different from the other series you sent. Maxime
Hi Maxime, On Tue, 28 Apr 2020 at 10:14, Maxime Ripard <maxime@cerno.tech> wrote: > > On Sun, Apr 26, 2020 at 12:41:15PM +0200, Clément Péron wrote: > > From: Jernej Skrabec <jernej.skrabec@siol.net> > > > > Add a simple-soundcard to link audio between HDMI and I2S. > > > > Signed-off-by: Jernej Skrabec <jernej.skrabec@siol.net> > > Signed-off-by: Marcus Cooper <codekipper@gmail.com> > > Signed-off-by: Clément Péron <peron.clem@gmail.com> > > --- > > arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi | 31 ++++++++++++++++++++ > > 1 file changed, 31 insertions(+) > > > > diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi > > index a5ee68388bd3..558fe63739cb 100644 > > --- a/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi > > +++ b/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi > > @@ -88,6 +88,24 @@ > > (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_HIGH)>; > > }; > > > > + sound_hdmi: sound { > > + compatible = "simple-audio-card"; > > + simple-audio-card,format = "i2s"; > > + simple-audio-card,name = "allwinner-hdmi"; > > It doesn't seem to be on purpose, but the name is different from the other > series you sent. Indeed, I have sent this serie before looking at the other. I will change this to keep coherency, once we agree on the correct card name. Thanks for the review, Clement > > Maxime
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi index a5ee68388bd3..558fe63739cb 100644 --- a/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi +++ b/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi @@ -88,6 +88,24 @@ (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_HIGH)>; }; + sound_hdmi: sound { + compatible = "simple-audio-card"; + simple-audio-card,format = "i2s"; + simple-audio-card,name = "allwinner-hdmi"; + simple-audio-card,mclk-fs = <128>; + simple-audio-card,frame-inversion; + + simple-audio-card,codec { + sound-dai = <&hdmi>; + }; + + simple-audio-card,cpu { + sound-dai = <&i2s1>; + dai-tdm-slot-num = <2>; + dai-tdm-slot-width = <32>; + }; + }; + soc { compatible = "simple-bus"; #address-cells = <1>; @@ -581,6 +599,18 @@ }; }; + i2s1: i2s@5091000 { + #sound-dai-cells = <0>; + compatible = "allwinner,sun50i-h6-i2s"; + reg = <0x05091000 0x1000>; + interrupts = <GIC_SPI 19 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&ccu CLK_BUS_I2S1>, <&ccu CLK_I2S1>; + clock-names = "apb", "mod"; + dmas = <&dma 4>, <&dma 4>; + resets = <&ccu RST_BUS_I2S1>; + dma-names = "rx", "tx"; + }; + spdif: spdif@5093000 { #sound-dai-cells = <0>; compatible = "allwinner,sun50i-h6-spdif"; @@ -711,6 +741,7 @@ }; hdmi: hdmi@6000000 { + #sound-dai-cells = <0>; compatible = "allwinner,sun50i-h6-dw-hdmi"; reg = <0x06000000 0x10000>; reg-io-width = <1>;