summaryrefslogtreecommitdiff
path: root/drivers/power/pmic
AgeCommit message (Collapse)Author
13 dayssysreset: Rework tests around SYSRESET_CMD_POWEROFFTom Rini
As exposed by "make randconfig", we have an issue around how SYSRESET_CMD_POWEROFF is typically selected. We cannot rely only on CMD_POWEROFF as SYSRESET_CMD_POWEROFF must also be tested for its own dependency of SYSRESET. Signed-off-by: Tom Rini <[email protected]>
2026-03-22power: pmic: enable sysreset function with device tree propertySvyatoslav Ryhel
Add a condition to enable the PMIC sysreset function via the system-power-controller device tree property in addition to the existing Kconfig dependency, provided the PMIC supports it. Signed-off-by: Svyatoslav Ryhel <[email protected]> Reviewed-by: Quentin Schulz <[email protected]> # RK8xx
2026-03-22power: cpcap: make regulator node names case independentSvyatoslav Ryhel
The Linux kernel CPCAP driver uses uppercase regulator node names, while this driver uses lowercase. Since regulator names can be case-insensitive, update the driver to support both uppercase and lowercase node names. Signed-off-by: Svyatoslav Ryhel <[email protected]>
2026-03-22power: pmic: cpcap: add Mapphone and Mot compatiblesSvyatoslav Ryhel
Add Mapphone and Mot compatibles supported by Linux kernel. Signed-off-by: Svyatoslav Ryhel <[email protected]>
2026-02-25power: pmic: mtk-pwrap: add MediaTek PMIC Wrapper driverJulien Masson
Add support for the PMIC wrapper (pwrap) IP block found on MediaTek MT8365 and similar SoCs. On these SoCs the PMIC is connected via SPI. The SPI controller is not directly visible to the CPU, but only through the PMIC wrapper inside the SoC. Signed-off-by: Julien Masson <[email protected]> Co-developed-by: Macpaul Lin <[email protected]> Signed-off-by: Macpaul Lin <[email protected]> Co-developed-by: Bo-Chen Chen <[email protected]> Signed-off-by: Bo-Chen Chen <[email protected]> Signed-off-by: David Lechner <[email protected]> Signed-off-by: Peng Fan <[email protected]>
2026-02-17treewide: Clean up DECLARE_GLOBAL_DATA_PTR usagePeng Fan
Remove DECLARE_GLOBAL_DATA_PTR from files where gd is not used, and drop the unnecessary inclusion of asm/global_data.h. Headers should be included directly by the files that need them, rather than indirectly via global_data.h. Reviewed-by: Patrice Chotard <[email protected]> #STMicroelectronics boards and STM32MP1 ram test driver Tested-by: Anshul Dalal <[email protected]> #TI boards Acked-by: Yao Zi <[email protected]> #TH1520 Signed-off-by: Peng Fan <[email protected]>
2026-01-25power: regulator: add AXP318W supportYixun Lan
The PMIC is also known as AXP819 in vendor pmu code For DCDC6, 8, 9, the underlying hardware support more than two levels voltage step tuning, but for now only first two levels are implemented in this driver, hence highest voltage will be limited at seccond level. It actual meets board requirement in current design, and we've verified it in Radxa Cubie A7A board. Following are detail explanation of voltage tuning stpes for those DCDCs: DCDC | voltage range | units | steps | implemented 6 | 0.5 - 1.2 | 10 mV | 71 | Y . | 1.22 - 1.54 | 20 mV | 17 | Y . | 1.8 - 2.4 | 20 mV | 31 | N . | 2.44 - 2.76 | 40 mV | 9 | N -------------------------------------------------- 8/9 | 0.5 - 1.2 | 10 mV | 71 | Y . | 1.22 - 1.84 | 20 mV | 32 | Y . | 1.9 - 3.4 | 100mV | 16 | N Signed-off-by: Yixun Lan <[email protected]> Reviewed-by: Andre Przywara <[email protected]>
2025-10-30power: pmic: s2mps11: add support for Samsung S2MPU05 PMICKaustabh Chakraborty
Samsung S2MPU05 PMIC is used in devices with the Exynos7870 SoC, it houses voltage regulators and an RTC module. Add support for this device variant in the driver, which also binds the corresponding voltage regulator driver. Signed-off-by: Kaustabh Chakraborty <[email protected]> Reviewed-by: Peng Fan <[email protected]> Signed-off-by: Peng Fan <[email protected]>
2025-10-30power: pmic: s2mps11: add support for allowing multiple device variantsKaustabh Chakraborty
There are multiple PMICs by Samsung which are similar in architecture (register layout, interface, etc.) and is possible to be driven by a single driver. Variant specific code and data should be managed properly in the driver. And an enum which describes all supported variants. Pass the enum as the device driver data. Introduce a switch-case block on the enum for any variant specific code. Signed-off-by: Kaustabh Chakraborty <[email protected]> Reviewed-by: Peng Fan <[email protected]> Signed-off-by: Peng Fan <[email protected]>
2025-10-30power: pmic: s2mps11: change the probe function to bindKaustabh Chakraborty
The probe function, s2mps11_probe() is responsible for binding its PMIC children. The driver doesn't have any functionality directly, but has sub-devices which are parts of the device. Therefore, this should be a bind function. This is the case in the Samsung S5M8767 PMIC driver. Signed-off-by: Kaustabh Chakraborty <[email protected]> Reviewed-by: Peng Fan <[email protected]> Signed-off-by: Peng Fan <[email protected]>
2025-09-08Merge tag 'v2025.10-rc4' into nextTom Rini
Prepare v2025.10-rc4
2025-09-01power: pmic: pca9450: Add support for reset statusPrimoz Fiser
PCA9450 PMIC supports reading the reset status from the PWRON_STAT register. Bits 7-4 give indication of the PMIC reset cause: - PWRON (BIT7) - Power ON triggered by PMIC_ON_REQ input line, - WDOGB (BIT6) - Boot after cold reset by WDOGB pin (watchdog reset), - SW_RST (BIT5) - Boot after cold reset initiated by the software, - PMIC_RST (BIT4) - Boot after PMIC_RST_B input line trigger. Add support for reading reset status via the sysreset framework in a convenient printable format. Signed-off-by: Primoz Fiser <[email protected]> Reviewed-by: Paul Geurts <[email protected]> Signed-off-by: Peng Fan <[email protected]>
2025-09-01power: pmic: pca9450: Add support for system resetPrimoz Fiser
The family of PCA9450 PMICs have the ability to perform system resets. Restarting via PMIC is preferred method of restarting the system as all the peripherals are brought to a know state after a power-cycle. The PCA9450 features a cold restart procedure which is initiated by an I2C command 0x14 to the SW_RST register. Support in Linux for restarting via PCA9450 PMIC has been added by Linux commit 6157e62b07d9 ("regulator: pca9450: Add restart handler"). Now add support for it also in the U-Boot via sysreset framework. Signed-off-by: Primoz Fiser <[email protected]> Reviewed-by: Paul Geurts <[email protected]> Signed-off-by: Peng Fan <[email protected]>
2025-09-01power: pmic: max8997: drop maxim,max8997 compatibleHenrik Grimler
All u-boot users now use maxim,max8997-pmic instead, as does Linux's DTSes, so we can now safely drop the maxim,max8997 compatible. Signed-off-by: Henrik Grimler <[email protected]> Reviewed-by: Anand Moon <[email protected]> Signed-off-by: Peng Fan <[email protected]>
2025-09-01power: pmic: max8997: support maxim,max8997-pmic compatible as wellHenrik Grimler
Linux's DTSes uses maxim,max8997-pmic, so check for this compatible as well so that max8997 pmic driver can support both u-boot and Linux's DTSes. Signed-off-by: Henrik Grimler <[email protected]> Signed-off-by: Peng Fan <[email protected]>
2025-09-01power: pmic: fix typo and capitalisation in max8997 Kconfig help msgHenrik Grimler
To make the help message slightly easier to understand. Signed-off-by: Henrik Grimler <[email protected]> Signed-off-by: Peng Fan <[email protected]>
2025-09-01power: pmic: s2mps11: remove check for voltage-regulators nodeHenrik Grimler
All devicetrees that use s2mps11 driver have been converted to use regulators { };, so we can safely drop the voltage-regulators fallback check. Signed-off-by: Henrik Grimler <[email protected]> Reviewed-by: Anand Moon <[email protected]> Signed-off-by: Peng Fan <[email protected]>
2025-09-01power: pmic: s2mps11: look for both {voltage-,}regulatorsHenrik Grimler
Linux's DTSes uses regulators { }; while u-boot's DTSes uses voltage-regulators { };. Look for regulators, and fallback to voltage-regulators if not found, so that both type of DTSes can be used with the driver. Signed-off-by: Henrik Grimler <[email protected]> Reviewed-by: Anand Moon <[email protected]> Signed-off-by: Peng Fan <[email protected]>
2025-09-01Revert "pmic: pca9450: Add optional SD_VSEL GPIO for LDO5"Frieder Schrempf
This reverts commit 2add0511757e2c5897a88b57c5ea8c912140e60f. It turns out that all boards using the PCA9450 actually have the SD_VSEL input connected to the VSELECT signal of the SoCs SD/MMC interface. Therefore we don't need manual control for this signal via GPIO and there aren't any users. This is equivalent to the following change in Linux: c73be62caabb ("Revert "regulator: pca9450: Add SD_VSEL GPIO for LDO5"") Signed-off-by: Frieder Schrempf <[email protected]> Signed-off-by: Peng Fan <[email protected]>
2025-08-30power: rk8xx: allow to customize RK806 reset modeQuentin Schulz
The RK806 PMIC has a bitfield for configuring the restart/reset behavior (which I assume Rockchip calls "function") whenever the PMIC is reset either programmatically (c.f. DEV_RST in the datasheet) or via PWRCTRL or RESETB pins. For RK806, the following values are possible for RST_FUN: 0b00 means "Restart PMU" 0b01 means "Reset all the power off reset registers, forcing the state to switch to ACTIVE mode" 0b10 means "Reset all the power off reset registers, forcing the state to switch to ACTIVE mode, and simultaneously pull down the RESETB PIN for 5mS before releasing" 0b11 means the same as for 0b10 just above. This adds the appropriate logic in the driver to parse the new rockchip,reset-mode DT property to pass this information. It just happens that the values in the binding match the values to write in the bitfield so no mapping is necessary. For backward compatibility reasons, if the property is missing we set it to 0b10 (i.e. BIT(7)) like before this commit was merged instead of leaving it untouched like in the kernel driver. Note that this does nothing useful for U-Boot at the moment as the ways to reset the device (e.g. via `reset` command) doesn't interact with the RK8xx PMIC and simply does a CPU reset. Considering the upstream Linux kernel left this register untouched until (assumed) v6.17[1], this is useful for cases in which the U-Boot bootloader has this patch (and running with a DT with rockchip,reset-mode property set) and running an upstream kernel before (assumed) v6.17, or alternatively later without the property in the kernel DT. [1] https://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd.git/commit/?id=87b48d86b77686013f5c2a8866ed299312b671db Signed-off-by: Quentin Schulz <[email protected]> Reviewed-by: Kever Yang <[email protected]>
2025-07-27power: regulator: add AXP323 supportAndre Przywara
The X-Powers AXP323 is very close sibling to the AXP313A, only that it adds support for dual-phasing the first two DC/DC converters. We do not really care about this particular feature, so just add the new compatible string and tie it to the existing AXP313A support code. Signed-off-by: Andre Przywara <[email protected]>
2025-06-06power: rk8xx: fix swapped mask and value in init registers for RK806Quentin Schulz
The val (the bits to set) is the second member of the reg_data structure and mask the third one. We obviously want to clear bits 6 and 7 in order to only set bit 7 in there instead of only clearing bit 7 in order to write bits 6 and 7 (which makes no sense). Fortunately, according to the datasheet, bit 6 value doesn't matter when bit 7 is set so this is essentially just a cosmetic change, no intended change in behavior. Fixes: f172575d92cd ("power: rk8xx: add support for RK806") Signed-off-by: Quentin Schulz <[email protected]> Reviewed-by: Kever Yang <[email protected]>
2025-05-08sysreset: implement MAX9807 sysreset functionsSvyatoslav Ryhel
MAX8907 PMIC has embedded poweroff function used by some device to initiane device power off. Implement it as optional sysreset driver guarded by kconfig option and system-power-controller device tree property. Tested-by: Ion Agorria <[email protected]> Signed-off-by: Svyatoslav Ryhel <[email protected]>
2025-05-08power: regulator: max9807: add regulator supportSvyatoslav Ryhel
Added a new regulator driver for the MAXIM MAX8907 PMIC, providing essential regulator functionalities and incorporated the necessary binding framework within the core PMIC driver. Tested-by: Ion Agorria <[email protected]> Signed-off-by: Svyatoslav Ryhel <[email protected]>
2025-05-08power: pmic: add the base MAX8907 PMIC supportSvyatoslav Ryhel
Add basic i2c based read/write functions to access PMIC registers. Tested-by: Ion Agorria <[email protected]> Signed-off-by: Svyatoslav Ryhel <[email protected]>
2025-04-28power: regulator: Add a driver for the AXP PMIC drivevbusSamuel Holland
AXP PMICs have a pin which can either report the USB VBUS state, or driving a regulator that supplies USB VBUS. Add a regulator driver for controlling this pin. The selection between input and output is done via the x-powers,drive-vbus-en pin on the PMIC (parent) node. Signed-off-by: Samuel Holland <[email protected]> Signed-off-by: Andre Przywara <[email protected]> Reviewed-by: Jernej Skrabec <[email protected]>
2025-04-12power: regulator: add regulator support for CPCAP PMICSvyatoslav Ryhel
The driver provides regulator set/get voltage and enable/disable functions for CPCAP PMIC. Signed-off-by: Svyatoslav Ryhel <[email protected]>
2025-04-12power: pmic: add the basic CPCAP PMIC supportSvyatoslav Ryhel
The CPCAP is a Motorola/ST-Ericsson creation, a multifunctional IC whose main purpose was power control. It was used in a wide variety of Motorola products, both Tegra and OMAP based. The most notable devices using this PMIC are the Motorola Droid 4, Atrix 4G, and Droid X2. Signed-off-by: Svyatoslav Ryhel <[email protected]>
2025-04-11Kbuild: Always use $(PHASE_)Tom Rini
It is confusing to have both "$(PHASE_)" and "$(XPL_)" be used in our Makefiles as part of the macros to determine when to do something in our Makefiles based on what phase of the build we are in. For consistency, bring this down to a single macro and use "$(PHASE_)" only. Signed-off-by: Tom Rini <[email protected]>
2025-02-12pmic: palmas: bind sysreset to parent nodeSvyatoslav Ryhel
Bind SYSRESET child to parent node since it does not have its own node in the device tree. Signed-off-by: Svyatoslav Ryhel <[email protected]> Reviewed-by: Jaehoon Chung <[email protected]>
2025-02-12pmic: max77663: bind children to parent nodeSvyatoslav Ryhel
Bind GPIO and SYSRESET children to parent node since they do not have their own nodes in the device tree. Signed-off-by: Svyatoslav Ryhel <[email protected]> Reviewed-by: Jaehoon Chung <[email protected]>
2025-01-14power: pmic: tps65941: Fix TI TPS65224 PMIC compatiableUdit Kumar
Fix compatiable name for TPS65224 PMIC as defined in dts/upstream/Bindings/mfd/ti,tps6594.yaml bindings. Fixes: 1468fbba6d55("power: pmic: tps65941: Add TI TPS65224 PMIC") Signed-off-by: Udit Kumar <[email protected]> Reviewed-by: Tom Rini <[email protected]> Reviewed-by: Jaehoon Chung <[email protected]>
2024-10-21Merge patch series "Add AVS support for J721S2"Tom Rini
Manorit Chawdhry <[email protected]> says: This series adds support for Adaptive voltage scaling on J721S2 device [0]. [0]: https://www.ti.com/lit/pdf/spruj28 (Section 5.2.4.1 AVS Support) AVS Test for J721S2: https://gist.github.com/manorit2001/b2fd9f6764a863294d4aa0755c83c84f Boot Test results: https://gist.github.com/manorit2001/d44e035552cb19aadeb0d928d5cb5f26 Link: https://lore.kernel.org/r/[email protected]
2024-10-21power: pmic: tps65941: Add DM_PMIC dependencyManorit Chawdhry
This Kconfig depends on DM_PMIC but hadn't be explicitly stated which could cause config related issues. Adds the dependency in Kconfig for tps65941. Fixes: 6b86dd0c1ead ("power: pmic: tps65941: Add support for tps65941 family of PMICs") Reviewed-by: Neha Malcom Francis <[email protected]> Signed-off-by: Manorit Chawdhry <[email protected]> Reviewed-by: Aniket Limaye <[email protected]>
2024-10-11Merge patch series "Tidy up use of 'SPL' and CONFIG_SPL_BUILD"Tom Rini
Simon Glass <[email protected]> says: When the SPL build-phase was first created it was designed to solve a particular problem (the need to init SDRAM so that U-Boot proper could be loaded). It has since expanded to become an important part of U-Boot, with three phases now present: TPL, VPL and SPL Due to this history, the term 'SPL' is used to mean both a particular phase (the one before U-Boot proper) and all the non-proper phases. This has become confusing. For a similar reason CONFIG_SPL_BUILD is set to 'y' for all 'SPL' phases, not just SPL. So code which can only be compiled for actual SPL, for example, must use something like this: #if defined(CONFIG_SPL_BUILD) && !defined(CONFIG_TPL_BUILD) In Makefiles we have similar issues. SPL_ has been used as a variable which expands to either SPL_ or nothing, to chose between options like CONFIG_BLK and CONFIG_SPL_BLK. When TPL appeared, a new SPL_TPL variable was created which expanded to 'SPL_', 'TPL_' or nothing. Later it was updated to support 'VPL_' as well. This series starts a change in terminology and usage to resolve the above issues: - The word 'xPL' is used instead of 'SPL' to mean a non-proper build - A new CONFIG_XPL_BUILD define indicates that the current build is an 'xPL' build - The existing CONFIG_SPL_BUILD is changed to mean SPL; it is not now defined for TPL and VPL phases - The existing SPL_ Makefile variable is renamed to SPL_ - The existing SPL_TPL Makefile variable is renamed to PHASE_ It should be noted that xpl_phase() can generally be used instead of the above CONFIGs without a code-space or run-time penalty. This series does not attempt to convert all of U-Boot to use this new terminology but it makes a start. In particular, renaming spl.h and common/spl seems like a bridge too far at this point. The series is fully bisectable. It has also been checked to ensure there are no code-size changes on any commit.
2024-10-11global: Rename SPL_TPL_ to PHASE_Simon Glass
Use PHASE_ as the symbol to select a particular XPL build. This means that SPL_TPL_ is no-longer set. Update the comment in bootstage to refer to this symbol, instead of SPL_ Signed-off-by: Simon Glass <[email protected]>
2024-10-11global: Rename SPL_ to XPL_Simon Glass
Use XPL_ as the symbol to indicate an SPL build. This means that SPL_ is no-longer set. Signed-off-by: Simon Glass <[email protected]>
2024-10-11drivers: Use CONFIG_XPL_BUILD instead of CONFIG_SPL_BUILDSimon Glass
Use the new symbol to refer to any 'SPL' build, including TPL and VPL Signed-off-by: Simon Glass <[email protected]>
2024-10-10power: pmic: pca9450: Add missing newlineJoy Zou
Add newline character in log info end. Signed-off-by: Joy Zou <[email protected]> Reviewed-by: Ye Li <[email protected]> Signed-off-by: Peng Fan <[email protected]>
2024-10-10power: pmic/regulator: Support pca9452Joy Zou
Add PCA9452 PMIC/Regulator support. Signed-off-by: Joy Zou <[email protected]> Reviewed-by: Ye Li <[email protected]> Signed-off-by: Peng Fan <[email protected]>
2024-10-04da9063: Add watchdog supportFabio Estevam
The DA9063 PMIC is a multi-function device that provides regulator, watchdog, RTC, and ON key functionalities. Add support for the DA9063 PMIC watchdog functionality. Based on the 6.11 kernel drivers/watchdog/da9063_wdt.c driver. Signed-off-by: Fabio Estevam <[email protected]> Reviewed-by: Stefan Roese <[email protected]>
2024-07-18Merge tag 'u-boot-rockchip-20240718' of ↵Tom Rini
https://source.denx.de/u-boot/custodians/u-boot-rockchip - Add boards: rk3328: Radxa ROCK Pi E v3; rk3588s: FriendlyElec NanoPi R6C/S; - Remove board: Theobroma Systems RK3368 Lion; - Add rk3588 pcie support; - Misc updates for board and config; CI: https://source.denx.de/u-boot/custodians/u-boot-rockchip/-/pipelines/2163
2024-07-17power: rk8xx: fix display name for RK808Quentin Schulz
Commit 2ce40542e0eb ("power: rk8xx: properly print all supported PMICs name") fixed all PMICs name that were broken but broke the only one that was not broken already: RK808. This one is a special case because the ID registers are marked as reserved and always return 0, so the variant cannot be derived the same way it is done for other PMICs from Rockchip. Fixes: 2ce40542e0eb ("power: rk8xx: properly print all supported PMICs name") Signed-off-by: Quentin Schulz <[email protected]> Reviewed-by: Dragan Simic <[email protected]>
2024-07-15power: regulator: add AXP717 supportAndre Przywara
The X-Powers AXP717 is a PMIC with four buck converters and a number of LDOs, one of which is actually fixed (so not modelled here). Add the compatible string and the respective regulator ranges to allow drivers to adjust voltages. Signed-off-by: Andre Przywara <[email protected]> Reviewed-by: Ryan Walklin <[email protected]>
2024-06-14power: rk8xx: properly print all supported PMICs nameQuentin Schulz
The ID of the PMIC is stored in the 2 16b registers but the only part that matters right now is the 3 MSB, which make the 3 digits (in hex) of the part number. Right now, only RK808 was properly displayed, with this all currently supported PMICs should display the proper part number. Additionally, when the PMIC variant is not found, print that value instead of the masked unshifted value as all PMICs we support for now have their LSB ignored to represent the actual part number. Tested on RK806 (RK3588 Jaguar), RK808 (RK3399 Puma) and RK809 (PX30 Ringneck). Reviewed-by: Kever Yang <[email protected]> Signed-off-by: Quentin Schulz <[email protected]>
2024-05-20Restore patch series "arm: dts: am62-beagleplay: Fix Beagleplay Ethernet"Tom Rini
As part of bringing the master branch back in to next, we need to allow for all of these changes to exist here. Reported-by: Jonas Karlman <[email protected]> Signed-off-by: Tom Rini <[email protected]>
2024-05-19Revert "Merge patch series "arm: dts: am62-beagleplay: Fix Beagleplay Ethernet""Tom Rini
When bringing in the series 'arm: dts: am62-beagleplay: Fix Beagleplay Ethernet"' I failed to notice that b4 noticed it was based on next and so took that as the base commit and merged that part of next to master. This reverts commit c8ffd1356d42223cbb8c86280a083cc3c93e6426, reversing changes made to 2ee6f3a5f7550de3599faef9704e166e5dcace35. Reported-by: Jonas Karlman <[email protected]> Signed-off-by: Tom Rini <[email protected]>
2024-05-07power: Remove <common.h> and add needed includesTom Rini
Remove <common.h> from this driver directory and when needed add missing include files directly. Signed-off-by: Tom Rini <[email protected]>
2024-04-29power: pmic: tps65941: Update compatible to aling with kernel DTUdit Kumar
Linux kernel driver drivers/mfd/tps6594-i2c.c is using different name for compatible for tps6594 family PMIC. After sync of Linux kernel DT to u-boot for TI platforms J7200, J721S2 and J784S4 PMIC is no longer getting probed. So updating compatible field to align with Linux driver and DT. Signed-off-by: Udit Kumar <[email protected]> Reviewed-by: Jaehoon Chung <[email protected]>
2024-04-29power: pmic: tps65941: Add TI TPS65224 PMICBhargav Raviprakash
Adds compatible and data field values of TPS65224 driver in TPS65941 PMIC driver. Signed-off-by: Bhargav Raviprakash <[email protected]> Reviewed-by: Dhruva Gole <[email protected]> Reviewed-by: Jaehoon Chung <[email protected]>