xref: /openbmc/linux/Documentation/devicetree/bindings/thermal/samsung,exynos-thermal.yaml (revision 4f2c0a4acffbec01079c28f839422e64ddeff004)
10fb74d0dSKrzysztof Kozlowski# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
20fb74d0dSKrzysztof Kozlowski%YAML 1.2
30fb74d0dSKrzysztof Kozlowski---
40fb74d0dSKrzysztof Kozlowski$id: http://devicetree.org/schemas/thermal/samsung,exynos-thermal.yaml#
50fb74d0dSKrzysztof Kozlowski$schema: http://devicetree.org/meta-schemas/core.yaml#
60fb74d0dSKrzysztof Kozlowski
70fb74d0dSKrzysztof Kozlowskititle: Samsung Exynos SoC Thermal Management Unit (TMU)
80fb74d0dSKrzysztof Kozlowski
90fb74d0dSKrzysztof Kozlowskimaintainers:
10*8a1e6bb3SKrzysztof Kozlowski  - Krzysztof Kozlowski <krzk@kernel.org>
110fb74d0dSKrzysztof Kozlowski
120fb74d0dSKrzysztof Kozlowskidescription: |
130fb74d0dSKrzysztof Kozlowski  For multi-instance tmu each instance should have an alias correctly numbered
140fb74d0dSKrzysztof Kozlowski  in "aliases" node.
150fb74d0dSKrzysztof Kozlowski
160fb74d0dSKrzysztof Kozlowskiproperties:
170fb74d0dSKrzysztof Kozlowski  compatible:
180fb74d0dSKrzysztof Kozlowski    enum:
190fb74d0dSKrzysztof Kozlowski      - samsung,exynos3250-tmu
200fb74d0dSKrzysztof Kozlowski      - samsung,exynos4412-tmu
210fb74d0dSKrzysztof Kozlowski      - samsung,exynos4210-tmu
220fb74d0dSKrzysztof Kozlowski      - samsung,exynos5250-tmu
230fb74d0dSKrzysztof Kozlowski      - samsung,exynos5260-tmu
240fb74d0dSKrzysztof Kozlowski        # For TMU channel 0, 1 on Exynos5420:
250fb74d0dSKrzysztof Kozlowski      - samsung,exynos5420-tmu
260fb74d0dSKrzysztof Kozlowski        # For TMU channels 2, 3 and 4 of Exynos5420:
270fb74d0dSKrzysztof Kozlowski      - samsung,exynos5420-tmu-ext-triminfo
280fb74d0dSKrzysztof Kozlowski      - samsung,exynos5433-tmu
290fb74d0dSKrzysztof Kozlowski      - samsung,exynos7-tmu
300fb74d0dSKrzysztof Kozlowski
310fb74d0dSKrzysztof Kozlowski  clocks:
320fb74d0dSKrzysztof Kozlowski    minItems: 1
330fb74d0dSKrzysztof Kozlowski    maxItems: 3
340fb74d0dSKrzysztof Kozlowski
350fb74d0dSKrzysztof Kozlowski  clock-names:
360fb74d0dSKrzysztof Kozlowski    minItems: 1
370fb74d0dSKrzysztof Kozlowski    maxItems: 3
380fb74d0dSKrzysztof Kozlowski
390fb74d0dSKrzysztof Kozlowski  interrupts:
400fb74d0dSKrzysztof Kozlowski    description: |
410fb74d0dSKrzysztof Kozlowski      The Exynos TMU supports generating interrupts when reaching given
420fb74d0dSKrzysztof Kozlowski      temperature thresholds. Number of supported thermal trip points depends
430fb74d0dSKrzysztof Kozlowski      on the SoC (only first trip points defined in DT will be configured)::
440fb74d0dSKrzysztof Kozlowski       - most of SoC: 4
450fb74d0dSKrzysztof Kozlowski       - samsung,exynos5433-tmu: 8
460fb74d0dSKrzysztof Kozlowski       - samsung,exynos7-tmu: 8
470fb74d0dSKrzysztof Kozlowski    maxItems: 1
480fb74d0dSKrzysztof Kozlowski
490fb74d0dSKrzysztof Kozlowski  reg:
500fb74d0dSKrzysztof Kozlowski    items:
510fb74d0dSKrzysztof Kozlowski      - description: TMU instance registers.
520fb74d0dSKrzysztof Kozlowski      - description: |
530fb74d0dSKrzysztof Kozlowski          Shared TMU registers.
540fb74d0dSKrzysztof Kozlowski
550fb74d0dSKrzysztof Kozlowski          Note:: On Exynos5420, the TRIMINFO register is misplaced for TMU
560fb74d0dSKrzysztof Kozlowski          channels 2, 3 and 4 Use "samsung,exynos5420-tmu-ext-triminfo" in
570fb74d0dSKrzysztof Kozlowski          cases, there is a misplaced register, also provide clock to access
580fb74d0dSKrzysztof Kozlowski          that base.
590fb74d0dSKrzysztof Kozlowski          TRIMINFO at 0x1006c000 contains data for TMU channel 3
600fb74d0dSKrzysztof Kozlowski          TRIMINFO at 0x100a0000 contains data for TMU channel 4
610fb74d0dSKrzysztof Kozlowski          TRIMINFO at 0x10068000 contains data for TMU channel 2
620fb74d0dSKrzysztof Kozlowski    minItems: 1
630fb74d0dSKrzysztof Kozlowski
640fb74d0dSKrzysztof Kozlowski  '#thermal-sensor-cells': true
650fb74d0dSKrzysztof Kozlowski
660fb74d0dSKrzysztof Kozlowski  vtmu-supply:
670fb74d0dSKrzysztof Kozlowski    description: The regulator node supplying voltage to TMU.
680fb74d0dSKrzysztof Kozlowski
690fb74d0dSKrzysztof Kozlowskirequired:
700fb74d0dSKrzysztof Kozlowski  - compatible
710fb74d0dSKrzysztof Kozlowski  - clocks
720fb74d0dSKrzysztof Kozlowski  - clock-names
730fb74d0dSKrzysztof Kozlowski  - interrupts
740fb74d0dSKrzysztof Kozlowski  - reg
750fb74d0dSKrzysztof Kozlowski
760fb74d0dSKrzysztof KozlowskiallOf:
770fb74d0dSKrzysztof Kozlowski  - $ref: /schemas/thermal/thermal-sensor.yaml
780fb74d0dSKrzysztof Kozlowski  - if:
790fb74d0dSKrzysztof Kozlowski      properties:
800fb74d0dSKrzysztof Kozlowski        compatible:
810fb74d0dSKrzysztof Kozlowski          contains:
820fb74d0dSKrzysztof Kozlowski            const: samsung,exynos5420-tmu-ext-triminfo
830fb74d0dSKrzysztof Kozlowski    then:
840fb74d0dSKrzysztof Kozlowski      properties:
850fb74d0dSKrzysztof Kozlowski        clocks:
860fb74d0dSKrzysztof Kozlowski          items:
870fb74d0dSKrzysztof Kozlowski            - description:
880fb74d0dSKrzysztof Kozlowski                Operational clock for TMU channel.
890fb74d0dSKrzysztof Kozlowski            - description:
900fb74d0dSKrzysztof Kozlowski                Optional clock to access the shared registers (e.g. TRIMINFO) of TMU
910fb74d0dSKrzysztof Kozlowski                channel.
920fb74d0dSKrzysztof Kozlowski        clock-names:
930fb74d0dSKrzysztof Kozlowski          items:
940fb74d0dSKrzysztof Kozlowski            - const: tmu_apbif
950fb74d0dSKrzysztof Kozlowski            - const: tmu_triminfo_apbif
960fb74d0dSKrzysztof Kozlowski        reg:
970fb74d0dSKrzysztof Kozlowski          minItems: 2
980fb74d0dSKrzysztof Kozlowski          maxItems: 2
990fb74d0dSKrzysztof Kozlowski  - if:
1000fb74d0dSKrzysztof Kozlowski      properties:
1010fb74d0dSKrzysztof Kozlowski        compatible:
1020fb74d0dSKrzysztof Kozlowski          contains:
1030fb74d0dSKrzysztof Kozlowski            enum:
1040fb74d0dSKrzysztof Kozlowski              - samsung,exynos5433-tmu
1050fb74d0dSKrzysztof Kozlowski              - samsung,exynos7-tmu
1060fb74d0dSKrzysztof Kozlowski    then:
1070fb74d0dSKrzysztof Kozlowski      properties:
1080fb74d0dSKrzysztof Kozlowski        clocks:
1090fb74d0dSKrzysztof Kozlowski          items:
1100fb74d0dSKrzysztof Kozlowski            - description:
1110fb74d0dSKrzysztof Kozlowski                Operational clock for TMU channel.
1120fb74d0dSKrzysztof Kozlowski            - description:
1130fb74d0dSKrzysztof Kozlowski                Optional special clock for functional operation of TMU channel.
1140fb74d0dSKrzysztof Kozlowski        clock-names:
1150fb74d0dSKrzysztof Kozlowski          items:
1160fb74d0dSKrzysztof Kozlowski            - const: tmu_apbif
1170fb74d0dSKrzysztof Kozlowski            - const: tmu_sclk
1180fb74d0dSKrzysztof Kozlowski        reg:
1190fb74d0dSKrzysztof Kozlowski          minItems: 1
1200fb74d0dSKrzysztof Kozlowski          maxItems: 1
1210fb74d0dSKrzysztof Kozlowski
1220fb74d0dSKrzysztof Kozlowski  - if:
1230fb74d0dSKrzysztof Kozlowski      properties:
1240fb74d0dSKrzysztof Kozlowski        compatible:
1250fb74d0dSKrzysztof Kozlowski          contains:
1260fb74d0dSKrzysztof Kozlowski            enum:
1270fb74d0dSKrzysztof Kozlowski              - samsung,exynos3250-tmu
1280fb74d0dSKrzysztof Kozlowski              - samsung,exynos4412-tmu
1290fb74d0dSKrzysztof Kozlowski              - samsung,exynos4210-tmu
1300fb74d0dSKrzysztof Kozlowski              - samsung,exynos5250-tmu
1310fb74d0dSKrzysztof Kozlowski              - samsung,exynos5260-tmu
1320fb74d0dSKrzysztof Kozlowski              - samsung,exynos5420-tmu
1330fb74d0dSKrzysztof Kozlowski    then:
1340fb74d0dSKrzysztof Kozlowski      properties:
1350fb74d0dSKrzysztof Kozlowski        clocks:
1360fb74d0dSKrzysztof Kozlowski          minItems: 1
1370fb74d0dSKrzysztof Kozlowski          maxItems: 1
1380fb74d0dSKrzysztof Kozlowski        reg:
1390fb74d0dSKrzysztof Kozlowski          minItems: 1
1400fb74d0dSKrzysztof Kozlowski          maxItems: 1
1410fb74d0dSKrzysztof Kozlowski
1420fb74d0dSKrzysztof KozlowskiadditionalProperties: false
1430fb74d0dSKrzysztof Kozlowski
1440fb74d0dSKrzysztof Kozlowskiexamples:
1450fb74d0dSKrzysztof Kozlowski  - |
1460fb74d0dSKrzysztof Kozlowski    #include <dt-bindings/clock/exynos4.h>
1470fb74d0dSKrzysztof Kozlowski
1480fb74d0dSKrzysztof Kozlowski    tmu@100c0000 {
1490fb74d0dSKrzysztof Kozlowski        compatible = "samsung,exynos4412-tmu";
1500fb74d0dSKrzysztof Kozlowski        reg = <0x100C0000 0x100>;
1510fb74d0dSKrzysztof Kozlowski        interrupt-parent = <&combiner>;
1520fb74d0dSKrzysztof Kozlowski        interrupts = <2 4>;
1530fb74d0dSKrzysztof Kozlowski        #thermal-sensor-cells = <0>;
1540fb74d0dSKrzysztof Kozlowski        clocks = <&clock CLK_TMU_APBIF>;
1550fb74d0dSKrzysztof Kozlowski        clock-names = "tmu_apbif";
1560fb74d0dSKrzysztof Kozlowski        vtmu-supply = <&ldo10_reg>;
1570fb74d0dSKrzysztof Kozlowski    };
1580fb74d0dSKrzysztof Kozlowski
1590fb74d0dSKrzysztof Kozlowski  - |
1600fb74d0dSKrzysztof Kozlowski    #include <dt-bindings/interrupt-controller/arm-gic.h>
1610fb74d0dSKrzysztof Kozlowski
1620fb74d0dSKrzysztof Kozlowski    tmu@10068000 {
1630fb74d0dSKrzysztof Kozlowski        compatible = "samsung,exynos5420-tmu-ext-triminfo";
1640fb74d0dSKrzysztof Kozlowski        reg = <0x10068000 0x100>, <0x1006c000 0x4>;
1650fb74d0dSKrzysztof Kozlowski        interrupts = <GIC_SPI 184 IRQ_TYPE_LEVEL_HIGH>;
1660fb74d0dSKrzysztof Kozlowski        #thermal-sensor-cells = <0>;
1670fb74d0dSKrzysztof Kozlowski        clocks = <&clock 318>, <&clock 318>; /* CLK_TMU */
1680fb74d0dSKrzysztof Kozlowski        clock-names = "tmu_apbif", "tmu_triminfo_apbif";
1690fb74d0dSKrzysztof Kozlowski        vtmu-supply = <&ldo7_reg>;
1700fb74d0dSKrzysztof Kozlowski    };
1710fb74d0dSKrzysztof Kozlowski
1720fb74d0dSKrzysztof Kozlowski  - |
1730fb74d0dSKrzysztof Kozlowski    #include <dt-bindings/interrupt-controller/arm-gic.h>
1740fb74d0dSKrzysztof Kozlowski
1750fb74d0dSKrzysztof Kozlowski    tmu@10060000 {
1760fb74d0dSKrzysztof Kozlowski        compatible = "samsung,exynos5433-tmu";
1770fb74d0dSKrzysztof Kozlowski        reg = <0x10060000 0x200>;
1780fb74d0dSKrzysztof Kozlowski        interrupts = <GIC_SPI 95 IRQ_TYPE_LEVEL_HIGH>;
1790fb74d0dSKrzysztof Kozlowski        #thermal-sensor-cells = <0>;
1800fb74d0dSKrzysztof Kozlowski        clocks = <&cmu_peris 3>, /* CLK_PCLK_TMU0_APBIF */
1810fb74d0dSKrzysztof Kozlowski                 <&cmu_peris 35>; /* CLK_SCLK_TMU0 */
1820fb74d0dSKrzysztof Kozlowski        clock-names = "tmu_apbif", "tmu_sclk";
1830fb74d0dSKrzysztof Kozlowski        vtmu-supply = <&ldo3_reg>;
1840fb74d0dSKrzysztof Kozlowski    };
185