The core board I use is ok8mp,
The kernel version is 5.4.70
Now I have added an mx25l25645g chip with the following core nodes
Now I compile the spi driver into a module that can be recognized normally。
the code is as follows:CONFIG_MTD_SPI_NOR=m
But when I compile the driver into y, I get an error。
the code is as follows:CONFIG_MTD_SPI_NOR=y
Error reported as follows:
[ 1.332273] spi-nor spi0.0: unrecognized JEDEC id bytes: 00 00 00 00 00 00
[ 1.339167] spi-nor: probe of spi0.0 failed with error -2
[ 1.369083] spi-nor spi0.0: w25q128 (16384 Kbytes)
[ 2.914454] spi-nor spi1.0: unrecognized JEDEC id bytes: 00 00 00 00 00 00
[ 2.923897] spi-nor: probe of spi1.0 failed with error -2
[ 2.935405] spi_imx 30830000.spi: probed
why?
thanks!
Hi @qwerqq
Can you share the kernel defconfig?
Please check as soon as possible, thank you very much
On NXP EVK board, the flash is under flexspi node and we also use CONFIG_MTD_SPI_NOR=y
Have you modify the spi0 in dtsi?
Now there are two types of flash chips on my development board. The original one is under the flexspi node, which has not been changed and can be recognized normally. In addition, the flash chip I added is under the ecspi node, and the previous ecspi node configuration has been sent to you
In addition, how should I configure this dtsi you mentioned
You can try to add:
spi1=&ecspi2;
I tried here, there is no effect, is there any other place to cause the compiler driver =y is not recognized?
Thank you for your reply
Add more debug message in ecspi driver, the header read from ecspi when you use Y is not correct. Try to dump raw data in ecspi driver.
Compiled into m can be successfully identified, y can not be identified, can be determined is the driver problem?