All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/5] board: gateworks: venice: gsc: fix typo
@ 2021-07-01  0:07 Tim Harvey
  2021-07-01  0:07 ` [PATCH 2/5] board: gateworks: venice: gsc: fix voltage offset Tim Harvey
                   ` (4 more replies)
  0 siblings, 5 replies; 10+ messages in thread
From: Tim Harvey @ 2021-07-01  0:07 UTC (permalink / raw)
  To: Stefano Babic, Fabio Estevam, NXP i . MX U-Boot Team, u-boot; +Cc: Tim Harvey

Fix typo in error message.

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
---
 board/gateworks/venice/gsc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/board/gateworks/venice/gsc.c b/board/gateworks/venice/gsc.c
index d2490e6063..23ad58094c 100644
--- a/board/gateworks/venice/gsc.c
+++ b/board/gateworks/venice/gsc.c
@@ -176,7 +176,7 @@ static int gsc_read_eeprom(int bus, int slave, int alen, struct venice_board_inf
 		chksum += buf[i];
 	if ((info->chksum[0] != chksum >> 8) ||
 	    (info->chksum[1] != (chksum & 0xff))) {
-		printf("EEPROM: I2C%d@0x%02x: Invalid Model in EEPROM\n", bus, slave);
+		printf("EEPROM: I2C%d@0x%02x: Invalid Checksum\n", bus, slave);
 		print_hex_dump_bytes("", DUMP_PREFIX_NONE, buf, sizeof(*info));
 		memset(info, 0, sizeof(*info));
 		return -EINVAL;
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH 2/5] board: gateworks: venice: gsc: fix voltage offset
  2021-07-01  0:07 [PATCH 1/5] board: gateworks: venice: gsc: fix typo Tim Harvey
@ 2021-07-01  0:07 ` Tim Harvey
  2021-07-10 19:35   ` sbabic
  2021-07-01  0:07 ` [PATCH 3/5] board: gateworks: venice: display DTB used Tim Harvey
                   ` (3 subsequent siblings)
  4 siblings, 1 reply; 10+ messages in thread
From: Tim Harvey @ 2021-07-01  0:07 UTC (permalink / raw)
  To: Stefano Babic, Fabio Estevam, NXP i . MX U-Boot Team, u-boot; +Cc: Tim Harvey

The voltage offset property is in microvolts so must be scaled
accordingly.

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
---
 board/gateworks/venice/gsc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/board/gateworks/venice/gsc.c b/board/gateworks/venice/gsc.c
index 23ad58094c..9a6712ec88 100644
--- a/board/gateworks/venice/gsc.c
+++ b/board/gateworks/venice/gsc.c
@@ -298,7 +298,7 @@ int gsc_hwmon(void)
 				}
 
 				/* adjust by offset */
-				val += offset;
+				val += (offset / 1000);
 
 				printf("%-8s: %d.%03dV\n", label, val / 1000, val % 1000);
 				break;
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH 3/5] board: gateworks: venice: display DTB used
  2021-07-01  0:07 [PATCH 1/5] board: gateworks: venice: gsc: fix typo Tim Harvey
  2021-07-01  0:07 ` [PATCH 2/5] board: gateworks: venice: gsc: fix voltage offset Tim Harvey
@ 2021-07-01  0:07 ` Tim Harvey
  2021-07-10 19:36   ` sbabic
  2021-07-01  0:07 ` [PATCH 4/5] board: gateworks: venice: add ftd_file env vars on boot Tim Harvey
                   ` (2 subsequent siblings)
  4 siblings, 1 reply; 10+ messages in thread
From: Tim Harvey @ 2021-07-01  0:07 UTC (permalink / raw)
  To: Stefano Babic, Fabio Estevam, NXP i . MX U-Boot Team, u-boot; +Cc: Tim Harvey

Display the DTB file used for U-Boot.

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
---
 board/gateworks/venice/imx8mm_venice.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/board/gateworks/venice/imx8mm_venice.c b/board/gateworks/venice/imx8mm_venice.c
index 1d51b6ea9b..cb00f532bf 100644
--- a/board/gateworks/venice/imx8mm_venice.c
+++ b/board/gateworks/venice/imx8mm_venice.c
@@ -42,12 +42,16 @@ int board_fit_config_name_match(const char *name)
 {
 	int i  = 0;
 	const char *dtb;
+	static char init;
 	char buf[32];
 
 	do {
 		dtb = gsc_get_dtb_name(i++, buf, sizeof(buf));
-		if (!strcmp(dtb, name))
+		if (!strcmp(dtb, name)) {
+			if (!init++)
+				printf("DTB     : %s\n", name);
 			return 0;
+		}
 	} while (dtb);
 
 	return -1;
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH 4/5] board: gateworks: venice: add ftd_file env vars on boot
  2021-07-01  0:07 [PATCH 1/5] board: gateworks: venice: gsc: fix typo Tim Harvey
  2021-07-01  0:07 ` [PATCH 2/5] board: gateworks: venice: gsc: fix voltage offset Tim Harvey
  2021-07-01  0:07 ` [PATCH 3/5] board: gateworks: venice: display DTB used Tim Harvey
@ 2021-07-01  0:07 ` Tim Harvey
  2021-07-10 19:37   ` sbabic
  2021-07-01  0:07 ` [PATCH 5/5] board: gateworks: venice: remove forced enable of GSC thermal protection Tim Harvey
  2021-07-10 19:37 ` [PATCH 1/5] board: gateworks: venice: gsc: fix typo sbabic
  4 siblings, 1 reply; 10+ messages in thread
From: Tim Harvey @ 2021-07-01  0:07 UTC (permalink / raw)
  To: Stefano Babic, Fabio Estevam, NXP i . MX U-Boot Team, u-boot; +Cc: Tim Harvey

The ftd_file* vars can be used by bootscripts to look for
appropriate dtb's

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
---
 board/gateworks/venice/imx8mm_venice.c | 19 ++++++++++++++++---
 1 file changed, 16 insertions(+), 3 deletions(-)

diff --git a/board/gateworks/venice/imx8mm_venice.c b/board/gateworks/venice/imx8mm_venice.c
index cb00f532bf..2657bd675f 100644
--- a/board/gateworks/venice/imx8mm_venice.c
+++ b/board/gateworks/venice/imx8mm_venice.c
@@ -105,13 +105,26 @@ int board_init(void)
 
 int board_late_init(void)
 {
-	const char *ethmac;
+	const char *str;
 	char env[32];
 	int ret, i;
 	u8 enetaddr[6];
+	char fdt[64];
 
 	led_default_state();
 
+	/* Set fdt_file vars */
+	i = 0;
+	do {
+		str = gsc_get_dtb_name(i, fdt, sizeof(fdt));
+		if (str) {
+			sprintf(env, "fdt_file%d", i + 1);
+			strcat(fdt, ".dtb");
+			env_set(env, fdt);
+		}
+		i++;
+	} while (str);
+
 	/* Set mac addrs */
 	i = 0;
 	do {
@@ -119,8 +132,8 @@ int board_late_init(void)
 			sprintf(env, "eth%daddr", i);
 		else
 			sprintf(env, "ethaddr");
-		ethmac = env_get(env);
-		if (!ethmac) {
+		str = env_get(env);
+		if (!str) {
 			ret = gsc_getmac(i, enetaddr);
 			if (!ret)
 				eth_env_set_enetaddr(env, enetaddr);
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH 5/5] board: gateworks: venice: remove forced enable of GSC thermal protection
  2021-07-01  0:07 [PATCH 1/5] board: gateworks: venice: gsc: fix typo Tim Harvey
                   ` (2 preceding siblings ...)
  2021-07-01  0:07 ` [PATCH 4/5] board: gateworks: venice: add ftd_file env vars on boot Tim Harvey
@ 2021-07-01  0:07 ` Tim Harvey
  2021-07-10 19:34   ` sbabic
  2021-07-10 19:37 ` [PATCH 1/5] board: gateworks: venice: gsc: fix typo sbabic
  4 siblings, 1 reply; 10+ messages in thread
From: Tim Harvey @ 2021-07-01  0:07 UTC (permalink / raw)
  To: Stefano Babic, Fabio Estevam, NXP i . MX U-Boot Team, u-boot; +Cc: Tim Harvey

The Gateworks System Controller thermal protection feature will disable
the board primary power supply if the on-board temperature sensor
reaches 86C. In many cases this could occur before the temperature
critical components such as CPU, DRAM, eMMC, and power supplies have
reached their max temperature.

Remove the forced re-enable of thermal protection so that users can
knowingly disable it.

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
---
 board/gateworks/venice/gsc.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/board/gateworks/venice/gsc.c b/board/gateworks/venice/gsc.c
index 9a6712ec88..c75bc6f855 100644
--- a/board/gateworks/venice/gsc.c
+++ b/board/gateworks/venice/gsc.c
@@ -221,9 +221,11 @@ static const char *gsc_get_rst_cause(struct udevice *dev)
 
 	/* thermal protection */
 	if (!dm_i2c_read(dev, GSC_SC_THERM_PROTECT, &reg, 1)) {
-		reg |= 1;
-		dm_i2c_write(dev, GSC_SC_THERM_PROTECT, &reg, 1);
-		strcat(str, " Thermal Protection Enabled");
+		strcat(str, " Thermal Protection ");
+		if (reg & BIT(0))
+			strcat(str, "Enabled");
+		else
+			strcat(str, "Disabled");
 	}
 
 	return str;
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH 5/5] board: gateworks: venice: remove forced enable of GSC thermal protection
  2021-07-01  0:07 ` [PATCH 5/5] board: gateworks: venice: remove forced enable of GSC thermal protection Tim Harvey
@ 2021-07-10 19:34   ` sbabic
  0 siblings, 0 replies; 10+ messages in thread
From: sbabic @ 2021-07-10 19:34 UTC (permalink / raw)
  To: Tim Harvey, u-boot

> The Gateworks System Controller thermal protection feature will disable
> the board primary power supply if the on-board temperature sensor
> reaches 86C. In many cases this could occur before the temperature
> critical components such as CPU, DRAM, eMMC, and power supplies have
> reached their max temperature.
> Remove the forced re-enable of thermal protection so that users can
> knowingly disable it.
> Signed-off-by: Tim Harvey <tharvey@gateworks.com>
Applied to u-boot-imx, master, thanks !

Best regards,
Stefano Babic

-- 
=====================================================================
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic@denx.de
=====================================================================

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [PATCH 2/5] board: gateworks: venice: gsc: fix voltage offset
  2021-07-01  0:07 ` [PATCH 2/5] board: gateworks: venice: gsc: fix voltage offset Tim Harvey
@ 2021-07-10 19:35   ` sbabic
  0 siblings, 0 replies; 10+ messages in thread
From: sbabic @ 2021-07-10 19:35 UTC (permalink / raw)
  To: Tim Harvey, u-boot

> The voltage offset property is in microvolts so must be scaled
> accordingly.
> Signed-off-by: Tim Harvey <tharvey@gateworks.com>
Applied to u-boot-imx, master, thanks !

Best regards,
Stefano Babic

-- 
=====================================================================
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic@denx.de
=====================================================================

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [PATCH 3/5] board: gateworks: venice: display DTB used
  2021-07-01  0:07 ` [PATCH 3/5] board: gateworks: venice: display DTB used Tim Harvey
@ 2021-07-10 19:36   ` sbabic
  0 siblings, 0 replies; 10+ messages in thread
From: sbabic @ 2021-07-10 19:36 UTC (permalink / raw)
  To: Tim Harvey, u-boot

> Display the DTB file used for U-Boot.
> Signed-off-by: Tim Harvey <tharvey@gateworks.com>
Applied to u-boot-imx, master, thanks !

Best regards,
Stefano Babic

-- 
=====================================================================
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic@denx.de
=====================================================================

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [PATCH 4/5] board: gateworks: venice: add ftd_file env vars on boot
  2021-07-01  0:07 ` [PATCH 4/5] board: gateworks: venice: add ftd_file env vars on boot Tim Harvey
@ 2021-07-10 19:37   ` sbabic
  0 siblings, 0 replies; 10+ messages in thread
From: sbabic @ 2021-07-10 19:37 UTC (permalink / raw)
  To: Tim Harvey, u-boot

> The ftd_file* vars can be used by bootscripts to look for
> appropriate dtb's
> Signed-off-by: Tim Harvey <tharvey@gateworks.com>
Applied to u-boot-imx, master, thanks !

Best regards,
Stefano Babic

-- 
=====================================================================
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic@denx.de
=====================================================================

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [PATCH 1/5] board: gateworks: venice: gsc: fix typo
  2021-07-01  0:07 [PATCH 1/5] board: gateworks: venice: gsc: fix typo Tim Harvey
                   ` (3 preceding siblings ...)
  2021-07-01  0:07 ` [PATCH 5/5] board: gateworks: venice: remove forced enable of GSC thermal protection Tim Harvey
@ 2021-07-10 19:37 ` sbabic
  4 siblings, 0 replies; 10+ messages in thread
From: sbabic @ 2021-07-10 19:37 UTC (permalink / raw)
  To: Tim Harvey, u-boot

> Fix typo in error message.
> Signed-off-by: Tim Harvey <tharvey@gateworks.com>
Applied to u-boot-imx, master, thanks !

Best regards,
Stefano Babic

-- 
=====================================================================
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic@denx.de
=====================================================================

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2021-07-10 19:42 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-01  0:07 [PATCH 1/5] board: gateworks: venice: gsc: fix typo Tim Harvey
2021-07-01  0:07 ` [PATCH 2/5] board: gateworks: venice: gsc: fix voltage offset Tim Harvey
2021-07-10 19:35   ` sbabic
2021-07-01  0:07 ` [PATCH 3/5] board: gateworks: venice: display DTB used Tim Harvey
2021-07-10 19:36   ` sbabic
2021-07-01  0:07 ` [PATCH 4/5] board: gateworks: venice: add ftd_file env vars on boot Tim Harvey
2021-07-10 19:37   ` sbabic
2021-07-01  0:07 ` [PATCH 5/5] board: gateworks: venice: remove forced enable of GSC thermal protection Tim Harvey
2021-07-10 19:34   ` sbabic
2021-07-10 19:37 ` [PATCH 1/5] board: gateworks: venice: gsc: fix typo sbabic

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.