Skip to content

Commit

Permalink
boards: nxp: s32z2xxdc2: add Flexcan support for s32z2xxdc2
Browse files Browse the repository at this point in the history
Enable Flexcan support on s32z2xxdc2 boards

Signed-off-by: Tu Nguyen Van <[email protected]>
  • Loading branch information
tunguyen4585 authored and henrikbrixandersen committed Aug 21, 2024
1 parent ee6620e commit 34206f5
Show file tree
Hide file tree
Showing 4 changed files with 55 additions and 8 deletions.
25 changes: 18 additions & 7 deletions boards/nxp/s32z2xxdc2/doc/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@ The boards support the following hardware features:
+-----------+------------+-------------------------------------+
| CANEXCEL | on-chip | can |
+-----------+------------+-------------------------------------+
| FLEXCAN | on-chip | can |
+-----------+------------+-------------------------------------+

Other hardware features are not currently supported by the port.

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

Controller Area Network (CAN)
=============================
Controller Area Network
=======================

CANEXCEL
--------

CANEXCEL supports CAN Classic (CAN 2.0) and CAN FD modes. Remote transmission
request is not supported.

Note that this board does not currently come with CAN transceivers installed for
the CANEXCEL ports. To facilitate external traffic, you will need to add a CAN
transceiver. Any transceiver pin-compatible with CAN 2.0 and CAN FD protocols
can be used.

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

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

Programming and Debugging
*************************
Expand Down
10 changes: 10 additions & 0 deletions boards/nxp/s32z2xxdc2/s32z2xxdc2_s32z270.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -40,3 +40,13 @@
pinctrl-0 = <&canxl1_default>;
pinctrl-names = "default";
};

&flexcan0 {
pinctrl-0 = <&flexcan0_default>;
pinctrl-names = "default";
};

&flexcan1 {
pinctrl-0 = <&flexcan1_default>;
pinctrl-names = "default";
};
22 changes: 22 additions & 0 deletions boards/nxp/s32z2xxdc2/s32z2xxdc2_s32z270_pinctrl.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -85,4 +85,26 @@
output-enable;
};
};

flexcan0_default: flexcan0_default {
group1 {
pinmux = <PA5_CAN_0_RX>;
input-enable;
};
group2 {
pinmux = <PA4_CAN_0_TX>;
output-enable;
};
};

flexcan1_default: flexcan1_default {
group1 {
pinmux = <PB7_CAN_1_RX>;
input-enable;
};
group2 {
pinmux = <PB6_CAN_1_TX>;
output-enable;
};
};
};
6 changes: 5 additions & 1 deletion boards/nxp/s32z2xxdc2/s32z2xxdc2_s32z270_rtu1.dts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
zephyr,sram = &sram1;
zephyr,console = &uart0;
zephyr,shell-uart = &uart0;
zephyr,canbus = &canxl0;
zephyr,canbus = &flexcan0;
};

aliases {
Expand All @@ -33,3 +33,7 @@
mboxes = <&mru4 0>;
mbox-names = "rx";
};

&flexcan0 {
status = "okay";
};

0 comments on commit 34206f5

Please sign in to comment.