Skip to content

Commit 6846d65

Browse files
Niklas Casselpalmer-dabbelt
authored andcommitted
riscv: dts: canaan: Fix SPI3 bus width
According to the K210 Standalone SDK Programming guide: https://canaan-creative.com/wp-content/uploads/2020/03/kendryte_standalone_programming_guide_20190311144158_en.pdf Section 15.4.3.3: SPI0 and SPI1 supports: standard, dual, quad and octal transfers. SPI3 supports: standard, dual and quad transfers (octal is not supported). In order to support quad transfers (Quad SPI), SPI3 must have four IO wires connected to the SPI flash. Update the device tree to specify the correct bus width. Tested on maix bit, maix dock and maixduino, which all have the same SPI flash (gd25lq128d) connected to SPI3. maix go is untested, but it would not make sense for this k210 board to be designed differently. Signed-off-by: Niklas Cassel <niklas.cassel@wdc.com> Reviewed-by: Damien Le Moal <damien.lemoal@opensource.wdc.com> Fixes: 8f5b0e7 ("riscv: Add SiPeed MAIXDUINO board device tree") Fixes: 8194f08 ("riscv: Add SiPeed MAIX GO board device tree") Fixes: a40f920 ("riscv: Add SiPeed MAIX DOCK board device tree") Fixes: 97c279b ("riscv: Add SiPeed MAIX BiT board device tree") Cc: stable@vger.kernel.org Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
1 parent bee7fbc commit 6846d65

4 files changed

Lines changed: 8 additions & 0 deletions

File tree

arch/riscv/boot/dts/canaan/sipeed_maix_bit.dts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -203,6 +203,8 @@
203203
compatible = "jedec,spi-nor";
204204
reg = <0>;
205205
spi-max-frequency = <50000000>;
206+
spi-tx-bus-width = <4>;
207+
spi-rx-bus-width = <4>;
206208
m25p,fast-read;
207209
broken-flash-reset;
208210
};

arch/riscv/boot/dts/canaan/sipeed_maix_dock.dts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -205,6 +205,8 @@
205205
compatible = "jedec,spi-nor";
206206
reg = <0>;
207207
spi-max-frequency = <50000000>;
208+
spi-tx-bus-width = <4>;
209+
spi-rx-bus-width = <4>;
208210
m25p,fast-read;
209211
broken-flash-reset;
210212
};

arch/riscv/boot/dts/canaan/sipeed_maix_go.dts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -213,6 +213,8 @@
213213
compatible = "jedec,spi-nor";
214214
reg = <0>;
215215
spi-max-frequency = <50000000>;
216+
spi-tx-bus-width = <4>;
217+
spi-rx-bus-width = <4>;
216218
m25p,fast-read;
217219
broken-flash-reset;
218220
};

arch/riscv/boot/dts/canaan/sipeed_maixduino.dts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -178,6 +178,8 @@
178178
compatible = "jedec,spi-nor";
179179
reg = <0>;
180180
spi-max-frequency = <50000000>;
181+
spi-tx-bus-width = <4>;
182+
spi-rx-bus-width = <4>;
181183
m25p,fast-read;
182184
broken-flash-reset;
183185
};

0 commit comments

Comments
 (0)