驱动W25Q64 flash,手册里erase write enable 等CMD都需要在CMD发送后将CS脚拉高,在DTS里设置spi-cs-high,
在dmesg里看到如下错误:
[ 0.972435] spi spi32766.0: setup: unsupported mode bits 4
[ 0.972451] rockchip-spi ff1d0000.spi: can't setup spi32766.0, status -22
[ 0.972461] spi_master spi32766: spi_device register error /spi@ff1d0000/w25q64@00
[ 0.972473] spi_master spi32766: Failed to create SPI device for /spi@ff1d0000/w25q64@00
有大佬帮忙解答吗,
如何才能正确的erase write enable,
确认引脚没复用,write protect 脚拉高了,
能读到flash的全FF数据。
&spi1 {
status = "okay";
max-freq = <48000000>;
dev-port = <1>;
w25q64: w25q64@00 {
status = "okay";
compatible = "rockchip,spidev";
reg = <0x00>;
spi-max-frequency = <24000000>;
wp-gpio = <&gpio0 12 GPIO_ACTIVE_HIGH>; /GPIO0_B4/
spi-cs-high;
//spi-cpha; /SPI mode: CPHA = 1/
//spi-cpol; /SPI mode: CPOL = 1/
};
};
更多回帖