summaryrefslogtreecommitdiff
path: root/board/phytec
diff options
context:
space:
mode:
authorYunus Bas <[email protected]>2024-11-22 11:29:38 +0100
committerFabio Estevam <[email protected]>2024-11-25 23:08:24 -0300
commita488d9f26e37bcb5776bc8a2dadb708f1ac9cfdc (patch)
tree178241108efef072c015026d56534426505baa1d /board/phytec
parent512c6b67a242583ea97b037f87a73ef666c6852a (diff)
board: phytec: phycore-imx8mm: Add EEPROM detection initialisation
Add EEPROM detection initialisation for phyCORE-i.MX8MM. Signed-off-by: Yunus Bas <[email protected]>
Diffstat (limited to 'board/phytec')
-rw-r--r--board/phytec/phycore_imx8mm/Kconfig1
-rw-r--r--board/phytec/phycore_imx8mm/spl.c17
2 files changed, 18 insertions, 0 deletions
diff --git a/board/phytec/phycore_imx8mm/Kconfig b/board/phytec/phycore_imx8mm/Kconfig
index 25e4bf2f836..06449128ba8 100644
--- a/board/phytec/phycore_imx8mm/Kconfig
+++ b/board/phytec/phycore_imx8mm/Kconfig
@@ -12,4 +12,5 @@ config SYS_CONFIG_NAME
config IMX_CONFIG
default "board/phytec/phycore_imx8mm/imximage-8mm-sd.cfg"
+source "board/phytec/common/Kconfig"
endif
diff --git a/board/phytec/phycore_imx8mm/spl.c b/board/phytec/phycore_imx8mm/spl.c
index 8d858590a39..faff064779c 100644
--- a/board/phytec/phycore_imx8mm/spl.c
+++ b/board/phytec/phycore_imx8mm/spl.c
@@ -17,8 +17,13 @@
#include <log.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)
{
switch (boot_dev_spl) {
@@ -39,6 +44,18 @@ int spl_board_boot_device(enum boot_device boot_dev_spl)
static 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);
}