1 /* SPDX-License-Identifier: GPL-2.0-only */ 2 #ifndef __MFD_88PM886_H 3 #define __MFD_88PM886_H 4 5 #include <linux/i2c.h> 6 #include <linux/regmap.h> 7 8 #define PM886_A1_CHIP_ID 0xa1 9 10 #define PM886_IRQ_ONKEY 0 11 12 #define PM886_PAGE_OFFSET_REGULATORS 1 13 14 #define PM886_REG_ID 0x00 15 16 #define PM886_REG_STATUS1 0x01 17 #define PM886_ONKEY_STS1 BIT(0) 18 19 #define PM886_REG_INT_STATUS1 0x05 20 21 #define PM886_REG_INT_ENA_1 0x0a 22 #define PM886_INT_ENA1_ONKEY BIT(0) 23 24 #define PM886_REG_MISC_CONFIG1 0x14 25 #define PM886_SW_PDOWN BIT(5) 26 27 #define PM886_REG_MISC_CONFIG2 0x15 28 #define PM886_INT_INV BIT(0) 29 #define PM886_INT_CLEAR BIT(1) 30 #define PM886_INT_RC 0x00 31 #define PM886_INT_WC BIT(1) 32 #define PM886_INT_MASK_MODE BIT(2) 33 34 #define PM886_REG_RTC_SPARE6 0xef 35 36 #define PM886_REG_BUCK_EN 0x08 37 #define PM886_REG_LDO_EN1 0x09 38 #define PM886_REG_LDO_EN2 0x0a 39 #define PM886_REG_LDO1_VOUT 0x20 40 #define PM886_REG_LDO2_VOUT 0x26 41 #define PM886_REG_LDO3_VOUT 0x2c 42 #define PM886_REG_LDO4_VOUT 0x32 43 #define PM886_REG_LDO5_VOUT 0x38 44 #define PM886_REG_LDO6_VOUT 0x3e 45 #define PM886_REG_LDO7_VOUT 0x44 46 #define PM886_REG_LDO8_VOUT 0x4a 47 #define PM886_REG_LDO9_VOUT 0x50 48 #define PM886_REG_LDO10_VOUT 0x56 49 #define PM886_REG_LDO11_VOUT 0x5c 50 #define PM886_REG_LDO12_VOUT 0x62 51 #define PM886_REG_LDO13_VOUT 0x68 52 #define PM886_REG_LDO14_VOUT 0x6e 53 #define PM886_REG_LDO15_VOUT 0x74 54 #define PM886_REG_LDO16_VOUT 0x7a 55 #define PM886_REG_BUCK1_VOUT 0xa5 56 #define PM886_REG_BUCK2_VOUT 0xb3 57 #define PM886_REG_BUCK3_VOUT 0xc1 58 #define PM886_REG_BUCK4_VOUT 0xcf 59 #define PM886_REG_BUCK5_VOUT 0xdd 60 61 #define PM886_LDO_VSEL_MASK 0x0f 62 #define PM886_BUCK_VSEL_MASK 0x7f 63 64 struct pm886_chip { 65 struct i2c_client *client; 66 unsigned int chip_id; 67 struct regmap *regmap; 68 }; 69 #endif /* __MFD_88PM886_H */ 70