blob: 6730576a751195ffc820a70ec5a625ae4a6cc3e9 [file] [log] [blame]
rjw6c1fd8f2022-11-30 14:33:01 +08001/*****************************************************************************
2* Copyright Statement:
3* --------------------
4* This software is protected by Copyright and the information contained
5* herein is confidential. The software may not be copied and the information
6* contained herein may not be used or disclosed except with the written
7* permission of MediaTek Inc. (C) 2001
8*
9*****************************************************************************/
10
11/*****************************************************************************
12 *
13 * Filename:
14 * ---------
15 * dcl_pmic_features.h
16 *
17 * Project:
18 * --------
19 * Maui
20 *
21 * Description:
22 * ------------
23 * Header file of DCL (Driver Common Layer) for PMU feature options.
24 *
25 * Author:
26 * -------
27 * -------
28 *
29 *============================================================================
30 * HISTORY
31 * Below this line, this part is controlled by PVCS VM. DO NOT MODIFY!!
32 *------------------------------------------------------------------------------
33 * removed!
34 * removed!
35 * removed!
36 *
37 * removed!
38 * removed!
39 * removed!
40 *
41 * removed!
42 * removed!
43 * removed!
44 *
45 * removed!
46 * removed!
47 * removed!
48 * removed!
49 *
50 * removed!
51 * removed!
52 * removed!
53 *
54 * removed!
55 * removed!
56 * removed!
57 *
58 * removed!
59 * removed!
60 * removed!
61 *
62 * removed!
63 * removed!
64 * removed!
65 *
66 * removed!
67 * removed!
68 * removed!
69 *
70 * removed!
71 * removed!
72 * removed!
73 *
74 * removed!
75 * removed!
76 * removed!
77 *
78 * removed!
79 * removed!
80 * removed!
81 *
82 * removed!
83 * removed!
84 * removed!
85 *
86 * removed!
87 * removed!
88 * removed!
89 *
90 * removed!
91 * removed!
92 * removed!
93 *
94 * removed!
95 * removed!
96 * removed!
97 *
98 * removed!
99 * removed!
100 * removed!
101 *
102 * removed!
103 * removed!
104 * removed!
105 *
106 * removed!
107 * removed!
108 * removed!
109 *
110 * removed!
111 * removed!
112 * removed!
113 *
114 * removed!
115 * removed!
116 * removed!
117 *
118 * removed!
119 * removed!
120 * removed!
121 *
122 * removed!
123 * removed!
124 * removed!
125 *
126 * removed!
127 * removed!
128 * removed!
129 *
130 * removed!
131 * removed!
132 * removed!
133 *
134 * removed!
135 * removed!
136 * removed!
137 *
138 * removed!
139 * removed!
140 * removed!
141 *
142 * removed!
143 * removed!
144 * removed!
145 *
146 * removed!
147 * removed!
148 * removed!
149 *
150 * removed!
151 * removed!
152 * removed!
153 *
154 * removed!
155 * removed!
156 * removed!
157 *
158 * removed!
159 * removed!
160 * removed!
161 *
162 * removed!
163 * removed!
164 * removed!
165 *
166 * removed!
167 * removed!
168 * removed!
169 *
170 * removed!
171 * removed!
172 * removed!
173 *
174 * removed!
175 * removed!
176 * removed!
177 *
178 * removed!
179 * removed!
180 * removed!
181 *
182 * removed!
183 * removed!
184 * removed!
185 *
186 *------------------------------------------------------------------------------
187 * Upper this line, this part is controlled by PVCS VM. DO NOT MODIFY!!
188 *============================================================================
189 ****************************************************************************/
190
191#ifndef DCL_PMIC_FEATURES_H
192#define DCL_PMIC_FEATURES_H
193
194
195
196#if defined(MT6238PMU) || defined(MT6235PMU)
197 #define PMIC_FIXED_3_ADC_CH
198 #define PMIC_FIXED_CHR_EINT
199 #define PMIC_6238_CUSTOMIZATION
200 #define PMIC_6238_USB_FUNCTION
201
202 #define PMIC_PMU_SERIES
203 /* Charger/USB detect through USB PHY */
204 #define PMIC_CHR_USB_DETECT_THROUGH_USB
205 #define PMIC_CHR_USB_DET_EINT_LEVEL_ACTIVE_LOW // Charger det EINT interrupt LEVEL trigger active LOW
206 #define PMIC_CHR_USB_DET_EINT_LEVEL_TRIGGER // CHR/USB detection is LEVEL trigger
207
208 #define PMIC_6235_CV_TRIM_CALIBRATION
209
210 /* For internal use. */
211 #define PMIC_6238_REG_API
212 #define __CHARGER_SOFT_START__
213
214
215
216 #ifndef PMIC_PRESENT
217 #define PMIC_PRESENT
218 #endif
219
220#elif defined(MT6326_CCCI)
221 /* Provide VSIM sel and enable interface */
222 #define PMIC_VSIM_SEL_AND_ENABLE
223 /* Provide VSIM enable interface */
224 #define PMIC_VSIM_ENABLE
225 /* Provide VSIM2 sel and enable interface */
226 #define PMIC_VSIM2_SEL_AND_ENABLE
227 /* Provide VSIM2 enable interface */
228 #define PMIC_VSIM2_ENABLE
229 /* Provide PMIC LOCK interface */
230 #define PMIC_LOCK
231 /* For internal use. */
232 #define PMIC_6326_CCCI_REG_API
233
234 #define PMIC_CHR_DETECT_NONE
235
236 #ifndef PMIC_PRESENT
237 #define PMIC_PRESENT
238 #endif // #ifndef PMIC_PRESENT
239
240#elif defined(MT6253PMU)
241
242 #define PMIC_VSIM2_SEL
243 #define PMIC_FIXED_3_ADC_CH
244 #define PMIC_FIXED_CHR_EINT
245 #define PMIC_6253_CUSTOMIZATION
246 #define PMIC_6253_USB_FUNCTION
247
248
249 #define PMIC_PMU_SERIES
250 #define PMIC_CHR_USB_DET_EINT_LEVEL_ACTIVE_LOW // Charger det EINT interrupt LEVEL trigger active LOW
251 #define PMIC_CHR_USB_DET_EINT_LEVEL_TRIGGER // CHR/USB detection is LEVEL trigger
252 #define PMIC_CHR_USB_DETECT_THROUGH_USB
253
254
255 // PMIC support charge WDT functionality
256 // BMT driver will refer the compile option to enable/disable BMT level WDT
257 #define PMIC_CHARGE_WDT
258 /* For internal use. */
259 #define PMIC_6253_REG_API
260 #define __CHARGER_SOFT_START__
261
262 #define PMIC_6253_CV_TRIM_CALIBRATION
263
264
265
266 #ifndef PMIC_PRESENT
267 #define PMIC_PRESENT
268 #endif
269
270#define PMIC_FIXED_CHR_EINT
271#if defined(PMIC_FIXED_CHR_EINT)
272#define PMIC_FIXED_CHR_EINT_PIN 7
273#endif // #if defined(PMIC_FIXED_CHR_EINT)
274
275#elif defined(MT6236PMU)
276
277 #define PMIC_6236_REG_API
278 #define PMIC_6236_CUSTOMIZATION
279 //#define PMIC_6238_USB_FUNCTION
280
281 #define PMIC_PMU_SERIES
282 #define PMIC_CHR_USB_DET_EINT_LEVEL_ACTIVE_LOW // Charger det EINT interrupt LEVEL trigger active LOW
283 #define PMIC_CHR_USB_DET_EINT_LEVEL_TRIGGER // CHR/USB detection is LEVEL trigger
284 #define PMIC_CHR_USB_DETECT_THROUGH_USB /* Charger/USB detect through USB PHY */
285
286 #define PMIC_6236_CV_TRIM_CALIBRATION
287
288 #define PMIC_FIXED_3_ADC_CH
289 //#define PMIC_FIXED_4_ADC_CH
290 #define PMIC_FIXED_CHR_EINT
291 #define PMIC_6236_USB_FUNCTION
292
293
294 #ifndef PMIC_PRESENT
295 #define PMIC_PRESENT
296 #endif // #ifndef PMIC_PRESENT
297
298#elif defined(MT6251PMU)
299
300#define PMIC_6251_REG_API
301#define PMIC_6251_CUSTOMIZATION
302#define PMIC_SLIM_V3
303
304#define PMIC_FIXED_3_ADC_CH
305#define PMIC_FIXED_4_ADC_CH
306#define PMIC_FIXED_CHR_EINT
307
308#define PMIC_PMU_SERIES
309#define PMIC_CHR_USB_DET_EINT_LEVEL_ACTIVE_LOW // Charger det EINT interrupt LEVEL trigger active LOW
310#define PMIC_CHR_USB_DET_EINT_LEVEL_TRIGGER // CHR/USB detection is LEVEL trigger
311#define PMIC_CHR_USB_DETECT_THROUGH_PMU_BC11
312
313#ifndef PMIC_PRESENT
314#define PMIC_PRESENT
315#endif // #ifndef PMIC_PRESENT
316
317#define PMIC_FIXED_CHR_EINT
318
319/*
320#define __DRV_UPMU_LDO_V1__
321#define __DRV_UPMU_LDO_V1_STB_TD_AT_CON2_BIT6__
322#define __DRV_UPMU_BUCK_V1__
323#define __DRV_UPMU_KPLED_V1__
324#define __DRV_UPMU_BC11_V1__
325#define __DRV_UPMU_STRUP_V1__
326#define __DRV_UPMU_BOOST_V1__
327#define __DRV_UPMU_SPK_V1__
328#define __DRV_UPMU_ISINK_V1__
329*/
330#define __DRV_UPMU_CHARGER_V1__
331 #define __DRV_OTG_BVALID_DET_AT_CON5_BIT15__
332 #define __DRV_VBAT_OV_EN_AT_CON3_BIT8__
333 #define __DRV_BATON_EN_AT_CON3_BIT9__
334 #define __DRV_OTG_BVALID_EN_AT_CON5_BIT12__
335 #define __DRV_OTG_BVALID_DET_AT_CON5_BIT15__
336 #define __DRV_CHR_WDT_CLEAR_WAIT_2MS__ // design limitation, need to wait for clock sync
337 #define __DRV_VBAT_OV_VTH_CON3_3BIT_WIDTH_VTH2_AT_BIT12__
338 #define __DRV_UPMU_BC11_V1__
339 // Use USB module 1.5KOhm pull high resistor for group B identify process
340 // Need to isolate USB DP/MP line to make 1.5KOhm resistor work
341 // (1.5KOhm resistor has some enable dependency on isolation switch)
342 //#define __DRV_BC11_USE_USB_100_K_RESISTOR_4_GROUP_B__
343 // Use USB module provided USB line status check API
344 // 1. USB module provide line status check API: 2.0V <-> 0.8V
345 // Higher than 2.0V ==> HIGH
346 // Lower than 0.8V ==> LOW
347 // 2. PMU BC11 circuit provide 1.2V comparator
348 //#define __DRV_BC11_USE_USB_LINE_STATUS_API__
349 #define __DRV_UPMU_BC11_VSRC_EN_AT_TEST_CON1_BIT4__
350#if defined(MT6251_S00)
351 #define __MT6251PMU_E1_BC11_VSRC_EN_AT_TEST_CON1_BIT4__
352#endif //#if defined(MT6251_S00)
353 #define __DRV_CHR_FLAG_SEL_5BIT_WIDTH_SEL4_AT_BIT13__
354
355#elif defined(MT6252PMU) || defined(MT6253ELPMU)
356#define PMIC_6252_REG_API
357#define PMIC_6252_CUSTOMIZATION
358
359#define PMIC_FIXED_3_ADC_CH
360#define PMIC_FIXED_CHR_EINT
361#define PMIC_SLIM_V3
362
363#define PMIC_PMU_SERIES
364#define PMIC_CHR_USB_DET_EINT_LEVEL_ACTIVE_LOW // Charger det EINT interrupt LEVEL trigger active HIGH
365#define PMIC_CHR_USB_DET_EINT_LEVEL_TRIGGER // CHR/USB detection is LEVEL trigger
366#define PMIC_CHR_USB_DETECT_THROUGH_PMU_BC11
367
368#ifndef PMIC_PRESENT
369#define PMIC_PRESENT
370#endif // #ifndef PMIC_PRESENT
371
372#define __DRV_UPMU_BC11_V1__
373
374#elif defined(MT6255PMU)
375#define PMIC_6255_REG_API
376
377 #define PMIC_FIXED_3_ADC_CH
378 #define PMIC_FIXED_4_ADC_CH
379 #define PMIC_FIXED_CHR_EINT
380 #define PMIC_SLIM_V3
381
382#define PMIC_PMU_SERIES
383#define PMIC_CHR_USB_DET_EINT_LEVEL_ACTIVE_LOW// Charger det EINT interrupt LEVEL trigger active low
384#define PMIC_CHR_USB_DET_EINT_LEVEL_TRIGGER // CHR/USB detection is LEVEL trigger
385#define PMIC_CHR_USB_DETECT_THROUGH_PMU_BC11
386#define __DRV_UPMU_BC11_V1__
387
388#ifndef PMIC_PRESENT
389#define PMIC_PRESENT
390#endif // #ifndef PMIC_PRESENT
391
392
393#elif defined(MT6256PMU)
394#define PMIC_6256_REG_API
395#define PMIC_6256_CUSTOMIZATION
396
397 #define PMIC_FIXED_3_ADC_CH
398 #define PMIC_FIXED_4_ADC_CH
399 #define PMIC_FIXED_CHR_EINT
400 #define PMIC_SLIM_V3
401
402#define PMIC_PMU_SERIES
403#define PMIC_CHR_USB_DET_EINT_LEVEL_ACTIVE_LOW// Charger det EINT interrupt LEVEL trigger active low
404#define PMIC_CHR_USB_DET_EINT_LEVEL_TRIGGER // CHR/USB detection is LEVEL trigger
405#define PMIC_CHR_USB_DETECT_THROUGH_PMU_BC11
406#define __DRV_UPMU_BC11_V1__
407
408#ifndef PMIC_PRESENT
409#define PMIC_PRESENT
410#endif // #ifndef PMIC_PRESENT
411
412#elif defined(MT6276PMU)
413
414#define PMIC_6276_REG_API
415#define PMIC_6276_CUSTOMIZATION
416
417
418#define PMIC_PMU_SERIES
419#define PMIC_CHR_USB_DET_EINT_LEVEL_ACTIVE_HIGH // Charger det EINT interrupt LEVEL trigger active HIGH
420#define PMIC_CHR_USB_DET_EINT_LEVEL_TRIGGER // CHR/USB detection is LEVEL trigger
421#define PMIC_CHR_USB_DETECT_THROUGH_USB
422
423#ifndef PMIC_PRESENT
424#define PMIC_PRESENT
425#endif // #ifndef PMIC_PRESENT
426
427#define PMIC_FIXED_3_ADC_CH
428#define PMIC_FIXED_CHR_EINT
429#if defined(PMIC_FIXED_CHR_EINT)
430#define PMIC_FIXED_CHR_EINT_PIN 29
431#endif // #if defined(PMIC_FIXED_CHR_EINT)
432
433#define __DRV_UPMU_LPOSC_V1__
434#define __DRV_UPMU_LDO_V1__
435#define __DRV_UPMU_SHARE_LDO__
436#if defined(MT6276_S00)
437#define __MT6276PMU_E1_VSIM2_VOLSEL_ISSUE__
438#endif //#if defined(MT6276_S00)
439#define __DRV_UPMU_LDO_V1_STB_TD_AT_CON1_BIT0__
440#define __DRV_UPMU_BUCK_V1__
441#define __DRV_UPMU_VPA_V1__
442#define __DRV_UPMU_KPLED_V1__
443#define __DRV_UPMU_CHARGER_V1__
444#define __DRV_OTG_BVALID_EN_AT_CON3_BIT13__
445#define __DRV_BATON_EN_AT_CON3_BIT12__
446#define __DRV_UPMU_BC11_V1__
447#define __DRV_UPMU_BC11_MAPPING_V2__
448
449#elif defined(MT6573PMU)
450
451 #define PMIC_6573_REG_API
452
453 #define __DRV_UPMU_BUCK_V1__
454 #define __MT6573PMU_E1_VSIM2_VOLSEL_ISSUE__
455 #define __DRV_UPMU_VPA_V1__
456
457 #define PMIC_FIXED_3_ADC_CH
458 #define PMIC_FIXED_CHR_EINT
459 #define PMIC_CHR_DETECT_NONE
460
461 #ifndef PMIC_PRESENT
462 #define PMIC_PRESENT
463 #endif // #ifndef PMIC_PRESENT
464
465#elif defined(MT6326)
466 #define PMIC_VSIM_SEL
467 #define PMIC_VSIM2_SEL
468 #define PMIC_AUDIO_AMP
469 #define PMIC_6326_CUSTOMIZATION
470 #define PMIC_6326_USB_FUNCTION
471 #define PMIC_VCAMD_SEL
472 #define PMIC_VCAMD_EN
473 #define PMIC_VCAMA_SEL
474 #define PMIC_VCAMA_EN
475
476 #define PMIC_CHR_USB_DET_EINT_EDGE_TRIGGER // CHR/USB detection is edge trigger
477
478 /* For internal use. */
479 #define PMIC_6326_REG_API
480 // PMIC support charge WDT functionality
481 // BMT driver will refer the compile option to enable/disable BMT level WDT
482 #define PMIC_CHARGE_WDT
483
484 #define PMIC_6326_CV_TRIM_CALIBRATION
485
486 #define PMIC_PMIC_SERIES
487 /* Charger/USB detect through USB PHY */
488 #define PMIC_CHR_USB_DETECT_THROUGH_USB
489
490 #ifndef PMIC_PRESENT
491 #define PMIC_PRESENT
492 #endif // #ifndef PMIC_PRESENT
493
494 #define __CHARGER_SOFT_START__
495
496#elif defined(MT6329)
497 #define PMIC_VSIM_SEL
498 #define PMIC_VSIM2_SEL
499 #define PMIC_AUDIO_AMP
500 #define PMIC_6329_CUSTOMIZATION
501 #define PMIC_6329_USB_FUNCTION
502 #define PMIC_VCAMD_SEL
503 #define PMIC_VCAMD_EN
504 #define PMIC_VCAMA_SEL
505 #define PMIC_VCAMA_EN
506
507 #define PMIC_CHR_USB_DET_EINT_EDGE_TRIGGER // CHR/USB detection is edge trigger
508
509 /* For internal use. */
510 #define PMIC_6329_REG_API
511 // PMIC support charge WDT functionality
512 // BMT driver will refer the compile option to enable/disable BMT level WDT
513 #define PMIC_CHARGE_WDT
514
515 #define PMIC_6329_CV_TRIM_CALIBRATION
516
517 #define PMIC_PMIC_SERIES
518 /* Charger/USB detect through USB PHY */
519 #define PMIC_CHR_USB_DETECT_THROUGH_USB
520
521 #ifndef PMIC_PRESENT
522 #define PMIC_PRESENT
523 #endif // #ifndef PMIC_PRESENT
524
525 #define __CHARGER_SOFT_START__
526
527#elif defined(MT6327)
528 #define PMIC_VSIM_SEL
529
530 /* For internal use. */
531 #define PMIC_6327_REG_API
532
533 #define PMIC_PMIC_SERIES
534
535 #define PMIC_CHR_DETECT_NONE
536
537 #ifndef PMIC_PRESENT
538 #define PMIC_PRESENT
539 #endif // #ifndef PMIC_PRESENT
540
541#else
542
543 #define PMIC_CHR_DETECT_NONE
544
545#endif
546
547#endif // #ifndef DCL_PMIC_FEATURES_H