* [PATCH v2 1/5] ARM: dts :exynos5422-odroidxu3 Add pwm-fan node to the Odroid-XU3 board.
2015-04-09 15:44 v2 Exynos5422 odroidxu3 pwm-fan control using thermal sensors Anand Moon
@ 2015-04-09 15:44 ` Anand Moon
2015-04-09 15:44 ` [PATCH v2 2/5] ARM: dts: OdroidXU3: Enable TMU at Exynos5422 base Anand Moon
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: Anand Moon @ 2015-04-09 15:44 UTC (permalink / raw)
To: linux-arm-kernel
Add pwm-fan node to the OdroidXU3 board.
Tested on OdroidXU3 board.
Changes since v1 : None
Tested-by: Markus Reichl <m.reichl@fivetechno.de>
Acked-by: Lukasz Majewski <l.majewski@samsung.com>
Signed-off-by: Anand Moon <linux.amoon@gmail.com>
---
arch/arm/boot/dts/exynos5422-odroidxu3.dts | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
diff --git a/arch/arm/boot/dts/exynos5422-odroidxu3.dts b/arch/arm/boot/dts/exynos5422-odroidxu3.dts
index a519c86..04d982b 100644
--- a/arch/arm/boot/dts/exynos5422-odroidxu3.dts
+++ b/arch/arm/boot/dts/exynos5422-odroidxu3.dts
@@ -278,6 +278,15 @@
rtc at 101E0000 {
status = "okay";
};
+
+ fan0: pwm-fan {
+ compatible = "pwm-fan";
+ pwms = <&pwm 0 20972 0>;
+ cooling-min-state = <0>;
+ cooling-max-state = <3>;
+ #cooling-cells = <2>;
+ cooling-levels = <0 130 170 230>;
+ };
};
&hdmi {
@@ -369,3 +378,10 @@
shunt-resistor = <10000>;
};
};
+
+&pwm {
+ pinctrl-0 = <&pwm0_out>;
+ pinctrl-names = "default";
+ samsung,pwm-outputs = <0>;
+ status = "okay";
+};
--
1.9.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH v2 2/5] ARM: dts: OdroidXU3: Enable TMU at Exynos5422 base.
2015-04-09 15:44 v2 Exynos5422 odroidxu3 pwm-fan control using thermal sensors Anand Moon
2015-04-09 15:44 ` [PATCH v2 1/5] ARM: dts :exynos5422-odroidxu3 Add pwm-fan node to the Odroid-XU3 board Anand Moon
@ 2015-04-09 15:44 ` Anand Moon
2015-04-09 15:44 ` [PATCH v2 3/5] ARM: dts: define default thermal-zones for exynos5 Anand Moon
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: Anand Moon @ 2015-04-09 15:44 UTC (permalink / raw)
To: linux-arm-kernel
This commit enables TMU IP block on the Exynos5422 OdroidXU3
device.
Tested on OdroidXU3 board.
Changes since v1 : None
Tested-by: Markus Reichl <m.reichl@fivetechno.de>
Acked-by: Lukasz Majewski <l.majewski@samsung.com>
Signed-off-by: Anand Moon <linux.amoon@gmail.com>
---
arch/arm/boot/dts/exynos5422-odroidxu3.dts | 25 +++++++++++++++++++++++++
1 file changed, 25 insertions(+)
diff --git a/arch/arm/boot/dts/exynos5422-odroidxu3.dts b/arch/arm/boot/dts/exynos5422-odroidxu3.dts
index 04d982b..6e7ee53 100644
--- a/arch/arm/boot/dts/exynos5422-odroidxu3.dts
+++ b/arch/arm/boot/dts/exynos5422-odroidxu3.dts
@@ -287,6 +287,31 @@
#cooling-cells = <2>;
cooling-levels = <0 130 170 230>;
};
+
+ tmu at 10060000 {
+ vtmu-supply = <&ldo10_reg>;
+ status = "okay";
+ };
+
+ tmu at 10064000 {
+ vtmu-supply = <&ldo10_reg>;
+ status = "okay";
+ };
+
+ tmu at 10068000 {
+ vtmu-supply = <&ldo10_reg>;
+ status = "okay";
+ };
+
+ tmu at 1006c000 {
+ vtmu-supply = <&ldo10_reg>;
+ status = "okay";
+ };
+
+ tmu at 100a0000 {
+ vtmu-supply = <&ldo10_reg>;
+ status = "okay";
+ };
};
&hdmi {
--
1.9.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH v2 3/5] ARM: dts: define default thermal-zones for exynos5
2015-04-09 15:44 v2 Exynos5422 odroidxu3 pwm-fan control using thermal sensors Anand Moon
2015-04-09 15:44 ` [PATCH v2 1/5] ARM: dts :exynos5422-odroidxu3 Add pwm-fan node to the Odroid-XU3 board Anand Moon
2015-04-09 15:44 ` [PATCH v2 2/5] ARM: dts: OdroidXU3: Enable TMU at Exynos5422 base Anand Moon
@ 2015-04-09 15:44 ` Anand Moon
2015-04-09 15:44 ` [PATCH v2 4/5] ARM: dts exynos5420 update the cooling cells for core cpu0 Anand Moon
2015-04-09 15:44 ` [PATCH v2 5/5] ARM: dts: Enable thermal_zone for exynos5422 Anand Moon
4 siblings, 0 replies; 6+ messages in thread
From: Anand Moon @ 2015-04-09 15:44 UTC (permalink / raw)
To: linux-arm-kernel
Trip points corresponding to the one defined in the exynos_tmu_data.c
for Exynos5 have been included.
This thermal-zones attribute is afterwards reused for Exynos5422.
Changes since v1 : Fixed the thernal_sensor registration of the sensors tmu_cpu0
Tested-by: Markus Reichl <m.reichl@fivetechno.de>
Reviewed-by: Lukasz Majewski <l.majewski@samsung.com>
Signed-off-by: Anand Moon <linux.amoon@gmail.com>
---
arch/arm/boot/dts/exynos5-cpu-thermal.dtsi | 59 ++++++++++++++++++++++++++++++
1 file changed, 59 insertions(+)
create mode 100644 arch/arm/boot/dts/exynos5-cpu-thermal.dtsi
diff --git a/arch/arm/boot/dts/exynos5-cpu-thermal.dtsi b/arch/arm/boot/dts/exynos5-cpu-thermal.dtsi
new file mode 100644
index 0000000..3ce8872
--- /dev/null
+++ b/arch/arm/boot/dts/exynos5-cpu-thermal.dtsi
@@ -0,0 +1,59 @@
+/*
+ * Device tree sources for Exynos5 thermal zone
+ *
+ * Copyright (c) 2015 Lukasz Majewski <l.majewski@samsung.com>
+ * Anand Moon <linux.amoon@gmail.com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ *
+ */
+
+#include <dt-bindings/thermal/thermal.h>
+
+/ {
+ thermal-zones {
+ cpu0_thermal: cpu0-thermal {
+ thermal-sensors = <&tmu_cpu0 0>;
+ polling-delay-passive = <0>;
+ polling-delay = <0>;
+ trips {
+ cpu_alert0: cpu-alert-0 {
+ temperature = <50000>; /* millicelsius */
+ hysteresis = <5000>; /* millicelsius */
+ type = "active";
+ };
+ cpu_alert1: cpu-alert-1 {
+ temperature = <60000>; /* millicelsius */
+ hysteresis = <5000>; /* millicelsius */
+ type = "active";
+ };
+ cpu_alert2: cpu-alert-2 {
+ temperature = <70000>; /* millicelsius */
+ hysteresis = <5000>; /* millicelsius */
+ type = "active";
+ };
+ cpu_crit0: cpu-crit-0 {
+ temperature = <100000>; /* millicelsius */
+ hysteresis = <0>; /* millicelsius */
+ type = "critical";
+ };
+ };
+ cooling-maps {
+ map0 {
+ trip = <&cpu_alert0>;
+ cooling-device = <&fan0 0 1>;
+ };
+ map1 {
+ trip = <&cpu_alert1>;
+ cooling-device = <&fan0 1 2>;
+ };
+ map2 {
+ trip = <&cpu_alert2>;
+ cooling-device = <&fan0 2 3>;
+ };
+ };
+ };
+ };
+};
--
1.9.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH v2 4/5] ARM: dts exynos5420 update the cooling cells for core cpu0
2015-04-09 15:44 v2 Exynos5422 odroidxu3 pwm-fan control using thermal sensors Anand Moon
` (2 preceding siblings ...)
2015-04-09 15:44 ` [PATCH v2 3/5] ARM: dts: define default thermal-zones for exynos5 Anand Moon
@ 2015-04-09 15:44 ` Anand Moon
2015-04-09 15:44 ` [PATCH v2 5/5] ARM: dts: Enable thermal_zone for exynos5422 Anand Moon
4 siblings, 0 replies; 6+ messages in thread
From: Anand Moon @ 2015-04-09 15:44 UTC (permalink / raw)
To: linux-arm-kernel
update the cooling level for cpu0 to avoid following message.
root at odroidxu3:~# dmesg | grep ther
[ 0.241511] /thermal-zones/cpu-thermal/cooling-maps/map0:
could not get #cooling-cells for /cpus/cpu at 0
Tested on OdroidXU3
Changes since v1 : None
Tested-by: Markus Reichl <m.reichl@fivetechno.de>
Acked-by: Lukasz Majewski <l.majewski@samsung.com>
Signed-off-by: Anand Moon <linux.amoon@gmail.com>
---
arch/arm/boot/dts/exynos5420.dtsi | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/arch/arm/boot/dts/exynos5420.dtsi b/arch/arm/boot/dts/exynos5420.dtsi
index c0e98cf..6b49f3c 100644
--- a/arch/arm/boot/dts/exynos5420.dtsi
+++ b/arch/arm/boot/dts/exynos5420.dtsi
@@ -61,6 +61,10 @@
reg = <0x0>;
clock-frequency = <1800000000>;
cci-control-port = <&cci_control1>;
+
+ cooling-min-level = <10>;
+ cooling-max-level = <7>;
+ #cooling-cells = <2>; /* min followed by max */
};
cpu1: cpu at 1 {
--
1.9.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH v2 5/5] ARM: dts: Enable thermal_zone for exynos5422.
2015-04-09 15:44 v2 Exynos5422 odroidxu3 pwm-fan control using thermal sensors Anand Moon
` (3 preceding siblings ...)
2015-04-09 15:44 ` [PATCH v2 4/5] ARM: dts exynos5420 update the cooling cells for core cpu0 Anand Moon
@ 2015-04-09 15:44 ` Anand Moon
4 siblings, 0 replies; 6+ messages in thread
From: Anand Moon @ 2015-04-09 15:44 UTC (permalink / raw)
To: linux-arm-kernel
Include exynos5-cpu-thermal.dtsi to enable thermal_zone support.
Changes since v1 : Seperate the include previous patch.
Tested-by: Markus Reichl <m.reichl@fivetechno.de>
Reviewed-by: Lukasz Majewski <l.majewski@samsung.com>
Signed-off-by: Anand Moon <linux.amoon@gmail.com>
---
arch/arm/boot/dts/exynos5422-odroidxu3.dts | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/arm/boot/dts/exynos5422-odroidxu3.dts b/arch/arm/boot/dts/exynos5422-odroidxu3.dts
index 6e7ee53..16a5f10 100644
--- a/arch/arm/boot/dts/exynos5422-odroidxu3.dts
+++ b/arch/arm/boot/dts/exynos5422-odroidxu3.dts
@@ -12,6 +12,7 @@
/dts-v1/;
#include "exynos5800.dtsi"
+#include "exynos5-cpu-thermal.dtsi"
/ {
model = "Hardkernel Odroid XU3";
--
1.9.1
^ permalink raw reply related [flat|nested] 6+ messages in thread