1 /* SPDX-License-Identifier: GPL-2.0+ */
3 * Copyright (c) 2015 Google, Inc
4 * Written by Simon Glass <sjg@chromium.org>
7 #ifndef __TPS65090_PMIC_H_
8 #define __TPS65090_PMIC_H_
10 /* I2C device address for TPS65090 PMU */
11 #define TPS65090_I2C_ADDR 0x48
13 /* TPS65090 register addresses */
18 REG_FET_BASE = 0xe, /* Not a real register, FETs count from here */
31 CG_CTRL0_ENC_MASK = 0x01,
34 MAX_CTRL_READ_TRIES = 5,
36 /* TPS65090 FET_CTRL register values */
37 FET_CTRL_TOFET = 1 << 7, /* Timeout, startup, overload */
38 FET_CTRL_PGFET = 1 << 4, /* Power good for FET status */
39 FET_CTRL_WAIT = 3 << 2, /* Overcurrent timeout max */
40 FET_CTRL_ADENFET = 1 << 1, /* Enable output auto discharge */
41 FET_CTRL_ENFET = 1 << 0, /* Enable FET */
45 /* Status register fields */
46 TPS65090_ST1_OTC = 1 << 0,
47 TPS65090_ST1_OCC = 1 << 1,
48 TPS65090_ST1_STATE_SHIFT = 4,
49 TPS65090_ST1_STATE_MASK = 0xf << TPS65090_ST1_STATE_SHIFT,
53 #define TPS65090_FET_DRIVER "tps65090_fet"
55 #endif /* __TPS65090_PMIC_H_ */