]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
arm64: dts: renesas: r9a09g087m44-rzn2h-evk: Enable CANFD
authorLad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Wed, 24 Dec 2025 17:52:02 +0000 (17:52 +0000)
committerGeert Uytterhoeven <geert+renesas@glider.be>
Fri, 9 Jan 2026 11:12:39 +0000 (12:12 +0100)
Enable CANFD channel 1, which is available on the CN35 connector.

Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Link: https://patch.msgid.link/20251224175204.3400062-5-prabhakar.mahadev-lad.rj@bp.renesas.com
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
arch/arm64/boot/dts/renesas/r9a09g087m44-rzn2h-evk.dts

index 252f1c21ff9022d90e99ed26ff9f44acf1984bd2..5d1da4de8af6662b8a0c09874de71072a789eea6 100644 (file)
 #define SD0_EMMC       1
 #define SD0_SD         (!SD0_EMMC)
 
+/*
+ * To enable CANFD interface disable both eMMC and SD card on SDHI0 by
+ * setting SD0_EMMC and SD0_SD macros to 0 as pins P12_0 and P12_1
+ * will be used for CANFD interface.
+ */
+#define CANFD_ENABLE   (!SD0_EMMC && !SD0_SD)
+
 /*
  * P17_4 = SD1_CD; DSW5[3] = ON; DSW19[1] = OFF; DSW19[2] = ON
  * P08_6 = SD1_IOVS; DSW5[3] = ON
        };
 };
 
+#if CANFD_ENABLE
+&canfd {
+       pinctrl-0 = <&can1_pins>;
+       pinctrl-names = "default";
+       status = "okay";
+
+       channel1 {
+               status = "okay";
+       };
+};
+#endif
+
 #if I2C0
 &i2c0 {
        pinctrl-0 = <&i2c0_pins>;
 };
 
 &pinctrl {
+       /*
+        * CAN1 Pin Configuration:
+        *
+        * DSW5[1] ON; DSW5[2] OFF - Use P12_0 and P12_1 for CAN1 interface.
+        */
+       can1_pins: can1-pins {
+               pinmux = <RZT2H_PORT_PINMUX(12, 0, 0x19)>, /* CANRX1 */
+                        <RZT2H_PORT_PINMUX(12, 1, 0x19)>; /* CANTX1 */
+       };
+
        /*
         * GMAC2 Pin Configuration:
         *