summaryrefslogtreecommitdiff
path: root/drivers/power
Commit message (Collapse)AuthorAgeLines
* Add GPL-2.0+ SPDX-License-Identifier to source filesWolfgang Denk2013-07-24-329/+20
| | | | | | Signed-off-by: Wolfgang Denk <wd@denx.de> [trini: Fixup common/cmd_io.c] Signed-off-by: Tom Rini <trini@ti.com>
* power:bat:trats: Break battery charging with ctrl+CŁukasz Majewski2013-07-05-5/+11
| | | | | | | | | | Add support for disabling battery charging with ctrl+C keyboard combination pressed. Moreover the battery update is done more frequently. Signed-off-by: Lukasz Majewski <l.majewski@samsung.com> Cc: Tom Rini <trini@ti.com> Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
* Merge branch 'u-boot-samsung/master' into 'u-boot-arm/master'Albert ARIBAUD2013-06-19-48/+75
|\ | | | | | | | | Conflicts: spl/Makefile
| * power: exynos-tmu: use the mux_addr bit fields in tmu_control registerNaveen Krishna Chatradhi2013-06-13-1/+10
| | | | | | | | | | | | | | | | | | This patch implements the mux_addr bit fields defined in tmu_control register (used for debugging purpose) Signed-off-by: Naveen Krishna Chatradhi <ch.naveen@samsung.com> Reviewed-by: Vadim Bendebury <vbendeb@google.com> Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
| * power: exynos-tmu: fix warnings and clean up codeNaveen Krishna Chatradhi2013-06-13-47/+65
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch does the folowing 1. change the data types for unsigned int variable to unsigned 2. change the tmu_base type to struct exynos5_tmu_reg * 3. Add timer functionality for get_cur_temp() 4. error handling in the get_tmu_fdt_values() 5. Add check for curr_temp reading 6. some cosmotic changes. Signed-off-by: Naveen Krishna Chatradhi <ch.naveen@samsung.com> Reviewed-by: Vadim Bendebury <vbendeb@google.com> Acked-by: Simon Glass <sjg@chromium.org> Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
* | ARM: OMAP5: Power: Add more functionality to Palmas driverLubomir Popov2013-06-10-12/+121
|/ | | | | | | | | | Add some useful functions, and the corresponding definitions. Add support for powering on the dra7xx_evm SD/MMC LDO (courtesy Lokesh Vutla <lokeshvutla@ti.com>). Signed-off-by: Lubomir Popov <lpopov@mm-sol.com> Reviewed-by: Tom Rini <trini@ti.com>
* palmas: use palmas_i2c_[read|write]_u8Nishanth Menon2013-05-10-24/+2
| | | | | | | | | | | | | | | | | commit 21144298 (power: twl6035: add palmas PMIC support) introduced twl6035_i2c_[read|write]_u8 Then, commit dd23e59d (omap5: pbias ldo9 turn on) introduced palmas_[read|write]_u8 for precisely the same access function. TWL6035 belongs to the palmas family, so instead of having an twl6035 API, we could use an generic palmas API instead. To stay consistent with the function naming of twl4030,6030 accessors, we use palmas_i2c_[read|write]_u8 Cc: Balaji T K <balajitk@ti.com> Cc: Sricharan R <r.sricharan@ti.com> Reported-by: Ruchika Kharwar <ruchika@ti.com> Signed-off-by: Nishanth Menon <nm@ti.com>
* palmas: rename twl6035_mmc1_poweron_ldo with an palmas generic functionNishanth Menon2013-05-10-1/+1
| | | | | | | | Since TPS659038/TWL6035/TWL6037 all belong to palmas family of TI PMICs, rename twl6035_mmc1_poweron_ldo by a more generic palmas_mmc1_poweron_ldo function. Signed-off-by: Nishanth Menon <nm@ti.com>
* palmas: rename init_settings to an generic palmas initNishanth Menon2013-05-10-1/+1
| | | | | | | Since TPS659038/TWL6035/TWL6037 all belong to palmas family of TI PMICs, rename twl6035_init_settings with an more generic palmas_init_settings Signed-off-by: Nishanth Menon <nm@ti.com>
* twl6035: rename to palmasNishanth Menon2013-05-10-3/+3
| | | | | | | | | | | TPS659038/TWL6035/TWL6037 all belong to palmas family of TI PMICs Rename twl6035 to palmas to allow reuse across multiple current and future platforms As part of this change, change the CONFIG_TWL6035_POWER to CONFIG_PALMAS_POWER and update usage of header file accordingly. Signed-off-by: Nishanth Menon <nm@ti.com>
* twl6030: move twl6030 register access functions to common header fileNishanth Menon2013-05-10-11/+0
| | | | | | | | twl6030_i2c_[read|write]_u8 can be used else where to access multi-function device such as twl6030, so move the register access functions to the common twl6030.h header file. Signed-off-by: Nishanth Menon <nm@ti.com>
* twl6030: twl6030_i2c_[read|write]_u8 prototype consistentNishanth Menon2013-05-10-34/+34
| | | | | | | | | | | | | | | u-boot standard i2c register access prototype is i2c_read(addr, reg, 1, &buf, 1) i2c_reg_write(u8 addr, u8 reg, u8 val) twl6030_i2c_read_u8(u8 addr, u8 *val, u8 reg) twl6030_i2c_write_u8(u8 addr, u8 val, u8 reg) does not provide consistency, so switch the prototype to be consistent with rest of u-boot i2c operations: twl6030_i2c_read_u8(u8 addr, u8 reg, u8 *val) twl6030_i2c_write_u8(u8 addr, u8 reg, u8 val) Signed-off-by: Nishanth Menon <nm@ti.com>
* twl4030: make twl4030_i2c_read_u8 prototype consistentNishanth Menon2013-05-10-2/+2
| | | | | | | | | | | | u-boot standard i2c read prototype is i2c_read(addr, reg, 1, &buf, 1) twl4030_i2c_read_u8(u8 addr, u8 *val, u8 reg) does not provide consistency, so switch the prototype to be consistent with rest of u-boot i2c operations: twl4030_i2c_read_u8(u8 addr, u8 reg, u8 *val) Signed-off-by: Nishanth Menon <nm@ti.com>
* twl4030: make twl4030_i2c_write_u8 prototype consistentNishanth Menon2013-05-10-6/+6
| | | | | | | | | | | | u-boot standard i2c register write prototype is i2c_reg_write(u8 addr, u8 reg, u8 val) twl4030_i2c_write_u8(u8 addr, u8 val, u8 reg) does not provide consistency, so switch the prototype to be consistent with rest of u-boot i2c operations: twl4030_i2c_write_u8(u8 addr, u8 reg, u8 val) Signed-off-by: Nishanth Menon <nm@ti.com>
* Exynos5: TMU: Add hardware trippingAkshay Saraswat2013-03-12-5/+20
| | | | | | | | | This adds hardware tripping at 110 degrees celsius which must enable forced system shutdown in case TMU fails to power off. Signed-off-by: Akshay Saraswat <akshay.s@samsung.com> Acked-by: Simon Glass <sjg@chromium.org> Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
* Exynos5: TMU: Add driver for Thermal Management UnitAkshay Saraswat2013-03-12-0/+305
| | | | | | | | | Adding Exynos Thermal Management Unit driver to monitor SOC temperature and take actions corresponding to states of TMU. Signed-off-by: Akshay Saraswat <akshay.s@samsung.com> Acked-by: Simon Glass <sjg@chromium.org> Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
* Merge branch 'agust@denx.de' of git://git.denx.de/u-boot-stagingTom Rini2013-01-14-2/+2
|\
| * twl4030: fix 'could could' in error messagesPeter Meerwald2013-01-14-2/+2
| | | | | | | | Signed-off-by: Peter Meerwald <p.meerwald@bct-electronic.com>
* | Merge branch 'u-boot-samsung/master' into 'u-boot-arm/master'Albert ARIBAUD2013-01-14-3/+34
|\ \ | |/ |/|
| * PMIC: MAX77686: Add FDT SupportRajeshwari Shinde2013-01-10-3/+34
| | | | | | | | | | | | | | This patch adds fdt support to MAX77686. Signed-off-by: Rajeshwari Shinde <rajeshwari.s@samsung.com> Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
* | Merge branch 'u-boot-ti/master' into 'u-boot-arm/master'Albert ARIBAUD2013-01-08-4/+13
|\ \ | |/ |/| | | | | This required manual merging drivers/mtd/nand/Makefile and adding am335x_evm support for CONFIG_SPL_NAND_DRIVERS
| * power: twl6035: complain on LDO9 errorVincent Stehlé2012-12-10-4/+13
| | | | | | | | | | | | | | We handle i2c_write return code and complain in case of error. We propagate the error, too, to allow better handling at the upper level in the future. Signed-off-by: Vincent Stehlé <v-stehle@ti.com>
* | POWER: MAX77686: Modified as per the latest ImplementationRajeshwari Shinde2012-12-11-0/+49
| | | | | | | | | | | | | | | | | | | | Moved the pmic_max77686.c max77686_pmic.h to drivers/power and made required changes accordingly Signed-off-by: Rajeshwari Shinde <rajeshwari.s@samsung.com> Reviewed-by: Lukasz Majewski <l.majewski@samsung.com> Acked-by: Lukasz Majewski <l.majewski@samsung.com> Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
* | Merge branch 'master' of git://git.denx.de/u-boot into resolveMinkyu Kang2012-12-10-3/+1347
|\ \ | |/ |/| | | | | | | | | | | | | | | | | Conflicts: README board/samsung/universal_c210/universal.c drivers/misc/Makefile drivers/power/power_fsl.c include/configs/mx35pdk.h include/configs/mx53loco.h include/configs/seaboard.h
| * power:pmic: Rename CONFIG_DIALOG_PMIC defines to CONFIG_DIALOG_POWERŁukasz Majewski2012-11-14-1/+1
| | | | | | | | | | | | | | | | Rename CONFIG_DIALOG_PMIC to CONFIG_DIALOG_POWER Signed-off-by: Lukasz Majewski <l.majewski@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Cc: Stefano Babic <sbabic@denx.de>
| * power:pmic: Rename CONFIG_PMIC* defines to CONFIG_POWERŁukasz Majewski2012-11-14-10/+10
| | | | | | | | | | | | | | | | Rename all CONFIG_PMIC* defines to CONFIG_POWER* Signed-off-by: Lukasz Majewski <l.majewski@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Cc: Stefano Babic <sbabic@denx.de>
| * power:pmic: Rename ./drivers/power/pmic_* to ./drivers/power/power_* filesŁukasz Majewski2012-11-14-5/+5
| | | | | | | | | | | | | | | | Rename pmic/power related files at ./drivers/power directory Signed-off-by: Lukasz Majewski <l.majewski@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Cc: Stefano Babic <sbabic@denx.de>
| * pmic: Extend PMIC framework to support battery related commandsŁukasz Majewski2012-11-14-17/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | Two extra commands: "pmic name bat state" and "pmic name bat charge" has been added to pmic framework. Those provides state display and charge capabilities to named batteries. The pmic_core.c file has been refactored to more consistent name scheme. Signed-off-by: Lukasz Majewski <l.majewski@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Cc: Stefano Babic <sbabic@denx.de>
| * pmic:max8997: Support for MAX8997 internal charger controlŁukasz Majewski2012-11-14-1/+58
| | | | | | | | | | | | | | | | Support for MAX8997 built-in charger. Signed-off-by: Lukasz Majewski <l.majewski@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Cc: Stefano Babic <sbabic@denx.de>
| * pmic:max8997: Function for calculating LDO internal register valueŁukasz Majewski2012-11-14-0/+16
| | | | | | | | | | | | | | | | | | Function for calculating LDO internal register value from passed micro Volt. Signed-off-by: Lukasz Majewski <l.majewski@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Cc: Stefano Babic <sbabic@denx.de>
| * pmic:fuel-gauge: Support for MAX17042 fuel-gaugeŁukasz Majewski2012-11-14-0/+297
| | | | | | | | | | | | | | | | | | | | | | | | | | Support for MAX17042 fuel-gauge (FG), which is built into the MAX8997 power management device. Special file - fg_battery_cell_params.h with cells characteristics added. The FG device will work with redesigned PMIC framework. Signed-off-by: Lukasz Majewski <l.majewski@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Cc: Stefano Babic <sbabic@denx.de>
| * pmic:muic: Support for MUIC built into MAX8997 deviceŁukasz Majewski2012-11-14-0/+91
| | | | | | | | | | | | | | | | | | | | | | Support for MUIC (Micro USB Integrated Circuit) built into the MAX8997 power management device. The MUIC device will work with redesigned PMIC framework. Signed-off-by: Lukasz Majewski <l.majewski@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Cc: Stefano Babic <sbabic@denx.de>
| * pmic:battery: Support for Trats Battery at PMIC frameworkŁukasz Majewski2012-11-14-0/+147
| | | | | | | | | | | | | | | | | | | | Trats battery is now treated in the same way as other power related devices. This approach allows for more unified handling of all devices responsible for power management. Signed-off-by: Lukasz Majewski <l.majewski@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Cc: Stefano Babic <sbabic@denx.de>
| * pmic: Move pmic related code to ./drivers/power directoryŁukasz Majewski2012-11-14-3/+708
|/ | | | | | | | The PMIC framework has been moved to its more natural place ./drivers/power from ./drivers/misc directory. Signed-off-by: Lukasz Majewski <l.majewski@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
* i2c: Add TPS6586X driverSimon Glass2012-05-15-0/+281
| | | | | | | | | This power management chip supports battery charging and a large number of power supplies. This initial driver only provides the ability to adjust the two synchronous buck converters SM0 and SM1 in a stepwise manner. Signed-off-by: Simon Glass <sjg@chromium.org> Signed-off-by: Tom Warren <twarren@nvidia.com>
* omap5: pbias ldo9 turn onBalaji T K2012-05-15-0/+25
| | | | | | | Add omap5 pbias configuration for mmc1/sd lines and set voltage for sd data i/o lines Signed-off-by: Balaji T K <balajitk@ti.com>
* power: twl6035: add palmas PMIC supportSRICHARAN R2012-05-15-0/+41
| | | | | | palmas/TWL6035 is power IC for omap5 evm boards Signed-off-by: Balaji T K <balajitk@ti.com>
* twl4030: fix potential power supply handling issuesGrazvydas Ignotas2012-03-27-4/+14
| | | | | | | | | | | | | | twl4030_pmrecv_vsel_cfg currently first sets up device group (effectively enabling the supply), and only then sets vsel (selects voltage). This could lead to wrong voltage for a short time, or even long time if second i2c write fails. Fix this by writing vsel first and device group after that. Also introduce error checking to not enable the supply if we failed to set the voltage, and start logging errors as power supply problems are usually important. Signed-off-by: Grazvydas Ignotas <notasas@gmail.com>
* omap: TWL4030 Bump VMMC1 interface voltage from 3V to 3.15VAsh Charles2011-12-09-2/+2
| | | | | | | | | | | | MMC interfaces are specified to be 3.3V compatible with an operating voltage range of 3.1V to 3.5V for SD cards. This change affects hardware using TWL4030 (TPS6595x) PMICs and should improve the reliability when communicating with marginally-spec'd MMC devices. 3.15V is the highest possible level for this chip. This patch has been tested on a Gumstix Overo board. Signed-off-by: Ash Charles <ash@gumstix.com> Tested-by: Steve Sakoman <steve@sakoman.com>
* mmc: omap: config VMMC, MMC1_PBIASBalaji T K2011-09-30-0/+7
| | | | | | | | | | Config VMMC voltage to 3V for MMC/SD card slot and PBIAS settings needed for OMAP4 Fixes MMC/SD detection on boot from eMMC. Signed-off-by: Balaji T K <balajitk@ti.com> Signed-off-by: Aneesh V <aneesh@ti.com> Signed-off-by: Sandeep Paulraj <s-paulraj@ti.com>
* ftpmu010: fix relocation and enhance featuresMacpaul Lin2011-04-27-2/+37
| | | | | | | | | | | | | | | | | | | 1. ftpmu010.h: fix and add definitions Enhanced for more features and asm related support according to datasheet. Note: - FTPMU010_PDLLCR0_HCLKOUTDIS is "incorrect" in datasheet. - FTPMU010_PDLLCR0_DLLFRANG is only 1 bit at bit #19. (not 20-19) - FTPMU010_PDLLCR0_HCLKOUTDIS is 4 bits at bit #20. (not 24-21) 2. ftpmu010.c: enhance features and fix relocation - The following functions is added for pmu features. ftpmu010_mfpsr_select_dev() ftpmu010_sdramhtc_set() - This patch also fix the declare statement for relocation. Signed-off-by: Macpaul Lin <macpaul@andestech.com>
* power: ftpmu010: move drivers/power/ftpmu010.h to include/faradayPo-Yu Chuang2011-04-27-147/+1
| | | | | | | Also add API declarations. Signed-off-by: Po-Yu Chuang <ratbert@faraday-tech.com> Signed-off-by: Albert Aribaud <albert.aribaud@free.fr>
* ftpmu010: support faraday ftpmu010 driverMacpaul Lin2011-01-25-0/+212
| | | | | | | | | Faraday's ftpmu010 is a power managemnet unit which support cpu sleep and frequency scaling. It has been integrated into many SoC. This patch also move ftpmu010 to a proper place for later enhancement. Signed-off-by: Macpaul Lin <macpaul@andestech.com>
* ARMV7: OMAP4: twl6030 add battery charging supportBalaji T K2010-12-11-2/+122
| | | | | | | | | | Add battery charging support twl6030 driver. Add support for battery voltage and current measurements. Add command to get battery status and start/stop battery charging from USB. Signed-off-by: Balaji T K <balajitk@ti.com> Tested-by: Steve Sakoman <steve.sakoman@linaro.org> Signed-off-by: Sandeep Paulraj <s-paulraj@ti.com>
* Switch from archive libraries to partial linkingSebastien Carlier2010-11-17-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | Before this commit, weak symbols were not overridden by non-weak symbols found in archive libraries when linking with recent versions of binutils. As stated in the System V ABI, "the link editor does not extract archive members to resolve undefined weak symbols". This commit changes all Makefiles to use partial linking (ld -r) instead of creating library archives, which forces all symbols to participate in linking, allowing non-weak symbols to override weak symbols as intended. This approach is also used by Linux, from which the gmake function cmd_link_o_target (defined in config.mk and used in all Makefiles) is inspired. The name of each former library archive is preserved except for extensions which change from ".a" to ".o". This commit updates references accordingly where needed, in particular in some linker scripts. This commit reveals board configurations that exclude some features but include source files that depend these disabled features in the build, resulting in undefined symbols. Known such cases include: - disabling CMD_NET but not CMD_NFS; - enabling CONFIG_OF_LIBFDT but not CONFIG_QE. Signed-off-by: Sebastien Carlier <sebastien.carlier@gmail.com>
* Prepare v2010.09-rc1v2010.09-rc1Wolfgang Denk2010-09-10-1/+0
| | | | | | Coding style cleanup. Signed-off-by: Wolfgang Denk <wd@denx.de>
* ARMV7: OMAP: add convenience function to set TWL4030 regulator voltagesSteve Sakoman2010-09-08-39/+30
| | | | | | | | | | | This patch adds a function to allow one to easily set the target voltage for the TWL4030 regulators. It also modifies the existing code to use this new function. Applicable definitions are moved out of the driver file and into the header file so that they are generally accessible Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Sandeep Paulraj <s-paulraj@ti.com>
* ARMV7: Add support for the TWL6030 I2C power chip used in OMAP4 systemsSteve Sakoman2010-08-05-0/+79
| | | | | | | | This patch add the basic infrastructure for the TWL6030 driver and enables support in the two existing OMAP4 boards, Panda and OMAP4430 SDP Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Sandeep Paulraj <s-paulraj@ti.com>
* OMAP3 Move twl4030 mmc functionTom Rix2009-07-29-0/+15
| | | | | | | | | | | | | | | | | | | | | | Because twl4030 now has its own device files, move and rename twl4030_mmc_config. twl4030_mmc_config initializes the twl4030 power setting to the mmc device. Because it is in the twl4030 power domain, move it out of drivers/mmc/omap3_mmc.c and into drivers/power/twl4030.c. The function was renamed to twl4030_power_mmc_init because all the functions in this file are to have the format twl4030_power_<device>_<action> In this case the suffix is mmc_init so device : mmc action : init Signed-off-by: Tom Rix <Tom.Rix@windriver.com> Acked-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Acked-by: Heiko Schocher <hs@denx.de>
* OMAP3 Move twl4030 power and led functionsTom Rix2009-07-29-1/+54
| | | | | | | | | | | | | | | | | | | | | | | | Because twl4030 now has its own device files, move exiting omap3 power_init_r to a new location. power_init_r is the only function in board/omap3/common. It initializes the twl4030 power for the board and enables the led. The power part of the the function is moved to twl4030_power_init in drivers/power/twl4030.c The power compilation is conditional on the existing config variable CONFIG_TWL4030_POWER. The led part is moved to twl4030_led_init in the new file drivers/misc/twl4030_led.c The led compilation is conditional on the new config variable CONFIG_TWL4030_LED The directory board/omap3/common was removed because power_init_r was the only function in it. Signed-off-by: Tom Rix <Tom.Rix@windriver.com> Acked-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Acked-by: Heiko Schocher <hs@denx.de>