]> git.ipfire.org Git - thirdparty/u-boot.git/commitdiff
board: phytec: phycore-imx93: Use CONFIG_PHYTEC_EEPROM_BUS
authorPrimoz Fiser <primoz.fiser@norik.com>
Thu, 28 Aug 2025 08:20:08 +0000 (10:20 +0200)
committerFabio Estevam <festevam@gmail.com>
Fri, 5 Sep 2025 12:04:20 +0000 (09:04 -0300)
Switch to use CONFIG_PHYTEC_EEPROM_BUS instead of the hard coded value
of 2 for the EEPROM I2C bus for both SPL and U-Boot proper. Possible
since commit 88a1816a9b4e ("board: phytec: common: Add PHYTEC_EEPROM_BUS
to Kconfig").

Signed-off-by: Primoz Fiser <primoz.fiser@norik.com>
Reviewed-by: Wadim Egorov <w.egorov@phytec.de>
board/phytec/phycore_imx93/phycore-imx93.c
board/phytec/phycore_imx93/spl.c
configs/imx93-phycore_defconfig

index fab66caf2a1cdc2bf60e062fc5e300d6b5fea378..c6a4e923b074741675936c013f75193e1ecf80f3 100644 (file)
@@ -20,7 +20,7 @@ DECLARE_GLOBAL_DATA_PTR;
 
 int board_init(void)
 {
-       int ret = phytec_eeprom_data_setup(NULL, 2, EEPROM_ADDR);
+       int ret = phytec_eeprom_data_setup(NULL, CONFIG_PHYTEC_EEPROM_BUS, EEPROM_ADDR);
 
        if (ret)
                printf("%s: EEPROM data init failed\n", __func__);
index beaa536c6007892ae6a31b304b93a08c1867b63d..7feee4bcf6fa5de082350c05f4924a170b2c2bfc 100644 (file)
@@ -52,7 +52,7 @@ void spl_dram_init(void)
        int ret;
        enum phytec_imx93_ddr_eeprom_code ddr_opt = PHYTEC_IMX93_DDR_INVALID;
 
-       ret = phytec_eeprom_data_setup(NULL, 2, EEPROM_ADDR);
+       ret = phytec_eeprom_data_setup(NULL, CONFIG_PHYTEC_EEPROM_BUS, EEPROM_ADDR);
        if (ret && !IS_ENABLED(CONFIG_PHYCORE_IMX93_RAM_TYPE_FIX))
                goto out;
 
index 53cd28dfcba63fe2b6e8b373ac7b982bd5d79744..0acdfd2bf53cf0685393eea1ad1cc68c78250781 100644 (file)
@@ -7,6 +7,7 @@ CONFIG_SPL_LIBCOMMON_SUPPORT=y
 CONFIG_SPL_LIBGENERIC_SUPPORT=y
 CONFIG_NR_DRAM_BANKS=2
 CONFIG_PHYTEC_SOM_DETECTION=y
+CONFIG_PHYTEC_EEPROM_BUS=2
 CONFIG_ENV_SOURCE_FILE="phycore_imx93"
 CONFIG_ENV_SIZE=0x10000
 CONFIG_ENV_OFFSET=0x700000