Skip to content

Commit f2858ea

Browse files
bijudasgeertu
authored andcommitted
arm64: dts: renesas: r9a09g047e57-smarc: Enable CANFD
Enable CANFD on the RZ/G3E SMARC EVK platform. Signed-off-by: Biju Das <[email protected]> Reviewed-by: Geert Uytterhoeven <[email protected]> Link: https://lore.kernel.org/[email protected] Signed-off-by: Geert Uytterhoeven <[email protected]>
1 parent 9c1d49d commit f2858ea

File tree

3 files changed

+46
-3
lines changed

3 files changed

+46
-3
lines changed

arch/arm64/boot/dts/renesas/r9a09g047e57-smarc.dts

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
/dts-v1/;
99

1010
/* Switch selection settings */
11+
#define SW_LCD_EN 0
12+
#define SW_PDM_EN 0
1113
#define SW_SD0_DEV_SEL 0
1214
#define SW_SDIO_M2E 0
1315

@@ -33,7 +35,36 @@
3335
};
3436
};
3537

38+
&canfd {
39+
pinctrl-0 = <&canfd_pins>;
40+
pinctrl-names = "default";
41+
42+
#if (!SW_PDM_EN)
43+
channel1 {
44+
status = "okay";
45+
};
46+
#endif
47+
48+
#if (!SW_LCD_EN)
49+
channel4 {
50+
status = "okay";
51+
};
52+
#endif
53+
};
54+
3655
&pinctrl {
56+
canfd_pins: canfd {
57+
can1_pins: can1 {
58+
pinmux = <RZG3E_PORT_PINMUX(L, 2, 3)>, /* RX */
59+
<RZG3E_PORT_PINMUX(L, 3, 3)>; /* TX */
60+
};
61+
62+
can4_pins: can4 {
63+
pinmux = <RZG3E_PORT_PINMUX(5, 2, 3)>, /* RX */
64+
<RZG3E_PORT_PINMUX(5, 3, 3)>; /* TX */
65+
};
66+
};
67+
3768
scif_pins: scif {
3869
pins = "SCIF_TXD", "SCIF_RXD";
3970
renesas,output-impedance = <1>;

arch/arm64/boot/dts/renesas/renesas-smarc2.dtsi

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,10 @@
2929
};
3030
};
3131

32+
&canfd {
33+
status = "okay";
34+
};
35+
3236
&scif0 {
3337
status = "okay";
3438
};

arch/arm64/boot/dts/renesas/rzg3e-smarc-som.dtsi

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,20 @@
66
*/
77

88
/*
9-
* Please set the switch position SYS.1 on the SoM and the corresponding macro
10-
* SW_SD0_DEV_SEL on the board DTS:
9+
* Please set the below switch position on the SoM and the corresponding macro
10+
* on the board DTS:
1111
*
12-
* SW_SD0_DEV_SEL:
12+
* Switch position SYS.1, Macro SW_SD0_DEV_SEL:
1313
* 0 - SD0 is connected to eMMC (default)
1414
* 1 - SD0 is connected to uSD0 card
15+
*
16+
* Switch position SYS.5, Macro SW_LCD_EN:
17+
* 0 - Select Misc. Signals routing
18+
* 1 - Select LCD
19+
*
20+
* Switch position BOOT.6, Macro SW_PDM_EN:
21+
* 0 - Select CAN routing
22+
* 1 - Select PDM
1523
*/
1624

1725
/ {

0 commit comments

Comments
 (0)