* Re: [RFC PATCH v2 1/4] dt-bindings: update the Allwinner GPADC device tree binding for H3 [not found] ` <20170406095534.299945C355D-Y9/x5g2N/Tt0ykcd9G8QkxTxI0vvWBSX@public.gmane.org> @ 2017-04-06 12:11 ` Lee Jones 0 siblings, 0 replies; 9+ messages in thread From: Lee Jones @ 2017-04-06 12:11 UTC (permalink / raw) To: Icenowy Zheng Cc: Rob Herring, Zhang Rui, linux-sunxi, linux-pm-u79uwXL29TY76Z2rM5mHXA, linux-kernel-u79uwXL29TY76Z2rM5mHXA, linux-iio-u79uwXL29TY76Z2rM5mHXA, devicetree-u79uwXL29TY76Z2rM5mHXA, Quentin Schulz, Maxime Ripard, Jonathan Cameron, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, Chen-Yu Tsai On Thu, 06 Apr 2017, Icenowy Zheng wrote: > 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 写道: > OK. I will make it : > ths: temperature-sensor@1c25000 Can you fix your broken email client please? You need to set it up to reply to mails to they stay threaded. Your mailer is currently sending all of your replies as their own, independent messages. -- Lee Jones Linaro STMicroelectronics Landing Team Lead Linaro.org │ Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog -- 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] 9+ 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; 9+ 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] 9+ messages in thread
* [RFC PATCH v2 0/4] IIO-based thermal sensor driver for Allwinner H3 SoC
@ 2017-04-02 13:33 Icenowy Zheng
[not found] ` <20170402133304.56824-1-icenowy-h8G6r0blFSE@public.gmane.org>
0 siblings, 1 reply; 9+ 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-u79uwXL29TY76Z2rM5mHXA,
linux-pm-u79uwXL29TY76Z2rM5mHXA,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
linux-kernel-u79uwXL29TY76Z2rM5mHXA,
linux-iio-u79uwXL29TY76Z2rM5mHXA,
linux-sunxi-/JYPxA39Uh5TLH3MbocFFw, 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] 9+ messages in thread[parent not found: <20170402133304.56824-1-icenowy-h8G6r0blFSE@public.gmane.org>]
* [RFC PATCH v2 1/4] dt-bindings: update the Allwinner GPADC device tree binding for H3 [not found] ` <20170402133304.56824-1-icenowy-h8G6r0blFSE@public.gmane.org> @ 2017-04-02 13:33 ` Icenowy Zheng [not found] ` <20170402133304.56824-2-icenowy-h8G6r0blFSE@public.gmane.org> 0 siblings, 1 reply; 9+ 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-u79uwXL29TY76Z2rM5mHXA, linux-pm-u79uwXL29TY76Z2rM5mHXA, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, linux-kernel-u79uwXL29TY76Z2rM5mHXA, linux-iio-u79uwXL29TY76Z2rM5mHXA, linux-sunxi-/JYPxA39Uh5TLH3MbocFFw, Icenowy Zheng 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 { + compatible = "allwinner,sun8i-h3-ths"; + reg = <0x01c25000 0x100>; + clocks = <&ccu CLK_BUS_THS>, <&ccu CLK_THS>; + clock-names = "bus", "ths"; + resets = <&ccu RST_BUS_THS>; + #thermal-sensor-cells = <0>; + #io-channel-cells = <0>; + }; + sun4i, sun5i and sun6i SoCs are also supported via the older binding: sun4i resistive touchscreen controller -- 2.12.2 ^ permalink raw reply related [flat|nested] 9+ messages in thread
[parent not found: <20170402133304.56824-2-icenowy-h8G6r0blFSE@public.gmane.org>]
* Re: [RFC PATCH v2 1/4] dt-bindings: update the Allwinner GPADC device tree binding for H3 [not found] ` <20170402133304.56824-2-icenowy-h8G6r0blFSE@public.gmane.org> @ 2017-04-03 9:15 ` Maxime Ripard 2017-04-03 9:31 ` Icenowy Zheng 2017-04-04 14:47 ` Rob Herring 1 sibling, 1 reply; 9+ messages in thread From: Maxime Ripard @ 2017-04-03 9:15 UTC (permalink / raw) To: Icenowy Zheng Cc: Lee Jones, Chen-Yu Tsai, Jonathan Cameron, Quentin Schulz, Zhang Rui, devicetree-u79uwXL29TY76Z2rM5mHXA, linux-pm-u79uwXL29TY76Z2rM5mHXA, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, linux-kernel-u79uwXL29TY76Z2rM5mHXA, linux-iio-u79uwXL29TY76Z2rM5mHXA, linux-sunxi-/JYPxA39Uh5TLH3MbocFFw [-- Attachment #1: Type: text/plain, Size: 1667 bytes --] 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", I guess mod instead of ths would be more consistent. Maxime -- Maxime Ripard, Free Electrons Embedded Linux and Kernel engineering http://free-electrons.com ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [RFC PATCH v2 1/4] dt-bindings: update the Allwinner GPADC device tree binding for H3 2017-04-03 9:15 ` Maxime Ripard @ 2017-04-03 9:31 ` Icenowy Zheng [not found] ` <e4d50e78-afe7-6107-6d9a-15e4c732d79a-h8G6r0blFSE@public.gmane.org> 0 siblings, 1 reply; 9+ messages in thread From: Icenowy Zheng @ 2017-04-03 9:31 UTC (permalink / raw) To: Maxime Ripard Cc: Lee Jones, Chen-Yu Tsai, Jonathan Cameron, Quentin Schulz, Zhang Rui, devicetree-u79uwXL29TY76Z2rM5mHXA, linux-pm-u79uwXL29TY76Z2rM5mHXA, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, linux-kernel-u79uwXL29TY76Z2rM5mHXA, linux-iio-u79uwXL29TY76Z2rM5mHXA, linux-sunxi-/JYPxA39Uh5TLH3MbocFFw 在 2017年04月03日 17:15, Maxime Ripard 写道: > 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", > > I guess mod instead of ths would be more consistent. In fact I will prefer "sample" here if not "ths", as it's used for the sampling, not like other mod clocks, which controls all the IP block's logic. > > Maxime > -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 9+ messages in thread
[parent not found: <e4d50e78-afe7-6107-6d9a-15e4c732d79a-h8G6r0blFSE@public.gmane.org>]
* Re: [RFC PATCH v2 1/4] dt-bindings: update the Allwinner GPADC device tree binding for H3 [not found] ` <e4d50e78-afe7-6107-6d9a-15e4c732d79a-h8G6r0blFSE@public.gmane.org> @ 2017-04-04 13:20 ` Maxime Ripard 0 siblings, 0 replies; 9+ messages in thread From: Maxime Ripard @ 2017-04-04 13:20 UTC (permalink / raw) To: Icenowy Zheng Cc: Lee Jones, Chen-Yu Tsai, Jonathan Cameron, Quentin Schulz, Zhang Rui, devicetree-u79uwXL29TY76Z2rM5mHXA, linux-pm-u79uwXL29TY76Z2rM5mHXA, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, linux-kernel-u79uwXL29TY76Z2rM5mHXA, linux-iio-u79uwXL29TY76Z2rM5mHXA, linux-sunxi-/JYPxA39Uh5TLH3MbocFFw [-- Attachment #1: Type: text/plain, Size: 2645 bytes --] On Mon, Apr 03, 2017 at 05:31:11PM +0800, Icenowy Zheng wrote: > > > 在 2017年04月03日 17:15, Maxime Ripard 写道: > > 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", > > > > I guess mod instead of ths would be more consistent. > > In fact I will prefer "sample" here if not "ths", as it's used > for the sampling, not like other mod clocks, which controls > all the IP block's logic. All the other mod clocks control some sort of sampling. The audio mod clocks will be used to sample data in capture, same thing for NAND, MMC, SPI, etc. Please remain consistent. Maxime -- Maxime Ripard, Free Electrons Embedded Linux and Kernel engineering http://free-electrons.com -- 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. [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 801 bytes --] ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [RFC PATCH v2 1/4] dt-bindings: update the Allwinner GPADC device tree binding for H3 [not found] ` <20170402133304.56824-2-icenowy-h8G6r0blFSE@public.gmane.org> 2017-04-03 9:15 ` Maxime Ripard @ 2017-04-04 14:47 ` Rob Herring 2017-04-04 15:02 ` Icenowy Zheng 1 sibling, 1 reply; 9+ messages in thread From: Rob Herring @ 2017-04-04 14:47 UTC (permalink / raw) To: Icenowy Zheng Cc: Lee Jones, Maxime Ripard, Chen-Yu Tsai, Jonathan Cameron, Quentin Schulz, Zhang Rui, devicetree-u79uwXL29TY76Z2rM5mHXA, linux-pm-u79uwXL29TY76Z2rM5mHXA, linux-iio-u79uwXL29TY76Z2rM5mHXA, linux-kernel-u79uwXL29TY76Z2rM5mHXA, linux-sunxi-/JYPxA39Uh5TLH3MbocFFw, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r 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@... And drop the leading 0. > + compatible = "allwinner,sun8i-h3-ths"; > + reg = <0x01c25000 0x100>; > + clocks = <&ccu CLK_BUS_THS>, <&ccu CLK_THS>; > + clock-names = "bus", "ths"; > + resets = <&ccu RST_BUS_THS>; > + #thermal-sensor-cells = <0>; > + #io-channel-cells = <0>; > + }; > + > sun4i, sun5i and sun6i SoCs are also supported via the older binding: > > sun4i resistive touchscreen controller > -- > 2.12.2 > > > _______________________________________________ > linux-arm-kernel mailing list > linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org > http://lists.infradead.org/mailman/listinfo/linux-arm-kernel ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [RFC PATCH v2 1/4] dt-bindings: update the Allwinner GPADC device tree binding for H3 2017-04-04 14:47 ` Rob Herring @ 2017-04-04 15:02 ` Icenowy Zheng [not found] ` <bdc43a73-a2d6-01ae-8113-277f7174697c-h8G6r0blFSE@public.gmane.org> 0 siblings, 1 reply; 9+ messages in thread From: Icenowy Zheng @ 2017-04-04 15:02 UTC (permalink / raw) To: Rob Herring Cc: devicetree-u79uwXL29TY76Z2rM5mHXA, linux-pm-u79uwXL29TY76Z2rM5mHXA, linux-iio-u79uwXL29TY76Z2rM5mHXA, linux-sunxi-/JYPxA39Uh5TLH3MbocFFw, linux-kernel-u79uwXL29TY76Z2rM5mHXA, Quentin Schulz, Chen-Yu Tsai, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, Maxime Ripard, Lee Jones, Zhang Rui, Jonathan Cameron 在 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. > > And drop the leading 0. OK. > >> + compatible = "allwinner,sun8i-h3-ths"; >> + reg = <0x01c25000 0x100>; >> + clocks = <&ccu CLK_BUS_THS>, <&ccu CLK_THS>; >> + clock-names = "bus", "ths"; >> + resets = <&ccu RST_BUS_THS>; >> + #thermal-sensor-cells = <0>; >> + #io-channel-cells = <0>; >> + }; >> + >> sun4i, sun5i and sun6i SoCs are also supported via the older binding: >> >> sun4i resistive touchscreen controller >> -- >> 2.12.2 >> >> >> _______________________________________________ >> linux-arm-kernel mailing list >> linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org >> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel > > _______________________________________________ > linux-arm-kernel mailing list > linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org > http://lists.infradead.org/mailman/listinfo/linux-arm-kernel > -- 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] 9+ messages in thread
[parent not found: <bdc43a73-a2d6-01ae-8113-277f7174697c-h8G6r0blFSE@public.gmane.org>]
* Re: [RFC PATCH v2 1/4] dt-bindings: update the Allwinner GPADC device tree binding for H3 [not found] ` <bdc43a73-a2d6-01ae-8113-277f7174697c-h8G6r0blFSE@public.gmane.org> @ 2017-04-05 19:04 ` Rob Herring 0 siblings, 0 replies; 9+ messages in thread From: Rob Herring @ 2017-04-05 19:04 UTC (permalink / raw) To: Icenowy Zheng Cc: devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-pm-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-iio-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Quentin Schulz, linux-sunxi, Jonathan Cameron, Maxime Ripard, Chen-Yu Tsai, Lee Jones, Zhang Rui, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.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 . 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] 9+ messages in thread
end of thread, other threads:[~2017-04-06 12:11 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20170406095534.299945C355D@relay.mailchannels.net>
[not found] ` <20170406095534.299945C355D-Y9/x5g2N/Tt0ykcd9G8QkxTxI0vvWBSX@public.gmane.org>
2017-04-06 12:11 ` [RFC PATCH v2 1/4] dt-bindings: update the Allwinner GPADC device tree binding for H3 Lee Jones
2017-04-05 19:11 Icenowy Zheng
-- strict thread matches above, loose matches on Subject: below --
2017-04-02 13:33 [RFC PATCH v2 0/4] IIO-based thermal sensor driver for Allwinner H3 SoC Icenowy Zheng
[not found] ` <20170402133304.56824-1-icenowy-h8G6r0blFSE@public.gmane.org>
2017-04-02 13:33 ` [RFC PATCH v2 1/4] dt-bindings: update the Allwinner GPADC device tree binding for H3 Icenowy Zheng
[not found] ` <20170402133304.56824-2-icenowy-h8G6r0blFSE@public.gmane.org>
2017-04-03 9:15 ` Maxime Ripard
2017-04-03 9:31 ` Icenowy Zheng
[not found] ` <e4d50e78-afe7-6107-6d9a-15e4c732d79a-h8G6r0blFSE@public.gmane.org>
2017-04-04 13:20 ` Maxime Ripard
2017-04-04 14:47 ` Rob Herring
2017-04-04 15:02 ` Icenowy Zheng
[not found] ` <bdc43a73-a2d6-01ae-8113-277f7174697c-h8G6r0blFSE@public.gmane.org>
2017-04-05 19:04 ` Rob Herring
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox