xref: /freebsd/sys/contrib/device-tree/Bindings/thermal/samsung,exynos-thermal.yaml (revision c9ccf3a32da427475985b85d7df023ccfb138c27)
1*c9ccf3a3SEmmanuel Vadot# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2*c9ccf3a3SEmmanuel Vadot%YAML 1.2
3*c9ccf3a3SEmmanuel Vadot---
4*c9ccf3a3SEmmanuel Vadot$id: http://devicetree.org/schemas/thermal/samsung,exynos-thermal.yaml#
5*c9ccf3a3SEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml#
6*c9ccf3a3SEmmanuel Vadot
7*c9ccf3a3SEmmanuel Vadottitle: Samsung Exynos SoC Thermal Management Unit (TMU)
8*c9ccf3a3SEmmanuel Vadot
9*c9ccf3a3SEmmanuel Vadotmaintainers:
10*c9ccf3a3SEmmanuel Vadot  - Krzysztof Kozlowski <krzk@kernel.org>
11*c9ccf3a3SEmmanuel Vadot
12*c9ccf3a3SEmmanuel Vadotdescription: |
13*c9ccf3a3SEmmanuel Vadot  For multi-instance tmu each instance should have an alias correctly numbered
14*c9ccf3a3SEmmanuel Vadot  in "aliases" node.
15*c9ccf3a3SEmmanuel Vadot
16*c9ccf3a3SEmmanuel Vadotproperties:
17*c9ccf3a3SEmmanuel Vadot  compatible:
18*c9ccf3a3SEmmanuel Vadot    enum:
19*c9ccf3a3SEmmanuel Vadot      - samsung,exynos3250-tmu
20*c9ccf3a3SEmmanuel Vadot      - samsung,exynos4412-tmu
21*c9ccf3a3SEmmanuel Vadot      - samsung,exynos4210-tmu
22*c9ccf3a3SEmmanuel Vadot      - samsung,exynos5250-tmu
23*c9ccf3a3SEmmanuel Vadot      - samsung,exynos5260-tmu
24*c9ccf3a3SEmmanuel Vadot        # For TMU channel 0, 1 on Exynos5420:
25*c9ccf3a3SEmmanuel Vadot      - samsung,exynos5420-tmu
26*c9ccf3a3SEmmanuel Vadot        # For TMU channels 2, 3 and 4 of Exynos5420:
27*c9ccf3a3SEmmanuel Vadot      - samsung,exynos5420-tmu-ext-triminfo
28*c9ccf3a3SEmmanuel Vadot      - samsung,exynos5433-tmu
29*c9ccf3a3SEmmanuel Vadot      - samsung,exynos7-tmu
30*c9ccf3a3SEmmanuel Vadot
31*c9ccf3a3SEmmanuel Vadot  clocks:
32*c9ccf3a3SEmmanuel Vadot    minItems: 1
33*c9ccf3a3SEmmanuel Vadot    maxItems: 3
34*c9ccf3a3SEmmanuel Vadot
35*c9ccf3a3SEmmanuel Vadot  clock-names:
36*c9ccf3a3SEmmanuel Vadot    minItems: 1
37*c9ccf3a3SEmmanuel Vadot    maxItems: 3
38*c9ccf3a3SEmmanuel Vadot
39*c9ccf3a3SEmmanuel Vadot  interrupts:
40*c9ccf3a3SEmmanuel Vadot    description: |
41*c9ccf3a3SEmmanuel Vadot      The Exynos TMU supports generating interrupts when reaching given
42*c9ccf3a3SEmmanuel Vadot      temperature thresholds. Number of supported thermal trip points depends
43*c9ccf3a3SEmmanuel Vadot      on the SoC (only first trip points defined in DT will be configured)::
44*c9ccf3a3SEmmanuel Vadot       - most of SoC: 4
45*c9ccf3a3SEmmanuel Vadot       - samsung,exynos5433-tmu: 8
46*c9ccf3a3SEmmanuel Vadot       - samsung,exynos7-tmu: 8
47*c9ccf3a3SEmmanuel Vadot    maxItems: 1
48*c9ccf3a3SEmmanuel Vadot
49*c9ccf3a3SEmmanuel Vadot  reg:
50*c9ccf3a3SEmmanuel Vadot    items:
51*c9ccf3a3SEmmanuel Vadot      - description: TMU instance registers.
52*c9ccf3a3SEmmanuel Vadot      - description: |
53*c9ccf3a3SEmmanuel Vadot          Shared TMU registers.
54*c9ccf3a3SEmmanuel Vadot
55*c9ccf3a3SEmmanuel Vadot          Note:: On Exynos5420, the TRIMINFO register is misplaced for TMU
56*c9ccf3a3SEmmanuel Vadot          channels 2, 3 and 4 Use "samsung,exynos5420-tmu-ext-triminfo" in
57*c9ccf3a3SEmmanuel Vadot          cases, there is a misplaced register, also provide clock to access
58*c9ccf3a3SEmmanuel Vadot          that base.
59*c9ccf3a3SEmmanuel Vadot          TRIMINFO at 0x1006c000 contains data for TMU channel 3
60*c9ccf3a3SEmmanuel Vadot          TRIMINFO at 0x100a0000 contains data for TMU channel 4
61*c9ccf3a3SEmmanuel Vadot          TRIMINFO at 0x10068000 contains data for TMU channel 2
62*c9ccf3a3SEmmanuel Vadot    minItems: 1
63*c9ccf3a3SEmmanuel Vadot
64*c9ccf3a3SEmmanuel Vadot  '#thermal-sensor-cells': true
65*c9ccf3a3SEmmanuel Vadot
66*c9ccf3a3SEmmanuel Vadot  vtmu-supply:
67*c9ccf3a3SEmmanuel Vadot    description: The regulator node supplying voltage to TMU.
68*c9ccf3a3SEmmanuel Vadot
69*c9ccf3a3SEmmanuel Vadotrequired:
70*c9ccf3a3SEmmanuel Vadot  - compatible
71*c9ccf3a3SEmmanuel Vadot  - clocks
72*c9ccf3a3SEmmanuel Vadot  - clock-names
73*c9ccf3a3SEmmanuel Vadot  - interrupts
74*c9ccf3a3SEmmanuel Vadot  - reg
75*c9ccf3a3SEmmanuel Vadot
76*c9ccf3a3SEmmanuel VadotallOf:
77*c9ccf3a3SEmmanuel Vadot  - $ref: /schemas/thermal/thermal-sensor.yaml
78*c9ccf3a3SEmmanuel Vadot  - if:
79*c9ccf3a3SEmmanuel Vadot      properties:
80*c9ccf3a3SEmmanuel Vadot        compatible:
81*c9ccf3a3SEmmanuel Vadot          contains:
82*c9ccf3a3SEmmanuel Vadot            const: samsung,exynos5420-tmu-ext-triminfo
83*c9ccf3a3SEmmanuel Vadot    then:
84*c9ccf3a3SEmmanuel Vadot      properties:
85*c9ccf3a3SEmmanuel Vadot        clocks:
86*c9ccf3a3SEmmanuel Vadot          items:
87*c9ccf3a3SEmmanuel Vadot            - description:
88*c9ccf3a3SEmmanuel Vadot                Operational clock for TMU channel.
89*c9ccf3a3SEmmanuel Vadot            - description:
90*c9ccf3a3SEmmanuel Vadot                Optional clock to access the shared registers (e.g. TRIMINFO) of TMU
91*c9ccf3a3SEmmanuel Vadot                channel.
92*c9ccf3a3SEmmanuel Vadot        clock-names:
93*c9ccf3a3SEmmanuel Vadot          items:
94*c9ccf3a3SEmmanuel Vadot            - const: tmu_apbif
95*c9ccf3a3SEmmanuel Vadot            - const: tmu_triminfo_apbif
96*c9ccf3a3SEmmanuel Vadot        reg:
97*c9ccf3a3SEmmanuel Vadot          minItems: 2
98*c9ccf3a3SEmmanuel Vadot          maxItems: 2
99*c9ccf3a3SEmmanuel Vadot  - if:
100*c9ccf3a3SEmmanuel Vadot      properties:
101*c9ccf3a3SEmmanuel Vadot        compatible:
102*c9ccf3a3SEmmanuel Vadot          contains:
103*c9ccf3a3SEmmanuel Vadot            enum:
104*c9ccf3a3SEmmanuel Vadot              - samsung,exynos5433-tmu
105*c9ccf3a3SEmmanuel Vadot              - samsung,exynos7-tmu
106*c9ccf3a3SEmmanuel Vadot    then:
107*c9ccf3a3SEmmanuel Vadot      properties:
108*c9ccf3a3SEmmanuel Vadot        clocks:
109*c9ccf3a3SEmmanuel Vadot          items:
110*c9ccf3a3SEmmanuel Vadot            - description:
111*c9ccf3a3SEmmanuel Vadot                Operational clock for TMU channel.
112*c9ccf3a3SEmmanuel Vadot            - description:
113*c9ccf3a3SEmmanuel Vadot                Optional special clock for functional operation of TMU channel.
114*c9ccf3a3SEmmanuel Vadot        clock-names:
115*c9ccf3a3SEmmanuel Vadot          items:
116*c9ccf3a3SEmmanuel Vadot            - const: tmu_apbif
117*c9ccf3a3SEmmanuel Vadot            - const: tmu_sclk
118*c9ccf3a3SEmmanuel Vadot        reg:
119*c9ccf3a3SEmmanuel Vadot          minItems: 1
120*c9ccf3a3SEmmanuel Vadot          maxItems: 1
121*c9ccf3a3SEmmanuel Vadot
122*c9ccf3a3SEmmanuel Vadot  - if:
123*c9ccf3a3SEmmanuel Vadot      properties:
124*c9ccf3a3SEmmanuel Vadot        compatible:
125*c9ccf3a3SEmmanuel Vadot          contains:
126*c9ccf3a3SEmmanuel Vadot            enum:
127*c9ccf3a3SEmmanuel Vadot              - samsung,exynos3250-tmu
128*c9ccf3a3SEmmanuel Vadot              - samsung,exynos4412-tmu
129*c9ccf3a3SEmmanuel Vadot              - samsung,exynos4210-tmu
130*c9ccf3a3SEmmanuel Vadot              - samsung,exynos5250-tmu
131*c9ccf3a3SEmmanuel Vadot              - samsung,exynos5260-tmu
132*c9ccf3a3SEmmanuel Vadot              - samsung,exynos5420-tmu
133*c9ccf3a3SEmmanuel Vadot    then:
134*c9ccf3a3SEmmanuel Vadot      properties:
135*c9ccf3a3SEmmanuel Vadot        clocks:
136*c9ccf3a3SEmmanuel Vadot          minItems: 1
137*c9ccf3a3SEmmanuel Vadot          maxItems: 1
138*c9ccf3a3SEmmanuel Vadot        reg:
139*c9ccf3a3SEmmanuel Vadot          minItems: 1
140*c9ccf3a3SEmmanuel Vadot          maxItems: 1
141*c9ccf3a3SEmmanuel Vadot
142*c9ccf3a3SEmmanuel VadotadditionalProperties: false
143*c9ccf3a3SEmmanuel Vadot
144*c9ccf3a3SEmmanuel Vadotexamples:
145*c9ccf3a3SEmmanuel Vadot  - |
146*c9ccf3a3SEmmanuel Vadot    #include <dt-bindings/clock/exynos4.h>
147*c9ccf3a3SEmmanuel Vadot
148*c9ccf3a3SEmmanuel Vadot    tmu@100c0000 {
149*c9ccf3a3SEmmanuel Vadot        compatible = "samsung,exynos4412-tmu";
150*c9ccf3a3SEmmanuel Vadot        reg = <0x100C0000 0x100>;
151*c9ccf3a3SEmmanuel Vadot        interrupt-parent = <&combiner>;
152*c9ccf3a3SEmmanuel Vadot        interrupts = <2 4>;
153*c9ccf3a3SEmmanuel Vadot        #thermal-sensor-cells = <0>;
154*c9ccf3a3SEmmanuel Vadot        clocks = <&clock CLK_TMU_APBIF>;
155*c9ccf3a3SEmmanuel Vadot        clock-names = "tmu_apbif";
156*c9ccf3a3SEmmanuel Vadot        vtmu-supply = <&ldo10_reg>;
157*c9ccf3a3SEmmanuel Vadot    };
158*c9ccf3a3SEmmanuel Vadot
159*c9ccf3a3SEmmanuel Vadot  - |
160*c9ccf3a3SEmmanuel Vadot    #include <dt-bindings/interrupt-controller/arm-gic.h>
161*c9ccf3a3SEmmanuel Vadot
162*c9ccf3a3SEmmanuel Vadot    tmu@10068000 {
163*c9ccf3a3SEmmanuel Vadot        compatible = "samsung,exynos5420-tmu-ext-triminfo";
164*c9ccf3a3SEmmanuel Vadot        reg = <0x10068000 0x100>, <0x1006c000 0x4>;
165*c9ccf3a3SEmmanuel Vadot        interrupts = <GIC_SPI 184 IRQ_TYPE_LEVEL_HIGH>;
166*c9ccf3a3SEmmanuel Vadot        #thermal-sensor-cells = <0>;
167*c9ccf3a3SEmmanuel Vadot        clocks = <&clock 318>, <&clock 318>; /* CLK_TMU */
168*c9ccf3a3SEmmanuel Vadot        clock-names = "tmu_apbif", "tmu_triminfo_apbif";
169*c9ccf3a3SEmmanuel Vadot        vtmu-supply = <&ldo7_reg>;
170*c9ccf3a3SEmmanuel Vadot    };
171*c9ccf3a3SEmmanuel Vadot
172*c9ccf3a3SEmmanuel Vadot  - |
173*c9ccf3a3SEmmanuel Vadot    #include <dt-bindings/interrupt-controller/arm-gic.h>
174*c9ccf3a3SEmmanuel Vadot
175*c9ccf3a3SEmmanuel Vadot    tmu@10060000 {
176*c9ccf3a3SEmmanuel Vadot        compatible = "samsung,exynos5433-tmu";
177*c9ccf3a3SEmmanuel Vadot        reg = <0x10060000 0x200>;
178*c9ccf3a3SEmmanuel Vadot        interrupts = <GIC_SPI 95 IRQ_TYPE_LEVEL_HIGH>;
179*c9ccf3a3SEmmanuel Vadot        #thermal-sensor-cells = <0>;
180*c9ccf3a3SEmmanuel Vadot        clocks = <&cmu_peris 3>, /* CLK_PCLK_TMU0_APBIF */
181*c9ccf3a3SEmmanuel Vadot                 <&cmu_peris 35>; /* CLK_SCLK_TMU0 */
182*c9ccf3a3SEmmanuel Vadot        clock-names = "tmu_apbif", "tmu_sclk";
183*c9ccf3a3SEmmanuel Vadot        vtmu-supply = <&ldo3_reg>;
184*c9ccf3a3SEmmanuel Vadot    };
185