Skip to content

Commit 34206f5

Browse files
tunguyen4585henrikbrixandersen
authored andcommitted
boards: nxp: s32z2xxdc2: add Flexcan support for s32z2xxdc2
Enable Flexcan support on s32z2xxdc2 boards Signed-off-by: Tu Nguyen Van <[email protected]>
1 parent ee6620e commit 34206f5

File tree

4 files changed

+55
-8
lines changed

4 files changed

+55
-8
lines changed

boards/nxp/s32z2xxdc2/doc/index.rst

Lines changed: 18 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,8 @@ The boards support the following hardware features:
5353
+-----------+------------+-------------------------------------+
5454
| CANEXCEL | on-chip | can |
5555
+-----------+------------+-------------------------------------+
56+
| FLEXCAN | on-chip | can |
57+
+-----------+------------+-------------------------------------+
5658

5759
Other hardware features are not currently supported by the port.
5860

@@ -129,15 +131,24 @@ single Virtual SI (VSI). The rest of the VSI's shall be assigned to different
129131
cores of the system. Refer to :ref:`nxp_s32_netc-samples` to learn how to
130132
configure the Ethernet network controller.
131133

132-
Controller Area Network (CAN)
133-
=============================
134+
Controller Area Network
135+
=======================
136+
137+
CANEXCEL
138+
--------
139+
140+
CANEXCEL supports CAN Classic (CAN 2.0) and CAN FD modes. Remote transmission
141+
request is not supported.
142+
143+
Note that this board does not currently come with CAN transceivers installed for
144+
the CANEXCEL ports. To facilitate external traffic, you will need to add a CAN
145+
transceiver. Any transceiver pin-compatible with CAN 2.0 and CAN FD protocols
146+
can be used.
134147

135-
Currently, the CANXL transceiver is not populated in this board. So CAN transceiver
136-
connection is required for running external traffic. We can use any CAN transceiver,
137-
which supports CAN 2.0 and CAN FD protocol.
148+
FlexCAN
149+
-------
138150

139-
CAN driver supports classic (CAN 2.0) and CAN FD mode. Remote transmission request is
140-
not supported as this feature is not available on NXP S32 CANXL HAL.
151+
FlexCAN supports CAN Classic (CAN 2.0) and CAN FD modes.
141152

142153
Programming and Debugging
143154
*************************

boards/nxp/s32z2xxdc2/s32z2xxdc2_s32z270.dtsi

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,3 +40,13 @@
4040
pinctrl-0 = <&canxl1_default>;
4141
pinctrl-names = "default";
4242
};
43+
44+
&flexcan0 {
45+
pinctrl-0 = <&flexcan0_default>;
46+
pinctrl-names = "default";
47+
};
48+
49+
&flexcan1 {
50+
pinctrl-0 = <&flexcan1_default>;
51+
pinctrl-names = "default";
52+
};

boards/nxp/s32z2xxdc2/s32z2xxdc2_s32z270_pinctrl.dtsi

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,4 +85,26 @@
8585
output-enable;
8686
};
8787
};
88+
89+
flexcan0_default: flexcan0_default {
90+
group1 {
91+
pinmux = <PA5_CAN_0_RX>;
92+
input-enable;
93+
};
94+
group2 {
95+
pinmux = <PA4_CAN_0_TX>;
96+
output-enable;
97+
};
98+
};
99+
100+
flexcan1_default: flexcan1_default {
101+
group1 {
102+
pinmux = <PB7_CAN_1_RX>;
103+
input-enable;
104+
};
105+
group2 {
106+
pinmux = <PB6_CAN_1_TX>;
107+
output-enable;
108+
};
109+
};
88110
};

boards/nxp/s32z2xxdc2/s32z2xxdc2_s32z270_rtu1.dts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
zephyr,sram = &sram1;
1717
zephyr,console = &uart0;
1818
zephyr,shell-uart = &uart0;
19-
zephyr,canbus = &canxl0;
19+
zephyr,canbus = &flexcan0;
2020
};
2121

2222
aliases {
@@ -33,3 +33,7 @@
3333
mboxes = <&mru4 0>;
3434
mbox-names = "rx";
3535
};
36+
37+
&flexcan0 {
38+
status = "okay";
39+
};

0 commit comments

Comments
 (0)