1 /* SPDX-License-Identifier: GPL-2.0+ */
3 * Copyright (C) EETS GmbH, 2017, Felix Brack <f.brack@eets.ch>
6 #ifndef __TPS65910_PMIC_H_
7 #define __TPS65910_PMIC_H_
9 #define TPS65910_I2C_SEL_MASK (0x1 << 4)
10 #define TPS65910_VDD_SR_MASK (0x1 << 7)
11 #define TPS65910_GAIN_SEL_MASK (0x3 << 6)
12 #define TPS65910_VDD_SEL_MASK 0x7f
13 #define TPS65910_VDD_SEL_MIN 3
14 #define TPS65910_VDD_SEL_MAX 75
15 #define TPS65910_SEL_MASK (0x3 << 2)
16 #define TPS65910_SUPPLY_STATE_MASK 0x3
17 #define TPS65910_SUPPLY_STATE_OFF 0x0
18 #define TPS65910_SUPPLY_STATE_ON 0x1
22 TPS65910_REG_RTC_SEC = 0x00,
24 TPS65910_REG_RTC_HOUR,
26 TPS65910_REG_RTC_MONTH,
27 TPS65910_REG_RTC_YEAR,
28 TPS65910_REG_RTC_WEEK,
29 TPS65910_REG_RTC_ALARM_SEC = 0x08,
30 TPS65910_REG_RTC_ALARM_MIN,
31 TPS65910_REG_RTC_ALARM_HOUR,
32 TPS65910_REG_RTC_ALARM_DAY,
33 TPS65910_REG_RTC_ALARM_MONTH,
34 TPS65910_REG_RTC_ALARM_YEAR,
35 TPS65910_REG_RTC_CTRL = 0x10,
36 TPS65910_REG_RTC_STAT,
38 TPS65910_REG_RTC_COMP_LSB,
39 TPS65910_REG_RTC_COMP_MSB,
40 TPS65910_REG_RTC_RESISTOR_PRG,
41 TPS65910_REG_RTC_RESET_STAT,
50 TPS65910_REG_VIO = 0x20,
52 TPS65910_REG_VDD1_VAL,
53 TPS65910_REG_VDD1_VAL_SR,
55 TPS65910_REG_VDD2_VAL,
56 TPS65910_REG_VDD2_VAL_SR,
58 TPS65910_REG_VDIG1 = 0x30,
67 TPS65910_REG_BATTERY_BACKUP_CHARGE,
68 TPS65910_REG_DCDC_CTRL = 0x3e,
69 TPS65910_REG_DEVICE_CTRL,
70 TPS65910_REG_DEVICE_CTRL2,
71 TPS65910_REG_SLEEP_KEEP_LDO_ON,
72 TPS65910_REG_SLEEP_KEEP_RES_ON,
73 TPS65910_REG_SLEEP_SET_LDO_OFF,
74 TPS65910_REG_SLEEP_SET_RES_OFF,
75 TPS65910_REG_EN1_LDO_ASS,
76 TPS65910_REG_EM1_SMPS_ASS,
77 TPS65910_REG_EN2_LDO_ASS,
78 TPS65910_REG_EM2_SMPS_ASS,
79 TPS65910_REG_INT_STAT = 0x50,
80 TPS65910_REG_INT_MASK,
81 TPS65910_REG_INT_STAT2,
82 TPS65910_REG_INT_MASK2,
83 TPS65910_REG_GPIO = 0x60,
84 TPS65910_REG_JTAGREVNUM = 0x80,
90 TPS65910_SUPPLY_VCCIO = 0x00,
101 /* regulator unit numbers */
103 TPS65910_UNIT_VRTC = 0x00,
114 TPS65910_UNIT_VAUX33,
119 struct tps65910_regulator_pdata {
120 u32 supply; /* regulator supply voltage in uV */
121 uint unit; /* unit-address according to DT */
125 #define TPS65910_BUCK_DRIVER "tps65910_buck"
126 #define TPS65910_BOOST_DRIVER "tps65910_boost"
127 #define TPS65910_LDO_DRIVER "tps65910_ldo"
129 #endif /* __TPS65910_PMIC_H_ */