[PATCH v2 2/2] arm64: dts: renesas: r9a08g046l48-smarc: Enable CANFD
From: Biju Das
Date: Mon Nov 16 2026 - 10:33:29 EST
From: Biju Das <biju.das.jz@xxxxxxxxxxxxxx>
Enable CANFD channel0 and channel1 on the SMARC carrier board.
Channel0 is always enabled, while channel1 is guarded by SW_DPI_EN
since it shares pins with the DPI interface. The CAN transceiver's
standby GPIOs are conditionally wired up based on the carrier-board
switch settings (SW_GPIO8_CAN0_STB, SW_GPIO9_CAN1_STB).
Signed-off-by: Biju Das <biju.das.jz@xxxxxxxxxxxxxx>
---
v1->v2:
* Reverted the order of the SW_DPI_EN and SW_SD2_EN, to match the
signal flow order.
* Added missing check for !SW_DPI_EN in standby-gpios.
---
arch/arm64/boot/dts/renesas/r9a08g046l48-smarc.dts | 46 ++++++++++++++++++++++
1 file changed, 46 insertions(+)
diff --git a/arch/arm64/boot/dts/renesas/r9a08g046l48-smarc.dts b/arch/arm64/boot/dts/renesas/r9a08g046l48-smarc.dts
index 5f5441c47335..7804a903244b 100644
--- a/arch/arm64/boot/dts/renesas/r9a08g046l48-smarc.dts
+++ b/arch/arm64/boot/dts/renesas/r9a08g046l48-smarc.dts
@@ -13,6 +13,8 @@
#define SW_SD2_EN 0
#define SW_DPI_EN 0
#define SW_GPIO4 1
+#define SW_GPIO8_CAN0_STB 0
+#define SW_GPIO9_CAN1_STB 0
#define SW_I3C_EN 0
#define SW_SER0_PMOD 1
#define SW_SDIO_M2E 0
@@ -87,6 +89,38 @@ vqmmc_sd1_pvdd: regulator-vqmmc-sd1-pvdd {
#endif
};
+&canfd {
+ pinctrl-0 = <&canfd_pins>;
+ pinctrl-names = "default";
+
+ channel0 {
+ phys = <&can_transceiver 0>;
+ status = "okay";
+ };
+
+#if (!SW_DPI_EN)
+ channel1 {
+ phys = <&can_transceiver 1>;
+ status = "okay";
+ };
+#endif
+};
+
+&can_transceiver {
+ standby-gpios =
+#if (!SW_SD2_EN) && (!SW_DPI_EN) && (SW_GPIO8_CAN0_STB)
+ <&pinctrl RZG3L_GPIO(K, 0) GPIO_ACTIVE_HIGH>,
+#else
+ <0>,
+#endif
+#if (!SW_SD2_EN) && (!SW_DPI_EN) && (SW_GPIO9_CAN1_STB)
+ <&pinctrl RZG3L_GPIO(K, 1) GPIO_ACTIVE_HIGH>;
+#else
+ <0>;
+#endif
+ status = "okay";
+};
+
&i2c2 {
pinctrl-0 = <&i2c2_pins>;
pinctrl-names = "default";
@@ -153,6 +187,18 @@ audio_clk_pins: audio-clock {
<RZG3L_PORT_PINMUX(H, 5, 6)>; /* AUDIO_CLK_C */
};
+ canfd_pins: canfd {
+ can0_pins: can0 {
+ pinmux = <RZG3L_PORT_PINMUX(3, 2, 3)>, /* CAN_RX0 */
+ <RZG3L_PORT_PINMUX(3, 3, 3)>; /* CAN_TX0 */
+ };
+
+ can1_pins: can1 {
+ pinmux = <RZG3L_PORT_PINMUX(5, 2, 3)>, /* CAN_RX1 */
+ <RZG3L_PORT_PINMUX(5, 3, 3)>; /* CAN_TX1 */
+ };
+ };
+
i2c2_pins: i2c2 {
pinmux = <RZG3L_PORT_PINMUX(A, 4, 4)>, /* RIIC2_SCL */
<RZG3L_PORT_PINMUX(A, 5, 4)>; /* RIIC2_SDA */
--
2.43.0