Skip to contentSkip to conversation

dt-bindings: update the Allwinner GPADC device tree binding for H3

RFC PATCH Icenowy Zheng 2 participants 2 messages Apr 5, 2017 – Apr 6, 2017 IIO

lore
Share & tools
lore
#0 lore raw
Quoted 65 lines · 2017年4月6日 03:04于 Rob Herring <[email protected]>写道:
Quoted 58 lines · Icenowy Zheng
Quoted 48 lines · Rob Herring
Quoted 46 lines · 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.

---
  .../devicetree/bindings/mfd/sun4i-gpadc.txt        | 23
++++++++++++++++++++--

  1 file changed, 21 insertions(+), 2 deletions(-) 
Documentation/devicetree/bindings/mfd/sun4i-gpadc.txt +0 -0
index badff3611a98..7753133ca0ff 100644 
@@ -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,

Documentation/devicetree/bindings/mfd/sun4i-gpadc.txt +7 -1
-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>;

Documentation/devicetree/bindings/mfd/sun4i-gpadc.txt +0 -0
@@ -17,6 +25,17 @@ Example: 
                  #io-channel-cells = <0>; 
          }; 
 
Quoted 5 lines

Documentation/devicetree/bindings/mfd/sun4i-gpadc.txt Example: · line 29

Quoted 2 lines
Documentation/devicetree/bindings/mfd/sun4i-gpadc.txt +2 -0
+Example for H3: 
+       ths: ths@01c25000 { 

adc@...

Quoted 4 lines

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.

Quoted 5 lines

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)

Quoted 2 lines

Rob

#1 lore raw
Quoted 7 lines · Icenowy Zheng

2017?4?6? 03:04? Rob Herring <[email protected]>???

Quoted 3 lines · Icenowy Zheng
Quoted 2 lines

? 2017?04?04? 22:47, Rob Herring ??:

OK. I will make it :
ths: temperature-sensor at 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.

Signature · 4 lines
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org ? Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog