blob: ab2353fcb4ac51a941d350c6813af3e7eee54920 [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) 2005
8*
9* BY OPENING THIS FILE, BUYER HEREBY UNEQUIVOCALLY ACKNOWLEDGES AND AGREES
10* THAT THE SOFTWARE/FIRMWARE AND ITS DOCUMENTATIONS ("MEDIATEK SOFTWARE")
11* RECEIVED FROM MEDIATEK AND/OR ITS REPRESENTATIVES ARE PROVIDED TO BUYER ON
12* AN "AS-IS" BASIS ONLY. MEDIATEK EXPRESSLY DISCLAIMS ANY AND ALL WARRANTIES,
13* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF
14* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR NONINFRINGEMENT.
15* NEITHER DOES MEDIATEK PROVIDE ANY WARRANTY WHATSOEVER WITH RESPECT TO THE
16* SOFTWARE OF ANY THIRD PARTY WHICH MAY BE USED BY, INCORPORATED IN, OR
17* SUPPLIED WITH THE MEDIATEK SOFTWARE, AND BUYER AGREES TO LOOK ONLY TO SUCH
18* THIRD PARTY FOR ANY WARRANTY CLAIM RELATING THERETO. MEDIATEK SHALL ALSO
19* NOT BE RESPONSIBLE FOR ANY MEDIATEK SOFTWARE RELEASES MADE TO BUYER'S
20* SPECIFICATION OR TO CONFORM TO A PARTICULAR STANDARD OR OPEN FORUM.
21*
22* BUYER'S SOLE AND EXCLUSIVE REMEDY AND MEDIATEK'S ENTIRE AND CUMULATIVE
23* LIABILITY WITH RESPECT TO THE MEDIATEK SOFTWARE RELEASED HEREUNDER WILL BE,
24* AT MEDIATEK'S OPTION, TO REVISE OR REPLACE THE MEDIATEK SOFTWARE AT ISSUE,
25* OR REFUND ANY SOFTWARE LICENSE FEES OR SERVICE CHARGE PAID BY BUYER TO
26* MEDIATEK FOR SUCH MEDIATEK SOFTWARE AT ISSUE.
27*
28* THE TRANSACTION CONTEMPLATED HEREUNDER SHALL BE CONSTRUED IN ACCORDANCE
29* WITH THE LAWS OF THE STATE OF CALIFORNIA, USA, EXCLUDING ITS CONFLICT OF
30* LAWS PRINCIPLES. ANY DISPUTES, CONTROVERSIES OR CLAIMS ARISING THEREOF AND
31* RELATED THERETO SHALL BE SETTLED BY ARBITRATION IN SAN FRANCISCO, CA, UNDER
32* THE RULES OF THE INTERNATIONAL CHAMBER OF COMMERCE (ICC).
33*
34*****************************************************************************/
35
36/*****************************************************************************
37 *
38 * Filename:
39 * ---------
40 * dcl_pmu6251_sw.h
41 *
42 * Project:
43 * --------
44 * Maui_Software
45 *
46 * Description:
47 * ------------
48 * This file is for PMU6251
49 *
50 * Author:
51 * -------
52 * -------
53 *
54 *============================================================================
55 * HISTORY
56 * Below this line, this part is controlled by PVCS VM. DO NOT MODIFY!!
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 *
107 *------------------------------------------------------------------------------
108 * Upper this line, this part is controlled by PVCS VM. DO NOT MODIFY!!
109 *============================================================================
110 ****************************************************************************/
111
112#ifndef __DCL_PMU6251_SW_H_STRUCT__
113#define __DCL_PMU6251_SW_H_STRUCT__
114
115#include "dcl_pmic_features.h"
116
117#if defined(PMIC_6251_REG_API)
118
119/* Charger external interrupt is fixed. */
120
121/* Charger external interrupt is fixed. */
122#define PMU_CHR_EINT_PIN 2
123
124
125/* adc number for measuring VBAT/VISENSE/VCHARGER is fixed internally. */
126
127#define PMU_ADC_VBAT_CH_NUM 0
128#define PMU_ADC_VISENSE_CH_NUM 1
129#define PMU_ADC_VCHARGER_CH_NUM 2
130#define PMU_ADC_VBATTEMP_CH_NUM 3
131
132
133/* adc factor for VBAT/VISENSE/VCHARGER */
134#define PMU_ADC_FACTOR_VBAT 150
135#define PMU_ADC_FACTOR_VISENSE 150
136#if defined(MT6251_S00)
137#define PMU_ADC_FACTOR_VCHARGER 344 // (351/51 * 50)
138#endif //#if defined(MT6251_S00)
139#if defined(MT6251_S01)
140#define PMU_ADC_FACTOR_VCHARGER 473 // (369/39 * 50)
141#endif //#if defined(MT6251_S01)
142#define PMU_ADC_FACTOR_VBATTEMP 100
143
144typedef enum
145{
146 LDO_BUCK_EN,
147 LDO_BUCK_VOL_SEL,
148 LDO_BUCK_OC_AUTO_OFF,
149 LDO_BUCK_STB_EN,
150 LDO_BUCK_ON_SEL,
151 LDO_BUCK_NDIS_EN,
152 LDO_BUCK_OCFB_EN,
153 LDO_CAL,
154 LDO_STB_TD,
155 LDO_OC_TD,
156 BUCK_VFBADJ_SLEEP,
157 BUCK_ICAL_EN,
158 BUCK_CSL,
159 BUCK_STB_TD,
160 BUCK_OC_THD,
161 BUCK_BURST,
162 SPK_EN,
163 SPK_PG_SLEW_I,
164 SPK_OC_EN,
165 SPK_AB_OC_EN,
166 SPK_CCODE,
167 SPK_OSC_ISEL,
168 SPK_NG_DT_DLY,
169 SPK_OCP_BIAS,
170 SPK_OCN_BIAS,
171 SPK_NG_SLEW_DLY,
172 SPK_PG_SLEW_DLY,
173 SPK_AB_OBIAS,
174 SPK_MODE,
175 SPK_VOL,
176 ISINK_EN,
177 ISINK_MODE,
178 ISINK_STEP,
179 ISINK_VREF_CAL,
180 BOOST_TYPE,
181 BOOST_HW_SEL,
182 KPLED_EN,
183 KPLED_MODE,
184 KPLED_SEL,
185 ADC_EN,
186 BATON_UNDET,
187 CSDAC_EN,
188 VBAT_CV_DET,
189 VBAT_CV_EN,
190 VBAT_CV_VTH,
191 CSDAC_DLY,
192 CSDAC_STP,
193 CHR_EN,
194 CHRDET,
195 CHRWDT_TD,
196 CS_VTH,
197 CHRWDT_EN,
198 CHRWDT_INT_EN,
199 VCDT_HV_VTH,
200 BATON_HT_EN,
201 OTG_BVALID_EN,
202 USBDL_EN,
203 CCI_SRCLKEN,
204 VCDT_HV_EN,
205 BOOST_CKS_PRG,
206 BC11_VREF_VTH,
207 BC11_CMP_EN,
208 BC11_IPD_EN,
209 BC11_IPU_EN,
210 BC11_BIAS_EN,
211 BC11_BB_CTRL,
212 BC11_RST,
213 BC11_VSRC_EN,
214 BC11_CMP_OUT,
215 PMU_FLAGS_MAX
216}PMU_FLAGS_LIST_ENUM;
217
218
219
220#define LDO_GROUP (OFFSEL(BUCK_GROUP))
221#define BUCK_GROUP (M(VCORE))
222
223#endif //#if defined(PMIC_6251_REG_API)
224
225#endif //#ifndef __DCL_PMU6251_SW_H_STRUCT__
226