我用的AM4378,链接的spansion S25FL512SAIF01 qspi flash。设备配置如下:
quad read, pinmux option 1
arch\arm\dts\am4372.dtsi 中:
qspi: qspi@47900000 {
compatible = "ti,am4372-qspi";
reg = <0x47900000 0x100>,
<0x30000000 0x4000000>;
reg-names = "qspi_base", "qspi_mmap";
#address-cells = <1>;
#size-cells = <1>;
ti,hwmods = "qspi";
status = "disabled";
};
arch\arm\dts\am437x-gp-evm.dts 中:
&qspi {
status = "okay";
pinctrl-names = "default";
pinctrl-0 = <&qspi_pins_default>;
spi-max-frequency = <48000000>;
w25q256@0 {
compatible = "spi_flash";
spi-max-frequency = <48000000>;
spi-cpol;
spi-cpha;
spi-tx-bus-width = <1>;
spi-rx-bus-width = <1>;
#address-cells = <1>;
#size-cells = <1>;
};
};
不知道这样配置对不对?
yun zhong:
=> sf probe 0 0
SF: Detected s25fl512s_256k with page size 512 Bytes, erase size 256 KiB, total 64 MiB, mapped at 30000000
–读出来的ID也为0,这里是强制赋的ID值。=> sf read 0x82000000 0x0 0x100000
device 0 offset 0x0, size 0x100000
SF: 1048576 bytes @ 0x0 Read: OK=> md.b 0x82000000
82000000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00…………….
82000010: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00…………….
82000020: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00…………….
82000030: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00…………….
=>
yongqing wang:
回复 yun zhong:
参考一下这个帖子:e2e.ti.com/…/1751934
Shine:
回复 yun zhong:
用示波器看一下SPI管脚时序。