Commit dbb50e7e authored by Josua Mayer's avatar Josua Mayer

linux: half-twins: reconfigure thermal trip points and disable shutdown

Signed-off-by: default avatarJosua Mayer <josua@solid-run.com>
parent 81c59b6b
From 6139e13400bc199ed77a4a82e5cdbcad4a3c890c Mon Sep 17 00:00:00 2001
From: Josua Mayer <josua@solid-run.com>
Date: Wed, 26 Oct 2022 17:31:09 +0300
Subject: [PATCH 27/29] firmware: psci: support disabling shutdown through
device-tree property
Under certain conditions shutdown can be unpractical even in criticial
situations such as heat. Add device-tree property "no-shutdown" to
replace poweroff call with hard reset.
Signed-off-by: Josua Mayer <josua@solid-run.com>
---
drivers/firmware/psci/psci.c | 16 ++++++++++++++--
1 file changed, 14 insertions(+), 2 deletions(-)
diff --git a/drivers/firmware/psci/psci.c b/drivers/firmware/psci/psci.c
index 00af99b6f97c..0bf116f31e90 100644
--- a/drivers/firmware/psci/psci.c
+++ b/drivers/firmware/psci/psci.c
@@ -79,6 +79,7 @@ static u32 psci_function_id[PSCI_FN_MAX];
static u32 psci_cpu_suspend_feature;
static bool psci_system_reset2_supported;
+static bool psci_disable_poweroff;
static inline bool psci_has_ext_power_state(void)
{
@@ -276,7 +277,10 @@ static void psci_sys_reset(enum reboot_mode reboot_mode, const char *cmd)
static void psci_sys_poweroff(void)
{
- invoke_psci_fn(PSCI_0_2_FN_SYSTEM_OFF, 0, 0, 0);
+ if (psci_disable_poweroff)
+ psci_sys_reset(REBOOT_HARD, 0);
+ else
+ invoke_psci_fn(PSCI_0_2_FN_SYSTEM_OFF, 0, 0, 0);
}
static int __init psci_features(u32 psci_func_id)
@@ -497,7 +501,15 @@ static int __init psci_0_2_init(struct device_node *np)
* can be carried out according to the specific version reported
* by firmware
*/
- return psci_probe();
+ err = psci_probe();
+ if (err)
+ return err;
+
+ if (of_property_read_bool(np, "no-poweroff")) {
+ psci_disable_poweroff = true;
+ }
+
+ return 0;
}
/*
--
2.38.0
From c94d4906d30aee9c643a1adf1500e437dfe4d1cf Mon Sep 17 00:00:00 2001
From: Josua Mayer <josua@solid-run.com>
Date: Wed, 26 Oct 2022 17:33:24 +0300
Subject: [PATCH 28/29] arm64: dts: lx2160a: add references for thermal
trip-points and psci nodes
Signed-off-by: Josua Mayer <josua@solid-run.com>
---
.../arm64/boot/dts/freescale/fsl-lx2160a.dtsi | 26 +++++++++----------
1 file changed, 13 insertions(+), 13 deletions(-)
diff --git a/arch/arm64/boot/dts/freescale/fsl-lx2160a.dtsi b/arch/arm64/boot/dts/freescale/fsl-lx2160a.dtsi
index b39d9cf4a95e..53e5881afd36 100644
--- a/arch/arm64/boot/dts/freescale/fsl-lx2160a.dtsi
+++ b/arch/arm64/boot/dts/freescale/fsl-lx2160a.dtsi
@@ -408,7 +408,7 @@ pmu {
interrupts = <GIC_PPI 7 IRQ_TYPE_LEVEL_LOW>;
};
- psci {
+ psci: psci {
compatible = "arm,psci-0.2";
method = "smc";
};
@@ -491,13 +491,13 @@ ddr-cluster5 {
thermal-sensors = <&tmu 1>;
trips {
- ddr-cluster5-alert {
+ ddr_cluster5_alert: ddr-cluster5-alert {
temperature = <85000>;
hysteresis = <2000>;
type = "passive";
};
- ddr-cluster5-crit {
+ ddr_cluster5_crit: ddr-cluster5-crit {
temperature = <95000>;
hysteresis = <2000>;
type = "critical";
@@ -511,13 +511,13 @@ wriop {
thermal-sensors = <&tmu 2>;
trips {
- wriop-alert {
+ wriop_alert: wriop-alert {
temperature = <85000>;
hysteresis = <2000>;
type = "passive";
};
- wriop-crit {
+ wriop_crit: wriop-crit {
temperature = <95000>;
hysteresis = <2000>;
type = "critical";
@@ -531,13 +531,13 @@ dce-qbman-hsio2 {
thermal-sensors = <&tmu 3>;
trips {
- dce-qbman-alert {
+ dce_qbman_alert: dce-qbman-alert {
temperature = <85000>;
hysteresis = <2000>;
type = "passive";
};
- dce-qbman-crit {
+ dce_qbman_crit: dce-qbman-crit {
temperature = <95000>;
hysteresis = <2000>;
type = "critical";
@@ -551,13 +551,13 @@ ccn-dpaa-tbu {
thermal-sensors = <&tmu 4>;
trips {
- ccn-dpaa-alert {
+ ccn_dpaa_alert: ccn-dpaa-alert {
temperature = <85000>;
hysteresis = <2000>;
type = "passive";
};
- ccn-dpaa-crit {
+ ccn_dpaa_crit: ccn-dpaa-crit {
temperature = <95000>;
hysteresis = <2000>;
type = "critical";
@@ -571,13 +571,13 @@ cluster4-hsio3 {
thermal-sensors = <&tmu 5>;
trips {
- clust4-hsio3-alert {
+ clust4_hsio3_alert: clust4-hsio3-alert {
temperature = <85000>;
hysteresis = <2000>;
type = "passive";
};
- clust4-hsio3-crit {
+ clust4_hsio3_crit: clust4-hsio3-crit {
temperature = <95000>;
hysteresis = <2000>;
type = "critical";
@@ -591,13 +591,13 @@ cluster2-3 {
thermal-sensors = <&tmu 6>;
trips {
- cluster2-3-alert {
+ cluster2_3_alert: cluster2-3-alert {
temperature = <85000>;
hysteresis = <2000>;
type = "passive";
};
- cluster2-3-crit {
+ cluster2_3_crit: cluster2-3-crit {
temperature = <95000>;
hysteresis = <2000>;
type = "critical";
--
2.38.0
From 4c5297048346199029223a7d1f62408d47efb3b0 Mon Sep 17 00:00:00 2001
From: Josua Mayer <josua@solid-run.com>
Date: Wed, 26 Oct 2022 17:34:53 +0300
Subject: [PATCH] arm64: dts: lx2160a-half-twins: reconfigure thermal trip
points
Raise warning and critical limits to 100 and 105 degrees to ensure the
system can run at full speed as long as possible.
Also replace (thermal) shutdown by hard reset to ensure the system won't
stop. RCW will wait for the system to cool down before starting again.
Signed-off-by: Josua Mayer <josua@solid-run.com>
---
.../dts/freescale/fsl-lx2160a-half-twins.dts | 62 +++++++++++++++++++
1 file changed, 62 insertions(+)
diff --git a/arch/arm64/boot/dts/freescale/fsl-lx2160a-half-twins.dts b/arch/arm64/boot/dts/freescale/fsl-lx2160a-half-twins.dts
index 5c3905f28b46..e3175b5f5234 100644
--- a/arch/arm64/boot/dts/freescale/fsl-lx2160a-half-twins.dts
+++ b/arch/arm64/boot/dts/freescale/fsl-lx2160a-half-twins.dts
@@ -24,6 +24,68 @@ chosen {
};
};
+/* disable power-off */
+&psci {
+ no-poweroff;
+};
+
+/* raise thermal trip points to absolute maximum */
+&cluster6_7_alert {
+ temperature = <100000>;
+};
+
+&cluster6_7_crit {
+ temperature = <105000>;
+};
+
+&ddr_cluster5_alert {
+ temperature = <100000>;
+};
+
+&ddr_cluster5_crit {
+ temperature = <105000>;
+};
+
+&wriop_alert {
+ temperature = <100000>;
+};
+
+&wriop_crit {
+ temperature = <105000>;
+};
+
+&dce_qbman_alert {
+ temperature = <100000>;
+};
+
+&dce_qbman_crit {
+ temperature = <105000>;
+};
+
+&ccn_dpaa_alert {
+ temperature = <100000>;
+};
+
+&ccn_dpaa_crit {
+ temperature = <105000>;
+};
+
+&clust4_hsio3_alert {
+ temperature = <100000>;
+};
+
+&clust4_hsio3_crit {
+ temperature = <105000>;
+};
+
+&cluster2_3_alert {
+ temperature = <100000>;
+};
+
+&cluster2_3_crit {
+ temperature = <105000>;
+};
+
&i2c2 {
i2c-switch@76 {
compatible = "nxp,pca9547";
--
2.38.0
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment