Skip to content

Commit 35f2406

Browse files
Hieu Nguyennhutnguyenkc
Hieu Nguyen
authored andcommitted
boards: renesas: rzg3s_smarc: Add CAN support
Add CAN support for board RZ/G3S-SMARC Signed-off-by: Hieu Nguyen <[email protected]> Signed-off-by: Nhut Nguyen <[email protected]>
1 parent 1cce763 commit 35f2406

File tree

4 files changed

+47
-0
lines changed

4 files changed

+47
-0
lines changed

boards/renesas/rzg3s_smarc/doc/index.rst

+2
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,8 @@ and the following hardware features:
7575
+-----------+------------+-------------------------------------+
7676
| CLOCK | on-chip | clock control |
7777
+-----------+------------+-------------------------------------+
78+
| CANFD | on-chip | can |
79+
+-----------+------------+-------------------------------------+
7880

7981
Other hardware features are currently not supported by the port.
8082

boards/renesas/rzg3s_smarc/rzg3s_smarc-pinctrl.dtsi

+14
Original file line numberDiff line numberDiff line change
@@ -55,4 +55,18 @@
5555
pinmux = <RZG_PINMUX(PORT_13, 4, 7)>; /* GTIOCA */
5656
};
5757
};
58+
59+
/omit-if-no-ref/ can0_pins: can0 {
60+
can0-pinmux {
61+
pinmux = <RZG_PINMUX(PORT_06, 1, 3)>, /* TX */
62+
<RZG_PINMUX(PORT_06, 2, 3)>; /* RX */
63+
};
64+
};
65+
66+
/omit-if-no-ref/ can1_pins: can1 {
67+
can1-pinmux {
68+
pinmux = <RZG_PINMUX(PORT_17, 0, 3)>, /* TX */
69+
<RZG_PINMUX(PORT_17, 1, 3)>; /* RX */
70+
};
71+
};
5872
};

boards/renesas/rzg3s_smarc/rzg3s_smarc_r9a08g045s33gbg_cm33.dts

+30
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
zephyr,flash = &spi_flash;
2323
zephyr,console = &scif1;
2424
zephyr,shell-uart = &scif1;
25+
zephyr,canbus = &canfd0;
2526
};
2627

2728
aliases {
@@ -74,6 +75,19 @@
7475
reg = <0x80200000 DT_SIZE_K(256)>;
7576
};
7677

78+
transceiver0: can-phy0 {
79+
compatible = "can-transceiver-gpio";
80+
standby-gpios = <&gpio13 0 GPIO_ACTIVE_HIGH>;
81+
max-bitrate = <8000000>;
82+
#phy-cells = <0>;
83+
};
84+
85+
transceiver1: can-phy1 {
86+
compatible = "can-transceiver-gpio";
87+
standby-gpios = <&gpio13 1 GPIO_ACTIVE_HIGH>;
88+
max-bitrate = <8000000>;
89+
#phy-cells = <0>;
90+
};
7791
};
7892

7993
&scif1 {
@@ -87,6 +101,22 @@
87101
status = "okay";
88102
};
89103

104+
&gpio13{
105+
status = "okay";
106+
};
107+
90108
&gpio18{
91109
status = "okay";
92110
};
111+
112+
&canfd_global {
113+
status = "okay";
114+
};
115+
116+
&canfd0 {
117+
pinctrl-0 = <&can0_pins>;
118+
pinctrl-names = "default";
119+
status = "okay";
120+
rx-max-filters = <32>;
121+
phys = <&transceiver0>;
122+
};

boards/renesas/rzg3s_smarc/rzg3s_smarc_r9a08g045s33gbg_cm33.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,4 @@ supported:
1010
- gpio
1111
- counter
1212
- pwm
13+
- can

0 commit comments

Comments
 (0)