All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Ondřej Jirman" <megous@megous.com>
To: "Clément Péron" <peron.clem@gmail.com>
Cc: Maxime Ripard <maxime.ripard@bootlin.com>,
	devicetree <devicetree@vger.kernel.org>,
	Jernej Skrabec <jernej.skrabec@siol.net>,
	linux-sunxi <linux-sunxi@googlegroups.com>,
	linux-kernel <linux-kernel@vger.kernel.org>,
	Chen-Yu Tsai <wens@csie.org>, Rob Herring <robh+dt@kernel.org>,
	Jagan Teki <jagan@amarulasolutions.com>,
	linux-arm-kernel <linux-arm-kernel@lists.infradead.org>,
	Icenowy Zheng <icenowy@aosc.io>
Subject: Re: [PATCH 1/4] dt-bindings: sound: sun4i-spdif: Add Allwinner H6 compatible
Date: Mon, 15 Apr 2019 17:06:21 +0200	[thread overview]
Message-ID: <20190415150621.rbuhtoqkdnwgze6s@core.my.home> (raw)
In-Reply-To: <CAJiuCcedNF0xYSa_+Zfwj-vqYsbjfEpRqisOhEvuitYALMsyjw@mail.gmail.com>

Hi Clement,

On Mon, Apr 15, 2019 at 10:30:38AM +0200, Clément Péron wrote:
> On Mon, 15 Apr 2019 at 10:18, Maxime Ripard <maxime.ripard@bootlin.com> wrote:
> >
> > On Mon, Apr 15, 2019 at 10:09:11AM +0200, Clément Péron wrote:
> > > Hi,
> > >
> > > On Mon, 15 Apr 2019 at 10:04, Maxime Ripard <maxime.ripard@bootlin.com> wrote:
> > > >
> > > > Hi,
> > > >
> > > > On Thu, Apr 11, 2019 at 11:44:19PM +0200, Clément Péron wrote:
> > > > > Allwinner H6 has a SPDIF controller with an increase of the fifo
> > > > > size and the possibility to output the master clock.
> > > > > However it's still compatible with the already existing driver for
> > > > > Allwiner H3.
> > > > >
> > > > > Add this compatible in the device-tree bindings documentation.
> > > >
> > > > How was this tested?
> > >
> > > Using Alsa utils on a Beelink GS1 and I check correct output sound on
> > > my home cinema.
> > >
> > > > After looking at the datasheet, it looks like it's still significantly
> > > > different. In particular:
> > > >
> > > >   - The MCLK divider isn't at the same offset
> > >
> > > We don't use the MCLK
> > >
> > > >   - The bits to flush the FIFO aren't at the same offset
> > > >   - The FIFO trigger levels aren't at the same offset
> > > >   - The FIFO status register layout is almost entirely different
> > >
> > > We use DMA not FIFO
> >
> > Well, DMA still uses the FIFOs. And even then, you're kind of missing
> > the point. The device tree's compatible is about whether a particular
> > device can be used as another one. How you are using it in the driver
> > is completely irrelevant.
> 
> Sorry I meant " We use DMA not PIO".
> 
> I didn't change the driver and the SPDIF is working what's irrelevant
> in declaring the driver as compatible ?
>
> If some feature are missing they can be introduce later as there is a
> special binding for H6 no ?

You have to drop fallback to allwinner,sun8i-h3-spdif at the very least:

+                       #sound-dai-cells = <0>;
+                       compatible = "allwinner,sun50i-h6-spdif",
+                                    "allwinner,sun8i-h3-spdif";
+                       reg = <0x05093000 0x400>;

If the H6 hardware doesn't just implement some optional superset of what H3
does.

regards,
	o.

> Clement
> 
> >
> > Maxime
> >
> > --
> > Maxime Ripard, Bootlin
> > Embedded Linux and Kernel engineering
> > https://bootlin.com
> 
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

WARNING: multiple messages have this Message-ID (diff)
From: "'Ondřej Jirman' via linux-sunxi" <linux-sunxi-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
To: "Clément Péron" <peron.clem-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Cc: Maxime Ripard
	<maxime.ripard-LDxbnhwyfcJBDgjK7y7TUQ@public.gmane.org>,
	devicetree <devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	Jernej Skrabec <jernej.skrabec-gGgVlfcn5nU@public.gmane.org>,
	linux-sunxi <linux-sunxi-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>,
	linux-kernel
	<linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	Chen-Yu Tsai <wens-jdAy2FN1RRM@public.gmane.org>,
	Rob Herring <robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
	Jagan Teki
	<jagan-dyjBcgdgk7Pe9wHmmfpqLFaTQe2KTcn/@public.gmane.org>,
	linux-arm-kernel
	<linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org>,
	Icenowy Zheng <icenowy-h8G6r0blFSE@public.gmane.org>
Subject: Re: [PATCH 1/4] dt-bindings: sound: sun4i-spdif: Add Allwinner H6 compatible
Date: Mon, 15 Apr 2019 17:06:21 +0200	[thread overview]
Message-ID: <20190415150621.rbuhtoqkdnwgze6s@core.my.home> (raw)
In-Reply-To: <CAJiuCcedNF0xYSa_+Zfwj-vqYsbjfEpRqisOhEvuitYALMsyjw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>

Hi Clement,

On Mon, Apr 15, 2019 at 10:30:38AM +0200, Clément Péron wrote:
> On Mon, 15 Apr 2019 at 10:18, Maxime Ripard <maxime.ripard-LDxbnhwyfcJBDgjK7y7TUQ@public.gmane.org> wrote:
> >
> > On Mon, Apr 15, 2019 at 10:09:11AM +0200, Clément Péron wrote:
> > > Hi,
> > >
> > > On Mon, 15 Apr 2019 at 10:04, Maxime Ripard <maxime.ripard-LDxbnhwyfcKIwRZHo2/mJg@public.gmane.orgm> wrote:
> > > >
> > > > Hi,
> > > >
> > > > On Thu, Apr 11, 2019 at 11:44:19PM +0200, Clément Péron wrote:
> > > > > Allwinner H6 has a SPDIF controller with an increase of the fifo
> > > > > size and the possibility to output the master clock.
> > > > > However it's still compatible with the already existing driver for
> > > > > Allwiner H3.
> > > > >
> > > > > Add this compatible in the device-tree bindings documentation.
> > > >
> > > > How was this tested?
> > >
> > > Using Alsa utils on a Beelink GS1 and I check correct output sound on
> > > my home cinema.
> > >
> > > > After looking at the datasheet, it looks like it's still significantly
> > > > different. In particular:
> > > >
> > > >   - The MCLK divider isn't at the same offset
> > >
> > > We don't use the MCLK
> > >
> > > >   - The bits to flush the FIFO aren't at the same offset
> > > >   - The FIFO trigger levels aren't at the same offset
> > > >   - The FIFO status register layout is almost entirely different
> > >
> > > We use DMA not FIFO
> >
> > Well, DMA still uses the FIFOs. And even then, you're kind of missing
> > the point. The device tree's compatible is about whether a particular
> > device can be used as another one. How you are using it in the driver
> > is completely irrelevant.
> 
> Sorry I meant " We use DMA not PIO".
> 
> I didn't change the driver and the SPDIF is working what's irrelevant
> in declaring the driver as compatible ?
>
> If some feature are missing they can be introduce later as there is a
> special binding for H6 no ?

You have to drop fallback to allwinner,sun8i-h3-spdif at the very least:

+                       #sound-dai-cells = <0>;
+                       compatible = "allwinner,sun50i-h6-spdif",
+                                    "allwinner,sun8i-h3-spdif";
+                       reg = <0x05093000 0x400>;

If the H6 hardware doesn't just implement some optional superset of what H3
does.

regards,
	o.

> Clement
> 
> >
> > Maxime
> >
> > --
> > Maxime Ripard, Bootlin
> > Embedded Linux and Kernel engineering
> > https://bootlin.com
> 
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

-- 
You received this message because you are subscribed to the Google Groups "linux-sunxi" group.
To unsubscribe from this group and stop receiving emails from it, send an email to linux-sunxi+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
For more options, visit https://groups.google.com/d/optout.

WARNING: multiple messages have this Message-ID (diff)
From: "Ondřej Jirman" <megous@megous.com>
To: "Clément Péron" <peron.clem@gmail.com>
Cc: devicetree <devicetree@vger.kernel.org>,
	Jernej Skrabec <jernej.skrabec@siol.net>,
	Maxime Ripard <maxime.ripard@bootlin.com>,
	linux-sunxi <linux-sunxi@googlegroups.com>,
	linux-kernel <linux-kernel@vger.kernel.org>,
	Chen-Yu Tsai <wens@csie.org>, Rob Herring <robh+dt@kernel.org>,
	Jagan Teki <jagan@amarulasolutions.com>,
	linux-arm-kernel <linux-arm-kernel@lists.infradead.org>,
	Icenowy Zheng <icenowy@aosc.io>
Subject: Re: [PATCH 1/4] dt-bindings: sound: sun4i-spdif: Add Allwinner H6 compatible
Date: Mon, 15 Apr 2019 17:06:21 +0200	[thread overview]
Message-ID: <20190415150621.rbuhtoqkdnwgze6s@core.my.home> (raw)
In-Reply-To: <CAJiuCcedNF0xYSa_+Zfwj-vqYsbjfEpRqisOhEvuitYALMsyjw@mail.gmail.com>

Hi Clement,

On Mon, Apr 15, 2019 at 10:30:38AM +0200, Clément Péron wrote:
> On Mon, 15 Apr 2019 at 10:18, Maxime Ripard <maxime.ripard@bootlin.com> wrote:
> >
> > On Mon, Apr 15, 2019 at 10:09:11AM +0200, Clément Péron wrote:
> > > Hi,
> > >
> > > On Mon, 15 Apr 2019 at 10:04, Maxime Ripard <maxime.ripard@bootlin.com> wrote:
> > > >
> > > > Hi,
> > > >
> > > > On Thu, Apr 11, 2019 at 11:44:19PM +0200, Clément Péron wrote:
> > > > > Allwinner H6 has a SPDIF controller with an increase of the fifo
> > > > > size and the possibility to output the master clock.
> > > > > However it's still compatible with the already existing driver for
> > > > > Allwiner H3.
> > > > >
> > > > > Add this compatible in the device-tree bindings documentation.
> > > >
> > > > How was this tested?
> > >
> > > Using Alsa utils on a Beelink GS1 and I check correct output sound on
> > > my home cinema.
> > >
> > > > After looking at the datasheet, it looks like it's still significantly
> > > > different. In particular:
> > > >
> > > >   - The MCLK divider isn't at the same offset
> > >
> > > We don't use the MCLK
> > >
> > > >   - The bits to flush the FIFO aren't at the same offset
> > > >   - The FIFO trigger levels aren't at the same offset
> > > >   - The FIFO status register layout is almost entirely different
> > >
> > > We use DMA not FIFO
> >
> > Well, DMA still uses the FIFOs. And even then, you're kind of missing
> > the point. The device tree's compatible is about whether a particular
> > device can be used as another one. How you are using it in the driver
> > is completely irrelevant.
> 
> Sorry I meant " We use DMA not PIO".
> 
> I didn't change the driver and the SPDIF is working what's irrelevant
> in declaring the driver as compatible ?
>
> If some feature are missing they can be introduce later as there is a
> special binding for H6 no ?

You have to drop fallback to allwinner,sun8i-h3-spdif at the very least:

+                       #sound-dai-cells = <0>;
+                       compatible = "allwinner,sun50i-h6-spdif",
+                                    "allwinner,sun8i-h3-spdif";
+                       reg = <0x05093000 0x400>;

If the H6 hardware doesn't just implement some optional superset of what H3
does.

regards,
	o.

> Clement
> 
> >
> > Maxime
> >
> > --
> > Maxime Ripard, Bootlin
> > Embedded Linux and Kernel engineering
> > https://bootlin.com
> 
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  parent reply	other threads:[~2019-04-15 15:06 UTC|newest]

Thread overview: 40+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-11 21:44 [PATCH 0/4] Allwinner H6 SPDIF support Clément Péron
2019-04-11 21:44 ` Clément Péron
2019-04-11 21:44 ` [PATCH 1/4] dt-bindings: sound: sun4i-spdif: Add Allwinner H6 compatible Clément Péron
2019-04-11 21:44   ` Clément Péron
2019-04-11 21:44   ` Clément Péron
2019-04-15  8:04   ` Maxime Ripard
2019-04-15  8:04     ` Maxime Ripard
2019-04-15  8:04     ` Maxime Ripard
2019-04-15  8:09     ` Clément Péron
2019-04-15  8:09       ` Clément Péron
2019-04-15  8:09       ` Clément Péron
2019-04-15  8:11       ` Clément Péron
2019-04-15  8:11         ` Clément Péron
2019-04-15  8:18       ` Maxime Ripard
2019-04-15  8:18         ` Maxime Ripard
2019-04-15  8:18         ` Maxime Ripard
2019-04-15  8:30         ` Clément Péron
2019-04-15  8:30           ` Clément Péron
2019-04-15  8:30           ` Clément Péron
2019-04-15 14:51           ` Maxime Ripard
2019-04-15 14:51             ` Maxime Ripard
2019-04-15 14:51             ` Maxime Ripard
2019-04-15 16:30             ` Clément Péron
2019-04-15 16:30               ` Clément Péron
2019-04-16  7:34               ` Maxime Ripard
2019-04-16  7:34                 ` Maxime Ripard
2019-04-16  8:30                 ` Clément Péron
2019-04-16  8:30                   ` Clément Péron
2019-04-15 15:06           ` Ondřej Jirman [this message]
2019-04-15 15:06             ` Ondřej Jirman
2019-04-15 15:06             ` 'Ondřej Jirman' via linux-sunxi
2019-04-11 21:44 ` [PATCH 2/4] arm64: dts: allwinner: Add SPDIF node for Allwinner H6 Clément Péron
2019-04-11 21:44   ` Clément Péron
2019-04-11 21:44   ` Clément Péron
2019-04-11 21:44 ` [PATCH 3/4] arm64: dts: allwinner: h6: Enable SPDIF for Beelink GS1 Clément Péron
2019-04-11 21:44   ` Clément Péron
2019-04-11 21:44   ` Clément Péron
2019-04-11 21:44 ` [PATCH 4/4] arm64: defconfig: Enable Sun4i SPDIF module Clément Péron
2019-04-11 21:44   ` Clément Péron
2019-04-11 21:44   ` Clément Péron

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=20190415150621.rbuhtoqkdnwgze6s@core.my.home \
    --to=megous@megous.com \
    --cc=devicetree@vger.kernel.org \
    --cc=icenowy@aosc.io \
    --cc=jagan@amarulasolutions.com \
    --cc=jernej.skrabec@siol.net \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-sunxi@googlegroups.com \
    --cc=maxime.ripard@bootlin.com \
    --cc=peron.clem@gmail.com \
    --cc=robh+dt@kernel.org \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.