This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

AM5728: QSPI flash for U-Boot

Part Number: AM5728

I have a custom AM5728 board that I am trying to boot off of a QSPI flash.  I just want U-Boot to reside on QSPI flash.  The Linux kernel, DTB and root file system will stay on microSD.

I am using U-Boot v2018.01 and patching mux_data.h with data generated from TI's PinMux Tool.  CONFIG_TI_QSPI is enabled in u-boot.cfg.   I hoped that would be enough to detect the flash but when I "sf probe" from U-Boot I get nothing except "(err=-19)".  The QSPI flash is a Micron MT25QL256ABA.

Is there a particular DTB U-Boot needs to detect the QSPI flash or do I need to modify the DTS and build one?  What should that DTS (&qspi node) look like?

Cheers,
Frank

  • You need to update the pinmux the dtb file found in <u-boot>/arch/arm/dts/

    Do you know which dtb file being used in u-boot? You can hardcode the dts in u-boot by setting the environment variable "fdtfile"
  • I will give that a go when I have some time.  I was able to get Linux to probe the QSPI flash and format it so at leat the hardware appears to be working.  We'll see what happens with U-Boot.  Thank you, Marcus.

    -Frank

  • Hi Marcus,

    U-Boot appears to be using am57xx-beagle-x15.dtb.  I patched am57xx-beagle-x15.dts as follows and rebuilt U-Boot.

    &dra7_pmx_core {
            qspi1_pins_default: qspi1_pins_default {
                    pinctrl-single,pins = <
                            DRA7XX_CORE_IOPAD(0x4a003474, 0x50101)  /* qspi1_rtclk */
                            DRA7XX_CORE_IOPAD(0x4a003488, 0x10101)  /* qspi1_sclk */
                            DRA7XX_CORE_IOPAD(0x4a003480, 0x50101)  /* qspi1_d0 */
                            DRA7XX_CORE_IOPAD(0x4a003484, 0x50101)  /* qspi1_d1 */
                            DRA7XX_CORE_IOPAD(0x4a00347c, 0x50101)  /* qspi1_d2 */
                            DRA7XX_CORE_IOPAD(0x4a003478, 0x50101)  /* qspi1_d3 */
                            DRA7XX_CORE_IOPAD(0x4a0034b8, 0x20101)  /* qspi1_cs0 */
                    >;
            };
    };
    
    /* MT25QL256 QSPI flash */
    &qspi {
            status = "okay";
            spi-max-frequency = <48000000>;
    
            pinctrl-names = "default";
            pinctrl-0 = <&qspi1_pins_default>;
    
            flash: flash@0 {
                    spi-max-frequency = <48000000>;
                    reg = <0>;
                    compatible = "n25q256a", "jedec,spi-nor";
            };
    };

    Now I get a different error when I probe the flash from U-Boot so this seems like progress.

    => sf probe
    SF: unrecognized JEDEC id bytes: ff, ff, ff
    Failed to initialize SPI flash at 0:0 (error -2)

    Any ideas?  Perhaps bad mux_data.h values?

    Cheers,
    Frank

  • Frank,

    Did you get a chance to dig into your pin mux? Are you past this issue?

    Appendix: Similar issue was fixed here. Please, also check this thread.

    Thanks.