arm64: dts: renesas: rzg2ul-smarc: Enable CANFD
authorBiju Das <biju.das.jz@bp.renesas.com>
Mon, 25 Apr 2022 17:05:28 +0000 (18:05 +0100)
committerGeert Uytterhoeven <geert+renesas@glider.be>
Fri, 29 Apr 2022 07:42:17 +0000 (09:42 +0200)
Enable CANFD on RZ/G2UL SMARC platform.

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/20220425170530.200921-12-biju.das.jz@bp.renesas.com
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
arch/arm64/boot/dts/renesas/r9a07g043u11-smarc.dts
arch/arm64/boot/dts/renesas/rzg2ul-smarc-pinfunction.dtsi
arch/arm64/boot/dts/renesas/rzg2ul-smarc.dtsi

index 2bf4a3b..df27b63 100644 (file)
        compatible = "renesas,smarc-evk", "renesas,r9a07g043u11", "renesas,r9a07g043";
 };
 
-&canfd {
-       /delete-property/ pinctrl-0;
-       /delete-property/ pinctrl-names;
-       status = "disabled";
-};
-
 &ehci0 {
        /delete-property/ pinctrl-0;
        /delete-property/ pinctrl-names;
index 9410609..1752718 100644 (file)
        pinctrl-0 = <&sound_clk_pins>;
        pinctrl-names = "default";
 
+       can0_pins: can0 {
+               pinmux = <RZG2L_PORT_PINMUX(1, 1, 3)>, /* TX */
+                        <RZG2L_PORT_PINMUX(1, 2, 3)>; /* RX */
+       };
+
+#if (SW_ET0_EN_N)
+       can0-stb-hog {
+               gpio-hog;
+               gpios = <RZG2L_GPIO(2, 2) GPIO_ACTIVE_HIGH>;
+               output-low;
+               line-name = "can0_stb";
+       };
+#endif
+
+       can1_pins: can1 {
+               pinmux = <RZG2L_PORT_PINMUX(2, 0, 3)>, /* TX */
+                        <RZG2L_PORT_PINMUX(2, 1, 3)>; /* RX */
+       };
+
+#if (SW_ET0_EN_N)
+       can1-stb-hog {
+               gpio-hog;
+               gpios = <RZG2L_GPIO(2, 3) GPIO_ACTIVE_HIGH>;
+               output-low;
+               line-name = "can1_stb";
+       };
+#endif
+
        i2c0_pins: i2c0 {
                pins = "RIIC0_SDA", "RIIC0_SCL";
                input-enable;
index a580b04..d75ad79 100644 (file)
 #include "rzg2ul-smarc-pinfunction.dtsi"
 #include "rz-smarc-common.dtsi"
 
+#if (!SW_ET0_EN_N)
+&canfd {
+       /delete-property/ pinctrl-0;
+       /delete-property/ pinctrl-names;
+       status = "disabled";
+};
+#endif
+
 &i2c1 {
        wm8978: codec@1a {
                compatible = "wlf,wm8978";