Skip to content

Commit b1dc69e

Browse files
SuperHeroAbnerdkalowsk
authored andcommitted
dts: Enable the xspi flash and psram cases on NXP RT700
Move nxp,xspi.yaml from spi bindings to mtd, it should be flash controllor rather than simple bus controller. Delete the xspi flash mx25um51345g bindling yaml file which is useless. Enable flash and two psrams on RT700 core0 and one psram on core1. Signed-off-by: Ruijia Wang <[email protected]>
1 parent e8bb85e commit b1dc69e

File tree

9 files changed

+162
-34
lines changed

9 files changed

+162
-34
lines changed

dts/arm/nxp/nxp_rt7xx_cm33_cpu0.dtsi

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1127,8 +1127,26 @@
11271127
&xspi0 {
11281128
compatible = "nxp,xspi";
11291129
status = "disabled";
1130-
interrupts = <42 0>;
1130+
interrupts = <118 0>;
11311131
#address-cells = <1>;
11321132
#size-cells = <0>;
1133-
clocks = <&clkctl0 MCUX_XSPI_CLK>;
1133+
clocks = <&clkctl0 MCUX_XSPI0_CLK>;
1134+
};
1135+
1136+
&xspi1 {
1137+
compatible = "nxp,xspi";
1138+
status = "disabled";
1139+
interrupts = <119 0>;
1140+
#address-cells = <1>;
1141+
#size-cells = <0>;
1142+
clocks = <&clkctl0 MCUX_XSPI1_CLK>;
1143+
};
1144+
1145+
&xspi2 {
1146+
compatible = "nxp,xspi";
1147+
status = "disabled";
1148+
interrupts = <120 0>;
1149+
#address-cells = <1>;
1150+
#size-cells = <0>;
1151+
clocks = <&clkctl4 MCUX_XSPI2_CLK>;
11341152
};

dts/arm/nxp/nxp_rt7xx_cm33_cpu1.dtsi

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -370,3 +370,12 @@
370370
status = "disabled";
371371
};
372372
};
373+
374+
&xspi2 {
375+
compatible = "nxp,xspi";
376+
status = "disabled";
377+
interrupts = <74 0>;
378+
#address-cells = <1>;
379+
#size-cells = <0>;
380+
clocks = <&clkctl4 MCUX_XSPI2_CLK>;
381+
};

dts/arm/nxp/nxp_rt7xx_common.dtsi

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
soc {
1818
sram: memory@10000000 {
1919
ranges = <0x0 0x10000000 0x780000
20-
0x20000000 0x30000000 0x780000>;
20+
0x20000000 0x30000000 0x780000>;
2121
};
2222

2323
peripheral: peripheral@50000000 {
@@ -83,8 +83,9 @@
8383
};
8484

8585
sram1: memory@20200000 {
86-
compatible = "mmio-sram";
86+
compatible = "zephyr,memory-region", "mmio-sram";
8787
reg = <0x20200000 DT_SIZE_K(2048)>;
88+
zephyr,memory-region = "SRAM1";
8889
};
8990

9091
sram3: memory@205C0000 {
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Copyright 2024-2025 NXP
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
description: NXP XSPI Flash Controller
5+
6+
compatible: "nxp,xspi-nor"
7+
8+
include: ["nxp,xspi-device.yaml", "jedec,jesd216.yaml"]
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Copyright 2025 NXP
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
description: NXP XSPI PSRAM Controller
5+
6+
compatible: "nxp,xspi-psram"
7+
8+
include: ["nxp,xspi-device.yaml"]
Lines changed: 26 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,30 @@
1-
# Copyright 2024 NXP
1+
# Copyright 2024-2025 NXP
22
# SPDX-License-Identifier: Apache-2.0
33

44
description: NXP XSPI device
55

6-
include: [spi-device.yaml, "jedec,jesd216.yaml"]
6+
include: [base.yaml]
7+
8+
properties:
9+
device-name:
10+
type: string
11+
description: Memory device name.
12+
13+
size:
14+
type: int
15+
required: true
16+
description: Total memory size in bytes.
17+
18+
enable-differential-clk:
19+
type: boolean
20+
description: Enable differential clock pad.
21+
22+
sample-clk-source:
23+
type: int
24+
default: 3
25+
enum: [1, 2, 3, 5, 9]
26+
description: Sample clock source.
27+
28+
enable-dqs-latency:
29+
type: boolean
30+
description: Enable DQS latency.

dts/bindings/mtd/nxp,xspi-mx25um51345g.yaml

Lines changed: 0 additions & 8 deletions
This file was deleted.

dts/bindings/spi/nxp,xspi.yaml

Lines changed: 0 additions & 20 deletions
This file was deleted.

dts/bindings/xspi/nxp,xspi.yaml

Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
# Copyright 2024-2025 NXP
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
description: NXP XSPI controller
5+
6+
compatible: "nxp,xspi"
7+
8+
include: [spi-controller.yaml, pinctrl-device.yaml]
9+
10+
properties:
11+
reg:
12+
required: true
13+
14+
interrupts:
15+
required: true
16+
17+
byte-order:
18+
type: int
19+
default: 3
20+
enum: [0, 1, 2, 3]
21+
description: |
22+
Byte ordering endianness.
23+
0 = 64-bit BE, 1 = 32-bit LE, 2 = 32-bit BE, 3 = 64-bit LE
24+
25+
enable-ahb-write:
26+
type: boolean
27+
description: Enable AHB write access.
28+
29+
ahb-buffer-write-flush:
30+
type: boolean
31+
description: Enable flushing AHB buffer on write or IP access.
32+
33+
ahb-prefetch:
34+
type: boolean
35+
description: Enable AHB read prefetch feature.
36+
37+
child-binding:
38+
description: NXP XSPI MDAD/FRAD configurations
39+
40+
properties:
41+
# MDAD configuration
42+
enable-descriptor-lock:
43+
type: int
44+
description: Enable descriptor lock
45+
mask-type:
46+
type: int
47+
description: Mask type (0=AND, 1=OR)
48+
mask:
49+
type: int
50+
description: 6-bit mask value
51+
master-id-reference:
52+
type: int
53+
description: Master ID reference value
54+
secure-attribute:
55+
type: int
56+
enum: [1, 2, 3]
57+
description: Security attribute setting
58+
59+
# FRAD configuration
60+
start-address:
61+
type: int
62+
description: Start address of the memory region
63+
end-address:
64+
type: int
65+
description: End address of the memory region
66+
tg0-master-access:
67+
type: int
68+
description: Target group 0 access permissions
69+
tg1-master-access:
70+
type: int
71+
description: Target group 1 access permissions
72+
descriptor-lock:
73+
type: int
74+
enum: [0, 1, 2, 3]
75+
description: |
76+
Descriptor lock mode:
77+
- Disable
78+
- Enable till hard reset
79+
- Enable except master ID
80+
- Enable
81+
exclusive-access-lock:
82+
type: int
83+
enum: [0, 2, 3]
84+
description: |
85+
Exclusive access lock mode:
86+
- Disable
87+
- Enable except master ID
88+
- Enable

0 commit comments

Comments
 (0)