summaryrefslogtreecommitdiff
path: root/qcom/pm8150.dtsi
blob: 9ce9c1db1b703ba4cc80a56a13f2f44cc22b8cba (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
#include <dt-bindings/input/input.h>
#include <dt-bindings/clock/qcom,rpmh.h>
#include <dt-bindings/iio/qcom,spmi-vadc.h>
#include <dt-bindings/input/qcom,qpnp-power-on.h>
#include <dt-bindings/interrupt-controller/irq.h>
#include <dt-bindings/spmi/spmi.h>
#include <dt-bindings/input/linux-event-codes.h>

&spmi_bus {
	status = "ok";
	#address-cells = <2>;
	#size-cells = <0>;
	interrupt-controller;
	#interrupt-cells = <4>;

	pm8150_0: qcom,pm8150@0 {
		status = "okay";
		compatible = "qcom,spmi-pmic";
		reg = <0 SPMI_USID>;
		#address-cells = <1>;
		#size-cells = <0>;

		pm8150_tz: qcom,temp-alarm@2400 {
			compatible = "qcom,spmi-temp-alarm";
			reg = <0x2400>;
			interrupts = <0x0 0x24 0x0 IRQ_TYPE_EDGE_BOTH>;
			io-channels = <&pm8150_vadc ADC5_DIE_TEMP>;
			io-channel-names = "thermal";
			#thermal-sensor-cells = <0>;
		};

		qcom,power-on@800 {
			compatible = "qcom,pm8998-pon";
			reg = <0x0800>;
			mode-bootloader = <0x2>;
			mode-recovery = <0x1>;
			mode-rtc = <0x3>;
			mode-dm-verity-device-corrupted = <0x4>;
			mode-dm-verity-enforcing = <0x5>;
			mode-keys-clear = <0x6>;
			mode-silent = <0xa>;
			mode-nonsilent = <0xb>;
			mode-forcedsilent = <0xc>;
			mode-forcednonsilent = <0xd>;

			pon_pwrkey: pwrkey {
				compatible = "qcom,pm8941-pwrkey";
				interrupts = <0x0 0x8 0x0 IRQ_TYPE_EDGE_BOTH>;
				debounce = <15625>;
				bias-pull-up;
				linux,code = <KEY_POWER>;
			};

			pon_resin: resin {
				compatible = "qcom,pm8941-resin";
				interrupts = <0x0 0x8 0x1 IRQ_TYPE_EDGE_BOTH>;
				debounce = <15625>;
				bias-pull-up;
				linux,code = <KEY_VOLUMEDOWN>;
			};
		};

		pm8150_clkdiv: clock-controller@5b00 {
			compatible = "qcom,spmi-clkdiv";
			reg = <0x5b00>;
			#clock-cells = <1>;
			qcom,num-clkdivs = <2>;
			clock-output-names = "pm8150_div_clk1",
						"pm8150_div_clk2";
			clocks = <&rpmhcc RPMH_CXO_CLK>;
			clock-names = "xo";
		};

		pm8150_rtc: qcom,pm8150_rtc {
			status = "okay";
			compatible = "qcom,pm8941-rtc";
			reg = <0x6000>, <0x6100>;
			reg-names = "rtc", "alarm";
			interrupts = <0x0 0x61 0x1 IRQ_TYPE_NONE>;
		};

		pm8150_gpios: pinctrl@c000 {
			compatible = "qcom,pm8150-gpio";
			reg = <0xc000>;
			gpio-controller;
			#gpio-cells = <2>;
			interrupt-controller;
			#interrupt-cells = <2>;
		};

		pm8150_sdam_2: sdam@b100 {
			status = "okay";
			compatible = "qcom,spmi-sdam";
			reg = <0xb100>;
			#address-cells = <1>;
			#size-cells = <1>;

			restart_reason: restart@48 {
				reg = <0x48 0x1>;
				bits = <1 7>;
			};
		};

		pm8150_vadc: vadc@3100 {
			status = "okay";
			compatible = "qcom,spmi-adc5";
			reg = <0x3100>;
			#address-cells = <1>;
			#size-cells = <0>;
			interrupts = <0x0 0x31 0x0 IRQ_TYPE_EDGE_RISING>;
			interrupt-names = "eoc-int-en-set";
			#io-channel-cells = <1>;
			io-channel-ranges;

			/* Channel node */
			ref_gnd {
				reg = <ADC5_REF_GND>;
				label = "ref_gnd";
				qcom,pre-scaling = <1 1>;
			};

			vref_1p25 {
				reg = <ADC5_1P25VREF>;
				label = "vref_1p25";
				qcom,pre-scaling = <1 1>;
			};

			die_temp {
				reg = <ADC5_DIE_TEMP>;
				label = "die_temp";
				qcom,pre-scaling = <1 1>;
			};
		};

		pm8150_adc_tm: adc_tm@3500 {
			status = "okay";
			compatible = "qcom,spmi-adc-tm5";
			reg = <0x3500>;
			interrupts = <0x0 0x35 0x0 IRQ_TYPE_EDGE_RISING>;
			interrupt-names = "threshold";
			#address-cells = <1>;
			#size-cells = <0>;
			#thermal-sensor-cells = <1>;
			io-channels = <&pm8150_vadc ADC5_XO_THERM_100K_PU>,
					<&pm8150_vadc ADC5_AMUX_THM1_100K_PU>,
					<&pm8150_vadc ADC5_AMUX_THM2_100K_PU>;
		};
	};

	qcom,pm8150@1 {
		status = "okay";
		compatible ="qcom,spmi-pmic";
		reg = <1 SPMI_USID>;
		#address-cells = <1>;
		#size-cells = <0>;
	};
};

&thermal_zones {
	pm8150_temp_alarm: pm8150_tz {
		polling-delay-passive = <100>;
		polling-delay = <0>;
		thermal-governor = "step_wise";
		thermal-sensors = <&pm8150_tz>;

		trips {
			pm8150_trip0: trip0 {
				temperature = <105000>;
				hysteresis = <0>;
				type = "passive";
			};

			pm8150_trip1: trip1 {
				temperature = <125000>;
				hysteresis = <0>;
				type = "passive";
			};

			trip2 {
				temperature = <155000>;
				hysteresis = <0>;
				type = "critical";
			};
		};
	};
};