/* * Using the twl4030 core we address registers using a pair * { module id, relative register offset } * which that core then maps to the relevant * { i2c slave, absolute register address } * * The module IDs are meaningful only to the twl4030 core code, * which uses them as array indices to look up the first register * address each module uses within a given i2c slave.
*/
/* Module IDs for similar functionalities found in twl4030/twl6030 */ enum twl_module_ids {
TWL_MODULE_USB,
TWL_MODULE_PIH,
TWL_MODULE_MAIN_CHARGE,
TWL_MODULE_PM_MASTER,
TWL_MODULE_PM_RECEIVER,
/* Modules only available in twl4030 series */ enum twl4030_module_ids {
TWL4030_MODULE_AUDIO_VOICE = TWL_MODULE_LAST,
TWL4030_MODULE_GPIO,
TWL4030_MODULE_INTBR,
TWL4030_MODULE_TEST,
TWL4030_MODULE_KEYPAD,
/* Modules only available in twl6030 series */ enum twl6030_module_ids {
TWL6030_MODULE_ID0 = TWL_MODULE_LAST,
TWL6030_MODULE_ID1,
TWL6030_MODULE_ID2,
TWL6030_MODULE_GPADC,
TWL6030_MODULE_GASGAUGE,
/* A few extra registers before the registers shared with the 6030 */
TWL6032_MODULE_CHARGE,
TWL6030_MODULE_LAST,
};
/* Until the clients has been converted to use TWL_MODULE_LED */ #define TWL4030_MODULE_LED TWL_MODULE_LED
/* * NOTE: at up to 1024 registers, this is a big chip. * * Avoid putting register declarations in this file, instead of into * a driver-private file, unless some of the registers in a block * need to be shared with other drivers. One example is blocks that * have Secondary IRQ Handler (SIH) registers.
*/
/* The TWL4030/5030 splits its power-management resources (the various * regulators, clock and reset lines) into 3 processor groups - P1, P2 and * P3. These groups can then be configured to transition between sleep, wait-on * and active states by sending messages to the power bus. See Section 5.4.2 * Power Resources of TWL4030 TRM
*/
/* Processor groups */ #define DEV_GRP_NULL 0x0 #define DEV_GRP_P1 0x1 /* P1: all OMAP devices */ #define DEV_GRP_P2 0x2 /* P2: all Modem devices */ #define DEV_GRP_P3 0x4 /* P3: all peripheral devices */
/* Resource groups */ #define RES_GRP_RES 0x0 /* Reserved */ #define RES_GRP_PP 0x1 /* Power providers */ #define RES_GRP_RC 0x2 /* Reset and control */ #define RES_GRP_PP_RC 0x3 #define RES_GRP_PR 0x4 /* Power references */ #define RES_GRP_PP_PR 0x5 #define RES_GRP_RC_PR 0x6 #define RES_GRP_ALL 0x7 /* All resource groups */
#define TOTAL_RESOURCES 28 /* * Power Bus Message Format ... these can be sent individually by Linux, * but are usually part of downloaded scripts that are run when various * power events are triggered. * * Broadcast Message (16 Bits): * DEV_GRP[15:13] MT[12] RES_GRP[11:9] RES_TYPE2[8:7] RES_TYPE[6:4] * RES_STATE[3:0] * * Singular Message (16 Bits): * DEV_GRP[15:13] MT[12] RES_ID[11:4] RES_STATE[3:0]
*/
struct twl4030_bci_platform_data { int *battery_tmp_tbl; unsignedint tblsize; int bb_uvolt; /* voltage to charge backup battery */ int bb_uamp; /* current for backup battery charging */
};
/* TWL4030_GPIO_MAX (18) GPIOs, with interrupts */ struct twl4030_gpio_platform_data { /* package the two LED signals as output-only GPIOs? */ bool use_leds;
/* gpio-n should control VMMC(n+1) if BIT(n) in mmc_cd is set */
u8 mmc_cd;
/* if BIT(N) is set, or VMMC(n+1) is linked, debounce GPIO-N */
u32 debounce;
/* For gpio-N, bit (1 << N) in "pullups" is set if that pullup * should be enabled. Else, if that bit is set in "pulldowns", * that pulldown is enabled. Don't waste power by letting any * digital inputs float...
*/
u32 pullups;
u32 pulldowns;
};
struct twl4030_madc_platform_data { int irq_line;
};
/* Boards have unique mappings of {row, col} --> keycode. * Column and row are 8 bits each, but range only from 0..7. * a PERSISTENT_KEY is "always on" and never reported.
*/ #define PERSISTENT_KEY(r, c) KEY((r), (c), KEY_RESERVED)
int (*phy_init)(struct device *dev); int (*phy_exit)(struct device *dev); /* Power on/off the PHY */ int (*phy_power)(struct device *dev, int iD, int on); /* enable/disable phy clocks */ int (*phy_set_clock)(struct device *dev, int on); /* suspend/resume of phy */ int (*phy_suspend)(struct device *dev, int suspend);
};
/* twl6040 */ int audpwron_gpio; /* audio power-on gpio */ int naudint_irq; /* audio interrupt */ unsignedint irq_base;
};
struct twl_regulator_driver_data { int (*set_voltage)(void *data, int target_uV); int (*get_voltage)(void *data); void *data; unsignedlong features;
}; /* chip-specific feature flags, for twl_regulator_driver_data.features */ #define TWL4030_VAUX2 BIT(0) /* pre-5030 voltage ranges */ #define TPS_SUBSET BIT(1) /* tps659[23]0 have fewer LDOs */ #define TWL5031 BIT(2) /* twl5031 has different registers */ #define TWL6030_CLASS BIT(3) /* TWL6030 class */ #define TWL6032_SUBCLASS BIT(4) /* TWL6032 has changed registers */ #define TWL4030_ALLOW_UNSUPPORTED BIT(5) /* Some voltages are possible * but not officially supported. * This flag is necessary to * enable them.
*/
/* Linux-specific regulator identifiers ... for now, we only support * the LDOs, and leave the three buck converters alone. VDD1 and VDD2 * need to tie into hardware based voltage scaling (cpufreq etc), while * VIO is generally fixed.
*/
/* EXTERNAL LDOs */ #define TWL4030_REG_VDAC 3 #define TWL4030_REG_VPLL1 4 #define TWL4030_REG_VPLL2 5 /* not on all chips */ #define TWL4030_REG_VMMC1 6 #define TWL4030_REG_VMMC2 7 /* not on all chips */ #define TWL4030_REG_VSIM 8 /* not on all chips */ #define TWL4030_REG_VAUX1 9 /* not on all chips */ #define TWL4030_REG_VAUX2_4030 10 /* (twl4030-specific) */ #define TWL4030_REG_VAUX2 11 /* (twl5030 and newer) */ #define TWL4030_REG_VAUX3 12 /* not on all chips */ #define TWL4030_REG_VAUX4 13 /* not on all chips */
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.