Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1694317 > unrolled thread

[PATCH v3 0/5] IIO-based thermal sensor driver for Allwinner H3 SoC

Started byIcenowy Zheng <icenowy@aosc.io>
First post2017-07-23 16:20 +0200
Last post2017-07-23 16:20 +0200
Articles 2 — 1 participant

Back to article view | Back to linux.kernel


Contents

  [PATCH v3 0/5] IIO-based thermal sensor driver for Allwinner H3 SoC Icenowy Zheng <icenowy@aosc.io> - 2017-07-23 16:20 +0200
    [PATCH v3 5/5] ARM: sun8i: h3: add partial CPU thermal zone Icenowy Zheng <icenowy@aosc.io> - 2017-07-23 16:20 +0200

#1694317 — [PATCH v3 0/5] IIO-based thermal sensor driver for Allwinner H3 SoC

FromIcenowy Zheng <icenowy@aosc.io>
Date2017-07-23 16:20 +0200
Subject[PATCH v3 0/5] IIO-based thermal sensor driver for Allwinner H3 SoC
Message-ID<u6pTH-7j-11@gated-at.bofh.it>
Allwiner H3 SoC has a thermal sensor, which is a large refactored version of
the old Allwinner "GPADC" (although it have already only thermal part left
in A33).

This patch tried to add support for the sensor in H3 based on the A33 thermal
sensor driver by Quentin Schulz, which is already merged.

Icenowy Zheng (5):
  dt-bindings: update the Allwinner GPADC device tree binding for H3
  iio: adc: sun4i-gpadc-iio: rename A23/A33-specified registers to
    contain A23
  iio: adc: sun4i-gpadc-iio: add support for H3 thermal sensor
  ARM: sun8i: h3: add support for the thermal sensor in H3
  ARM: sun8i: h3: add partial CPU thermal zone

 .../devicetree/bindings/mfd/sun4i-gpadc.txt        |  25 ++-
 arch/arm/boot/dts/sun8i-h3.dtsi                    |  26 +++
 drivers/iio/adc/sun4i-gpadc-iio.c                  | 228 +++++++++++++++++----
 include/linux/mfd/sun4i-gpadc.h                    |  33 ++-
 4 files changed, 267 insertions(+), 45 deletions(-)

-- 
2.13.0

[toc] | [next] | [standalone]


#1694318 — [PATCH v3 5/5] ARM: sun8i: h3: add partial CPU thermal zone

FromIcenowy Zheng <icenowy@aosc.io>
Date2017-07-23 16:20 +0200
Subject[PATCH v3 5/5] ARM: sun8i: h3: add partial CPU thermal zone
Message-ID<u6pTI-7j-27@gated-at.bofh.it>
In reply to#1694317
Because of the restriction of the OF thermal framework, the thermal
sensor will fail to probe if the thermal zone doesn't exist.

Add a partial thermal zone which claims the H3 THS as the thermal sensor.

The cooling device (CPU DVFS) is still not added as it's not ready, and
the trip points are also not added yet.

Signed-off-by: Icenowy Zheng <icenowy@aosc.io>
---
 arch/arm/boot/dts/sun8i-h3.dtsi | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/arch/arm/boot/dts/sun8i-h3.dtsi b/arch/arm/boot/dts/sun8i-h3.dtsi
index efe3a8e4f2af..551efecaab5d 100644
--- a/arch/arm/boot/dts/sun8i-h3.dtsi
+++ b/arch/arm/boot/dts/sun8i-h3.dtsi
@@ -125,6 +125,15 @@
 		};
 	};
 
+	thermal-zones {
+		cpu-thermal {
+			/* milliseconds */
+			polling-delay-passive = <250>;
+			polling-delay = <1000>;
+			thermal-sensors = <&ths>;
+		};
+	};
+
 	timer {
 		compatible = "arm,armv7-timer";
 		interrupts = <GIC_PPI 13 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>,
-- 
2.13.0

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web