devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Clément Péron" <peron.clem@gmail.com>
To: Maxime Ripard <maxime@cerno.tech>
Cc: Chen-Yu Tsai <wens@csie.org>, Rob Herring <robh+dt@kernel.org>,
	Mark Brown <broonie@kernel.org>,
	Liam Girdwood <lgirdwood@gmail.com>,
	Jaroslav Kysela <perex@perex.cz>, Takashi Iwai <tiwai@suse.com>,
	Marcus Cooper <codekipper@gmail.com>,
	Jernej Skrabec <jernej.skrabec@siol.net>,
	Linux-ALSA <alsa-devel@alsa-project.org>,
	devicetree <devicetree@vger.kernel.org>,
	linux-arm-kernel <linux-arm-kernel@lists.infradead.org>,
	linux-kernel <linux-kernel@vger.kernel.org>,
	linux-sunxi <linux-sunxi@googlegroups.com>
Subject: Re: [linux-sunxi] [PATCH v5 09/20] arm64: dts: allwinner: h6: Add DAI node and soundcard for HDMI
Date: Sat, 3 Oct 2020 11:32:14 +0200	[thread overview]
Message-ID: <CAJiuCccfJP4VTrpVN0ez900zWZSUbP703Hx2qa-NKdGrXwiFyQ@mail.gmail.com> (raw)
In-Reply-To: <20201002162434.3jeksuelrig6yyo5@gilmour.lan>

Hi,

On Fri, 2 Oct 2020 at 18:24, Maxime Ripard <maxime@cerno.tech> wrote:
>
> On Fri, Oct 02, 2020 at 06:01:21PM +0200, Clément Péron wrote:
> > Hi Chen-Yu,
> >
> > On Mon, 28 Sep 2020 at 07:42, Chen-Yu Tsai <wens@csie.org> wrote:
> > >
> > > On Mon, Sep 28, 2020 at 1:32 PM Chen-Yu Tsai <wens@csie.org> wrote:
> > > >
> > > > On Mon, Sep 28, 2020 at 3:29 AM Clément Péron <peron.clem@gmail.com> wrote:
> > > > >
> > > > > From: Jernej Skrabec <jernej.skrabec@siol.net>
> > > > >
> > > > > Add the I2S node used by the HDMI and a simple-soundcard to
> > > > > link audio between HDMI and I2S.
> > > > >
> > > > > Note that the HDMI codec requires an inverted frame clock and
> > > > > a fixed I2S width. As there is no such option for I2S we use
> > > > > TDM property of the simple-soundcard to do that.
> > > > >
> > > > > 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 | 33 ++++++++++++++++++++
> > > > >  1 file changed, 33 insertions(+)
> > > > >
> > > > > diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi
> > > > > index 28c77d6872f6..a8853ee7885a 100644
> > > > > --- a/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi
> > > > > +++ b/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi
> > > > > @@ -67,6 +67,25 @@ de: display-engine {
> > > > >                 status = "disabled";
> > > > >         };
> > > > >
> > > > > +       hdmi_sound: hdmi-sound {
> > > > > +               compatible = "simple-audio-card";
> > > > > +               simple-audio-card,format = "i2s";
> > > > > +               simple-audio-card,name = "sun50i-h6-hdmi";
> > > > > +               simple-audio-card,mclk-fs = <128>;
> > > > > +               simple-audio-card,frame-inversion;
> > > > > +               status = "disabled";
> > > > > +
> > > > > +               simple-audio-card,codec {
> > > > > +                       sound-dai = <&hdmi>;
> > > > > +               };
> > > > > +
> > > > > +               simple-audio-card,cpu {
> > > > > +                       sound-dai = <&i2s1>;
> > > > > +                       dai-tdm-slot-num = <2>;
> > > >
> > > > Doesn't this end up limiting the number of audio channels HDMI can carry?
> > > > AFAICT the TDM properties are all optional, so just leave it out.
> > > >
> > > > Same goes for the other two patches.
> > > >
> > > > > +                       dai-tdm-slot-width = <32>;
> > > > > +               };
> > > > > +       };
> > > > > +
> > > > >         osc24M: osc24M_clk {
> > > > >                 #clock-cells = <0>;
> > > > >                 compatible = "fixed-clock";
> > > > > @@ -609,6 +628,19 @@ mdio: mdio {
> > > > >                         };
> > > > >                 };
> > > > >
> > > > > +               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";
> > >
> > > Sorry, missed this one.
> > >
> > > Given that usage for this interface is transmt only, and there is no
> > > RX DRQ number assigned to it, you should drop the RX DMA number and name.
> >
> > Indeed if there is no DRQ number assigned we shouldn't have it in the
> > device-tree

After reviewing the H6 User Manual it seems to be assigned :
page 269 3.10.3.3 DRQ TYPE
port 4 => I2S/PCM1-RX /  I2S/PCM1-TX
Same for A64
But indeed it's not mapped for H5.

I will fix the yaml for H3/H5 but not for A64/H6.

Regards,
Clement


> >
> > but Samuel told me that the `make dtbs_check` reports:
> >
> > i2s@1c22800: dma-names:0: 'rx' was expected
> > i2s@1c22800: dma-names: ['tx'] is too short
> > i2s@1c22800: dmas: [[28, 27]] is too short
> >
> > Should I fix the YAML so?
>
> Yep :)
>
> Maxime

  reply	other threads:[~2020-10-03  9:32 UTC|newest]

Thread overview: 40+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-27 19:28 [PATCH v5 00/20] Add Allwinner H3/H5/H6/A64 HDMI audio Clément Péron
2020-09-27 19:28 ` [PATCH v5 01/20] ASoC: sun4i-i2s: Add support for H6 I2S Clément Péron
2020-09-28  4:40   ` [linux-sunxi] " Chen-Yu Tsai
2020-09-28 14:37     ` Clément Péron
2020-09-28 14:46       ` Chen-Yu Tsai
2020-09-27 19:28 ` [PATCH v5 02/20] ASoC: sun4i-i2s: Change set_chan_cfg() params Clément Péron
2020-09-28  5:00   ` [linux-sunxi] " Chen-Yu Tsai
2020-09-28 14:48     ` Clément Péron
2020-09-27 19:28 ` [PATCH v5 03/20] ASoC: sun4i-i2s: Change get_sr() and get_wss() to be more explicit Clément Péron
2020-09-28  4:37   ` [linux-sunxi] " Chen-Yu Tsai
2020-09-28  5:02     ` Chen-Yu Tsai
2020-09-27 19:28 ` [PATCH v5 04/20] dt-bindings: ASoC: sun4i-i2s: Add H6 compatible Clément Péron
2020-09-28  5:03   ` [linux-sunxi] " Chen-Yu Tsai
2020-09-27 19:28 ` [PATCH v5 05/20] ASoC: sun4i-i2s: Set sign extend sample Clément Péron
2020-09-28  6:52   ` [linux-sunxi] " Chen-Yu Tsai
2020-09-27 19:28 ` [PATCH v5 06/20] ASoc: sun4i-i2s: Add 20 and 24 bit support Clément Péron
2020-09-28  6:51   ` [linux-sunxi] " Chen-Yu Tsai
2020-09-27 19:28 ` [PATCH v5 07/20] ASoC: sun4i-i2s: Fix sun8i volatile regs Clément Péron
2020-09-28  6:49   ` [linux-sunxi] " Chen-Yu Tsai
2020-09-27 19:29 ` [PATCH v5 08/20] ASoC: sun4i-i2s: Fix setting of FIFO modes Clément Péron
2020-09-28  6:51   ` [linux-sunxi] " Chen-Yu Tsai
2020-09-27 19:29 ` [PATCH v5 09/20] arm64: dts: allwinner: h6: Add DAI node and soundcard for HDMI Clément Péron
2020-09-28  5:32   ` [linux-sunxi] " Chen-Yu Tsai
2020-09-28  5:42     ` Chen-Yu Tsai
2020-10-02 16:01       ` Clément Péron
2020-10-02 16:24         ` Maxime Ripard
2020-10-03  9:32           ` Clément Péron [this message]
2020-09-27 19:29 ` [PATCH v5 10/20] arm64: dts: allwinner: h6: Enable HDMI sound for Beelink GS1 Clément Péron
2020-09-28  5:32   ` [linux-sunxi] " Chen-Yu Tsai
2020-09-27 19:29 ` [PATCH v5 11/20] arm: dts: sunxi: h3/h5: Add DAI node and soundcard for HDMI Clément Péron
2020-09-27 19:29 ` [PATCH v5 12/20] arm64: dts: allwinner: a64: " Clément Péron
2020-09-27 19:29 ` [PATCH v5 13/20] arm: sun8i: h3: Add HDMI audio to Orange Pi 2 Clément Péron
2020-09-27 19:29 ` [PATCH v5 14/20] arm: sun8i: h3: Add HDMI audio to Beelink X2 Clément Péron
2020-09-27 19:29 ` [PATCH v5 15/20] arm64: dts: allwinner: a64: Add HDMI audio to Pine64 Clément Péron
2020-09-27 19:29 ` [PATCH v5 16/20] arm64: dts: allwinner: Enable HDMI audio on Orange Pi PC 2 Clément Péron
2020-09-27 19:29 ` [PATCH v5 17/20] ARM: dts: sun8i-h3: Enable HDMI audio on Orange Pi PC/One Clément Péron
2020-09-27 19:29 ` [PATCH v5 18/20] arm64: dts: sun50i-h6-orangepi-3: Enable HDMI audio Clément Péron
2020-09-27 19:29 ` [PATCH v5 19/20] arm64: defconfig: Enable Allwinner i2s driver Clément Péron
2020-09-27 19:29 ` [PATCH v5 20/20] ASoC: sun4i-i2s: fix coding-style for callback definition Clément Péron
2020-09-28  6:52 ` [linux-sunxi] [PATCH v5 00/20] Add Allwinner H3/H5/H6/A64 HDMI audio Chen-Yu Tsai

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAJiuCccfJP4VTrpVN0ez900zWZSUbP703Hx2qa-NKdGrXwiFyQ@mail.gmail.com \
    --to=peron.clem@gmail.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=codekipper@gmail.com \
    --cc=devicetree@vger.kernel.org \
    --cc=jernej.skrabec@siol.net \
    --cc=lgirdwood@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-sunxi@googlegroups.com \
    --cc=maxime@cerno.tech \
    --cc=perex@perex.cz \
    --cc=robh+dt@kernel.org \
    --cc=tiwai@suse.com \
    --cc=wens@csie.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).