rjw | 6c1fd8f | 2022-11-30 14:33:01 +0800 | [diff] [blame] | 1 | /***************************************************************************** |
| 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_pmu6326_hw.h |
| 41 | * |
| 42 | * Project: |
| 43 | * -------- |
| 44 | * Maui_Software |
| 45 | * |
| 46 | * Description: |
| 47 | * ------------ |
| 48 | * This file is for PMIC6326 |
| 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 | * |
| 71 | *------------------------------------------------------------------------------ |
| 72 | * Upper this line, this part is controlled by PVCS VM. DO NOT MODIFY!! |
| 73 | *============================================================================ |
| 74 | ****************************************************************************/ |
| 75 | |
| 76 | |
| 77 | #ifndef __DCL_PMIC6326_HW_H_STRUCT__ |
| 78 | #define __DCL_PMIC6326_HW_H_STRUCT__ |
| 79 | |
| 80 | |
| 81 | #include "dcl_pmic_features.h" |
| 82 | |
| 83 | #if defined(PMIC_6326_REG_API) |
| 84 | |
| 85 | |
| 86 | #define BIT00 0x00000001 |
| 87 | #define BIT01 0x00000002 |
| 88 | #define BIT02 0x00000004 |
| 89 | #define BIT03 0x00000008 |
| 90 | |
| 91 | #define BIT04 0x00000010 |
| 92 | #define BIT05 0x00000020 |
| 93 | #define BIT06 0x00000040 |
| 94 | #define BIT07 0x00000080 |
| 95 | |
| 96 | #define BIT08 0x00000100 |
| 97 | #define BIT09 0x00000200 |
| 98 | #define BIT10 0x00000400 |
| 99 | #define BIT11 0x00000800 |
| 100 | |
| 101 | #define BIT12 0x00001000 |
| 102 | #define BIT13 0x00002000 |
| 103 | #define BIT14 0x00004000 |
| 104 | #define BIT15 0x00008000 |
| 105 | |
| 106 | #define BIT16 0x00010000 |
| 107 | #define BIT17 0x00020000 |
| 108 | #define BIT18 0x00040000 |
| 109 | #define BIT19 0x00080000 |
| 110 | |
| 111 | #define BIT20 0x00100000 |
| 112 | #define BIT21 0x00200000 |
| 113 | #define BIT22 0x00400000 |
| 114 | #define BIT23 0x00800000 |
| 115 | |
| 116 | #define BIT24 0x01000000 |
| 117 | #define BIT25 0x02000000 |
| 118 | #define BIT26 0x04000000 |
| 119 | #define BIT27 0x08000000 |
| 120 | |
| 121 | #define BIT28 0x10000000 |
| 122 | #define BIT29 0x20000000 |
| 123 | #define BIT30 0x40000000 |
| 124 | #define BIT31 0x80000000 |
| 125 | |
| 126 | |
| 127 | #define PMIC6326_E1_CID_CODE 0x0000 |
| 128 | #define PMIC6326_E2_CID_CODE 0x0009 |
| 129 | #define PMIC6326_E3_CID_CODE 0x000A |
| 130 | #define PMIC6326_E4_CID_CODE 0x000B |
| 131 | |
| 132 | #define CID_1_REG_INDEX 0x0 |
| 133 | #define CID_2_REG_INDEX 0x1 |
| 134 | |
| 135 | #define EFUSE_BUFF_4_REG_INDEX 0x12 |
| 136 | |
| 137 | #define PMIC_MAX_REG_IDX 0x96 |
| 138 | #define PMIC_REG_NUM 0x97 // ###***** PMIC_REG_NUM must equal (PMIC_MAX_REG_IDX + 1) |
| 139 | |
| 140 | |
| 141 | // (0x09) STATUS 6 (RO) |
| 142 | #define BOOST2_OC_STATUS_MASK 0x1 |
| 143 | #define BOOST2_OC_STATUS_SHIFT 0x0 |
| 144 | #define SPKR_OC_DET_MASK 0x1 |
| 145 | #define SPKR_OC_DET_SHIFT 0x1 |
| 146 | #define SPKL_OC_DET_MASK 0x1 |
| 147 | #define SPKL_OC_DET_SHIFT 0x2 |
| 148 | #define PWRKEY_DEB_MASK 0x1 |
| 149 | #define PWRKEY_DEB_SHIFT 0x3 |
| 150 | #define OVP_MASK 0x1 |
| 151 | #define OVP_SHIFT 0x4 |
| 152 | #define CHRDET_MASK 0x1 |
| 153 | #define CHRDET_SHIFT 0x5 |
| 154 | #define BAT_ON_MASK 0x1 |
| 155 | #define BAT_ON_SHIFT 0x6 |
| 156 | #define CV_MASK 0x1 |
| 157 | #define CV_SHIFT 0x7 |
| 158 | |
| 159 | // (0x0D) INT STATUS 3 (RO) |
| 160 | #define VSDIO_OC_FLAG_STATUS_MASK 0x1 |
| 161 | #define VSDIO_OC_FLAG_STATUS_SHIFT 0x0 |
| 162 | #define VGP_OC_FLAG_STATUS_MASK 0x1 |
| 163 | #define VGP_OC_FLAG_STATUS_SHIFT 0x1 |
| 164 | #define VUSB_OC_FLAG_STATUS_MASK 0x1 |
| 165 | #define VUSB_OC_FLAG_STATUS_SHIFT 0x2 |
| 166 | #define OVP_INT_FLAG_STATUS_MASK 0x1 |
| 167 | #define OVP_INT_FLAG_STATUS_SHIFT 0x3 |
| 168 | #define CHRDET_INT_FLAG_STATUS_MASK 0x1 |
| 169 | #define CHRDET_INT_FLAG_STATUS_SHIFT 0x4 |
| 170 | |
| 171 | // (0x0E) INT STATUS 4 (RO) |
| 172 | #define WATCHDOG_INT_FLAG_STATUS_MASK 0x1 |
| 173 | #define WATCHDOG_INT_FLAG_STATUS_SHIFT 0x0 |
| 174 | |
| 175 | // (0x1A) LDO CTRL 1 VGP2 |
| 176 | #define VGP2_EN_MASK 0x1 |
| 177 | #define VGP2_EN_SHIFT 0x2 |
| 178 | // (0x1B) LDO CTRL 2 VRF |
| 179 | #define VRF_ICAL_EN_MASK 0x3 |
| 180 | #define VRF_ICAL_EN_SHIFT 0x0 |
| 181 | #define VRF_OC_AUTO_OFF_MASK 0x1 |
| 182 | #define VRF_OC_AUTO_OFF_SHIFT 0x1 |
| 183 | #define VRF_EN_MASK 0x1 |
| 184 | #define VRF_EN_SHIFT 0x3 |
| 185 | #define VRF_CAL_MASK 0xF |
| 186 | #define VRF_CAL_SHIFT 0x4 |
| 187 | |
| 188 | // (0x1C) LDO CTRL 3 VRF |
| 189 | #define VRF_CALST_MASK 0x3 |
| 190 | #define VRF_CALST_SHIFT 0x0 |
| 191 | #define VRF_CALOC_MASK 0x3 |
| 192 | #define VRF_CALOC_SHIFT 0x2 |
| 193 | #define VRF_ON_SEL_MASK 0x1 |
| 194 | #define VRF_ON_SEL_SHIFT 0x4 |
| 195 | #define VRF_EN_FORCE_MASK 0x1 |
| 196 | #define VRF_EN_FORCE_SHIFT 0x5 |
| 197 | #define VRF_PLNMOS_DIS_MASK 0x1 |
| 198 | #define VRF_PLNMOS_DIS_SHIFT 0x6 |
| 199 | #define VRF_CM_MASK 0x1 |
| 200 | #define VRF_CM_SHIFT 0x7 |
| 201 | // (0x1E) LDO CTRL 5 VTCXO |
| 202 | #define VTCXO_ICAL_EN_MASK 0x3 |
| 203 | #define VTCXO_ICAL_EN_SHIFT 0x0 |
| 204 | #define VTCXO_OC_AUTO_OFF_MASK 0x1 |
| 205 | #define VTCXO_OC_AUTO_OFF_SHIFT 0x2 |
| 206 | #define VTCXO_EN_MASK 0x1 |
| 207 | #define VTCXO_EN_SHIFT 0x3 |
| 208 | #define VTCXO_CAL_MASK 0xF |
| 209 | #define VTCXO_CAL_SHIFT 0x4 |
| 210 | // (0x1F) LDO CTRL 6 VTCXO |
| 211 | #define VTCXO_CALST_MASK 0x3 |
| 212 | #define VTCXO_CALST_SHIFT 0x0 |
| 213 | #define VTCXO_CALOC_MASK 0x3 |
| 214 | #define VTCXO_CALOC_SHIFT 0x2 |
| 215 | #define VTCXO_ON_SEL_MASK 0x1 |
| 216 | #define VTCXO_ON_SEL_SHIFT 0x4 |
| 217 | #define VTCXO_EN_FORCE_MASK 0x1 |
| 218 | #define VTCXO_EN_FORCE_SHIFT 0x5 |
| 219 | #define VTCXO_PLNMOS_DIS_MASK 0x1 |
| 220 | #define VTCXO_PLNMOS_DIS_SHIFT 0x6 |
| 221 | #define VTCXO_CM_MASK 0x1 |
| 222 | #define VTCXO_CM_SHIFT 0x7 |
| 223 | // (0x21) LDO CTRL 8 V3GTX |
| 224 | #define V3GTX_SEL_MASK 0x3 |
| 225 | #define V3GTX_SEL_SHIFT 0x0 |
| 226 | #define V3GTX_ICAL_EN_MASK 0x3 |
| 227 | #define V3GTX_ICAL_EN_SHIFT 0x2 |
| 228 | #define V3GTX_CAL_MASK 0xF |
| 229 | #define V3GTX_CAL_SHIFT 0x4 |
| 230 | // (0x22) LDO CTRL 9 V3GTX |
| 231 | #define V3GTX_CALST_MASK 0x3 |
| 232 | #define V3GTX_CALST_SHIFT 0x0 |
| 233 | #define V3GTX_CALOC_MASK 0x3 |
| 234 | #define V3GTX_CALOC_SHIFT 0x2 |
| 235 | #define V3GTX_OC_AUTO_OFF_MASK 0x1 |
| 236 | #define V3GTX_OC_AUTO_OFF_SHIFT 0x4 |
| 237 | #define V3GTX_EN_MASK 0x1 |
| 238 | #define V3GTX_EN_SHIFT 0x5 |
| 239 | #define V3GTX_ON_SEL_MASK 0x1 |
| 240 | #define V3GTX_ON_SEL_SHIFT 0x6 |
| 241 | #define V3GTX_EN_FORCE_MASK 0x1 |
| 242 | #define V3GTX_EN_FORCE_SHIFT 0x7 |
| 243 | |
| 244 | // (0X23) LDO CTRL 10 V3GTX |
| 245 | #define V3GTX_PLNMOS_DIS_MASK 0x1 |
| 246 | #define V3GTX_PLNMOS_DIS_SHIFT 0x0 |
| 247 | |
| 248 | // (0x24) LDO CTRL 11 V3GRX |
| 249 | #define V3GRX_SEL_MASK 0x3 |
| 250 | #define V3GRX_SEL_SHIFT 0x0 |
| 251 | #define V3GRX_ICAL_EN_MASK 0x3 |
| 252 | #define V3GRX_ICAL_EN_SHIFT 0x2 |
| 253 | #define V3GRX_CAL_MASK 0xf |
| 254 | #define V3GRX_CAL_SHIFT 0x4 |
| 255 | // (0x25) LDO CTRL 12 V3GRX |
| 256 | #define V3GRX_CALST_MASK 0x3 |
| 257 | #define V3GRX_CALST_SHIFT 0x0 |
| 258 | #define V3GRX_CALOC_MASK 0x3 |
| 259 | #define V3GRX_CALOC_SHIFT 0x2 |
| 260 | #define V3GRX_OC_AUTO_OFF_MASK 0x1 |
| 261 | #define V3GRX_OC_AUTO_OFF_SHIFT 0x4 |
| 262 | #define V3GRX_EN_MASK 0x1 |
| 263 | #define V3GRX_EN_SHIFT 0x5 |
| 264 | #define V3GRX_ON_SEL_MASK 0x1 |
| 265 | #define V3GRX_ON_SEL_SHIFT 0x6 |
| 266 | #define V3GRX_EN_FORCE_MASK 0x1 |
| 267 | #define V3GRX_EN_FORCE_SHIFT 0x7 |
| 268 | |
| 269 | // (0X26) LDO CTRL 10 V3GRX |
| 270 | #define V3GRX_PLNMOS_DIS_MASK 0x1 |
| 271 | #define V3GRX_PLNMOS_DIS_SHIFT 0x0 |
| 272 | |
| 273 | |
| 274 | // (0x2E) LDO CTRL 21 VCAMA |
| 275 | #define VCAMA_SEL_MASK 0x3 |
| 276 | #define VCAMA_SEL_SHIFT 0x0 |
| 277 | #define VCAMA_ICAL_EN_MASK 0x3 |
| 278 | #define VCAMA_ICAL_EN_SHIFT 0x2 |
| 279 | #define VCAMA_CAL_MASK 0xf |
| 280 | #define VCAMA_CAL_SHIFT 0x4 |
| 281 | // (0x2F) LDO CTRL 22 VCAMA |
| 282 | #define VCAMA_CALST_MASK 0x3 |
| 283 | #define VCAMA_CALST_SHIFT 0x0 |
| 284 | #define VCAMA_CALOC_MASK 0x3 |
| 285 | #define VCAMA_CALOC_SHIFT 0x2 |
| 286 | #define VCAMA_EN_MASK 0x1 |
| 287 | #define VCAMA_EN_SHIFT 0x4 |
| 288 | #define VCAMA_EN_FORCE_MASK 0x1 |
| 289 | #define VCAMA_EN_FORCE_SHIFT 0x5 |
| 290 | #define VCAMA_PLNMOS_DIS_MASK 0x1 |
| 291 | #define VCAMA_PLNMOS_DIS_SHIFT 0x6 |
| 292 | #define VCAMA_CM_MASK 0x1 |
| 293 | #define VCAMA_CM_SHIFT 0x7 |
| 294 | |
| 295 | // (0x31) LDO CTRL 24 VWIFI3V3 |
| 296 | #define VWIFI3V3_SEL_MASK 0x3 |
| 297 | #define VWIFI3V3_SEL_SHIFT 0x0 |
| 298 | #define VWIFI3V3_ICAL_EN_MASK 0x3 |
| 299 | #define VWIFI3V3_ICAL_EN_SHIFT 0x2 |
| 300 | #define VWIFI3V3_CAL_MASK 0xf |
| 301 | #define VWIFI3V3_CAL_SHIFT 0x4 |
| 302 | // (0x32) LDO CTRL 25 VWIFI3V3 |
| 303 | #define VWIFI3V3_CALST_MASK 0x3 |
| 304 | #define VWIFI3V3_CALST_SHIFT 0x0 |
| 305 | #define VWIFI3V3_CALOC_MASK 0x3 |
| 306 | #define VWIFI3V3_CALOC_SHIFT 0x2 |
| 307 | #define VWIFI3V3_EN_MASK 0x1 |
| 308 | #define VWIFI3V3_EN_SHIFT 0x4 |
| 309 | #define VWIFI3V3_EN_FORCE_MASK 0x1 |
| 310 | #define VWIFI3V3_EN_FORCE_SHIFT 0x5 |
| 311 | #define VWIFI3V3_PLNMOS_DIS_MASK 0x1 |
| 312 | #define VWIFI3V3_PLNMOS_DIS_SHIFT 0x6 |
| 313 | #define VWIFI3V3_CM_MASK 0x1 |
| 314 | #define VWIFI3V3_CM_SHIFT 0x7 |
| 315 | |
| 316 | // (0x34) LDO CTRL 27 VWIFI2V8 |
| 317 | #define VWIFI2V8_SEL_MASK 0x3 |
| 318 | #define VWIFI2V8_SEL_SHIFT 0x0 |
| 319 | #define VWIFI2V8_ICAL_EN_MASK 0x3 |
| 320 | #define VWIFI2V8_ICAL_EN_SHIFT 0x2 |
| 321 | #define VWIFI2V8_CAL_MASK 0xf |
| 322 | #define VWIFI2V8_CAL_SHIFT 0x4 |
| 323 | |
| 324 | // (0x35) LDO CTRL 28 VWIFI2V8 |
| 325 | #define VWIFI2V8_CALST_MASK 0x3 |
| 326 | #define VWIFI2V8_CALST_SHIFT 0x0 |
| 327 | #define VWIFI2V8_CALOC_MASK 0x3 |
| 328 | #define VWIFI2V8_CALOC_SHIFT 0x2 |
| 329 | #define VWIFI2V8_EN_MASK 0x1 |
| 330 | #define VWIFI2V8_EN_SHIFT 0x4 |
| 331 | #define VWIFI2V8_EN_FORCE_MASK 0x1 |
| 332 | #define VWIFI2V8_EN_FORCE_SHIFT 0x5 |
| 333 | #define VWIFI2V8_PLNMOS_DIS_MASK 0x1 |
| 334 | #define VWIFI2V8_PLNMOS_DIS_SHIFT 0x6 |
| 335 | #define VWIFI2V8_CM_MASK 0x1 |
| 336 | #define VWIFI2V8_CM_SHIFT 0x7 |
| 337 | |
| 338 | |
| 339 | // (0x37) LDO CTRL 30 VSIM |
| 340 | #define VSIM_SEL_MASK 0x7 |
| 341 | #define VSIM_SEL_SHIFT 0x0 |
| 342 | #define VSIM_EN_MASK 0x1 |
| 343 | #define VSIM_EN_SHIFT 0x3 |
| 344 | #define VSIM_ICAL_EN_MASK 0x3 |
| 345 | #define VSIM_ICAL_EN_SHIFT 0x4 |
| 346 | #define VSIM_EN_FORCE_MASK 0x1 |
| 347 | #define VSIM_EN_FORCE_SHIFT 0x6 |
| 348 | #define VSIM_PLNMOS_DIS_MASK 0x1 |
| 349 | #define VSIM_PLNMOS_DIS_SHIFT 0x7 |
| 350 | |
| 351 | // (0x38) LDO CTRL 31 VSIM |
| 352 | #define VSIM_CAL_MASK 0xf |
| 353 | #define VSIM_CAL_SHIFT 0x0 |
| 354 | |
| 355 | // (0x3A) LDO CTRL 33 VUSB (From E3, USB LDO controls are moved to 0x3D ~ 0x3F) |
| 356 | |
| 357 | // From E3, VGP2 OCFB enable control is at 0x3D |
| 358 | #define VGP2_OCFB_EN_MASK 0x1 |
| 359 | #define VGP2_OCFB_EN_SHIFT 0x0 |
| 360 | |
| 361 | #define VUSB_SEL_MASK 0x7 |
| 362 | #define VUSB_SEL_SHIFT 0x0 |
| 363 | #define VUSB_EN_MASK 0x1 |
| 364 | #define VUSB_EN_SHIFT 0x3 |
| 365 | #define VUSB_ICAL_EN_MASK 0x3 |
| 366 | #define VUSB_ICAL_EN_SHIFT 0x4 |
| 367 | #define VUSB_EN_FORCE_MASK 0x1 |
| 368 | #define VUSB_EN_FORCE_SHIFT 0x6 |
| 369 | #define VUSB_PLNMOS_DIS_MASK 0x1 |
| 370 | #define VUSB_PLNMOS_DIS_SHIFT 0x7 |
| 371 | |
| 372 | // (0x3B) LDO CTRL 34 VUSB (From E3, USB LDO controls are moved to 0x3D ~ 0x3F) |
| 373 | #define VUSB_CAL_MASK 0xf |
| 374 | #define VUSB_CAL_SHIFT 0x0 |
| 375 | #define VUSB_CALST_MASK 0x3 |
| 376 | #define VUSB_CALST_SHIFT 0x4 |
| 377 | #define VUSB_CALOC_MASK 0x3 |
| 378 | #define VUSB_CALOC_SHIFT 0x6 |
| 379 | |
| 380 | // (0x3D) LDO CTRL 36 VBT (From E3, BT LDO controls are moved to 0x3A ~ 0x3C) |
| 381 | #define VBT_SEL_MASK 0x7 |
| 382 | #define VBT_SEL_SHIFT 0x0 |
| 383 | #define VBT_EN_MASK 0x1 |
| 384 | #define VBT_EN_SHIFT 0x3 |
| 385 | #define VBT_ICAL_EN_MASK 0x3 |
| 386 | #define VBT_ICAL_EN_SHIFT 0x4 |
| 387 | #define VBT_EN_FORCE_MASK 0x1 |
| 388 | #define VBT_EN_FORCE_SHIFT 0x6 |
| 389 | #define VBT_PLNMOS_DIS_MASK 0x1 |
| 390 | #define VBT_PLNMOS_DIS_SHIFT 0x7 |
| 391 | |
| 392 | // (0x3E) LDO CTRL 37 VBT (From E3, BT LDO controls are moved to 0x3A ~ 0x3C) |
| 393 | #define VBT_CAL_MASK 0xf |
| 394 | #define VBT_CAL_SHIFT 0x0 |
| 395 | #define VBT_CALST_MASK 0x3 |
| 396 | #define VBT_CALST_SHIFT 0x4 |
| 397 | #define VBT_CALOC_MASK 0x3 |
| 398 | #define VBT_CALOC_SHIFT 0x6 |
| 399 | |
| 400 | // (0x40) LDO CTRL 39 VCAMD |
| 401 | #define VCAMD_SEL_MASK 0x7 |
| 402 | #define VCAMD_SEL_SHIFT 0x0 |
| 403 | #define VCAMD_EN_MASK 0x1 |
| 404 | #define VCAMD_EN_SHIFT 0x3 |
| 405 | #define VCAMD_ICAL_EN_MASK 0x3 |
| 406 | #define VCAMD_ICAL_EN_SHIFT 0x4 |
| 407 | #define VCAMD_EN_FORCE_MASK 0x1 |
| 408 | #define VCAMD_EN_FORCE_SHIFT 0x6 |
| 409 | #define VCAMD_PLNMOS_DIS_MASK 0x1 |
| 410 | #define VCAMD_PLNMOS_DIS_SHIFT 0x7 |
| 411 | |
| 412 | // (0x41) LDO CTRL 40 VCAMD |
| 413 | #define VCAMD_CAL_MASK 0xf |
| 414 | #define VCAMD_CAL_SHIFT 0x0 |
| 415 | #define VCAMD_CALST_MASK 0x3 |
| 416 | #define VCAMD_CALST_SHIFT 0x4 |
| 417 | #define VCAMD_CALOC_MASK 0x3 |
| 418 | #define VCAMD_CALOC_SHIFT 0x6 |
| 419 | |
| 420 | // (0x43) LDO CTRL 42 VGP |
| 421 | #define VGP_SEL_MASK 0x7 |
| 422 | #define VGP_SEL_SHIFT 0x0 |
| 423 | #define VGP_EN_MASK 0x1 |
| 424 | #define VGP_EN_SHIFT 0x3 |
| 425 | #define VGP_PLNMOS_DIS_MASK 0x1 |
| 426 | #define VGP_PLNMOS_DIS_SHIFT 0x7 |
| 427 | |
| 428 | // (0x44) LDO CTRL 43 VGP |
| 429 | #define VGP_CAL_MASK 0xf |
| 430 | #define VGP_CAL_SHIFT 0x0 |
| 431 | |
| 432 | // (0x46) LDO CTRL 45 VSDIO |
| 433 | #define VSDIO_ICAL_EN_MASK 0x3 |
| 434 | #define VSDIO_ICAL_EN_SHIFT 0x0 |
| 435 | #define VSDIO_EN_MASK 0x1 |
| 436 | #define VSDIO_EN_SHIFT 0x2 |
| 437 | #define VSDIO_EN_FORCE_MASK 0x1 |
| 438 | #define VSDIO_EN_FORCE_SHIFT 0x3 |
| 439 | #define VSDIO_CAL_MASK 0xf |
| 440 | #define VSDIO_CAL_SHIFT 0x4 |
| 441 | |
| 442 | // (0x47) LDO CTRL 46 VSDIO |
| 443 | #define VSDIO_CALST_MASK 0x3 |
| 444 | #define VSDIO_CALST_SHIFT 0x0 |
| 445 | #define VSDIO_CALOC_MASK 0x3 |
| 446 | #define VSDIO_CALOC_SHIFT 0x2 |
| 447 | #define VSDIO_PLNMOS_DIS_MASK 0x1 |
| 448 | #define VSDIO_PLNMOS_DIS_SHIFT 0x4 |
| 449 | #define VSDIO_SEL_MASK 0x1 |
| 450 | #define VSDIO_SEL_SHIFT 0x5 |
| 451 | #define VSDIO_CM_MASK 0x1 |
| 452 | #define VSDIO_CM_SHIFT 0x6 |
| 453 | |
| 454 | // (0x48) LDO CTRL 47 VSDIO |
| 455 | #define VCORE1_DVFS_STEP_INC_MASK 0x1f |
| 456 | #define VCORE1_DVFS_STEP_INC_SHIFT 0x3 |
| 457 | |
| 458 | // (0x49) BULK CTRL 1 VGP2 (SEL L) |
| 459 | #define VGP2_SELL_MASK 0x3 |
| 460 | #define VGP2_SELL_SHIFT 0x4 |
| 461 | |
| 462 | // (0x4B) BULK CTRL 3 VGP2 (SEL H) |
| 463 | #define VGP2_SELH_MASK 0x1 |
| 464 | #define VGP2_SELH_SHIFT 0x4 |
| 465 | |
| 466 | // (0x4E) BUCK CTRL 6 VCORE1 |
| 467 | #define VCORE1_DVFS_0_ECO3_MASK 0xf |
| 468 | #define VCORE1_DVFS_0_ECO3_SHIFT 0x4 |
| 469 | |
| 470 | // (0x4F) BUCK CTRL 7 VCORE1 |
| 471 | #define VCORE1_SLEEP_0_ECO3_MASK 0x1 |
| 472 | #define VCORE1_SLEEP_0_ECO3_SHIFT 0x3 |
| 473 | #define VCORE1_DVFS_RAMP_EN_MASK 0x1 |
| 474 | #define VCORE1_DVFS_RAMP_EN_SHIFT 0x6 |
| 475 | #define VCORE1_DVFS_TARGET_UPDATE_MASK 0x1 |
| 476 | #define VCORE1_DVFS_TARGET_UPDATE_SHIFT 0x7 |
| 477 | |
| 478 | // (0x51) BUCK CTRL 9 VCORE2 |
| 479 | #define VCORE2_DVFS_0_ECO3_MASK 0x4 |
| 480 | #define VCORE2_DVFS_0_ECO3_SHIFT 0xF |
| 481 | |
| 482 | // (0x52) BUCK CTRL 10 VCORE2 |
| 483 | #define VCORE2_EN_MASK 0x1 |
| 484 | #define VCORE2_EN_SHIFT 0x7 |
| 485 | #define VCORE2_SLEEP_0_ECO3_MASK 0x1 |
| 486 | #define VCORE2_SLEEP_0_ECO3_SHIFT 0x3 |
| 487 | |
| 488 | |
| 489 | |
| 490 | // (0x53) BUCK CTRL 11 VCORE2 |
| 491 | #define VCORE2_ON_SEL_MASK 0x1 |
| 492 | #define VCORE2_ON_SEL_SHIFT 0x3 |
| 493 | |
| 494 | // (0x54) |
| 495 | #define VCORE2_PLNMOS_DIS_MASK 0x1 |
| 496 | #define VCORE2_PLNMOS_DIS_SHIFT 0x0 |
| 497 | |
| 498 | |
| 499 | // (0x57) BUCK CTRL 15 VMEM |
| 500 | #define VCORE1_SLEEP_1_ECO3_MASK 0x1 |
| 501 | #define VCORE1_SLEEP_1_ECO3_SHIFT 0x0 |
| 502 | #define VCORE1_DVFS_1_ECO3_MASK 0xf |
| 503 | #define VCORE1_DVFS_1_ECO3_SHIFT 0x4 |
| 504 | |
| 505 | // (0x58) BULK CTRL 16 VPA |
| 506 | #define VPA_TUNEH_MASK 0x1F |
| 507 | #define VPA_TUNEH_SHIFT 0x0 |
| 508 | #define VPA_EN_FORCE_MASK 0x1 |
| 509 | #define VPA_EN_FORCE_SHIFT 0x5 |
| 510 | #define VPA_PLNMOS_DIS_MASK 0x1 |
| 511 | #define VPA_PLNMOS_DIS_SHIFT 0x6 |
| 512 | #define VPA_EN_MASK 0x1 |
| 513 | #define VPA_EN_SHIFT 0x7 |
| 514 | |
| 515 | // (0x59) BULK CTRL 17 VPA |
| 516 | #define VPA_TUNEL_MASK 0x1F |
| 517 | #define VPA_TUNEL_SHIFT 0x0 |
| 518 | |
| 519 | // (0x5A) BUCK CTRL 18 VPA |
| 520 | #define VPA_OC_TH_MASK 0x7 |
| 521 | #define VPA_OC_TH_SHIFT 0x0 |
| 522 | |
| 523 | |
| 524 | #define VPA_BAT_LOW_MASK 0x1 |
| 525 | #define VPA_BAT_LOW_SHIFT 0x3 |
| 526 | |
| 527 | // (0x5C) BOOST CTRL 1 BOOST1 |
| 528 | #define VBOOST1_TUNE_MASK 0xF |
| 529 | #define VBOOST1_TUNE_SHIFT 0x0 |
| 530 | #define VBOOST1_TATT_MASK 0xF |
| 531 | #define VBOOST1_TATT_SHIFT 0x4 |
| 532 | |
| 533 | // (0x5D) BOOST CTRL 2 BOOST1 |
| 534 | #define BOOST1_OC_TH_MASK 0x7 |
| 535 | #define BOOST1_OC_TH_SHIFT 0x0 |
| 536 | #define BOOST1_EN_MASK 0x1 |
| 537 | #define BOOST1_EN_SHIFT 0x3 |
| 538 | #define BOOST1_PRE_SR_CON_MASK 0x7 |
| 539 | #define BOOST1_PRE_SR_CON_SHIFT 0x4 |
| 540 | #define BOOST1_SOFT_ST_SPEED_MASK 0x1 |
| 541 | #define BOOST1_SOFT_ST_SPEED_SHIFT 0x7 |
| 542 | |
| 543 | // (0x5E) BOOST CTRL 3 BOOST1 |
| 544 | #define BOOST1_DIO_SR_CON_MASK 0x7 |
| 545 | #define BOOST1_DIO_SR_CON_SHIFT 0x0 |
| 546 | #define BOOST1_SYNC_EN_MASK 0x1 |
| 547 | #define BOOST1_SYNC_EN_SHIFT 0x3 |
| 548 | // #### D4 is used as VGP2_SEL[2] |
| 549 | |
| 550 | // (0x5F) BOOST CTRL 4 BOOST2 |
| 551 | #define BOOST2_TUNE_MASK 0xF |
| 552 | #define BOOST2_TUNE_SHIFT 0x0 |
| 553 | #define BOOST2_OC_TH_MASK 0x3 |
| 554 | #define BOOST2_OC_TH_SHIFT 0x4 |
| 555 | #define BOOST2_DIM_SOURCE_MASK 0x1 |
| 556 | #define BOOST2_DIM_SOURCE_SHIFT 0x6 |
| 557 | |
| 558 | // (0x60) BOOST CTRL 5 BOOST2 |
| 559 | #define BOOST2_PRE_SR_CON_MASK 0x7 |
| 560 | #define BOOST2_PRE_SR_CON_SHIFT 0x0 |
| 561 | #define BOOST2_EN_MASK 0x1 |
| 562 | #define BOOST2_EN_SHIFT 0x4 |
| 563 | |
| 564 | // (0x61) BOOST CTRL 6 BOOST2 and BOOST |
| 565 | #define BOOST_MODE_MASK 0x3 |
| 566 | #define BOOST_MODE_SHIFT 0x4 |
| 567 | |
| 568 | // (0x63) DRIVER CTRL 2 |
| 569 | #define VBUS_EN_MASK 0x1 |
| 570 | #define VBUS_EN_SHIFT 0x0 |
| 571 | |
| 572 | |
| 573 | // (0x64) DRIVER CTRL 3 GEN |
| 574 | #define IGEN_DRV_ISEL_MASK 0x3 |
| 575 | #define IGEN_DRV_ISEL_SHIFT 0x0 |
| 576 | #define IGEN_DRV_FORCE_MASK 0x4 |
| 577 | #define IGEN_DRV_FORCE_SHIFT 0x2 |
| 578 | #define VGEN_DRV_BGSEL_MASK 0x7 |
| 579 | #define VGEN_DRV_BGSEL_SHIFT 0x4 |
| 580 | |
| 581 | // (0x65) DRIVER CTRL 4 FLASH |
| 582 | #define FLASH_I_TUNE_MASK 0xf |
| 583 | #define FLASH_I_TUNE_SHIFT 0x0 |
| 584 | #define FLASH_DIM_DIV_MASK 0xf |
| 585 | #define FLASH_DIM_DIV_SHIFT 0x4 |
| 586 | |
| 587 | // (0x66) DRIVER CTRL 5 FLASH |
| 588 | #define FLASH_DIM_DUTY_MASK 0x1F |
| 589 | #define FLASH_DIM_DUTY_SHIFT 0x0 |
| 590 | #define FLASH_EN_MASK 0x1 |
| 591 | #define FLASH_EN_SHIFT 0x5 |
| 592 | #define FLASH_BYPASS_MASK 0x1 |
| 593 | #define FLASH_BYPASS_SHIFT 0x6 |
| 594 | |
| 595 | // (0x67) DRIVER CTRL 6 BL |
| 596 | #define BL_DIM_DUTY_MASK 0x1F |
| 597 | #define BL_DIM_DUTY_SHIFT 0x0 |
| 598 | #define BL_EN_MASK 0x1 |
| 599 | #define BL_EN_SHIFT 0x5 |
| 600 | #define BL_I_CAL_EN_MASK 0x1 |
| 601 | #define BL_I_CAL_EN_SHIFT 0x6 |
| 602 | #define BL_BYPASS_MASK 0x1 |
| 603 | #define BL_BYPASS_SHIFT 0x7 |
| 604 | |
| 605 | // (0x68) DRIVER CTRL 7 BL |
| 606 | #define BL_I_CORSE_TUNE_MASK 0x7 |
| 607 | #define BL_I_CORSE_TUNE_SHIFT 0x0 |
| 608 | #define BL_I_FINE_TUNE_MASK 0x7 |
| 609 | #define BL_I_FINE_TUNE_SHIFT 0x4 |
| 610 | |
| 611 | // (0x6D) DRIVER CTRL 12 BL |
| 612 | #define BL_DIM_DIV_MASK 0xF |
| 613 | #define BL_DIM_DIV_SHIFT 0x0 |
| 614 | #define BL_NUMBER_MASK 0x7 |
| 615 | #define BL_NUMBER_SHIFT 0x4 |
| 616 | |
| 617 | // (0x6E) DRIVER CTRL 13 KP |
| 618 | #define KP_DIM_DIV_MASK 0xF |
| 619 | #define KP_DIM_DIV_SHIFT 0x0 |
| 620 | #define KP_EN_MASK 0x1 |
| 621 | #define KP_EN_SHIFT 0x4 |
| 622 | |
| 623 | // (0x6F) DRIVER CTRL 14 KP |
| 624 | #define KP_DIM_DUTY_MASK 0x1F |
| 625 | #define KP_DIM_DUTY_SHIFT 0x0 |
| 626 | |
| 627 | // (0x70) DRIVER CTRL 15 VIBR |
| 628 | #define VIBR_DIM_DIV_MASK 0xF |
| 629 | #define VIBR_DIM_DIV_SHIFT 0x0 |
| 630 | #define VIBR_EN_MASK 0x1 |
| 631 | #define VIBR_EN_SHIFT 0x4 |
| 632 | |
| 633 | // (0x71) DRIVER CTRL 16 VIBR |
| 634 | #define VIBR_DIM_DUTY_MASK 0x1F |
| 635 | #define VIBR_DIM_DUTY_SHIFT 0x0 |
| 636 | |
| 637 | // (0x72) DRIVER CTRL 17 |
| 638 | #define DIM_CK_FORCE_ON_MASK 0x1 |
| 639 | #define DIM_CK_FORCE_ON_SHIFT 0x0 |
| 640 | |
| 641 | // (0x73) CLASS_D CTRL 3 SPKL |
| 642 | #define SPKL_DTIN_MASK 0xf |
| 643 | #define SPKL_DTIN_SHIFT 0x0 |
| 644 | #define SPKL_DTIP_MASK 0xf |
| 645 | #define SPKL_DTIP_SHIFT 0x4 |
| 646 | |
| 647 | // (0x74) CLASS_D CTRL 4 SPKL |
| 648 | #define SPKL_DMODE_MASK 0x3 |
| 649 | #define SPKL_DMODE_SHIFT 0x2 |
| 650 | #define SPKL_EN_MASK 0x1 |
| 651 | #define SPKL_EN_SHIFT 0x6 |
| 652 | #define SPKL_DTCAL_MASK 0x1 |
| 653 | #define SPKL_DTCAL_SHIFT 0x7 |
| 654 | |
| 655 | // (0x75) CLASS_D CTRL 5 SPKL |
| 656 | #define SPKL_SLEW_MASK 0x3 |
| 657 | #define SPKL_SLEW_SHIFT 0x6 |
| 658 | |
| 659 | // (0x76) CLASS_D CTRL 6 SPKL |
| 660 | #define SPKL_VOL_MASK 0x7 |
| 661 | #define SPKL_VOL_SHIFT 0x0 |
| 662 | |
| 663 | // (0x77) CLASS_D CTRL 7 SPKL |
| 664 | #define SPKL_OC_MASK 0x1 |
| 665 | #define SPKL_OC_SHIFT 0x0 |
| 666 | |
| 667 | |
| 668 | // (0x78) CLASS_D CTRL 8 SPKR |
| 669 | #define SPKR_DTIN_MASK 0xf |
| 670 | #define SPKR_DTIN_SHIFT 0x0 |
| 671 | #define SPKR_DTIP_MASK 0xf |
| 672 | #define SPKR_DTIP_SHIFT 0x4 |
| 673 | |
| 674 | // (0x79) CLASS_D CTRL 9 SPKR |
| 675 | #define SPKR_DMODE_MASK 0x3 |
| 676 | #define SPKR_DMODE_SHIFT 0x2 |
| 677 | #define SPKR_EN_MASK 0x1 |
| 678 | #define SPKR_EN_SHIFT 0x6 |
| 679 | #define SPKR_DTCAL_MASK 0x1 |
| 680 | #define SPKR_DTCAL_SHIFT 0x7 |
| 681 | |
| 682 | // (0x7A) CLASS_D CTRL 10 SPKR |
| 683 | #define SPKR_SLEW_MASK 0x3 |
| 684 | #define SPKR_SLEW_SHIFT 0x6 |
| 685 | |
| 686 | |
| 687 | // (0x7B) CLASS_D CTRL 11 SPKR |
| 688 | #define SPKR_VOL_MASK 0x7 |
| 689 | #define SPKR_VOL_SHIFT 0x0 |
| 690 | |
| 691 | // (0x7C) CLASS_D CTRL 12 SPKR |
| 692 | #define SPKR_OC_MASK 0x1 |
| 693 | #define SPKR_OC_SHIFT 0x0 |
| 694 | |
| 695 | |
| 696 | |
| 697 | // (0x81) CHARGER CTRL 1 |
| 698 | #define CHR_CHOFST_MASK 0x7 |
| 699 | #define CHR_CHOFST_SHIFT 0x0 |
| 700 | #define CHR_OV_TH_HIGH_MASK 0x1 |
| 701 | #define CHR_OV_TH_HIGH_SHIFT 0x3 |
| 702 | #define CHR_CHR_CURRENT_MASK 0x7 |
| 703 | #define CHR_CHR_CURRENT_SHIFT 0x4 |
| 704 | #define CHR_OV_TH_FREEZE_MASK 0x1 |
| 705 | #define CHR_OV_TH_FREEZE_SHIFT 0x7 |
| 706 | |
| 707 | // (0x82) CHARGER CTRL 2 |
| 708 | #define CHR_CV_RT_MASK 0x3 |
| 709 | #define CHR_CV_RT_SHIFT 0x0 |
| 710 | #define CHR_CHRON_FORCE_MASK 0x1 |
| 711 | #define CHR_CHRON_FORCE_SHIFT 0x2 |
| 712 | #define CHR_CHR_EN_MASK 0x1 |
| 713 | #define CHR_CHR_EN_SHIFT 0x3 |
| 714 | #define CHR_CV_TUNE_MASK 0x7 |
| 715 | #define CHR_CV_TUNE_SHIFT 0x4 |
| 716 | |
| 717 | |
| 718 | // (0x83) TESTMODE CTRL 3 Analog Switch |
| 719 | #define ASW_ASEL_MASK 0x3 |
| 720 | #define ASW_ASEL_SHIFT 0x0 |
| 721 | #define ASW_BSEL_MASK 0x3 |
| 722 | #define ASW_BSEL_SHIFT 0x2 |
| 723 | #define ASW_A1_SEL_MASK 0x1 |
| 724 | #define ASW_A1_SEL_SHIFT 0x4 |
| 725 | #define ASW_A2_SEL_MASK 0x1 |
| 726 | #define ASW_A2_SEL_SHIFT 0x5 |
| 727 | |
| 728 | |
| 729 | // (0x84) TESTMODE CTRL 4 Testmode |
| 730 | #define VGP2_ON_SEL_MASK 0x1 |
| 731 | #define VGP2_ON_SEL_SHIFT 0x7 |
| 732 | |
| 733 | |
| 734 | |
| 735 | // (0x86) TESTMODE CTRL 6 BB AUXADC Related |
| 736 | #define ADC_ISENSE_OUT_EN_MASK 0x1 |
| 737 | #define ADC_ISENSE_OUT_EN_SHIFT 0x0 |
| 738 | #define ADC_VBAT_OUT_EN_MASK 0x1 |
| 739 | #define ADC_VBAT_OUT_EN_SHIFT 0x1 |
| 740 | |
| 741 | |
| 742 | // (0x89) INT CTRL 1 |
| 743 | // #define in pmic6326_sw.h |
| 744 | // (0x8A) INT CTRL 2 |
| 745 | // #define in pmic6326_sw.h |
| 746 | // (0x8B) INT CTRL 3 |
| 747 | // #define in pmic6326_sw.h |
| 748 | |
| 749 | // (0x8C) |
| 750 | #define VCAMA_OC_AUTO_OFF_SHIFT 0x1 |
| 751 | #define VCAMA_OC_AUTO_OFF_MASK 0x1 |
| 752 | |
| 753 | #define VCAMD_OC_AUTO_OFF_SHIFT 0x6 |
| 754 | #define VCAMD_OC_AUTO_OFF_MASK 0x1 |
| 755 | |
| 756 | // (0x8F) |
| 757 | #define ST_GEAR_VWIFI3V3_SHIFT 0x0 |
| 758 | #define ST_GEAR_VWIFI3V3_MASK 0x3 |
| 759 | |
| 760 | #define ST_GEAR_VWIFI2V8_SHIFT 0x2 |
| 761 | #define ST_GEAR_VWIFI2V8_MASK 0x3 |
| 762 | |
| 763 | // (0x90) |
| 764 | #define ST_GEAR_VSDIO_SHIFT 0x2 |
| 765 | #define ST_GEAR_VSDIO_MASK 0x3 |
| 766 | |
| 767 | // (0x92) |
| 768 | #define OC_GEAR_VWIFI3V3_SHIFT 0x0 |
| 769 | #define OC_GEAR_VWIFI3V3_MASK 0x3 |
| 770 | |
| 771 | #define OC_GEAR_VWIFI2V8_SHIFT 0x2 |
| 772 | #define OC_GEAR_VWIFI2V8_MASK 0x3 |
| 773 | |
| 774 | // (0x93) |
| 775 | #define OC_GEAR_VSDIO_SHIFT 0x2 |
| 776 | #define OC_GEAR_VSDIO_MASK 0x3 |
| 777 | |
| 778 | |
| 779 | // (0x96) WATCHDOG CTRL and INT CTRL 4 |
| 780 | #define WDT_TIMEOUT_MASK 0x3 |
| 781 | #define WDT_TIMEOUT_SHIFT 0x0 |
| 782 | #define INTR_POLARITY_MASK 0x1 |
| 783 | #define INTR_POLARITY_SHIFT 0x2 |
| 784 | #define WDT_DISABLE_MASK 0x1 |
| 785 | #define WDT_DISABLE_SHIFT 0x3 |
| 786 | |
| 787 | |
| 788 | #endif //#if defined(PMIC_6326_REG_API) |
| 789 | |
| 790 | #endif // #ifndef __DCL_PMIC6326_HW_H_STRUCT__ |
| 791 | |
| 792 | |
| 793 | |
| 794 | |