5 Replies Latest reply on Nov 9, 2018 6:52 AM by totowkaee

    About U-Boot for picozed

    gomo

      Hi  all,

             I have a DVSK board(Picozed, QSPI+eMMC ). And download u-boot-xlnx-xilinux-v2015.4, using different config to build uboot, It's get different result.

             1)make zynq_picozed_defconfig to build uboot, and create boot image, download to QSPI flash. The uboot can recognize the eMMC flash and cannot using sf command.  The detail info:

             U-Boot 2015.07 (Jun 20 2016 - 13:55:28 +0800)

       
      Model: Zynq PicoZed Board
      DRAM:  ECC disabled 1 GiB
      MMC:   zynq_sdhci: 0
      Using default environment
       
      In:    serial
      Out:   serial
      Err:   serial
      Model: Zynq PicoZed Board
      Net:   Gem.e000b000
      Hit any key to stop autoboot:  0
      Copying Linux from QSPI flash to RAM...
      Unknown command 'sf' - try 'help'
      zynq-uboot> mmcinfo
      Device: zynq_sdhci
      Manufacturer ID: fe
      OEM: 14e
      Name: MMC04
      Tran Speed: 52000000
      Rd Block Len: 512
      MMC version 4.4.1
      High Capacity: Yes
      Capacity: 3.5 GiB
      Bus Width: 4-bit
      Erase Group Size: 512 KiB
      HC WP Group Size: 4 MiB
      User Capacity: 3.5 GiB
      Boot Capacity: 16 MiB ENH
      RPMB Capacity: 128 KiB ENH
      zynq-uboot>              

             2)make zynq_zed_defconfig to build uboot, The uboot can recognize the SPI flash and cannot using mmcinfo command.  The detail info:

      U-Boot 2015.07 (Jun 20 2016 - 13:53:03 +0800)
       
      Model: Zynq Zed Development Board
      DRAM:  ECC disabled 512 MiB
      MMC:   zynq_sdhci: 0
      SF: Detected S25FL128S_64K with page size 256 Bytes, erase size 64 KiB, total 16 MiB
      *** Warning - bad CRC, using default environment
       
      In:    serial
      Out:   serial
      Err:   serial
      Model: Zynq Zed Development Board
      Net:   Gem.e000b000
      Hit any key to stop autoboot:  0
      Copying Linux from QSPI flash to RAM...
      SF: Detected S25FL128S_64K with page size 256 Bytes, erase size 64 KiB, total 16 MiB
      device 0 offset 0x100000, size 0x500000
      SF: 5242880 bytes @ 0x100000 Read: OK
      device 0 offset 0x600000, size 0x20000
      SF: 131072 bytes @ 0x600000 Read: OK
      Copying ramdisk...
      device 0 offset 0x620000, size 0x5e0000
      SF: 6160384 bytes @ 0x620000 Read: OK
      Wrong Image Format for bootm command
      ERROR: can't get kernel image!
      zynq-uboot> mmcinfo
      sdhci_set_clock: Internal clock never stabilised.
       
      And I want to know  how to config to recognize the QSPI and eMMC in uboot?  
       
       Thanks a lot.
        • RE: About U-Boot for picozed
          zedhed

          Hi gomo,

          If you look under the hood for PetaLinux, when SPI+eMMC boot mode is set within the project configuration the following config options are set:

          #define CONFIG_ZYNQ_SDHCI1t0xE0101000
          #define CONFIG_ZYNQ_QSPI

          Also, the following configuration options become removed:

          #define CONFIG_ZYNQ_SDHCI0t0xE0100000

          You will also need to setup appropriate U-Boot ENV macros to boot from QSPI+eMMC but the details of those can vary based upon how your Linux is being configured.  PetaLinux is a good example of how to do some of these different boot options because you can change things within the config menu and then go back and see which pieces of source code were modified to accommodate the changes.

          Regards,

          -Kevin

          • Any solution ?
            tpierret

            Hi,

            Did you manage to solve this trouble ?

            I'm quite in the same situation (all but xilinx-v2015.3 version of U-boot). I compared with the U-boot version in PetaLinux 2015.04 but without success.

            The only error that appears at boot time is

               SF: Detected S25FL128S_64K with page size 256 Bytes, erase size 64 KiB, total 16 MiB
               *** Warning - bad CRC, using default environment

            As soon as I enter "mmcinfo" command (did not try another), U-boot stops/hangs with the following message (when it appears) :

               my-zynq> mmcinfo
               sdhci_set_clock: Internal clock never stabilised.

            Something is not correctly set but I cannot find what ? Any help would be appreciated.

            Many thank in advance.

              • Still not solved !
                tpierret

                Hi,

                I came to the Xilinx-v2016.2 version of U-boot and the situation evolved a bit, but some troubles remain :

                1. the QSPI flash is still not detected. When U-boot starts, the following error message still appears :

                Invalid bus 0 (err=-19)
                *** Warning - spi_flash_probe() failed, using default environment

                Any attempt to access the QSPI flash (sf probe) failed with the same error message.

                Here is the QSPI description in the device tree :

                                qspi: spi@e000d000 {
                                        clock-names = "ref_clk", "pclk";
                                        clocks = <&clkc 10>, <&clkc 43>;
                                        compatible = "xlnx,zynq-qspi-1.0";
                                        interrupt-parent = <&intc>;
                                        interrupts = <0 19 4>;
                                        reg = <0xe000d000 0x1000>;
                                        #address-cells = <1>;
                                        #size-cells = <0>;
                                        is-dual = <0x0>;
                                        num-cs = <0x1>;
                                        xlnx,fb-clk = <0x0>;
                                        xlnx,qspi-mode = <0x0>;
                
                                        flash@0 {
                                                compatible = "micron,s25fl129p1";
                                                reg = <0x0>;
                                                #address-cells = <0x1>;
                                                #size-cells = <0x1>;
                                                spi-max-frequency = <50000000>;
                
                                                partition@0x00000000 {
                                                        label = "boot";
                                                        reg = <0x0 0x500000>;
                                                };
                
                                                partition@0x00500000 {
                                                        label = "bootenv";
                                                        reg = <0x500000 0x20000>;
                                                };
                
                                                partition@0x00520000 {
                                                        label = "kernel";
                                                        reg = <0x520000 0xa80000>;
                                                };
                
                                                partition@0x00fa0000 {
                                                        label = "spare";
                                                        reg = <0xfa0000 0x0>;
                                                };
                                        };
                                };
                

                What's wrong ?

                2.  The eMMC is now viewed :

                Zynq> mmcinfo
                Device: sdhci@e0101000
                Manufacturer ID: fe
                OEM: 14e
                Name: MMC04
                Tran Speed: 52000000
                Rd Block Len: 512
                MMC version 4.4.1
                High Capacity: Yes
                Capacity: 3.5 GiB
                Bus Width: 4-bit
                Erase Group Size: 512 KiB
                HC WP Group Size: 4 MiB
                User Capacity: 3.5 GiB
                Boot Capacity: 16 MiB ENH
                RPMB Capacity: 128 KiB ENH

                But for unknown reason, I cannot read the partition table :

                Zynq> mmc dev 0
                switch to partitions #0, OK
                mmc0(part 0) is current device
                Zynq> mmc part
                ## Unknown partition table

                What could be wrong again ?

                 

                Any help about those points would be appreciated. Thanks in advance.

              • Hi,
                wangy

                Hi,

                Did you manage to solve this trouble ?  I am in the same situation with picozed.

                   Copying Linux from QSPI flash to RAM...

                    Unknown command 'sf' - try 'help'
                • Unknown command 'sf' in u-Boot
                  totowkaee

                  Hi,

                  i had same problem and here is how i fixed it:

                  in <your_board>_defconfig file add

                  CONFIG_CMD_SF=y

                  CONFIG_ZYNQ_QSPI=y

                  and i also added the followong lines, but i am not sure if we really need all of them:

                  CONFIG_SPI_FLASH=y

                  CONFIG_SPI_FLASH_BAR=y

                  CONFIG_SPI_FLASH_MACRONIX=y

                  CONFIG_SPI_FLASH_SPANSION=y

                  CONFIG_SPI_FLASH_STMICRO=y

                  CONFIG_SPI_FLASH_WINBOND=y

                  Hopefully this will work for others...