blob: 02ca9203a172a4b3be2fcbeddedfbbefb5ef79e1 [file] [log] [blame]
James Banf307a7e2015-11-19 09:59:15 +09001/*
2 * pv88060-regulator.h - Regulator definitions for PV88060
3 * Copyright (C) 2015 Powerventure Semiconductor Ltd.
4 *
5 * This program is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU General Public License
7 * as published by the Free Software Foundation; either version 2
8 * of the License, or (at your option) any later version.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 */
15
16#ifndef __PV88060_REGISTERS_H__
17#define __PV88060_REGISTERS_H__
18
19/* System Control and Event Registers */
20#define PV88060_REG_EVENT_A 0x04
21#define PV88060_REG_MASK_A 0x08
22#define PV88060_REG_MASK_B 0x09
23#define PV88060_REG_MASK_C 0x0A
24
25/* Regulator Registers */
26#define PV88060_REG_BUCK1_CONF0 0x1B
27#define PV88060_REG_BUCK1_CONF1 0x1C
28#define PV88060_REG_LDO1_CONF 0x1D
29#define PV88060_REG_LDO2_CONF 0x1E
30#define PV88060_REG_LDO3_CONF 0x1F
31#define PV88060_REG_LDO4_CONF 0x20
32#define PV88060_REG_LDO5_CONF 0x21
33#define PV88060_REG_LDO6_CONF 0x22
34#define PV88060_REG_LDO7_CONF 0x23
35
36#define PV88060_REG_SW1_CONF 0x3B
37#define PV88060_REG_SW2_CONF 0x3C
38#define PV88060_REG_SW3_CONF 0x3D
39#define PV88060_REG_SW4_CONF 0x3E
40#define PV88060_REG_SW5_CONF 0x3F
41#define PV88060_REG_SW6_CONF 0x40
42
43/* PV88060_REG_EVENT_A (addr=0x04) */
44#define PV88060_E_VDD_FLT 0x01
45#define PV88060_E_OVER_TEMP 0x02
46
47/* PV88060_REG_MASK_A (addr=0x08) */
48#define PV88060_M_VDD_FLT 0x01
49#define PV88060_M_OVER_TEMP 0x02
50
51/* PV88060_REG_BUCK1_CONF0 (addr=0x1B) */
52#define PV88060_BUCK_EN 0x80
53#define PV88060_VBUCK_MASK 0x7F
54/* PV88060_REG_LDO1/2/3/4/5/6/7_CONT */
55#define PV88060_LDO_EN 0x40
56#define PV88060_VLDO_MASK 0x3F
57/* PV88060_REG_SW1/2/3/4/5_CONF */
58#define PV88060_SW_EN 0x80
59
60/* PV88060_REG_BUCK1_CONF1 (addr=0x1C) */
61#define PV88060_BUCK_ILIM_SHIFT 2
62#define PV88060_BUCK_ILIM_MASK 0x0C
63#define PV88060_BUCK_MODE_SHIFT 0
64#define PV88060_BUCK_MODE_MASK 0x03
65#define PV88060_BUCK_MODE_SLEEP 0x00
66#define PV88060_BUCK_MODE_AUTO 0x01
67#define PV88060_BUCK_MODE_SYNC 0x02
68
69#endif /* __PV88060_REGISTERS_H__ */