On Thu, Jun 27, 2024 at 04:42:24PM +0100, Conor Dooley wrote: > > >>>> +properties: > > >>>> + compatible: > > >>>> + oneOf: > > >>>> + - items: > > >>>> + - enum: > > >>>> + - atmel,at91sam9x5-gpio > > >>>> + - microchip,sam9x60-gpio > > >>>> + - const: atmel,at91rm9200-gpio > > >>>> + - items: > > >>>> + - enum: > > >>>> + - microchip,sam9x7-gpio > > >>>> + - const: microchip,sam9x60-gpio > > >>>> + - const: atmel,at91rm9200-gpio > > >>> It's worth pointing out that this is required, because the driver > > >>> implements a different set of ops for the sam9x60. There's not just more > > >>> of them, they're different too. > > >>> Are the sam9x60 and at91rm9200 are actually compatible, or is the > > >>> fallback here some mistake that originated in the dts? > > >>> > > >> The PIO3 pinctrl driver uses the compatible "atmel,at91rm9200-gpio" to > > >> find the number of active GPIO banks and also to differentiate them from > > >> the pinmux child nodes.The driver probe fails if the at91rm9200 is not > > >> present in the GPIO bank compatible property list. > > >> For sam9x7, "microchip,sam9x60-gpio" is used as the fallback compatible > > >> and "atmel,at91rm9200-gpio" is added by default to avoid probe issues > > >> and help find the number of GPIO banks by the driver. > > > That's unfortunately not what I asked. Forget about > > > at91_pinctrl_child_count() for a minute and answer the question again: > > > Are the sam9x60 and at91rm9200 actually compatible? > > > > > > Hints: > > > - Do the registers that are in the at91rm9200 have the same behaviour in > > > the sam9x60? > > The registers in at91rm9200 have the same behavior as sam9x60 expect > > that the former supports only 2 Peripheral function per pin while > > sam9x60 supports 4. > > > - Are the new registers in sam9x60 optional, so that if all sam9x60 code > > > was deleted from the driver, the driver would still work for the subset > > > of features that the at91rm9200 already supports? > > at91rm9200 function will work for sam9x60 but not up-to its full > > potential.The new registers in sam9x60 for drive-strength, slew-rate, > > debounce, pull-down will help drive the the current pinmux configs for > > sam9x60/9x7 board DT. > > Right. The compatible setup makes sense then, just an explanation for > why should go into your commit message. Gah, I forgot to say, with that: Reviewed-by: Conor Dooley <conor.dooley@xxxxxxxxxxxxx> Thanks, Conor.
Attachment:
signature.asc
Description: PGP signature