blob: 7d66ba48d4d1a45878e120770a7fef2a49f6fa8d [file] [log] [blame]
Adrian Alonso9072cb22015-08-11 11:19:49 -05001/*
2 * Copyright (C) 2015 Freescale Semiconductor, Inc
3 * Peng Fan <Peng.Fan@freescale.com>
4 *
5 * SPDX-License-Identifier: GPL-2.0+
6 */
7#ifndef __PFUZE3000_PMIC_H_
8#define __PFUZE3000_PMIC_H_
9
10/* PFUZE3000 registers */
11enum {
12 PFUZE3000_DEVICEID = 0x00,
13
14 PFUZE3000_REVID = 0x03,
15 PFUZE3000_FABID = 0x04,
16 PFUZE3000_INTSTAT0 = 0x05,
17 PFUZE3000_INTMASK0 = 0x06,
18 PFUZE3000_INTSENSE0 = 0x07,
19 PFUZE3000_INTSTAT1 = 0x08,
20 PFUZE3000_INTMASK1 = 0x09,
21 PFUZE3000_INTSENSE1 = 0x0A,
22
23 PFUZE3000_INTSTAT3 = 0x0E,
24 PFUZE3000_INTMASK3 = 0x0F,
25 PFUZE3000_INTSENSE3 = 0x10,
26 PFUZE3000_INTSTAT4 = 0x11,
27 PFUZE3000_INTMASK4 = 0x12,
28 PFUZE3000_INTSENSE4 = 0x13,
29
30 PFUZE3000_COINCTL = 0x1A,
31 PFUZE3000_PWRCTL = 0x1B,
32 PFUZE3000_MEMA = 0x1C,
33 PFUZE3000_MEMB = 0x1D,
34 PFUZE3000_MEMC = 0x1E,
35 PFUZE3000_MEMD = 0x1F,
36
37 PFUZE3000_SW1AVOLT = 0x20,
38 PFUZE3000_SW1ASTBY = 0x21,
39 PFUZE3000_SW1AOFF = 0x22,
40 PFUZE3000_SW1AMODE = 0x23,
41 PFUZE3000_SW1ACONF = 0x24,
42
43 PFUZE3000_SW1BVOLT = 0x2E,
44 PFUZE3000_SW1BSTBY = 0x2F,
45 PFUZE3000_SW1BOFF = 0x30,
46 PFUZE3000_SW1BMODE = 0x31,
47 PFUZE3000_SW1BCONF = 0x32,
48
49 PFUZE3000_SW2VOLT = 0x35,
50 PFUZE3000_SW2STBY = 0x36,
51 PFUZE3000_SW2OFF = 0x37,
52 PFUZE3000_SW2MODE = 0x38,
53 PFUZE3000_SW2CONF = 0x39,
54
55 PFUZE3000_SW3VOLT = 0x3C,
56 PFUZE3000_SW3STBY = 0x3D,
57 PFUZE3000_SW3OFF = 0x3E,
58 PFUZE3000_SW3MODE = 0x3F,
59 PFUZE3000_SW3CONF = 0x40,
60
61 PFUZE3000_SWBSTCTL = 0x66,
62
63 PFUZE3000_LDOGCTL = 0x69,
64 PFUZE3000_VREFDDRCTL = 0x6A,
65 PFUZE3000_VSNVSCTL = 0x6B,
66 PFUZE3000_VLDO1CTL = 0x6C,
67 PFUZE3000_VLDO2CTL = 0x6D,
68 PFUZE3000_VCC_SDCTL = 0x6E,
69 PFUZE3000_V33CTL = 0x6F,
70 PFUZE3000_VLDO3CTL = 0x70,
71 PFUZE3000_VLD4CTL = 0x71,
72
73 PMIC_NUM_OF_REGS = 0x7F,
74};
75
76int power_pfuze3000_init(unsigned char bus);
77
Breno Lima70683b52016-12-06 15:38:24 -020078/* Voltage Configuration */
79#define PFUZE3000_SW1AB_SETP(x) ((x - 7000) / 250)
80#define PFUZE3000_SW3_SETP(x) ((x - 9000) / 500)
81#define PFUZE3000_VLDO_SETP(x) ((x - 8000) / 500)
82
Adrian Alonso9072cb22015-08-11 11:19:49 -050083#endif