blob: fb0800b9cb5c5412380492dbf41aeb0a4e13a075 [file] [log] [blame]
Simon Glassa8bd2ac2016-01-21 19:43:29 -07001/*
2 * Copyright (C) 2015 Google, Inc
3 * Written by Simon Glass <sjg@chromium.org>
4 *
5 * SPDX-License-Identifier: GPL-2.0+
6 */
7
8#ifndef _PMIC_RK808_H_
9#define _PMIC_RK808_H_
10
11enum {
12 REG_DCDC_EN = 0x23,
13 REG_LDO_EN,
14 REG_SLEEP_SET_OFF1,
15 REG_SLEEP_SET_OFF2,
16 REG_DCDC_UV_STS,
17
18 REG_DCDC_UV_ACT,
19 REG_LDO_UV_STS,
20 REG_LDO_UV_ACT,
21 REG_DCDC_PG,
22 REG_LDO_PG,
23 REG_VOUT_MON_TDB,
24 REG_BUCK1_CONFIG,
25 REG_BUCK1_ON_VSEL,
26
27 REG_BUCK1_SLP_VSEL,
28 REG_BUCK1_DVS_VSEL,
29 REG_BUCK2_CONFIG,
30 REG_BUCK2_ON_VSEL,
31 REG_BUCK2_SLP_VSEL,
32 REG_BUCK2_DVS_VSEL,
33 REG_BUCK3_CONFIG,
34 REG_BUCK4_CONFIG,
35
36 REG_BUCK4_ON_VSEL,
37 REG_BUCK4_SLP_VSEL,
38 LDO1_ON_VSEL = 0x3b,
39 LDO1_SLP_VSEL,
40 LDO2_ON_VSEL,
41 LDO2_SLP_VSEL,
42 LDO3_ON_VSEL,
43
44 LDO3_SLP_VSEL,
45 LDO4_ON_VSEL,
46 LDO4_SLP_VSEL,
47 LDO5_ON_VSEL,
48 LDO5_SLP_VSEL,
49 LDO6_ON_VSEL,
50 LDO6_SLP_VSEL,
51 LDO7_ON_VSEL,
52
53 LDO7_SLP_VSEL,
54 LDO8_ON_VSEL,
55 LDO8_SLP_VSEL,
56 DEVCTRL,
57 INT_STS1,
58 INT_STS_MSK1,
59 INT_STS2,
60 INT_STS_MSK2,
61 IO_POL,
62
63 /* Not sure what this does */
64 DCDC_ILMAX = 0x90,
65
66 RK808_NUM_OF_REGS,
67};
68
69struct rk808_reg_table {
70 char *name;
71 u8 reg_ctl;
72 u8 reg_vol;
73};
74
75int rk808_spl_configure_buck(struct udevice *pmic, int buck, int uvolt);
76
77#endif