[PATCH v2 1/5] board: gateworks: venice: display hwmon details by default

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; }

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 */

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

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; }; }; };

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

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; }

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

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"; -};

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

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

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
participants (3)
-
Fabio Estevam
-
sbabic@denx.de
-
Tim Harvey