All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: [PATCH 1/7] dt-bindings: Add DT bindings documentation for Allwinner Thermal Sensor Controller
@ 2018-08-25 11:07 Mark Kettenis
  2018-08-25 15:42   ` Emmanuel Vadot
  0 siblings, 1 reply; 44+ messages in thread
From: Mark Kettenis @ 2018-08-25 11:07 UTC (permalink / raw)
  To: devicetree, linux-arm-kernel; +Cc: Emmanuel Vadot

Hi Emmanuel,

I think the following bit in your proposed binding is wrong:

+- #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.

I think what you're trying to say here is that H3 has a single sensor
and that H5 and A64 have more sensors.  But even though the number of
sensors is different for H5 and A64 (two for H3, three for A64) you
need only a single cell to describe which sensor to read.  So
#thermal-sensors-cells should be 1 for both H5 and A64.

As far as I can see this proposed binding is compatible with the
OpenBSD's sxitemp(4) driver.  That driver also supports the R40 with
"allwinner,sun8i-r40-ths" as the compatible string.  The R40 has two
sensors so #thermal-sensor-cells should be 1 for this SoC as well.

Cheers,

Mark

^ permalink raw reply	[flat|nested] 44+ messages in thread
* [PATCH 1/7] dt-bindings: Add DT bindings documentation for Allwinner Thermal Sensor Controller
@ 2018-08-04  7:03 ` Emmanuel Vadot
  0 siblings, 0 replies; 44+ 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] 44+ messages in thread

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

Thread overview: 44+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-08-25 11:07 [PATCH 1/7] dt-bindings: Add DT bindings documentation for Allwinner Thermal Sensor Controller Mark Kettenis
2018-08-25 15:42 ` Emmanuel Vadot
2018-08-25 15:42   ` Emmanuel Vadot
2018-08-25 15:49   ` Emmanuel Vadot
2018-08-25 15:49     ` Emmanuel Vadot
  -- strict thread matches above, loose matches on Subject: below --
2018-08-04  7:03 Emmanuel Vadot
2018-08-04  7:03 ` Emmanuel Vadot
2018-08-14 19:20 ` Rob Herring
2018-08-14 19:20   ` Rob Herring
2018-08-20 11:17 ` Maxime Ripard
2018-08-20 11:17   ` Maxime Ripard
2018-08-20 13:41   ` Rob Herring
2018-08-20 13:41     ` Rob Herring
2018-08-20 13:41     ` Rob Herring
2018-08-20 13:57     ` Emmanuel Vadot
2018-08-20 13:57       ` Emmanuel Vadot
2018-08-20 13:57       ` Emmanuel Vadot
2018-08-20 14:07     ` Maxime Ripard
2018-08-20 14:07       ` Maxime Ripard
2018-08-20 14:07       ` Maxime Ripard
2018-08-20 14:27       ` Emmanuel Vadot
2018-08-20 14:27         ` Emmanuel Vadot
2018-08-20 14:27         ` Emmanuel Vadot
2018-08-24 14:58         ` Maxime Ripard
2018-08-24 14:58           ` Maxime Ripard
2018-08-24 14:58           ` Maxime Ripard
2018-08-24 19:59           ` Emmanuel Vadot
2018-08-24 19:59             ` Emmanuel Vadot
2018-08-24 19:59             ` Emmanuel Vadot
2018-08-24 23:03             ` Eduardo Valentin
2018-08-24 23:03               ` Eduardo Valentin
2018-08-24 23:03               ` Eduardo Valentin
2018-08-25 15:43               ` Emmanuel Vadot
2018-08-25 15:43                 ` Emmanuel Vadot
2018-08-25 15:43                 ` Emmanuel Vadot
2018-08-29 12:38                 ` Maxime Ripard
2018-08-29 12:38                   ` Maxime Ripard
2018-08-29 12:38                   ` Maxime Ripard
2018-08-29 13:31             ` Maxime Ripard
2018-08-29 13:31               ` Maxime Ripard
2018-08-29 13:31               ` Maxime Ripard
2018-08-20 18:47       ` Rob Herring
2018-08-20 18:47         ` Rob Herring
2018-08-20 18:47         ` Rob Herring

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.