diff options
| author | Michal Suchanek <hramrach@gmail.com> | 2015-07-11 08:59:56 -0400 |
|---|---|---|
| committer | Lee Jones <lee.jones@linaro.org> | 2015-08-11 10:08:51 -0400 |
| commit | d8d79f8f60c4363a0fa490ff1626be4bd5e003a3 (patch) | |
| tree | aafecf35e7af28fcc120a7f092c1a92dcd96249a /include/linux/mfd | |
| parent | 18ca2ba5995d950619589355c3bc760b2a91e2bf (diff) | |
mfd: axp20x: Add axp152 support
The axp152 is a stripped down version of the axp202 pmic with the battery
charging function removed as it is intended for top-set boxes.
Signed-off-by: Michal Suchanek <hramrach@gmail.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Diffstat (limited to 'include/linux/mfd')
| -rw-r--r-- | include/linux/mfd/axp20x.h | 61 |
1 files changed, 60 insertions, 1 deletions
diff --git a/include/linux/mfd/axp20x.h b/include/linux/mfd/axp20x.h index c2aa853fb412..52203d5f7984 100644 --- a/include/linux/mfd/axp20x.h +++ b/include/linux/mfd/axp20x.h | |||
| @@ -12,7 +12,8 @@ | |||
| 12 | #define __LINUX_MFD_AXP20X_H | 12 | #define __LINUX_MFD_AXP20X_H |
| 13 | 13 | ||
| 14 | enum { | 14 | enum { |
| 15 | AXP202_ID = 0, | 15 | AXP152_ID = 0, |
| 16 | AXP202_ID, | ||
| 16 | AXP209_ID, | 17 | AXP209_ID, |
| 17 | AXP221_ID, | 18 | AXP221_ID, |
| 18 | AXP288_ID, | 19 | AXP288_ID, |
| @@ -22,6 +23,24 @@ enum { | |||
| 22 | #define AXP20X_DATACACHE(m) (0x04 + (m)) | 23 | #define AXP20X_DATACACHE(m) (0x04 + (m)) |
| 23 | 24 | ||
| 24 | /* Power supply */ | 25 | /* Power supply */ |
| 26 | #define AXP152_PWR_OP_MODE 0x01 | ||
| 27 | #define AXP152_LDO3456_DC1234_CTRL 0x12 | ||
| 28 | #define AXP152_ALDO_OP_MODE 0x13 | ||
| 29 | #define AXP152_LDO0_CTRL 0x15 | ||
| 30 | #define AXP152_DCDC2_V_OUT 0x23 | ||
| 31 | #define AXP152_DCDC2_V_SCAL 0x25 | ||
| 32 | #define AXP152_DCDC1_V_OUT 0x26 | ||
| 33 | #define AXP152_DCDC3_V_OUT 0x27 | ||
| 34 | #define AXP152_ALDO12_V_OUT 0x28 | ||
| 35 | #define AXP152_DLDO1_V_OUT 0x29 | ||
| 36 | #define AXP152_DLDO2_V_OUT 0x2a | ||
| 37 | #define AXP152_DCDC4_V_OUT 0x2b | ||
| 38 | #define AXP152_V_OFF 0x31 | ||
| 39 | #define AXP152_OFF_CTRL 0x32 | ||
| 40 | #define AXP152_PEK_KEY 0x36 | ||
| 41 | #define AXP152_DCDC_FREQ 0x37 | ||
| 42 | #define AXP152_DCDC_MODE 0x80 | ||
| 43 | |||
| 25 | #define AXP20X_PWR_INPUT_STATUS 0x00 | 44 | #define AXP20X_PWR_INPUT_STATUS 0x00 |
| 26 | #define AXP20X_PWR_OP_MODE 0x01 | 45 | #define AXP20X_PWR_OP_MODE 0x01 |
| 27 | #define AXP20X_USB_OTG_STATUS 0x02 | 46 | #define AXP20X_USB_OTG_STATUS 0x02 |
| @@ -69,6 +88,13 @@ enum { | |||
| 69 | #define AXP22X_CHRG_CTRL3 0x35 | 88 | #define AXP22X_CHRG_CTRL3 0x35 |
| 70 | 89 | ||
| 71 | /* Interrupt */ | 90 | /* Interrupt */ |
| 91 | #define AXP152_IRQ1_EN 0x40 | ||
| 92 | #define AXP152_IRQ2_EN 0x41 | ||
| 93 | #define AXP152_IRQ3_EN 0x42 | ||
| 94 | #define AXP152_IRQ1_STATE 0x48 | ||
| 95 | #define AXP152_IRQ2_STATE 0x49 | ||
| 96 | #define AXP152_IRQ3_STATE 0x4a | ||
| 97 | |||
| 72 | #define AXP20X_IRQ1_EN 0x40 | 98 | #define AXP20X_IRQ1_EN 0x40 |
| 73 | #define AXP20X_IRQ2_EN 0x41 | 99 | #define AXP20X_IRQ2_EN 0x41 |
| 74 | #define AXP20X_IRQ3_EN 0x42 | 100 | #define AXP20X_IRQ3_EN 0x42 |
| @@ -127,6 +153,19 @@ enum { | |||
| 127 | #define AXP22X_PWREN_CTRL2 0x8d | 153 | #define AXP22X_PWREN_CTRL2 0x8d |
| 128 | 154 | ||
| 129 | /* GPIO */ | 155 | /* GPIO */ |
| 156 | #define AXP152_GPIO0_CTRL 0x90 | ||
| 157 | #define AXP152_GPIO1_CTRL 0x91 | ||
| 158 | #define AXP152_GPIO2_CTRL 0x92 | ||
| 159 | #define AXP152_GPIO3_CTRL 0x93 | ||
| 160 | #define AXP152_LDOGPIO2_V_OUT 0x96 | ||
| 161 | #define AXP152_GPIO_INPUT 0x97 | ||
| 162 | #define AXP152_PWM0_FREQ_X 0x98 | ||
| 163 | #define AXP152_PWM0_FREQ_Y 0x99 | ||
| 164 | #define AXP152_PWM0_DUTY_CYCLE 0x9a | ||
| 165 | #define AXP152_PWM1_FREQ_X 0x9b | ||
| 166 | #define AXP152_PWM1_FREQ_Y 0x9c | ||
| 167 | #define AXP152_PWM1_DUTY_CYCLE 0x9d | ||
| 168 | |||
| 130 | #define AXP20X_GPIO0_CTRL 0x90 | 169 | #define AXP20X_GPIO0_CTRL 0x90 |
| 131 | #define AXP20X_LDO5_V_OUT 0x91 | 170 | #define AXP20X_LDO5_V_OUT 0x91 |
| 132 | #define AXP20X_GPIO1_CTRL 0x92 | 171 | #define AXP20X_GPIO1_CTRL 0x92 |
| @@ -218,6 +257,26 @@ enum { | |||
| 218 | 257 | ||
| 219 | /* IRQs */ | 258 | /* IRQs */ |
| 220 | enum { | 259 | enum { |
| 260 | AXP152_IRQ_LDO0IN_CONNECT = 1, | ||
| 261 | AXP152_IRQ_LDO0IN_REMOVAL, | ||
| 262 | AXP152_IRQ_ALDO0IN_CONNECT, | ||
| 263 | AXP152_IRQ_ALDO0IN_REMOVAL, | ||
| 264 | AXP152_IRQ_DCDC1_V_LOW, | ||
| 265 | AXP152_IRQ_DCDC2_V_LOW, | ||
| 266 | AXP152_IRQ_DCDC3_V_LOW, | ||
| 267 | AXP152_IRQ_DCDC4_V_LOW, | ||
| 268 | AXP152_IRQ_PEK_SHORT, | ||
| 269 | AXP152_IRQ_PEK_LONG, | ||
| 270 | AXP152_IRQ_TIMER, | ||
| 271 | AXP152_IRQ_PEK_RIS_EDGE, | ||
| 272 | AXP152_IRQ_PEK_FAL_EDGE, | ||
| 273 | AXP152_IRQ_GPIO3_INPUT, | ||
| 274 | AXP152_IRQ_GPIO2_INPUT, | ||
| 275 | AXP152_IRQ_GPIO1_INPUT, | ||
| 276 | AXP152_IRQ_GPIO0_INPUT, | ||
| 277 | }; | ||
| 278 | |||
| 279 | enum { | ||
| 221 | AXP20X_IRQ_ACIN_OVER_V = 1, | 280 | AXP20X_IRQ_ACIN_OVER_V = 1, |
| 222 | AXP20X_IRQ_ACIN_PLUGIN, | 281 | AXP20X_IRQ_ACIN_PLUGIN, |
| 223 | AXP20X_IRQ_ACIN_REMOVAL, | 282 | AXP20X_IRQ_ACIN_REMOVAL, |
