Part Number: AM3352
Hi,
We are trying to port from U-boot V2013.10 to V2018.01 and Kernel from V3.2 to V4.14.
Hardware remains the same.
TI SDK Used: V05.03.00.07.(Please visit the site to view this file)
Hardware Info:
Processor is AM3352 and it is interfaced to parallel NOR flash from Cypress (part number :S70GL02GS) via GPMC CS0.
Cypress guys provided an excellent support and here is the full discussion from the bootloader till the kernel problem. (First part of the discussion is on U-boot and next is on Kernel).
https://community.cypress.com/message/206271#206271
We have successfully ported u-boot and all features are working at the u-boot level.
NOR flash info from u-boot:
=> fli
Bank # 1: CFI conformant flash (16 x 16) Size: 256 MB in 1024 Sectors
AMD Standard command set, Manufacturer ID: 0x01, Device ID: 0x227E4801
Advanced Sector Protection (PPB) enabled
Erase timeout: 2048 ms, write timeout: 1 ms
Buffer write timeout: 3 ms, buffer size: 512 bytes
Other commands erase and cp are working at u-boot level.
Problem Statement: We have problem in bringing the NOR flash up in kernel.
Old Kernel (3.2.0): All below commands did not work as expected. No concept of dts here and we have .config file.
cat /proc/partitions
ls -la /dev/mtd*
mtdinfo
mount
mtd_debug info /dev/mtd0
My modifications in new Kernel
- Applied the patch provided by Cypress team.
- Updated the DTS per hardware (I have attached GPMC changes).
- In new kernel, I have enabled all MTD related configuration except for enabling CONFIG_MTD_CHAR (because this option is not available in new kernel).
Observation 1:
Since CONFIG_MTD_CHAR is not available in new kernel and to understand the importance of CONFIG_MTD_CHAR, I have disabled this configuration in the old kernel and tested:
Below commands are not working.
cat /proc/partitions
ls -la /dev/mtd*
mtdinfo
mount
mtd_debug info /dev/mtd0
CONFIG_MTD_CHAR is a must parameter.
Observation 2:
In old kernel mtdchar.c is being compiled based on CONFIG_MTD_CHAR.
In the new kernel drivers/mtd/mtdchar.c is being compiled even though we don’t have CONFIG_MTD_CHAR enabled, it is taken care if CONFIG_MTD is enabled.
Additional changes:
Since code was not entering "drivers/mtd/chips/cfi_probe.c", I have enabled MTD_PHYSMAP_OF and tested.
I have attached kernel configuration of old and new kernel.
Please find attached kernel log file for old kernel (working) and new kernel (not working).
Can you please let me know what is that I am missing?
If you need any more input from my side please let me know.
Regards
Srinivasa