Hi,
We were trying to enable ECSPI2 NOR (mt25ql02g) device on i.MX8 Mini u-boot, but we were unable to detect the device. We booted from QSPI memory.
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 initialize SPI flash at 0:1 (error -2)
Please refer below device tree (imx8mm-evk.dtsi) and please refer the attached menuconfiguration for enabling 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_SCLK 0x82
MX8MM_IOMUXC_ECSPI2_MOSI_ECSPI2_MOSI 0x82
MX8MM_IOMUXC_ECSPI2_MISO_ECSPI2_MISO 0x82
>;
};
pinctrl_ecspi2_cs: ecspi2cs {
fsl,pins = <
MX8MM_IOMUXC_ECSPI2_SS0_GPIO5_IO13 0x40000
>;
};
Thank you for contacting NXP.
To continue with this case please answer the following questions:
Are you trying to enable the MT25QL02G on our iMX8M Mini EVK?
Are you using the NXP BSP?
What version are you using?
Best regards, Brian.
Hi @brian14,
Yes we were trying to enable MT25QL02G on our iMX8M Mini EVK and trying to boot from it as well.
Yes we were using NXP BSP.
SRCBRANCH = "lf_v2022.04"
SRCREV = "16e8414193985cf7a171f7b79e12ff30700157ba"
We were successful in enabling it at kernel space and it populated as MTD1, but we having issue in u-boot.
We tried to boot from this device. for that We eFuse it which is successful.
when we use SD image build for booting we see Unsupported boot device. SPL is reading but fails to load the u-boot.
We tried with fspi image, we didn't see any console message. Under CRO i can able to see only few transaction on the bus and then it stops.
We tried changing the u-boot version as one post suggest for PMIC. The PMIC initialization happens but same unsupported Boot Device. please refer below the u-boot version.
SRCBRANCH = "imx_v2020.04_5.4.47_2.2.0"
# SRCBRANCH = "lf_v2022.04"
SRCREV = "ffc3fbe7e5418d16f492c78693c3c4fa41f06f27"
# SRCREV = "16e8414193985cf7a171f7b79e12ff30700157ba"
#LOCALVERSION = "-${SRCBRANCH}"
LOCALVERSION = "-00009-gffc3fbe7e5
Thank you for your reply and sorry for my delayed reply.
I have some suggestions about this issue:
- Verify your physical connection with the iMX8M Mini and the ECSPI2 NOR, specifically check the correct operation of "chip select".
- Make that the max frequency for SPI is correctly set based on ECSPI2 NOR, but also you can try with a higher frequency.
Best regards, Brian.