aboutsummaryrefslogtreecommitdiff
path: root/board/phytec
diff options
context:
space:
mode:
authorTeresa Remmet <t.remmet@phytec.de>2023-08-17 10:57:08 +0200
committerStefano Babic <sbabic@denx.de>2023-10-16 11:29:23 +0200
commit5445f293c4d49612f4d5220cf3a6841dfb6a7f5d (patch)
treed9360baa005d64d7b1f814c4e2cf845240379186 /board/phytec
parent44c82e7c90be700719a4b105ec97ff328a40d675 (diff)
downloadu-boot-5445f293c4d49612f4d5220cf3a6841dfb6a7f5d.zip
u-boot-5445f293c4d49612f4d5220cf3a6841dfb6a7f5d.tar.gz
u-boot-5445f293c4d49612f4d5220cf3a6841dfb6a7f5d.tar.bz2
board: phytec: phycore-imx8mp: Add EEPROM detection initialisation
Add EEPROM detection initialisation for phyCORE-i.MX8MM and print SoM information during boot when successful. Signed-off-by: Teresa Remmet <t.remmet@phytec.de> Reviewed-by: Yannic Moog <y.moog@phytec.de> Tested-by: Yannic Moog <y.moog@phytec.de>
Diffstat (limited to 'board/phytec')
-rw-r--r--board/phytec/phycore_imx8mp/Kconfig1
-rw-r--r--board/phytec/phycore_imx8mp/spl.c17
2 files changed, 18 insertions, 0 deletions
diff --git a/board/phytec/phycore_imx8mp/Kconfig b/board/phytec/phycore_imx8mp/Kconfig
index c053a46..f846d10 100644
--- a/board/phytec/phycore_imx8mp/Kconfig
+++ b/board/phytec/phycore_imx8mp/Kconfig
@@ -12,4 +12,5 @@ config SYS_CONFIG_NAME
config IMX_CONFIG
default "board/phytec/phycore_imx8mp/imximage-8mp-sd.cfg"
+source "board/phytec/common/Kconfig"
endif
diff --git a/board/phytec/phycore_imx8mp/spl.c b/board/phytec/phycore_imx8mp/spl.c
index faed6fc..49406f2 100644
--- a/board/phytec/phycore_imx8mp/spl.c
+++ b/board/phytec/phycore_imx8mp/spl.c
@@ -21,8 +21,13 @@
#include <power/pca9450.h>
#include <spl.h>
+#include "../common/imx8m_som_detection.h"
+
DECLARE_GLOBAL_DATA_PTR;
+#define EEPROM_ADDR 0x51
+#define EEPROM_ADDR_FALLBACK 0x59
+
int spl_board_boot_device(enum boot_device boot_dev_spl)
{
return BOOT_DEVICE_BOOTROM;
@@ -30,6 +35,18 @@ int spl_board_boot_device(enum boot_device boot_dev_spl)
void spl_dram_init(void)
{
+ int ret;
+
+ ret = phytec_eeprom_data_setup_fallback(NULL, 0, EEPROM_ADDR,
+ EEPROM_ADDR_FALLBACK);
+ if (ret)
+ goto out;
+
+ ret = phytec_imx8m_detect(NULL);
+ if (!ret)
+ phytec_print_som_info(NULL);
+
+out:
ddr_init(&dram_timing);
}