diff options
author | Lokesh Vutla <lokeshvutla@ti.com> | 2016-11-23 12:54:39 +0530 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2016-12-04 13:54:48 -0500 |
commit | beb71279d865deb77b2faa86d7d1d180df8339a0 (patch) | |
tree | 7c9c9969c2bfd9cfed3de41ad38cfd0836a14e10 /arch/arm/include/asm/omap_common.h | |
parent | f2388331026dec9526915ae3ea92ba3538830548 (diff) | |
download | u-boot-beb71279d865deb77b2faa86d7d1d180df8339a0.tar.gz u-boot-beb71279d865deb77b2faa86d7d1d180df8339a0.tar.xz u-boot-beb71279d865deb77b2faa86d7d1d180df8339a0.zip |
ARM: OMAP4+: Add support for dynamically selecting OPPs
It can be expected that different paper spins of a SoC can have
different definitions for OPP and can have their own constraints
on the boot up OPP for each voltage rail. In order to have this
flexibility, add support for dynamically selecting the OPP voltage
based on the board to handle any such exceptions.
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Diffstat (limited to 'arch/arm/include/asm/omap_common.h')
-rw-r--r-- | arch/arm/include/asm/omap_common.h | 23 |
1 files changed, 21 insertions, 2 deletions
diff --git a/arch/arm/include/asm/omap_common.h b/arch/arm/include/asm/omap_common.h index 290a190c7b..c3d5cda6a1 100644 --- a/arch/arm/include/asm/omap_common.h +++ b/arch/arm/include/asm/omap_common.h @@ -539,18 +539,26 @@ struct pmic_data { int (*pmic_write)(u8 sa, u8 reg_addr, u8 reg_data); }; +enum { + OPP_LOW, + OPP_NOM, + OPP_OD, + OPP_HIGH, + NUM_OPPS, +}; + /** * struct volts_efuse_data - efuse definition for voltage * @reg: register address for efuse * @reg_bits: Number of bits in a register address, mandatory. */ struct volts_efuse_data { - u32 reg; + u32 reg[NUM_OPPS]; u8 reg_bits; }; struct volts { - u32 value; + u32 value[NUM_OPPS]; u32 addr; struct volts_efuse_data efuse; struct pmic_data *pmic; @@ -558,6 +566,16 @@ struct volts { u32 abb_tx_done_mask; }; +enum { + VOLT_MPU, + VOLT_CORE, + VOLT_MM, + VOLT_GPU, + VOLT_EVE, + VOLT_IVA, + NUM_VOLT_RAILS, +}; + struct vcores_data { struct volts mpu; struct volts core; @@ -612,6 +630,7 @@ void enable_usb_clocks(int index); void disable_usb_clocks(int index); void scale_vcores(struct vcores_data const *); +int get_voltrail_opp(int rail_offset); u32 get_offset_code(u32 volt_offset, struct pmic_data *pmic); void do_scale_vcore(u32 vcore_reg, u32 volt_mv, struct pmic_data *pmic); void abb_setup(u32 fuse, u32 ldovbb, u32 setup, u32 control, |