qspi-flash

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

qspi-flash

1,461 Views
qwerqq
Contributor I

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

Image_20231221114245.png

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!

0 Kudos
Reply
9 Replies

1,439 Views
Zhiming_Liu
NXP TechSupport
NXP TechSupport

Hi @qwerqq 

Can you share the kernel defconfig?

0 Kudos
Reply

1,432 Views
qwerqq
Contributor I

Please check as soon as possible, thank you very much

0 Kudos
Reply

1,416 Views
Zhiming_Liu
NXP TechSupport
NXP TechSupport

On NXP EVK board, the flash is under flexspi node and we also use CONFIG_MTD_SPI_NOR=y

Zhiming_Liu_0-1703559205101.png

Zhiming_Liu_1-1703559246775.png

Have you modify the spi0 in dtsi?

Zhiming_Liu_3-1703559580627.png

 

 

 

0 Kudos
Reply

1,411 Views
qwerqq
Contributor I

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

0 Kudos
Reply

1,370 Views
Zhiming_Liu
NXP TechSupport
NXP TechSupport

You can try to add:

spi1=&ecspi2;

0 Kudos
Reply

1,360 Views
qwerqq
Contributor I

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

0 Kudos
Reply

1,358 Views
Zhiming_Liu
NXP TechSupport
NXP TechSupport

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.

0 Kudos
Reply

1,353 Views
qwerqq
Contributor I

Compiled into m can be successfully identified, y can not be identified, can be determined is the driver problem?

0 Kudos
Reply

1,435 Views
qwerqq
Contributor I

This is my kernel deconfig

0 Kudos
Reply