Thread (79 messages) flat view 79 messages, 8 authors, 2018-09-11
STALE2765d

[PATCH v3 27/30] ARM: dts: sun8i: h3: use calibration for ths

From: Philipp Rossak <hidden>
Date: 2018-08-30 15:45:53
Also in: linux-devicetree, linux-iio, lkml
Subsystem: the rest · Maintainer: Linus Torvalds

The H3 SID is supported by the kernel so we can add a NVMEM Data cell,
that contains the calibration data.

On the H3 the eFuses are located at the offset 0x200. The thermal data
itself has an offset of 0x34 from the eFuse base. So we end on an offset
of 0x234.

Signed-off-by: Philipp Rossak <redacted>
---
 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 1866aec69ec1..0fc447f0c02a 100644
--- a/arch/arm/boot/dts/sun8i-h3.dtsi
+++ b/arch/arm/boot/dts/sun8i-h3.dtsi
@@ -106,8 +106,15 @@
 
 	soc {
 		sid: eeprom at 1c14000 {
+			#address-cells = <1>;
+			#size-cells = <1>;
 			compatible = "allwinner,sun8i-h3-sid";
 			reg = <0x01c14000 0x400>;
+
+			/* Data cells */
+			thermal_calibration: calib at 234 {
+				reg = <0x234 0x8>;
+			};
 		};
 	};
 
@@ -227,4 +234,6 @@
 &ths {
 	compatible = "allwinner,sun8i-h3-ths";
 	#thermal-sensor-cells = <0>;
+	nvmem-cells = <&thermal_calibration>;
+	nvmem-cell-names = "calibration";
 };
-- 
2.11.0
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help