]> Git Repo - J-u-boot.git/blobdiff - board/toradex/common/tdx-cfg-block.c
Revert "Merge patch series "arm: dts: am62-beagleplay: Fix Beagleplay Ethernet""
[J-u-boot.git] / board / toradex / common / tdx-cfg-block.c
index e513f4a29196a5177d16d6b7385f61cebb36dc58..dcf00d2b632571aa5138381e390e71e6fe71e1c8 100644 (file)
@@ -139,19 +139,45 @@ const struct toradex_som toradex_modules[] = {
        [66] = { "Verdin iMX8M Plus Quad 8GB WB",        TARGET_IS_ENABLED(VERDIN_IMX8MP)   },
        [67] = { "Apalis iMX8QM 8GB WB IT",              TARGET_IS_ENABLED(APALIS_IMX8)     },
        [68] = { "Verdin iMX8M Mini Quad 2GB WB IT",     TARGET_IS_ENABLED(VERDIN_IMX8MM)   },
+       [69] = { "Verdin AM62 Quad 1GB WB IT",           TARGET_IS_ENABLED(VERDIN_AM62_A53) },
        [70] = { "Verdin iMX8M Plus Quad 8GB WB IT",     TARGET_IS_ENABLED(VERDIN_IMX8MP)   },
+       [71] = { "Verdin AM62 Solo 512MB",               TARGET_IS_ENABLED(VERDIN_AM62_A53) },
+       [72] = { "Verdin AM62 Solo 512MB WB IT",         TARGET_IS_ENABLED(VERDIN_AM62_A53) },
+       [73] = { "Verdin AM62 Dual 1GB ET",              TARGET_IS_ENABLED(VERDIN_AM62_A53) },
+       [74] = { "Verdin AM62 Dual 1GB IT",              TARGET_IS_ENABLED(VERDIN_AM62_A53) },
+       [75] = { "Verdin AM62 Dual 1GB WB IT",           TARGET_IS_ENABLED(VERDIN_AM62_A53) },
+       [76] = { "Verdin AM62 Quad 2GB WB IT",           TARGET_IS_ENABLED(VERDIN_AM62_A53) },
+       [77] = { "Colibri iMX6S 256MB",                  TARGET_IS_ENABLED(COLIBRI_IMX6)    },
+       [78] = { "Colibri iMX6S 256MB IT",               TARGET_IS_ENABLED(COLIBRI_IMX6)    },
+       [79] = { "Colibri iMX6DL 512MB",                 TARGET_IS_ENABLED(COLIBRI_IMX6)    },
+       [80] = { "Colibri iMX6DL 512MB IT",              TARGET_IS_ENABLED(COLIBRI_IMX6)    },
+       [81] = { "Colibri iMX7D 512MB",                  TARGET_IS_ENABLED(COLIBRI_IMX7)    },
+       [82] = { "Apalis iMX6D 512MB",                   TARGET_IS_ENABLED(APALIS_IMX6)     },
+       [83] = { "Apalis iMX6Q 1GB",                     TARGET_IS_ENABLED(APALIS_IMX6)     },
+       [84] = { "Apalis iMX6D 1GB IT",                  TARGET_IS_ENABLED(APALIS_IMX6)     },
+       [85] = { "Apalis iMX6Q 2GB IT",                  TARGET_IS_ENABLED(APALIS_IMX6)     },
+       [86] = { "Verdin iMX8M Mini DualLite 2GB IT",    TARGET_IS_ENABLED(VERDIN_IMX8MM)   },
+       [87] = { "Verdin iMX8M Mini Quad 2GB IT",        TARGET_IS_ENABLED(VERDIN_IMX8MM)   },
 };
 
-const char * const toradex_carrier_boards[] = {
-       [0] = "UNKNOWN CARRIER BOARD",
-       [155] = "Dahlia",
-       [156] = "Verdin Development Board",
+struct pid4list {
+       int pid4;
+       char * const name;
 };
 
-const char * const toradex_display_adapters[] = {
-       [0] = "UNKNOWN DISPLAY ADAPTER",
-       [157] = "Verdin DSI to HDMI Adapter",
-       [159] = "Verdin DSI to LVDS Adapter",
+const struct pid4list toradex_carrier_boards[] = {
+       /* the code assumes unknown at index 0 */
+       {0,                             "UNKNOWN CARRIER BOARD"},
+       {DAHLIA,                        "Dahlia"},
+       {VERDIN_DEVELOPMENT_BOARD,      "Verdin Development Board"},
+       {YAVIA,                         "Yavia"},
+};
+
+const struct pid4list toradex_display_adapters[] = {
+       /* the code assumes unknown at index 0 */
+       {0,                             "UNKNOWN DISPLAY ADAPTER"},
+       {VERDIN_DSI_TO_HDMI_ADAPTER,    "Verdin DSI to HDMI Adapter"},
+       {VERDIN_DSI_TO_LVDS_ADAPTER,    "Verdin DSI to LVDS Adapter"},
 };
 
 const u32 toradex_ouis[] = {
@@ -159,6 +185,32 @@ const u32 toradex_ouis[] = {
        [1] = 0x8c06cbUL,
 };
 
+const char * const get_toradex_carrier_boards(int pid4)
+{
+       int i, index = 0;
+
+       for (i = 1; i < ARRAY_SIZE(toradex_carrier_boards); i++) {
+               if (pid4 == toradex_carrier_boards[i].pid4) {
+                       index = i;
+                       break;
+               }
+       }
+       return toradex_carrier_boards[index].name;
+}
+
+const char * const get_toradex_display_adapters(int pid4)
+{
+       int i, index = 0;
+
+       for (i = 1; i < ARRAY_SIZE(toradex_display_adapters); i++) {
+               if (pid4 == toradex_display_adapters[i].pid4) {
+                       index = i;
+                       break;
+               }
+       }
+       return toradex_display_adapters[index].name;
+}
+
 static u32 get_serial_from_mac(struct toradex_eth_addr *eth_addr)
 {
        int i;
@@ -638,10 +690,11 @@ static int get_cfgblock_carrier_interactive(void)
        int ret = 0;
 
        printf("Supported carrier boards:\n");
-       printf("CARRIER BOARD NAME\t\t [ID]\n");
+       printf("%30s\t[ID]\n", "CARRIER BOARD NAME");
        for (int i = 0; i < ARRAY_SIZE(toradex_carrier_boards); i++)
-               if (toradex_carrier_boards[i])
-                       printf("%s \t\t [%d]\n", toradex_carrier_boards[i], i);
+               printf("%30s\t[%d]\n",
+                      toradex_carrier_boards[i].name,
+                      toradex_carrier_boards[i].pid4);
 
        sprintf(message, "Choose your carrier board (provide ID): ");
        len = cli_readline(message);
This page took 0.027908 seconds and 4 git commands to generate.