aboutsummaryrefslogtreecommitdiff
path: root/board/phytec
diff options
context:
space:
mode:
authorTom Rini2024-03-11 13:40:06 -0400
committerTom Rini2024-03-11 15:27:20 -0400
commit20a0ce574d6642e0dfe651467159039fac48cc4f (patch)
tree9a76dcd90a2e27e65963b4a74d1621cd10fe91f0 /board/phytec
parentbeedf675b36841ce1e077779157a87a6505317e6 (diff)
parentf3c979dd0053c082d2df170446923e7ce5edbc2d (diff)
Merge tag 'v2024.04-rc4' into next
Prepare v2024.04-rc4
Diffstat (limited to 'board/phytec')
-rw-r--r--board/phytec/common/phytec_som_detection.c10
-rw-r--r--board/phytec/common/phytec_som_detection.h8
-rw-r--r--board/phytec/phycore_imx8mp/spl.c6
-rw-r--r--board/phytec/phycore_imx93/spl.c7
4 files changed, 29 insertions, 2 deletions
diff --git a/board/phytec/common/phytec_som_detection.c b/board/phytec/common/phytec_som_detection.c
index c73bf9721b2..f9607b018de 100644
--- a/board/phytec/common/phytec_som_detection.c
+++ b/board/phytec/common/phytec_som_detection.c
@@ -203,6 +203,16 @@ u8 __maybe_unused phytec_get_rev(struct phytec_eeprom_data *data)
return api2->pcb_rev;
}
+u8 __maybe_unused phytec_get_som_type(struct phytec_eeprom_data *data)
+{
+ if (!data)
+ data = &eeprom_data;
+ if (data->api_rev < PHYTEC_API_REV2)
+ return PHYTEC_EEPROM_INVAL;
+
+ return data->data.data_api2.som_type;
+}
+
#else
inline int phytec_eeprom_data_setup(struct phytec_eeprom_data *data,
diff --git a/board/phytec/common/phytec_som_detection.h b/board/phytec/common/phytec_som_detection.h
index 11009240875..7edbfa3ca5c 100644
--- a/board/phytec/common/phytec_som_detection.h
+++ b/board/phytec/common/phytec_som_detection.h
@@ -19,6 +19,13 @@ enum {
PHYTEC_API_REV2,
};
+enum phytec_som_type_str {
+ SOM_TYPE_PCM = 0,
+ SOM_TYPE_PCL,
+ SOM_TYPE_KSM,
+ SOM_TYPE_KSP,
+};
+
static const char * const phytec_som_type_str[] = {
"PCM",
"PCL",
@@ -67,5 +74,6 @@ void __maybe_unused phytec_print_som_info(struct phytec_eeprom_data *data);
char * __maybe_unused phytec_get_opt(struct phytec_eeprom_data *data);
u8 __maybe_unused phytec_get_rev(struct phytec_eeprom_data *data);
+u8 __maybe_unused phytec_get_som_type(struct phytec_eeprom_data *data);
#endif /* _PHYTEC_SOM_DETECTION_H */
diff --git a/board/phytec/phycore_imx8mp/spl.c b/board/phytec/phycore_imx8mp/spl.c
index d38f6368fe3..df158024654 100644
--- a/board/phytec/phycore_imx8mp/spl.c
+++ b/board/phytec/phycore_imx8mp/spl.c
@@ -46,8 +46,10 @@ void spl_dram_init(void)
if (!ret)
phytec_print_som_info(NULL);
- ret = phytec_get_rev(NULL);
- if (ret >= 3 && ret != PHYTEC_EEPROM_INVAL) {
+ u8 rev = phytec_get_rev(NULL);
+ u8 somtype = phytec_get_som_type(NULL);
+
+ if (rev != PHYTEC_EEPROM_INVAL && (rev >= 3 || (somtype == SOM_TYPE_PCL && rev >= 1))) {
dram_timing.ddrc_cfg[3].val = 0x1323;
dram_timing.ddrc_cfg[4].val = 0x1e84800;
dram_timing.ddrc_cfg[5].val = 0x7a0118;
diff --git a/board/phytec/phycore_imx93/spl.c b/board/phytec/phycore_imx93/spl.c
index dabc5316f33..16303fc187a 100644
--- a/board/phytec/phycore_imx93/spl.c
+++ b/board/phytec/phycore_imx93/spl.c
@@ -11,6 +11,7 @@
#include <asm/arch/sys_proto.h>
#include <asm/arch/trdc.h>
#include <asm/mach-imx/boot_mode.h>
+#include <asm/mach-imx/ele_api.h>
#include <asm/sections.h>
#include <hang.h>
#include <init.h>
@@ -34,6 +35,12 @@ int spl_board_boot_device(enum boot_device boot_dev_spl)
void spl_board_init(void)
{
+ int ret;
+
+ ret = ele_start_rng();
+ if (ret)
+ printf("Fail to start RNG: %d\n", ret);
+
puts("Normal Boot\n");
}