xref: /freebsd-src/sys/contrib/device-tree/Bindings/thermal/qcom-lmh.yaml (revision 7d0873ebb83b19ba1e8a89e679470d885efe12e3)
1354d7675SEmmanuel Vadot# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2354d7675SEmmanuel Vadot# Copyright 2021 Linaro Ltd.
3354d7675SEmmanuel Vadot%YAML 1.2
4354d7675SEmmanuel Vadot---
5354d7675SEmmanuel Vadot$id: http://devicetree.org/schemas/thermal/qcom-lmh.yaml#
6354d7675SEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml#
7354d7675SEmmanuel Vadot
8354d7675SEmmanuel Vadottitle: Qualcomm Limits Management Hardware(LMh)
9354d7675SEmmanuel Vadot
10354d7675SEmmanuel Vadotmaintainers:
11aa1a8ff2SEmmanuel Vadot  - Thara Gopinath <thara.gopinath@gmail.com>
12354d7675SEmmanuel Vadot
13354d7675SEmmanuel Vadotdescription:
14354d7675SEmmanuel Vadot  Limits Management Hardware(LMh) is a hardware infrastructure on some
15354d7675SEmmanuel Vadot  Qualcomm SoCs that can enforce temperature and current limits as
16354d7675SEmmanuel Vadot  programmed by software for certain IPs like CPU.
17354d7675SEmmanuel Vadot
18354d7675SEmmanuel Vadotproperties:
19354d7675SEmmanuel Vadot  compatible:
20*7d0873ebSEmmanuel Vadot    oneOf:
21*7d0873ebSEmmanuel Vadot      - enum:
22d5b0e70fSEmmanuel Vadot          - qcom,sc8180x-lmh
23354d7675SEmmanuel Vadot          - qcom,sdm845-lmh
24c9ccf3a3SEmmanuel Vadot          - qcom,sm8150-lmh
25*7d0873ebSEmmanuel Vadot      - items:
26*7d0873ebSEmmanuel Vadot          - const: qcom,qcm2290-lmh
27*7d0873ebSEmmanuel Vadot          - const: qcom,sm8150-lmh
28354d7675SEmmanuel Vadot
29354d7675SEmmanuel Vadot  reg:
30354d7675SEmmanuel Vadot    items:
31354d7675SEmmanuel Vadot      - description: core registers
32354d7675SEmmanuel Vadot
33354d7675SEmmanuel Vadot  interrupts:
34354d7675SEmmanuel Vadot    maxItems: 1
35354d7675SEmmanuel Vadot
36354d7675SEmmanuel Vadot  '#interrupt-cells':
37354d7675SEmmanuel Vadot    const: 1
38354d7675SEmmanuel Vadot
39354d7675SEmmanuel Vadot  interrupt-controller: true
40354d7675SEmmanuel Vadot
41354d7675SEmmanuel Vadot  cpus:
42354d7675SEmmanuel Vadot    description:
43354d7675SEmmanuel Vadot      phandle of the first cpu in the LMh cluster
448bab661aSEmmanuel Vadot    maxItems: 1
45354d7675SEmmanuel Vadot
46354d7675SEmmanuel Vadot  qcom,lmh-temp-arm-millicelsius:
47354d7675SEmmanuel Vadot    description:
48354d7675SEmmanuel Vadot      An integer expressing temperature threshold at which the LMh thermal
49354d7675SEmmanuel Vadot      FSM is engaged.
50354d7675SEmmanuel Vadot
51354d7675SEmmanuel Vadot  qcom,lmh-temp-low-millicelsius:
52354d7675SEmmanuel Vadot    description:
53354d7675SEmmanuel Vadot      An integer expressing temperature threshold at which the state machine
54354d7675SEmmanuel Vadot      will attempt to remove frequency throttling.
55354d7675SEmmanuel Vadot
56354d7675SEmmanuel Vadot  qcom,lmh-temp-high-millicelsius:
57354d7675SEmmanuel Vadot    description:
58354d7675SEmmanuel Vadot      An integer expressing temperature threshold at which the state machine
59354d7675SEmmanuel Vadot      will attempt to throttle the frequency.
60354d7675SEmmanuel Vadot
61354d7675SEmmanuel Vadotrequired:
62354d7675SEmmanuel Vadot  - compatible
63354d7675SEmmanuel Vadot  - reg
64354d7675SEmmanuel Vadot  - interrupts
65354d7675SEmmanuel Vadot  - '#interrupt-cells'
66354d7675SEmmanuel Vadot  - interrupt-controller
67354d7675SEmmanuel Vadot  - cpus
68354d7675SEmmanuel Vadot  - qcom,lmh-temp-arm-millicelsius
69354d7675SEmmanuel Vadot  - qcom,lmh-temp-low-millicelsius
70354d7675SEmmanuel Vadot  - qcom,lmh-temp-high-millicelsius
71354d7675SEmmanuel Vadot
72354d7675SEmmanuel VadotadditionalProperties: false
73354d7675SEmmanuel Vadot
74354d7675SEmmanuel Vadotexamples:
75354d7675SEmmanuel Vadot  - |
76354d7675SEmmanuel Vadot    #include <dt-bindings/interrupt-controller/arm-gic.h>
77354d7675SEmmanuel Vadot
78354d7675SEmmanuel Vadot    lmh@17d70800 {
79354d7675SEmmanuel Vadot      compatible = "qcom,sdm845-lmh";
80354d7675SEmmanuel Vadot      reg = <0x17d70800 0x400>;
81354d7675SEmmanuel Vadot      interrupts = <GIC_SPI 33 IRQ_TYPE_LEVEL_HIGH>;
82354d7675SEmmanuel Vadot      cpus = <&CPU4>;
83354d7675SEmmanuel Vadot      qcom,lmh-temp-arm-millicelsius = <65000>;
84354d7675SEmmanuel Vadot      qcom,lmh-temp-low-millicelsius = <94500>;
85354d7675SEmmanuel Vadot      qcom,lmh-temp-high-millicelsius = <95000>;
86354d7675SEmmanuel Vadot      interrupt-controller;
87354d7675SEmmanuel Vadot      #interrupt-cells = <1>;
88354d7675SEmmanuel Vadot    };
89