All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 1/5] board: gateworks: venice: display hwmon details by default
@ 2021-08-18 22:24 Tim Harvey
  2021-08-18 22:24 ` [PATCH v2 2/5] board: gateworks: venice: do not overwrite serial# Tim Harvey
                   ` (5 more replies)
  0 siblings, 6 replies; 11+ messages in thread
From: Tim Harvey @ 2021-08-18 22:24 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>
---
v2: no changes
---
 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] 11+ messages in thread

* [PATCH v2 2/5] board: gateworks: venice: do not overwrite serial#
  2021-08-18 22:24 [PATCH v2 1/5] board: gateworks: venice: display hwmon details by default Tim Harvey
@ 2021-08-18 22:24 ` Tim Harvey
  2021-10-07 14:12   ` sbabic
  2021-08-18 22:24 ` [PATCH v2 3/5] arm: dts: imx8mm-venice-gw700x: fix mp5416 pmic config Tim Harvey
                   ` (4 subsequent siblings)
  5 siblings, 1 reply; 11+ messages in thread
From: Tim Harvey @ 2021-08-18 22:24 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:
 ## Error: Can't overwrite "serial#"
 ## Error inserting "serial#" variable, errno=1

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
---
v2: added missing error to commit log
---
 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] 11+ messages in thread

* [PATCH v2 3/5] arm: dts: imx8mm-venice-gw700x: fix mp5416 pmic config
  2021-08-18 22:24 [PATCH v2 1/5] board: gateworks: venice: display hwmon details by default Tim Harvey
  2021-08-18 22:24 ` [PATCH v2 2/5] board: gateworks: venice: do not overwrite serial# Tim Harvey
@ 2021-08-18 22:24 ` Tim Harvey
  2021-10-07 14:13   ` sbabic
  2021-08-18 22:24 ` [PATCH v2 4/5] board: gateworks: venice: update thermal temp thresholds per cpu grade Tim Harvey
                   ` (3 subsequent siblings)
  5 siblings, 1 reply; 11+ messages in thread
From: Tim Harvey @ 2021-08-18 22:24 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>
---
v2: no changes
---
 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] 11+ messages in thread

* [PATCH v2 4/5] board: gateworks: venice: update thermal temp thresholds per cpu grade
  2021-08-18 22:24 [PATCH v2 1/5] board: gateworks: venice: display hwmon details by default Tim Harvey
  2021-08-18 22:24 ` [PATCH v2 2/5] board: gateworks: venice: do not overwrite serial# Tim Harvey
  2021-08-18 22:24 ` [PATCH v2 3/5] arm: dts: imx8mm-venice-gw700x: fix mp5416 pmic config Tim Harvey
@ 2021-08-18 22:24 ` Tim Harvey
  2021-10-07 14:14   ` sbabic
  2021-08-18 22:24 ` [PATCH v2 5/5] arm: dts: imx8mm-venice*: remove thermal zone overrides Tim Harvey
                   ` (2 subsequent siblings)
  5 siblings, 1 reply; 11+ messages in thread
From: Tim Harvey @ 2021-08-18 22:24 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>
---
v2: no changes
---
 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] 11+ messages in thread

* [PATCH v2 5/5] arm: dts: imx8mm-venice*: remove thermal zone overrides
  2021-08-18 22:24 [PATCH v2 1/5] board: gateworks: venice: display hwmon details by default Tim Harvey
                   ` (2 preceding siblings ...)
  2021-08-18 22:24 ` [PATCH v2 4/5] board: gateworks: venice: update thermal temp thresholds per cpu grade Tim Harvey
@ 2021-08-18 22:24 ` Tim Harvey
  2021-10-07 14:13   ` sbabic
  2021-08-23 18:04 ` [PATCH v2 1/5] board: gateworks: venice: display hwmon details by default Fabio Estevam
  2021-10-07 14:13 ` sbabic
  5 siblings, 1 reply; 11+ messages in thread
From: Tim Harvey @ 2021-08-18 22:24 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>
---
v2: no changes
---
 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] 11+ messages in thread

* Re: [PATCH v2 1/5] board: gateworks: venice: display hwmon details by default
  2021-08-18 22:24 [PATCH v2 1/5] board: gateworks: venice: display hwmon details by default Tim Harvey
                   ` (3 preceding siblings ...)
  2021-08-18 22:24 ` [PATCH v2 5/5] arm: dts: imx8mm-venice*: remove thermal zone overrides Tim Harvey
@ 2021-08-23 18:04 ` Fabio Estevam
  2021-10-07 14:13 ` sbabic
  5 siblings, 0 replies; 11+ messages in thread
From: Fabio Estevam @ 2021-08-23 18:04 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:24 PM Tim Harvey <tharvey@gateworks.com> wrote:
>
> Display hwmon values by default when using the 'gsc' command.
>
> Signed-off-by: Tim Harvey <tharvey@gateworks.com>
> ---
> v2: no changes

For the v2 series:

Reviewed-by: Fabio Estevam <festevam@gmail.com>

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

* [PATCH v2 2/5] board: gateworks: venice: do not overwrite serial#
  2021-08-18 22:24 ` [PATCH v2 2/5] board: gateworks: venice: do not overwrite serial# Tim Harvey
@ 2021-10-07 14:12   ` sbabic
  0 siblings, 0 replies; 11+ messages in thread
From: sbabic @ 2021-10-07 14:12 UTC (permalink / raw)
  To: Tim Harvey, U-Boot

> Do not overwrite existing serial# env to avoid:
>  ## Error: Can't overwrite "serial#"
>  ## Error inserting "serial#" variable, errno=1
> 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] 11+ messages in thread

* [PATCH v2 1/5] board: gateworks: venice: display hwmon details by default
  2021-08-18 22:24 [PATCH v2 1/5] board: gateworks: venice: display hwmon details by default Tim Harvey
                   ` (4 preceding siblings ...)
  2021-08-23 18:04 ` [PATCH v2 1/5] board: gateworks: venice: display hwmon details by default Fabio Estevam
@ 2021-10-07 14:13 ` sbabic
  5 siblings, 0 replies; 11+ messages in thread
From: sbabic @ 2021-10-07 14:13 UTC (permalink / raw)
  To: Tim Harvey, U-Boot

> Display hwmon values by default when using the 'gsc' command.
> Signed-off-by: Tim Harvey <tharvey@gateworks.com>
> Reviewed-by: Fabio Estevam <festevam@gmail.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] 11+ messages in thread

* [PATCH v2 3/5] arm: dts: imx8mm-venice-gw700x: fix mp5416 pmic config
  2021-08-18 22:24 ` [PATCH v2 3/5] arm: dts: imx8mm-venice-gw700x: fix mp5416 pmic config Tim Harvey
@ 2021-10-07 14:13   ` sbabic
  0 siblings, 0 replies; 11+ messages in thread
From: sbabic @ 2021-10-07 14:13 UTC (permalink / raw)
  To: Tim Harvey, U-Boot

> 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>
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] 11+ messages in thread

* [PATCH v2 5/5] arm: dts: imx8mm-venice*: remove thermal zone overrides
  2021-08-18 22:24 ` [PATCH v2 5/5] arm: dts: imx8mm-venice*: remove thermal zone overrides Tim Harvey
@ 2021-10-07 14:13   ` sbabic
  0 siblings, 0 replies; 11+ messages in thread
From: sbabic @ 2021-10-07 14:13 UTC (permalink / raw)
  To: Tim Harvey, U-Boot

> Remove the unnecessary thermal zone overrides.
> 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] 11+ messages in thread

* [PATCH v2 4/5] board: gateworks: venice: update thermal temp thresholds per cpu grade
  2021-08-18 22:24 ` [PATCH v2 4/5] board: gateworks: venice: update thermal temp thresholds per cpu grade Tim Harvey
@ 2021-10-07 14:14   ` sbabic
  0 siblings, 0 replies; 11+ messages in thread
From: sbabic @ 2021-10-07 14:14 UTC (permalink / raw)
  To: Tim Harvey, U-Boot

> Update the passive/critical thermal zone dt config per CPU temperature
> grade.
> 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] 11+ messages in thread

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

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-18 22:24 [PATCH v2 1/5] board: gateworks: venice: display hwmon details by default Tim Harvey
2021-08-18 22:24 ` [PATCH v2 2/5] board: gateworks: venice: do not overwrite serial# Tim Harvey
2021-10-07 14:12   ` sbabic
2021-08-18 22:24 ` [PATCH v2 3/5] arm: dts: imx8mm-venice-gw700x: fix mp5416 pmic config Tim Harvey
2021-10-07 14:13   ` sbabic
2021-08-18 22:24 ` [PATCH v2 4/5] board: gateworks: venice: update thermal temp thresholds per cpu grade Tim Harvey
2021-10-07 14:14   ` sbabic
2021-08-18 22:24 ` [PATCH v2 5/5] arm: dts: imx8mm-venice*: remove thermal zone overrides Tim Harvey
2021-10-07 14:13   ` sbabic
2021-08-23 18:04 ` [PATCH v2 1/5] board: gateworks: venice: display hwmon details by default Fabio Estevam
2021-10-07 14:13 ` 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.