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.

DRA76P: SPI NOR partition turning to read only

Part Number: DRA76P
Other Parts Discussed in Thread: PMP,

Hi

In the custom board our spi nor flash has been changed from 32mb to 64mb. Part no S25FL512SDSMFBG10.

WE have changed the device tree with the following:

&qspi {
status = "okay";

spi-max-frequency = <76800000>;
m25p80@0 {
compatible = "s25fl512s";  -------------------------Changed from  s25fl256s1
spi-max-frequency = <76800000>;
reg = <0>;
spi-tx-bus-width = <1>;
spi-rx-bus-width = <4>;
#address-cells = <1>;
#size-cells = <1>;

/* MTD partition table.
* The ROM checks the first four physical blocks
* for a valid file to boot and the flash here is
* 64KiB block size.
*/

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>;
};

I am getting the following logs:

m25p80 spi32766.0: s25fl512s (65536 Kbytes)
[ 1.400897] 7 ofpart partitions found on MTD device spi32766.0
[ 1.406778] Creating 7 MTD partitions on "spi32766.0":
[ 1.411941] 0x000000000000-0x000000040000 : "QSPI.SPL"
[ 1.418122] 0x000000040000-0x000000140000 : "QSPI.u-boot"
[ 1.424479] 0x000000140000-0x0000001c0000 : "QSPI.u-boot-spl-os"
[ 1.431476] 0x0000001c0000-0x0000001d0000 : "QSPI.u-boot-env"
[ 1.437270] mtd: partition "QSPI.u-boot-env" doesn't end on an erase block -- force read-only
[ 1.446744] 0x0000001d0000-0x0000001e0000 : "QSPI.u-boot-env.backup1"
[ 1.453215] mtd: partition "QSPI.u-boot-env.backup1" doesn't start on an erase block boundary -- force read-only
[ 1.464375] 0x0000001e0000-0x0000009e0000 : "QSPI.kernel"
[ 1.469821] mtd: partition "QSPI.kernel" doesn't start on an erase block boundary -- force read-only
[ 1.479923] 0x0000009e0000-0x000002000000 : "QSPI.file-system"
[ 1.485803] mtd: partition "QSPI.file-system" doesn't start on an erase block boundary -- force read-only

Can anyone tell me why the following blocks are turning read only. I am not able to write those partitions.We need to boot from SPI

I have tried disabling the config CONFIG_MTD_SPI_NOR_USE_4K_SECTORS but the result is same.

Thanks

Deepika

  • Hi Deepika,

    Seems like a generic SPI error:

    https://unix.stackexchange.com/questions/123560/while-trying-to-open-dev-mtd2-for-read-write-access-permission-denied

    Check the output of:

    cat /proc/mtd

    So some alignment needs to be taken care of w.r.t erase block size?

    Best Regards,
    Keerthy

  • Hi Keerhy,

    The read only partition issue is solved:

    [ 1.400229] 7 ofpart partitions found on MTD device spi32766.0
    [ 1.406105] Creating 7 MTD partitions on "spi32766.0":
    [ 1.411267] 0x000000000000-0x000000040000 : "QSPI.SPL"
    [ 1.417447] 0x000000040000-0x000000140000 : "QSPI.u-boot"
    [ 1.423803] 0x000000140000-0x0000001c0000 : "QSPI.u-boot-spl-os"
    [ 1.430797] 0x0000001c0000-0x0000002c0000 : "QSPI.u-boot-env"
    [ 1.437488] 0x0000002c0000-0x0000003c0000 : "QSPI.u-boot-env.backup1"
    [ 1.444894] 0x0000003c0000-0x000000bc0000 : "QSPI.kernel"
    [ 1.451226] 0x0000013c0000-0x0000029c0000 : "QSPI.file-system"
    [ 1.459049] i2c /dev entries driver

    I got the following logs even after I solved the flash partition error:

    root@dra7xx-evm:/run/media/mmcblk0p1/qspi# mtd_debug write /dev/mtd0 0x0 $(ls -l MLO | awk '{ print $5 }') MLO
    Copied 121772 bytes from MLO to address 0x00000000 in flash
    root@dra7xx-evm:/run/media/mmcblk0p1/qspi# flash_erase -N /dev/mtd2 0 8
    Erasing 256 Kibyte @ 80000 -- 25 % complete libmtd: error!: bad eraseblock number 2, mtd2 has 2 eraseblocks
    flash_erase: error!: /dev/mtd2: MTD Erase failure
    error 22 (Invalid argument)
    Erasing 256 Kibyte @ c0000 -- 37 % complete libmtd: error!: bad eraseblock number 3, mtd2 has 2 eraseblocks
    flash_erase: error!: /dev/mtd2: MTD Erase failure
    error 22 (Invalid argument)
    Erasing 256 Kibyte @ 100000 -- 50 % complete libmtd: error!: bad eraseblock number 4, mtd2 has 2 eraseblocks
    flash_erase: error!: /dev/mtd2: MTD Erase failure
    error 22 (Invalid argument)
    Erasing 256 Kibyte @ 140000 -- 62 % complete libmtd: error!: bad eraseblock number 5, mtd2 has 2 eraseblocks
    flash_erase: error!: /dev/mtd2: MTD Erase failure
    error 22 (Invalid argument)
    Erasing 256 Kibyte @ 180000 -- 75 % complete libmtd: error!: bad eraseblock number 6, mtd2 has 2 eraseblocks
    flash_erase: error!: /dev/mtd2: MTD Erase failure
    error 22 (Invalid argument)
    Erasing 256 Kibyte @ 1c0000 -- 87 % complete libmtd: error!: bad eraseblock number 7, mtd2 has 2 eraseblocks

    Keerthy why am I getting an erase failue.

    Thanks

    Deepika

  • Hi Keerthy,

    While you are looking at logs, u will find that the MLO, uImage and DTB are written. After that when I switch ON the board

    U-Boot SPL 2016.05 (Feb 18 2021 - 14:55:48)
    DRA762-GP ES1.0
    SPL: failed to boot from all boot devices
    ### ERROR ### Please RESET the board ###

    Our booting device order is highlighted.

    We are using a single stage boot.

    Thanks

    Deepika

  • Hi Keerthy,

    Any suggestions from your side?

    Thanks

    Deepika

  • Hi,

    The boot switch settings for the TDA2Px or (DRA76x) is :

    Thanks

    Gaviraju

  • Hi,

    I am talking about the custom board, not the EVM board.

    QSPI boot is not working in the custom board.

    Thanks

    Deepika

  • Hi Deepika,

    You should have seen a message like"

    "Trying to boot from SPI"

    Not sure why we do see that.

    https://e2e.ti.com/support/processors/f/791/t/931314

    Can you try that.

    - Keerthy

  • Hi Keerthy,

    We are using the single stage boot. The QSPI pins are same as the EVM. 

    Is there any pins which I need to take care as mentioned in the below link:

    https://e2e.ti.com/support/processors/f/791/t/979967

    Thanks

    Deepika

  • Hi Keerthy,

    We tried the steps mentioned by you 

    But still no success.

    It gets stuck at the SPL.

    Thanks

    Deepika

  • Deepika,

    You could read back the contents of QSPI using sf read and then just compares with booting binaries
    to rule out any issues while writing.

    Also could you try to use the QSPI_4 dip switch settings and see if that helps.

    Best Regards,
    Keerthy

  • Hi Keerthy,

    Thanks for the suggestion. Will try reading it and let you know.

    Also as this is a custom board..there are no switches as such so cannot try that.

    Thanks

    Deepika

  • Hi Keerthy,

    Sorry for delayed response.

    The issue is still there. I am able to write MLO uboot and dra76-evm-infoadas.dtb  into the SPI flash.

    But not able to erase the partition for uImage.

    U-Boot SPL 2016.05 (Mar 10 2021 - 09:27:38)
    DRA762-GP ES1.0


    U-Boot 2016.05 (Mar 10 2021 - 09:27:38 +0530)

    CPU  : DRA762-GP ES1.0
    Model: TI DRA762 EVM
    Board: DRA76x EVM REV ���^ガi�?p��DRAM:  512 MiB
    MMC:   mmc@4809c000: fail to find sdr104 mode FDT_ERR_NOTFOUND
    no pinctrl for sdr104
    mmc@4809c000: fail to find ddr50 mode FDT_ERR_NOTFOUND
    no pinctrl for ddr50
    mmc@4809c000: fail to find sdr50 mode FDT_ERR_NOTFOUND
    no pinctrl for sdr50
    mmc@4809c000: fail to find sdr25 mode FDT_ERR_NOTFOUND
    no pinctrl for sdr25
    mmc@4809c000: fail to find sdr12 mode FDT_ERR_NOTFOUND
    no pinctrl for sdr12
    OMAP SD/MMC: 0, OMAP SD/MMC: 1
    Card did not respond to voltage select!
    *** Warning - MMC init failed, using default environment

    Card did not respond to voltage select!
    ERROR: invalid mmc device

    at arch/arm/cpu/armv7/omap-common/utils.c:193/mmc_get_part_size()
    Warning: fastboot.userdata_size: unable to calc
    SCSI:  SATA link 0 timeout.
    AHCI 0001.0300 32 slots 1 ports 3 Gbps 0x1 impl SATA mode
    flags: 64bit ncq stag pm led clo only pmp pio slum part ccc apst
    scanning bus for devices...
    Found 0 device(s).
    Net:   Net Initialization Skipped
    No ethernet found.
    Hit any key to stop autoboot:  0
    =>
    =>
    => fatload mmc 0 0x82000000 qspi/MLO
    Inside vmmc_pbias_config
    reading qspi/MLO
    121068 bytes read in 9 ms (12.8 MiB/s)
    => sf probe
    SF: Detected S25FL512S_256K with page size 512 Bytes, erase size 256 KiB, total 64 MiB, mapped at 5c000000
    => sf erase 0 0x40000
    SF: 262144 bytes @ 0x0 Erased: OK
    => sf write 0x82000000 0 0x40000
    device 0 offset 0x0, size 0x40000
    SF: 262144 bytes @ 0x0 Written: OK
    => sf read 0x82000000 0 0x40000
    device 0 offset 0x0, size 0x40000
    SF: 262144 bytes @ 0x0 Read: OK
    => fatload mmc 0 0x83000000 qspi/u-boot.img
    reading qspi/u-boot.img
    814332 bytes read in 40 ms (19.4 MiB/s)
    => sf erase 40000 0x100000
    SF: 1048576 bytes @ 0x40000 Erased: OK
    => sf write 0x83000000 40000 0x100000
    device 0 offset 0x40000, size 0x100000
    SF: 1048576 bytes @ 0x40000 Written: OK
    => fatload mmc 0 0x82000000 qspi/uImage
    reading qspi/uImage
    2906456 bytes read in 132 ms (21 MiB/s)
    => sf erase 0x1e0000 0x800000
    SF: 8388608 bytes @ 0x1e0000 Erased: ERROR
    => sf write 0x82000000  0x1e0000  0x800000
    device 0 offset 0x1e0000, size 0x800000
    SF: 8388608 bytes @ 0x1e0000 Written: OK
    => sf read 0x82000000  0x1e0000  0x800000
    device 0 offset 0x1e0000, size 0x800000
    SF: 8388608 bytes @ 0x1e0000 Read: OK
    =>
    Booting from eMMC ...
    Wrong Image Format for bootm command
    ERROR: can't get kernel image!

    Its not giving me message of Booting from QSPI, it may be because uImage is not proper.

    Any Idea of the same

    Thanks

    Deepika

  • Also is it necessary that the kernel should be written only on 0x1e0000 partition?

    Thanks

    Deepika

  • Deepika,

    Yes that is necessary as the u-boot would be expecting the uImage at that offset. Since Erase is giving error
    are you able to see that contents correct when you are reading back the image contents to RAM address?

    Can you try erasing all at once from 0x0 to end? Freshly flash?

    Also "Booting from eMMC ...
    Wrong Image Format for bootm command
    ERROR: can't get kernel image!"

    Hope your bootargs are fine?

    - Keerthy

  • Hi Keerthy,

    Thanks for the reply.

    ==> are you able to see that contents correct when you are reading back the image contents to RAM address?

    I tried reading using sf read 0x82000000  0x1e0000  0x800000

    Is there any other command to read the contents?

    I will try to erase from 0x0 to the end i.e 0x162000

               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 0x0010000>;
                    };
                    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 = <0x09E0000 0x01620000>;
                    };

    Partition 3 ,4,5 6 are turning read only in kernel as you can see from my 1st post in this thread.

    My boot args are set in kernel :

    CONFIG_CMDLINE="elevator=noop console=ttyS0,115200n8 cma=64M omapdrm.num_crtc=1 consoleblank=0 snd.slots_reserved=1,1 fixrtc loglevel=0 root=/dev/mmcblk0p1 rootfstype=ext4 rw rootwait init=/home/root/init-demo.sh clk_ignore_unused quiet mem=512M"

    Thanks,

    Deepika

    Th

  • Hi Deepika,

    Here is the feedback from our QSPI expert:

    SF: Detected S25FL512S_256K with page size 512 Bytes, erase size 256 KiB, total 64 MiB, mapped at 5c000000
    Flash is 256KB sector and hence all erase cmd should be aligned to 256KB address

    All partitions need to be aligned to 256KB size too..

    bootargs need to modified accordingly.

    Best Regards,
    Keerthy

  • Hi Keerthy,

    ==>All partitions need to be aligned to 256KB size too..

    I did not understood this.

    Can you please suggest how to achieve this? All the memory length is actually divisible by 256Kb.

    Is the above bootargs wrong?

    Can you please suggest me the correct bootargs?

    Thanks,

    Deepika

  • Hi Keerthy,

    Can you please suggest how to align the partition in 256KB size. 

    All the memory lengths are already divisible by 256KB. Any thing else I am missing ?

    Thanks

    Deepika

  • Deepika,

    See this:

    => sf erase 0x1e0000 0x800000
    SF: 8388608 bytes @ 0x1e0000 Erased: ERROR

    0x1e0000 is 1,966,080 bytes which is not a multiple of 256 KB. Hence you need to make sure that starting
    addresses are multiple of 256KB as well.

    Hope i am clear.

    Best Regards,
    Keerthy

  • Hi Keerthy,

    As u told we need to start writing the uImage from 0x1e0000 as the  uboot recognizes it as the place to get uImage

    What new address should we use to write the kernel image?

    Thanks

    Deepika

  • Hi Deepika,

    Could you please try: 0x200000 (256KB * 8) for uImage.
    Erase should also work fine. Make sure erase works with the above address.

    sf read $loadaddr 0x200000 image_partition_size

    Basically the above command will copy the uImage from 0x200000 QSPI to RAM's loadaddr
    Try similar thing can be done for dtb.

    Let me know.

    Best Regards,
    Keerthy

  • Thanks Keerthy for the suggestion.

    Will try it and confirm 

    Regards,

    Deepika

  • Hi Keerthy,

    We tried the solution provided by you. Even the R/W is successful to all the partitions.The board is stuck at the SPL.

    => fatload mmc 0 0x82000000 qspi/MLO
    Inside vmmc_pbias_config
    reading qspi/MLO
    121068 bytes read in 9 ms (12.8 MiB/s)
    => sf erase 0 0x40000
    No SPI flash selected. Please run `sf probe'
    => sfprobe
    Unknown command 'sfprobe' - try 'help'
    => sf probe
    SF: Detected S25FL512S_256K with page size 512 Bytes, erase size 256 KiB, total 64 MiB, mapped at 5c000000
    => sf erase 0 0x40000
    SF: 262144 bytes @ 0x0 Erased: OK
    => sf write 0x82000000 0 0x40000
    device 0 offset 0x0, size 0x40000
    SF: 262144 bytes @ 0x0 Written: OK
    => sf read 0x82000000 0 0x40000
    device 0 offset 0x0, size 0x40000
    SF: 262144 bytes @ 0x0 Read: OK
    => fatload mmc 0 0x83000000 qspi/u-boot.img
    reading qspi/u-boot.img
    814268 bytes read in 40 ms (19.4 MiB/s)
    => sf erase 40000 0x100000
    SF: 1048576 bytes @ 0x40000 Erased: OK
    => sf write 0x83000000 40000 0x10000
    device 0 offset 0x40000, size 0x10000
    SF: 65536 bytes @ 0x40000 Written: OK
    => sf read 0x83000000 40000 0x10000
    device 0 offset 0x40000, size 0x10000
    SF: 65536 bytes @ 0x40000 Read: OK
    => fatload mmc 0 0x82000000 qspi/uImage
    reading qspi/uImage
    2906456 bytes read in 131 ms (21.2 MiB/s)
    => sf erase 0x200000 0x800000
    SF: 8388608 bytes @ 0x200000 Erased: OK
    => sf write 0x82000000 0x200000 0x800000
    device 0 offset 0x200000, size 0x800000
    SF: 8388608 bytes @ 0x200000 Written: OK
    => sf read 0x82000000 0x200000 0x800000
    device 0 offset 0x200000, size 0x800000
    SF: 8388608 bytes @ 0x200000 Read: OK
    => fatload mmc 0 0x83000000 qspi/dra76-evm-infoadas.dtb
    reading qspi/dra76-evm-infoadas.dtb
    103604 bytes read in 10 ms (9.9 MiB/s)
    => sf erase 0x140000 0x80000
    SF: 524288 bytes @ 0x140000 Erased: OK
    => sf write 0x83000000 0x140000 0x80000
    device 0 offset 0x140000, size 0x80000
    SF: 524288 bytes @ 0x140000 Written: OK
    => sf read 0x83000000 0x140000 0x80000
    device 0 offset 0x140000, size 0x80000
    SF: 524288 bytes @ 0x140000 Read: OK
    => @��
    U-Boot SPL 2016.05 (Mar 17 2021 - 10:56:54)
    DRA762-GP ES1.0
    I�

    Are we missing out on any configuration?

    Thanks,

    Deepika

  • Hi Keerthy,

    Any suggestions from your side. I am able to read/write erase all the partitions but still its not booting from QSPI.\

    Its getting stuck at the SPL.

    Thanks

    Deepika

  • => fatload mmc 0 0x82000000 qspi/MLO
    Inside vmmc_pbias_config
    reading qspi/MLO
    121068 bytes read in 9 ms (12.8 MiB/s)

    Deepika,

    Where is the corresponding sf write of 121068 Bytes to transfer MLO from RAM to QSPI?

    Best Regards,
    Keerthy

  • Hi Keerthy,

    Here I written MLO in the following lines

    => sf write 0x82000000 0 0x40000
    device 0 offset 0x0, size 0x40000

    Thanks

    Deepika

  • Hi Deepika,

    1. Read back and confirm images are flashed correctly...
    2. Check boot mode pins setting
      If above two checkout, then we need to find out where it hangs... does not seem to hit QSPI driver yet... (no "TRYING TO BOOT FROM SPI" string)

    Best Regards,
    Keerthy

  • Hi Keerthy,

    I was checking my  "/include/configs/dra7xx_evm.h

    #define CONFIG_SYS_SPI_KERNEL_OFFS     0x1E0000
    #define CONFIG_SYS_SPI_ARGS_OFFS      0x140000
    #define CONFIG_SYS_SPI_ARGS_SIZE      0x80000

    if defined(CONFIG_QSPI_BOOT)
    /* In SPL, use the environment and discard MMC support for space. */
    #ifdef CONFIG_SPL_BUILD
    #undef CONFIG_SPL_MMC_SUPPORT
    #endif
    #define CONFIG_SPL_ENV_SUPPORT
    #define CONFIG_ENV_IS_IN_SPI_FLASH
    #define CONFIG_SYS_REDUNDAND_ENVIRONMENT
    #define CONFIG_ENV_SPI_MAX_HZ CONFIG_SF_DEFAULT_SPEED
    #define CONFIG_ENV_SIZE (64 << 10)
    #define CONFIG_ENV_SECT_SIZE (64 << 10) /* 64 KB sectors */
    #define CONFIG_ENV_OFFSET 0x1C0000
    #define CONFIG_ENV_OFFSET_REDUND 0x1D0000
    #endif

    /* SPI SPL */
    #define CONFIG_SPL_SPI_SUPPORT
    #define CONFIG_SPL_DMA_SUPPORT
    #define CONFIG_TI_EDMA3
    #define CONFIG_SPL_SPI_LOAD
    #define CONFIG_SPL_SPI_FLASH_SUPPORT
    #define CONFIG_SYS_SPI_U_BOOT_OFFS 0x40000

    Do we need to write uenv.txt in the SPI flash at address 0x1c0000?

    Also according to our SPI Flash partition in the device tree do we need to change the CONFIG_SYS_SPI_KERNEL_OFFS as our kernel now starts from 0x200000

     Thanks

    Deepika

  • Hi Keerthy,

    Can you please tell me where is CONFIG_QSPI_BOOT is defined?

    As it was working in the EVM i am assuming it should be defined. But I did not see it in defined in the file include/configs/dra7xx_evm.h

    Thanks

    Deepika

  • Hi Deepika,


    uenv.txt in the SPI flash at address 0x1c0000?

    The failure you are seeing is at SPL & uenv.txt is for kernel boot.

    For CONFIG_QSPI_BOOT check: configs/dra7xx_evm_defconfig


    Best Regards,
    Keerthy

  • Hi Keerthy,

    CONFIG_QSPI_BOOT is set in the defconfig file. This is the output:

    U-Boot 2016.05 (Mar 24 2021 - 09:57:33 +0530)

    CPU : DRA762-GP ES1.0
    Model: TI DRA762 EVM
    Board: DRA76x EVM REV ���^㈼i�`��DRAM: 512 MiB
    MMC: mmc@4809c000: fail to find sdr104 mode FDT_ERR_NOTFOUND
    no pinctrl for sdr104
    mmc@4809c000: fail to find ddr50 mode FDT_ERR_NOTFOUND
    no pinctrl for ddr50
    mmc@4809c000: fail to find sdr50 mode FDT_ERR_NOTFOUND
    no pinctrl for sdr50
    mmc@4809c000: fail to find sdr25 mode FDT_ERR_NOTFOUND
    no pinctrl for sdr25
    mmc@4809c000: fail to find sdr12 mode FDT_ERR_NOTFOUND
    no pinctrl for sdr12
    OMAP SD/MMC: 0, OMAP SD/MMC: 1
    Card did not respond to voltage select!
    *** Warning - MMC init failed, using default environment

    Card did not respond to voltage select!
    ERROR: invalid mmc device

    at arch/arm/cpu/armv7/omap-common/utils.c:193/mmc_get_part_size()
    Warning: fastboot.userdata_size: unable to calc
    SCSI: SATA link 0 timeout.
    AHCI 0001.0300 32 slots 1 ports 3 Gbps 0x1 impl SATA mode
    flags: 64bit ncq stag pm led clo only pmp pio slum part ccc apst
    scanning bus for devices...
    Found 0 device(s).
    Net: Net Initialization Skipped
    No ethernet found.
    Hit any key to stop autoboot: 0
    ## Error: "board_findfdt" not defined
    Inside vmmc_pbias_config
    Card did not respond to voltage select!
    Inside vmmc_pbias_config
    Card did not respond to voltage select!
    Inside vmmc_pbias_config
    Card did not respond to voltage select!
    Card did not respond to voltage select!
    Inside vmmc_pbias_config
    Card did not respond to voltage select!
    Card did not respond to voltage select!
    ** Bad device mmc 1 **
    Card did not respond to voltage select!
    ** Bad device mmc 1 **
    Card did not respond to voltage select!
    ** Bad device mmc 1 **
    Card did not respond to voltage select!
    ** Bad device mmc 1 **
    mmc - MMC sub system

    Usage:
    mmc info - display info of the current MMC device
    mmc read addr blk# cnt
    mmc write addr blk# cnt
    mmc erase blk# cnt
    mmc rescan
    mmc part - lists available partition on current mmc device
    mmc dev [dev] [part] - show or set current mmc device [partition]
    mmc list - lists available devices
    mmc hwpartition [args...] - does hardware partitioning
    arguments (sizes in 512-byte blocks):
    [user [enh start cnt] [wrrel {on|off}]] - sets user data area attributes
    [gp1|gp2|gp3|gp4 cnt [enh] [wrrel {on|off}]] - general purpose partition
    [check|set|complete] - mode, complete set partitioning completed
    WARNING: Partitioning is a write-once setting once it is set to complete.
    Power cycling is required to initialize partitions after set to complete.
    mmc bootbus dev boot_bus_width reset_boot_bus_width boot_mode
    - Set the BOOT_BUS_WIDTH field of the specified device
    mmc bootpart-resize <dev> <boot part size MB> <RPMB part size MB>
    - Change sizes of boot and RPMB partitions of specified device
    mmc partconf dev boot_ack boot_partition partition_access
    - Change the bits of the PARTITION_CONFIG field of the specified device
    mmc rst-function dev value
    - Change the RST_n_FUNCTION field of the specified device
    WARNING: This is a write-once field and 0 / 1 / 2 are the only valid values.
    mmc setdsr <value> - set DSR register value

    mmc - MMC sub system

    Usage:
    mmc info - display info of the current MMC device
    mmc read addr blk# cnt
    mmc write addr blk# cnt
    mmc erase blk# cnt
    mmc rescan
    mmc part - lists available partition on current mmc device
    mmc dev [dev] [part] - show or set current mmc device [partition]
    mmc list - lists available devices
    mmc hwpartition [args...] - does hardware partitioning
    arguments (sizes in 512-byte blocks):
    [user [enh start cnt] [wrrel {on|off}]] - sets user data area attributes
    [gp1|gp2|gp3|gp4 cnt [enh] [wrrel {on|off}]] - general purpose partition
    [check|set|complete] - mode, complete set partitioning completed
    WARNING: Partitioning is a write-once setting once it is set to complete.
    Power cycling is required to initialize partitions after set to complete.
    mmc bootbus dev boot_bus_width reset_boot_bus_width boot_mode
    - Set the BOOT_BUS_WIDTH field of the specified device
    mmc bootpart-resize <dev> <boot part size MB> <RPMB part size MB>
    - Change sizes of boot and RPMB partitions of specified device
    mmc partconf dev boot_ack boot_partition partition_access
    - Change the bits of the PARTITION_CONFIG field of the specified device
    mmc rst-function dev value
    - Change the RST_n_FUNCTION field of the specified device
    WARNING: This is a write-once field and 0 / 1 / 2 are the only valid values.
    mmc setdsr <value> - set DSR register value

    Booting from eMMC ...
    Wrong Image Format for bootm command
    ERROR: can't get kernel image!
    =>
    CTRL-A Z for help | 115200 8N1 |

    Still we are getting Booting from eMMC...

    Thanks

    Deepika

  • Deepika,

    |"Booting from eMMC ..."

    The above print is for the next stage. i.e it is trying to find uImage and dtb for kernel from eMMC.

    So on your custom board are you able to boot to u-boot prompt?

    I still am not seeing something like:
    "Trying to boot from SPI"

    If you have a TI board can you try how 2016.05 uboot logs come up from SPI?
    This is 5 years old code so it will be of help if you can check that on working TI EVM as well to compare.

    - Keerthy

  • Hi Keerthy,

    I am now able to  boot upto uboot prompt.

    I consulted the HW team, they said that  we should consider 2 stage bootloading. We have always tried single stage bootloader from the evm.

    Can you please provide any settings or document for the same.

    Thanks

    Deepika

  • Deepika,

    Glad to hear that you have now reached u-boot prompt. Typically 2 stage boot means you will have MLO & U-boot.img.

    The vision SDK user guide should describe all the necessary build boot steps,

    - Keerthy

  • Hi Keerthy,

    Thanks for immediate response.

    The vision SDK user guide just have the SD boot mode settings. It has no data provided for 2 stage booting

    We need to use QSPI  as a 2 stage boot.

    Can you please tell me where to keep the uImage and dtb in this 2 stage bootloader. 

    SD card is disabled in QSPI boot, we have to store the file system in the eMMC.

    After if the partition is to be made in eMMC please provide the document for the same.

    Thanks

    Deepika

  • Deepika,

    This thread's original problem is resolved.
    Subject is:"DRA76P: SPI NOR partition turning to read only"
    Please raise a new thread & I will follow up on that. Closing this thread.


    Regards,
    Keerthy
  • Ok Keerthy,

    I will open another thread for QSPI 2 stage bootloading

    Thanks for your support till now.

    Deepika