Skip to content

Commit 51cca92

Browse files
CyrillePitchenalexandrebelloni
authored andcommitted
ARM: dts: at91: sama5d2_xplained: Add QSPI0 + SPI NOR memory nodes
This patch enables the QSPI0 controller, configures its pin muxing and declares a jedec,spi-nor memory. sama5d2 Xplained RevB and RevC use the Macronix MX25L25673G flash memory which advertises a maximum frequency of 80MHz for Quad IO Fast Read. Set the spi-max-frequency to 80MHz knowing that actually the QSPI drver will set the SPI bus clock to 166MHz / 3 = 55.3MHz. Signed-off-by: Cyrille Pitchen <[email protected]> Tested-by: Tudor Ambarus <[email protected]> Signed-off-by: Tudor Ambarus <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Alexandre Belloni <[email protected]>
1 parent 0fd3a8f commit 51cca92

File tree

1 file changed

+68
-0
lines changed

1 file changed

+68
-0
lines changed

arch/arm/boot/dts/at91-sama5d2_xplained.dts

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,58 @@
7272
};
7373

7474
apb {
75+
qspi0: spi@f0020000 {
76+
pinctrl-names = "default";
77+
pinctrl-0 = <&pinctrl_qspi0_default>;
78+
status = "disabled"; /* conflict with sdmmc1 */
79+
80+
flash@0 {
81+
#address-cells = <1>;
82+
#size-cells = <1>;
83+
compatible = "jedec,spi-nor";
84+
reg = <0>;
85+
spi-max-frequency = <80000000>;
86+
spi-tx-bus-width = <4>;
87+
spi-rx-bus-width = <4>;
88+
m25p,fast-read;
89+
90+
at91bootstrap@00000000 {
91+
label = "at91bootstrap";
92+
reg = <0x00000000 0x00040000>;
93+
};
94+
95+
bootloader@00040000 {
96+
label = "bootloader";
97+
reg = <0x00040000 0x000c0000>;
98+
};
99+
100+
bootloaderenvred@00100000 {
101+
label = "bootloader env redundant";
102+
reg = <0x00100000 0x00040000>;
103+
};
104+
105+
bootloaderenv@00140000 {
106+
label = "bootloader env";
107+
reg = <0x00140000 0x00040000>;
108+
};
109+
110+
dtb@00180000 {
111+
label = "device tree";
112+
reg = <0x00180000 0x00080000>;
113+
};
114+
115+
kernel@00200000 {
116+
label = "kernel";
117+
reg = <0x00200000 0x00600000>;
118+
};
119+
120+
misc@00800000 {
121+
label = "misc";
122+
reg = <0x00800000 0x00000000>;
123+
};
124+
};
125+
};
126+
75127
spi0: spi@f8000000 {
76128
pinctrl-names = "default";
77129
pinctrl-0 = <&pinctrl_spi0_default>;
@@ -535,6 +587,22 @@
535587
bias-disable;
536588
};
537589

590+
pinctrl_qspi0_default: qspi0_default {
591+
sck_cs {
592+
pinmux = <PIN_PA22__QSPI0_SCK>,
593+
<PIN_PA23__QSPI0_CS>;
594+
bias-disable;
595+
};
596+
597+
data {
598+
pinmux = <PIN_PA24__QSPI0_IO0>,
599+
<PIN_PA25__QSPI0_IO1>,
600+
<PIN_PA26__QSPI0_IO2>,
601+
<PIN_PA27__QSPI0_IO3>;
602+
bias-pull-up;
603+
};
604+
};
605+
538606
pinctrl_sdmmc0_default: sdmmc0_default {
539607
cmd_data {
540608
pinmux = <PIN_PA1__SDMMC0_CMD>,

0 commit comments

Comments
 (0)