UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
Participant damon
Participant
313 Views
Registered: ‎01-01-2019

qspi flash problem in u-boot

Jump to solution

Hi,

I am trying to use sf command to load kernel image from qspi flash to memory.

But when I enter sf probe 0 0 0 , I get the following error:

ZynqMP> sf probe 0 0 0
Invalid bus 0 (err=-19)
Failed to initialize SPI flash at 0:0 (error -19)

I tried to find the root cause of the problem, it seems that zynqmp_qspi_probe (zynqmp_qspi.c) is not executed.

The content of device tree about qspi as follows:

spi@ff0f0000 {
	u-boot,dm-pre-reloc;
	compatible = "xlnx,zynqmp-qspi-1.0";
	status = "okay";
	clock-names = "ref_clk", "pclk";
	interrupts = <0x0 0xf 0x4>;
	interrupt-parent = <0x4>;
	num-cs = <0x1>;
	reg = <0x0 0xff0f0000 0x0 0x1000 0x0 0xc0000000 0x0 0x8000000>;
	#address-cells = <0x1>;
	#size-cells = <0x0>;
	#stream-id-cells = <0x1>;
	iommus = <0xe 0x873>;
	power-domains = <0x1d>;
	clocks = <0x3 0x35 0x3 0x1f>;
	is-dual = <0x0>;
	spi-rx-bus-width = <0x1>;
	spi-tx-bus-width = <0x1>;
};

Does any one have any idea to fix this?

Thanks.

0 Kudos
1 Solution

Accepted Solutions
Highlighted
Xilinx Employee
Xilinx Employee
252 Views
Registered: ‎10-12-2018

Re: qspi flash problem in u-boot

Jump to solution

Hi @damon ,

Good to hear that it works!

The spi flash might be defined as spi2 in your device tree alias section and hence it should be probed with 2 as device as shown below.

sf probe 2:0 0 0

sf probe [[bus:]cs] [hz] [mode] - init flash device on given SPI bus and chip select

Thanks & Regards

Anil B

--------------------------
Don't forget to reply, kudo, and accept as solution.

Thanks & Regards
Anil B
-------------------------------------------------------------------------
Don’t forget to reply, kudo, and accept as solution.
-------------------------------------------------------------------------
4 Replies
Xilinx Employee
Xilinx Employee
288 Views
Registered: ‎10-12-2018

Re: qspi flash problem in u-boot

Jump to solution

Hi @damon ,

Please check this AR, if you haven't referred already. Hope, it helps you.

https://www.xilinx.com/support/answers/71863.html

Thanks & Regards

Anil B

Thanks & Regards
Anil B
-------------------------------------------------------------------------
Don’t forget to reply, kudo, and accept as solution.
-------------------------------------------------------------------------
Participant damon
Participant
260 Views
Registered: ‎01-01-2019

Re: qspi flash problem in u-boot

Jump to solution

Hi @abommera,

I change sf probe 0 0 0 to sf probe 2:0 0 0, and it works.

I am curious why my first parameter is 2:0 instead of 0?

Thanks.

0 Kudos
Highlighted
Xilinx Employee
Xilinx Employee
253 Views
Registered: ‎10-12-2018

Re: qspi flash problem in u-boot

Jump to solution

Hi @damon ,

Good to hear that it works!

The spi flash might be defined as spi2 in your device tree alias section and hence it should be probed with 2 as device as shown below.

sf probe 2:0 0 0

sf probe [[bus:]cs] [hz] [mode] - init flash device on given SPI bus and chip select

Thanks & Regards

Anil B

--------------------------
Don't forget to reply, kudo, and accept as solution.

Thanks & Regards
Anil B
-------------------------------------------------------------------------
Don’t forget to reply, kudo, and accept as solution.
-------------------------------------------------------------------------
Participant damon
Participant
243 Views
Registered: ‎01-01-2019

Re: qspi flash problem in u-boot

Jump to solution
Thank you, very useful!
0 Kudos