All of lore.kernel.org
 help / color / mirror / Atom feed
* [RFC PATCH v2 0/4] IIO-based thermal sensor driver for Allwinner H3 SoC
@ 2017-04-02 13:33 ` Icenowy Zheng
  0 siblings, 0 replies; 52+ messages in thread
From: Icenowy Zheng @ 2017-04-02 13:33 UTC (permalink / raw)
  To: Lee Jones, Maxime Ripard, Chen-Yu Tsai, Jonathan Cameron,
	Quentin Schulz, Zhang Rui
  Cc: devicetree, linux-pm, linux-arm-kernel, linux-kernel, linux-iio,
	linux-sunxi, Icenowy Zheng

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 patchset by Quentin Schulz at [1].

[1] http://lists.infradead.org/pipermail/linux-arm-kernel/2017-March/495505.html

Icenowy Zheng (4):
  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

 .../devicetree/bindings/mfd/sun4i-gpadc.txt        |  23 ++-
 arch/arm/boot/dts/sun8i-h3.dtsi                    |  26 +++
 drivers/iio/adc/sun4i-gpadc-iio.c                  | 215 +++++++++++++++++----
 include/linux/mfd/sun4i-gpadc.h                    |  36 +++-
 4 files changed, 254 insertions(+), 46 deletions(-)

-- 
2.12.2

^ permalink raw reply	[flat|nested] 52+ messages in thread
* Re: [RFC PATCH v2 1/4] dt-bindings: update the Allwinner GPADC device tree binding for H3
@ 2017-04-05 19:11 Icenowy Zheng
  0 siblings, 0 replies; 52+ messages in thread
From: Icenowy Zheng @ 2017-04-05 19:11 UTC (permalink / raw)
  To: Rob Herring
  Cc: Zhang Rui, linux-sunxi, linux-pm-u79uwXL29TY76Z2rM5mHXA,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	linux-iio-u79uwXL29TY76Z2rM5mHXA,
	devicetree-u79uwXL29TY76Z2rM5mHXA, Quentin Schulz, Lee Jones,
	Maxime Ripard, Jonathan Cameron,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, Chen-Yu Tsai


2017年4月6日 03:04于 Rob Herring <robh@kernel.org>写道:
>
> On Tue, Apr 4, 2017 at 10:02 AM, Icenowy Zheng <icenowy-h8G6r0blFSE@public.gmane.org> wrote: 
> > 
> > 
> > 在 2017年04月04日 22:47, Rob Herring 写道: 
> >> 
> >> On Sun, Apr 02, 2017 at 09:33:01PM +0800, Icenowy Zheng wrote: 
> >>> 
> >>> Allwinner H3 features a thermal sensor like the one in A33, but has its 
> >>> register re-arranged, the clock divider moved to CCU (originally the 
> >>> clock divider is in ADC) and added a pair of bus clock and reset. 
> >>> 
> >>> Update the binding document to cover H3. 
> >>> 
> >>> Signed-off-by: Icenowy Zheng <icenowy-h8G6r0blFSE@public.gmane.org> 
> >>> --- 
> >>>  .../devicetree/bindings/mfd/sun4i-gpadc.txt        | 23 
> >>> ++++++++++++++++++++-- 
> >>>  1 file changed, 21 insertions(+), 2 deletions(-) 
> >>> 
> >>> diff --git a/Documentation/devicetree/bindings/mfd/sun4i-gpadc.txt 
> >>> b/Documentation/devicetree/bindings/mfd/sun4i-gpadc.txt 
> >>> index badff3611a98..7753133ca0ff 100644 
> >>> --- a/Documentation/devicetree/bindings/mfd/sun4i-gpadc.txt 
> >>> +++ b/Documentation/devicetree/bindings/mfd/sun4i-gpadc.txt 
> >>> @@ -4,12 +4,20 @@ The Allwinner SoCs all have an ADC that can also act as 
> >>> a thermal sensor 
> >>>  and sometimes as a touchscreen controller. 
> >>> 
> >>>  Required properties: 
> >>> -  - compatible: "allwinner,sun8i-a33-ths", 
> >>> +  - compatible: must contain one of the following compatibles: 
> >>> +               - "allwinner,sun8i-a33-ths" 
> >>> +               - "allwinner,sun8i-h3-ths" 
> >>>    - reg: mmio address range of the chip, 
> >>>    - #thermal-sensor-cells: shall be 0, 
> >>>    - #io-channel-cells: shall be 0, 
> >>> 
> >>> -Example: 
> >>> +Required properties for the following compatibles: 
> >>> +               - "allwinner,sun8i-h3-ths" 
> >>> +  - clocks: the bus clock and the input clock of the ADC, 
> >>> +  - clock-names: should be "bus" and "ths", 
> >>> +  - resets: the bus reset of the ADC, 
> >>> + 
> >>> +Example for A33: 
> >>>         ths: ths@01c25000 { 
> >>>                 compatible = "allwinner,sun8i-a33-ths"; 
> >>>                 reg = <0x01c25000 0x100>; 
> >>> @@ -17,6 +25,17 @@ Example: 
> >>>                 #io-channel-cells = <0>; 
> >>>         }; 
> >>> 
> >>> +Example for H3: 
> >>> +       ths: ths@01c25000 { 
> >> 
> >> 
> >> adc@... 
> > 
> > 
> > It's a thermal sensor, so I think call it THS is more appropriate 
> > here. It's implemented as an ADC driver just because the internal 
> > code reusing of Linux. From device tree binding view I choose to 
> > call it ths. 
>
> There's numerous occurrences in this file and the filename that call it an ADC. 
>
> Furthermore, node names are supposed to be generic, not part #'s or 
> whatever you decide to make up. So pick from adc or temperature-sensor 
> as those are the standard names . 

OK. I will make it :
ths: temperature-sensor@1c25000

(Calling it temperature sensor is according to the datasheet name)

>
> Rob 

-- 
You received this message because you are subscribed to the Google Groups "linux-sunxi" group.
To unsubscribe from this group and stop receiving emails from it, send an email to linux-sunxi+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
For more options, visit https://groups.google.com/d/optout.

^ permalink raw reply	[flat|nested] 52+ messages in thread
* Re: [RFC PATCH v2 1/4] dt-bindings: update the Allwinner GPADC device tree binding for H3
@ 2017-04-05 19:11 ` Icenowy Zheng
  0 siblings, 0 replies; 52+ messages in thread
From: Icenowy Zheng @ 2017-04-05 19:11 UTC (permalink / raw)
  To: Rob Herring
  Cc: Zhang Rui, linux-sunxi, linux-pm, linux-kernel, linux-iio,
	devicetree, Quentin Schulz, Lee Jones, Maxime Ripard,
	Jonathan Cameron, linux-arm-kernel, Chen-Yu Tsai


2017年4月6日 03:04于 Rob Herring <robh@kernel.org>写道:
>
> On Tue, Apr 4, 2017 at 10:02 AM, Icenowy Zheng <icenowy@aosc.io> wrote: 
> > 
> > 
> > 在 2017年04月04日 22:47, Rob Herring 写道: 
> >> 
> >> On Sun, Apr 02, 2017 at 09:33:01PM +0800, Icenowy Zheng wrote: 
> >>> 
> >>> Allwinner H3 features a thermal sensor like the one in A33, but has its 
> >>> register re-arranged, the clock divider moved to CCU (originally the 
> >>> clock divider is in ADC) and added a pair of bus clock and reset. 
> >>> 
> >>> Update the binding document to cover H3. 
> >>> 
> >>> Signed-off-by: Icenowy Zheng <icenowy@aosc.io> 
> >>> --- 
> >>>  .../devicetree/bindings/mfd/sun4i-gpadc.txt        | 23 
> >>> ++++++++++++++++++++-- 
> >>>  1 file changed, 21 insertions(+), 2 deletions(-) 
> >>> 
> >>> diff --git a/Documentation/devicetree/bindings/mfd/sun4i-gpadc.txt 
> >>> b/Documentation/devicetree/bindings/mfd/sun4i-gpadc.txt 
> >>> index badff3611a98..7753133ca0ff 100644 
> >>> --- a/Documentation/devicetree/bindings/mfd/sun4i-gpadc.txt 
> >>> +++ b/Documentation/devicetree/bindings/mfd/sun4i-gpadc.txt 
> >>> @@ -4,12 +4,20 @@ The Allwinner SoCs all have an ADC that can also act as 
> >>> a thermal sensor 
> >>>  and sometimes as a touchscreen controller. 
> >>> 
> >>>  Required properties: 
> >>> -  - compatible: "allwinner,sun8i-a33-ths", 
> >>> +  - compatible: must contain one of the following compatibles: 
> >>> +               - "allwinner,sun8i-a33-ths" 
> >>> +               - "allwinner,sun8i-h3-ths" 
> >>>    - reg: mmio address range of the chip, 
> >>>    - #thermal-sensor-cells: shall be 0, 
> >>>    - #io-channel-cells: shall be 0, 
> >>> 
> >>> -Example: 
> >>> +Required properties for the following compatibles: 
> >>> +               - "allwinner,sun8i-h3-ths" 
> >>> +  - clocks: the bus clock and the input clock of the ADC, 
> >>> +  - clock-names: should be "bus" and "ths", 
> >>> +  - resets: the bus reset of the ADC, 
> >>> + 
> >>> +Example for A33: 
> >>>         ths: ths@01c25000 { 
> >>>                 compatible = "allwinner,sun8i-a33-ths"; 
> >>>                 reg = <0x01c25000 0x100>; 
> >>> @@ -17,6 +25,17 @@ Example: 
> >>>                 #io-channel-cells = <0>; 
> >>>         }; 
> >>> 
> >>> +Example for H3: 
> >>> +       ths: ths@01c25000 { 
> >> 
> >> 
> >> adc@... 
> > 
> > 
> > It's a thermal sensor, so I think call it THS is more appropriate 
> > here. It's implemented as an ADC driver just because the internal 
> > code reusing of Linux. From device tree binding view I choose to 
> > call it ths. 
>
> There's numerous occurrences in this file and the filename that call it an ADC. 
>
> Furthermore, node names are supposed to be generic, not part #'s or 
> whatever you decide to make up. So pick from adc or temperature-sensor 
> as those are the standard names . 

OK. I will make it :
ths: temperature-sensor@1c25000

(Calling it temperature sensor is according to the datasheet name)

>
> Rob 

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

end of thread, other threads:[~2017-04-06 12:12 UTC | newest]

Thread overview: 52+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-04-02 13:33 [RFC PATCH v2 0/4] IIO-based thermal sensor driver for Allwinner H3 SoC Icenowy Zheng
2017-04-02 13:33 ` Icenowy Zheng
2017-04-02 13:33 ` Icenowy Zheng
2017-04-02 13:33 ` [RFC PATCH v2 1/4] dt-bindings: update the Allwinner GPADC device tree binding for H3 Icenowy Zheng
2017-04-02 13:33   ` Icenowy Zheng
2017-04-02 13:33   ` Icenowy Zheng
2017-04-03  9:15   ` Maxime Ripard
2017-04-03  9:15     ` Maxime Ripard
2017-04-03  9:15     ` Maxime Ripard
2017-04-03  9:31     ` Icenowy Zheng
2017-04-03  9:31       ` Icenowy Zheng
2017-04-03  9:31       ` Icenowy Zheng
2017-04-03  9:31       ` Icenowy Zheng
2017-04-04 13:20       ` Maxime Ripard
2017-04-04 13:20         ` Maxime Ripard
2017-04-04 13:20         ` Maxime Ripard
2017-04-04 14:47   ` Rob Herring
2017-04-04 14:47     ` Rob Herring
2017-04-04 14:47     ` Rob Herring
2017-04-04 15:02     ` Icenowy Zheng
2017-04-04 15:02       ` Icenowy Zheng
2017-04-04 15:02       ` Icenowy Zheng
2017-04-05 19:04       ` Rob Herring
2017-04-05 19:04         ` Rob Herring
2017-04-05 19:04         ` Rob Herring
2017-04-05 19:04         ` Rob Herring
2017-04-02 13:33 ` [RFC PATCH v2 2/4] iio: adc: sun4i-gpadc-iio: rename A23/A33-specified registers to contain A23 Icenowy Zheng
2017-04-02 13:33   ` Icenowy Zheng
2017-04-02 13:33   ` Icenowy Zheng
2017-04-03 14:28   ` Lee Jones
2017-04-03 14:28     ` Lee Jones
2017-04-03 14:28     ` Lee Jones
2017-04-02 13:33 ` [RFC PATCH v2 3/4] iio: adc: sun4i-gpadc-iio: add support for H3 thermal sensor Icenowy Zheng
2017-04-02 13:33   ` Icenowy Zheng
2017-04-02 13:33   ` Icenowy Zheng
2017-04-02 14:29   ` Quentin Schulz
2017-04-02 14:29     ` Quentin Schulz
2017-04-02 14:29     ` Quentin Schulz
2017-04-02 13:33 ` [RFC PATCH v2 4/4] ARM: sun8i: h3: add support for the thermal sensor in H3 Icenowy Zheng
2017-04-02 13:33   ` Icenowy Zheng
2017-04-02 13:33   ` Icenowy Zheng
2017-04-02 14:34   ` Quentin Schulz
2017-04-02 14:34     ` Quentin Schulz
2017-04-03  6:42     ` Maxime Ripard
2017-04-03  6:42       ` Maxime Ripard
2017-04-03  6:42       ` Maxime Ripard
2017-04-05 19:11 [RFC PATCH v2 1/4] dt-bindings: update the Allwinner GPADC device tree binding for H3 Icenowy Zheng
2017-04-05 19:11 Icenowy Zheng
2017-04-05 19:11 ` Icenowy Zheng
2017-04-06 12:11 ` Lee Jones
2017-04-06 12:11   ` Lee Jones
2017-04-06 12:11   ` Lee Jones

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.