24 May, 2019
7 commits
-
We are currently using SC_R_LAST as a marker for imx8 power domain tree
nodes without a resource attached. This value is compiled into dtb as
part of the linux build and used by uboot.The SC_R_LAST constant changes frequently as SCFW resources are added
(by design) and every time we need to update linux and uboot headers
together or boot can fail.Fix this by replacing SC_R_LAST usage with a new constant SC_R_NONE
defined to be 0xFFF0.Signed-off-by: Leonard Crestez
Reviewed-by: Peng Fan
(cherry picked from commit 93f302a6642adedfdd6336b22d08f32284539e35) -
When fspi is assigned to M4, we have to let the fspi probe failed when
its power domain is failed to power up. Because not all devices have power
domain (for example, external devices on the board). Current checking
resource owner in power domain probe is not good, change to check it in
power on.Signed-off-by: Ye Li
(cherry picked from commit b62b82ad595a744f07306db4b88d644ae024872a) -
For all the devices used and set ACTIVE in U-Boot, U-Boot needs
to power off all of them without the check of resource owner.When we create software partition before booting Linux, the resource
own checkw will return false, and cause the power domain not powered
off. If without the check of resource owner, the power domain in
the other software partition could be powered off with parent
partition could access child partition resources.Signed-off-by: Peng Fan
(cherry picked from commit 3e29e8adace18035850be9d56cc277c64a221e85)
(cherry picked from commit 81e64d882c2904f5aa38121d020f6e21e142aaf8) -
Changed to use dev_read_subnode to get the ofnode type of the bd71837 device node.
Because the pmic_bind_children is changed to use ofnode.Signed-off-by: Ye Li
(cherry picked from commit acdc5c297a9630a464896ba507f33f4d4e9820c4) -
The iMX8MM EVK board uses BD71837MWV pmic. Add its driver to u-boot.
Signed-off-by: Ye Li
(cherry picked from commit e9a3bec2e95a4b2b4641223c8ee4ebd8da76d7f9) -
Allow the dm driver be omited by SPL.
Fix wrong config name for pfuze100 regulator.Signed-off-by: Peng Fan
Signed-off-by: Ye Li
(cherry picked from commit cc1f5c2bf70307e9b0449037ba397996ba4c030d) -
Add power_domain_lookup_name interface to power domain uclass to find
a power domain device by its DTB node name, not using its associated
client device.Through this interface, we can operate the power domain devices directly.
This is needed for non-DM drivers.Reviewed-by: Peng Fan
Signed-off-by: Ye Li
(cherry picked from commit f5fcb1903d935c2e1037b6a1fc61f1c290818727)
(cherry picked from commit 68b9f562f46bbecdd11643bacc70fe3cd2e1243c)
14 Mar, 2019
1 commit
11 Mar, 2019
3 commits
-
According to datasheet, the output on LDO regulators will start
appearing after 10-15 us.Signed-off-by: Krzysztof Kozlowski
Tested-by: Anand Moon
Signed-off-by: Minkyu Kang -
Changing voltage and enabling regulator might require delays so the
regulator stabilizes at expected level.Add support for "regulator-ramp-delay" binding which can introduce
required time to both enabling the regulator and to changing the
voltage.Signed-off-by: Krzysztof Kozlowski
Tested-by: Anand Moon
Signed-off-by: Minkyu Kang -
LDO27 and LDO35 have 25 mV step, not 50 mV.
Signed-off-by: Krzysztof Kozlowski
Reviewed-by: Lukasz Majewski
Tested-by: Anand Moon
Signed-off-by: Minkyu Kang
08 Mar, 2019
1 commit
-
Fix typo in axp_set_dldo() so that it correctly uses AXP818_DLDO1_CTRL
register to configure the voltage instead of setting AXP818_ELDO1_CTRL
register which is obviously incorrect.Signed-off-by: Ondřej Jirman
Reviewed-by: Jagan Teki
10 Feb, 2019
2 commits
-
regulator_set_enable() api throws an error in the following three cases:
- when requested to disable an always-on regulator
- when set_enable() ops not provided by regulator driver
- when enabling is actually failed.(Error returned by the regulator driver)Sometimes consumer drivers doesn't want to track the first two scenarios
and just need to worry about the case where enabling is actually failed.
But it is also a good practice to have an error value returned in the
first two cases.So introduce an api regulator_set_enable_if_allowed() which ignores the
first two error cases and returns an error as given by regulator driver.
Consumer drivers can use this api need not worry about the first two
error conditions.Signed-off-by: Lokesh Vutla
Reviewed-by: Simon Glass -
This reverts commit e17e0ceb83538c015a50b965547f2f4d38f81c5d.
It is advised to return an error when trying to disable an always-on
regulator and let the consumer driver handle the error if needed.Reviewed-by: Simon Glass
Signed-off-by: Lokesh Vutla
02 Feb, 2019
1 commit
-
The OMAP36 and DM37 TRM state to disable extneded drain IO before
changing the PBIAS. This patch does this before pmic writes if
the CONFIG_MMC_OMAP36XX_PINS flag is set and the cpu family is
omap36xxSigned-off-by: Adam Ford
31 Jan, 2019
1 commit
-
MESON_GX_VPU_POWER_DOMAIN should depend on POWER_DOMAIN.
Signed-off-by: Maxime Jourdan
Signed-off-by: Neil Armstrong
Reviewed-by: Anatolij Gustschin
03 Jan, 2019
1 commit
-
This patch allows to enable the PWM regulator driver
independent for U-Boot and SPL.Signed-off-by: Christoph Muellner
Reviewed-by: Philipp Tomsich
27 Dec, 2018
1 commit
-
commit 4f86a724e82c0 ("power: regulator: denied disable on always-on
regulator") throws an error when requested to disable an always-on
regulator. It is right that an always-on regulator should not be
attempted to be disabled. But at the same time regulator framework
should not return an error when such request is received. Instead
it should just return success without attempting to disable the
specified regulator. This is because the requesting driver will
not have the idea if the regulator is always-on or not. The
requesting driver will always try to enable/disable regulator as
per the required flow. So it is upto regulator framework to not
break such scenarios.Fixes: 4f86a724e82c0 ("power: regulator: denied disable on always-on regulator")
Reported-by: Jean-Jacques Hiblot
Reviewed-by: Faiz Abbas
Signed-off-by: Lokesh Vutla
10 Dec, 2018
3 commits
-
Improvements:
- init DRAM for RK322x in SPL
- add FAN53555 PMIC/regulator driver
- update MicroCrystal RV3029 driver to Kconfig and sync from Linux
- add bootcount uclass and first DM-driver for bootcount -
This adds a driver for the FAN53555 family of regulators and wraps it
in a PMIC implementation.While these devices support a 'normal' and 'suspend' mode (controlled
via an external pin) to switch between two programmable voltages, this
incarnation of the driver assumes that the device is always operating
in 'normal' mode.Only setting/reading the programmed voltage is supported at this time
and the following device functionality remains unsupported:
- switching the selected voltage (via a GPIO)
- disabling the voltage output via software-control
This matches the functionality of the Linux driver.Tested on a RK3399-Q7 (with 'option 5' devices): setting voltages from
the U-Boot shell and verifying output voltages on the board.Signed-off-by: Philipp Tomsich
Tested-by: Klaus Goger -
Those driver are not DM drivers per se (not using the PMIC/regulator
framework) and are using the legacy I2C API. Make them compatible with
the DM_I2C API.This impacts the following drivers:
- palmas (used by am57xx/dra7xx evms)
- tps65218 (used by am43xx evms)
- tps65217 and tps65910 (used by am335x evms and am335x boneblack vboot)
- twl4030 (used by omap3_logicpd)
- tps65217 (used by brppt1)
- twl6030Signed-off-by: Jean-Jacques Hiblot
Reviewed-by: Tom Rini
Reviewed-by: Heiko Schocher
08 Dec, 2018
4 commits
-
Some boards feature a capacitance on LDO3's output that is too large,
causing inrush currents which as a result, shut down the AXP209. This
has been reported before, without knowing the actual cause.A fix appeared to be done with
commit 0e6e34ac8dbb ("sunxi: Olimex A20 boards: Enable LDO3 and LDO4 regulators").The description there is a bit misleading, the kernel does not hang
during AXP209 initialization, the PMIC shuts down, causing voltages to
drop and thus the whole system freezes.While the AXP209 does have the ability to ramp up the voltage slowly, to
reduce these inrush currents, the voltage rate control (VRC) however is
not applicable when switching on the LDO3 output. Only when going from
an enabled lower voltage setting, to a higher voltage setting is the VRC
in effect.To work around this problem, we set LDO3 to the lowest possible setting
of 0.7 V if it was not yet enabled, and then let the VRC (if enabled) do
its thing. It should be noted, that for some undocumented reason, there
is a short delay needed between setting the LDO3 voltage register and
enabling the power. One would expect that this delay ought to be just
after enabling the output power at 0.7 V, but this did not work.Signed-off-by: Olliver Schinagl
Signed-off-by: Priit Laes
Acked-by: Maxime Ripard -
The AXP209 LDO3 regulator supports voltage rate control, or can set a
slew rate.This allows for the power to gradually rise up to the desired voltage,
instead of spiking up as fast as possible. Reason to have this can be
to reduce the inrush currents for example.There are 3 slopes to choose from, the default, 'none' is a voltage rise
of 0.0167 V/uS, a 1.6 mV/uS and a 0.8 mV/uS voltage rise.In ideal world (where vendors follow the recommended design guidelines)
this setting should not be enabled by default. Unless of course AXP209
crashes instead of reporting overcurrent condition as it normally should
do in this case.Signed-off-by: Olliver Schinagl
Signed-off-by: Priit Laes
Acked-by: Maxime Ripard -
The AXP209 has a few 'magisc-ish' values that are better served with
clear defines.Signed-off-by: Olliver Schinagl
Signed-off-by: Priit Laes
Acked-by: Maxime Ripard -
Use a define for the chip version mask on the axp209.
Signed-off-by: Olliver Schinagl
Signed-off-by: Priit Laes
Acked-by: Maxime Ripard
05 Dec, 2018
1 commit
-
Don't disable regulator which are tagged as "regulator-always-on" in DT.
Signed-off-by: Patrick Delaunay
Reviewed-by: Simon Glass
Reviewed-by: Jack Mitchell
Tested-by: Jack Mitchell
Signed-off-by: Patrice Chotard
Reviewed-by: Richard Röjfors
Tested-by: Richard Röjfors
Reviewed-by: Felix Brack
Tested-by: Felix Brack
30 Nov, 2018
2 commits
-
Update the device tree, sandbox i2c driver and tests to use the new
emulation parent to hold emulators.Signed-off-by: Simon Glass
-
There is a newline missing from quite a few printf() strings in these pmic
files. Fix them.Signed-off-by: Simon Glass
Reviewed-by: Lukasz Majewski
29 Nov, 2018
2 commits
-
This adds power domain (scpsys) support for MT7623 SoC.
Signed-off-by: Ryder Lee
Reviewed-by: Simon Glass -
This adds a power domain driver for the Mediatek SCPSYS unit.
The System Control Processor System (SCPSYS) has several power
management related tasks in the system. The tasks include thermal
measurement, dynamic voltage frequency scaling (DVFS), interrupt
filter and lowlevel sleep control. The System Power Manager (SPM)
inside the SCPSYS is for the MTCMOS power domain control.For now this driver only adds power domain support.
Signed-off-by: Ryder Lee
Reviewed-by: Simon Glass
01 Nov, 2018
1 commit
-
The Makefile already tests for SPL_DM_REGULATOR_GPIO, but Kconfig
does not provide it. This adds SPL_DM_REGULATOR_GPIO to Kconfig.Signed-off-by: Lokesh Vutla
28 Oct, 2018
1 commit
-
Complete in the drivers directory the work started with
commit 83d290c56fab ("SPDX: Convert all of our single
license tags to Linux Kernel style").Reviewed-by: Simon Glass
Signed-off-by: Patrick Delaunay
22 Oct, 2018
1 commit
-
Add the power domain DM driver for i.MX8, that it depends on the DTB
power domain trees to generate the power domain provider devices. Users
need to add power domain trees with property "compatible = "nxp,imx8-pd";"When power on a PD device, the driver will power on its ancestor PD
devices in power domain tree.When power off a PD device, the driver will check its child PD devices
first. Only if all child PD devices are off, then power off the current PD
device. Then the driver checks sibling PD devices. If sibling PD devices
are off, then it will power off parent PD device.There is no counter maintained in this driver, but a state to hold current
on/off state. So the request and free functions are empty.The power domain implementation in i.MX8 DTB set the "#power-domain-cells"
to 0, so there is no ID binding with each PD device. We don't use "id"
variable in struct power_domain. At the same time, we have to set of_xlate
to empty to bypass standard of_xlate in uclass driver.Signed-off-by: Peng Fan
Reviewed-by: Anatolij Gustschin
Cc: Stefano Babic
12 Sep, 2018
1 commit
-
The driver was developed with references for more than just
dra7, but never included. At least for omap3, this appears
to be functional.Signed-off-by: Adam Ford
11 Sep, 2018
3 commits
-
Some TI Keystone 2 and K3 family of SoCs contain a system controller
(like the Power Management Micro Controller (PMMC) on 66AK2G SoCs and
the Device Management and Security Controller on AM65x SoCs) that manage
the low-level device control (like clocks, resets etc) for the various
hardware modules present on the SoC. These device control operations are
provided to the host processor OS through a communication protocol
called the TI System Control Interface (TI SCI) protocol.This patch adds a power domain driver that communicates to the system
controller over the TI SCI protocol for performing power management of
various devices present on the SoC. Various power domain functionalities
are achieved by the means of different TI SCI device operations provided
by the TI SCI framework.This code is loosely based on the drivers/soc/ti/ti_sci_pm_domains.c
driver of the Linux kernel.Reviewed-by: Tom Rini
Signed-off-by: Andreas Dannenberg
Signed-off-by: Lokesh Vutla -
There are cases where there are more than one power domain
attached to the device inorder to get the device functional.
So add support for enabling power domain based on the index.Reviewed-by: Tom Rini
Signed-off-by: Lokesh Vutla -
The Amlogic Meson SoCs embeds a specific Power Domain dedicated to the
Video Processing Unit.
This patch implements support for this power domain in preparation of the
future support for the Video display support in U-Boot.This driver will depend on changes in the clock driver to handle the setup
of the VPU and VAPB clocks configured from DT using assigned-clocks entries.Reviewed-by: Simon Glass
Signed-off-by: Neil Armstrong
20 Aug, 2018
1 commit
-
Add u-boot,off-on-delay-us for fixed regulator.
Depends on board design, the gpio regulator sometimes
connects with a big capacitance. When need to off, then
on the regulator, if there is no enough delay,
the voltage does not drop to 0, so introduce this
property to handle such case.Signed-off-by: Peng Fan
Reviewed-by: Simon Glass
Cc: Masahiro Yamada
06 Aug, 2018
1 commit
-
Add CONFIG_SPL_POWER_DOMAIN config entry.
Build drivers/power/domain if this config is selected.Signed-off-by: Peng Fan
Cc: Simon Glass
Reviewed-by: Simon Glass
30 Jul, 2018
1 commit
-
Remove additional trailing whitespaces in prompt reported by kconfiglib:
warning: DM_PMIC_SANDBOX (defined at drivers/power/pmic/Kconfig:133) has
leading or trailing whitespace in its prompt
warning: (defined at dts/Kconfig:204) has leading or trailing
whitespace in its promptSigned-off-by: Michal Simek
Reviewed-by: Felix Brack