Skip to content

Commit 6559f2f

Browse files
congnguyenhuucarlescufi
authored andcommitted
boards: arm: s32z270dc2_r52: enable CAN support
Enable CAN instances on s32z270dc2_r52 boards Signed-off-by: Cong Nguyen Huu <[email protected]>
1 parent cad17ff commit 6559f2f

File tree

7 files changed

+75
-0
lines changed

7 files changed

+75
-0
lines changed

boards/arm/s32z270dc2_r52/s32z270dc2_r52-pinctrl.dtsi

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,4 +52,26 @@
5252
output-enable;
5353
};
5454
};
55+
56+
can0_default: can0_default {
57+
group1 {
58+
pinmux = <PN2_CANXL_0_RX>;
59+
input-enable;
60+
};
61+
group2 {
62+
pinmux = <PN1_CANXL_0_TX>;
63+
output-enable;
64+
};
65+
};
66+
67+
can1_default: can1_default {
68+
group1 {
69+
pinmux = <PM11_CANXL_1_RX>;
70+
input-enable;
71+
};
72+
group2 {
73+
pinmux = <PM10_CANXL_1_TX>;
74+
output-enable;
75+
};
76+
};
5577
};

boards/arm/s32z270dc2_r52/s32z270dc2_r52.dtsi

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,3 +112,28 @@
112112
phy-dev = <&phy0>;
113113
status = "okay";
114114
};
115+
116+
&can0 {
117+
pinctrl-0 = <&can0_default>;
118+
pinctrl-names = "default";
119+
clock-frequency = <80000000>;
120+
bus-speed = <125000>;
121+
sample-point = <875>;
122+
sjw = <1>;
123+
bus-speed-data = <1000000>;
124+
sample-point-data = <875>;
125+
sjw-data = <1>;
126+
status = "okay";
127+
};
128+
129+
&can1 {
130+
pinctrl-0 = <&can1_default>;
131+
pinctrl-names = "default";
132+
clock-frequency = <80000000>;
133+
bus-speed = <125000>;
134+
sample-point = <875>;
135+
sjw = <1>;
136+
bus-speed-data = <1000000>;
137+
sample-point-data = <875>;
138+
sjw-data = <1>;
139+
};

boards/arm/s32z270dc2_r52/s32z270dc2_rtu0_r52.dts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
zephyr,sram = &sram0;
1717
zephyr,console = &uart0;
1818
zephyr,shell-uart = &uart0;
19+
zephyr,canbus = &can0;
1920
};
2021

2122
aliases {

boards/arm/s32z270dc2_r52/s32z270dc2_rtu0_r52.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,4 @@ supported:
1313
- gpio
1414
- watchdog
1515
- netif:eth
16+
- can

boards/arm/s32z270dc2_r52/s32z270dc2_rtu1_r52.dts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
zephyr,sram = &sram1;
1717
zephyr,console = &uart0;
1818
zephyr,shell-uart = &uart0;
19+
zephyr,canbus = &can0;
1920
};
2021

2122
aliases {

boards/arm/s32z270dc2_r52/s32z270dc2_rtu1_r52.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,4 @@ supported:
1313
- gpio
1414
- watchdog
1515
- netif:eth
16+
- can

dts/arm/nxp/nxp_s32z27x_r52.dtsi

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -658,5 +658,29 @@
658658
status = "disabled";
659659
};
660660
};
661+
662+
can0: can@4741b000 {
663+
compatible = "nxp,s32-canxl";
664+
reg = <0x4741b000 0x4000>,
665+
<0x47426000 0x4000>,
666+
<0x47424000 0x4000>;
667+
reg-names = "sic", "grp_ctrl", "dsc_ctrl";
668+
status = "disabled";
669+
interrupts = <GIC_SPI 224 IRQ_TYPE_LEVEL IRQ_DEFAULT_PRIORITY>,
670+
<GIC_SPI 225 IRQ_TYPE_LEVEL IRQ_DEFAULT_PRIORITY>;
671+
interrupt-names = "RX_TX_DATA_IRQ", "INT_ERROR_IRQ";
672+
};
673+
674+
can1: can@4751b000 {
675+
compatible = "nxp,s32-canxl";
676+
reg = <0x4751b000 0x4000>,
677+
<0x47526000 0x4000>,
678+
<0x47524000 0x4000>;
679+
reg-names = "sic", "grp_ctrl", "dsc_ctrl";
680+
status = "disabled";
681+
interrupts = <GIC_SPI 226 IRQ_TYPE_LEVEL IRQ_DEFAULT_PRIORITY>,
682+
<GIC_SPI 227 IRQ_TYPE_LEVEL IRQ_DEFAULT_PRIORITY>;
683+
interrupt-names = "RX_TX_DATA_IRQ", "INT_ERROR_IRQ";
684+
};
661685
};
662686
};

0 commit comments

Comments
 (0)