Merge branch 'for-5.13' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie...
[linux-2.6-microblaze.git] / arch / arm64 / boot / dts / qcom / pm8150.dtsi
1 // SPDX-License-Identifier: BSD-3-Clause
2 /*
3  * Copyright (c) 2017-2019, The Linux Foundation. All rights reserved.
4  * Copyright (c) 2019, Linaro Limited
5  */
6
7 #include <dt-bindings/input/input.h>
8 #include <dt-bindings/interrupt-controller/irq.h>
9 #include <dt-bindings/spmi/spmi.h>
10 #include <dt-bindings/iio/qcom,spmi-vadc.h>
11
12 / {
13         thermal-zones {
14                 pm8150-thermal {
15                         polling-delay-passive = <100>;
16                         polling-delay = <0>;
17
18                         thermal-sensors = <&pm8150_temp>;
19
20                         trips {
21                                 trip0 {
22                                         temperature = <95000>;
23                                         hysteresis = <0>;
24                                         type = "passive";
25                                 };
26
27                                 trip1 {
28                                         temperature = <115000>;
29                                         hysteresis = <0>;
30                                         type = "hot";
31                                 };
32
33                                 trip2 {
34                                         temperature = <145000>;
35                                         hysteresis = <0>;
36                                         type = "critical";
37                                 };
38                         };
39                 };
40         };
41 };
42
43 &spmi_bus {
44         pm8150_0: pmic@0 {
45                 compatible = "qcom,pm8150", "qcom,spmi-pmic";
46                 reg = <0x0 SPMI_USID>;
47                 #address-cells = <1>;
48                 #size-cells = <0>;
49
50                 pon: power-on@800 {
51                         compatible = "qcom,pm8916-pon";
52                         reg = <0x0800>;
53                         pwrkey {
54                                 compatible = "qcom,pm8941-pwrkey";
55                                 interrupts = <0x0 0x8 0x0 IRQ_TYPE_EDGE_BOTH>;
56                                 debounce = <15625>;
57                                 bias-pull-up;
58                                 linux,code = <KEY_POWER>;
59
60                                 status = "disabled";
61                         };
62                 };
63
64                 pm8150_temp: temp-alarm@2400 {
65                         compatible = "qcom,spmi-temp-alarm";
66                         reg = <0x2400>;
67                         interrupts = <0x0 0x24 0x0 IRQ_TYPE_EDGE_BOTH>;
68                         io-channels = <&pm8150_adc ADC5_DIE_TEMP>;
69                         io-channel-names = "thermal";
70                         #thermal-sensor-cells = <0>;
71                 };
72
73                 pm8150_adc: adc@3100 {
74                         compatible = "qcom,spmi-adc5";
75                         reg = <0x3100>;
76                         #address-cells = <1>;
77                         #size-cells = <0>;
78                         #io-channel-cells = <1>;
79                         interrupts = <0x0 0x31 0x0 IRQ_TYPE_EDGE_RISING>;
80
81                         ref-gnd@0 {
82                                 reg = <ADC5_REF_GND>;
83                                 qcom,pre-scaling = <1 1>;
84                                 label = "ref_gnd";
85                         };
86
87                         vref-1p25@1 {
88                                 reg = <ADC5_1P25VREF>;
89                                 qcom,pre-scaling = <1 1>;
90                                 label = "vref_1p25";
91                         };
92
93                         die-temp@6 {
94                                 reg = <ADC5_DIE_TEMP>;
95                                 qcom,pre-scaling = <1 1>;
96                                 label = "die_temp";
97                         };
98                 };
99
100                 pm8150_adc_tm: adc-tm@3500 {
101                         compatible = "qcom,spmi-adc-tm5";
102                         reg = <0x3500>;
103                         interrupts = <0x0 0x35 0x0 IRQ_TYPE_EDGE_RISING>;
104                         #thermal-sensor-cells = <1>;
105                         #address-cells = <1>;
106                         #size-cells = <0>;
107                         status = "disabled";
108                 };
109
110                 rtc@6000 {
111                         compatible = "qcom,pm8941-rtc";
112                         reg = <0x6000>;
113                         reg-names = "rtc", "alarm";
114                         interrupts = <0x0 0x61 0x1 IRQ_TYPE_NONE>;
115                 };
116
117                 pm8150_gpios: gpio@c000 {
118                         compatible = "qcom,pm8150-gpio";
119                         reg = <0xc000>;
120                         gpio-controller;
121                         #gpio-cells = <2>;
122                         interrupt-controller;
123                         #interrupt-cells = <2>;
124                 };
125         };
126
127         pmic@1 {
128                 compatible = "qcom,pm8150", "qcom,spmi-pmic";
129                 reg = <0x1 SPMI_USID>;
130                 #address-cells = <1>;
131                 #size-cells = <0>;
132         };
133 };