Skip to content

Commit 45b9fcd

Browse files
dts: can: mcux: flexcan: Add nxp,max-mb property to FlexCAN nodes
Add the `nxp,max-mb` and `nxp,max-mb-fd` device tree property to all NXP FlexCAN controller nodes across various SoC families to specify the maximum number of 8-byte and 64-byte payload message buffers supported by each FlexCAN instance. This change updates device tree source files for multiple NXP SoC families including Kinetis K6x, RT10xx, RT11xx, RT118x, MCX, S32K, S32Z series, and i.MX8MP/i.MX93. The property values are set based on hardware specifications for each specific FlexCAN instance. This property addition ensures proper resource allocation and prevents buffer overflow issues in FlexCAN driver implementations. Signed-off-by: William Tang <william.tang@nxp.com>
1 parent 8a98cd5 commit 45b9fcd

24 files changed

+177
-0
lines changed

dts/arm/nxp/nxp_k66.dtsi

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
"rx-warning", "wake-up";
3333
clocks = <&sim KINETIS_SIM_BUS_CLK 0x1030 4>;
3434
clk-source = <1>;
35+
nxp,max-mb = <16>;
3536
status = "disabled";
3637
};
3738
};

dts/arm/nxp/nxp_k6x.dtsi

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -521,6 +521,7 @@
521521
interrupt-names = "mb-0-15", "bus-off", "error", "tx-warning", "rx-warning", "wake-up";
522522
clocks = <&sim KINETIS_SIM_BUS_CLK 0x103C 4>;
523523
clk-source = <1>;
524+
nxp,max-mb = <16>;
524525
status = "disabled";
525526
};
526527

dts/arm/nxp/nxp_ke1xf.dtsi

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -411,6 +411,7 @@
411411
"mb-0-15";
412412
clocks = <&scg KINETIS_SCG_BUS_CLK>;
413413
clk-source = <1>;
414+
nxp,max-mb = <16>;
414415
status = "disabled";
415416
};
416417

@@ -422,6 +423,7 @@
422423
"mb-0-15";
423424
clocks = <&scg KINETIS_SCG_BUS_CLK>;
424425
clk-source = <1>;
426+
nxp,max-mb = <16>;
425427
status = "disabled";
426428
};
427429

dts/arm/nxp/nxp_mcxa156.dtsi

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -266,6 +266,7 @@
266266
interrupt-names = "common";
267267
clocks = <&syscon MCUX_FLEXCAN0_CLK>;
268268
clk-source = <0>;
269+
nxp,max-mb = <32>;
269270
status = "disabled";
270271
};
271272

dts/arm/nxp/nxp_mcxa344.dtsi

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -256,6 +256,7 @@
256256
interrupt-names = "common";
257257
clocks = <&syscon MCUX_FLEXCAN0_CLK>;
258258
clk-source = <0>;
259+
nxp,max-mb = <32>;
259260
status = "disabled";
260261
};
261262

dts/arm/nxp/nxp_mcxe245.dtsi

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,16 +35,23 @@
3535
};
3636
};
3737

38+
&flexcan0 {
39+
nxp,max-mb = <32>;
40+
nxp,max-mb-fd = <7>;
41+
};
42+
3843
&flexcan1 {
3944
compatible = "nxp,flexcan";
4045
interrupts = <85 0>, <86 0>, <88 0>;
4146
interrupt-names = "ored-warning-bus-off", "error", "mb-0-15";
47+
nxp,max-mb = <16>;
4248
};
4349

4450
&flexcan2 {
4551
compatible = "nxp,flexcan";
4652
interrupts = <92 0>, <93 0>, <95 0>;
4753
interrupt-names = "ored-warning-bus-off", "error", "mb-0-15";
54+
nxp,max-mb = <16>;
4855
};
4956

5057
/delete-node/ &ftm4;

dts/arm/nxp/nxp_mcxe246.dtsi

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,21 @@
3535
};
3636
};
3737

38+
&flexcan0 {
39+
nxp,max-mb = <32>;
40+
nxp,max-mb-fd = <7>;
41+
};
42+
43+
&flexcan1 {
44+
nxp,max-mb = <32>;
45+
nxp,max-mb-fd = <7>;
46+
};
47+
3848
&flexcan2 {
3949
compatible = "nxp,flexcan";
4050
interrupts = <92 0>, <93 0>, <95 0>;
4151
interrupt-names = "ored-warning-bus-off", "error", "mb-0-15";
52+
nxp,max-mb = <16>;
4253
};
4354

4455
/delete-node/ &ftm4;

dts/arm/nxp/nxp_mcxe247.dtsi

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,3 +34,18 @@
3434
write-block-size = <8>;
3535
};
3636
};
37+
38+
&flexcan0 {
39+
nxp,max-mb = <32>;
40+
nxp,max-mb-fd = <7>;
41+
};
42+
43+
&flexcan1 {
44+
nxp,max-mb = <32>;
45+
nxp,max-mb-fd = <7>;
46+
};
47+
48+
&flexcan2 {
49+
nxp,max-mb = <32>;
50+
nxp,max-mb-fd = <7>;
51+
};

dts/arm/nxp/nxp_mcxe31b.dtsi

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,3 +52,27 @@
5252
};
5353

5454
#include <nxp/nxp_mcxe31x_common.dtsi>
55+
56+
&flexcan_0 {
57+
nxp,max-mb = <96>;
58+
};
59+
60+
&flexcan_1 {
61+
nxp,max-mb = <64>;
62+
};
63+
64+
&flexcan_2 {
65+
nxp,max-mb = <64>;
66+
};
67+
68+
&flexcan_3 {
69+
nxp,max-mb = <32>;
70+
};
71+
72+
&flexcan_4 {
73+
nxp,max-mb = <32>;
74+
};
75+
76+
&flexcan_5 {
77+
nxp,max-mb = <32>;
78+
};

dts/arm/nxp/nxp_mcxn23x_common.dtsi

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -814,6 +814,7 @@
814814
interrupt-names = "common";
815815
clocks = <&syscon MCUX_FLEXCAN0_CLK>;
816816
clk-source = <0>;
817+
nxp,max-mb = <32>;
817818
status = "disabled";
818819
};
819820

@@ -824,6 +825,7 @@
824825
interrupt-names = "common";
825826
clocks = <&syscon MCUX_FLEXCAN1_CLK>;
826827
clk-source = <0>;
828+
nxp,max-mb = <32>;
827829
status = "disabled";
828830
};
829831

0 commit comments

Comments
 (0)