2 * (C) Copyright 2011-2013
3 * Texas Instruments, <www.ti.com>
5 * SPDX-License-Identifier: GPL-2.0+
7 * For more details, please see the TRM at http://www.ti.com/product/tps65217a
10 #ifndef __POWER_TPS65217_H__
11 #define __POWER_TPS65217_H__
13 /* I2C chip address */
14 #define TPS65217_CHIP_PM 0x24
18 TPS65217_CHIPID = 0x00,
48 TPS65217_PMIC_NUM_OF_REGS,
51 #define TPS65217_PROT_LEVEL_NONE 0x00
52 #define TPS65217_PROT_LEVEL_1 0x01
53 #define TPS65217_PROT_LEVEL_2 0x02
55 #define TPS65217_PASSWORD_LOCK_FOR_WRITE 0x00
56 #define TPS65217_PASSWORD_UNLOCK 0x7D
58 #define TPS65217_DCDC_GO 0x80
60 #define TPS65217_MASK_ALL_BITS 0xFF
62 #define TPS65217_USB_INPUT_CUR_LIMIT_MASK 0x03
63 #define TPS65217_USB_INPUT_CUR_LIMIT_100MA 0x00
64 #define TPS65217_USB_INPUT_CUR_LIMIT_500MA 0x01
65 #define TPS65217_USB_INPUT_CUR_LIMIT_1300MA 0x02
66 #define TPS65217_USB_INPUT_CUR_LIMIT_1800MA 0x03
68 #define TPS65217_DCDC_VOLT_SEL_1275MV 0x0F
69 #define TPS65217_DCDC_VOLT_SEL_1325MV 0x11
71 #define TPS65217_LDO_MASK 0x1F
72 #define TPS65217_LDO_VOLTAGE_OUT_1_8 0x06
73 #define TPS65217_LDO_VOLTAGE_OUT_3_3 0x1F
75 #define TPS65217_PWR_SRC_USB_BITMASK 0x4
76 #define TPS65217_PWR_SRC_AC_BITMASK 0x8
78 int tps65217_reg_read(uchar src_reg, uchar *src_val);
79 int tps65217_reg_write(uchar prot_level, uchar dest_reg, uchar dest_val,
81 int tps65217_voltage_update(uchar dc_cntrl_reg, uchar volt_sel);
82 #endif /* __POWER_TPS65217_H__ */