summaryrefslogtreecommitdiff
path: root/qcom/sdxlemur-mtp-mbb-emmc.dtsi
blob: ea6d71dc8fb3a45c6408ea196ecac0c81102ea37 (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
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
#include "sdxlemur-pmic-overlay.dtsi"
#include "pm7250b.dtsi"
#include <dt-bindings/iio/qti_power_supply_iio.h>
#include <dt-bindings/pinctrl/qcom,pmic-gpio.h>

&soc {
	mbb_batterydata: qcom,battery-data {
		qcom,batt-id-range-pct = <15>;
		#include "qg-batterydata-alium-3600mah.dtsi"
	};
};

&sdhc_1 {
	reg = <0x08804000 0x1000>, <0x08805000 0x1000>;
	reg-names = "hc_mem", "cqhci_mem";

	mmc-ddr-1_8v;
	mmc-hs200-1_8v;

	bus-width = <8>;
	non-removable;
	supports-cqe;

	vdd-supply = <&vreg_sd_vdd>;
	qcom,vdd-voltage-level = <2950000 2950000>;
	qcom,vdd-current-level = <0 570000>;

	vdd-io-supply = <&L6B>;
	qcom,vdd-io-always-on;
	qcom,vdd-io-lpm-sup;
	qcom,vdd-io-voltage-level = <1800000 1800000>;
	qcom,vdd-io-current-level = <0 200000>;

	qcom,devfreq,freq-table = <50000000 192000000>;
	qcom,scaling-lower-bus-speed-mode = "DDR52";

	pinctrl-names = "default", "sleep";
	pinctrl-0 = <&sdc1_on>;
	pinctrl-1 = <&sdc1_off>;

	status = "ok";
};

&spmi_debug_bus {
	qcom,pm7250b-debug@2 {
		compatible = "qcom,spmi-pmic";
		reg = <2 SPMI_USID>;
		#address-cells = <2>;
		#size-cells = <0>;
		qcom,can-sleep;
	};
};

&pm7250b_clkdiv {
	clocks = <&rpmhcc RPMH_CXO_CLK>;
	clock-names = "xo";
};

&pm7250b_vadc {
	charger_skin_therm {
		reg = <ADC5_AMUX_THM1_100K_PU>;
		label = "charger_skin_therm";
		qcom,ratiometric;
		qcom,hw-settle-time = <200>;
		qcom,pre-scaling = <1 1>;
	};

	conn_therm {
		reg = <ADC5_AMUX_THM3_100K_PU>;
		label = "conn_therm";
		qcom,ratiometric;
		qcom,hw-settle-time = <200>;
		qcom,pre-scaling = <1 1>;
	};

	smb1390_therm@e {
		qcom,scale-fn-type = <ADC_SCALE_HW_CALIB_PM5_SMB1398_TEMP>;
	};
};

&pm7250b_adc_tm {
	io-channels = <&pm7250b_vadc ADC5_AMUX_THM1_100K_PU>,
			<&pm7250b_vadc ADC5_AMUX_THM3_100K_PU>;

	charger_skin_therm {
		reg = <ADC5_AMUX_THM1_100K_PU>;
		qcom,ratiometric;
		qcom,hw-settle-time = <200>;
	};

	conn_therm {
		reg = <ADC5_AMUX_THM3_100K_PU>;
		qcom,ratiometric;
		qcom,hw-settle-time = <200>;
	};
};

&thermal_zones {
	chg-skin-therm-usr {
		polling-delay-passive = <0>;
		polling-delay = <0>;
		thermal-governor = "user_space";
		thermal-sensors = <&pm7250b_adc_tm ADC5_AMUX_THM1_100K_PU>;
		trips {
			active-config0 {
				temperature = <125000>;
				hysteresis = <1000>;
				type = "passive";
			};

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

	conn-therm-usr {
		polling-delay-passive = <0>;
		polling-delay = <0>;
		thermal-governor = "user_space";
		thermal-sensors = <&pm7250b_adc_tm ADC5_AMUX_THM3_100K_PU>;
		trips {
			active-config0 {
				temperature = <125000>;
				hysteresis = <1000>;
				type = "passive";
			};

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

&pm7250b_charger {
	#io-channel-cells = <1>;
	io-channels = <&pm7250b_vadc ADC5_USB_IN_V_16>,
		      <&pm7250b_vadc ADC5_USB_IN_I>,
		      <&pm7250b_vadc ADC5_CHG_TEMP>,
		      <&pm7250b_vadc ADC5_DIE_TEMP>,
		      <&pm7250b_vadc ADC5_AMUX_THM3_100K_PU>,
		      <&pm7250b_vadc ADC5_SBUx>,
		      <&pm7250b_vadc ADC5_VPH_PWR>,
		      <&pm7250b_vadc ADC5_AMUX_THM1_100K_PU>,
		      <&pm7250b_qg PSY_IIO_RESISTANCE_ID>,
		      <&pm7250b_qg PSY_IIO_VOLTAGE_NOW>,
		      <&pm7250b_qg PSY_IIO_TEMP>,
		      <&pm7250b_qg PSY_IIO_CAPACITY>,
		      <&pm7250b_qg PSY_IIO_VOLTAGE_OCV>,
		      <&pm7250b_qg PSY_IIO_VOLTAGE_AVG>,
		      <&pm7250b_qg PSY_IIO_DEBUG_BATTERY>,
		      <&pm7250b_qg PSY_IIO_REAL_CAPACITY>,
		      <&pm7250b_qg PSY_IIO_CC_SOC>,
		      <&pm7250b_qg PSY_IIO_CURRENT_NOW>,
		      <&pm7250b_qg PSY_IIO_VOLTAGE_MAX>,
		      <&pm7250b_qg PSY_IIO_CHARGE_FULL>,
		      <&pm7250b_qg PSY_IIO_CHARGE_COUNTER>,
		      <&pm7250b_qg PSY_IIO_CYCLE_COUNT>,
		      <&pm7250b_qg PSY_IIO_CHARGE_FULL_DESIGN>,
		      <&pm7250b_qg PSY_IIO_TIME_TO_FULL_NOW>,
		      <&smb1394_div2_cp_primary PSY_IIO_PARALLEL_MODE>,
		      <&smb1394_div2_cp_primary PSY_IIO_PARALLEL_OUTPUT_MODE>,
		      <&smb1394_div2_cp_primary PSY_IIO_MIN_ICL>,
		      <&smb1394_div2_cp_primary PSY_IIO_CP_SWITCHER_EN>,
		      <&smb1394_div2_cp_primary PSY_IIO_CP_ENABLE>,
		      <&smb1394_div2_cp_primary PSY_IIO_CP_ILIM>,
		      <&smb1394_div2_cp_primary PSY_IIO_CP_DIE_TEMP>;
	io-channel-names = "usb_in_voltage",
			   "usb_in_current",
			   "chg_temp",
			   "die_temp",
			   "conn_temp",
			   "sbux_res",
			   "vph_voltage",
			   "skin_temp",
			   "resistance_id",
			   "voltage_now",
			   "temp",
			   "capacity",
			   "voltage_ocv",
			   "voltage_avg",
			   "debug_battery",
			   "real_capacity",
			   "cc_soc",
			   "current_now",
			   "voltage_max",
			   "charge_full",
			   "charge_counter",
			   "cycle_count",
			   "charge_full_design",
			   "time_to_full_now",
			   "cp_parallel_mode",
			   "cp_parallel_output_mode",
			   "cp_min_icl",
			   "cp_switcher_en",
			   "cp_enable",
			   "cp_ilim",
			   "cp_die_temp";
	qcom,battery-data = <&mbb_batterydata>;
	qcom,sec-charger-config = <1>;
	qcom,auto-recharge-soc = <98>;
	qcom,step-charging-enable;
	qcom,sw-jeita-enable;
	qcom,charger-temp-max = <800>;
	qcom,smb-temp-max = <800>;
	qcom,suspend-input-on-debug-batt;
	qcom,fcc-stepping-enable;
	qcom,fcc-step-delay-ms = <100>;
	qcom,fcc-step-size-ua = <100000>;
	qcom,thermal-mitigation = <3600000 3000000 1500000 1000000 500000>;
	qcom,smb-internal-pull-kohm = <0>;
	qcom,en-skin-therm-mitigation;
	qcom,hvdcp3-standalone-config;
	dpdm-supply = <&usb2_phy>;

	smb5_vbus: qcom,smb5-vbus {
		regulator-name = "smb5-vbus";
	};

	smb5_vconn: qcom,smb5-vconn {
		regulator-name = "smb5-vconn";
	};
};

&pm7250b_qg {
	#io-channel-cells = <1>;
	io-channels = <&pm7250b_vadc ADC5_BAT_THERM_100K_PU>,
		      <&pm7250b_vadc ADC5_BAT_ID_100K_PU>,
		      <&pm7250b_charger PSY_IIO_INPUT_CURRENT_LIMITED>,
		      <&pm7250b_charger PSY_IIO_RECHARGE_SOC>,
		      <&pm7250b_charger PSY_IIO_FORCE_RECHARGE>,
		      <&pm7250b_charger PSY_IIO_CHARGE_DONE>,
		      <&smb1394_div2_cp_primary PSY_IIO_CP_ENABLE>;
	io-channel-names = "batt-therm",
			   "batt-id",
			   "input_current_limited",
			   "recharge_soc",
			   "force_recharge",
			   "charge_done",
			   "cp_charging_enabled";
	qcom,battery-data = <&mbb_batterydata>;
	qcom,qg-iterm-ma = <150>;
	qcom,hold-soc-while-full;
	qcom,linearize-soc;
	qcom,cl-feedback-on;
	qcom,tcss-enable;
	qcom,fvss-enable;
	qcom,fvss-vbatt-mv = <3300>;
	qcom,bass-enable;
	qcom,use-cp-iin-sns;
};

&pm7250b_pdphy {
	vdd-pdphy-supply = <&L10B>;
	vbus-supply = <&smb5_vbus>;
	vconn-supply = <&smb5_vconn>;

	#io-channel-cells = <1>;
	io-channels = <&pm7250b_charger PSY_IIO_PD_ACTIVE>,
		      <&pm7250b_charger PSY_IIO_TYPEC_CC_ORIENTATION>,
		      <&pm7250b_charger PSY_IIO_CONNECTOR_TYPE>,
		      <&pm7250b_charger PSY_IIO_TYPEC_POWER_ROLE>,
		      <&pm7250b_charger PSY_IIO_PD_USB_SUSPEND_SUPPORTED>,
		      <&pm7250b_charger PSY_IIO_TYPEC_SRC_RP>,
		      <&pm7250b_charger PSY_IIO_PD_IN_HARD_RESET>,
		      <&pm7250b_charger PSY_IIO_PD_CURRENT_MAX>,
		      <&pm7250b_charger PSY_IIO_PR_SWAP>,
		      <&pm7250b_charger PSY_IIO_PD_VOLTAGE_MIN>,
		      <&pm7250b_charger PSY_IIO_PD_VOLTAGE_MAX>,
		      <&pm7250b_charger PSY_IIO_USB_REAL_TYPE>,
		      <&pm7250b_charger PSY_IIO_TYPEC_MODE>,
		      <&pm7250b_charger PSY_IIO_PE_START>;
	io-channel-names = "pd_active",
			   "typec_cc_orientation",
			   "connector_type",
			   "typec_power_role",
			   "pd_usb_suspend_supported",
			   "typec_src_rp",
			   "pd_in_hard_reset",
			   "pr_current_max",
			   "pr_swap",
			   "pd_voltage_min",
			   "pd_voltage_max",
			   "real_type",
			   "typec_mode",
			   "pe_start";
};

&pm7250b_gpios {
	smb_stat {
		smb_stat_default: smb_stat_default {
			pins = "gpio6";
			function = "normal";
			input-enable;
			bias-pull-up;
			qcom,pull-up-strength = <PMIC_GPIO_PULL_UP_30>;
			power-source = <0>;
		};
	};
};

&i2c_3 {
	status = "ok";
	#include "smb1394.dtsi"
};

&smb1394 {
	interrupts = <0x2 0xc5 0x0 IRQ_TYPE_LEVEL_LOW>;
	interrupt-parent = <&spmi_bus>;
	interrupt-names = "smb1394";
	pinctrl-names = "default";
	pinctrl-0 = <&smb_stat_default>;
	status = "ok";
};

&smb1394_div2_cp_primary {
	io-channels = <&pm7250b_vadc ADC5_AMUX_THM2>,
		      <&pm7250b_charger PSY_IIO_USB_REAL_TYPE>,
		      <&pm7250b_charger PSY_IIO_ADAPTER_CC_MODE>,
		      <&pm7250b_charger PSY_IIO_PD_CURRENT_MAX>,
		      <&pm7250b_charger PSY_IIO_USB_INPUT_CURRENT_SETTLED>,
		      <&pm7250b_charger PSY_IIO_SMB_EN_MODE>,
		      <&pm7250b_charger PSY_IIO_SMB_EN_REASON>;
	io-channel-names = "die_temp",
			   "real_type",
			   "adapter_cc_mode",
			   "pd_current_max",
			   "input_current_settled",
			   "smb_en_mode",
			   "smb_en_reason";
	qcom,parallel-input-mode = <1>; /* USBIN */
	qcom,parallel-output-mode = <2>; /* VBAT */
	status = "ok";
};

&usb {
	extcon = <&pm7250b_pdphy>, <&eud>;

	#io-channel-cells = <1>;
	io-channels= <&pm7250b_charger PSY_IIO_USB_REAL_TYPE>;
	io-channel-names = "chg_type";
};

&vbus_detect {
	status = "disabled";
};