]> git.ipfire.org Git - thirdparty/u-boot.git/commitdiff
board: venice: flip logic for GSC supervisor enable
authorTim Harvey <tharvey@gateworks.com>
Fri, 23 May 2025 17:20:13 +0000 (10:20 -0700)
committerFabio Estevam <festevam@gmail.com>
Fri, 30 May 2025 22:10:56 +0000 (19:10 -0300)
Flip the logic used to determine if a board has the proper hardware to
support enabling the GSC voltage supervisor so that we do not need to
keep adding new models to the list.

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
board/gateworks/venice/spl.c

index f14ab1497d708ff43279a85bb01495bbb1b6718d..e813f3e763ec1f2baa69962545081004aabd3cf0 100644 (file)
@@ -62,14 +62,16 @@ static int power_init_board(const char *model, struct udevice *gsc)
        struct udevice *dev;
        int ret;
 
-       /* Enable GSC voltage supervisor for new board models */
-       if ((!strncmp(model, "GW7100", 6) && model[10] > 'D') ||
-           (!strncmp(model, "GW7101", 6) && model[10] > 'D') ||
-           (!strncmp(model, "GW7200", 6) && model[10] > 'E') ||
-           (!strncmp(model, "GW7201", 6) && model[10] > 'E') ||
-           (!strncmp(model, "GW7300", 6) && model[10] > 'E') ||
-           (!strncmp(model, "GW7301", 6) && model[10] > 'E') ||
-           (!strncmp(model, "GW740", 5) && model[7] > 'B')) {
+       /* Enable GSC voltage supervisor only for newew board models */
+       if ((!strncmp(model, "GW7100", 6) && model[10] < 'E') ||
+           (!strncmp(model, "GW7101", 6) && model[10] < 'E') ||
+           (!strncmp(model, "GW7200", 6) && model[10] < 'F') ||
+           (!strncmp(model, "GW7201", 6) && model[10] < 'F') ||
+           (!strncmp(model, "GW7300", 6) && model[10] < 'F') ||
+           (!strncmp(model, "GW7301", 6) && model[10] < 'F') ||
+           (!strncmp(model, "GW740", 5) && model[7] < 'C')) {
+               printf("GSC     : voltage supervisor disabled\n");
+       } else {
                u8 ver;
 
                if (!dm_i2c_read(gsc, 14, &ver, 1) && ver > 62) {