summaryrefslogtreecommitdiff
path: root/qcom/sdxbaagha-pmic-overlay.dtsi
blob: 801e0405583dc4502eb77c8994a142337968c326 (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
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
#include <dt-bindings/pinctrl/qcom,pmic-gpio.h>
#include <dt-bindings/iio/qcom,spmi-vadc.h>
#include "pmx35.dtsi"

&pmx35_gpios {
	smb_int {
		smb_int_default: smb_int_default {
			pins = "gpio7";
			function = "normal";
			input-enable;
			bias-pull-up;
			qcom,pull-up-strength = <PMIC_GPIO_PULL_UP_30>;
			power-source = <0>;
		};
	};

	batt_id {
		batt_id_default: batt_id_default {
			pins = "gpio6";
			bias-high-impedance;
		};
	};
};

&qupv3_se4_i2c {
	status = "ok";
	smb23x-lbc@12 {
		compatible = "qcom,smb231-lbc";
		reg = <0x12>;
		interrupt-parent = <&spmi_bus>;
		interrupts = <0x0 0x8E 0x0 IRQ_TYPE_LEVEL_LOW>;
		interrupt-names = "smb23x_stat_irq";
		pinctrl-names = "default";
		pinctrl-0 = <&smb_int_default>;
		#io-channel-cells = <1>;
		io-channels = <&pmx35_vadc PMX35_ADC5_GEN3_AMUX3_GPIO6_100K_PU>;
		io-channel-names = "batt-id";

		qcom,bms-psy-name = "bms";
		qcom,float-voltage-mv = <4350>;
		qcom,charging-timeout = <360>;
		qcom,recharge-thresh-mv = <150>;
		qcom,iterm-ma = <50>;
		qcom,fastchg-ma = <1000>;
		qcom,hot-bat-decidegc = <450>;
		qcom,warm-bat-decidegc = <400>;
		qcom,cool-bat-decidegc = <50>;
		qcom,cold-bat-decidegc = <(0)>;
		qcom,soft-temp-vfloat-comp-mv = <200>;
		qcom,soft-temp-current-comp-ma = <400>;
		qcom,chg-inhibit-disabled;
		qcom,apsd-disabled;
		qcom,thermal-mitigation = <1500 900 500 100>;
	};
};

&soc {
	pmic-pon-log {
		compatible = "qcom,pmic-pon-log";
		nvmem = <&pmx35_sdam_5>;
		nvmem-names = "pon_log";
	};
};

&pmx35_vbus_detect {
	status = "okay";
};

&pmx35_vadc {
	status = "okay";
	pinctrl-names = "default";
	pinctrl-0 = <&batt_id_default>;
	pmx35_batt_id {
		reg = <PMX35_ADC5_GEN3_AMUX3_GPIO6_100K_PU>;
		label = "batt_id";
		qcom,ratiometric;
		qcom,hw-settle-time = <200>;
		qcom,pre-scaling = <1 1>;
		qcom,scale-fn-type = <ADC_SCALE_HW_CALIB_PM5_GEN3_BATT_ID_100K>;
	};

	pmx35_quiet_therm {
		reg = <PMX35_ADC5_GEN3_AMUX_THM2_100K_PU>;
		label = "pmx35_quiet_therm";
		qcom,ratiometric;
		qcom,adc-tm-type = <1>;
		qcom,hw-settle-time = <200>;
		qcom,pre-scaling = <1 1>;
	};

	pmx35_xo_therm {
		reg = <PMX35_ADC5_GEN3_AMUX_THM5_100K_PU>;
		label = "pmx35_xo_therm";
		qcom,ratiometric;
		qcom,adc-tm-type = <1>;
		qcom,hw-settle-time = <200>;
		qcom,pre-scaling = <1 1>;
	};

	pa-therm1 {
		reg = <PMX35_ADC5_GEN3_AMUX_THM1_100K_PU>;
		label = "pmx35_pa_therm1";
		qcom,ratiometric;
		qcom,adc-tm-type = <1>;
		qcom,hw-settle-time = <200>;
		qcom,pre-scaling = <1 1>;
	};

	mdm-skin-therm {
		reg = <PMX35_ADC5_GEN3_AMUX_THM3_100K_PU>;
		label = "mdm-skin-therm";
		qcom,ratiometric;
		qcom,adc-tm-type = <1>;
		qcom,hw-settle-time = <200>;
		qcom,pre-scaling = <1 1>;
	};

};

&pmx35_tz {
	io-channels = <&pmx35_vadc PMX35_ADC5_GEN3_DIE_TEMP>;
	io-channel-names = "thermal";
};

&thermal_zones {
	sys-therm-1 {
		polling-delay-passive = <0>;
		polling-delay = <0>;
		thermal-sensors = <&pmx35_vadc PMX35_ADC5_GEN3_AMUX_THM1_100K_PU>;
		trips {
			active-config0 {
				temperature = <125000>;
				hysteresis = <1000>;
				type = "passive";
			};

			active-config1 {
				temperature = <125000>;
				hysteresis = <1000>;
				type = "passive";
			};
		};
	};

	sys-therm-2 {
		polling-delay-passive = <0>;
		polling-delay = <0>;
		thermal-sensors = <&pmx35_vadc PMX35_ADC5_GEN3_AMUX_THM2_100K_PU>;
		trips {
			active-config0 {
				temperature = <125000>;
				hysteresis = <1000>;
				type = "passive";
			};

			active-config1 {
				temperature = <125000>;
				hysteresis = <1000>;
				type = "passive";
			};
		};
	};

	sys-therm-3 {
		polling-delay-passive = <0>;
		polling-delay = <0>;
		thermal-sensors = <&pmx35_vadc PMX35_ADC5_GEN3_AMUX_THM3_100K_PU>;
		trips {
			active-config0 {
				temperature = <125000>;
				hysteresis = <1000>;
				type = "passive";
			};

			active-config1 {
				temperature = <125000>;
				hysteresis = <1000>;
				type = "passive";
			};
		};
	};

	xo-therm {
		polling-delay-passive = <0>;
		polling-delay = <0>;
		thermal-sensors = <&pmx35_vadc PMX35_ADC5_GEN3_AMUX_THM5_100K_PU>;
		trips {
			active-config0 {
				temperature = <125000>;
				hysteresis = <1000>;
				type = "passive";
			};

			active-config1 {
				temperature = <125000>;
				hysteresis = <1000>;
				type = "passive";
			};
		};
	};
};