/* * drivers/power/axp/axp22x/axp22x.h * (C) Copyright 2010-2016 * Allwinner Technology Co., Ltd. * Pannan * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation; either version 2 of * the License, or (at your option) any later version. * */ #ifndef AXP22X_H_ #define AXP22X_H_ #include "../axp-core.h" #define AXP22X_RSB_RTSADDR (0x2d) #define AXP22X_STATUS (0x00) #define AXP22X_MODE_CHGSTATUS (0x01) #define AXP22X_IC_TYPE (0x03) #define AXP22X_BUFFER1 (0x04) #define AXP22X_BUFFER2 (0x05) #define AXP22X_BUFFER3 (0x06) #define AXP22X_BUFFER4 (0x07) #define AXP22X_BUFFER5 (0x08) #define AXP22X_BUFFER6 (0x09) #define AXP22X_BUFFER7 (0x0A) #define AXP22X_BUFFER8 (0x0B) #define AXP22X_BUFFER9 (0x0C) #define AXP22X_BUFFERA (0x0D) #define AXP22X_BUFFERB (0x0E) #define AXP22X_BUFFERC (0x0F) #define AXP22X_IPS_SET (0x30) #define AXP22X_VOFF_SET (0x31) #define AXP22X_OFF_CTL (0x32) #define AXP22X_CHARGE1 (0x33) #define AXP22X_CHARGE2 (0x34) #define AXP22X_CHARGE3 (0x35) #define AXP22X_POK_SET (0x36) #define AXP22X_INTEN1 (0x40) #define AXP22X_INTEN2 (0x41) #define AXP22X_INTEN3 (0x42) #define AXP22X_INTEN4 (0x43) #define AXP22X_INTEN5 (0x44) #define AXP22X_INTSTS1 (0x48) #define AXP22X_INTSTS2 (0x49) #define AXP22X_INTSTS3 (0x4A) #define AXP22X_INTSTS4 (0x4B) #define AXP22X_INTSTS5 (0x4C) #define AXP22X_LDO_DC_EN1 (0X10) #define AXP22X_LDO_DC_EN2 (0X12) #ifdef CONFIG_AW_AXP233 #else #define AXP22X_LDO_DC_EN3 (0X13) #endif #define AXP22X_DLDO1OUT_VOL (0x15) #define AXP22X_DLDO2OUT_VOL (0x16) #define AXP22X_DLDO3OUT_VOL (0x17) #define AXP22X_DLDO4OUT_VOL (0x18) #define AXP22X_ELDO1OUT_VOL (0x19) #define AXP22X_ELDO2OUT_VOL (0x1A) #define AXP22X_ELDO3OUT_VOL (0x1B) #define AXP22X_DC5LDOOUT_VOL (0x1C) #define AXP22X_DC1OUT_VOL (0x21) #define AXP22X_DC2OUT_VOL (0x22) #define AXP22X_DC3OUT_VOL (0x23) #define AXP22X_DC4OUT_VOL (0x24) #define AXP22X_DC5OUT_VOL (0x25) #define AXP22X_DC23_DVM_CTL (0x27) #define AXP22X_GPIO0LDOOUT_VOL (0x91) #define AXP22X_GPIO1LDOOUT_VOL (0x93) #define AXP22X_ALDO1OUT_VOL (0x28) #define AXP22X_ALDO2OUT_VOL (0x29) #define AXP22X_ALDO3OUT_VOL (0x2A) #define AXP22X_DCDC_MODESET (0x80) #ifdef CONFIG_AW_AXP233 #define AXP22X_POK_DELAY_SET (0x37) #define AXP22X_DCDC_FREQSET (0x3B) #define AXP22X_DCDC_MONITOR (0x81) #else #define AXP22X_DCDC_FREQSET (0x37) #endif #define AXP22X_ADC_EN (0x82) #define AXP22X_HOTOVER_CTL (0x8F) #define AXP22X_GPIO0_CTL (0x90) #define AXP22X_GPIO1_CTL (0x92) #define AXP22X_GPIO01_SIGNAL (0x94) #define AXP22X_BAT_CHGCOULOMB3 (0xB0) #define AXP22X_BAT_CHGCOULOMB2 (0xB1) #define AXP22X_BAT_CHGCOULOMB1 (0xB2) #define AXP22X_BAT_CHGCOULOMB0 (0xB3) #define AXP22X_BAT_DISCHGCOULOMB3 (0xB4) #define AXP22X_BAT_DISCHGCOULOMB2 (0xB5) #define AXP22X_BAT_DISCHGCOULOMB1 (0xB6) #define AXP22X_BAT_DISCHGCOULOMB0 (0xB7) #define AXP22X_COULOMB_CTL (0xB8) /* bit definitions for AXP events ,irq event */ #define AXP22X_IRQ_USBLO (1) #define AXP22X_IRQ_USBRE (2) #define AXP22X_IRQ_USBIN (3) #define AXP22X_IRQ_USBOV (4) #define AXP22X_IRQ_ACRE (5) #define AXP22X_IRQ_ACIN (6) #define AXP22X_IRQ_ACOV (7) #define AXP22X_IRQ_CHAOV (10) #define AXP22X_IRQ_CHAST (11) #define AXP22X_IRQ_BATATOU (12) #define AXP22X_IRQ_BATATIN (13) #define AXP22X_IRQ_BATRE (14) #define AXP22X_IRQ_BATIN (15) #define AXP22X_IRQ_LOWN2 (24) #define AXP22X_IRQ_LOWN1 (25) #define AXP22X_IRQ_GPIO0 (32) #define AXP22X_IRQ_GPIO1 (33) #define AXP22X_IRQ_PEKFE (37) #define AXP22X_IRQ_PEKRE (38) #define AXP22X_IRQ_TIMER (39) #ifdef CONFIG_AW_AXP233 #define AXP22X_IRQ_QBWUT (16) #define AXP22X_IRQ_BWUT (17) #define AXP22X_IRQ_QBWOT (18) #define AXP22X_IRQ_BWOT (19) #define AXP22X_IRQ_QBCUT (20) #define AXP22X_IRQ_BCUT (21) #define AXP22X_IRQ_QBCOT (22) #define AXP22X_IRQ_BCOT (23) #define AXP22X_IRQ_ICTEMOV (31) #define AXP22X_IRQ_POKOFF (33) #define AXP22X_IRQ_POKLO (34) #define AXP22X_IRQ_POKSH (35) #else #define AXP22X_IRQ_TEMLO (8) #define AXP22X_IRQ_TEMOV (9) #define AXP22X_IRQ_POKLO (16) #define AXP22X_IRQ_POKSH (17) #define AXP22X_IRQ_ICTEMOV (23) #endif /* Status Query Interface */ #define AXP22X_STATUS_SOURCE (1 << 0) #define AXP22X_STATUS_ACUSBSH (1 << 1) #define AXP22X_STATUS_BATCURDIR (1 << 2) #define AXP22X_STATUS_USBLAVHO (1 << 3) #define AXP22X_STATUS_USBVA (1 << 4) #define AXP22X_STATUS_USBEN (1 << 5) #define AXP22X_STATUS_ACVA (1 << 6) #define AXP22X_STATUS_ACEN (1 << 7) #define AXP22X_STATUS_BATINACT (1 << 11) #define AXP22X_STATUS_BATEN (1 << 13) #define AXP22X_STATUS_INCHAR (1 << 14) #define AXP22X_STATUS_ICTEMOV (1 << 15) extern struct axp_config_info axp22x_config; #endif /* AXP22X_H_ */