X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=include%2Fpalmas.h;h=e259a4d04ba4efb08450a9ebb54ac48d51cc87a6;hb=d2e5250be49fce4653689c41a5dc7e2d7e7ecf33;hp=f74f08e2d86cfffd32905725d767a21474b242ac;hpb=1a4596601fd395f3afb8f82f3f840c5e00bdd57a;p=platform%2Fkernel%2Fu-boot.git diff --git a/include/palmas.h b/include/palmas.h index f74f08e..e259a4d 100644 --- a/include/palmas.h +++ b/include/palmas.h @@ -1,8 +1,7 @@ +/* SPDX-License-Identifier: GPL-2.0+ */ /* * (C) Copyright 2012-2013 * Texas Instruments, - * - * SPDX-License-Identifier: GPL-2.0+ */ #ifndef PALMAS_H #define PALMAS_H @@ -24,6 +23,24 @@ #define LDO1_CTRL 0x50 #define LDO1_VOLTAGE 0x51 +/* LDO1 control/voltage for LP873x */ +#define LP873X_LDO1_ADDR 0x60 +#define LP873X_LDO1_CTRL 0x9 +#define LP873X_LDO1_VOLTAGE 0xa +#define LP873X_LDO_VOLT_3V0 0x19 +#define LP873X_LDO_VOLT_1V8 0xa +#define LP873X_LDO_CTRL_EN (0x1 << 0) +#define LP873X_LDO_CTRL_EN_PINCTRL (0x1 << 1) +#define LP873X_LDO_CTRL_RDIS_EN (0x1 << 2) + +/* LDO2 control/voltage */ +#define LDO2_CTRL 0x52 +#define LDO2_VOLTAGE 0x53 + +/* LDO2 control/voltage */ +#define LDO4_CTRL 0x5e +#define LDO4_VOLTAGE 0x5f + /* LDO9 control/voltage */ #define LDO9_CTRL 0x60 #define LDO9_VOLTAGE 0x61 @@ -31,6 +48,7 @@ /* LDOUSB control/voltage */ #define LDOUSB_CTRL 0x64 #define LDOUSB_VOLTAGE 0x65 +#define LDO_CTRL 0x6a /* Control of 32 kHz audio clock */ #define CLK32KGAUDIO_CTRL 0xd5 @@ -62,6 +80,10 @@ #define SMPS9_CTRL 0x38 #define SMPS9_VOLTAGE 0x3b +/* SMPS10_CTRL */ +#define SMPS10_CTRL 0x3c +#define SMPS10_MODE_ACTIVE_D 0x0d + /* Bit field definitions for SMPSx_CTRL */ #define SMPS_MODE_ACT_AUTO 1 #define SMPS_MODE_ACT_ECO 2 @@ -95,6 +117,7 @@ #define BB_VSEL_VBAT (3 << 1) #define BB_CHRG_EN (1 << 0) +#if !CONFIG_IS_ENABLED(DM_I2C) /* * Functions to read and write from TPS659038/TWL6035/TWL6037 * or other Palmas family of TI PMICs @@ -108,11 +131,17 @@ static inline int palmas_i2c_read_u8(u8 chip_no, u8 reg, u8 *val) { return i2c_read(chip_no, reg, 1, val, 1); } +#else +int palmas_i2c_write_u8(u8 chip_no, u8 reg, u8 val); +int palmas_i2c_read_u8(u8 chip_no, u8 reg, u8 *val); +#endif void palmas_init_settings(void); -int palmas_mmc1_poweron_ldo(void); +int palmas_mmc1_poweron_ldo(uint ldo_volt, uint ldo_ctrl, uint voltage); +int lp873x_mmc1_poweron_ldo(uint voltage); int twl603x_mmc1_set_ldo9(u8 vsel); int twl603x_audio_power(u8 on); int twl603x_enable_bb_charge(u8 bb_fields); +int palmas_enable_ss_ldo(void); #endif /* PALMAS_H */