Skip to content

Commit c32f139

Browse files
author
Dinh Nguyen
committed
FogBugz #189684-2: dts part: clean up QSPI entries
Moves the base QSPI dts entry into socfpga.dtsi and add board specific QSPI entry to the appropriate board file DTS files. Removes the hard-coded clock frequency. Signed-off-by: Dinh Nguyen <[email protected]>
1 parent 5b54065 commit c32f139

File tree

3 files changed

+77
-83
lines changed

3 files changed

+77
-83
lines changed

arch/arm/boot/dts/socfpga.dtsi

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -707,6 +707,21 @@
707707
};
708708
};
709709

710+
qspi: spi@ff705000 {
711+
#address-cells = <1>;
712+
#size-cells = <0>;
713+
compatible = "cadence,qspi";
714+
reg = <0xff705000 0x1000>,
715+
<0xffa00000 0x1000>;
716+
interrupts = <0 151 4>;
717+
clocks = <&qspi_clk>;
718+
ext-decoder = <0>; /* external decoder */
719+
num-chipselect = <4>;
720+
fifo-depth = <128>;
721+
bus-num = <2>;
722+
status = "disabled";
723+
};
724+
710725
rstmgr@ffd05000 {
711726
compatible = "altr,rst-mgr", "syscon";
712727
reg = <0xffd05000 0x1000>;

arch/arm/boot/dts/socfpga_arria5.dts

Lines changed: 31 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -71,48 +71,6 @@
7171
status = "okay";
7272
};
7373

74-
qspi: spi@ff705000 {
75-
compatible = "cadence,qspi";
76-
#address-cells = <1>;
77-
#size-cells = <0>;
78-
reg = <0xff705000 0x1000>,
79-
<0xffa00000 0x1000>;
80-
interrupts = <0 151 4>;
81-
master-ref-clk = <400000000>;
82-
ext-decoder = <0>; /* external decoder */
83-
num-chipselect = <4>;
84-
fifo-depth = <128>;
85-
bus-num = <2>;
86-
87-
flash0: n25q512a@0 {
88-
#address-cells = <1>;
89-
#size-cells = <1>;
90-
compatible = "n25q512a";
91-
reg = <0>; /* chip select */
92-
spi-max-frequency = <100000000>;
93-
m25p,fast-read;
94-
page-size = <256>;
95-
block-size = <16>; /* 2^16, 64KB */
96-
read-delay = <4>; /* delay value in read data capture register */
97-
tshsl-ns = <50>;
98-
tsd2d-ns = <50>;
99-
tchsh-ns = <4>;
100-
tslch-ns = <4>;
101-
102-
partition@qspi-boot {
103-
/* 8MB for raw data. */
104-
label = "Flash 0 Raw Data";
105-
reg = <0x0 0x800000>;
106-
};
107-
partition@qspi-rootfs {
108-
/* 56MB for jffs2 data. */
109-
label = "Flash 0 jffs2 Filesystem";
110-
reg = <0x800000 0x3800000>;
111-
};
112-
};
113-
114-
};
115-
11674
timer0@ffc08000 {
11775
clock-frequency = <100000000>;
11876
};
@@ -190,3 +148,34 @@
190148
reg = <0x68>;
191149
};
192150
};
151+
152+
&qspi {
153+
status = "okay";
154+
flash0: n25q512a@0 {
155+
#address-cells = <1>;
156+
#size-cells = <1>;
157+
compatible = "n25q512a";
158+
reg = <0>; /* chip select */
159+
spi-max-frequency = <100000000>;
160+
m25p,fast-read;
161+
page-size = <256>;
162+
block-size = <16>; /* 2^16, 64KB */
163+
read-delay = <4>; /* delay value in read data capture register */
164+
tshsl-ns = <50>;
165+
tsd2d-ns = <50>;
166+
tchsh-ns = <4>;
167+
tslch-ns = <4>;
168+
169+
partition@qspi-boot {
170+
/* 8MB for raw data. */
171+
label = "Flash 0 Raw Data";
172+
reg = <0x0 0x800000>;
173+
};
174+
175+
partition@qspi-rootfs {
176+
/* 56MB for jffs2 data. */
177+
label = "Flash 0 jffs2 Filesystem";
178+
reg = <0x800000 0x3800000>;
179+
};
180+
};
181+
};

arch/arm/boot/dts/socfpga_cyclone5.dts

Lines changed: 31 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -75,47 +75,6 @@
7575
status = "okay";
7676
};
7777

78-
qspi: spi@ff705000 {
79-
compatible = "cadence,qspi";
80-
#address-cells = <1>;
81-
#size-cells = <0>;
82-
reg = <0xff705000 0x1000>,
83-
<0xffa00000 0x1000>;
84-
interrupts = <0 151 4>;
85-
master-ref-clk = <400000000>;
86-
ext-decoder = <0>; /* external decoder */
87-
num-chipselect = <4>;
88-
fifo-depth = <128>;
89-
bus-num = <2>;
90-
91-
flash0: n25q00@0 {
92-
#address-cells = <1>;
93-
#size-cells = <1>;
94-
compatible = "n25q00";
95-
reg = <0>; /* chip select */
96-
spi-max-frequency = <100000000>;
97-
m25p,fast-read;
98-
page-size = <256>;
99-
block-size = <16>; /* 2^16, 64KB */
100-
read-delay = <4>; /* delay value in read data capture register */
101-
tshsl-ns = <50>;
102-
tsd2d-ns = <50>;
103-
tchsh-ns = <4>;
104-
tslch-ns = <4>;
105-
106-
partition@qspi-boot {
107-
/* 8MB for raw data. */
108-
label = "Flash 0 Raw Data";
109-
reg = <0x0 0x800000>;
110-
};
111-
partition@qspi-rootfs {
112-
/* 120MB for jffs2 data. */
113-
label = "Flash 0 jffs2 Filesystem";
114-
reg = <0x800000 0x7800000>;
115-
};
116-
};
117-
};
118-
11978
serial0@ffc02000 {
12079
status = "okay";
12180
};
@@ -193,3 +152,34 @@
193152
snps,max-mtu = <3800>;
194153
status = "okay";
195154
};
155+
156+
&qspi {
157+
status = "okay";
158+
flash0: n25q00@0 {
159+
#address-cells = <1>;
160+
#size-cells = <1>;
161+
compatible = "n25q00";
162+
reg = <0>; /* chip select */
163+
spi-max-frequency = <100000000>;
164+
m25p,fast-read;
165+
page-size = <256>;
166+
block-size = <16>; /* 2^16, 64KB */
167+
read-delay = <4>; /* delay value in read data capture register */
168+
tshsl-ns = <50>;
169+
tsd2d-ns = <50>;
170+
tchsh-ns = <4>;
171+
tslch-ns = <4>;
172+
173+
partition@qspi-boot {
174+
/* 8MB for raw data. */
175+
label = "Flash 0 Raw Data";
176+
reg = <0x0 0x800000>;
177+
};
178+
179+
partition@qspi-rootfs {
180+
/* 120MB for jffs2 data. */
181+
label = "Flash 0 jffs2 Filesystem";
182+
reg = <0x800000 0x7800000>;
183+
};
184+
};
185+
};

0 commit comments

Comments
 (0)