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.

TDA4VM: is snor flash MX25UM51245G compitable with TDA4VM ?

Part Number: TDA4VM

Hi experts,

    I am porting MX25UM51245G snor flash chip to TDA4 board,
    the datasheet can be found at <www.mxic.com.tw/.../MX25UM51245G, 1.8V, 512Mb, v1.4.pdf>.
    but system can not boot from ospi mode. please help to check whether this flash chip is compitable with TDA4VM.
    I have some tests like this:

1. in uboot, rename mt35xu512aba to mx35um51245g, remove DTR and OCTAL caps, and add mx25um51245g like that.

    diff --git a/drivers/mtd/spi/spi-nor-ids.c b/drivers/mtd/spi/spi-nor-ids.c
    index bff738d665..aae064e20e 100644
    --- a/drivers/mtd/spi/spi-nor-ids.c
    +++ b/drivers/mtd/spi/spi-nor-ids.c
    @@ -188,9 +188,11 @@ const struct flash_info spi_nor_ids[] = {
    { INFO("mt25ql01g", 0x21ba20, 0, 64 * 1024, 2048, SECT_4K | USE_FSR | SPI_NOR_QUAD_READ | NO_CHIP_ERASE) },
    { INFO("mt25qu02g", 0x20bb22, 0, 64 * 1024, 4096, SECT_4K | USE_FSR | SPI_NOR_QUAD_READ | NO_CHIP_ERASE) },
    #ifdef CONFIG_SPI_FLASH_MT35XU
    - { INFO("mt35xu512aba", 0x2c5b1a, 0, 128 * 1024, 512, USE_FSR | SPI_NOR_OCTAL_READ | SPI_NOR_4B_OPCODES | SPI_NOR_OCTAL_DTR_READ) },
    + //{ INFO("mt35xu512aba", 0x2c5b1a, 0, 128 * 1024, 512, USE_FSR | SPI_NOR_OCTAL_READ | SPI_NOR_4B_OPCODES | SPI_NOR_OCTAL_DTR_READ) },
    #endif /* CONFIG_SPI_FLASH_MT35XU */
    { INFO("mt35xu02g", 0x2c5b1c, 0, 128 * 1024, 2048, USE_FSR | SPI_NOR_OCTAL_READ | SPI_NOR_4B_OPCODES) },
    + { INFO("mx25um51245g", 0xc2803a, 0, 64 * 1024, 1024, SECT_4K | SPI_NOR_4B_OPCODES ) },
    + { INFO("mx35um51245g", 0x2c5b1a, 0, 128 * 1024, 512, SECT_4K | SPI_NOR_4B_OPCODES ) },
    #endif
    #ifdef CONFIG_SPI_FLASH_SPANSION /* SPANSION */
    /* Spansion/Cypress -- single (large) sector size only, at least

2. build uboot , check the md5sum of image files:

    174ae55a29229e681e60f034854d386f tiboot3.bin
    1f768177e321d452ac5c5dd5367ca2aa tispl.bin
    163b9af16cfc2a0af7411f45a22c2939 u-boot.img
    c3463f15bae363cda1fcd04d8ed2c62c sysfw.itb
    53d820e84df692d93193c07ae4dd6bfe nor_spi_patterns.bin

3. on board-A( mt35xu512aba ), boot from sdcard, flash these images into ospi flash

4. on board-A( mt35xu512aba ) set bootmode as ospi, power on, system boot success, in uboot shell read ospi and check md5sum, that's correct.

    U-Boot SPL 2021.01 (Nov 03 2022 - 18:57:55 +0800)
    SYSFW ABI: 3.1 (firmware rev 0x0015 '21.9.1--v2021.09a (Terrific Lla')
    Trying to boot from SPI
    Starting ATF on ARM64 core...
    
    NOTICE: BL31: v2.5(release):08.01.00.006-dirty
    NOTICE: BL31: Built : 16:34:52, Dec 20 2021
    
    U-Boot SPL 2021.01 (Nov 03 2022 - 18:58:01 +0800)
    SYSFW ABI: 3.1 (firmware rev 0x0015 '21.9.1--v2021.09a (Terrific Lla')
    Trying to boot from SPI
    
    
    U-Boot 2021.01 (Nov 03 2022 - 18:58:01 +0800)
    
    I2C: Error, wrong i2c adapter 0 max 0 possible
    ready
    DRAM: 4 GiB
    MMC: sdhci@4f80000: 0, sdhci@4fb0000: 1
    Error, wrong i2c adapter 0 max 0 possible
    In: serial@2800000
    Out: serial@2800000
    Err: serial@2800000
    Autoboot in 3 seconds
    
    => sf probe
    SF: Detected mx35um51245g with page size 256 Bytes, erase size 128 KiB, total 64 MiB
    
    => sf read 0x82000000 0x000000000000 0x000000080000
    device 0 offset 0x0, size 0x80000
    SF: 524288 bytes @ 0x0 Read: OK
    => md5sum 0x82000000 0x3EA94
    md5 for 82000000 ... 8203ea93 ==> 174ae55a29229e681e60f034854d386f
    
    => sf read 0x82000000 0x000000080000 0x000000280000
    device 0 offset 0x80000, size 0x280000
    SF: 2621440 bytes @ 0x80000 Read: OK
    => md5sum 0x82000000 0xF2700
    md5 for 82000000 ... 820f26ff ==> 1f768177e321d452ac5c5dd5367ca2aa
    
    => sf read 0x82000000 0x000000280000 0x000000680000
    device 0 offset 0x280000, size 0x680000
    SF: 6815744 bytes @ 0x280000 Read: OK
    => md5sum 0x82000000 0xE50C8
    md5 for 82000000 ... 820e50c7 ==> 163b9af16cfc2a0af7411f45a22c2939
    
    => sf read 0x82000000 0x0000006c0000 0x0000007c0000
    device 0 offset 0x6c0000, size 0x7c0000
    SF: 8126464 bytes @ 0x6c0000 Read: OK
    => md5sum 0x82000000 0x41ABE
    md5 for 82000000 ... 82041abd ==> c3463f15bae363cda1fcd04d8ed2c62c
    
    => sf read 0x82000000 0x000003fe0000 0x80
    device 0 offset 0x3fe0000, size 0x80
    SF: 128 bytes @ 0x3fe0000 Read: OK
    => md5sum 0x82000000 0x80
    md5 for 82000000 ... 8200007f ==> 53d820e84df692d93193c07ae4dd6bfe

5. on board-B( mx25um51245g ), boot from sdcard, flash these images into ospi flash, and check the md5sum, that's ok too.

    U-Boot SPL 2021.01 (Nov 03 2022 - 18:57:55 +0800)
    SYSFW ABI: 3.1 (firmware rev 0x0015 '21.9.1--v2021.09a (Terrific Lla')
    Trying to boot from MMC2
    Starting ATF on ARM64 core...
    
    NOTICE:  BL31: v2.5(release):08.01.00.006-dirty
    NOTICE:  BL31: Built : 16:34:52, Dec 20 2021
    
    U-Boot SPL 2021.01 (Nov 03 2022 - 18:58:01 +0800)
    SYSFW ABI: 3.1 (firmware rev 0x0015 '21.9.1--v2021.09a (Terrific Lla')
    Trying to boot from MMC2
    
    
    U-Boot 2021.01 (Nov 03 2022 - 18:58:01 +0800)
    
    I2C:   Error, wrong i2c adapter 0 max 0 possible
    ready
    DRAM:  4 GiB
    MMC:   sdhci@4f80000: 0, sdhci@4fb0000: 1
    Error, wrong i2c adapter 0 max 0 possible
    In:    serial@2800000
    Out:   serial@2800000
    Err:   serial@2800000
    Autoboot in 3 seconds
    
    => sf probe
    SF: Detected mx25um51245g with page size 256 Bytes, erase size 64 KiB, total 64 MiB
    
    => sf read 0x82000000 0x000000000000 0x000000080000
    device 0 offset 0x0, size 0x80000
    SF: 524288 bytes @ 0x0 Read: OK
    => md5sum 0x82000000 0x3EA94
    md5 for 82000000 ... 8203ea93 ==> 174ae55a29229e681e60f034854d386f
    
    => sf read 0x82000000 0x000000080000 0x000000280000
    device 0 offset 0x80000, size 0x280000
    SF: 2621440 bytes @ 0x80000 Read: OK
    => md5sum 0x82000000 0xF2700
    md5 for 82000000 ... 820f26ff ==> 1f768177e321d452ac5c5dd5367ca2aa
    
    => sf read 0x82000000 0x000000280000 0x000000680000
    device 0 offset 0x280000, size 0x680000
    SF: 6815744 bytes @ 0x280000 Read: OK
    => md5sum 0x82000000 0xE50C8
    md5 for 82000000 ... 820e50c7 ==> 163b9af16cfc2a0af7411f45a22c2939
    
    => sf read 0x82000000 0x0000006c0000 0x0000007c0000
    device 0 offset 0x6c0000, size 0x7c0000
    SF: 8126464 bytes @ 0x6c0000 Read: OK
    => md5sum 0x82000000 0x41ABE
    md5 for 82000000 ... 82041abd ==> c3463f15bae363cda1fcd04d8ed2c62c
    
    => sf read 0x82000000 0x000003fe0000 0x80
    device 0 offset 0x3fe0000, size 0x80
    SF: 128 bytes @ 0x3fe0000 Read: OK
    => md5sum 0x82000000 0x80
    md5 for 82000000 ... 8200007f ==> 53d820e84df692d93193c07ae4dd6bfe

6. on board-B( mx25um51245g ), boot from ospi mode, but no text come out from debug uart. and I can see period singal on DQ0 line.



thanks