xref: /linux/Documentation/devicetree/bindings/thermal/allwinner,sun8i-a83t-ths.yaml (revision 20bf6262d518c5d3bf38c805be1bbda36acb9506)
10b28594dSYangtao Li# SPDX-License-Identifier: GPL-2.0
20b28594dSYangtao Li%YAML 1.2
30b28594dSYangtao Li---
40b28594dSYangtao Li$id: http://devicetree.org/schemas/thermal/allwinner,sun8i-a83t-ths.yaml#
50b28594dSYangtao Li$schema: http://devicetree.org/meta-schemas/core.yaml#
60b28594dSYangtao Li
7dd3cb467SAndrew Lunntitle: Allwinner SUN8I Thermal Controller
80b28594dSYangtao Li
90b28594dSYangtao Limaintainers:
100b28594dSYangtao Li  - Vasily Khoruzhick <anarsoul@gmail.com>
110b28594dSYangtao Li  - Yangtao Li <tiny.windzz@gmail.com>
120b28594dSYangtao Li
130b28594dSYangtao Liproperties:
140b28594dSYangtao Li  compatible:
150b28594dSYangtao Li    enum:
160b28594dSYangtao Li      - allwinner,sun8i-a83t-ths
170b28594dSYangtao Li      - allwinner,sun8i-h3-ths
180b28594dSYangtao Li      - allwinner,sun8i-r40-ths
19*20bf6262SMaxim Kiselev      - allwinner,sun20i-d1-ths
200b28594dSYangtao Li      - allwinner,sun50i-a64-ths
21691f189dSYangtao Li      - allwinner,sun50i-a100-ths
220b28594dSYangtao Li      - allwinner,sun50i-h5-ths
230b28594dSYangtao Li      - allwinner,sun50i-h6-ths
240b28594dSYangtao Li
250b28594dSYangtao Li  clocks:
260b28594dSYangtao Li    minItems: 1
270b28594dSYangtao Li    items:
280b28594dSYangtao Li      - description: Bus Clock
290b28594dSYangtao Li      - description: Module Clock
300b28594dSYangtao Li
310b28594dSYangtao Li  clock-names:
320b28594dSYangtao Li    minItems: 1
330b28594dSYangtao Li    items:
340b28594dSYangtao Li      - const: bus
350b28594dSYangtao Li      - const: mod
360b28594dSYangtao Li
370b28594dSYangtao Li  reg:
380b28594dSYangtao Li    maxItems: 1
390b28594dSYangtao Li
400b28594dSYangtao Li  interrupts:
410b28594dSYangtao Li    maxItems: 1
420b28594dSYangtao Li
430b28594dSYangtao Li  resets:
440b28594dSYangtao Li    maxItems: 1
450b28594dSYangtao Li
460b28594dSYangtao Li  nvmem-cells:
470b28594dSYangtao Li    maxItems: 1
480b28594dSYangtao Li    description: Calibration data for thermal sensors
490b28594dSYangtao Li
500b28594dSYangtao Li  nvmem-cell-names:
510b28594dSYangtao Li    const: calibration
520b28594dSYangtao Li
53cff1d293SAmit Kucheria  # See Documentation/devicetree/bindings/thermal/thermal-sensor.yaml for details
540b28594dSYangtao Li  "#thermal-sensor-cells":
550b28594dSYangtao Li    enum:
560b28594dSYangtao Li      - 0
570b28594dSYangtao Li      - 1
580b28594dSYangtao Li
590b28594dSYangtao LiallOf:
600b28594dSYangtao Li  - if:
610b28594dSYangtao Li      properties:
620b28594dSYangtao Li        compatible:
630b28594dSYangtao Li          contains:
64691f189dSYangtao Li            enum:
65*20bf6262SMaxim Kiselev              - allwinner,sun20i-d1-ths
66691f189dSYangtao Li              - allwinner,sun50i-a100-ths
67691f189dSYangtao Li              - allwinner,sun50i-h6-ths
680b28594dSYangtao Li
690b28594dSYangtao Li    then:
700b28594dSYangtao Li      properties:
710b28594dSYangtao Li        clocks:
720b28594dSYangtao Li          maxItems: 1
730b28594dSYangtao Li
740b28594dSYangtao Li        clock-names:
750b28594dSYangtao Li          maxItems: 1
760b28594dSYangtao Li
770b28594dSYangtao Li    else:
780b28594dSYangtao Li      properties:
790b28594dSYangtao Li        clocks:
800b28594dSYangtao Li          minItems: 2
810b28594dSYangtao Li
820b28594dSYangtao Li        clock-names:
830b28594dSYangtao Li          minItems: 2
840b28594dSYangtao Li
850b28594dSYangtao Li  - if:
860b28594dSYangtao Li      properties:
870b28594dSYangtao Li        compatible:
880b28594dSYangtao Li          contains:
89*20bf6262SMaxim Kiselev            enum:
90*20bf6262SMaxim Kiselev              - allwinner,sun8i-h3-ths
91*20bf6262SMaxim Kiselev              - allwinner,sun20i-d1-ths
920b28594dSYangtao Li
930b28594dSYangtao Li    then:
940b28594dSYangtao Li      properties:
950b28594dSYangtao Li        "#thermal-sensor-cells":
960b28594dSYangtao Li          const: 0
970b28594dSYangtao Li
980b28594dSYangtao Li    else:
990b28594dSYangtao Li      properties:
1000b28594dSYangtao Li        "#thermal-sensor-cells":
1010b28594dSYangtao Li          const: 1
1020b28594dSYangtao Li
1030b28594dSYangtao Li  - if:
1040b28594dSYangtao Li      properties:
1050b28594dSYangtao Li        compatible:
1060b28594dSYangtao Li          contains:
1070b28594dSYangtao Li            enum:
108ce598680SRob Herring              - allwinner,sun8i-h3-ths
109ce598680SRob Herring              - allwinner,sun8i-r40-ths
110*20bf6262SMaxim Kiselev              - allwinner,sun20i-d1-ths
111ce598680SRob Herring              - allwinner,sun50i-a64-ths
112ce598680SRob Herring              - allwinner,sun50i-a100-ths
113ce598680SRob Herring              - allwinner,sun50i-h5-ths
114ce598680SRob Herring              - allwinner,sun50i-h6-ths
1150b28594dSYangtao Li
1160b28594dSYangtao Li    then:
1170b28594dSYangtao Li      required:
1180b28594dSYangtao Li        - clocks
1190b28594dSYangtao Li        - clock-names
1200b28594dSYangtao Li        - resets
1210b28594dSYangtao Li
1220b28594dSYangtao Lirequired:
1230b28594dSYangtao Li  - compatible
1240b28594dSYangtao Li  - reg
1250b28594dSYangtao Li  - interrupts
1260b28594dSYangtao Li  - '#thermal-sensor-cells'
1270b28594dSYangtao Li
1280b28594dSYangtao LiadditionalProperties: false
1290b28594dSYangtao Li
1300b28594dSYangtao Liexamples:
1310b28594dSYangtao Li  - |
1320b28594dSYangtao Li    thermal-sensor@1f04000 {
1330b28594dSYangtao Li         compatible = "allwinner,sun8i-a83t-ths";
1340b28594dSYangtao Li         reg = <0x01f04000 0x100>;
1350b28594dSYangtao Li         interrupts = <0 31 0>;
1360b28594dSYangtao Li         nvmem-cells = <&ths_calibration>;
1370b28594dSYangtao Li         nvmem-cell-names = "calibration";
1380b28594dSYangtao Li         #thermal-sensor-cells = <1>;
1390b28594dSYangtao Li    };
1400b28594dSYangtao Li
1410b28594dSYangtao Li  - |
1420b28594dSYangtao Li    thermal-sensor@1c25000 {
1430b28594dSYangtao Li         compatible = "allwinner,sun8i-h3-ths";
1440b28594dSYangtao Li         reg = <0x01c25000 0x400>;
1450b28594dSYangtao Li         clocks = <&ccu 0>, <&ccu 1>;
1460b28594dSYangtao Li         clock-names = "bus", "mod";
1470b28594dSYangtao Li         resets = <&ccu 2>;
1480b28594dSYangtao Li         interrupts = <0 31 0>;
1490b28594dSYangtao Li         nvmem-cells = <&ths_calibration>;
1500b28594dSYangtao Li         nvmem-cell-names = "calibration";
1510b28594dSYangtao Li         #thermal-sensor-cells = <0>;
1520b28594dSYangtao Li    };
1530b28594dSYangtao Li
1540b28594dSYangtao Li  - |
1550b28594dSYangtao Li    thermal-sensor@5070400 {
1560b28594dSYangtao Li         compatible = "allwinner,sun50i-h6-ths";
1570b28594dSYangtao Li         reg = <0x05070400 0x100>;
1580b28594dSYangtao Li         clocks = <&ccu 0>;
1590b28594dSYangtao Li         clock-names = "bus";
1600b28594dSYangtao Li         resets = <&ccu 2>;
1610b28594dSYangtao Li         interrupts = <0 15 0>;
1620b28594dSYangtao Li         nvmem-cells = <&ths_calibration>;
1630b28594dSYangtao Li         nvmem-cell-names = "calibration";
1640b28594dSYangtao Li         #thermal-sensor-cells = <1>;
1650b28594dSYangtao Li    };
1660b28594dSYangtao Li
1670b28594dSYangtao Li...
168