blob: 0a612052f01531924d374b25333d3cb01cbbffb4 [file] [log] [blame]
Keerthyf0df1b12016-09-30 09:20:43 +05301#define PALMAS 0x0
2#define TPS659038 0x1
3#define TPS65917 0x2
4
Svyatoslav Ryheleacea672023-10-24 10:49:08 +03005struct palmas_priv {
6 struct udevice *chip2;
7};
8
Keerthyf0df1b12016-09-30 09:20:43 +05309/* I2C device address for pmic palmas */
10#define PALMAS_I2C_ADDR (0x12 >> 1)
11#define PALMAS_LDO_NUM 11
12#define PALMAS_SMPS_NUM 8
13
14/* Drivers name */
15#define PALMAS_LDO_DRIVER "palmas_ldo"
16#define PALMAS_SMPS_DRIVER "palmas_smps"
Svyatoslav Ryheleacea672023-10-24 10:49:08 +030017#define PALMAS_RST_DRIVER "palmas_rst"
Keerthyf0df1b12016-09-30 09:20:43 +053018
19#define PALMAS_SMPS_VOLT_MASK 0x7F
20#define PALMAS_SMPS_RANGE_MASK 0x80
21#define PALMAS_SMPS_VOLT_MAX_HEX 0x7F
22#define PALMAS_SMPS_VOLT_MAX 3300000
23#define PALMAS_SMPS_MODE_MASK 0x3
24#define PALMAS_SMPS_STATUS_MASK 0x30
25
26#define PALMAS_LDO_VOLT_MASK 0x3F
27#define PALMAS_LDO_VOLT_MAX_HEX 0x3F
28#define PALMAS_LDO_VOLT_MAX 3300000
29#define PALMAS_LDO_MODE_MASK 0x1
30#define PALMAS_LDO_STATUS_MASK 0x10
Jean-Jacques Hiblot91827412017-07-12 11:42:47 +020031#define PALMAS_LDO_BYPASS_EN 0x40
Svyatoslav Ryheleacea672023-10-24 10:49:08 +030032
33#define PALMAS_DEV_CTRL 0xA0
34#define SW_RST BIT(1)
35#define DEV_OFF 0x00
36#define PALMAS_INT3_MASK 0x1B
37#define MASK_VBUS BIT(7)