cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Highlighted
Adventurer
Adventurer
2,489 Views
Registered: ‎09-30-2014

QSPI (dual quad) under Petalinux 2018.3 not detecting

Jump to solution

I am trying to get a parallel dual QSPI configuration to be detected by Petalinux.  It is failing during the boot process.  If I stop at U-Boot, I can do a "sf probe 0" and get the following response:

"SF: Detected n25q256a with page size 512 Bytes, erase size 128 KiB, total 64 MiB"

I have successfully programmed and booted from the QSPI using the SDK with FSBL to program the flash.

In my device tree, I have the following entry (in system-user.dtsi):

&qspi {
 #address-cells = <1>;
 #size-cells = <0>;   num-cs = <1>;
  is-dual = <1>;
  status = "okay";
flash0: flash@0 {
  compatible = "jedec,spi-nor";
  spi-tx-bus-width=<4>;
  spi-rx-bus-width=<4>;
  reg = <0x0>;
  #address-cells = <1>;
  #size-cells = <1>;
  spi-max-frequency = <25000000>;
 };
};

 

However, when Petalinux boots, the MTD and spi probe fail with the following from the boot log:

[    2.159176] mtdoops: mtd device (mtddev=name/number) must be supplied
[    2.164231] m25p80 spi0.0: unrecognized JEDEC id bytes: 00, 00, 00
[    2.165767] PLL: shutdown
[    2.165785] zynqmp_pll_disable() clock disable failed for apll_int, ret = -13
[    2.179147] m25p80: probe of spi0.0 failed with error -2

 

Any help on where to focus my efforts to resolve this would be appreciated.  Suggestions?

0 Kudos
1 Solution

Accepted Solutions
Highlighted
Adventurer
Adventurer
2,382 Views
Registered: ‎09-30-2014

Turns out that it was the drive strength and pull-up status associated with the MIO pins driving QSPI. 

View solution in original post

0 Kudos
9 Replies
Highlighted
Moderator
Moderator
2,457 Views
Registered: ‎12-04-2016

Hi

Can you try changing compatible sring to compatible = "n25q512a", "micron, m25p80"

Also add the following in qspi flash node for DTS

spi-max-frequency = <50000000>;

0 Kudos
Highlighted
Adventurer
Adventurer
2,447 Views
Registered: ‎09-30-2014

The problem is that I still get the following when the Linux kernel boots:

[    2.170163] m25p80 spi0.0: unrecognized JEDEC id bytes: 00, 00, 00

 

Dump from "fdt" in u-boot:

spi@ff0f0000 {
                        u-boot,dm-pre-reloc;
                        compatible = "xlnx,zynqmp-qspi-1.0";
                        status = "okay";
                        clock-names = "ref_clk", "pclk";
                        interrupts = <0x00000000 0x0000000f 0x00000004>;
                        interrupt-parent = <0x00000004>;
                        num-cs = <0x00000001>;
                        reg = <0x00000000 0xff0f0000 0x00000000 0x00001000 0x00000000 0xc0000000 0x00000000 0x08000000>;
                        #address-cells = <0x00000001>;
                        #size-cells = <0x00000000>;
                        #stream-id-cells = <0x00000001>;
                        iommus = <0x00000009 0x00000873>;
                        power-domains = <0x0000001a>;
                        clocks = <0x00000003 0x00000035 0x00000003 0x0000001f>;
                        is-dual = <0x00000001>;
                        spi-rx-bus-width = <0x00000004>;
                        spi-tx-bus-width = <0x00000004>;
                        flash@0 {
                                compatible = "n25q512a", "micron,m25p80";
                                spi-tx-bus-width = <0x00000001>;
                                spi-rx-bus-width = <0x00000004>;
                                reg = <0x00000000>;
                                #address-cells = <0x00000001>;
                                #size-cells = <0x00000001>;
                                spi-max-frequency = <0x02faf080>;
                                partition@0x00000000 {
                                        label = "boot";
                                        reg = <0x00000000 0x006e0000>;
                                };
                                partition@0x006e0000 {
                                        label = "bootenv";
                                        reg = <0x006e0000 0x00020000>;
                                };
                                partition@0x00700000 {
                                        label = "kernel";
                                        reg = <0x00700000 0x01000000>;
                                };
                        };
                };

 

Any additional ideas?

 

0 Kudos
Highlighted
Adventurer
Adventurer
2,438 Views
Registered: ‎09-30-2014

A little more on the hardware behavior.

When I do an "sf probe 0" in u-boot, I see the QPSI clock run first for 8 cycles on the lower device only (assume a read is occuring) and then 64 cycles (again on the lower device only).  It is followed about 3 bursts of 8 clock cycles on both devices.  The clock at this stage is running at 12.5 MHz.

When Linux boots, there is a burst of 8 clock cycles on the lower device only.  It is then followed by a burst of 48 clock cycles on the lower device only.  The upper device is never probed.  The clock during the Linux probing is running at 12.5 MHz.

Still scratching my head.  Any ideas?

0 Kudos
Highlighted
Adventurer
Adventurer
2,383 Views
Registered: ‎09-30-2014

Turns out that it was the drive strength and pull-up status associated with the MIO pins driving QSPI. 

View solution in original post

0 Kudos
Highlighted
Observer
Observer
1,728 Views
Registered: ‎01-30-2018
Hi, I have the same problem。my QSPI Flash is s25fl512s. If I stop at U-Boot, I can do a "sf probe 0" and get the following response: "SF: Detected s25fl512s_256k with page size 512 Bytes, erase size 256 KiB, total 64 MiB" However, when Petalinux boots, the MTD and spi probe fail with the following from the boot log: [ 2.159176] mtdoops: mtd device (mtddev=name/number) must be supplied [ 2.164231]m25p80 spi0.0: unrecognized JEDEC id bytes: 00, 81, 10 (01 02 20 is right). You say "Turns out that it was the drive strength and pull-up status associated with the MIO pins driving QSPI. ", Can you say more in detail, specifically those pins. Why in u-boot is ok, but in kernel is wrong?
0 Kudos
Highlighted
Observer
Observer
1,644 Views
Registered: ‎01-30-2018

Hi@bfrazier_arete,@bigbrett, @gdg and all!

I am trying to get a parallel dual QSPI configuration to be detected by Petalinux.  It is failing during the boot process.  If I stop at U-Boot, I can do a "sf probe 0" and get the following response:

 

"SF: Detected s25fl512s_256k with page size 512 Bytes, erase size 256 KiB, total 64 MiB"

 

I have successfully programmed and booted from the QSPI using the SDK with FSBL to program the flash.

However, when Petalinux boots, the MTD and spi probe fail with the following from the boot log:

[    2.159176] mtdoops: mtd device (mtddev=name/number) must be supplied

[    2.164231]m25p80 spi0.0: unrecognized JEDEC id bytes: 00, 81, 101.png

 

 

 

 

1.png

The JEDEC id is error, Any help on where to focus my efforts to resolve this would be appreciated.  Suggestions?

 

The following is the qspi configuration project in my vivado:

1.png

The following device tree information is directly parsed by petalinux tool.

pcw.dtsi:

&qspi {

        is-dual = <0>;

        num-cs = <1>;

        spi-rx-bus-width = <4>;

        spi-tx-bus-width = <4>;

        status = "okay";

};

 

system-conf.dtsi:

&qspi {

        #address-cells = <1>;

        #size-cells = <0>;

        flash0: flash@0 {

                compatible = "n25q512a","micron,m25p80";

                reg = <0x0>;

                #address-cells = <1>;

                #size-cells = <1>;

                spi-max-frequency = <108000000>;

                partition@0x00000000 {

                        label = "boot";

                        reg = <0x00000000 0x01500000>;

                };

                partition@0x01500000 {

                        label = "bootenv";

                        reg = <0x01500000 0x00040000>;

                };

                partition@0x01540000 {

                        label = "kernel";

                        reg = <0x01540000 0x02800000>;

                };

                partition@0x03d40000 {

                        label = "user";

                        reg = <0x03d40000 0x00100000>;

                };

        };

};

 

I tried to change the device tree information like this, but it still doesn't work.

system-user.dtsi

&qspi {

        #address-cells = <1>;

        #size-cells = <0>;

        flash0: flash@0 {

                compatible = "s25fl512s","micron,m25p80";

                reg = <0x0>;

                spi-tx-bus-width=<1>;

                spi-rx-bus-width=<4>;

                #address-cells = <1>;

                #size-cells = <1>;

                spi-max-frequency = <108000000>;

                partition@0x00000000 {

                        label = "boot";

                        reg = <0x00000000 0x01500000>;

                };

                partition@0x01500000 {

                        label = "bootenv";

                        reg = <0x01500000 0x00040000>;

                };

                partition@0x01540000 {

                        label = "kernel";

                        reg = <0x01540000 0x02800000>;

                };

                partition@0x03d40000 {

                        label = "user";

                        reg = <0x03d40000 0x00100000>;

                };

        };

};

xilinux tool version:

vivado2018.3

petalinux2018.3

 

Can you say more in detail, specifically those pins. Why in u-boot is ok, but in kernel is wrong? thank you!

0 Kudos
Highlighted
Visitor
Visitor
394 Views
Registered: ‎02-26-2018

Hi , 

We faced the same problem, if it's possible could you please describe in more details how you have solved this problem ? Attached our Vivado QSPI pin configuration and part of QSPI schematic in dual parallel configuration.

Thanks in advance

 

 

image001.png
Screenshot from 2020-10-15 12-03-35.png
0 Kudos
Highlighted
Participant
Participant
147 Views
Registered: ‎09-07-2020
morning ,did I need to fix the mtd driver? can you give me some clue thank you
0 Kudos