Sorry, you need to enable JavaScript to visit this website.

Unable to read MTD from PicoZed linux

Solved
3 posts / 0 new
jhemsing's picture
jhemsing
Junior(1)
Unable to read MTD from PicoZed linux

Hello,

I have a Picozed 7020 on FMC carrier, and am unable to find any mtd devices in /proc/mtd when booting petalinux or custom linux.

I can, however, see mtd devices when booting from the kernel that is already on the qspi flash.

In my custom project in Vivado 2014.2, QSPI is enabled in the processing system IP and is set to use single 4 bit SS on MIO pins 1-6, and the feedback clock is enabled (on pin 8 I believe). The project was created using the Picozed + FMC board definition files.

Is it possible the QSPI core is not located at 0xe000d000? What am I missing?

Here is the DTS file I'm using for petalinux:

zynq-7000.dtsi:

qspi: spi@e000d000 {
clock-names = "ref_clk", "pclk";
clocks = <&clkc 10>, <&clkc 43>;
compatible = "xlnx,zynq-qspi-1.0";
status = "disabled";
interrupt-parent = <&intc>;
interrupts = <0 19 4>;
reg = <0xe000d000 0x1000>;
#address-cells = <1>;
#size-cells = <0>;
};

excerpt from system-top.dts:

&qspi {
#address-cells = <1>;
#size-cells = <0>;
flash0: flash@0 {
compatible = "micron,n25q128";
reg = <0x0>;
// spi-tx-bus-width = <1>;
// spi-rx-bus-width = <4>;
spi-max-frequency = <50000000>;
#address-cells = <1>;
#size-cells = <1>;
partition@qspi-fsbl-uboot {
label = "qspi-fsbl-uboot";
reg = <0x0 0x100000>;
};
partition@qspi-linux {
label = "qspi-linux";
reg = <0x100000 0x500000>;
};
partition@qspi-device-tree {
label = "qspi-device-tree";
reg = <0x600000 0x20000>;
};
partition@qspi-rootfs {
label = "qspi-rootfs";
reg = <0x620000 0x5E0000>;
};
partition@qspi-bitstream {
label = "qspi-bitstream";
reg = <0xC00000 0x400000>;
};
};
};

zedhed's picture
zedhed
Moderator(25)
RE: Unable to read MTD from PicoZed linux

Hi jhemsing,

We discovered the same thing and are working with Xilinx on resolving this.

So far, adding the correct flash device entry to the DTS seems to fix everything.

------------------------------------

The 2014.4 QEMU has changed the qspi flashs ids list, it is more correct than 2014.2, You will need to add the correct flash ID to the system_top.dts.

Please add this to the system-top.dts.

&qspi {
flash0: flash@0 {
compatible = "micron,n25q128a13";
};
};

Build and boot and QEMU and you should be able to see the partitions.

------------------------------------

I think the key part here was the "n25q128a13" string which more specifically matches the flash device on these boards.

Can you give that a try and see if the MTD partitions appear for you?

Regards,

-Kevin

jhemsing's picture
jhemsing
Junior(1)
Kevin,

Kevin,

It worked! The difference was just the "a13" as you suggested. Thanks you very much!