board: phytec: common: Add phyCORE-AM62Ax
authorDaniel Schultz <d.schultz@phytec.de>
Wed, 5 Mar 2025 04:58:36 +0000 (05:58 +0100)
committerTom Rini <trini@konsulko.com>
Tue, 18 Mar 2025 14:12:53 +0000 (08:12 -0600)
Add the phyCORE-AM62Ax to our common board directory to
enable our SOM detection for this product.

Signed-off-by: Daniel Schultz <d.schultz@phytec.de>
Signed-off-by: Wadim Egorov <w.egorov@phytec.de>
board/phytec/common/Kconfig
board/phytec/common/am6_som_detection.c
board/phytec/common/am6_som_detection.h

index bc55117..65451a3 100644 (file)
@@ -38,6 +38,17 @@ config PHYTEC_AM62_SOM_DETECTION
           Support of I2C EEPROM based SoM detection. Supported
           for PHYTEC AM62x boards.
 
+config PHYTEC_AM62A_SOM_DETECTION
+       bool "Support SoM detection for AM62Ax PHYTEC platforms"
+       depends on (TARGET_PHYCORE_AM62AX_A53 || TARGET_PHYCORE_AM62AX_R5) && \
+                  PHYTEC_SOM_DETECTION
+       select SUPPORT_EXTENSION_SCAN
+       depends on SPL_I2C && DM_I2C
+       default y
+       help
+          Support of I2C EEPROM based SoM detection. Supported
+          for PHYTEC AM62Ax boards.
+
 config PHYTEC_AM64_SOM_DETECTION
        bool "Support SoM detection for AM64x PHYTEC platforms"
        depends on (TARGET_PHYCORE_AM64X_A53 || TARGET_PHYCORE_AM64X_R5) && \
index 7930ab4..f5de5de 100644 (file)
 extern struct phytec_eeprom_data eeprom_data;
 
 #if IS_ENABLED(CONFIG_PHYTEC_AM62_SOM_DETECTION) || \
+       IS_ENABLED(CONFIG_PHYTEC_AM62A_SOM_DETECTION) || \
        IS_ENABLED(CONFIG_PHYTEC_AM64_SOM_DETECTION)
 
 /* Check if the SoM is actually one of the following products:
  * - phyCORE-AM62x
+ * - phyCORE-AM62Ax
  * - phyCORE-AM64x
  *
  * Returns 0 in case it's a known SoM. Otherwise, returns -1.
@@ -41,6 +43,9 @@ int phytec_am6_detect(struct phytec_eeprom_data *data)
        if (som == PHYTEC_AM62X_SOM && soc_is_am62x())
                return 0;
 
+       if (som == PHYTEC_AM62AX_SOM && soc_is_am62ax())
+               return 0;
+
        if (som == PHYTEC_AM64X_SOM && soc_is_am64x())
                return 0;
 
index c5c6e17..0b3c9c8 100644 (file)
@@ -11,6 +11,7 @@
 
 #define EEPROM_ADDR                            0x50
 #define PHYTEC_AM62X_SOM                       71
+#define PHYTEC_AM62AX_SOM                      75
 #define PHYTEC_AM64X_SOM                       72
 #define PHYTEC_EEPROM_VALUE_X                  0x21
 #define PHYTEC_EEPROM_NOR_FLASH_64MB_QSPI      0xC