Thread (17 messages) 17 messages, 4 authors, 2022-12-01

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

From: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Date: 2022-11-21 13:49:21
Also in: linux-devicetree, linux-gpio, linux-mediatek, lkml

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

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@protonmail.com>
Reviewed-by: Rob Herring <robh@kernel.org>
---
  .../pinctrl/mediatek,mt6779-pinctrl.yaml      | 55 ++++++++++++++++++-
  MAINTAINERS                                   |  6 ++
  2 files changed, 60 insertions(+), 1 deletion(-)
..snip..
quoted hunk ↗ jump to hunk
@@ -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



_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help