summaryrefslogtreecommitdiff
path: root/board/phytec/common
diff options
context:
space:
mode:
authorPrimoz Fiser <[email protected]>2026-03-17 13:31:26 +0100
committerFabio Estevam <[email protected]>2026-04-02 09:05:23 -0300
commit77801f4b644b61e8a626a8a07b8249b8d29b118b (patch)
tree9b8f94050581f55d53a4f6b4da1685ee6a60d4db /board/phytec/common
parent97979e894ba14d67e926322f4f770e3591a3e53c (diff)
board: phytec: phycore-imx91-93: Add phyCORE-i.MX91 support
As the PHYTEC phyCORE-i.MX91 [1] is just another variant of the existing PHYTEC phyCORE-i.MX93 SoM but with i.MX91 SoC populated instead, add it to the existing board-code "phycore_imx93", and rename that board to "phycore_imx91_93" to reflect the dual SoCs support. While at it, also rename and change common files accordingly. This way i.MX91 and i.MX93 SoC variants of the phyCORE SoM share most of the code and documentation without duplication, while maintaining own device-tree and defconfigs for each CPU variant. Supported features: - 1GB LPDDR4 RAM - Debug UART - EEPROM - eMMC - Ethernet - SD-card - USB Product page SoM: [1] https://www.phytec.eu/en/produkte/system-on-modules/phycore-imx-91-93/ Signed-off-by: Primoz Fiser <[email protected]>
Diffstat (limited to 'board/phytec/common')
-rw-r--r--board/phytec/common/Kconfig6
-rw-r--r--board/phytec/common/Makefile2
-rw-r--r--board/phytec/common/imx91_93_som_detection.c (renamed from board/phytec/common/imx93_som_detection.c)39
-rw-r--r--board/phytec/common/imx91_93_som_detection.h51
-rw-r--r--board/phytec/common/imx93_som_detection.h51
5 files changed, 76 insertions, 73 deletions
diff --git a/board/phytec/common/Kconfig b/board/phytec/common/Kconfig
index a72f66ee3f5..6afd03086f7 100644
--- a/board/phytec/common/Kconfig
+++ b/board/phytec/common/Kconfig
@@ -19,13 +19,13 @@ config PHYTEC_IMX8M_SOM_DETECTION
Support of I2C EEPROM based SoM detection. Supported
for PHYTEC i.MX8MM/i.MX8MP boards
-config PHYTEC_IMX93_SOM_DETECTION
- bool "Support SoM detection for i.MX93 PHYTEC platforms"
+config PHYTEC_IMX91_93_SOM_DETECTION
+ bool "Support SoM detection for i.MX91/93 PHYTEC platforms"
depends on ARCH_IMX9 && PHYTEC_SOM_DETECTION
default y
help
Support of I2C EEPROM based SoM detection. Supported
- for PHYTEC i.MX93 based boards
+ for PHYTEC i.MX91/93 based boards
config PHYTEC_AM62_SOM_DETECTION
bool "Support SoM detection for AM62x PHYTEC platforms"
diff --git a/board/phytec/common/Makefile b/board/phytec/common/Makefile
index 948f9dab626..e09dea01d49 100644
--- a/board/phytec/common/Makefile
+++ b/board/phytec/common/Makefile
@@ -10,4 +10,4 @@ endif
obj-y += phytec_som_detection.o phytec_som_detection_blocks.o
obj-$(CONFIG_ARCH_K3) += am6_som_detection.o k3/
obj-$(CONFIG_ARCH_IMX8M) += imx8m_som_detection.o
-obj-$(CONFIG_ARCH_IMX9) += imx93_som_detection.o
+obj-$(CONFIG_ARCH_IMX9) += imx91_93_som_detection.o
diff --git a/board/phytec/common/imx93_som_detection.c b/board/phytec/common/imx91_93_som_detection.c
index eb9574d43b5..bcc5500ae9f 100644
--- a/board/phytec/common/imx93_som_detection.c
+++ b/board/phytec/common/imx91_93_som_detection.c
@@ -10,18 +10,19 @@
#include <i2c.h>
#include <u-boot/crc.h>
-#include "imx93_som_detection.h"
+#include "imx91_93_som_detection.h"
extern struct phytec_eeprom_data eeprom_data;
-#if IS_ENABLED(CONFIG_PHYTEC_IMX93_SOM_DETECTION)
+#if IS_ENABLED(CONFIG_PHYTEC_IMX91_93_SOM_DETECTION)
/* Check if the SoM is actually one of the following products:
+ * - i.MX91
* - i.MX93
*
* Returns 0 in case it's a known SoM. Otherwise, returns 1.
*/
-u8 __maybe_unused phytec_imx93_detect(struct phytec_eeprom_data *data)
+u8 __maybe_unused phytec_imx91_93_detect(struct phytec_eeprom_data *data)
{
u8 som;
@@ -35,7 +36,7 @@ u8 __maybe_unused phytec_imx93_detect(struct phytec_eeprom_data *data)
som = data->payload.data.data_api2.som_no;
debug("%s: som id: %u\n", __func__, som);
- if (som == PHYTEC_IMX93_SOM && is_imx93())
+ if (som == PHYTEC_IMX91_93_SOM && (is_imx91() || is_imx93()))
return 0;
pr_err("%s: SoM ID does not match. Wrong EEPROM data?\n", __func__);
@@ -43,15 +44,15 @@ u8 __maybe_unused phytec_imx93_detect(struct phytec_eeprom_data *data)
}
/*
- * Filter PHYTEC i.MX93 SoM options by option index
+ * Filter PHYTEC i.MX91/93 SoM options by option index
*
* Returns:
* - option value
* - PHYTEC_EEPROM_INVAL when the data is invalid
*
*/
-u8 __maybe_unused phytec_imx93_get_opt(struct phytec_eeprom_data *data,
- enum phytec_imx93_option_index idx)
+u8 __maybe_unused phytec_imx91_93_get_opt(struct phytec_eeprom_data *data,
+ enum phytec_imx91_93_option_index idx)
{
char *opt;
u8 opt_id;
@@ -73,39 +74,41 @@ u8 __maybe_unused phytec_imx93_get_opt(struct phytec_eeprom_data *data,
}
/*
- * Filter PHYTEC i.MX93 SoM voltage
+ * Filter PHYTEC i.MX91/93 SoM voltage
*
* Returns:
- * - PHYTEC_IMX93_VOLTAGE_1V8 or PHYTEC_IMX93_VOLTAGE_3V3
+ * - PHYTEC_IMX91_93_VOLTAGE_1V8 or PHYTEC_IMX91_93_VOLTAGE_3V3
* - PHYTEC_EEPROM_INVAL when the data is invalid
*
*/
-enum phytec_imx93_voltage __maybe_unused phytec_imx93_get_voltage(struct phytec_eeprom_data *data)
+enum phytec_imx91_93_voltage __maybe_unused
+phytec_imx91_93_get_voltage(struct phytec_eeprom_data *data)
{
- u8 option = phytec_imx93_get_opt(data, PHYTEC_IMX93_OPT_FEAT);
+ u8 option = phytec_imx91_93_get_opt(data, PHYTEC_IMX91_93_OPT_FEAT);
if (option == PHYTEC_EEPROM_INVAL)
- return PHYTEC_IMX93_VOLTAGE_INVALID;
- return (option & 0x01) ? PHYTEC_IMX93_VOLTAGE_1V8 : PHYTEC_IMX93_VOLTAGE_3V3;
+ return PHYTEC_IMX91_93_VOLTAGE_INVALID;
+ return (option & 0x01) ? PHYTEC_IMX91_93_VOLTAGE_1V8 :
+ PHYTEC_IMX91_93_VOLTAGE_3V3;
}
#else
-inline u8 __maybe_unused phytec_imx93_detect(struct phytec_eeprom_data *data)
+inline u8 __maybe_unused phytec_imx91_93_detect(struct phytec_eeprom_data *data)
{
return 1;
}
-inline u8 __maybe_unused phytec_imx93_get_opt(struct phytec_eeprom_data *data,
- enum phytec_imx93_option_index idx)
+inline u8 __maybe_unused phytec_imx91_93_get_opt(struct phytec_eeprom_data *data,
+ enum phytec_imx91_93_option_index idx)
{
return PHYTEC_EEPROM_INVAL;
}
-inline enum phytec_imx93_voltage __maybe_unused phytec_imx93_get_voltage
+inline enum phytec_imx91_93_voltage __maybe_unused phytec_imx91_93_get_voltage
(struct phytec_eeprom_data *data)
{
return PHYTEC_EEPROM_INVAL;
}
-#endif /* IS_ENABLED(CONFIG_PHYTEC_IMX93_SOM_DETECTION) */
+#endif /* IS_ENABLED(CONFIG_PHYTEC_IMX91_93_SOM_DETECTION) */
diff --git a/board/phytec/common/imx91_93_som_detection.h b/board/phytec/common/imx91_93_som_detection.h
new file mode 100644
index 00000000000..05ea4cf0868
--- /dev/null
+++ b/board/phytec/common/imx91_93_som_detection.h
@@ -0,0 +1,51 @@
+/* SPDX-License-Identifier: GPL-2.0-or-later */
+/*
+ * Copyright (C) 2026 PHYTEC Messtechnik GmbH
+ * Author: Primoz Fiser <[email protected]>
+ */
+
+#ifndef _PHYTEC_IMX91_93_SOM_DETECTION_H
+#define _PHYTEC_IMX91_93_SOM_DETECTION_H
+
+#include "phytec_som_detection.h"
+
+#define PHYTEC_IMX91_93_SOM 77
+
+enum phytec_imx91_93_option_index {
+ PHYTEC_IMX91_93_OPT_DDR = 0,
+ PHYTEC_IMX91_93_OPT_EMMC = 1,
+ PHYTEC_IMX91_93_OPT_CPU = 2,
+ PHYTEC_IMX91_93_OPT_FREQ = 3,
+ PHYTEC_IMX91_93_OPT_NPU = 4,
+ PHYTEC_IMX91_93_OPT_DISP = 5,
+ PHYTEC_IMX91_93_OPT_ETH = 6,
+ PHYTEC_IMX91_93_OPT_FEAT = 7,
+ PHYTEC_IMX91_93_OPT_TEMP = 8,
+ PHYTEC_IMX91_93_OPT_BOOT = 9,
+ PHYTEC_IMX91_93_OPT_LED = 10,
+ PHYTEC_IMX91_93_OPT_EEPROM = 11,
+};
+
+enum phytec_imx91_93_voltage {
+ PHYTEC_IMX91_93_VOLTAGE_INVALID = PHYTEC_EEPROM_INVAL,
+ PHYTEC_IMX91_93_VOLTAGE_3V3 = 0,
+ PHYTEC_IMX91_93_VOLTAGE_1V8 = 1,
+};
+
+enum phytec_imx91_93_ddr_eeprom_code {
+ PHYTEC_IMX91_93_DDR_INVALID = PHYTEC_EEPROM_INVAL,
+ PHYTEC_IMX91_93_LPDDR4X_512MB = 0,
+ PHYTEC_IMX91_93_LPDDR4X_1GB = 1,
+ PHYTEC_IMX91_93_LPDDR4X_2GB = 2,
+ PHYTEC_IMX91_93_LPDDR4_512MB = 3,
+ PHYTEC_IMX91_93_LPDDR4_1GB = 4,
+ PHYTEC_IMX91_93_LPDDR4_2GB = 5,
+};
+
+u8 __maybe_unused phytec_imx91_93_detect(struct phytec_eeprom_data *data);
+u8 __maybe_unused phytec_imx91_93_get_opt(struct phytec_eeprom_data *data,
+ enum phytec_imx91_93_option_index idx);
+enum phytec_imx91_93_voltage __maybe_unused phytec_imx91_93_get_voltage
+ (struct phytec_eeprom_data *data);
+
+#endif /* _PHYTEC_IMX91_93_SOM_DETECTION_H */
diff --git a/board/phytec/common/imx93_som_detection.h b/board/phytec/common/imx93_som_detection.h
deleted file mode 100644
index a0803b47cbe..00000000000
--- a/board/phytec/common/imx93_som_detection.h
+++ /dev/null
@@ -1,51 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0-or-later */
-/*
- * Copyright (C) 2024 PHYTEC Messtechnik GmbH
- * Author: Primoz Fiser <[email protected]>
- */
-
-#ifndef _PHYTEC_IMX93_SOM_DETECTION_H
-#define _PHYTEC_IMX93_SOM_DETECTION_H
-
-#include "phytec_som_detection.h"
-
-#define PHYTEC_IMX93_SOM 77
-
-enum phytec_imx93_option_index {
- PHYTEC_IMX93_OPT_DDR = 0,
- PHYTEC_IMX93_OPT_EMMC = 1,
- PHYTEC_IMX93_OPT_CPU = 2,
- PHYTEC_IMX93_OPT_FREQ = 3,
- PHYTEC_IMX93_OPT_NPU = 4,
- PHYTEC_IMX93_OPT_DISP = 5,
- PHYTEC_IMX93_OPT_ETH = 6,
- PHYTEC_IMX93_OPT_FEAT = 7,
- PHYTEC_IMX93_OPT_TEMP = 8,
- PHYTEC_IMX93_OPT_BOOT = 9,
- PHYTEC_IMX93_OPT_LED = 10,
- PHYTEC_IMX93_OPT_EEPROM = 11,
-};
-
-enum phytec_imx93_voltage {
- PHYTEC_IMX93_VOLTAGE_INVALID = PHYTEC_EEPROM_INVAL,
- PHYTEC_IMX93_VOLTAGE_3V3 = 0,
- PHYTEC_IMX93_VOLTAGE_1V8 = 1,
-};
-
-enum phytec_imx93_ddr_eeprom_code {
- PHYTEC_IMX93_DDR_INVALID = PHYTEC_EEPROM_INVAL,
- PHYTEC_IMX93_LPDDR4X_512MB = 0,
- PHYTEC_IMX93_LPDDR4X_1GB = 1,
- PHYTEC_IMX93_LPDDR4X_2GB = 2,
- PHYTEC_IMX93_LPDDR4_512MB = 3,
- PHYTEC_IMX93_LPDDR4_1GB = 4,
- PHYTEC_IMX93_LPDDR4_2GB = 5,
-};
-
-u8 __maybe_unused phytec_imx93_detect(struct phytec_eeprom_data *data);
-u8 __maybe_unused phytec_imx93_get_opt(struct phytec_eeprom_data *data,
- enum phytec_imx93_option_index idx);
-enum phytec_imx93_voltage __maybe_unused phytec_imx93_get_voltage
- (struct phytec_eeprom_data *data);
-
-#endif /* _PHYTEC_IMX93_SOM_DETECTION_H */