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.

Linux/TDA2EXEVM: qspi boot (dual mode)

Part Number: TDA2EXEVM

Tool/software: Linux

Hi All,

We are using kernel 4.4 with vision sdk 2.12.

we are try to boot from qspi. so for flash to qspi device (/dev/mtd).

We enabled all necessary option in kernel menuconfig. and dts file for partition

But /dev/mtd node doesnot created?

Note: spi nor flash(mt25ql02gc)

Regards,

RAJ M 

  • Hi Raj,

    can you run the command:

    modprobe spi-ti-qspi

    and see if /dev/mtd gets created. Also can you check this wiki and see if you can find something that can help you:
    processors.wiki.ti.com/.../Linux_Core_QSPI_User's_Guide

    Regards,
    Yordan
  • Hi Yordan,

    I enabled SPI_TI_QSPI=y as built in kernel.

    My device tree configuration.

    &qspi {
    status = "okay";
    m25p80@0 {
    compatible = "mt25ql02gc", "jedec,spi-nor";
    spi-max-frequency = <76800000>;
    reg = <0>;
    spi-tx-bus-width = <1>;
    spi-rx-bus-width = <2>;
    #address-cells = <1>;
    #size-cells = <1>;

    partition@0 {
    label = "QSPI.SPL";
    reg = <0x00000000 0x000040000>;
    };
    partition@1 {
    label = "QSPI.u-boot";
    reg = <0x00040000 0x00100000>;
    };
    partition@2 {
    label = "QSPI.u-boot-spl-os";
    reg = <0x00140000 0x00080000>;
    };
    partition@3 {
    label = "QSPI.u-boot-env";
    reg = <0x001c0000 0x00010000>;
    };
    partition@4 {
    label = "QSPI.u-boot-env.backup1";
    reg = <0x001d0000 0x0010000>;
    };
    partition@5 {
    label = "QSPI.kernel";
    reg = <0x001e0000 0x0800000>;
    };
    partition@6 {
    label = "QSPI.file-system";
    reg = <0x009e0000 0x01620000>;
    };
    };

    Regards,
    RAJ M
  • Hi Raj,

    I have pinged a QSPI expert to comment.

    Regards,
    Yordan
  • Raj

    What is the error you observe on kernel logs. The function mtd_device_parse_register() (from drivers/mtd/mtdcore.c) parse the mtd partitions and add the mtd-device partitions. Can you debug here.

    Regards

    Ravi

  • Hi Ravi,

    Thanks for your reply.

    After the correct device tree binding, Now mtd parse the partition. I can able to flash the MLO and u-boot.img on first two partition.

    When boot from QSPI(SW2[5:0] = 110110)

    U-Boot SPL 2016.05 (Nov 28 2017 - 17:44:59)
    DRA722-GP ES2.0
    Trying to boot from SPI
    ti_spi_set_speed: hz: 76800000, clock divider 75
    spi_claim_bus: bus:0 cs:0
    spi_xfer: bus:0 cs:0 bitlen:8 flags:1
    tx cmd 003a0fff dc 00000000
    tx done, status 00010002
    spi_xfer: bus:0 cs:0 bitlen:40 flags:2
    rx cmd 00390fff dc 00000000
    rx done, status 00020002, read 20
    rx cmd 00390fff dc 00000000
    rx done, status 00030002, read ba
    rx cmd 00390fff dc 00000000
    rx done, status 00040002, read 22
    rx cmd 00390fff dc 00000000
    rx done, status 00050002, read 10
    rx cmd 00390fff dc 00000000
    rx done, status 00060002, read 44
    SF: Got idcodes
    00000000: 20 ba 22 10 44 .".D
    spi_claim_bus: bus:0 cs:0
    spi_xfer: bus:0 cs:0 bitlen:8 flags:1
    tx cmd 003a0ff00000
    tx done, status 00010002
    spi_xfer: bus:0 cs:0 bitlen:8 flags:2
    rx cmd 00390fff dc 00000000
    rx done, status 00020002, read 00
    spi_release_bus: bus:0 cs:0
    spi_release_bus: bus:0 cs:0
    Unsupported OS image.. Jumping nevertheless..
    loaded - jumping to U-Boot...image entry point: 0x0
    boot-common.c:image size :0x0
    image load_addr:0x0

    Its stop on here.???

    I flash to qspi using below command.

    flash_erase -N /dev/mtd0 0 4
    flash_erase -N /dev/mtd1 0 16

    mtd_debug write /dev/mtd0 0 81724 MLO
    mtd_debug write /dev/mtd1 0 573116 u-boot.img

    Regards,
    RAJ M
  • Raj

    Ok, now you are able to flash QSPI using mtd-utils.

    For QSPI boot, have you loaded the uImage and modified dtb files at appropriate QSPI section. refer to User's Guide processors.wiki.ti.com/.../Processor_SDK_Linux_Automotive_Software_Developers_Guide

    Regards

    Ravi