Part Number: PROCESSOR-SDK-DRA8X-TDA4X
Hi TI members:
Our customer board have one SPI flash MT35XU01G,
- In Linux 07_00 version, we can directly add one new spi device in drivers/mtd/spi/spi-nor-ids.c, just follow EVM's ospi device mt35xu512aba config.
like below code:
diff --git a/drivers/mtd/spi/spi-nor-ids.c b/drivers/mtd/spi/spi-nor-ids.c index 2facd8de9a..59fcb388be 100644 --- a/drivers/mtd/spi/spi-nor-ids.c +++ b/drivers/mtd/spi/spi-nor-ids.c @@ -244,6 +244,13 @@ const struct flash_info spi_nor_ids[] = { .change_mode = spi_nor_micron_set_octal_ddr_mode, .adjust_op = spi_nor_micron_adjust_op }, + { + INFO("mt35xu01g", 0x2c5b1b, 0, 128 * 1024, 1024, + SECT_4K | USE_FSR | SPI_NOR_OPI_DTR | + SPI_NOR_4B_OPCODES) + .change_mode = spi_nor_micron_set_octal_ddr_mode, + .adjust_op = spi_nor_micron_adjust_op + }, { INFO("mt35xu02g", 0x2c5b1c, 0, 128 * 1024, 2048, USE_FSR | SPI_NOR_4B_OPCODES) },
Then we can normal boot form ospi flash mt35xu01g.
- But in Linux 07_01 version, I follow the same rule to add a new spi device, like below code:
sdc@sdc:~/opt/V3GA_07_01/psdkla/sources/u-boot-ti-staging$ git diff diff --git a/drivers/mtd/spi/spi-nor-core.c b/drivers/mtd/spi/spi-nor-core.c index b4066901a4..b1dd1942e6 100644 --- a/drivers/mtd/spi/spi-nor-core.c +++ b/drivers/mtd/spi/spi-nor-core.c @@ -3338,6 +3338,8 @@ void spi_nor_set_fixups(struct spi_nor *nor) if (!strcmp(nor->info->name, "mt35xu512aba")) nor->fixups = &mt35xu512aba_fixups; #endif + if (!strcmp(nor->info->name, "mt35xu01g")) + nor->fixups = &mt35xu512aba_fixups; } int spi_nor_scan(struct spi_nor *nor) diff --git a/drivers/mtd/spi/spi-nor-ids.c b/drivers/mtd/spi/spi-nor-ids.c index 7365fb0a56..19fc19af85 100644 --- a/drivers/mtd/spi/spi-nor-ids.c +++ b/drivers/mtd/spi/spi-nor-ids.c @@ -185,7 +185,7 @@ const struct flash_info spi_nor_ids[] = { #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) }, #endif /* CONFIG_SPI_FLASH_MT35XU */ + { INFO("mt35xu01g", 0x2c5b1b, 0, 128 * 1024, 1024, USE_FSR | SPI_NOR_4B_OPCODES | SPI_NOR_OCTAL_READ | SPI_NOR_OCTAL_DTR_READ ) }, { INFO("mt35xu02g", 0x2c5b1c, 0, 128 * 1024, 2048, USE_FSR | SPI_NOR_4B_OPCODES) }, #endif
But after test, this modify will cause ospi-boot failed. The fail log as below
U-Boot SPL 2020.01-g3c9ebdb87d (Jan 18 2021 - 03:38:30 +0000) SYSFW ABI: 3.1 (firmware rev 0x0014 '20.8.5--v2020.08b (Terrific Lla') Reading on-board EEPROM at 0x50 failed 1 Trying to boot from SPI ti_sci_get_response: Message receive failed. ret = -110 Mbox send fail -110 ti_sci_get_response: Message receive failed. ret = -110 Mbox send fail -110
- If we only add one new ospi device as below patch in 07_01,
diff --git a/drivers/mtd/spi/spi-nor-ids.c b/drivers/mtd/spi/spi-nor-ids.c index 7365fb0a56..996f8d766e 100644 --- a/drivers/mtd/spi/spi-nor-ids.c +++ b/drivers/mtd/spi/spi-nor-ids.c @@ -185,7 +185,7 @@ const struct flash_info spi_nor_ids[] = { #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) }, #endif /* CONFIG_SPI_FLASH_MT35XU */ + { INFO("mt35xu01g", 0x2c5b1b, 0, 128 * 1024, 1024, USE_FSR | SPI_NOR_4B_OPCODES) }, { INFO("mt35xu02g", 0x2c5b1c, 0, 128 * 1024, 2048, USE_FSR | SPI_NOR_4B_OPCODES) }, #endif #ifdef CONFIG_SPI_FLASH_SPANSION /* SPANSION */
then we can boot successfully to kernel, but there are some error message in u-boot log, like "WARN: PHY calibration failed: -2"
U-Boot SPL 2020.01-g3c9ebdb87d (Jan 18 2021 - 06:24:20 +0000) SYSFW ABI: 3.1 (firmware rev 0x0014 '20.8.5--v2020.08b (Terrific Lla') Reading on-board EEPROM at 0x50 failed 1 Trying to boot from SPI WARN: PHY calibration failed: -2 Loading Environment from MMC... *** Warning - No MMC card found, using default environment Starting ATF on ARM64 core... NOTICE: BL31: v2.3():07.01.00.006-dirty NOTICE: BL31: Built : 12:30:55, Dec 25 2020 U-Boot SPL 2020.01-g3c9ebdb87d (Jan 18 2021 - 06:25:50 +0000) SYSFW ABI: 3.1 (firmware rev 0x0014 '20.8.5--v2020.08b (Terrific Lla') Reading on-board EEPROM at 0x50 failed 1 Trying to boot from SPI WARN: PHY calibration failed: -2 U-Boot 2020.01-g3c9ebdb87d (Jan 18 2021 - 06:25:50 +0000) SoC: J721E SR1.0 Model: Texas Instruments K3 J721E SoC Reading on-board EEPROM at 0x50 failed 1 Board: J721EX-PM1-SOM rev E2 DRAM: 4 GiB not found for dev hbmc-mux Flash: 0 Bytes MMC: sdhci@4f80000: 0 Loading Environment from MMC... OK In: serial@2800000 Out: serial@2800000 Err: serial@2800000 Reading on-board EEPROM at 0x50 failed 1 Net: Could not get PHY for ethernet@46000000: addr 0 phy_connect() failed No ethernet found. Hit any key to stop autoboot: 0 => => =>
and sometimes after I flash new u-boot files finish, I want to reset u-boot.
It will also meet fail message " ti_sci_get_response: Message receive failed. ret = -110, Mbox send fail -110", and can't reboot device.
Does anyone can help us to debug this situation?
BR
Sentinen Chen