我们试图在 i.MX8 Mini u-boot 上启用 ECSPI2 NOR (mt25ql02g) 设备,但我们无法检测到该设备。
我们从QSPI 内存启动。
u-boot=> sf probe
SF: Detected n25q256a with page size 256 Bytes, erase size 4 KiB, total 32 MiB
u-boot=> sf probe 0
SF: Detected n25q256ax1 with page size 256 Bytes, erase size 4 KiB, total 32 MiB
u-boot=> sf probe 1
jedec_spi_nor spi_flash@0:1: unrecognized JEDEC id bytes: 00, 00, 00
Failed to ini
tialize SPI flash at 0:1 (error -2)
请参阅下面的设备树 (imx8mm-evk.dtsi),并请参阅随附的菜单配置以启用 ECSPI2。
&ecspi2 {
#address-cells = <1>;
#size-cells = <0>;
fsl,spi-num-chipselects = <1>;
pinctrl-names = \"default\";
pinctrl-0 = <&pinctrl_ecspi2 &pinctrl_ecspi2_cs>;
cs-gpios = <&gpio5 13 GPIO_ACTIVE_LOW>;
status = \"okay\";
spidev0: spi@1 {
reg = <0>;
compatible = \"micron,mt25ql02g\", \"jedec,spi-nor\";
spi-max-frequency = <2000000>;
spi-cs-low;
};
};
&iomuxc {
pinctrl_ecspi2: ecspi2grp {
fsl,pins = <
MX8MM_IOMUXC_ECSPI2_SCLK_ECSPI2_SCLK0x82
MX8MM_IOMUXC_ECSPI2_MOSI_ECSPI2_MOSI0x82
MX8MM_IOMUXC_ECSPI2_MISO_ECSPI2_MISO0x82
>;
};
pinctrl_ecspi2_cs: ecspi2cs {
fsl,pins = <
MX8MM_IOMUXC_ECSPI2_SS0_GPIO5_IO130x40000
>;
};