All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/5] board: gateworks: venice: display hwmon details by default
@ 2021-08-18 21:51 Tim Harvey
  2021-08-18 21:51 ` [PATCH 2/5] board: gateworks: venice: do not overwrite serial# Tim Harvey
                   ` (3 more replies)
  0 siblings, 4 replies; 9+ messages in thread
From: Tim Harvey @ 2021-08-18 21:51 UTC (permalink / raw
  To: Stefano Babic, Fabio Estevam, NXP i . MX U-Boot Team, u-boot; +Cc: Tim Harvey

Display hwmon values by default when using the 'gsc' command.

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

diff --git a/board/gateworks/venice/gsc.c b/board/gateworks/venice/gsc.c
index 7d6acd7b4a..065d1fb8cc 100644
--- a/board/gateworks/venice/gsc.c
+++ b/board/gateworks/venice/gsc.c
@@ -527,6 +527,9 @@ static int gsc_info(int verbose)
 		printf("%d\n", buf[0] | buf[1] << 8 | buf[2] << 16 | buf[3] << 24);
 	}
 
+	/* Display hwmon */
+	gsc_hwmon();
+
 	return 0;
 }
 
-- 
2.17.1


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

* [PATCH 2/5] board: gateworks: venice: do not overwrite serial#
  2021-08-18 21:51 [PATCH 1/5] board: gateworks: venice: display hwmon details by default Tim Harvey
@ 2021-08-18 21:51 ` Tim Harvey
  2021-08-18 21:54   ` Fabio Estevam
  2021-08-18 21:51 ` [PATCH 3/5] arm: dts: imx8mm-venice-gw700x: fix mp5416 pmic config Tim Harvey
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 9+ messages in thread
From: Tim Harvey @ 2021-08-18 21:51 UTC (permalink / raw
  To: Stefano Babic, Fabio Estevam, NXP i . MX U-Boot Team, u-boot; +Cc: Tim Harvey

Do not overwrite existing serial# env to avoid:

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

diff --git a/board/gateworks/venice/imx8mm_venice.c b/board/gateworks/venice/imx8mm_venice.c
index 2a97d55d32..46f4bff925 100644
--- a/board/gateworks/venice/imx8mm_venice.c
+++ b/board/gateworks/venice/imx8mm_venice.c
@@ -114,7 +114,8 @@ int board_late_init(void)
 	led_default_state();
 
 	/* Set board serial/model */
-	env_set_ulong("serial#", gsc_get_serial());
+	if (!env_get("serial#"))
+		env_set_ulong("serial#", gsc_get_serial());
 	env_set("model", gsc_get_model());
 
 	/* Set fdt_file vars */
-- 
2.17.1


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

* [PATCH 3/5] arm: dts: imx8mm-venice-gw700x: fix mp5416 pmic config
  2021-08-18 21:51 [PATCH 1/5] board: gateworks: venice: display hwmon details by default Tim Harvey
  2021-08-18 21:51 ` [PATCH 2/5] board: gateworks: venice: do not overwrite serial# Tim Harvey
@ 2021-08-18 21:51 ` Tim Harvey
  2021-08-18 21:51 ` [PATCH 4/5] board: gateworks: venice: update thermal temp thresholds per cpu grade Tim Harvey
  2021-08-18 21:51 ` [PATCH 5/5] arm: dts: imx8mm-venice*: remove thermal zone overrides Tim Harvey
  3 siblings, 0 replies; 9+ messages in thread
From: Tim Harvey @ 2021-08-18 21:51 UTC (permalink / raw
  To: Stefano Babic, Fabio Estevam, NXP i . MX U-Boot Team, u-boot; +Cc: Tim Harvey

Fix various MP5416 PMIC configurations:
 - Update regulator names per dt-bindings
 - ensure values fit among valid register values
 - add required regulator-max-microamp property
 - add regulator-always-on prop

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
---
 arch/arm/dts/imx8mm-venice-gw700x.dtsi | 56 +++++++++++++++++---------
 1 file changed, 37 insertions(+), 19 deletions(-)

diff --git a/arch/arm/dts/imx8mm-venice-gw700x.dtsi b/arch/arm/dts/imx8mm-venice-gw700x.dtsi
index cc850e7dce..f182a816b5 100644
--- a/arch/arm/dts/imx8mm-venice-gw700x.dtsi
+++ b/arch/arm/dts/imx8mm-venice-gw700x.dtsi
@@ -282,65 +282,83 @@
 		reg = <0x69>;
 
 		regulators {
+			/* vdd_0p95: DRAM/GPU/VPU */
 			buck1 {
-				regulator-name = "vdd_0p95";
-				regulator-min-microvolt = <805000>;
+				regulator-name = "buck1";
+				regulator-min-microvolt = <800000>;
 				regulator-max-microvolt = <1000000>;
-				regulator-max-microamp = <2500000>;
+				regulator-min-microamp  = <3800000>;
+				regulator-max-microamp  = <6800000>;
 				regulator-boot-on;
+				regulator-always-on;
 			};
 
+			/* vdd_soc */
 			buck2 {
-				regulator-name = "vdd_soc";
-				regulator-min-microvolt = <805000>;
+				regulator-name = "buck2";
+				regulator-min-microvolt = <800000>;
 				regulator-max-microvolt = <900000>;
-				regulator-max-microamp = <1000000>;
+				regulator-min-microamp  = <2200000>;
+				regulator-max-microamp  = <5200000>;
 				regulator-boot-on;
+				regulator-always-on;
 			};
 
+			/* vdd_arm */
 			buck3_reg: buck3 {
-				regulator-name = "vdd_arm";
-				regulator-min-microvolt = <805000>;
+				regulator-name = "buck3";
+				regulator-min-microvolt = <800000>;
 				regulator-max-microvolt = <1000000>;
-				regulator-max-microamp = <2200000>;
-				regulator-boot-on;
+				regulator-min-microamp  = <3800000>;
+				regulator-max-microamp  = <6800000>;
+				regulator-always-on;
 			};
 
+			/* vdd_1p8 */
 			buck4 {
-				regulator-name = "vdd_1p8";
+				regulator-name = "buck4";
 				regulator-min-microvolt = <1800000>;
 				regulator-max-microvolt = <1800000>;
-				regulator-max-microamp = <500000>;
+				regulator-min-microamp  = <2200000>;
+				regulator-max-microamp  = <5200000>;
 				regulator-boot-on;
+				regulator-always-on;
 			};
 
+			/* nvcc_snvs_1p8 */
 			ldo1 {
-				regulator-name = "nvcc_snvs_1p8";
+				regulator-name = "ldo1";
 				regulator-min-microvolt = <1800000>;
 				regulator-max-microvolt = <1800000>;
-				regulator-max-microamp = <300000>;
 				regulator-boot-on;
+				regulator-always-on;
 			};
 
+			/* vdd_snvs_0p8 */
 			ldo2 {
-				regulator-name = "vdd_snvs_0p8";
+				regulator-name = "ldo2";
 				regulator-min-microvolt = <800000>;
 				regulator-max-microvolt = <800000>;
 				regulator-boot-on;
+				regulator-always-on;
 			};
 
+			/* vdd_0p9 */
 			ldo3 {
-				regulator-name = "vdd_0p95";
-				regulator-min-microvolt = <800000>;
-				regulator-max-microvolt = <800000>;
+				regulator-name = "ldo3";
+				regulator-min-microvolt = <900000>;
+				regulator-max-microvolt = <900000>;
 				regulator-boot-on;
+				regulator-always-on;
 			};
 
+			/* vdd_1p8 */
 			ldo4 {
-				regulator-name = "vdd_1p8";
+				regulator-name = "ldo4";
 				regulator-min-microvolt = <1800000>;
 				regulator-max-microvolt = <1800000>;
 				regulator-boot-on;
+				regulator-always-on;
 			};
 		};
 	};
-- 
2.17.1


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

* [PATCH 4/5] board: gateworks: venice: update thermal temp thresholds per cpu grade
  2021-08-18 21:51 [PATCH 1/5] board: gateworks: venice: display hwmon details by default Tim Harvey
  2021-08-18 21:51 ` [PATCH 2/5] board: gateworks: venice: do not overwrite serial# Tim Harvey
  2021-08-18 21:51 ` [PATCH 3/5] arm: dts: imx8mm-venice-gw700x: fix mp5416 pmic config Tim Harvey
@ 2021-08-18 21:51 ` Tim Harvey
  2021-08-18 21:51 ` [PATCH 5/5] arm: dts: imx8mm-venice*: remove thermal zone overrides Tim Harvey
  3 siblings, 0 replies; 9+ messages in thread
From: Tim Harvey @ 2021-08-18 21:51 UTC (permalink / raw
  To: Stefano Babic, Fabio Estevam, NXP i . MX U-Boot Team, u-boot; +Cc: Tim Harvey

Update the passive/critical thermal zone dt config per CPU temperature
grade.

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

diff --git a/board/gateworks/venice/imx8mm_venice.c b/board/gateworks/venice/imx8mm_venice.c
index 46f4bff925..4e05802b6f 100644
--- a/board/gateworks/venice/imx8mm_venice.c
+++ b/board/gateworks/venice/imx8mm_venice.c
@@ -156,8 +156,26 @@ int board_mmc_get_env_dev(int devno)
 
 int ft_board_setup(void *blob, struct bd_info *bd)
 {
+	int off;
+
 	/* set board model dt prop */
 	fdt_setprop_string(blob, 0, "board", gsc_get_model());
 
+	/* update temp thresholds */
+	off = fdt_path_offset(blob, "/thermal-zones/cpu-thermal/trips");
+	if (off >= 0) {
+		int minc, maxc, prop;
+
+		get_cpu_temp_grade(&minc, &maxc);
+		fdt_for_each_subnode(prop, blob, off) {
+			const char *type = fdt_getprop(blob, prop, "type", NULL);
+
+			if (type && (!strcmp("critical", type)))
+				fdt_setprop_u32(blob, prop, "temperature", maxc * 1000);
+			else if (type && (!strcmp("passive", type)))
+				fdt_setprop_u32(blob, prop, "temperature", (maxc - 10) * 1000);
+		}
+	}
+
 	return 0;
 }
-- 
2.17.1


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

* [PATCH 5/5] arm: dts: imx8mm-venice*: remove thermal zone overrides
  2021-08-18 21:51 [PATCH 1/5] board: gateworks: venice: display hwmon details by default Tim Harvey
                   ` (2 preceding siblings ...)
  2021-08-18 21:51 ` [PATCH 4/5] board: gateworks: venice: update thermal temp thresholds per cpu grade Tim Harvey
@ 2021-08-18 21:51 ` Tim Harvey
  3 siblings, 0 replies; 9+ messages in thread
From: Tim Harvey @ 2021-08-18 21:51 UTC (permalink / raw
  To: Stefano Babic, Fabio Estevam, NXP i . MX U-Boot Team, u-boot; +Cc: Tim Harvey

Remove the unnecessary thermal zone overrides.

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
---
 arch/arm/dts/imx8mm-venice-gw7901.dts | 12 ------------
 arch/arm/dts/imx8mm-venice-gw7902.dts | 12 ------------
 2 files changed, 24 deletions(-)

diff --git a/arch/arm/dts/imx8mm-venice-gw7901.dts b/arch/arm/dts/imx8mm-venice-gw7901.dts
index 124e1e4e70..d5cdbb7f99 100644
--- a/arch/arm/dts/imx8mm-venice-gw7901.dts
+++ b/arch/arm/dts/imx8mm-venice-gw7901.dts
@@ -1041,15 +1041,3 @@
 		>;
 	};
 };
-
-&cpu_alert0 {
-	temperature = <95000>;
-	hysteresis = <2000>;
-	type = "passive";
-};
-
-&cpu_crit0 {
-	temperature = <105000>;
-	hysteresis = <2000>;
-	type = "critical";
-};
diff --git a/arch/arm/dts/imx8mm-venice-gw7902.dts b/arch/arm/dts/imx8mm-venice-gw7902.dts
index 2948821644..07e436be95 100644
--- a/arch/arm/dts/imx8mm-venice-gw7902.dts
+++ b/arch/arm/dts/imx8mm-venice-gw7902.dts
@@ -913,15 +913,3 @@
 		>;
 	};
 };
-
-&cpu_alert0 {
-	temperature = <95000>;
-	hysteresis = <2000>;
-	type = "passive";
-};
-
-&cpu_crit0 {
-	temperature = <105000>;
-	hysteresis = <2000>;
-	type = "critical";
-};
-- 
2.17.1


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

* Re: [PATCH 2/5] board: gateworks: venice: do not overwrite serial#
  2021-08-18 21:51 ` [PATCH 2/5] board: gateworks: venice: do not overwrite serial# Tim Harvey
@ 2021-08-18 21:54   ` Fabio Estevam
  2021-08-18 22:03     ` Tim Harvey
  0 siblings, 1 reply; 9+ messages in thread
From: Fabio Estevam @ 2021-08-18 21:54 UTC (permalink / raw
  To: Tim Harvey; +Cc: Stefano Babic, NXP i . MX U-Boot Team, U-Boot-Denx

Hi Tim,

On Wed, Aug 18, 2021 at 6:51 PM Tim Harvey <tharvey@gateworks.com> wrote:
>
> Do not overwrite existing serial# env to avoid:

Missed a sentence here?

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

* Re: [PATCH 2/5] board: gateworks: venice: do not overwrite serial#
  2021-08-18 21:54   ` Fabio Estevam
@ 2021-08-18 22:03     ` Tim Harvey
  2021-08-18 22:06       ` Fabio Estevam
  0 siblings, 1 reply; 9+ messages in thread
From: Tim Harvey @ 2021-08-18 22:03 UTC (permalink / raw
  To: Fabio Estevam; +Cc: Stefano Babic, NXP i . MX U-Boot Team, U-Boot-Denx

On Wed, Aug 18, 2021 at 2:54 PM Fabio Estevam <festevam@gmail.com> wrote:
>
> Hi Tim,
>
> On Wed, Aug 18, 2021 at 6:51 PM Tim Harvey <tharvey@gateworks.com> wrote:
> >
> > Do not overwrite existing serial# env to avoid:
>
> Missed a sentence here?

Ooops... the error starts with '#' so was not put in the commit.
Should I send just that one patch as a v2 and leave the rest alone?

Thanks,

Tim

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

* Re: [PATCH 2/5] board: gateworks: venice: do not overwrite serial#
  2021-08-18 22:03     ` Tim Harvey
@ 2021-08-18 22:06       ` Fabio Estevam
  2021-08-18 22:52         ` Tim Harvey
  0 siblings, 1 reply; 9+ messages in thread
From: Fabio Estevam @ 2021-08-18 22:06 UTC (permalink / raw
  To: Tim Harvey; +Cc: Stefano Babic, NXP i . MX U-Boot Team, U-Boot-Denx

Hi Tim,

On Wed, Aug 18, 2021 at 7:03 PM Tim Harvey <tharvey@gateworks.com> wrote:

> Ooops... the error starts with '#' so was not put in the commit.
> Should I send just that one patch as a v2 and leave the rest alone?

It is preferred if you could just re-send the whole series as v2.

It makes Stefano's life easier :-)

The other patches look good to me.

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

* Re: [PATCH 2/5] board: gateworks: venice: do not overwrite serial#
  2021-08-18 22:06       ` Fabio Estevam
@ 2021-08-18 22:52         ` Tim Harvey
  0 siblings, 0 replies; 9+ messages in thread
From: Tim Harvey @ 2021-08-18 22:52 UTC (permalink / raw
  To: Fabio Estevam; +Cc: Stefano Babic, NXP i . MX U-Boot Team, U-Boot-Denx

On Wed, Aug 18, 2021 at 3:07 PM Fabio Estevam <festevam@gmail.com> wrote:
>
> Hi Tim,
>
> On Wed, Aug 18, 2021 at 7:03 PM Tim Harvey <tharvey@gateworks.com> wrote:
>
> > Ooops... the error starts with '#' so was not put in the commit.
> > Should I send just that one patch as a v2 and leave the rest alone?
>
> It is preferred if you could just re-send the whole series as v2.
>
> It makes Stefano's life easier :-)
>
> The other patches look good to me.

Fabio,

Thanks - re-submitted v2.

Tim

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

end of thread, other threads:[~2021-08-18 22:53 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-08-18 21:51 [PATCH 1/5] board: gateworks: venice: display hwmon details by default Tim Harvey
2021-08-18 21:51 ` [PATCH 2/5] board: gateworks: venice: do not overwrite serial# Tim Harvey
2021-08-18 21:54   ` Fabio Estevam
2021-08-18 22:03     ` Tim Harvey
2021-08-18 22:06       ` Fabio Estevam
2021-08-18 22:52         ` Tim Harvey
2021-08-18 21:51 ` [PATCH 3/5] arm: dts: imx8mm-venice-gw700x: fix mp5416 pmic config Tim Harvey
2021-08-18 21:51 ` [PATCH 4/5] board: gateworks: venice: update thermal temp thresholds per cpu grade Tim Harvey
2021-08-18 21:51 ` [PATCH 5/5] arm: dts: imx8mm-venice*: remove thermal zone overrides Tim Harvey

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.