arm64: dts: renesas: rzg2lc-smarc: Enable i2c{0,1,2}
authorBiju Das <biju.das.jz@bp.renesas.com>
Thu, 3 Mar 2022 16:41:54 +0000 (16:41 +0000)
committerGeert Uytterhoeven <geert+renesas@glider.be>
Mon, 4 Apr 2022 09:06:55 +0000 (11:06 +0200)
Enable i2c{0,1} on RZ/G2LC SMARC EVK by deleting respective
entries from board dts and adding pincontrol entries to the
soc-pinctrl dtsi. Also enable i2c2 by adding to soc dtsi.

Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
Reviewed-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Link: https://lore.kernel.org/r/20220303164155.7706-4-biju.das.jz@bp.renesas.com
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
arch/arm64/boot/dts/renesas/r9a07g044c2-smarc.dts
arch/arm64/boot/dts/renesas/rzg2lc-smarc-pinfunction.dtsi
arch/arm64/boot/dts/renesas/rzg2lc-smarc.dtsi

index dc39b05..52b8342 100644 (file)
        compatible = "renesas,smarc-evk", "renesas,r9a07g044c2", "renesas,r9a07g044";
 };
 
-&i2c0 {
-       /delete-property/ pinctrl-0;
-       /delete-property/ pinctrl-names;
-       status = "disabled";
-};
-
-&i2c1 {
-       /delete-property/ pinctrl-0;
-       /delete-property/ pinctrl-names;
-       status = "disabled";
-};
-
 &spi1 {
        /delete-property/ pinctrl-0;
        /delete-property/ pinctrl-names;
index 53759c3..1322e5b 100644 (file)
        };
 #endif
 
+       i2c0_pins: i2c0 {
+               pins = "RIIC0_SDA", "RIIC0_SCL";
+               input-enable;
+       };
+
+       i2c1_pins: i2c1 {
+               pins = "RIIC1_SDA", "RIIC1_SCL";
+               input-enable;
+       };
+
+       i2c2_pins: i2c2 {
+               pinmux = <RZG2L_PORT_PINMUX(42, 3, 1)>, /* SDA */
+                        <RZG2L_PORT_PINMUX(42, 4, 1)>; /* SCL */
+       };
+
        scif0_pins: scif0 {
                pinmux = <RZG2L_PORT_PINMUX(38, 0, 1)>, /* TxD */
                         <RZG2L_PORT_PINMUX(38, 1, 1)>; /* RxD */
index 55d3b73..f73b4ac 100644 (file)
 #endif
 
 &i2c2 {
-       status = "disabled";
+       pinctrl-0 = <&i2c2_pins>;
+       pinctrl-names = "default";
+       clock-frequency = <400000>;
+
+       status = "okay";
 
        wm8978: codec@1a {
                compatible = "wlf,wm8978";