linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/7] dt-bindings: Add DT bindings documentation for Allwinner Thermal Sensor Controller
@ 2018-08-04  7:03 Emmanuel Vadot
  2018-08-04  7:03 ` [PATCH 2/7] ARM: dts: sun8i: h3: Add thermal sensor controller node Emmanuel Vadot
                   ` (7 more replies)
  0 siblings, 8 replies; 20+ messages in thread
From: Emmanuel Vadot @ 2018-08-04  7:03 UTC (permalink / raw)
  To: rui.zhang, edubezval, robh+dt, mark.rutland, maxime.ripard, wens,
	catalin.marinas, will.deacon
  Cc: linux-pm, devicetree, linux-arm-kernel, linux-kernel, Emmanuel Vadot

This patch adds documentation for Device-Tree bindings for the Allwinner
Thermal Sensor Controller found on the H3, H5 and A64 SoCs

Signed-off-by: Emmanuel Vadot <manu@freebsd.org>
---
 .../bindings/thermal/allwinner-thermal.txt    | 41 +++++++++++++++++++
 1 file changed, 41 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/thermal/allwinner-thermal.txt

diff --git a/Documentation/devicetree/bindings/thermal/allwinner-thermal.txt b/Documentation/devicetree/bindings/thermal/allwinner-thermal.txt
new file mode 100644
index 000000000000..5810d44cf495
--- /dev/null
+++ b/Documentation/devicetree/bindings/thermal/allwinner-thermal.txt
@@ -0,0 +1,41 @@
+* Thermal Sensor Controller on Allwinner SoCs
+
+Required properties:
+- compatible : should be "allwinner,<name>-ths"
+   "allwinner,sun8i-h3-ths": found on H3 and H2+ SoCs
+   "allwinner,sun50i-h5-ths": found on H5 SoC
+   "allwinner,sun50i-a64-ths": found on H5 SoC
+- reg : physical base address of the controller and length of memory mapped
+	region.
+- interrupts : The interrupt number to the cpu. The interrupt specifier format
+	       depends on the interrupt controller.
+- clocks : Must contain an entry for each entry in clock-names.
+- clock-names : Shall be "apb" for the bus, and "ths" for
+		the peripheral clock.
+- resets : Must contain an entry for each entry in reset-names.
+	   See ../reset/reset.txt for details.
+- reset-names : Must be "apb".
+- #thermal-sensor-cells : Depend on the SoC
+   For H3 should be 0
+   For H5 should be 1
+   For A64 should be 2
+   See ./thermal.txt for a description.
+- nvmem-cells : Phandle to the calibration data
+- nvmem-cell-names = Should be "ths-calib"
+
+Example:
+
+ths: thermal_sensor@1c25000 {
+	compatible = "allwinner,sun8i-h3-ths";
+	reg = <0x01c25000 0x100>;
+	interrupts = <GIC_SPI 31 IRQ_TYPE_LEVEL_HIGH>;
+	clocks = <&ccu CLK_BUS_THS>, <&ccu CLK_THS>;
+	clock-names = "apb", "ths";
+	resets = <&ccu RST_BUS_THS>;
+	reset-names = "apb";
+	#thermal-sensor-cells = <0>;
+	status = "disabled";
+
+	nvmem-cells = <&ths_calib>;
+	nvmem-cell-names = "ths-calib";
+};
-- 
2.18.0


^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [PATCH 2/7] ARM: dts: sun8i: h3: Add thermal sensor controller node
  2018-08-04  7:03 [PATCH 1/7] dt-bindings: Add DT bindings documentation for Allwinner Thermal Sensor Controller Emmanuel Vadot
@ 2018-08-04  7:03 ` Emmanuel Vadot
  2018-08-04  7:03 ` [PATCH 3/7] arm64: dts: allwinner: h5: " Emmanuel Vadot
                   ` (6 subsequent siblings)
  7 siblings, 0 replies; 20+ messages in thread
From: Emmanuel Vadot @ 2018-08-04  7:03 UTC (permalink / raw)
  To: rui.zhang, edubezval, robh+dt, mark.rutland, maxime.ripard, wens,
	catalin.marinas, will.deacon
  Cc: linux-pm, devicetree, linux-arm-kernel, linux-kernel, Emmanuel Vadot

This add the ths controller for the H3 and the nvmem cell for the
calibration data on the sid node.

Signed-off-by: Emmanuel Vadot <manu@freebsd.org>
---
 arch/arm/boot/dts/sun8i-h3.dtsi | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)

diff --git a/arch/arm/boot/dts/sun8i-h3.dtsi b/arch/arm/boot/dts/sun8i-h3.dtsi
index 281038a7d7b4..fcfcd50b398a 100644
--- a/arch/arm/boot/dts/sun8i-h3.dtsi
+++ b/arch/arm/boot/dts/sun8i-h3.dtsi
@@ -145,6 +145,25 @@
 		sid: eeprom@1c14000 {
 			compatible = "allwinner,sun8i-h3-sid";
 			reg = <0x1c14000 0x400>;
+
+			ths_calib: calib@234 {
+				reg = <0x234 0x2>;
+			};
+		};
+
+		ths: thermal_sensor@1c25000 {
+			compatible = "allwinner,sun8i-h3-ths";
+			reg = <0x01c25000 0x100>;
+			interrupts = <GIC_SPI 31 IRQ_TYPE_LEVEL_HIGH>;
+			clocks = <&ccu CLK_BUS_THS>, <&ccu CLK_THS>;
+			clock-names = "apb", "ths";
+			resets = <&ccu RST_BUS_THS>;
+			reset-names = "apb";
+			#thermal-sensor-cells = <0>;
+			status = "disabled";
+
+			nvmem-cells = <&ths_calib>;
+			nvmem-cell-names = "ths-calib";
 		};
 
 		mali: gpu@1c40000 {
-- 
2.18.0


^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [PATCH 3/7] arm64: dts: allwinner: h5: Add thermal sensor controller node
  2018-08-04  7:03 [PATCH 1/7] dt-bindings: Add DT bindings documentation for Allwinner Thermal Sensor Controller Emmanuel Vadot
  2018-08-04  7:03 ` [PATCH 2/7] ARM: dts: sun8i: h3: Add thermal sensor controller node Emmanuel Vadot
@ 2018-08-04  7:03 ` Emmanuel Vadot
  2018-08-04  7:03 ` [PATCH 4/7] arm64: dts: allwinner: a64: " Emmanuel Vadot
                   ` (5 subsequent siblings)
  7 siblings, 0 replies; 20+ messages in thread
From: Emmanuel Vadot @ 2018-08-04  7:03 UTC (permalink / raw)
  To: rui.zhang, edubezval, robh+dt, mark.rutland, maxime.ripard, wens,
	catalin.marinas, will.deacon
  Cc: linux-pm, devicetree, linux-arm-kernel, linux-kernel, Emmanuel Vadot

This add the ths controller for the H5 and the nvmem cell for the
calibration data on the sid node.

Signed-off-by: Emmanuel Vadot <manu@freebsd.org>
---
 arch/arm64/boot/dts/allwinner/sun50i-h5.dtsi | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)

diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h5.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-h5.dtsi
index 9838acaeea58..908237bc5804 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-h5.dtsi
+++ b/arch/arm64/boot/dts/allwinner/sun50i-h5.dtsi
@@ -97,6 +97,25 @@
 		sid: eeprom@1c14000 {
 			compatible = "allwinner,sun50i-h5-sid";
 			reg = <0x1c14000 0x400>;
+
+			ths_calib: calib@234 {
+				reg = <0x234 0x4>;
+			};
+		};
+
+		ths: thermal_sensor@1c25000 {
+			compatible = "allwinner,sun50i-h5-ths";
+			reg = <0x01c25000 0x100>;
+			interrupts = <GIC_SPI 31 IRQ_TYPE_LEVEL_HIGH>;
+			clocks = <&ccu CLK_BUS_THS>, <&ccu CLK_THS>;
+			clock-names = "apb", "ths";
+			resets = <&ccu RST_BUS_THS>;
+			reset-names = "apb";
+			#thermal-sensor-cells = <1>;
+			status = "disabled";
+
+			nvmem-cells = <&ths_calib>;
+			nvmem-cell-names = "ths-calib";
 		};
 	};
 };
-- 
2.18.0


^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [PATCH 4/7] arm64: dts: allwinner: a64: Add thermal sensor controller node
  2018-08-04  7:03 [PATCH 1/7] dt-bindings: Add DT bindings documentation for Allwinner Thermal Sensor Controller Emmanuel Vadot
  2018-08-04  7:03 ` [PATCH 2/7] ARM: dts: sun8i: h3: Add thermal sensor controller node Emmanuel Vadot
  2018-08-04  7:03 ` [PATCH 3/7] arm64: dts: allwinner: h5: " Emmanuel Vadot
@ 2018-08-04  7:03 ` Emmanuel Vadot
  2018-08-04  7:03 ` [PATCH 5/7] ARM: dts: sun8i: h3: Enable the THS on H3 boards Emmanuel Vadot
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 20+ messages in thread
From: Emmanuel Vadot @ 2018-08-04  7:03 UTC (permalink / raw)
  To: rui.zhang, edubezval, robh+dt, mark.rutland, maxime.ripard, wens,
	catalin.marinas, will.deacon
  Cc: linux-pm, devicetree, linux-arm-kernel, linux-kernel, Emmanuel Vadot

This add the ths controller for the A64 and the nvmem cell for the
calibration data on the sid node.

Signed-off-by: Emmanuel Vadot <manu@freebsd.org>
---
 arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)

diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi
index 925bf38fb536..ad72a6fcdd7c 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi
@@ -273,6 +273,25 @@
 		sid: eeprom@1c14000 {
 			compatible = "allwinner,sun50i-a64-sid";
 			reg = <0x1c14000 0x400>;
+
+			ths_calib: calib@234 {
+				reg = <0x234 0x6>;
+			};
+		};
+
+		ths: thermal_sensor@1c25000 {
+			compatible = "allwinner,sun50i-a64-ths";
+			reg = <0x01c25000 0x100>;
+			interrupts = <GIC_SPI 31 IRQ_TYPE_LEVEL_HIGH>;
+			clocks = <&ccu CLK_BUS_THS>, <&ccu CLK_THS>;
+			clock-names = "apb", "ths";
+			resets = <&ccu RST_BUS_THS>;
+			reset-names = "apb";
+			#thermal-sensor-cells = <2>;
+			status = "disabled";
+
+			nvmem-cells = <&ths_calib>;
+			nvmem-cell-names = "ths-calib";
 		};
 
 		usb_otg: usb@1c19000 {
-- 
2.18.0


^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [PATCH 5/7] ARM: dts: sun8i: h3: Enable the THS on H3 boards
  2018-08-04  7:03 [PATCH 1/7] dt-bindings: Add DT bindings documentation for Allwinner Thermal Sensor Controller Emmanuel Vadot
                   ` (2 preceding siblings ...)
  2018-08-04  7:03 ` [PATCH 4/7] arm64: dts: allwinner: a64: " Emmanuel Vadot
@ 2018-08-04  7:03 ` Emmanuel Vadot
  2018-08-04  7:03 ` [PATCH 6/7] arm64: dts: allwinner: a64: Enable the THS on A64 boards Emmanuel Vadot
                   ` (3 subsequent siblings)
  7 siblings, 0 replies; 20+ messages in thread
From: Emmanuel Vadot @ 2018-08-04  7:03 UTC (permalink / raw)
  To: rui.zhang, edubezval, robh+dt, mark.rutland, maxime.ripard, wens,
	catalin.marinas, will.deacon
  Cc: linux-pm, devicetree, linux-arm-kernel, linux-kernel, Emmanuel Vadot

Enable the Thermal Sensor Controller on all H3 boards.

Signed-off-by: Emmanuel Vadot <manu@freebsd.org>
---
 arch/arm/boot/dts/sun8i-h3-bananapi-m2-plus.dts | 4 ++++
 arch/arm/boot/dts/sun8i-h3-beelink-x2.dts       | 4 ++++
 arch/arm/boot/dts/sun8i-h3-nanopi-m1-plus.dts   | 4 ++++
 arch/arm/boot/dts/sun8i-h3-nanopi-m1.dts        | 4 ++++
 arch/arm/boot/dts/sun8i-h3-nanopi-neo-air.dts   | 4 ++++
 arch/arm/boot/dts/sun8i-h3-nanopi-neo.dts       | 4 ++++
 arch/arm/boot/dts/sun8i-h3-nanopi.dtsi          | 4 ++++
 arch/arm/boot/dts/sun8i-h3-orangepi-2.dts       | 4 ++++
 arch/arm/boot/dts/sun8i-h3-orangepi-lite.dts    | 4 ++++
 arch/arm/boot/dts/sun8i-h3-orangepi-one.dts     | 4 ++++
 arch/arm/boot/dts/sun8i-h3-orangepi-pc-plus.dts | 4 ++++
 arch/arm/boot/dts/sun8i-h3-orangepi-pc.dts      | 4 ++++
 arch/arm/boot/dts/sun8i-h3-orangepi-plus.dts    | 4 ++++
 arch/arm/boot/dts/sun8i-h3-orangepi-plus2e.dts  | 4 ++++
 14 files changed, 56 insertions(+)

diff --git a/arch/arm/boot/dts/sun8i-h3-bananapi-m2-plus.dts b/arch/arm/boot/dts/sun8i-h3-bananapi-m2-plus.dts
index 30540dc8e0c5..e6cf879f7324 100644
--- a/arch/arm/boot/dts/sun8i-h3-bananapi-m2-plus.dts
+++ b/arch/arm/boot/dts/sun8i-h3-bananapi-m2-plus.dts
@@ -211,6 +211,10 @@
 	status = "okay";
 };
 
+&ths {
+	status = "okay";
+};
+
 &uart0 {
 	pinctrl-names = "default";
 	pinctrl-0 = <&uart0_pins_a>;
diff --git a/arch/arm/boot/dts/sun8i-h3-beelink-x2.dts b/arch/arm/boot/dts/sun8i-h3-beelink-x2.dts
index 5d23667dc2d2..d95269df8dca 100644
--- a/arch/arm/boot/dts/sun8i-h3-beelink-x2.dts
+++ b/arch/arm/boot/dts/sun8i-h3-beelink-x2.dts
@@ -197,6 +197,10 @@
 	status = "okay";
 };
 
+&ths {
+	status = "okay";
+};
+
 &uart0 {
 	pinctrl-names = "default";
 	pinctrl-0 = <&uart0_pins_a>;
diff --git a/arch/arm/boot/dts/sun8i-h3-nanopi-m1-plus.dts b/arch/arm/boot/dts/sun8i-h3-nanopi-m1-plus.dts
index 65cba1050802..9858ca42a826 100644
--- a/arch/arm/boot/dts/sun8i-h3-nanopi-m1-plus.dts
+++ b/arch/arm/boot/dts/sun8i-h3-nanopi-m1-plus.dts
@@ -135,6 +135,10 @@
 	status = "okay";
 };
 
+&ths {
+	status = "okay";
+};
+
 &uart3 {
 	pinctrl-names = "default";
 	pinctrl-0 = <&uart3_pins>, <&uart3_rts_cts_pins>;
diff --git a/arch/arm/boot/dts/sun8i-h3-nanopi-m1.dts b/arch/arm/boot/dts/sun8i-h3-nanopi-m1.dts
index 9412668bb888..ad9df48f86fa 100644
--- a/arch/arm/boot/dts/sun8i-h3-nanopi-m1.dts
+++ b/arch/arm/boot/dts/sun8i-h3-nanopi-m1.dts
@@ -104,3 +104,7 @@
 &ohci2 {
 	status = "okay";
 };
+
+&ths {
+	status = "okay";
+};
diff --git a/arch/arm/boot/dts/sun8i-h3-nanopi-neo-air.dts b/arch/arm/boot/dts/sun8i-h3-nanopi-neo-air.dts
index 6246d3eff39d..2a21dfedfc31 100644
--- a/arch/arm/boot/dts/sun8i-h3-nanopi-neo-air.dts
+++ b/arch/arm/boot/dts/sun8i-h3-nanopi-neo-air.dts
@@ -103,6 +103,10 @@
 	};
 };
 
+&ths {
+	status = "okay";
+};
+
 &uart0 {
 	pinctrl-names = "default";
 	pinctrl-0 = <&uart0_pins_a>;
diff --git a/arch/arm/boot/dts/sun8i-h3-nanopi-neo.dts b/arch/arm/boot/dts/sun8i-h3-nanopi-neo.dts
index 9f33f6fae595..1122ac363f55 100644
--- a/arch/arm/boot/dts/sun8i-h3-nanopi-neo.dts
+++ b/arch/arm/boot/dts/sun8i-h3-nanopi-neo.dts
@@ -62,6 +62,10 @@
 	status = "okay";
 };
 
+&ths {
+	status = "okay";
+};
+
 &usb_otg {
 	status = "okay";
 	dr_mode = "peripheral";
diff --git a/arch/arm/boot/dts/sun8i-h3-nanopi.dtsi b/arch/arm/boot/dts/sun8i-h3-nanopi.dtsi
index f110ee382239..7166f6af530b 100644
--- a/arch/arm/boot/dts/sun8i-h3-nanopi.dtsi
+++ b/arch/arm/boot/dts/sun8i-h3-nanopi.dtsi
@@ -123,6 +123,10 @@
 	};
 };
 
+&ths {
+	status = "okay";
+};
+
 &uart0 {
 	pinctrl-names = "default";
 	pinctrl-0 = <&uart0_pins_a>;
diff --git a/arch/arm/boot/dts/sun8i-h3-orangepi-2.dts b/arch/arm/boot/dts/sun8i-h3-orangepi-2.dts
index f1fc6bdca8be..0aa15832e9a1 100644
--- a/arch/arm/boot/dts/sun8i-h3-orangepi-2.dts
+++ b/arch/arm/boot/dts/sun8i-h3-orangepi-2.dts
@@ -208,6 +208,10 @@
 	status = "okay";
 };
 
+&ths {
+	status = "okay";
+};
+
 &uart0 {
 	pinctrl-names = "default";
 	pinctrl-0 = <&uart0_pins_a>;
diff --git a/arch/arm/boot/dts/sun8i-h3-orangepi-lite.dts b/arch/arm/boot/dts/sun8i-h3-orangepi-lite.dts
index 476ae8e387ca..f78aaec27a8f 100644
--- a/arch/arm/boot/dts/sun8i-h3-orangepi-lite.dts
+++ b/arch/arm/boot/dts/sun8i-h3-orangepi-lite.dts
@@ -179,6 +179,10 @@
 	};
 };
 
+&ths {
+	status = "okay";
+};
+
 &uart0 {
 	pinctrl-names = "default";
 	pinctrl-0 = <&uart0_pins_a>;
diff --git a/arch/arm/boot/dts/sun8i-h3-orangepi-one.dts b/arch/arm/boot/dts/sun8i-h3-orangepi-one.dts
index 245fd658defb..221d130b4153 100644
--- a/arch/arm/boot/dts/sun8i-h3-orangepi-one.dts
+++ b/arch/arm/boot/dts/sun8i-h3-orangepi-one.dts
@@ -190,6 +190,10 @@
 	status = "okay";
 };
 
+&ths {
+	status = "okay";
+};
+
 &uart0 {
 	pinctrl-names = "default";
 	pinctrl-0 = <&uart0_pins_a>;
diff --git a/arch/arm/boot/dts/sun8i-h3-orangepi-pc-plus.dts b/arch/arm/boot/dts/sun8i-h3-orangepi-pc-plus.dts
index 71fb73208939..d07f3d3db344 100644
--- a/arch/arm/boot/dts/sun8i-h3-orangepi-pc-plus.dts
+++ b/arch/arm/boot/dts/sun8i-h3-orangepi-pc-plus.dts
@@ -89,3 +89,7 @@
 	/* eMMC is missing pull-ups */
 	bias-pull-up;
 };
+
+&ths {
+	status = "okay";
+};
diff --git a/arch/arm/boot/dts/sun8i-h3-orangepi-pc.dts b/arch/arm/boot/dts/sun8i-h3-orangepi-pc.dts
index 46240334128f..53bc681ca0ca 100644
--- a/arch/arm/boot/dts/sun8i-h3-orangepi-pc.dts
+++ b/arch/arm/boot/dts/sun8i-h3-orangepi-pc.dts
@@ -227,6 +227,10 @@
 	status = "okay";
 };
 
+&ths {
+	status = "okay";
+};
+
 &uart0 {
 	pinctrl-names = "default";
 	pinctrl-0 = <&uart0_pins_a>;
diff --git a/arch/arm/boot/dts/sun8i-h3-orangepi-plus.dts b/arch/arm/boot/dts/sun8i-h3-orangepi-plus.dts
index b403e5d787cb..8213481e262a 100644
--- a/arch/arm/boot/dts/sun8i-h3-orangepi-plus.dts
+++ b/arch/arm/boot/dts/sun8i-h3-orangepi-plus.dts
@@ -119,6 +119,10 @@
 	};
 };
 
+&ths {
+	status = "okay";
+};
+
 &usbphy {
 	usb3_vbus-supply = <&reg_usb3_vbus>;
 };
diff --git a/arch/arm/boot/dts/sun8i-h3-orangepi-plus2e.dts b/arch/arm/boot/dts/sun8i-h3-orangepi-plus2e.dts
index 6dbf7b2e0c13..b744bc26b8a6 100644
--- a/arch/arm/boot/dts/sun8i-h3-orangepi-plus2e.dts
+++ b/arch/arm/boot/dts/sun8i-h3-orangepi-plus2e.dts
@@ -77,3 +77,7 @@
 		reg = <1>;
 	};
 };
+
+&ths {
+	status = "okay";
+};
-- 
2.18.0


^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [PATCH 6/7] arm64: dts: allwinner: a64: Enable the THS on A64 boards
  2018-08-04  7:03 [PATCH 1/7] dt-bindings: Add DT bindings documentation for Allwinner Thermal Sensor Controller Emmanuel Vadot
                   ` (3 preceding siblings ...)
  2018-08-04  7:03 ` [PATCH 5/7] ARM: dts: sun8i: h3: Enable the THS on H3 boards Emmanuel Vadot
@ 2018-08-04  7:03 ` Emmanuel Vadot
  2018-08-04  7:03 ` [PATCH 7/7] arm64: dts: allwinner: H5: Enable the THS on H5 boards Emmanuel Vadot
                   ` (2 subsequent siblings)
  7 siblings, 0 replies; 20+ messages in thread
From: Emmanuel Vadot @ 2018-08-04  7:03 UTC (permalink / raw)
  To: rui.zhang, edubezval, robh+dt, mark.rutland, maxime.ripard, wens,
	catalin.marinas, will.deacon
  Cc: linux-pm, devicetree, linux-arm-kernel, linux-kernel, Emmanuel Vadot

Enable the Thermal Sensor Controller on all A64 boards.

Signed-off-by: Emmanuel Vadot <manu@freebsd.org>
---
 arch/arm64/boot/dts/allwinner/sun50i-a64-amarula-relic.dts    | 4 ++++
 arch/arm64/boot/dts/allwinner/sun50i-a64-bananapi-m64.dts     | 4 ++++
 arch/arm64/boot/dts/allwinner/sun50i-a64-nanopi-a64.dts       | 4 ++++
 arch/arm64/boot/dts/allwinner/sun50i-a64-olinuxino.dts        | 4 ++++
 arch/arm64/boot/dts/allwinner/sun50i-a64-orangepi-win.dts     | 4 ++++
 arch/arm64/boot/dts/allwinner/sun50i-a64-pine64.dts           | 4 ++++
 arch/arm64/boot/dts/allwinner/sun50i-a64-pinebook.dts         | 4 ++++
 arch/arm64/boot/dts/allwinner/sun50i-a64-sopine-baseboard.dts | 4 ++++
 arch/arm64/boot/dts/allwinner/sun50i-a64-teres-i.dts          | 4 ++++
 9 files changed, 36 insertions(+)

diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-amarula-relic.dts b/arch/arm64/boot/dts/allwinner/sun50i-a64-amarula-relic.dts
index eac4793c8502..1201fcf99999 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-a64-amarula-relic.dts
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-amarula-relic.dts
@@ -201,6 +201,10 @@
 	regulator-name = "vcc-rtc";
 };
 
+&ths {
+	status = "okay";
+};
+
 &uart0 {
 	pinctrl-names = "default";
 	pinctrl-0 = <&uart0_pins_a>;
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-bananapi-m64.dts b/arch/arm64/boot/dts/allwinner/sun50i-a64-bananapi-m64.dts
index 094cfed13df9..3bacffd5eebc 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-a64-bananapi-m64.dts
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-bananapi-m64.dts
@@ -300,6 +300,10 @@
 	vcc-hdmi-supply = <&reg_dldo1>;
 };
 
+&ths {
+	status = "okay";
+};
+
 &uart0 {
 	pinctrl-names = "default";
 	pinctrl-0 = <&uart0_pins_a>;
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-nanopi-a64.dts b/arch/arm64/boot/dts/allwinner/sun50i-a64-nanopi-a64.dts
index 98dbff19f5cc..3a9305995db0 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-a64-nanopi-a64.dts
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-nanopi-a64.dts
@@ -199,6 +199,10 @@
 	vcc-hdmi-supply = <&reg_dldo1>;
 };
 
+&ths {
+	status = "okay";
+};
+
 &uart0 {
 	pinctrl-names = "default";
 	pinctrl-0 = <&uart0_pins_a>;
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-olinuxino.dts b/arch/arm64/boot/dts/allwinner/sun50i-a64-olinuxino.dts
index 3f531393eaee..e7eb88b7b514 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-a64-olinuxino.dts
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-olinuxino.dts
@@ -218,6 +218,10 @@
 	vcc-hdmi-supply = <&reg_dldo1>;
 };
 
+&ths {
+	status = "okay";
+};
+
 &uart0 {
 	pinctrl-names = "default";
 	pinctrl-0 = <&uart0_pins_a>;
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-orangepi-win.dts b/arch/arm64/boot/dts/allwinner/sun50i-a64-orangepi-win.dts
index 1221764f5719..649419a793bb 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-a64-orangepi-win.dts
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-orangepi-win.dts
@@ -195,6 +195,10 @@
 	vcc-hdmi-supply = <&reg_dldo1>;
 };
 
+&ths {
+	status = "okay";
+};
+
 &uart0 {
 	pinctrl-names = "default";
 	pinctrl-0 = <&uart0_pins_a>;
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-pine64.dts b/arch/arm64/boot/dts/allwinner/sun50i-a64-pine64.dts
index 1b9b92e541d2..44fe900f6f46 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-a64-pine64.dts
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-pine64.dts
@@ -238,6 +238,10 @@
 	status = "disabled";
 };
 
+&ths {
+	status = "okay";
+};
+
 /* On Exp and Euler connectors */
 &uart0 {
 	pinctrl-names = "default";
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinebook.dts b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinebook.dts
index 897e60cbe38d..f70817babec6 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinebook.dts
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinebook.dts
@@ -268,6 +268,10 @@
 	vcc-hdmi-supply = <&reg_dldo1>;
 };
 
+&ths {
+	status = "okay";
+};
+
 &uart0 {
 	pinctrl-names = "default";
 	pinctrl-0 = <&uart0_pins_a>;
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-sopine-baseboard.dts b/arch/arm64/boot/dts/allwinner/sun50i-a64-sopine-baseboard.dts
index c21f2331add6..32e7d2542e48 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-a64-sopine-baseboard.dts
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-sopine-baseboard.dts
@@ -138,6 +138,10 @@
 	vcc-hdmi-supply = <&reg_dldo1>;
 };
 
+&ths {
+	status = "okay";
+};
+
 &uart0 {
 	pinctrl-names = "default";
 	pinctrl-0 = <&uart0_pins_a>;
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-teres-i.dts b/arch/arm64/boot/dts/allwinner/sun50i-a64-teres-i.dts
index 81f8e0098699..fa12281a6839 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-a64-teres-i.dts
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-teres-i.dts
@@ -258,6 +258,10 @@
 	vcc-hdmi-supply = <&reg_dldo1>;
 };
 
+&ths {
+	status = "okay";
+};
+
 &uart0 {
 	pinctrl-names = "default";
 	pinctrl-0 = <&uart0_pins_a>;
-- 
2.18.0


^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [PATCH 7/7] arm64: dts: allwinner: H5: Enable the THS on H5 boards
  2018-08-04  7:03 [PATCH 1/7] dt-bindings: Add DT bindings documentation for Allwinner Thermal Sensor Controller Emmanuel Vadot
                   ` (4 preceding siblings ...)
  2018-08-04  7:03 ` [PATCH 6/7] arm64: dts: allwinner: a64: Enable the THS on A64 boards Emmanuel Vadot
@ 2018-08-04  7:03 ` Emmanuel Vadot
  2018-08-14 19:20 ` [PATCH 1/7] dt-bindings: Add DT bindings documentation for Allwinner Thermal Sensor Controller Rob Herring
  2018-08-20 11:17 ` Maxime Ripard
  7 siblings, 0 replies; 20+ messages in thread
From: Emmanuel Vadot @ 2018-08-04  7:03 UTC (permalink / raw)
  To: rui.zhang, edubezval, robh+dt, mark.rutland, maxime.ripard, wens,
	catalin.marinas, will.deacon
  Cc: linux-pm, devicetree, linux-arm-kernel, linux-kernel, Emmanuel Vadot

Enable the Thermal Sensor Controller on all H5 boards.

Signed-off-by: Emmanuel Vadot <manu@freebsd.org>
---
 arch/arm64/boot/dts/allwinner/sun50i-h5-nanopi-neo-plus2.dts  | 4 ++++
 arch/arm64/boot/dts/allwinner/sun50i-h5-nanopi-neo2.dts       | 4 ++++
 arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-pc2.dts      | 4 ++++
 arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-prime.dts    | 4 ++++
 .../arm64/boot/dts/allwinner/sun50i-h5-orangepi-zero-plus.dts | 4 ++++
 .../boot/dts/allwinner/sun50i-h5-orangepi-zero-plus2.dts      | 4 ++++
 6 files changed, 24 insertions(+)

diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h5-nanopi-neo-plus2.dts b/arch/arm64/boot/dts/allwinner/sun50i-h5-nanopi-neo-plus2.dts
index 506e25ba028a..767826684d2a 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-h5-nanopi-neo-plus2.dts
+++ b/arch/arm64/boot/dts/allwinner/sun50i-h5-nanopi-neo-plus2.dts
@@ -189,6 +189,10 @@
 	status = "okay";
 };
 
+&ths {
+	status = "okay";
+};
+
 &uart0 {
 	pinctrl-names = "default";
 	pinctrl-0 = <&uart0_pins_a>;
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h5-nanopi-neo2.dts b/arch/arm64/boot/dts/allwinner/sun50i-h5-nanopi-neo2.dts
index cc268a69786c..dc49cc942fa9 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-h5-nanopi-neo2.dts
+++ b/arch/arm64/boot/dts/allwinner/sun50i-h5-nanopi-neo2.dts
@@ -140,6 +140,10 @@
 	status = "okay";
 };
 
+&ths {
+	status = "okay";
+};
+
 &uart0 {
 	pinctrl-names = "default";
 	pinctrl-0 = <&uart0_pins_a>;
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-pc2.dts b/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-pc2.dts
index 3e0d5a9c096d..6ffd048c0d93 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-pc2.dts
+++ b/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-pc2.dts
@@ -219,6 +219,10 @@
 	};
 };
 
+&ths {
+	status = "okay";
+};
+
 &uart0 {
 	pinctrl-names = "default";
 	pinctrl-0 = <&uart0_pins_a>;
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-prime.dts b/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-prime.dts
index b75ca4d7d001..07819747a731 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-prime.dts
+++ b/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-prime.dts
@@ -222,6 +222,10 @@
 	status = "okay";
 };
 
+&ths {
+	status = "okay";
+};
+
 &uart0 {
 	pinctrl-names = "default";
 	pinctrl-0 = <&uart0_pins_a>;
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-zero-plus.dts b/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-zero-plus.dts
index 1238de25a969..405440fedd1e 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-zero-plus.dts
+++ b/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-zero-plus.dts
@@ -125,6 +125,10 @@
 	status = "okay";
 };
 
+&ths {
+	status = "okay";
+};
+
 &uart0 {
 	pinctrl-names = "default";
 	pinctrl-0 = <&uart0_pins_a>;
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-zero-plus2.dts b/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-zero-plus2.dts
index 53c8c11620e0..09d2bbefcefa 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-zero-plus2.dts
+++ b/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-zero-plus2.dts
@@ -132,6 +132,10 @@
 	status = "okay";
 };
 
+&ths {
+	status = "okay";
+};
+
 &uart0 {
 	pinctrl-names = "default";
 	pinctrl-0 = <&uart0_pins_a>;
-- 
2.18.0


^ permalink raw reply related	[flat|nested] 20+ messages in thread

* Re: [PATCH 1/7] dt-bindings: Add DT bindings documentation for Allwinner Thermal Sensor Controller
  2018-08-04  7:03 [PATCH 1/7] dt-bindings: Add DT bindings documentation for Allwinner Thermal Sensor Controller Emmanuel Vadot
                   ` (5 preceding siblings ...)
  2018-08-04  7:03 ` [PATCH 7/7] arm64: dts: allwinner: H5: Enable the THS on H5 boards Emmanuel Vadot
@ 2018-08-14 19:20 ` Rob Herring
  2018-08-20 11:17 ` Maxime Ripard
  7 siblings, 0 replies; 20+ messages in thread
From: Rob Herring @ 2018-08-14 19:20 UTC (permalink / raw)
  To: Emmanuel Vadot
  Cc: rui.zhang, edubezval, mark.rutland, maxime.ripard, wens,
	catalin.marinas, will.deacon, linux-pm, devicetree,
	linux-arm-kernel, linux-kernel

On Sat, Aug 04, 2018 at 09:03:49AM +0200, Emmanuel Vadot wrote:
> This patch adds documentation for Device-Tree bindings for the Allwinner
> Thermal Sensor Controller found on the H3, H5 and A64 SoCs
> 
> Signed-off-by: Emmanuel Vadot <manu@freebsd.org>
> ---
>  .../bindings/thermal/allwinner-thermal.txt    | 41 +++++++++++++++++++
>  1 file changed, 41 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/thermal/allwinner-thermal.txt
> 
> diff --git a/Documentation/devicetree/bindings/thermal/allwinner-thermal.txt b/Documentation/devicetree/bindings/thermal/allwinner-thermal.txt
> new file mode 100644
> index 000000000000..5810d44cf495
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/thermal/allwinner-thermal.txt
> @@ -0,0 +1,41 @@
> +* Thermal Sensor Controller on Allwinner SoCs
> +
> +Required properties:
> +- compatible : should be "allwinner,<name>-ths"
> +   "allwinner,sun8i-h3-ths": found on H3 and H2+ SoCs
> +   "allwinner,sun50i-h5-ths": found on H5 SoC
> +   "allwinner,sun50i-a64-ths": found on H5 SoC
> +- reg : physical base address of the controller and length of memory mapped
> +	region.
> +- interrupts : The interrupt number to the cpu. The interrupt specifier format
> +	       depends on the interrupt controller.

Just need to say how many entries (and order if more than one).

> +- clocks : Must contain an entry for each entry in clock-names.
> +- clock-names : Shall be "apb" for the bus, and "ths" for
> +		the peripheral clock.
> +- resets : Must contain an entry for each entry in reset-names.
> +	   See ../reset/reset.txt for details.
> +- reset-names : Must be "apb".
> +- #thermal-sensor-cells : Depend on the SoC
> +   For H3 should be 0
> +   For H5 should be 1
> +   For A64 should be 2
> +   See ./thermal.txt for a description.
> +- nvmem-cells : Phandle to the calibration data
> +- nvmem-cell-names = Should be "ths-calib"
> +
> +Example:
> +
> +ths: thermal_sensor@1c25000 {

thermal-sensor@...

> +	compatible = "allwinner,sun8i-h3-ths";
> +	reg = <0x01c25000 0x100>;
> +	interrupts = <GIC_SPI 31 IRQ_TYPE_LEVEL_HIGH>;
> +	clocks = <&ccu CLK_BUS_THS>, <&ccu CLK_THS>;
> +	clock-names = "apb", "ths";
> +	resets = <&ccu RST_BUS_THS>;
> +	reset-names = "apb";
> +	#thermal-sensor-cells = <0>;
> +	status = "disabled";
> +
> +	nvmem-cells = <&ths_calib>;
> +	nvmem-cell-names = "ths-calib";
> +};
> -- 
> 2.18.0
> 

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH 1/7] dt-bindings: Add DT bindings documentation for Allwinner Thermal Sensor Controller
  2018-08-04  7:03 [PATCH 1/7] dt-bindings: Add DT bindings documentation for Allwinner Thermal Sensor Controller Emmanuel Vadot
                   ` (6 preceding siblings ...)
  2018-08-14 19:20 ` [PATCH 1/7] dt-bindings: Add DT bindings documentation for Allwinner Thermal Sensor Controller Rob Herring
@ 2018-08-20 11:17 ` Maxime Ripard
  2018-08-20 13:41   ` Rob Herring
  7 siblings, 1 reply; 20+ messages in thread
From: Maxime Ripard @ 2018-08-20 11:17 UTC (permalink / raw)
  To: Emmanuel Vadot
  Cc: rui.zhang, edubezval, robh+dt, mark.rutland, wens,
	catalin.marinas, will.deacon, linux-pm, devicetree,
	linux-arm-kernel, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 501 bytes --]

On Sat, Aug 04, 2018 at 09:03:49AM +0200, Emmanuel Vadot wrote:
> This patch adds documentation for Device-Tree bindings for the Allwinner
> Thermal Sensor Controller found on the H3, H5 and A64 SoCs
> 
> Signed-off-by: Emmanuel Vadot <manu@freebsd.org>

I'm not going to merge a binding for a device that doesn't have any
driver implemented at the moment in Linux.

Maxime

-- 
Maxime Ripard, Bootlin (formerly Free Electrons)
Embedded Linux and Kernel engineering
https://bootlin.com

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH 1/7] dt-bindings: Add DT bindings documentation for Allwinner Thermal Sensor Controller
  2018-08-20 11:17 ` Maxime Ripard
@ 2018-08-20 13:41   ` Rob Herring
  2018-08-20 13:57     ` Emmanuel Vadot
  2018-08-20 14:07     ` Maxime Ripard
  0 siblings, 2 replies; 20+ messages in thread
From: Rob Herring @ 2018-08-20 13:41 UTC (permalink / raw)
  To: Maxime Ripard
  Cc: Emmanuel Vadot, Zhang Rui, Eduardo Valentin, Mark Rutland,
	Chen-Yu Tsai, Catalin Marinas, Will Deacon, open list:THERMAL,
	devicetree,
	moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE,
	linux-kernel

On Mon, Aug 20, 2018 at 5:17 AM Maxime Ripard <maxime.ripard@bootlin.com> wrote:
>
> On Sat, Aug 04, 2018 at 09:03:49AM +0200, Emmanuel Vadot wrote:
> > This patch adds documentation for Device-Tree bindings for the Allwinner
> > Thermal Sensor Controller found on the H3, H5 and A64 SoCs
> >
> > Signed-off-by: Emmanuel Vadot <manu@freebsd.org>
>
> I'm not going to merge a binding for a device that doesn't have any
> driver implemented at the moment in Linux.

I'll take it then. Linux is not the only DT client.

Rob

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH 1/7] dt-bindings: Add DT bindings documentation for Allwinner Thermal Sensor Controller
  2018-08-20 13:41   ` Rob Herring
@ 2018-08-20 13:57     ` Emmanuel Vadot
  2018-08-20 14:07     ` Maxime Ripard
  1 sibling, 0 replies; 20+ messages in thread
From: Emmanuel Vadot @ 2018-08-20 13:57 UTC (permalink / raw)
  To: Rob Herring
  Cc: Maxime Ripard, Mark Rutland, Eduardo Valentin, open list:THERMAL,
	Catalin Marinas, Will Deacon, linux-kernel, Emmanuel Vadot,
	Chen-Yu Tsai,
	moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE,
	Zhang Rui, devicetree

On Mon, 20 Aug 2018 07:41:22 -0600
Rob Herring <robh+dt@kernel.org> wrote:

> On Mon, Aug 20, 2018 at 5:17 AM Maxime Ripard <maxime.ripard@bootlin.com> wrote:
> >
> > On Sat, Aug 04, 2018 at 09:03:49AM +0200, Emmanuel Vadot wrote:
> > > This patch adds documentation for Device-Tree bindings for the Allwinner
> > > Thermal Sensor Controller found on the H3, H5 and A64 SoCs
> > >
> > > Signed-off-by: Emmanuel Vadot <manu@freebsd.org>
> >
> > I'm not going to merge a binding for a device that doesn't have any
> > driver implemented at the moment in Linux.
> 
> I'll take it then. Linux is not the only DT client.
> 
> Rob

 Thanks Rob, I'll send a V2 shortly with the modification you asked and
some minor others documentation corrections.

-- 
Emmanuel Vadot <manu@bidouilliste.com> <manu@freebsd.org>

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH 1/7] dt-bindings: Add DT bindings documentation for Allwinner Thermal Sensor Controller
  2018-08-20 13:41   ` Rob Herring
  2018-08-20 13:57     ` Emmanuel Vadot
@ 2018-08-20 14:07     ` Maxime Ripard
  2018-08-20 14:27       ` Emmanuel Vadot
  2018-08-20 18:47       ` Rob Herring
  1 sibling, 2 replies; 20+ messages in thread
From: Maxime Ripard @ 2018-08-20 14:07 UTC (permalink / raw)
  To: Rob Herring
  Cc: Emmanuel Vadot, Zhang Rui, Eduardo Valentin, Mark Rutland,
	Chen-Yu Tsai, Catalin Marinas, Will Deacon, open list:THERMAL,
	devicetree,
	moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE,
	linux-kernel

[-- Attachment #1: Type: text/plain, Size: 1132 bytes --]

On Mon, Aug 20, 2018 at 07:41:22AM -0600, Rob Herring wrote:
> On Mon, Aug 20, 2018 at 5:17 AM Maxime Ripard <maxime.ripard@bootlin.com> wrote:
> >
> > On Sat, Aug 04, 2018 at 09:03:49AM +0200, Emmanuel Vadot wrote:
> > > This patch adds documentation for Device-Tree bindings for the Allwinner
> > > Thermal Sensor Controller found on the H3, H5 and A64 SoCs
> > >
> > > Signed-off-by: Emmanuel Vadot <manu@freebsd.org>
> >
> > I'm not going to merge a binding for a device that doesn't have any
> > driver implemented at the moment in Linux.
> 
> I'll take it then. Linux is not the only DT client.

Then don't complain if we ever have to break the ABI. We never tested
that hardware, never had any code running on it, and it *will* cause
some issues. For example, the calibration data have never been used
and how they should be represented have never been described, since no
one ever actually tried to use it.

And sure, Linux is not the only DT client. Just like FreeBSD isn't.

Maxime

-- 
Maxime Ripard, Bootlin (formerly Free Electrons)
Embedded Linux and Kernel engineering
https://bootlin.com

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH 1/7] dt-bindings: Add DT bindings documentation for Allwinner Thermal Sensor Controller
  2018-08-20 14:07     ` Maxime Ripard
@ 2018-08-20 14:27       ` Emmanuel Vadot
  2018-08-24 14:58         ` Maxime Ripard
  2018-08-20 18:47       ` Rob Herring
  1 sibling, 1 reply; 20+ messages in thread
From: Emmanuel Vadot @ 2018-08-20 14:27 UTC (permalink / raw)
  To: Maxime Ripard
  Cc: Rob Herring, Mark Rutland, Eduardo Valentin, open list:THERMAL,
	Catalin Marinas, Will Deacon, linux-kernel, Emmanuel Vadot,
	Chen-Yu Tsai,
	moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE,
	Zhang Rui, devicetree

On Mon, 20 Aug 2018 16:07:37 +0200
Maxime Ripard <maxime.ripard@bootlin.com> wrote:

> On Mon, Aug 20, 2018 at 07:41:22AM -0600, Rob Herring wrote:
> > On Mon, Aug 20, 2018 at 5:17 AM Maxime Ripard <maxime.ripard@bootlin.com> wrote:
> > >
> > > On Sat, Aug 04, 2018 at 09:03:49AM +0200, Emmanuel Vadot wrote:
> > > > This patch adds documentation for Device-Tree bindings for the Allwinner
> > > > Thermal Sensor Controller found on the H3, H5 and A64 SoCs
> > > >
> > > > Signed-off-by: Emmanuel Vadot <manu@freebsd.org>
> > >
> > > I'm not going to merge a binding for a device that doesn't have any
> > > driver implemented at the moment in Linux.
> > 
> > I'll take it then. Linux is not the only DT client.
> 
> Then don't complain if we ever have to break the ABI. We never tested
> that hardware, never had any code running on it, and it *will* cause
> some issues. For example, the calibration data have never been used
> and how they should be represented have never been described, since no
> one ever actually tried to use it.
> 
> And sure, Linux is not the only DT client. Just like FreeBSD isn't.
> 
> Maxime

 Maxime,

 What kind of data would you need for me to make things better ?
 We have the driver in FreeBSD for almost two years now, whne I started
to see how to upstream it I noticed a lot of problems and spent 4 or 5
days to try on all the SoCs mentionned in the serie, the only SoC I
didn't include it the A83T as for some reason I couldn't make the
driver work.
 I just hope that you understand that we cannot wait for Linux to have
a driver to have some bindings.

 Cheers,

-- 
Emmanuel Vadot <manu@bidouilliste.com> <manu@freebsd.org>

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH 1/7] dt-bindings: Add DT bindings documentation for Allwinner Thermal Sensor Controller
  2018-08-20 14:07     ` Maxime Ripard
  2018-08-20 14:27       ` Emmanuel Vadot
@ 2018-08-20 18:47       ` Rob Herring
  1 sibling, 0 replies; 20+ messages in thread
From: Rob Herring @ 2018-08-20 18:47 UTC (permalink / raw)
  To: Maxime Ripard
  Cc: Emmanuel Vadot, Zhang Rui, Eduardo Valentin, Mark Rutland,
	Chen-Yu Tsai, Catalin Marinas, Will Deacon, open list:THERMAL,
	devicetree,
	moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE,
	linux-kernel

On Mon, Aug 20, 2018 at 9:07 AM Maxime Ripard <maxime.ripard@bootlin.com> wrote:
>
> On Mon, Aug 20, 2018 at 07:41:22AM -0600, Rob Herring wrote:
> > On Mon, Aug 20, 2018 at 5:17 AM Maxime Ripard <maxime.ripard@bootlin.com> wrote:
> > >
> > > On Sat, Aug 04, 2018 at 09:03:49AM +0200, Emmanuel Vadot wrote:
> > > > This patch adds documentation for Device-Tree bindings for the Allwinner
> > > > Thermal Sensor Controller found on the H3, H5 and A64 SoCs
> > > >
> > > > Signed-off-by: Emmanuel Vadot <manu@freebsd.org>
> > >
> > > I'm not going to merge a binding for a device that doesn't have any
> > > driver implemented at the moment in Linux.
> >
> > I'll take it then. Linux is not the only DT client.
>
> Then don't complain if we ever have to break the ABI.

My only complaint is when breaking ABIs and not being clear about
doing so. Otherwise, it is up to platform maintainers to not upset
their users (including if some of those users are FreeBSD).

> We never tested
> that hardware, never had any code running on it, and it *will* cause
> some issues. For example, the calibration data have never been used
> and how they should be represented have never been described, since no
> one ever actually tried to use it.

Then perhaps that part of the binding should be omitted for now. But I
don't see how if this works for FreeBSD how it wouldn't for Linux.

Rob

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH 1/7] dt-bindings: Add DT bindings documentation for Allwinner Thermal Sensor Controller
  2018-08-20 14:27       ` Emmanuel Vadot
@ 2018-08-24 14:58         ` Maxime Ripard
  2018-08-24 19:59           ` Emmanuel Vadot
  0 siblings, 1 reply; 20+ messages in thread
From: Maxime Ripard @ 2018-08-24 14:58 UTC (permalink / raw)
  To: Emmanuel Vadot
  Cc: Rob Herring, Mark Rutland, Eduardo Valentin, open list:THERMAL,
	Catalin Marinas, Will Deacon, linux-kernel, Emmanuel Vadot,
	Chen-Yu Tsai,
	moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE,
	Zhang Rui, devicetree

[-- Attachment #1: Type: text/plain, Size: 2156 bytes --]

Hi,

On Mon, Aug 20, 2018 at 04:27:15PM +0200, Emmanuel Vadot wrote:
> On Mon, 20 Aug 2018 16:07:37 +0200
> Maxime Ripard <maxime.ripard@bootlin.com> wrote:
> 
> > On Mon, Aug 20, 2018 at 07:41:22AM -0600, Rob Herring wrote:
> > > On Mon, Aug 20, 2018 at 5:17 AM Maxime Ripard <maxime.ripard@bootlin.com> wrote:
> > > >
> > > > On Sat, Aug 04, 2018 at 09:03:49AM +0200, Emmanuel Vadot wrote:
> > > > > This patch adds documentation for Device-Tree bindings for the Allwinner
> > > > > Thermal Sensor Controller found on the H3, H5 and A64 SoCs
> > > > >
> > > > > Signed-off-by: Emmanuel Vadot <manu@freebsd.org>
> > > >
> > > > I'm not going to merge a binding for a device that doesn't have any
> > > > driver implemented at the moment in Linux.
> > > 
> > > I'll take it then. Linux is not the only DT client.
> > 
> > Then don't complain if we ever have to break the ABI. We never tested
> > that hardware, never had any code running on it, and it *will* cause
> > some issues. For example, the calibration data have never been used
> > and how they should be represented have never been described, since no
> > one ever actually tried to use it.
> > 
> > And sure, Linux is not the only DT client. Just like FreeBSD isn't.
> 
>  What kind of data would you need for me to make things better ?
>  We have the driver in FreeBSD for almost two years now, whne I started
> to see how to upstream it I noticed a lot of problems and spent 4 or 5
> days to try on all the SoCs mentionned in the serie, the only SoC I
> didn't include it the A83T as for some reason I couldn't make the
> driver work.

Do you have a link to that driver? How and how much did you test it?

Are you using the calibration data stored in the SID?

> I just hope that you understand that we cannot wait for Linux to
> have a driver to have some bindings.

Just like I'm sure you can understand that just merging the DT bits
without testing anything caused some troubles in the past, and I don't
want to discover it in a year from now.

Maxime

-- 
Maxime Ripard, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH 1/7] dt-bindings: Add DT bindings documentation for Allwinner Thermal Sensor Controller
  2018-08-24 14:58         ` Maxime Ripard
@ 2018-08-24 19:59           ` Emmanuel Vadot
  2018-08-24 23:03             ` Eduardo Valentin
  2018-08-29 13:31             ` Maxime Ripard
  0 siblings, 2 replies; 20+ messages in thread
From: Emmanuel Vadot @ 2018-08-24 19:59 UTC (permalink / raw)
  To: Maxime Ripard
  Cc: Rob Herring, Mark Rutland, Eduardo Valentin, open list:THERMAL,
	Catalin Marinas, Will Deacon, linux-kernel, Emmanuel Vadot,
	Chen-Yu Tsai,
	moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE,
	Zhang Rui, devicetree


 Hi,

On Fri, 24 Aug 2018 16:58:40 +0200
Maxime Ripard <maxime.ripard@bootlin.com> wrote:

> Hi,
> 
> On Mon, Aug 20, 2018 at 04:27:15PM +0200, Emmanuel Vadot wrote:
> > On Mon, 20 Aug 2018 16:07:37 +0200
> > Maxime Ripard <maxime.ripard@bootlin.com> wrote:
> > 
> > > On Mon, Aug 20, 2018 at 07:41:22AM -0600, Rob Herring wrote:
> > > > On Mon, Aug 20, 2018 at 5:17 AM Maxime Ripard <maxime.ripard@bootlin.com> wrote:
> > > > >
> > > > > On Sat, Aug 04, 2018 at 09:03:49AM +0200, Emmanuel Vadot wrote:
> > > > > > This patch adds documentation for Device-Tree bindings for the Allwinner
> > > > > > Thermal Sensor Controller found on the H3, H5 and A64 SoCs
> > > > > >
> > > > > > Signed-off-by: Emmanuel Vadot <manu@freebsd.org>
> > > > >
> > > > > I'm not going to merge a binding for a device that doesn't have any
> > > > > driver implemented at the moment in Linux.
> > > > 
> > > > I'll take it then. Linux is not the only DT client.
> > > 
> > > Then don't complain if we ever have to break the ABI. We never tested
> > > that hardware, never had any code running on it, and it *will* cause
> > > some issues. For example, the calibration data have never been used
> > > and how they should be represented have never been described, since no
> > > one ever actually tried to use it.
> > > 
> > > And sure, Linux is not the only DT client. Just like FreeBSD isn't.
> > 
> >  What kind of data would you need for me to make things better ?
> >  We have the driver in FreeBSD for almost two years now, whne I started
> > to see how to upstream it I noticed a lot of problems and spent 4 or 5
> > days to try on all the SoCs mentionned in the serie, the only SoC I
> > didn't include it the A83T as for some reason I couldn't make the
> > driver work.
> 
> Do you have a link to that driver? 

 https://github.com/freebsd/freebsd/blob/master/sys/arm/allwinner/aw_thermal.c

> How and how much did you test it?

 Using a cheap IR thermometer as it's all I can afford.
 Then running multiples cpufreq-a53 process and comparing the result.
 Did the same without using the calibration data, result where closer
when I used them.

> Are you using the calibration data stored in the SID?

 Yes, which is why the serie contain the nvmem cell for the SID.

> 
> > I just hope that you understand that we cannot wait for Linux to
> > have a driver to have some bindings.
> 
> Just like I'm sure you can understand that just merging the DT bits
> without testing anything caused some troubles in the past, and I don't
> want to discover it in a year from now.

 I do, I don't like wrong DT info as much as you do I think. I had
the unfortunate event to find that the sun4i-a10-timer compatible used
in every soc is plain wrong for !A10 and !A13, patches comming soon.
 I want those bits merged but I also want that they reflect reality,
this is not a hard driver to do, NetBSD also have one I think, maybe
OpenBSD do to.

> Maxime
> 
> -- 
> Maxime Ripard, Bootlin
> Embedded Linux and Kernel engineering
> https://bootlin.com


-- 
Emmanuel Vadot <manu@bidouilliste.com> <manu@freebsd.org>

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH 1/7] dt-bindings: Add DT bindings documentation for Allwinner Thermal Sensor Controller
  2018-08-24 19:59           ` Emmanuel Vadot
@ 2018-08-24 23:03             ` Eduardo Valentin
  2018-08-25 15:43               ` Emmanuel Vadot
  2018-08-29 13:31             ` Maxime Ripard
  1 sibling, 1 reply; 20+ messages in thread
From: Eduardo Valentin @ 2018-08-24 23:03 UTC (permalink / raw)
  To: Emmanuel Vadot
  Cc: Maxime Ripard, Rob Herring, Mark Rutland, open list:THERMAL,
	Catalin Marinas, Will Deacon, linux-kernel, Emmanuel Vadot,
	Chen-Yu Tsai,
	moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE,
	Zhang Rui, devicetree

On Fri, Aug 24, 2018 at 09:59:21PM +0200, Emmanuel Vadot wrote:
> 
>  Hi,
> 
> On Fri, 24 Aug 2018 16:58:40 +0200
> Maxime Ripard <maxime.ripard@bootlin.com> wrote:
> 
> > Hi,
> > 
> > On Mon, Aug 20, 2018 at 04:27:15PM +0200, Emmanuel Vadot wrote:
> > > On Mon, 20 Aug 2018 16:07:37 +0200
> > > Maxime Ripard <maxime.ripard@bootlin.com> wrote:
> > > 
> > > > On Mon, Aug 20, 2018 at 07:41:22AM -0600, Rob Herring wrote:
> > > > > On Mon, Aug 20, 2018 at 5:17 AM Maxime Ripard <maxime.ripard@bootlin.com> wrote:
> > > > > >
> > > > > > On Sat, Aug 04, 2018 at 09:03:49AM +0200, Emmanuel Vadot wrote:
> > > > > > > This patch adds documentation for Device-Tree bindings for the Allwinner
> > > > > > > Thermal Sensor Controller found on the H3, H5 and A64 SoCs
> > > > > > >
> > > > > > > Signed-off-by: Emmanuel Vadot <manu@freebsd.org>
> > > > > >
> > > > > > I'm not going to merge a binding for a device that doesn't have any
> > > > > > driver implemented at the moment in Linux.
> > > > > 
> > > > > I'll take it then. Linux is not the only DT client.
> > > > 
> > > > Then don't complain if we ever have to break the ABI. We never tested
> > > > that hardware, never had any code running on it, and it *will* cause
> > > > some issues. For example, the calibration data have never been used
> > > > and how they should be represented have never been described, since no
> > > > one ever actually tried to use it.
> > > > 
> > > > And sure, Linux is not the only DT client. Just like FreeBSD isn't.
> > > 
> > >  What kind of data would you need for me to make things better ?
> > >  We have the driver in FreeBSD for almost two years now, whne I started
> > > to see how to upstream it I noticed a lot of problems and spent 4 or 5
> > > days to try on all the SoCs mentionned in the serie, the only SoC I
> > > didn't include it the A83T as for some reason I couldn't make the
> > > driver work.
> > 
> > Do you have a link to that driver? 
> 
>  https://github.com/freebsd/freebsd/blob/master/sys/arm/allwinner/aw_thermal.c
> 
> > How and how much did you test it?
> 
>  Using a cheap IR thermometer as it's all I can afford.
>  Then running multiples cpufreq-a53 process and comparing the result.
>  Did the same without using the calibration data, result where closer
> when I used them.
> 
> > Are you using the calibration data stored in the SID?
> 
>  Yes, which is why the serie contain the nvmem cell for the SID.
> 
> > 
> > > I just hope that you understand that we cannot wait for Linux to
> > > have a driver to have some bindings.
> > 
> > Just like I'm sure you can understand that just merging the DT bits
> > without testing anything caused some troubles in the past, and I don't
> > want to discover it in a year from now.
> 
>  I do, I don't like wrong DT info as much as you do I think. I had
> the unfortunate event to find that the sun4i-a10-timer compatible used
> in every soc is plain wrong for !A10 and !A13, patches comming soon.
>  I want those bits merged but I also want that they reflect reality,
> this is not a hard driver to do, NetBSD also have one I think, maybe
> OpenBSD do to.


I would prefer to see a series of DT bindings + driver. Can you send
your next iteration with the driver so we can review both together?

> 
> > Maxime
> > 
> > -- 
> > Maxime Ripard, Bootlin
> > Embedded Linux and Kernel engineering
> > https://bootlin.com
> 
> 
> -- 
> Emmanuel Vadot <manu@bidouilliste.com> <manu@freebsd.org>

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH 1/7] dt-bindings: Add DT bindings documentation for Allwinner Thermal Sensor Controller
  2018-08-24 23:03             ` Eduardo Valentin
@ 2018-08-25 15:43               ` Emmanuel Vadot
  2018-08-29 12:38                 ` Maxime Ripard
  0 siblings, 1 reply; 20+ messages in thread
From: Emmanuel Vadot @ 2018-08-25 15:43 UTC (permalink / raw)
  To: Eduardo Valentin
  Cc: Mark Rutland, devicetree, open list:THERMAL, Maxime Ripard,
	Catalin Marinas, Will Deacon, linux-kernel, Emmanuel Vadot,
	Chen-Yu Tsai, Rob Herring, Zhang Rui,
	moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE


 Hi,

On Fri, 24 Aug 2018 16:03:40 -0700
Eduardo Valentin <edubezval@gmail.com> wrote:

> On Fri, Aug 24, 2018 at 09:59:21PM +0200, Emmanuel Vadot wrote:
> > 
> >  Hi,
> > 
> > On Fri, 24 Aug 2018 16:58:40 +0200
> > Maxime Ripard <maxime.ripard@bootlin.com> wrote:
> > 
> > > Hi,
> > > 
> > > On Mon, Aug 20, 2018 at 04:27:15PM +0200, Emmanuel Vadot wrote:
> > > > On Mon, 20 Aug 2018 16:07:37 +0200
> > > > Maxime Ripard <maxime.ripard@bootlin.com> wrote:
> > > > 
> > > > > On Mon, Aug 20, 2018 at 07:41:22AM -0600, Rob Herring wrote:
> > > > > > On Mon, Aug 20, 2018 at 5:17 AM Maxime Ripard <maxime.ripard@bootlin.com> wrote:
> > > > > > >
> > > > > > > On Sat, Aug 04, 2018 at 09:03:49AM +0200, Emmanuel Vadot wrote:
> > > > > > > > This patch adds documentation for Device-Tree bindings for the Allwinner
> > > > > > > > Thermal Sensor Controller found on the H3, H5 and A64 SoCs
> > > > > > > >
> > > > > > > > Signed-off-by: Emmanuel Vadot <manu@freebsd.org>
> > > > > > >
> > > > > > > I'm not going to merge a binding for a device that doesn't have any
> > > > > > > driver implemented at the moment in Linux.
> > > > > > 
> > > > > > I'll take it then. Linux is not the only DT client.
> > > > > 
> > > > > Then don't complain if we ever have to break the ABI. We never tested
> > > > > that hardware, never had any code running on it, and it *will* cause
> > > > > some issues. For example, the calibration data have never been used
> > > > > and how they should be represented have never been described, since no
> > > > > one ever actually tried to use it.
> > > > > 
> > > > > And sure, Linux is not the only DT client. Just like FreeBSD isn't.
> > > > 
> > > >  What kind of data would you need for me to make things better ?
> > > >  We have the driver in FreeBSD for almost two years now, whne I started
> > > > to see how to upstream it I noticed a lot of problems and spent 4 or 5
> > > > days to try on all the SoCs mentionned in the serie, the only SoC I
> > > > didn't include it the A83T as for some reason I couldn't make the
> > > > driver work.
> > > 
> > > Do you have a link to that driver? 
> > 
> >  https://github.com/freebsd/freebsd/blob/master/sys/arm/allwinner/aw_thermal.c
> > 
> > > How and how much did you test it?
> > 
> >  Using a cheap IR thermometer as it's all I can afford.
> >  Then running multiples cpufreq-a53 process and comparing the result.
> >  Did the same without using the calibration data, result where closer
> > when I used them.
> > 
> > > Are you using the calibration data stored in the SID?
> > 
> >  Yes, which is why the serie contain the nvmem cell for the SID.
> > 
> > > 
> > > > I just hope that you understand that we cannot wait for Linux to
> > > > have a driver to have some bindings.
> > > 
> > > Just like I'm sure you can understand that just merging the DT bits
> > > without testing anything caused some troubles in the past, and I don't
> > > want to discover it in a year from now.
> > 
> >  I do, I don't like wrong DT info as much as you do I think. I had
> > the unfortunate event to find that the sun4i-a10-timer compatible used
> > in every soc is plain wrong for !A10 and !A13, patches comming soon.
> >  I want those bits merged but I also want that they reflect reality,
> > this is not a hard driver to do, NetBSD also have one I think, maybe
> > OpenBSD do to.
> 
> 
> I would prefer to see a series of DT bindings + driver. Can you send
> your next iteration with the driver so we can review both together?

 You mean a link to the FreeBSD driver (and OpenBSD since they have one
too) in the cover letter ?

> > 
> > > Maxime
> > > 
> > > -- 
> > > Maxime Ripard, Bootlin
> > > Embedded Linux and Kernel engineering
> > > https://bootlin.com
> > 
> > 
> > -- 
> > Emmanuel Vadot <manu@bidouilliste.com> <manu@freebsd.org>
> 
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel


-- 
Emmanuel Vadot <manu@bidouilliste.com> <manu@freebsd.org>

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH 1/7] dt-bindings: Add DT bindings documentation for Allwinner Thermal Sensor Controller
  2018-08-25 15:43               ` Emmanuel Vadot
@ 2018-08-29 12:38                 ` Maxime Ripard
  0 siblings, 0 replies; 20+ messages in thread
From: Maxime Ripard @ 2018-08-29 12:38 UTC (permalink / raw)
  To: Emmanuel Vadot
  Cc: Eduardo Valentin, Mark Rutland, devicetree, open list:THERMAL,
	Catalin Marinas, Will Deacon, linux-kernel, Emmanuel Vadot,
	Chen-Yu Tsai, Rob Herring, Zhang Rui,
	moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE

[-- Attachment #1: Type: text/plain, Size: 4066 bytes --]

On Sat, Aug 25, 2018 at 05:43:52PM +0200, Emmanuel Vadot wrote:
> 
>  Hi,
> 
> On Fri, 24 Aug 2018 16:03:40 -0700
> Eduardo Valentin <edubezval@gmail.com> wrote:
> 
> > On Fri, Aug 24, 2018 at 09:59:21PM +0200, Emmanuel Vadot wrote:
> > > 
> > >  Hi,
> > > 
> > > On Fri, 24 Aug 2018 16:58:40 +0200
> > > Maxime Ripard <maxime.ripard@bootlin.com> wrote:
> > > 
> > > > Hi,
> > > > 
> > > > On Mon, Aug 20, 2018 at 04:27:15PM +0200, Emmanuel Vadot wrote:
> > > > > On Mon, 20 Aug 2018 16:07:37 +0200
> > > > > Maxime Ripard <maxime.ripard@bootlin.com> wrote:
> > > > > 
> > > > > > On Mon, Aug 20, 2018 at 07:41:22AM -0600, Rob Herring wrote:
> > > > > > > On Mon, Aug 20, 2018 at 5:17 AM Maxime Ripard <maxime.ripard@bootlin.com> wrote:
> > > > > > > >
> > > > > > > > On Sat, Aug 04, 2018 at 09:03:49AM +0200, Emmanuel Vadot wrote:
> > > > > > > > > This patch adds documentation for Device-Tree bindings for the Allwinner
> > > > > > > > > Thermal Sensor Controller found on the H3, H5 and A64 SoCs
> > > > > > > > >
> > > > > > > > > Signed-off-by: Emmanuel Vadot <manu@freebsd.org>
> > > > > > > >
> > > > > > > > I'm not going to merge a binding for a device that doesn't have any
> > > > > > > > driver implemented at the moment in Linux.
> > > > > > > 
> > > > > > > I'll take it then. Linux is not the only DT client.
> > > > > > 
> > > > > > Then don't complain if we ever have to break the ABI. We never tested
> > > > > > that hardware, never had any code running on it, and it *will* cause
> > > > > > some issues. For example, the calibration data have never been used
> > > > > > and how they should be represented have never been described, since no
> > > > > > one ever actually tried to use it.
> > > > > > 
> > > > > > And sure, Linux is not the only DT client. Just like FreeBSD isn't.
> > > > > 
> > > > >  What kind of data would you need for me to make things better ?
> > > > >  We have the driver in FreeBSD for almost two years now, whne I started
> > > > > to see how to upstream it I noticed a lot of problems and spent 4 or 5
> > > > > days to try on all the SoCs mentionned in the serie, the only SoC I
> > > > > didn't include it the A83T as for some reason I couldn't make the
> > > > > driver work.
> > > > 
> > > > Do you have a link to that driver? 
> > > 
> > >  https://github.com/freebsd/freebsd/blob/master/sys/arm/allwinner/aw_thermal.c
> > > 
> > > > How and how much did you test it?
> > > 
> > >  Using a cheap IR thermometer as it's all I can afford.
> > >  Then running multiples cpufreq-a53 process and comparing the result.
> > >  Did the same without using the calibration data, result where closer
> > > when I used them.
> > > 
> > > > Are you using the calibration data stored in the SID?
> > > 
> > >  Yes, which is why the serie contain the nvmem cell for the SID.
> > > 
> > > > 
> > > > > I just hope that you understand that we cannot wait for Linux to
> > > > > have a driver to have some bindings.
> > > > 
> > > > Just like I'm sure you can understand that just merging the DT bits
> > > > without testing anything caused some troubles in the past, and I don't
> > > > want to discover it in a year from now.
> > > 
> > >  I do, I don't like wrong DT info as much as you do I think. I had
> > > the unfortunate event to find that the sun4i-a10-timer compatible used
> > > in every soc is plain wrong for !A10 and !A13, patches comming soon.
> > >  I want those bits merged but I also want that they reflect reality,
> > > this is not a hard driver to do, NetBSD also have one I think, maybe
> > > OpenBSD do to.
> > 
> > 
> > I would prefer to see a series of DT bindings + driver. Can you send
> > your next iteration with the driver so we can review both together?
> 
>  You mean a link to the FreeBSD driver (and OpenBSD since they have one
> too) in the cover letter ?

That would definitely be valuable, yes, thanks!
Maxime

-- 
Maxime Ripard, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH 1/7] dt-bindings: Add DT bindings documentation for Allwinner Thermal Sensor Controller
  2018-08-24 19:59           ` Emmanuel Vadot
  2018-08-24 23:03             ` Eduardo Valentin
@ 2018-08-29 13:31             ` Maxime Ripard
  1 sibling, 0 replies; 20+ messages in thread
From: Maxime Ripard @ 2018-08-29 13:31 UTC (permalink / raw)
  To: Emmanuel Vadot
  Cc: Rob Herring, Mark Rutland, Eduardo Valentin, open list:THERMAL,
	Catalin Marinas, Will Deacon, linux-kernel, Emmanuel Vadot,
	Chen-Yu Tsai,
	moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE,
	Zhang Rui, devicetree

[-- Attachment #1: Type: text/plain, Size: 3432 bytes --]

On Fri, Aug 24, 2018 at 09:59:21PM +0200, Emmanuel Vadot wrote:
> 
>  Hi,
> 
> On Fri, 24 Aug 2018 16:58:40 +0200
> Maxime Ripard <maxime.ripard@bootlin.com> wrote:
> 
> > Hi,
> > 
> > On Mon, Aug 20, 2018 at 04:27:15PM +0200, Emmanuel Vadot wrote:
> > > On Mon, 20 Aug 2018 16:07:37 +0200
> > > Maxime Ripard <maxime.ripard@bootlin.com> wrote:
> > > 
> > > > On Mon, Aug 20, 2018 at 07:41:22AM -0600, Rob Herring wrote:
> > > > > On Mon, Aug 20, 2018 at 5:17 AM Maxime Ripard <maxime.ripard@bootlin.com> wrote:
> > > > > >
> > > > > > On Sat, Aug 04, 2018 at 09:03:49AM +0200, Emmanuel Vadot wrote:
> > > > > > > This patch adds documentation for Device-Tree bindings for the Allwinner
> > > > > > > Thermal Sensor Controller found on the H3, H5 and A64 SoCs
> > > > > > >
> > > > > > > Signed-off-by: Emmanuel Vadot <manu@freebsd.org>
> > > > > >
> > > > > > I'm not going to merge a binding for a device that doesn't have any
> > > > > > driver implemented at the moment in Linux.
> > > > > 
> > > > > I'll take it then. Linux is not the only DT client.
> > > > 
> > > > Then don't complain if we ever have to break the ABI. We never tested
> > > > that hardware, never had any code running on it, and it *will* cause
> > > > some issues. For example, the calibration data have never been used
> > > > and how they should be represented have never been described, since no
> > > > one ever actually tried to use it.
> > > > 
> > > > And sure, Linux is not the only DT client. Just like FreeBSD isn't.
> > > 
> > >  What kind of data would you need for me to make things better ?
> > >  We have the driver in FreeBSD for almost two years now, whne I started
> > > to see how to upstream it I noticed a lot of problems and spent 4 or 5
> > > days to try on all the SoCs mentionned in the serie, the only SoC I
> > > didn't include it the A83T as for some reason I couldn't make the
> > > driver work.
> > 
> > Do you have a link to that driver? 
> 
>  https://github.com/freebsd/freebsd/blob/master/sys/arm/allwinner/aw_thermal.c
> 
> > How and how much did you test it?
> 
>  Using a cheap IR thermometer as it's all I can afford.
>  Then running multiples cpufreq-a53 process and comparing the result.
>  Did the same without using the calibration data, result where closer
> when I used them.

Ok.

> > Are you using the calibration data stored in the SID?
> 
>  Yes, which is why the serie contain the nvmem cell for the SID.

Ok.

> > 
> > > I just hope that you understand that we cannot wait for Linux to
> > > have a driver to have some bindings.
> > 
> > Just like I'm sure you can understand that just merging the DT bits
> > without testing anything caused some troubles in the past, and I don't
> > want to discover it in a year from now.
> 
>  I do, I don't like wrong DT info as much as you do I think. I had
> the unfortunate event to find that the sun4i-a10-timer compatible used
> in every soc is plain wrong for !A10 and !A13, patches comming soon.
>  I want those bits merged but I also want that they reflect reality,
> this is not a hard driver to do, NetBSD also have one I think, maybe
> OpenBSD do to.

I guess these one went un-noticed because they are not the default
source of time keeping and events in the kernel.

Thanks!
Maxime

-- 
Maxime Ripard, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 20+ messages in thread

end of thread, other threads:[~2018-08-29 13:32 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-08-04  7:03 [PATCH 1/7] dt-bindings: Add DT bindings documentation for Allwinner Thermal Sensor Controller Emmanuel Vadot
2018-08-04  7:03 ` [PATCH 2/7] ARM: dts: sun8i: h3: Add thermal sensor controller node Emmanuel Vadot
2018-08-04  7:03 ` [PATCH 3/7] arm64: dts: allwinner: h5: " Emmanuel Vadot
2018-08-04  7:03 ` [PATCH 4/7] arm64: dts: allwinner: a64: " Emmanuel Vadot
2018-08-04  7:03 ` [PATCH 5/7] ARM: dts: sun8i: h3: Enable the THS on H3 boards Emmanuel Vadot
2018-08-04  7:03 ` [PATCH 6/7] arm64: dts: allwinner: a64: Enable the THS on A64 boards Emmanuel Vadot
2018-08-04  7:03 ` [PATCH 7/7] arm64: dts: allwinner: H5: Enable the THS on H5 boards Emmanuel Vadot
2018-08-14 19:20 ` [PATCH 1/7] dt-bindings: Add DT bindings documentation for Allwinner Thermal Sensor Controller Rob Herring
2018-08-20 11:17 ` Maxime Ripard
2018-08-20 13:41   ` Rob Herring
2018-08-20 13:57     ` Emmanuel Vadot
2018-08-20 14:07     ` Maxime Ripard
2018-08-20 14:27       ` Emmanuel Vadot
2018-08-24 14:58         ` Maxime Ripard
2018-08-24 19:59           ` Emmanuel Vadot
2018-08-24 23:03             ` Eduardo Valentin
2018-08-25 15:43               ` Emmanuel Vadot
2018-08-29 12:38                 ` Maxime Ripard
2018-08-29 13:31             ` Maxime Ripard
2018-08-20 18:47       ` Rob Herring

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).