U-Boot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Tim Harvey <tharvey@gateworks.com>
To: u-boot@lists.denx.de, Stefano Babic <sbabic@nabladev.com>
Cc: Fabio Estevam <festevam@gmail.com>,
	"NXP i . MX U-Boot Team" <uboot-imx@nxp.com>,
	Tim Harvey <tharvey@gateworks.com>
Subject: [PATCH 07/13] board: venice: use SOM model for PMIC adjustment on SOM
Date: Fri, 23 May 2025 10:20:12 -0700	[thread overview]
Message-ID: <20250523172018.4164647-7-tharvey@gateworks.com> (raw)
In-Reply-To: <20250523172018.4164647-1-tharvey@gateworks.com>

Use the SOM model to adjust PMIC settings on SOM's.

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
---
 board/gateworks/venice/eeprom.c | 7 +++++++
 board/gateworks/venice/eeprom.h | 1 +
 board/gateworks/venice/spl.c    | 6 ++----
 3 files changed, 10 insertions(+), 4 deletions(-)

diff --git a/board/gateworks/venice/eeprom.c b/board/gateworks/venice/eeprom.c
index 351d18886f14..41f620c90e72 100644
--- a/board/gateworks/venice/eeprom.c
+++ b/board/gateworks/venice/eeprom.c
@@ -19,6 +19,7 @@
 struct venice_board_info som_info;
 struct venice_board_info base_info;
 char venice_model[32];
+char venice_som_model[32];
 char venice_baseboard_model[32];
 u32 venice_serial;
 
@@ -315,6 +316,7 @@ int venice_eeprom_init(int quiet)
 		memset(&som_info, 0, sizeof(som_info));
 		return 0;
 	}
+	strlcpy(venice_som_model, som_info.model, sizeof(venice_som_model));
 
 	/* read optional baseboard EEPROM */
 	eeprom_read(BASEBOARD_EEPROM_BUSNO, BASEBOARD_EEPROM_ADDR, 2, &base_info);
@@ -368,6 +370,11 @@ const char *eeprom_get_model(void)
 	return venice_model;
 }
 
+const char *eeprom_get_som_model(void)
+{
+	return venice_som_model;
+}
+
 const char *eeprom_get_baseboard_model(void)
 {
 	return venice_baseboard_model;
diff --git a/board/gateworks/venice/eeprom.h b/board/gateworks/venice/eeprom.h
index bb7a5fa9ad1f..30cd347d9453 100644
--- a/board/gateworks/venice/eeprom.h
+++ b/board/gateworks/venice/eeprom.h
@@ -26,6 +26,7 @@ struct venice_board_info {
 
 int venice_eeprom_init(int quiet);
 const char *eeprom_get_model(void);
+const char *eeprom_get_som_model(void);
 const char *eeprom_get_baseboard_model(void);
 const char *eeprom_get_dtb_name(int level, char *buf, int len);
 int eeprom_getmac(int index, uint8_t *enetaddr);
diff --git a/board/gateworks/venice/spl.c b/board/gateworks/venice/spl.c
index 275f9d3453ea..f14ab1497d70 100644
--- a/board/gateworks/venice/spl.c
+++ b/board/gateworks/venice/spl.c
@@ -57,6 +57,7 @@ static int dm_i2c_clrsetbits(struct udevice *dev, uint reg, uint clr, uint set)
 
 static int power_init_board(const char *model, struct udevice *gsc)
 {
+	const char *som = eeprom_get_som_model();
 	struct udevice *bus;
 	struct udevice *dev;
 	int ret;
@@ -77,10 +78,7 @@ static int power_init_board(const char *model, struct udevice *gsc)
 		}
 	}
 
-	if ((!strncmp(model, "GW71", 4)) ||
-	    (!strncmp(model, "GW72", 4)) ||
-	    (!strncmp(model, "GW73", 4)) ||
-	    (!strncmp(model, "GW75", 4))) {
+	if (!strncmp(som, "GW70", 4)) {
 		ret = uclass_get_device_by_seq(UCLASS_I2C, 0, &bus);
 		if (ret) {
 			printf("PMIC    : failed I2C1 probe: %d\n", ret);
-- 
2.25.1


  parent reply	other threads:[~2025-05-23 17:21 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-05-23 17:20 [PATCH 01/13] configs: imx8m*_venice: enable several commands useful for scripting Tim Harvey
2025-05-23 17:20 ` [PATCH 02/13] configs: imx8m*_venice: enable GPT support Tim Harvey
2025-05-26  8:21   ` Peng Fan
2025-05-23 17:20 ` [PATCH 03/13] board: venice: move soc-specific dram config into soc-specific files Tim Harvey
2025-05-26  8:21   ` Peng Fan
2025-05-23 17:20 ` [PATCH 04/13] board: venice: fix dram bus config for GW7902/GW7903/GW7904 Tim Harvey
2025-05-26  8:20   ` Peng Fan
2025-05-23 17:20 ` [PATCH 05/13] board: venice: fix dram size for GW7901-SP486 Tim Harvey
2025-05-26  8:20   ` Peng Fan
2025-05-23 17:20 ` [PATCH 06/13] board: venice: use baseboard model for family Tim Harvey
2025-05-26  8:20   ` Peng Fan
2025-05-23 17:20 ` Tim Harvey [this message]
2025-05-26  8:19   ` [PATCH 07/13] board: venice: use SOM model for PMIC adjustment on SOM Peng Fan
2025-05-23 17:20 ` [PATCH 08/13] board: venice: flip logic for GSC supervisor enable Tim Harvey
2025-05-26  8:19   ` Peng Fan
2025-05-23 17:20 ` [PATCH 09/13] board: venice: add imx8mp-gw82xx support Tim Harvey
2025-05-26  8:19   ` Peng Fan
2025-05-23 17:20 ` [PATCH 10/13] board: venice: add FSA support Tim Harvey
2025-05-26  8:19   ` Peng Fan
2025-05-23 17:20 ` [PATCH 11/13] board: venice: update model representation for venice-flex Tim Harvey
2025-05-26  8:18   ` Peng Fan
2025-05-23 17:20 ` [PATCH 12/13] board: venice: append configuration string to model Tim Harvey
2025-05-26  8:18   ` Peng Fan
2025-05-23 17:20 ` [PATCH 13/13] imx8mp-venice-gw74xx: add w_disable2 gpio configuration Tim Harvey
2025-05-26  8:17   ` Peng Fan
2025-05-26  8:21 ` [PATCH 01/13] configs: imx8m*_venice: enable several commands useful for scripting Peng Fan
2025-06-01 13:32 ` Fabio Estevam

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250523172018.4164647-7-tharvey@gateworks.com \
    --to=tharvey@gateworks.com \
    --cc=festevam@gmail.com \
    --cc=sbabic@nabladev.com \
    --cc=u-boot@lists.denx.de \
    --cc=uboot-imx@nxp.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox