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: 
Highlighted
Adventurer
Adventurer
2,791 Views
Registered: ‎09-27-2011

Missing mtd devices in Zinq

Jump to solution

Hello.  I am using PetaLinuz on Zynq on a MicroZed and I am missing the mtd devices in the dev folder for accessing the QSPI flash.  I am assuming this has to do with the device tree not flushed out correctly.  I have read though quite a few posts about adjusting the compatibility setting, but either I am confused or they don't exactly match my situation.

The entry in the auto generated system-conf.dtsi looks like this:

&qspi {
    #address-cells = <1>;
    #size-cells = <0>;
    flash0: flash@0 {
        compatible = "micron,n25q128";
        reg = <0x0>;
        #address-cells = <1>;
        #size-cells = <1>;
        spi-max-frequency = <50000000>;
        partition@0x00000000 {
            label = "boot";
            reg = <0x00000000 0x00500000>;
        };
        partition@0x00500000 {
            label = "bootenv";
            reg = <0x00500000 0x00020000>;
        };
        partition@0x00520000 {
            label = "kernel";
            reg = <0x00520000 0x00a80000>;
        };
        partition@0x00fa0000 {
            label = "spare";
            reg = <0x00fa0000 0x00000000>;
        };
    };
};

I did see that the device tree in the Xilinx wiki had more information in the root qspi node, so I added the following to my system-top.dst file which gets included.

&qspi {
      compatible = "xlnx,zynq-qspi-1.0";
      clock-names = "ref_clk", "pclk";
      clocks = <&clkc 10>, <&clkc 43>;
      /*interrupt-parent = <&ps7_scugic_0>;*/
      interrupt-parent = <&intc>;
      interrupts = <0 19 4>;
      is-dual = <0>;
      num-cs = <1>;
      reg = <0xe000d000 0x1000>;
      xlnx,fb-clk = <0x1>;
      xlnx,qspi-mode = <0x0>;
};

I commented out the ps7_scugic_0 node as it wasn't recognized and put in the intc which grepping in the source directory seems to have the same register locations as a random definition for ps7_scugic_0 which I found online so I was hoping was the same thing.  I compiled it all and ran it, but had no dice.  The mtd devices do not show up and there are no symbolic links from the /dev/flash folder either.  Thank you for help.

0 Kudos
1 Solution

Accepted Solutions
Adventurer
Adventurer
4,828 Views
Registered: ‎09-27-2011

Re: Missing mtd devices in Zinq

Jump to solution

Decided to go ahead and upgrade to PetaLinux 2017.1 and now it is working. I can see mtd devices.

Along the way I also realized it wasn't booting from the SD card like I thought it was because U-boot was snagging saved environmental vars from the SPI flash and thus booting the Linux Image from there.  So... who knows I might have figured it out and not known it.

0 Kudos
1 Reply
Adventurer
Adventurer
4,829 Views
Registered: ‎09-27-2011

Re: Missing mtd devices in Zinq

Jump to solution

Decided to go ahead and upgrade to PetaLinux 2017.1 and now it is working. I can see mtd devices.

Along the way I also realized it wasn't booting from the SD card like I thought it was because U-boot was snagging saved environmental vars from the SPI flash and thus booting the Linux Image from there.  So... who knows I might have figured it out and not known it.

0 Kudos