Re: [PATCH v3 4/7] dt-bindings: pinctrl: add bindings for Mediatek MT8365 SoC
From: Kevin Hilman
Date: Fri Nov 18 2022 - 14:52:38 EST
Hi Krzysztof,
Krzysztof Kozlowski <krzysztof.kozlowski@xxxxxxxxxx> writes:
> On 17/11/2022 22:03, Bernhard Rosenkränzer wrote:
>> Add devicetree bindings for Mediatek MT8365 pinctrl driver.
>>
>> Signed-off-by: Bernhard Rosenkränzer <bero@xxxxxxxxxxxx>
>
> Thank you for your patch. There is something to discuss/improve.
>
>> +
>> + pins-are-numbered:
>> + $ref: /schemas/types.yaml#/definitions/flag
>> + description: |
>> + Specify the subnodes are using numbered pinmux to specify pins.
>
> Why would you name pins differently per board? And why this different
> naming of the same pins is a property of hardware?
>
> This looks like something to drop.
Yeah, having this as a flag kind of implies that this could be present
for some boards but not others. But in practice, the driver requires it
to be present or just fails[1]. What's the right way to describe that?
We're just trying to add a binding that reflects the existing driver.
We also noticed that there's another documented binding with this
same flag[2] where similiarily, the driver simply requires it to be
present[2].
So is the way this flag is documented in the stm32 binding OK for the
mediatek one also? If not, what would you suggest?
Thanks for the review,
Kevin
[1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/pinctrl/mediatek/pinctrl-mtk-common.c#n1053
[2] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/devicetree/bindings/pinctrl/st,stm32-pinctrl.yaml#n37
[3] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/pinctrl/stm32/pinctrl-stm32.c#n1499