diff options
author | Tim Harvey <tharvey@gateworks.com> | 2025-05-23 10:20:13 -0700 |
---|---|---|
committer | Fabio Estevam <festevam@gmail.com> | 2025-05-30 19:10:56 -0300 |
commit | 5e726768905bd00082b711e05e3021ebe36c1767 (patch) | |
tree | 27f258c3fd85ed6243509df811e54194051c5371 | |
parent | b1ead5a2240002f880e6560bc7715eb6b250dd6d (diff) |
board: venice: flip logic for GSC supervisor enable
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>
-rw-r--r-- | board/gateworks/venice/spl.c | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/board/gateworks/venice/spl.c b/board/gateworks/venice/spl.c index f14ab1497d7..e813f3e763e 100644 --- a/board/gateworks/venice/spl.c +++ b/board/gateworks/venice/spl.c @@ -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) { |