On 23.11.2021 08:56, Rafał Miłecki wrote:
On 23.11.2021 08:38, Tony Lindgren wrote:
The main problem using an index is that you need to keep it in sync
between the dts and device driver. And if a new SoC variant adds an entry
between the registers, you end up having to renumber the index.
I don't understand that part. That index ("reg" value in above example)
is actual PIN number. It's expected to match hw datasheets. Order
doesn't matter there.
If new hw revision adds PIN 2, I could just add pin@2 { ... };
Actually if you check
[PATCH 5/5] ARM: dts: BCM5301X: add pinctrl pins, groups & functions
you can see that first Northstar SoCs (BCM4708, BCM47081) didn't have
PINs 6, 7, 16, 17, 22 and 23 exposed. I define them only for
later-released Northstar SoC BCM4709 (bcm4709.dtsi).
That works just fine on my hw here.