* [PATCH 1/2] arm64: dts: rockchip: add thermal infrastructure to px30
@ 2019-11-16 9:52 Heiko Stuebner
2019-11-16 9:52 ` [PATCH 2/2] arm64: dts: rockchip: enable tsadc on px30-evb Heiko Stuebner
2019-11-18 0:58 ` [PATCH 1/2] arm64: dts: rockchip: add thermal infrastructure to px30 Heiko Stuebner
0 siblings, 2 replies; 3+ messages in thread
From: Heiko Stuebner @ 2019-11-16 9:52 UTC (permalink / raw)
To: linux-rockchip
Cc: linux-kernel, linux-arm-kernel, christoph.muellner, heiko,
Heiko Stuebner
From: Heiko Stuebner <heiko.stuebner@theobroma-systems.com>
Add tsadc and necessary connections to core px30 components.
Signed-off-by: Heiko Stuebner <heiko.stuebner@theobroma-systems.com>
---
arch/arm64/boot/dts/rockchip/px30.dtsi | 71 ++++++++++++++++++++++++++
1 file changed, 71 insertions(+)
diff --git a/arch/arm64/boot/dts/rockchip/px30.dtsi b/arch/arm64/boot/dts/rockchip/px30.dtsi
index c9cb73ba7bec..c68d6fede53d 100644
--- a/arch/arm64/boot/dts/rockchip/px30.dtsi
+++ b/arch/arm64/boot/dts/rockchip/px30.dtsi
@@ -10,6 +10,7 @@
#include <dt-bindings/pinctrl/rockchip.h>
#include <dt-bindings/power/px30-power.h>
#include <dt-bindings/soc/rockchip,boot-mode.h>
+#include <dt-bindings/thermal/thermal.h>
/ {
compatible = "rockchip,px30";
@@ -181,6 +182,55 @@
<GIC_PPI 10 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_HIGH)>;
};
+ thermal_zones: thermal-zones {
+ soc_thermal: soc-thermal {
+ polling-delay-passive = <20>;
+ polling-delay = <1000>;
+ sustainable-power = <750>;
+ thermal-sensors = <&tsadc 0>;
+
+ trips {
+ threshold: trip-point-0 {
+ temperature = <70000>;
+ hysteresis = <2000>;
+ type = "passive";
+ };
+
+ target: trip-point-1 {
+ temperature = <85000>;
+ hysteresis = <2000>;
+ type = "passive";
+ };
+
+ soc_crit: soc-crit {
+ temperature = <115000>;
+ hysteresis = <2000>;
+ type = "critical";
+ };
+ };
+
+ cooling-maps {
+ map0 {
+ trip = <&target>;
+ cooling-device = <&cpu0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
+ contribution = <4096>;
+ };
+
+ map1 {
+ trip = <&target>;
+ cooling-device = <&gpu THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
+ contribution = <4096>;
+ };
+ };
+ };
+
+ gpu_thermal: gpu-thermal {
+ polling-delay-passive = <100>; /* milliseconds */
+ polling-delay = <1000>; /* milliseconds */
+ thermal-sensors = <&tsadc 1>;
+ };
+ };
+
xin24m: xin24m {
compatible = "fixed-clock";
#clock-cells = <0>;
@@ -645,6 +695,26 @@
};
};
+ tsadc: tsadc@ff280000 {
+ compatible = "rockchip,px30-tsadc";
+ reg = <0x0 0xff280000 0x0 0x100>;
+ interrupts = <GIC_SPI 36 IRQ_TYPE_LEVEL_HIGH>;
+ assigned-clocks = <&cru SCLK_TSADC>;
+ assigned-clock-rates = <50000>;
+ clocks = <&cru SCLK_TSADC>, <&cru PCLK_TSADC>;
+ clock-names = "tsadc", "apb_pclk";
+ resets = <&cru SRST_TSADC>;
+ reset-names = "tsadc-apb";
+ rockchip,grf = <&grf>;
+ rockchip,hw-tshut-temp = <120000>;
+ pinctrl-names = "init", "default", "sleep";
+ pinctrl-0 = <&tsadc_otp_gpio>;
+ pinctrl-1 = <&tsadc_otp_out>;
+ pinctrl-2 = <&tsadc_otp_gpio>;
+ #thermal-sensor-cells = <1>;
+ status = "disabled";
+ };
+
saradc: saradc@ff288000 {
compatible = "rockchip,px30-saradc", "rockchip,rk3399-saradc";
reg = <0x0 0xff288000 0x0 0x100>;
@@ -886,6 +956,7 @@
<GIC_SPI 45 IRQ_TYPE_LEVEL_HIGH>;
interrupt-names = "job", "mmu", "gpu";
clocks = <&cru SCLK_GPU>;
+ #cooling-cells = <2>;
power-domains = <&power PX30_PD_GPU>;
status = "disabled";
};
--
2.24.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [PATCH 2/2] arm64: dts: rockchip: enable tsadc on px30-evb
2019-11-16 9:52 [PATCH 1/2] arm64: dts: rockchip: add thermal infrastructure to px30 Heiko Stuebner
@ 2019-11-16 9:52 ` Heiko Stuebner
2019-11-18 0:58 ` [PATCH 1/2] arm64: dts: rockchip: add thermal infrastructure to px30 Heiko Stuebner
1 sibling, 0 replies; 3+ messages in thread
From: Heiko Stuebner @ 2019-11-16 9:52 UTC (permalink / raw)
To: linux-rockchip
Cc: linux-kernel, linux-arm-kernel, christoph.muellner, heiko,
Heiko Stuebner
From: Heiko Stuebner <heiko.stuebner@theobroma-systems.com>
Enable the tsadc thermal controller on px30-evb.
Signed-off-by: Heiko Stuebner <heiko.stuebner@theobroma-systems.com>
---
arch/arm64/boot/dts/rockchip/px30-evb.dts | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/arch/arm64/boot/dts/rockchip/px30-evb.dts b/arch/arm64/boot/dts/rockchip/px30-evb.dts
index a482bd4e9146..6eaad68f9315 100644
--- a/arch/arm64/boot/dts/rockchip/px30-evb.dts
+++ b/arch/arm64/boot/dts/rockchip/px30-evb.dts
@@ -529,6 +529,12 @@
status = "okay";
};
+&tsadc {
+ rockchip,hw-tshut-mode = <1>;
+ rockchip,hw-tshut-polarity = <1>;
+ status = "okay";
+};
+
&u2phy {
status = "okay";
--
2.24.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH 1/2] arm64: dts: rockchip: add thermal infrastructure to px30
2019-11-16 9:52 [PATCH 1/2] arm64: dts: rockchip: add thermal infrastructure to px30 Heiko Stuebner
2019-11-16 9:52 ` [PATCH 2/2] arm64: dts: rockchip: enable tsadc on px30-evb Heiko Stuebner
@ 2019-11-18 0:58 ` Heiko Stuebner
1 sibling, 0 replies; 3+ messages in thread
From: Heiko Stuebner @ 2019-11-18 0:58 UTC (permalink / raw)
To: linux-rockchip; +Cc: linux-kernel, linux-arm-kernel, christoph.muellner
Am Samstag, 16. November 2019, 10:52:48 CET schrieb Heiko Stuebner:
> From: Heiko Stuebner <heiko.stuebner@theobroma-systems.com>
>
> Add tsadc and necessary connections to core px30 components.
>
> Signed-off-by: Heiko Stuebner <heiko.stuebner@theobroma-systems.com>
applied both
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2019-11-18 0:58 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-16 9:52 [PATCH 1/2] arm64: dts: rockchip: add thermal infrastructure to px30 Heiko Stuebner
2019-11-16 9:52 ` [PATCH 2/2] arm64: dts: rockchip: enable tsadc on px30-evb Heiko Stuebner
2019-11-18 0:58 ` [PATCH 1/2] arm64: dts: rockchip: add thermal infrastructure to px30 Heiko Stuebner
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).