summaryrefslogtreecommitdiff
path: root/drivers/power
AgeCommit message (Collapse)Author
4 daystest: dm: pmbus: add a sandbox PMBus chip emulatorVincent Jardin
Add a UCLASS_I2C_EMUL driver that emulates a PMBus 1.x compliant chip behind the sandbox I2C bus, plus the test.dts wiring and sandbox defconfig that bind it to the generic PMBus regulator (compatible = "pmbus"). This design is a stub only: it lets the follow-up dm unit test drive lib/pmbus.c, the generic regulator and the pmbus CLI command with no real hardware. The emulator models a flat per-command 16-bit register file and the three identification block strings (MFR_ID / MFR_MODEL / MFR_REVISION). READ_IIN and READ_POUT are deliberately left unimplemented (the chip NAKs them) so the telemetry printer's "(not supported)" path is exercised, mirroring a real buck that only calibrates a subset of the sensor classes. Signed-off-by: Vincent Jardin <[email protected]> Reviewed-by: Simon Glass <[email protected]> Signed-off-by: Peng Fan <[email protected]>
5 dayspower: regulator: add MPS MPQ8785 PMBus regulator driverVincent Jardin
Per-chip UCLASS_REGULATOR driver for the MPS MPQ8785 / MPM3695 / MPM3695-25 / MPM82504 family, layered on the shared pmbus_helper adapter. Runs Linux's mpq8785_identify() VOUT_MODE switch (LINEAR16 vs DIRECT m=64 R=1) at probe time, applies the optional mps,vout-fb-divider-ratio-permille DT property, and walks the documented MPS ADDR_VBOOT windows on MFR_ID failure so a die-revision address shift just works. Publishes the pmbus mps last|clear last|clear force vendor extension subcommands (NVM PROTECTION_LAST read and clear) when CMD_PMBUS is enabled. Adapted from Linux code. Signed-off-by: Vincent Jardin <[email protected]> Signed-off-by: Peng Fan <[email protected]>
5 dayspower: regulator: add generic PMBus UCLASS_REGULATOR adapterVincent Jardin
PMBus regulators differ in numeric formats and quirks, not in how they are driven. Share that common behaviour as a regulator-uclass adapter so chip drivers and the pmbus CLI do not each reimplement the decode and transport, and add a catch-all driver on compatible = "pmbus" for compliant chips that have no dedicated driver yet. Gated by CONFIG_DM_REGULATOR_PMBUS_HELPER and CONFIG_DM_REGULATOR_PMBUS_GENERIC. Signed-off-by: Vincent Jardin <[email protected]> Signed-off-by: Peng Fan <[email protected]>
5 daystest: dm: regulator: Add regulator_set_value_clamp() testsJonas Karlman
Add a sandbox LDO3 with a configurable 1.8V to 3.3V range and use it to test regulator_set_value_clamp(). Test in-range requests, clamping against the regulator limits, invalid ranges outside the regulator limits and a min value higher than max. Signed-off-by: Jonas Karlman <[email protected]> Reviewed-by: Peng Fan <[email protected]> Signed-off-by: Peng Fan <[email protected]>
5 dayspower: regulator: Add helper to set voltage within an acceptable rangeJonas Karlman
Add regulator_set_value_clamp() that clamps a requested target voltage to both caller-provided limits and the regulator constraints before setting the regulator voltage value. Return -EINVAL when the caller limits cannot be satisfied by the regulator constraints or when the requested range is invalid. This helper will initially be used to set vqmmc-supply voltage within an acceptable range according to SD Standards, i.e. 1.70V-1.95V and 2.7V-3.6V. Signed-off-by: Jonas Karlman <[email protected]> Signed-off-by: Peng Fan <[email protected]>
9 daysMerge patch series "pinctrl: add support of Airoha SoCs"Tom Rini
Mikhail Kshevetskiy <[email protected]> says: This patch series add pin controller and gpio driver support for EN7523/ AN7581/AN7583 SoCs. The driver based on official linux airoha pinctrl and gpio driver with Matheus Sampaio Queiroga changes. The original Matheus Sampaio Queiroga driver can be taken from the repo: https://sirherobrine23.com.br/airoha_en7523/kernel/src/branch/airoha_en7523_pinctrl Additionally in the EN7523 case the patches removes existing gpio dts nodes and replaces them with pinctrl node. It should not be very dangerous, because: * No official EN7523 gpio support present in U-Boot * Legacy Linux EN7523 GPIO driver is mostly abandoned * The same driver is planned for upstream linux/openwrt This patchset includes bitfield.h patches created for Linux kernel by Geert Uytterhoeven. It suits U-Boot fine. I preserve original author and original commit messages. Please note me, if there is a better way. The patches were tested on EN7523/AN7581/AN7583 boards. Link: https://lore.kernel.org/r/[email protected]
9 dayspower: domain: renesas-r8a78000: Convert to common field_{get, prep}() helpersMikhail Kshevetskiy
Drop the driver-specific field_get() and field_prep() macros, in favor of the globally available variants from <linux/bitfield.h>. Signed-off-by: Mikhail Kshevetskiy <[email protected]>
9 dayspower: domain: renesas-r8a78000: #undef field_{get, prep}() before definitionMikhail Kshevetskiy
Prepare for the advent of globally available common field_get() and field_prep() macros by undefining the symbols before defining local variants. This prevents redefinition warnings from the C preprocessor when introducing the common macros later. Signed-off-by: Mikhail Kshevetskiy <[email protected]>
12 dayspower: domain: scmi: Allow failure in getting power domain attributeYe Li
When one power domain fails to get attribute, continue getting attribute for remaining power domains, not return probe failure. So other power domains are still functional. It is possible that one power domain is assigned to other agent or this power domain is disabled by HW fuse, so platform returns denied or other error. Signed-off-by: Ye Li <[email protected]> Reviewed-by: Peng Fan <[email protected]> Signed-off-by: Peng Fan <[email protected]>
2026-06-25Kconfig: power: restyleJohan Jonker
Restyle all Kconfigs for "power": Menu entries : no space left Menu attributes: 1 TAB Help text : 1 TAB + 2 spaces Replace '---help---' by 'help' Signed-off-by: Johan Jonker <[email protected]> [trini: Add missing indentation on a few more multi-paragraph help texts] Signed-off-by: Tom Rini <[email protected]>
2026-06-25Kconfig: power: pmic: fix typoJohan Jonker
While restyling Kconfig the script checkpatch.pl gives this info: WARNING: 'refered' may be misspelled - perhaps 'referred'? Fix by changing 'refered' to 'referred'. Signed-off-by: Johan Jonker <[email protected]> Reviewed-by: Tom Rini <[email protected]>
2026-06-22Merge tag 'v2026.07-rc5' into nextTom Rini
Prepare v2026.07-rc5
2026-06-09power: regulator: scmi: convert ofnode API to dev_read APIPeng Fan
Replace ofnode_find_subnode(dev_ofnode(dev), ...) with dev_read_subnode(dev, ...). No functional change. Signed-off-by: Peng Fan <[email protected]>
2026-06-09power: regulator: qcom-rpmh: convert ofnode API to dev_read APIPeng Fan
Replace ofnode_read_u32(dev_ofnode(dev), ...) with dev_read_u32(dev, ...), ofnode_read_string(dev_ofnode(dev), ...) with dev_read_string(dev, ...), and ofnode_for_each_subnode(node, dev_ofnode(dev)) with dev_for_each_subnode(node, dev). No functional change. Reviewed-by: Casey Connolly <[email protected]> Signed-off-by: Peng Fan <[email protected]>
2026-06-09power: regulator: anatop: convert ofnode API to dev_read APIPeng Fan
Replace ofnode_read_string(dev_ofnode(dev), ...) with dev_read_string(dev, ...). No functional change. Signed-off-by: Peng Fan <[email protected]>
2026-06-09power: pmic: qcom: convert ofnode API to dev_read APIPeng Fan
Replace ofnode_read_u32_index(dev_ofnode(dev), ...) with dev_read_u32_index(dev, ...). No functional change. Reviewed-by: Casey Connolly <[email protected]> Signed-off-by: Peng Fan <[email protected]>
2026-06-09power: pmic: pca9450: convert ofnode API to dev_read APIPeng Fan
Replace ofnode_read_bool(dev_ofnode(dev), ...) with dev_read_bool(dev, ...). No functional change. Signed-off-by: Peng Fan <[email protected]>
2026-06-09power: domain: imx8m: convert ofnode API to dev_read APIPeng Fan
Replace ofnode_for_each_subnode(subnode, dev_ofnode(dev)) with dev_for_each_subnode(subnode, dev) and ofnode_read_u32_default( dev_ofnode(dev), ...) with dev_read_u32_default(dev, ...). No functional change. Signed-off-by: Peng Fan <[email protected]>
2026-06-09power: domain: meson-gx-pwrc-vpu: use dev_read_phandle_with_args for hhi-sysctrlPeng Fan
Replace the manual ofnode_read_u32() + ofnode_get_by_phandle() sequence with a single dev_read_phandle_with_args() call to resolve the amlogic,hhi-sysctrl phandle. This is cleaner and avoids the intermediate phandle value and ofnode_valid() check. No functional change. Reviewed-by: Neil Armstrong <[email protected]> Signed-off-by: Peng Fan <[email protected]>
2026-06-09power: domain: meson-ee-pwrc: use dev_read_phandle_with_args for ao-sysctrlPeng Fan
Replace the manual ofnode_read_u32() + ofnode_get_by_phandle() sequence with a single dev_read_phandle_with_args() call to resolve the amlogic,ao-sysctrl phandle. This is cleaner and avoids the intermediate phandle value and ofnode_valid() check. No functional change. Reviewed-by: Neil Armstrong <[email protected]> Signed-off-by: Peng Fan <[email protected]>
2026-06-09power: regulator: tps6287x: Use dev_read_addr_index()Peng Fan
Use dev_read_addr_index() which supports both live device tree and flat DT backends, avoiding direct dependency on devfdt_* helpers. No functional changes. Reviewed-by: Simon Glass <[email protected]> Signed-off-by: Peng Fan <[email protected]>
2026-06-09power: regulator: Fix power on/off delay issueYe Li
SD initialization failure happens with some UHS-I SD cards on iMX8MM/iMX93/iMX91 EVK after commit 4fcba5d556b4 ("regulator: implement basic reference counter"). When sending operation condition to SD card, the OCR does not return correct status. The root cause is regulator on/off delay is missed in MMC power cycle with above commit, so SD card is not completely power off. When SD startup, the sequence of MMC power cycle is: mmc_power_init(get vmmc_supply dev) -> mmc_power_off -> udelay(2000) -> mmc_power_on Before above commit, as a fixed regulator, the GPIO is set as: GPIO inactive (in mmc_power_init) -> GPIO inactive and delay off-on-delay-us (in mmc_power_off) -> udelay(2000) -> GPIO active (in mmc_power_on) After the commit: GPIO inactive (in mmc_power_init) -> enable_count is 0, regulator_set_enable returns -EALREADY immediately, so GPIO is inactive but No off-on-delay-us (in mmc_power_off) -> udelay(2000) -> GPIO active (in mmc_power_on) Move the off-on-delay-us delay before setting GPIO active to fix the issue. Signed-off-by: Ye Li <[email protected]> Reviewed-by: Peng Fan <[email protected]> Signed-off-by: Peng Fan <[email protected]>
2026-06-09regulator: qcom-rpmh-regulator: fix regulator mode mismatchFederico Amedeo Izzo
Initial regulator mode was read from dts but never applied. This caused a mismatch between saved mode and actual regulator mode. Apply the current mode from priv->mode during enable() and move rpmh_regulator_vrm_set_mode function before rpmh_regulator_set_enable_state(). Signed-off-by: Federico Amedeo Izzo <[email protected]> Reviewed-by: Casey Connolly <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Casey Connolly <[email protected]>
2026-05-25Merge tag 'v2026.07-rc3' into nextTom Rini
Prepare v2026.07-rc3
2026-05-21power: domain: Add Renesas R-Car R8A78000 X5H MDLC power domain and reset driverMarek Vasut
Add Renesas R-Car R8A78000 X5H MDLC power domain and reset driver, which serves as a remap driver between DT power domain and reset IDs and SCMI power domain and reset IDs in case U-Boot runs on Cortex-A, and as a direct hardware access driver for RSIP. The R-Car X5H SCP firmware uses different SCMI power domain and reset IDs in different versions of the SCP firmware, which makes this remapping necessary. The SCMI base protocol version is updated for each new SCP firmware version, it is therefore possible to determine which SCP firmware version is running on the platform from the base protocol and then determine which remapping table to use for DT power domain and reset ID to SCMI power domain and reset ID remapping. Currently supported versions are SCP 4.28, 4.31, 4.32 . The DT power domain and reset ID to SCMI power domain and reset ID remap and call mechanism is simple. Unlike SCMI clock protocol driver, the SCMI reset and power domain protocol drivers register only a single device. This driver looks up that single device, obtains its reset or power domain ops, sets up struct reset_ctl or struct power_domain with remapped SCMI ID, and invokes operations directly on the device. In case of RSIP, all power domains are already enabled by BootROM or early SoC initialization code, the driver therefore only acts as a stub for the power domain part. The reset part operates as a direct hardware access reset driver. Signed-off-by: Marek Vasut <[email protected]>
2026-05-15Merge tag 'u-boot-imx-next-20260515' of ↵Tom Rini
https://gitlab.denx.de/u-boot/custodians/u-boot-imx into next CI: https://source.denx.de/u-boot/custodians/u-boot-imx/-/pipelines/30134 - Several conversions to OF_UPSTREAM. - Added i.MX9 Quickboot support. - Added support for i.MX952 in the fsl_enetc driver. - Update i.MX91 part number detection.
2026-05-15power: regulator: pfuze100: Fix unchecked pmic_reg_read, return valueFrancois Berder
pmic_reg_read returns a negative value if an error occurs. This commit adds a missing check after calling pmic_reg_read. Signed-off-by: Francois Berder <[email protected]> Reviewed-by: Peng Fan <[email protected]>
2026-05-15power: domain: zynqmp: Staticize and constify driver opsMarek Vasut
Set the ops structure as static const. The structure is not accessible from outside of this driver and is not going to be modified at runtime. Signed-off-by: Marek Vasut <[email protected]> Reviewed-by: Michal Simek <[email protected]> Reviewed-by: Peng Fan <[email protected]> Signed-off-by: Peng Fan <[email protected]>
2026-05-15power: domain: tegra186: Staticize and constify driver opsMarek Vasut
Set the ops structure as static const. The structure is not accessible from outside of this driver and is not going to be modified at runtime. Signed-off-by: Marek Vasut <[email protected]> Reviewed-by: Peng Fan <[email protected]> Signed-off-by: Peng Fan <[email protected]>
2026-05-15power: domain: scmi: Staticize and constify driver opsMarek Vasut
Set the ops structure as static const. The structure is not accessible from outside of this driver and is not going to be modified at runtime. Signed-off-by: Marek Vasut <[email protected]> Reviewed-by: Peng Fan <[email protected]> Signed-off-by: Peng Fan <[email protected]>
2026-05-15power: domain: sandbox: Staticize and constify driver opsMarek Vasut
Set the ops structure as static const. The structure is not accessible from outside of this driver and is not going to be modified at runtime. Signed-off-by: Marek Vasut <[email protected]> Reviewed-by: Simon Glass <[email protected]> Reviewed-by: Peng Fan <[email protected]> Signed-off-by: Peng Fan <[email protected]>
2026-05-15power: domain: mtk: Staticize and constify driver opsMarek Vasut
Set the ops structure as static const. The structure is not accessible from outside of this driver and is not going to be modified at runtime. Signed-off-by: Marek Vasut <[email protected]> Reviewed-by: David Lechner <[email protected]> Reviewed-by: Peng Fan <[email protected]> Signed-off-by: Peng Fan <[email protected]>
2026-05-15power: domain: meson-secure-pwrc: Staticize and constify driver opsMarek Vasut
Set the ops structure as static const. The structure is not accessible from outside of this driver and is not going to be modified at runtime. Signed-off-by: Marek Vasut <[email protected]> Reviewed-by: Peng Fan <[email protected]> Signed-off-by: Peng Fan <[email protected]>
2026-05-15power: domain: meson-gx-pwrc: Staticize and constify driver opsMarek Vasut
Set the ops structure as static const. The structure is not accessible from outside of this driver and is not going to be modified at runtime. Signed-off-by: Marek Vasut <[email protected]> Reviewed-by: Peng Fan <[email protected]> Signed-off-by: Peng Fan <[email protected]>
2026-05-15power: domain: meson-ee-pwrc: Staticize and constify driver opsMarek Vasut
Set the ops structure as static const. The structure is not accessible from outside of this driver and is not going to be modified at runtime. Signed-off-by: Marek Vasut <[email protected]> Reviewed-by: Peng Fan <[email protected]> Signed-off-by: Peng Fan <[email protected]>
2026-05-15power: domain: imx8mp-mediamix: Staticize and constify driver opsMarek Vasut
Set the ops structure as static const. The structure is not accessible from outside of this driver and is not going to be modified at runtime. Signed-off-by: Marek Vasut <[email protected]> Reviewed-by: Peng Fan <[email protected]> Signed-off-by: Peng Fan <[email protected]>
2026-05-15power: domain: imx8m: Staticize and constify driver opsMarek Vasut
Set the ops structure as static const. The structure is not accessible from outside of this driver and is not going to be modified at runtime. Signed-off-by: Marek Vasut <[email protected]> Reviewed-by: Peng Fan <[email protected]> Signed-off-by: Peng Fan <[email protected]>
2026-05-15power: domain: imx8: Staticize and constify driver opsMarek Vasut
Set the ops structure as static const. The structure is not accessible from outside of this driver and is not going to be modified at runtime. Signed-off-by: Marek Vasut <[email protected]> Reviewed-by: Peng Fan <[email protected]> Signed-off-by: Peng Fan <[email protected]>
2026-05-15power: domain: imx8-legacy: Staticize and constify driver opsMarek Vasut
Set the ops structure as static const. The structure is not accessible from outside of this driver and is not going to be modified at runtime. Signed-off-by: Marek Vasut <[email protected]> Reviewed-by: Peng Fan <[email protected]> Signed-off-by: Peng Fan <[email protected]>
2026-05-15power: domain: bcm6328: Staticize and constify driver opsMarek Vasut
Set the ops structure as static const. The structure is not accessible from outside of this driver and is not going to be modified at runtime. Signed-off-by: Marek Vasut <[email protected]> Reviewed-by: Peng Fan <[email protected]> Signed-off-by: Peng Fan <[email protected]>
2026-05-15power: domain: apple: Staticize and constify driver opsMarek Vasut
Set the ops structure as static const. The structure is not accessible from outside of this driver and is not going to be modified at runtime. Signed-off-by: Marek Vasut <[email protected]> Reviewed-by: Peng Fan <[email protected]> Signed-off-by: Peng Fan <[email protected]>
2026-05-15power: pmic: emul: Staticize and constify driver opsMarek Vasut
Set the ops structure as static const. The structure is not accessible from outside of this driver and is not going to be modified at runtime. Signed-off-by: Marek Vasut <[email protected]> Reviewed-by: Peng Fan <[email protected]> Signed-off-by: Peng Fan <[email protected]>
2026-05-12power: domain: apple: Add "apple,t8103-pmgr-pwrstate" compatibleJanne Grunau
After discussion with the devicetree maintainers we agreed to not extend lists with the generic compatible "apple,pmgr-pwrstate" anymore [1]. Use "apple,t8103-pmgr-pwrstate" as base compatible as it is the SoC driver and bindings were originally written for. The t602x (M2 Pro/Max/Ultra) devicetrees submitted in [2] use this compatible as fallback instead of "apple,pmgr-pwrstate". Link: https://lore.kernel.org/asahi/[email protected]/ [1] Link: https://lore.kernel.org/asahi/[email protected]/ [2] Signed-off-by: Janne Grunau <[email protected]> Acked-by: Mark Kettenis <[email protected]>
2026-05-06power: regulator: Correct Kconfig for PFUZE100Peng Fan
Use CONFIG_$(PHASE_)DM_REGULATOR_PFUZE100 as the build condition for pfuze100 regulator driver. Add Kconfig option for SPL_DM_REGULATOR_PFUZE100. To avoid break current platforms, set the Kconfig default value same as PMIC_PFUZE100. Signed-off-by: Peng Fan <[email protected]>
2026-05-06power: regulator: pfuze100: support non-independent modePeng Fan
Some BUCKs could work in single/dual phase mode, not in independent mode. In single/dual phase mode, registers of both regulators, must be identically set. So configure mode and value for both BUCKs. CONF registers are not touched, leave them as default OTP settings. PFUZE100/200 SW3A/B, could work in single/dual phase mode, so introduce a new macro by adding a pointer to the SW3B descriptor. Signed-off-by: Peng Fan <[email protected]>
2026-05-06power: regulator: pfuze100: support high output voltage modePeng Fan
Some PFUZE regulators can operate in either low or high output voltage mode, with different minimum voltages and voltage step sizes selected by a hardware control bit. However, the current PFUZE100 regulator driver assumes low output voltage mode only, resulting in incorrect voltage calculation and programming when high voltage mode is enabled. Extend the regulator descriptor to describe high output voltage mode by adding a mask to detect the mode and a dedicated voltage description (min_uV and step size). Update voltage get/set handling to dynamically select the correct voltage parameters based on the high voltage mode bit. Signed-off-by: Peng Fan <[email protected]>
2026-05-06power: regulator: pfuze100: Fix min_uV usagePeng Fan
regulator-min-microvolt in device tree is not always match the minimal voltage in the pmic datasheet, direclty using the min value from device tree as base may cause wrong voltage settings being written. Directly use the min_uV from datasheet to avoid wrong settings. Signed-off-by: Peng Fan <[email protected]>
2026-05-06power: regulator: tps65941: Enable FPWM bitsNeha Malcom Francis
Depending on the phase selection (single or multi), the FPWM bits configured forces the regulator to operate in PWM mode. In case of multi-phase selection, the FPWM_MP bits enforce the regulator to also operate in multi-phase. This fixes correct multi-phase operation. While at this, correct incorrect macro alignment as well. Fixes: 065a452ae6a1 ("power: regulator: tps65941: add regulator support") Link: https://www.ti.com/lit/ds/symlink/tps6594-q1.pdf Signed-off-by: Keerthy <[email protected]> Signed-off-by: Takuma Fujiwara <[email protected]> Signed-off-by: Neha Malcom Francis <[email protected]> Reviewed-by: Udit Kumar <[email protected]> Signed-off-by: Peng Fan <[email protected]>
2026-04-29power: pmic: mtk-pwrap: add MT8195 supportJulien Stephan
Add mt8195 support. Support comes directly from commit e88edc977b00 ("soc: mediatek: pwrap: add pwrap driver for MT8195 SoC") from the Linux Kernel. Signed-off-by: Julien Stephan <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: David Lechner <[email protected]>
2026-04-29power: pmic: mtk-pwrap: use tabs for alignmentJulien Stephan
Fix mt8188_regs definition to use tabs instead of spaces for alignment to be consistent with other definitions. Reviewed-by: Macpaul Lin <[email protected]> Signed-off-by: Julien Stephan <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: David Lechner <[email protected]>