qspi-flash

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

qspi-flash

1,467 次查看
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 项奖励
回复
9 回复数

1,445 次查看
Zhiming_Liu
NXP TechSupport
NXP TechSupport

Hi @qwerqq 

Can you share the kernel defconfig?

0 项奖励
回复

1,438 次查看
qwerqq
Contributor I

Please check as soon as possible, thank you very much

0 项奖励
回复

1,422 次查看
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 项奖励
回复

1,417 次查看
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 项奖励
回复

1,376 次查看
Zhiming_Liu
NXP TechSupport
NXP TechSupport

You can try to add:

spi1=&ecspi2;

0 项奖励
回复

1,366 次查看
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 项奖励
回复

1,364 次查看
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 项奖励
回复

1,359 次查看
qwerqq
Contributor I

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

0 项奖励
回复

1,441 次查看
qwerqq
Contributor I

This is my kernel deconfig

0 项奖励
回复