1 /* SPDX-License-Identifier: GPL-2.0+ */
3 * Copyright (C) 2015 Google, Inc
4 * Written by Simon Glass <sjg@chromium.org>
86 REG_BOOST_LDO9_ON_VSEL,
87 REG_BOOST_LDO9_SLP_VSEL,
90 /* Not sure what this does */
91 REG_DCDC_ILMAX = 0x90,
109 REG_FRAME_SMP_INTERV,
110 REG_AUTO_SLP_CUR_THR,
129 REGH_RELAX_ENTRY_THRES,
130 REGL_RELAX_ENTRY_THRES,
131 REGH_RELAX_EXIT_THRES,
132 REGL_RELAX_EXIT_THRES,
143 REG_NON_ACT_TIMER_CNT,
160 REG_NON_ACT_TIMER_CNT_SAVE,
173 RK817_REG_SYS_CFG3 = 0xf4,
177 RK816_REG_DCDC_EN1 = 0x23,
179 RK816_REG_DCDC_SLP_EN,
180 RK816_REG_LDO_SLP_EN,
181 RK816_REG_LDO_EN1 = 0x27,
195 RK817_POWER_EN0 = 0xb1,
201 #define RK817_POWER_EN_SAVE0 0x99
202 #define RK817_POWER_EN_SAVE1 0xa4
204 #define RK817_ID_MSB 0xed
205 #define RK817_ID_LSB 0xee
206 #define RK8XX_ID_MSK 0xfff0
208 #define RK817_PMIC_SYS_CFG3 0xf4
209 #define RK817_GPIO_INT_CFG 0xfe
211 #define RK8XX_ON_SOURCE 0xae
212 #define RK8XX_OFF_SOURCE 0xaf
213 #define RK817_BUCK4_CMIN 0xc6
214 #define RK817_ON_SOURCE 0xf5
215 #define RK817_OFF_SOURCE 0xf6
222 struct rk8xx_reg_table {
232 int rk8xx_spl_configure_buck(struct udevice *pmic, int buck, int uvolt);
233 int rk818_spl_configure_usb_input_current(struct udevice *pmic, int current_ma);
234 int rk818_spl_configure_usb_chrg_shutdown(struct udevice *pmic, int uvolt);