Skip to content

Commit 5cb030e

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 40f26f8 commit 5cb030e

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
@@ -74,6 +74,8 @@ and the following hardware features:
7474
+-----------+------------+-------------------------------------+
7575
| GPIO | on-chip | gpio |
7676
+-----------+------------+-------------------------------------+
77+
| CANFD | on-chip | can |
78+
+-----------+------------+-------------------------------------+
7779
| DMA | on-chip | dma |
7880
+-----------+------------+-------------------------------------+
7981
| I2C | on-chip | i2c |

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,10 +101,26 @@
87101
status = "okay";
88102
};
89103

104+
&gpio13{
105+
status = "okay";
106+
};
107+
90108
&gpio18{
91109
status = "okay";
92110
};
93111

94112
&adc {
95113
status = "okay";
96114
};
115+
116+
&canfd_global {
117+
status = "okay";
118+
};
119+
120+
&canfd0 {
121+
pinctrl-0 = <&can0_pins>;
122+
pinctrl-names = "default";
123+
status = "okay";
124+
rx-max-filters = <32>;
125+
phys = <&transceiver0>;
126+
};

boards/renesas/rzg3s_smarc/rzg3s_smarc_r9a08g045s33gbg_cm33.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,4 @@ supported:
1313
- gpio
1414
- counter
1515
- pwm
16+
- can

0 commit comments

Comments
 (0)