[PATCH v2 5/7] dt-bindings: pinctrl: airoha: add AN7589
Conor Dooley
conor at kernel.org
Tue Nov 17 10:03:46 PST 2026
On Mon, Nov 16, 2026 at 08:39:21PM +0100, John Crispin wrote:
> Hi Conor,
> On 16.11.26 19:15, Conor Dooley wrote:
> > On Mon, Nov 16, 2026 at 06:47:27PM +0100, John Crispin wrote:
> >> On Fri, Nov 13, 2026 at 05:40:42PM +0000, Conor Dooley wrote:
> >>> As Lee requested, please split this out. Two patches, maybe even three.
> >>
> >> Agreed. v3 splits it into three patches.
> >>
> >>> Do we even need a child node here? If all this node does is
> >>> gpio/pinctrl, why can the driver not bind directly to this node?
> >>>
> >>> What else does it do that warrants being a syscon?
> >>
> >> The block also holds the PWM controller. Its registers interleave with
> >> the GPIO ones. The PWM series adds it as a second child, as on the
> >> EN7581. That series has a depency on this one so I have not posted it yet.
Hmm, or just add #pwm-cells to the syscon node itself? There's no need
for a child node just to put #pwm-cells and a compatible in it. The pwm
driver can be probed via mfd using mfd_add_devices().
> >>
> >>> Otherwise, there should only be one. uart1 and uart2 should have
> >>> different nodes.
> >>
> >> Agreed. v3 sets maxItems to 1. Only pcm_spi and pcie keep more, as
> >> their groups carry different signals of one device.
> >>
> >>> So here, maxItems should be 1 for similar reasons.
> >>
> >> Agreed, v3 does this for i2c too.
> >>
> >>> I'm also curious about why this goes up to 74. None of the functions
> >>> have 74 pins, surely?
> >>
> >> A conf node can set the same config on any set of pins. 74 is all the
> >> pins. The EN7581 binding does the same with 58.
> >
> > A difference in philosophy I guess - I would be grouping the pins in the
> > config node by user. So that there would be something like
> >
> > spi1-stuff {
> > spi1-function {
> > function = spi
> > group = spi1
> > }
> >
> > spi1-config1 {
> > pins = 1, 2
> > config1
> > config2
> > }
> >
> > spi2-config2 {
> > pins = 3
> > config1
> > }
> > }
> >
> > spi {
> > pinctrl-0 = spi1-function, spi-config1, spi-config2
> > }
> >
> > or
> >
> > spi {
> > pinctrl-0 = spi1-stuff
> > }
> >
> > IMO, having config nodes covering more than one "feature" doesn't really
> > make sense, as you'd end up with something like:
> >
> > spi1-function {
> > function = spi
> > group = spi1
> > }
> >
> > all-config1-config2 {
> > pins = 1, 2, 4, 5
> > config1
> > config2
> > }
> >
> > all-config1 {
> > pins = 3
> > config1
> > }
> >
> > which kinda falls apart I think when a node can request a setting for
> > pins that are not part of it (in this case, that's pins 4 and 5)
> >
> > spi {
> > pinctrl-0 = spi1-function, all-config1, all-config1-config2
> > }
> >
> > So my opinion is that the max number of items should be the size of the
> > largest peripheral.
> >
> > What's the largest actual user on the 7581?
>
> The largest users are EN7523 pcm_spi 14, AN7563 pnand 17, AN7583
> pnand 17, EN7528 pnand 17, EN7581 pnand 17 and AN7589 emmc 12 (these
> numbers are based on a hackish "grep foo | bar", so they might be
> slightly off).
>
> I copied and modified what the other AN/EN bindings do. These set the
> limit to the pin count of the SoC: EN7523 38, AN7563 38, AN7583 53,
> EN7528 50, EN7581 58. Your call really, I do not mind either way. I can
> send a v4 and then a follow up series cleaning up the existing bindings
> as well.
btw, please do not top post.
I'd much rather not let this permit doing things that do not make any
sense.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 228 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-mediatek/attachments/20261117/8516bbcf/attachment.sig>
More information about the Linux-mediatek
mailing list