summaryrefslogtreecommitdiff
path: root/drivers/power
AgeCommit message (Collapse)Author
2017-05-15power: twl4030: Add imply CMD_POWEROFF when TWL4030 is enabledAdam Ford
Now that CMD_POWEROFF can turn off the twl4030, let's imply that just incase someone wants to disable it. Signed-off-by: Adam Ford <aford173@gmail.com> Reviewed-by: Tom Rini <trini@konsulko.com>
2017-05-10Merge git://git.denx.de/u-boot-rockchipTom Rini
This adds a new firefly-rk3399 board, MIPI support for rk3399 and rk3288, rk818 pmic support, mkimage improvements for rockchip and a few other things.
2017-05-10Merge branch 'master' of git://git.denx.de/u-boot-mipsTom Rini
2017-05-10power: rk808: rename to rk8xxJacob Chen
Since this driver can be used for rk8xx series pmic, let's rename rk808 to rk8xx, to make it clear. Configs parts are done by sed -i "s/RK808/RK8XX/g" `grep RK808 -lr ./` Signed-off-by: Jacob Chen <jacob-chen@iotwrt.com>
2017-05-10power: regulator: rk808: add rk818 supportJacob Chen
Add support for the rk818 regulator. The regulator module consists of 4 DCDCs, 9 LDOs, 1 switch and 1 BOOST converter which is used to power OTG and HDMI5V. Signed-off-by: Jacob Chen <jacob-chen@iotwrt.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2017-05-10power: regulator: rk808: replace vsel_bits with vsel_maskJacob Chen
Using mask is more flexible than bits. Signed-off-by: Jacob Chen <jacob-chen@iotwrt.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2017-05-10power: pmic: rk808: add RK818 supportJacob Chen
The RK818 chip is a Power Management IC (PMIC) for multimedia and handheld devices. For boards use rk818, the input current should be set in the early stage, before ddr initialization. Signed-off-by: Jacob Chen <jacob-chen@iotwrt.com>
2017-05-10power: pmic: append rk818 regs to rk808Jacob Chen
Both RK808 and RK818 chips are using a similar register map, so we can reuse them. I have also add reg prefix to exist registers, to keep them same style. Signed-off-by: Jacob Chen <jacob-chen@iotwrt.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2017-05-10power: regulator: pwm: support pwm polarity settingKever Yang
The latest kernel PWM drivers enable the polarity settings. When system run from U-Boot to kerenl, if there are differences in polarity set or duty cycle, the PMW will re-init: close -> set polarity and duty cycle -> enable the PWM. The power supply controled by pwm regulator may have voltage shaking, which lead to the system not stable. Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com> Signed-off-by: Kever Yang <kever.yang@rock-chips.com> Acked-by: Simon Glass <sjg@chromium.org>
2017-05-10dm: power: domain: add BCM6328 power domain driverÁlvaro Fernández Rojas
This allows controlling MISC IDDQ register on BCM6328 SoCs. Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2017-05-10power: twl4030: Move CONFIG_TWL4030_POWER to KconfigAdam Ford
As requested, I added the CONFIG_TWL4030_POWER to Kconfig and made it the implied default when selecting OMAP34XX as a platform. Signed-off-by: Adam Ford <aford173@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2017-05-10power: twl4030: Add CONFIG_CMD_POWEROFF supportAdam Ford
With the addition of twl4030_power_off(), let's allow the 'poweroff' command to run this function when CONFIG_CMD_POWEROFF is enabled. Tested on a DM3730 with twl4030 PMIC. Signed-off-by: Adam Ford <aford173@gmail.com> Reviewed-by: Tom Rini <trini@konsulko.com> Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
2017-05-08Merge branch 'master' of git://git.denx.de/u-boot-sunxiTom Rini
2017-04-30power: Convert CONFIG_PMIC_AS3722 to KconfigSimon Glass
This converts the following to Kconfig: CONFIG_PMIC_AS3722 Signed-off-by: Simon Glass <sjg@chromium.org>
2017-04-30power: Move as3722 pmic to pmic/ directorySimon Glass
Most of the PMICs are in the drivers/power/pmic/ directory. Move this one there. Signed-off-by: Simon Glass <sjg@chromium.org>
2017-04-30power: Rename CONFIG_AS3722_POWER to CONFIG_PMIC_AS3722Simon Glass
Before converting this to Kconfig, rename it to match the other PMICs. Signed-off-by: Simon Glass <sjg@chromium.org>
2017-04-28sunxi: power: Compile sy8106a driver only during SPL buildJernej Skrabec
Driver for that regulator is used only in SPL and it uses old I2C interface. If we want to use DM I2C in U-Boot proper, compilation of this driver has to be limited only to SPL. Signed-off-by: Jernej Skrabec <jernej.skrabec@siol.net> Reviewed-by: Heiko Schocher <hs@denx.de> Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
2017-04-20sunxi: Enable AXP221s in I2C mode with the R40 SoCChen-Yu Tsai
The R40 SoC uses the AXP221s in I2C mode to supply power. Some regulator's common usages have changed, and also the recommended voltage for existing usages have changed. Update the defaults to match. Signed-off-by: Chen-Yu Tsai <wens@csie.org> Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com>
2017-04-05sunxi: prepare for sharing MACH_SUN8I_H3 config symbolAndre Przywara
The Allwinner H5 is very close to the H3 SoC, but has ARMv8 cores. To allow sharing the clocks, GPIO and driver code easily, create an architecture agnostic MACH_SUNXI_H3_H5 Kconfig symbol. Rename the existing symbol to MACH_SUNXI_H3_H5 where code is shared and let it be selected by a new shared Kconfig option. Signed-off-by: Andre Przywara <andre.przywara@arm.com> Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com>
2017-03-09sunxi: power: axp809.c: Fix aldo1-2 being disabled for mvolt != 0Rask Ingemann Lambertsen
The execution flow is currently like this for aldo_num == 1 or 2: int axp_set_aldo(int aldo_num, unsigned int mvolt) { ... if (mvolt == 0) return pmic_bus_clrbits(AXP809_OUTPUT_CTRL1, AXP809_OUTPUT_CTRL1_ALDO1_EN << (aldo_num - 1)); ... return pmic_bus_clrbits(AXP809_OUTPUT_CTRL1, AXP809_OUTPUT_CTRL1_ALDO1_EN << (aldo_num - 1)); } I.e. aldo1 and aldo2 will always be disabled. This patch fixes it by setting (rather than clearing) the enable bit when mvolt != 0. Signed-off-by: Rask Ingemann Lambertsen <rask@formelder.dk> Fixes: 795857df413a ("sunxi: power: add AXP809 support")
2017-02-09power: pmic: add the max8997 controller for DMJaehoon Chung
Add the max8997 controller for Driver model. Exynos4210 is using max8997 pmic controller. (pmic_max8997.c should be deprecated.) Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2017-02-08Merge git://git.denx.de/u-boot-dmTom Rini
2017-02-08regulator: palmas: Fix smps6 - smps9 indicesKeerthy
The array indices used currently are dispalaced by 1 for SMPS6 through SMPS10 in the respective places of voltage and ctrl arrays hence fix the same as to assign the right voltage and ctrl registers. Signed-off-by: Keerthy <j-keerthy@ti.com>
2017-02-08dm: core: Replace of_offset with accessorSimon Glass
At present devices use a simple integer offset to record the device tree node associated with the device. In preparation for supporting a live device tree, which uses a node pointer instead, refactor existing code to access this field through an inline function. Signed-off-by: Simon Glass <sjg@chromium.org>
2017-01-19Merge git://git.denx.de/u-boot-fsl-qoriqTom Rini
2017-01-18pmic: pmic_mc34vr500: Add a driver for the mc34vr500 pmicHou Zhiqiang
This patch adds a simple pmic driver for the mc34vr500 pmic which is used in conjunction with the fsl T1 and LS1 series SoC. Signed-off-by: Hou Zhiqiang <Zhiqiang.Hou@nxp.com> Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com> Reviewed-by: York Sun <york.sun@nxp.com>
2017-01-11power_i2c.c: Fix unused variable warningTom Rini
The variable ret was added but never set as we did not make calls to other functions that we needed to check the return value on. Fixes: 505cf4750ae5 ("power: change from meaningless value to error number") Signed-off-by: Tom Rini <trini@konsulko.com>
2017-01-11power: change from meaningless value to error numberJaehoon Chung
'-1' is absolutely meaningless value. This patch changed from meaningless value to error number. Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2016-12-27regulator: fixed: Add support to handle enable-active-high DT propertyVignesh R
Add support to handle enable-active-high DT property. This property is used to drive the gpio controlling fixed regulator as active high when claiming gpio line. Signed-off-by: Vignesh R <vigneshr@ti.com> Acked-by: Simon Glass <sjg@chromium.org>
2016-12-22power: pmic: add the max8998 controller for DMJaehoon Chung
Add the max8998 controller for Driver model. Samsung S5P series are using max8998 pmic controller. In future, it should be supported the regulator framework. Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com> Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
2016-12-04ARM: OMAP4+: Add support for getting pbias info from boardLokesh Vutla
Palmas driver assumes it is always TPS659xx regulator on all DRA7xx based boards to enable mmc regulator. This is not true always like in case of DRA71x-evm. So get this information based on the board. Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com> Signed-off-by: Vignesh R <vigneshr@ti.com> Signed-off-by: Nishanth Menon <nm@ti.com> Reviewed-by: Tom Rini <trini@konsulko.com> [trini: Delete omap4_vmmc_pbias_config from omap_hsmmc.c] Signed-off-by: Tom Rini <trini@konsulko.com>
2016-12-03ARM: DRA7x/AM57xx: Get rid of CONFIG_AM57XXNishanth Menon
CONFIG_AM57XX is just an unnecessary macro that is redundant given So, remove the same instead of spreading through out the u-boot source code and getting in the way to maintain common code for DRA7x family. Acked-by: Andrew F. Davis <afd@ti.com> Signed-off-by: Nishanth Menon <nm@ti.com> Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com> Reviewed-by: Tom Rini <trini@konsulko.com>
2016-11-26power: regulator: Add limits checking while setting currentKeerthy
Currently the specific set ops functions are directly called without any check for min/max current limits for a regulator. Check for them and proceed. Signed-off-by: Keerthy <j-keerthy@ti.com> Fixed checking of current limits: Signed-off-by: Simon Glass <sjg@chromium.org>
2016-11-26power: regulator: Add limits checking while setting voltageKeerthy
Currently the specific set ops functions are directly called without any check for voltage limits for a regulator. Check for them and proceed. Signed-off-by: Keerthy <j-keerthy@ti.com> Reviewed-by: Simon Glass <sjg@chromium.org> Fixed checking of voltate limits: Signed-off-by: Simon Glass <sjg@chromium.org>
2016-11-25power: regulator: Introduce regulator_set_value_force functionKeerthy
In case we want to force a particular value on a regulator irrespective of the min/max constraints for testing purposes one can call regulator_set_value_force function. Signed-off-by: Keerthy <j-keerthy@ti.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2016-10-24power: twl6030: fix code refactoringNicolae Rosia
Commit a85362fb3e1fc7833723accddbbae431091d06b8 refactored the code but the register read ended up in the wrong if branch. Currently, the else branch checks a variable which is always 0. Signed-off-by: Nicolae Rosia <nicolae_rosia@mentor.com> Reviewed-by: Tom Rini <trini@konsulko.com>
2016-10-13libfdt: Sync fdt_for_each_subnode() with upstreamSimon Glass
The signature for this macro has changed. Bring in the upstream version and adjust U-Boot's usages to suit. Signed-off-by: Simon Glass <sjg@chromium.org> Update to drivers/power/pmic/palmas.c: Signed-off-by: Keerthy <j-keerthy@ti.com> Change-Id: I6cc9021339bfe686f9df21d61a1095ca2b3776e8
2016-10-13Merge git://git.denx.de/u-boot-dmTom Rini
2016-10-11power: regulator: lp873x: Add regulator supportKeerthy
The driver provides regulator set/get voltage enable/disable functions for lp873x family of PMICs. Signed-off-by: Keerthy <j-keerthy@ti.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2016-10-11power: pmic: lp873x: Add the base pmic supportKeerthy
Add support to bind the regulators/child nodes with the pmic. Signed-off-by: Keerthy <j-keerthy@ti.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2016-10-11power: regulator: palmas: Add regulator supportKeerthy
The driver provides regulator set/get voltage enable/disable functions for palmas family of PMICs. Signed-off-by: Keerthy <j-keerthy@ti.com> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
2016-10-11power: pmic: Palmas: Add the base pmic supportKeerthy
Add support to bind the regulators/child nodes with the pmic. Also adds the pmic i2c based read/write funtions to access pmic registers. Signed-off-by: Keerthy <j-keerthy@ti.com> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
2016-10-11power: regulator: Add support for gpio regulatorsKeerthy
Add support for gpio regulators. As of now this driver caters to gpio regulators with one gpio. Supports setting voltage values to gpio regulators and retrieving the values. Signed-off-by: Keerthy <j-keerthy@ti.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2016-10-10regulator: fixed: honour optionality of enable gpioMarcel Ziswiler
According to the binding documentation the fixed regulator enable GPIO is optional. However so far registration thereof failed if no enable GPIO was specified. Fix this by making it entirely optional whether an enable GPIO is used. Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com> Acked-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Tom Warren <twarren@nvidia.com>
2016-10-07power: pmic: add Ricoh RN5T567 PMIC supportStefan Agner
Add device model enabled PMIC driver for Ricoh RN5T567 PMIC used on Colibri iMX7. Signed-off-by: Stefan Agner <stefan.agner@toradex.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2016-10-02power: regulator: add pwm regulatorKever Yang
add driver support for pwm regulator. Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com> Signed-off-by: Kever Yang <kever.yang@rock-chips.com> Acked-by: Simon Glass <sjg@chromium.org>
2016-09-23treewide: replace #include <asm/errno.h> with <linux/errno.h>Masahiro Yamada
Now, arch/${ARCH}/include/asm/errno.h and include/linux/errno.h have the same content. (both just wrap <asm-generic/errno.h>) Replace all include directives for <asm/errno.h> with <linux/errno.h>. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> [trini: Fixup include/clk.] Signed-off-by: Tom Rini <trini@konsulko.com>
2016-09-23drivers: squash lines for immediate returnMasahiro Yamada
Remove unneeded variables and assignments. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2016-09-17sunxi: axp2xx: disable ldoio0/1 at bootHans de Goede
When cold-booting the ldoio0/1 regulators are always off / the gpios are always at tristate. But when re-booting from android these are sometimes on. Disable them at axp_init time (iow as early as possible) to remove this difference between a cold boot and a reboot. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Acked-by: Ian Campbell <ijc@hellion.org.uk>
2016-09-06regulator: fixed: obey startup delayJohn Keeping
When enabling a fixed regulator, it may take some time to rise to the correct voltage. If we do not delay here then subsequent operations will fail. Signed-off-by: John Keeping <john@metanate.com> Reviewed-by: Tom Rini <trini@konsulko.com> Reviewed-by: Simon Glass <sjg@chromium.org>