[PATCH v2 5/7] dt-bindings: pinctrl: airoha: add AN7589

Conor Dooley conor at kernel.org
Mon Nov 16 10:15:59 PST 2026


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.
> 
> > 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?
		
> 
> v3 will follow shortly.
> 
>         John
> 
> 
-------------- 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/20261116/fcf9c12f/attachment.sig>


More information about the Linux-mediatek mailing list