2 * Copyright (C) 2014 Gateworks Corporation
3 * Tim Harvey <tharvey@gateworks.com>
5 * SPDX-License-Identifier: GPL-2.0+
8 #ifndef __PFUZE100_PMIC_H_
9 #define __PFUZE100_PMIC_H_
11 /* PFUZE100 registers */
13 PFUZE100_DEVICEID = 0x00,
14 PFUZE100_REVID = 0x03,
15 PFUZE100_FABID = 0x04,
17 PFUZE100_SW1ABVOL = 0x20,
18 PFUZE100_SW1ABSTBY = 0x21,
19 PUZE_100_SW1ABCONF = 0x24,
20 PFUZE100_SW1CVOL = 0x2e,
21 PFUZE100_SW1CSTBY = 0x2f,
22 PFUZE100_SW1CCONF = 0x32,
23 PFUZE100_SW2VOL = 0x35,
24 PFUZE100_SW3AVOL = 0x3c,
25 PFUZE100_SW3BVOL = 0x43,
26 PFUZE100_SW4VOL = 0x4a,
27 PFUZE100_SWBSTCON1 = 0x66,
28 PFUZE100_VREFDDRCON = 0x6a,
29 PFUZE100_VSNVSVOL = 0x6b,
30 PFUZE100_VGEN1VOL = 0x6c,
31 PFUZE100_VGEN2VOL = 0x6d,
32 PFUZE100_VGEN3VOL = 0x6e,
33 PFUZE100_VGEN4VOL = 0x6f,
34 PFUZE100_VGEN5VOL = 0x70,
35 PFUZE100_VGEN6VOL = 0x71,
37 PMIC_NUM_OF_REGS = 0x7f,
44 /* VGEN1/2 Voltage Configuration */
62 /* VGEN3/4/5/6 Voltage Configuration */
80 #define LDO_VOL_MASK 0xf
87 /* SWBST Output Voltage */
93 #define SWBST_VOL_MASK 0x3
94 #define SWBST_MODE_MASK 0x6
95 #define SWBST_MODE_OFF (2 << 0)
96 #define SWBST_MODE_PFM (2 << 1)
97 #define SWBST_MODE_AUTO (2 << 2)
98 #define SWBST_MODE_APS (2 << 3)
100 int power_pfuze100_init(unsigned char bus);