Re: [PATCH v5 6/7] dt-bindings: pinctrl: mediatek,mt6779-pinctrl: Document MT6735 pin controller

From: AngeloGioacchino Del Regno
Date: Mon Nov 21 2022 - 08:49:21 EST


Il 18/11/22 12:30, Yassine Oudjana ha scritto:
From: Yassine Oudjana <y.oudjana@xxxxxxxxxxxxxx>

Add bindings for the pin controller found on MediaTek MT6735 and
MT6735M SoCs, including describing a method to manually specify
a pin and function in the pinmux property making defining bindings
for each pin/function combination unnecessary. The pin controllers
on those SoCs are generally identical, with the only difference
being the lack of MSDC2 pins (198-203) on MT6735M.

Signed-off-by: Yassine Oudjana <y.oudjana@xxxxxxxxxxxxxx>
Reviewed-by: Rob Herring <robh@xxxxxxxxxx>
---
.../pinctrl/mediatek,mt6779-pinctrl.yaml | 55 ++++++++++++++++++-
MAINTAINERS | 6 ++
2 files changed, 60 insertions(+), 1 deletion(-)


..snip..

@@ -352,18 +391,32 @@ examples:
};
/* GPIO0 set as multifunction GPIO0 */
- gpio-pins {
+ gpio0-pins {
pins {
pinmux = <PINMUX_GPIO0__FUNC_GPIO0>;
};
};
+ /* GPIO1 set to function 0 (GPIO) */
+ gpio1-pins {
+ pins {
+ pinmux = <(MTK_PIN_NO(1) | 0)>;

Please follow the same format that you can find in all of the
mtXXXX-pinfunc.h.

What you wrote here (MTK_PIN_NO(x) | func) is defined in there for the purpose
of providing a definition name that actually means something (for both readability
and documentation purposes).

This means that your GPIO1 set to function 0 (gpio) should be

pinmux = <PINMUX_GPIO1__FUNC_GPIO1>;

+ };
+ };
+
/* GPIO52 set as multifunction SDA0 */
i2c0-pins {
pins {
pinmux = <PINMUX_GPIO52__FUNC_SDA0>;
};
};
+
+ /* GPIO62 set to function 1 (primary function) */
+ i2c1-pins {
+ pins {
+ pinmux = <(MTK_PIN_NO(62) | 1)>;

pinmux = <PINMUX_GPIO62__FUNC_SDA1>; (is it sda1??)

This means that you should as well add a mediatek,mt6735-pinfunc.h binding...

Regards,
Angelo