cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
840 Views
Registered: ‎05-07-2019

Is there an AXI Quad SPI IP driver in u-boot?

Hi,

I'm looking at using the AXI Quad SPI IP with multiple chip selects. I'm a bit new to this sort of stuff, so forgive me if this is a stupid question but, assuming I get to the point I can access the attached devices in Linux (hopefully soon) , should I also be able to access them in u-boot in a similar way to the PS QSPI stuff, using sf probe etc?

https://xilinx-wiki.atlassian.net/wiki/spaces/A/pages/18842223/U-boot seems to suggest I should be able to, as it mentions AXI spi/QSPI at the "Supported Soft IP Drivers" section, but the link in that table takes me to a page that says it's restricted and I get an error.

Any help gratefully appreciated. 

John

0 Kudos
3 Replies
gudishak
Moderator
Moderator
776 Views
Registered: ‎06-27-2017

Hi jmccabe@kirintec.com 

Below is the driver for Xilinx SPI in u-boot

https://github.com/Xilinx/u-boot-xlnx/blob/xilinx-v2019.1/drivers/spi/xilinx_spi.c

Make sure that spi0 alias is added to your AXI QSPI address in device tree. In general, sf probe command will probe the first QSPI device. So please give a try

Best Regards
Kranthi
--------------------------
Don't forget to reply, kudo, and accept as solution.
0 Kudos
760 Views
Registered: ‎05-07-2019

Thanks for your suggestion and link. I'm using 2018.3, but guess it hasn't changed much.

The AXI QUAD SPI device is aliased to spi1 on my hardware, as we're already using the core's built-in QSPI device. I expected sf probe 1 to deal with that, but it didn't seem happy.

0 Kudos
683 Views
Registered: ‎05-07-2019

Further to my earlier message, I'm still in need of help on this. As I mentioned, my AXI Quad SPI block is aliased to spi1. In u-boot, if I do sf probe, or sf probe 0, I get:

 

SF: Detected s25fl256s_64k with page size 256 Bytes, erase size 64 KiB, total 32 MiB

If I do sf probe 1 I get:

 

SF: Detected s25fl256s_64k with page size 256 Bytes, erase size 64 KiB, total 32 MiB

i.e. the same thing, even thought the AXI Quad SPI is connected to something completely different.

Or sf probe 1:0 I get:

Invalid bus 1 (err=-19)
Failed to initialize SPI flash at 1:0 (error -19)

As a noob to this stuff, I've not got a clue what to try next. Has anyone else used the AXI Quad SPI IP alongside the built-in Quad SPI i/f successfully in u-boot?

0 Kudos