Skip to content

Commit 9925664

Browse files
bijudasgeertu
authored andcommitted
arm64: dts: renesas: r9a09g047e57-smarc: Enable CAN Transceiver
Enable TCAN1046V-Q1 CAN Transceiver populated on RZ/G3E SMARC EVK by modelling it as two instances of tcan1042. 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 f2858ea commit 9925664

File tree

2 files changed

+47
-0
lines changed

2 files changed

+47
-0
lines changed

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

Lines changed: 22 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_GPIO8_CAN0_STB 0
12+
#define SW_GPIO9_CAN1_STB 0
1113
#define SW_LCD_EN 0
1214
#define SW_PDM_EN 0
1315
#define SW_SD0_DEV_SEL 0
@@ -42,16 +44,36 @@
4244
#if (!SW_PDM_EN)
4345
channel1 {
4446
status = "okay";
47+
#if (!SW_LCD_EN) && (SW_GPIO9_CAN1_STB)
48+
phys = <&can_transceiver1>;
49+
#endif
4550
};
4651
#endif
4752

4853
#if (!SW_LCD_EN)
4954
channel4 {
5055
status = "okay";
56+
#if (SW_GPIO8_CAN0_STB)
57+
phys = <&can_transceiver0>;
58+
#endif
5159
};
5260
#endif
5361
};
5462

63+
#if (!SW_LCD_EN) && (SW_GPIO8_CAN0_STB)
64+
&can_transceiver0 {
65+
standby-gpios = <&pinctrl RZG3E_GPIO(5, 4) GPIO_ACTIVE_HIGH>;
66+
status = "okay";
67+
};
68+
#endif
69+
70+
#if (!SW_LCD_EN) && (SW_GPIO9_CAN1_STB)
71+
&can_transceiver1 {
72+
standby-gpios = <&pinctrl RZG3E_GPIO(5, 5) GPIO_ACTIVE_HIGH>;
73+
status = "okay";
74+
};
75+
#endif
76+
5577
&pinctrl {
5678
canfd_pins: canfd {
5779
can1_pins: can1 {

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

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,17 @@
1212
* SW_SDIO_M2E:
1313
* 0 - SMARC SDIO signal is connected to uSD1
1414
* 1 - SMARC SDIO signal is connected to M.2 Key E connector
15+
*
16+
* Please set the switch position SW_GPIO_CAN_PMOD on the carrier board and the
17+
* corresponding macro SW_GPIO8_CAN0_STB/SW_GPIO8_CAN0_STB on the board DTS:
18+
*
19+
* SW_GPIO8_CAN0_STB:
20+
* 0 - Connect to GPIO8 PMOD (default)
21+
* 1 - Connect to CAN0 transceiver STB pin
22+
*
23+
* SW_GPIO9_CAN1_STB:
24+
* 0 - Connect to GPIO9 PMOD (default)
25+
* 1 - Connect to CAN1 transceiver STB pin
1526
*/
1627

1728
/ {
@@ -27,6 +38,20 @@
2738
serial3 = &scif0;
2839
mmc1 = &sdhi1;
2940
};
41+
42+
can_transceiver0: can-phy0 {
43+
compatible = "ti,tcan1042";
44+
#phy-cells = <0>;
45+
max-bitrate = <8000000>;
46+
status = "disabled";
47+
};
48+
49+
can_transceiver1: can-phy1 {
50+
compatible = "ti,tcan1042";
51+
#phy-cells = <0>;
52+
max-bitrate = <8000000>;
53+
status = "disabled";
54+
};
3055
};
3156

3257
&canfd {

0 commit comments

Comments
 (0)