Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

mfd: rk808: Add rk805 regs addr and ID

Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Signed-off-by: Lee Jones <lee.jones@linaro.org>

authored by

Elaine Zhang and committed by
Lee Jones
a5247ca6 9d6105e1

+120
+120
include/linux/mfd/rk808.h
··· 206 206 #define RK818_USB_ILMIN_2000MA 0x7 207 207 #define RK818_USB_CHG_SD_VSEL_MASK 0x70 208 208 209 + /* RK805 */ 210 + enum rk805_reg { 211 + RK805_ID_DCDC1, 212 + RK805_ID_DCDC2, 213 + RK805_ID_DCDC3, 214 + RK805_ID_DCDC4, 215 + RK805_ID_LDO1, 216 + RK805_ID_LDO2, 217 + RK805_ID_LDO3, 218 + }; 219 + 220 + /* CONFIG REGISTER */ 221 + #define RK805_VB_MON_REG 0x21 222 + #define RK805_THERMAL_REG 0x22 223 + 224 + /* POWER CHANNELS ENABLE REGISTER */ 225 + #define RK805_DCDC_EN_REG 0x23 226 + #define RK805_SLP_DCDC_EN_REG 0x25 227 + #define RK805_SLP_LDO_EN_REG 0x26 228 + #define RK805_LDO_EN_REG 0x27 229 + 230 + /* BUCK AND LDO CONFIG REGISTER */ 231 + #define RK805_BUCK_LDO_SLP_LP_EN_REG 0x2A 232 + #define RK805_BUCK1_CONFIG_REG 0x2E 233 + #define RK805_BUCK1_ON_VSEL_REG 0x2F 234 + #define RK805_BUCK1_SLP_VSEL_REG 0x30 235 + #define RK805_BUCK2_CONFIG_REG 0x32 236 + #define RK805_BUCK2_ON_VSEL_REG 0x33 237 + #define RK805_BUCK2_SLP_VSEL_REG 0x34 238 + #define RK805_BUCK3_CONFIG_REG 0x36 239 + #define RK805_BUCK4_CONFIG_REG 0x37 240 + #define RK805_BUCK4_ON_VSEL_REG 0x38 241 + #define RK805_BUCK4_SLP_VSEL_REG 0x39 242 + #define RK805_LDO1_ON_VSEL_REG 0x3B 243 + #define RK805_LDO1_SLP_VSEL_REG 0x3C 244 + #define RK805_LDO2_ON_VSEL_REG 0x3D 245 + #define RK805_LDO2_SLP_VSEL_REG 0x3E 246 + #define RK805_LDO3_ON_VSEL_REG 0x3F 247 + #define RK805_LDO3_SLP_VSEL_REG 0x40 248 + 249 + /* INTERRUPT REGISTER */ 250 + #define RK805_PWRON_LP_INT_TIME_REG 0x47 251 + #define RK805_PWRON_DB_REG 0x48 252 + #define RK805_DEV_CTRL_REG 0x4B 253 + #define RK805_INT_STS_REG 0x4C 254 + #define RK805_INT_STS_MSK_REG 0x4D 255 + #define RK805_GPIO_IO_POL_REG 0x50 256 + #define RK805_OUT_REG 0x52 257 + #define RK805_ON_SOURCE_REG 0xAE 258 + #define RK805_OFF_SOURCE_REG 0xAF 259 + 260 + #define RK805_NUM_REGULATORS 7 261 + 262 + #define RK805_PWRON_FALL_RISE_INT_EN 0x0 263 + #define RK805_PWRON_FALL_RISE_INT_MSK 0x81 264 + 265 + /* RK805 IRQ Definitions */ 266 + #define RK805_IRQ_PWRON_RISE 0 267 + #define RK805_IRQ_VB_LOW 1 268 + #define RK805_IRQ_PWRON 2 269 + #define RK805_IRQ_PWRON_LP 3 270 + #define RK805_IRQ_HOTDIE 4 271 + #define RK805_IRQ_RTC_ALARM 5 272 + #define RK805_IRQ_RTC_PERIOD 6 273 + #define RK805_IRQ_PWRON_FALL 7 274 + 275 + #define RK805_IRQ_PWRON_RISE_MSK BIT(0) 276 + #define RK805_IRQ_VB_LOW_MSK BIT(1) 277 + #define RK805_IRQ_PWRON_MSK BIT(2) 278 + #define RK805_IRQ_PWRON_LP_MSK BIT(3) 279 + #define RK805_IRQ_HOTDIE_MSK BIT(4) 280 + #define RK805_IRQ_RTC_ALARM_MSK BIT(5) 281 + #define RK805_IRQ_RTC_PERIOD_MSK BIT(6) 282 + #define RK805_IRQ_PWRON_FALL_MSK BIT(7) 283 + 284 + #define RK805_PWR_RISE_INT_STATUS BIT(0) 285 + #define RK805_VB_LOW_INT_STATUS BIT(1) 286 + #define RK805_PWRON_INT_STATUS BIT(2) 287 + #define RK805_PWRON_LP_INT_STATUS BIT(3) 288 + #define RK805_HOTDIE_INT_STATUS BIT(4) 289 + #define RK805_ALARM_INT_STATUS BIT(5) 290 + #define RK805_PERIOD_INT_STATUS BIT(6) 291 + #define RK805_PWR_FALL_INT_STATUS BIT(7) 292 + 293 + #define RK805_BUCK1_2_ILMAX_MASK (3 << 6) 294 + #define RK805_BUCK3_4_ILMAX_MASK (3 << 3) 295 + #define RK805_RTC_PERIOD_INT_MASK (1 << 6) 296 + #define RK805_RTC_ALARM_INT_MASK (1 << 5) 297 + #define RK805_INT_ALARM_EN (1 << 3) 298 + #define RK805_INT_TIMER_EN (1 << 2) 299 + 209 300 /* RK808 IRQ Definitions */ 210 301 #define RK808_IRQ_VOUT_LO 0 211 302 #define RK808_IRQ_VB_LO 1 ··· 389 298 #define VOUT_LO_INT BIT(0) 390 299 #define CLK32KOUT2_EN BIT(0) 391 300 301 + #define TEMP115C 0x0c 302 + #define TEMP_HOTDIE_MSK 0x0c 303 + #define SLP_SD_MSK (0x3 << 2) 304 + #define SHUTDOWN_FUN (0x2 << 2) 305 + #define SLEEP_FUN (0x1 << 2) 392 306 #define RK8XX_ID_MSK 0xfff0 307 + #define FPWM_MODE BIT(7) 308 + 393 309 enum { 394 310 BUCK_ILMIN_50MA, 395 311 BUCK_ILMIN_100MA, ··· 420 322 }; 421 323 422 324 enum { 325 + RK805_BUCK1_2_ILMAX_2500MA, 326 + RK805_BUCK1_2_ILMAX_3000MA, 327 + RK805_BUCK1_2_ILMAX_3500MA, 328 + RK805_BUCK1_2_ILMAX_4000MA, 329 + }; 330 + 331 + enum { 332 + RK805_BUCK3_ILMAX_1500MA, 333 + RK805_BUCK3_ILMAX_2000MA, 334 + RK805_BUCK3_ILMAX_2500MA, 335 + RK805_BUCK3_ILMAX_3000MA, 336 + }; 337 + 338 + enum { 339 + RK805_BUCK4_ILMAX_2000MA, 340 + RK805_BUCK4_ILMAX_2500MA, 341 + RK805_BUCK4_ILMAX_3000MA, 342 + RK805_BUCK4_ILMAX_3500MA, 343 + }; 344 + 345 + enum { 346 + RK805_ID = 0x8050, 423 347 RK808_ID = 0x0000, 424 348 RK818_ID = 0x8181, 425 349 };