aboutsummaryrefslogtreecommitdiff
path: root/drivers/power
AgeCommit message (Collapse)Author
2023-01-23power: regulator: Add a driver for AXP PMIC regulatorsSamuel Holland
This driver handles most voltage regulators found in X-Powers AXP PMICs. It is based on, and intended to replace, the regulator driver in TF-A. AXP PMIC regulators can be divided into 6 categories: - Switches without voltage control => fully supported. - Single linear range => fully supported. - Two linear ranges, "step" and "2 * step" => fully supported. - Two linear ranges, "step" and "5 * step" => only the first range is supported. No boards are known to use the second range. - Non-linear voltage values => fully supported. - LDOs shared with GPIO pins => not supported. Signed-off-by: Samuel Holland <samuel@sholland.org> Reviewed-by: Andre Przywara <andre.przywara@arm.com> Signed-off-by: Andre Przywara <andre.przywara@arm.com>
2023-01-23power: pmic: axp: Provide a variant ID in the driver dataSamuel Holland
Subordinate regulator drivers can use this enumerated ID instead of matching the compatible string again. Reviewed-by: Andre Przywara <andre.przywara@arm.com> Signed-off-by: Samuel Holland <samuel@sholland.org> Signed-off-by: Andre Przywara <andre.przywara@arm.com>
2023-01-09Merge branch 'next'Tom Rini
Signed-off-by: Tom Rini <trini@konsulko.com>
2022-12-26power: regulator: Add support for NPCM8xxJim Liu
Add support for setting nuvoton BMC NPCM845 voltage supply. Signed-off-by: Jim Liu <JJLIU0@nuvoton.com>
2022-12-23global: Migrate CONFIG_POWER_PFUZE3000_I2C_ADDR to CFGTom Rini
Perform a simple rename of CONFIG_POWER_PFUZE3000_I2C_ADDR to CFG_POWER_PFUZE3000_I2C_ADDR Signed-off-by: Tom Rini <trini@konsulko.com>
2022-12-23global: Migrate CONFIG_POWER_PFUZE100_I2C_ADDR to CFGTom Rini
Perform a simple rename of CONFIG_POWER_PFUZE100_I2C_ADDR to CFG_POWER_PFUZE100_I2C_ADDR Signed-off-by: Tom Rini <trini@konsulko.com>
2022-12-23global: Migrate CONFIG_POWER_LTC3676_I2C_ADDR to CFGTom Rini
Perform a simple rename of CONFIG_POWER_LTC3676_I2C_ADDR to CFG_POWER_LTC3676_I2C_ADDR Signed-off-by: Tom Rini <trini@konsulko.com>
2022-12-23global: Migrate CONFIG_FSL_PMIC_MODE to CFGTom Rini
Perform a simple rename of CONFIG_FSL_PMIC_MODE to CFG_FSL_PMIC_MODE Signed-off-by: Tom Rini <trini@konsulko.com>
2022-12-23global: Migrate CONFIG_FSL_PMIC_CS to CFGTom Rini
Perform a simple rename of CONFIG_FSL_PMIC_CS to CFG_FSL_PMIC_CS Signed-off-by: Tom Rini <trini@konsulko.com>
2022-12-23global: Migrate CONFIG_FSL_PMIC_CLK to CFGTom Rini
Perform a simple rename of CONFIG_FSL_PMIC_CLK to CFG_FSL_PMIC_CLK Signed-off-by: Tom Rini <trini@konsulko.com>
2022-12-23global: Migrate CONFIG_FSL_PMIC_BITLEN to CFGTom Rini
Perform a simple rename of CONFIG_FSL_PMIC_BITLEN to CFG_FSL_PMIC_BITLEN Signed-off-by: Tom Rini <trini@konsulko.com>
2022-12-22Convert CONFIG_POWER_PCA9450 to KconfigTom Rini
This converts the following to Kconfig: CONFIG_POWER_PCA9450 Signed-off-by: Tom Rini <trini@konsulko.com>
2022-12-21Merge tag 'v2023.01-rc4' into nextTom Rini
Prepare v2023.01-rc4 Signed-off-by: Tom Rini <trini@konsulko.com>
2022-12-12dm: pmic: ignore disabled node in pmic_bind_childrenPatrick Delaunay
Ignore the disabled children node in pmic_bind_children() so the disabled regulators in device tree are not registered. This patch is based on the dm_scan_fdt_node() code - only the activated nodes are bound - and it solves possible issue when a deactivated regulator is bound, error for duplicated regulator name for example. Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2022-12-09arm: mach-k3: am62a: introduce auto-generated SoC dataBryan Brattlof
Introduce the auto-generated clock tree and power domain data needed to attach the am62a into the power-domain and clock frameworks of uboot Signed-off-by: Bryan Brattlof <bb@ti.com>
2022-12-05Convert CONFIG_TPS6586X_POWER et al to KconfigTom Rini
This converts the following to Kconfig: CONFIG_TPS6586X_POWER CONFIG_TWL6030_POWER Signed-off-by: Tom Rini <trini@konsulko.com>
2022-12-05Convert CONFIG_POWER_LTC3676 et al to KconfigTom Rini
This converts the following to Kconfig: CONFIG_POWER_FSL CONFIG_POWER_FSL_MC13892 CONFIG_POWER_HI6553 CONFIG_POWER_LTC3676 CONFIG_POWER_PFUZE100 CONFIG_POWER_PFUZE3000 CONFIG_POWER_SPI CONFIG_POWER_TPS65090_EC CONFIG_POWER_TPS65218 CONFIG_POWER_TPS65910 Signed-off-by: Tom Rini <trini@konsulko.com>
2022-12-05power: pmic: Guard non-DM_PMIC drivers with a check for POWER_LEGACYTom Rini
As we have more legacy PMIC drivers to move to Kconfig, guard them all with POWER_LEGACY or SPL_POWER_LEGACY. Do the same kind of check for building the drivers too. This also means that we need to resort the list slightly in the Makefile. Cc: Jaehoon Chung <jh80.chung@samsung.com> Signed-off-by: Tom Rini <trini@konsulko.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2022-12-05global: Move remaining CONFIG_SYS_* to CFG_SYS_*Tom Rini
The rest of the unmigrated CONFIG symbols in the CONFIG_SYS namespace do not easily transition to Kconfig. In many cases they likely should come from the device tree instead. Move these out of CONFIG namespace and in to CFG namespace. Signed-off-by: Tom Rini <trini@konsulko.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2022-11-14Merge tag 'u-boot-imx-20221114' of ↵Tom Rini
https://gitlab.denx.de/u-boot/custodians/u-boot-imx For 2022.01 ----------- CI: https://source.denx.de/u-boot/custodians/u-boot-imx/-/pipelines/14083 - Fix UART - moved to binman (MX8 boards) - Toradex: sync DTS with Linux - Gateworks: fixes - New boards : MSC SM2S iMX8MP
2022-11-10global: Migrate CONFIG_SYS_FSL* symbols to the CFG_SYS namespaceTom Rini
Migrate all of COFIG_SYS_FSL* to the CFG_SYS namespace. Signed-off-by: Tom Rini <trini@konsulko.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2022-11-07drivers: power: pmic: Enable use of rn5t567 PMIC in SPLMartyn Welch
The support added later in this series tweaks the PMIC voltages in the SPL. Enable support for the rn5t567 in SPL builds to allow this to be done cleanly. Signed-off-by: Martyn Welch <martyn.welch@collabora.co.uk> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
2022-11-07drivers: power: pmic: Add support for rn5t568 PMICMartyn Welch
Add support for the rn5t568 PMIC to the rn5t567 driver. Signed-off-by: Martyn Welch <martyn.welch@collabora.com> Reviewed-by: Jaehoon Chung <j80.chung@samsung.com>
2022-11-07regulator: bd718x7: Only bind children when PMIC_CHILDREN is enabledAdam Ford
If the bd718x7 is required, but PMIC_CHILDREN is disabled, this driver throws a compile error. Fix this by putting the function to bind children into an if-statement checking for PMIC_CHILDREN. Allowing PMIC_CHILDREN to be disabled in SPL saves some space and still permits some read/write functions to access the PMIC in early startup. Signed-off-by: Adam Ford <aford173@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Fabio Estevam <festevam@gmail.com>
2022-10-26power: fan53555: Fix missing newline in error messageMichal Suchanek
Avoid concatenation with following message. Signed-off-by: Michal Suchanek <msuchanek@suse.de> Reviewed-by: Peng Fan <peng.fan@nxp.com> Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
2022-10-26power: regulator: fix autoset error handlingJohn Keeping
If a regulator does not support .set_suspend_enable or .set_suspend_value then ret is set to ENOSYS early in the function. The most serious impact of this is that when no automatic setting of voltage is needed then the final regulator_set_enable() is skipped because ret has not been cleared. It seems that the error handling for regulator_set_suspend_value() is also wrong as if this succeeds then the normal boot-on checks are still required, and again ENOSYS needs special treatment here. Fixes: 11406b8f7e ("dm: regulator: support regulator more state") Signed-off-by: John Keeping <john@metanate.com>
2022-09-29sandbox: power: Update PMIC driver to use logSimon Glass
Use the log functions instead of pr_...() so we can avoid using __func__. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
2022-09-13firmware: zynqmp: Skip loading config object for VersalAshok Reddy Soma
SET_CONFIGURATION is not yet implemented for Versal platforms. Skip loading config object for Versal until support is added. Signed-off-by: Ashok Reddy Soma <ashok.reddy.soma@xilinx.com> Signed-off-by: Michal Simek <michal.simek@amd.com> Link: https://lore.kernel.org/r/eb7ef6c6de36a1f7d056de43042f96fe3639f18e.1659691195.git.michal.simek@amd.com
2022-08-26pmic: Convert pm8916 driver to a generic Qcom PMIC driverSumit Garg
Since both pm8916.c and pm8916_gpio.c are already supporting multiple Qcom SoCs, it makes sense to rename these drivers to pmic_qcom.c and qcom_pmic_gpio.c respectively. Also, these driver can be extended to support additional functionality if required for other Qcom SoCs. Along with this import latest DT binding: qcom,spmi-pmic.txt from Linux kernel and thereby remove pm8916.txt. Signed-off-by: Sumit Garg <sumit.garg@linaro.org>
2022-08-10power: regulator: Remove i2c header from gpio regulatorMichal Simek
i2c is not used that's why header is not needed. Signed-off-by: Michal Simek <michal.simek@amd.com>
2022-07-27pmic: pca9450: permit config on all bucks and LDOsHeiko Thiery
In order to have the possibility to configure the regulators at system startup through DM support, all LDOs and bucks must be able to be changeable. Currently there is a limitation to change the values when the output is enabled. Since the driver is based on the ROHM BD71837 and a comment that describes a limitation about switching while the output is enabled can also be found there, the limitation probably comes from this type. Signed-off-by: Heiko Thiery <heiko.thiery@gmail.com> Reviewed-by: Fabio Estevam <festevam@denx.de>
2022-07-11Merge branch 'next'Tom Rini
2022-07-07Convert CONFIG_PALMAS_POWER to KconfigTom Rini
This converts the following to Kconfig: CONFIG_PALMAS_POWER Signed-off-by: Tom Rini <trini@konsulko.com>
2022-07-07spl: Ensure all SPL symbols in Kconfig have some SPL dependencyTom Rini
Tighten up symbol dependencies in a number of places. Ensure that a SPL specific option has at least a direct dependency on SPL. In places where it's clear that we depend on something more specific, use that dependency instead. This means in a very small number of places we can drop redundant dependencies. Reported-by: Pali Rohár <pali@kernel.org> Signed-off-by: Tom Rini <trini@konsulko.com>
2022-06-29rockchip: Add option to prevent booting on power plug-inChris Morgan
For Rockchip boards with the all rk8xx series PMICs (excluding the rk808), it is sometimes desirable to not boot whenever the device is plugged in. An example would be for the Odroid Go Advance. This provides a configurable option to check the PMIC says it was powered because of a plug-in event. If the value is 1 and this option is selected, the device shuts down shortly after printing a message to console stating the reason why it's shutting down. Powering up the board with the power button is not affected. This patch parallels the work done in the following patch series: https://lore.kernel.org/u-boot/20220121133732.2397273-1-andre.przywara@arm.com/ Signed-off-by: Chris Morgan <macromorgan@hotmail.com> Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
2022-06-29power: pmic: rk8xx: Support sysreset shutdown methodChris Morgan
Add support for sysreset shutdown for this PMIC. The values were pulled from the various datasheets, but for now it has only been tested on the rk817 (for an Odroid Go Advance). Signed-off-by: Chris Morgan <macromorgan@hotmail.com> Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com> Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2022-06-28tpl: Ensure all TPL symbols in Kconfig have some TPL dependencyTom Rini
Tighten up symbol dependencies in a number of places. Ensure that a TPL specific option has at least a direct dependency on TPL. In places where it's clear that we depend on something more specific, use that dependency instead. Reported-by: Pali Rohár <pali@kernel.org> Signed-off-by: Tom Rini <trini@konsulko.com>
2022-06-28pmic: pca9450: Add optional SD_VSEL GPIO for LDO5Frieder Schrempf
LDO5 has two separate control registers. LDO5CTRL_L is used if the input signal SD_VSEL is low and LDO5CTRL_H if it is high. The current driver implementation only uses LDO5CTRL_H. To make this work on boards that have SD_VSEL connected to a GPIO, we add support for specifying an optional GPIO and setting it to high at probe time. In the future we might also want to add support for boards that have SD_VSEL set to a fixed low level. In this case we need to change the driver to be able to use the LDO5CTRL_L register. This is a port of the same change in the Linux kernel: 8c67a11bae88 ("regulator: pca9450: Add SD_VSEL GPIO for LDO5") Signed-off-by: Frieder Schrempf <frieder.schrempf@kontron.de> Reviewed-by: Fabio Estevam <festevam@denx.de> Tested-by: Fabio Estevam <festevam@denx.de>
2022-06-23power: regulator: scmi: simplify scmi_voltd_set_enable()Etienne Carriere
Simplify scmi_voltd_set_enable() exit sequence. Cc: Jaehoon Chung <jh80.chung@samsung.com> Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org> Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
2022-06-23power: regulator: scmi: support SCMI multi-channelEtienne Carriere
Update SCMI regulator controller driver to get its assigned SCMI channel during initialization. This change allows SCMI voltage domain protocol to use a dedicated channel when defined in the DT. The reference is saved in SCMI regulator controller driver private data. Cc: Jaehoon Chung <jh80.chung@samsung.com> Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org> Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
2022-06-23firmware: scmi: prepare scmi uclass API to multi-channelEtienne Carriere
Changes SCMI driver API function devm_scmi_process_msg() to add an SCMI channel reference argument for when SCMI agent supports SCMI protocol specific channels. First argument of devm_scmi_process_msg() is also change to point to the caller SCMI protocol device rather than its parent device (the SCMI agent device). The argument is a pointer to opaque struct scmi_channel known from the SCMI transport drivers. It is currently unused and caller a pass NULL value. A later change will enable such support once SCMI protocol drivers have means to get the channel reference during initialization. Cc: Lukasz Majewski <lukma@denx.de> Cc: Sean Anderson <seanga2@gmail.com> Cc: Jaehoon Chung <jh80.chung@samsung.com> Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org>
2022-06-20Merge branch 'master' into nextTom Rini
Merge in v2022.07-rc5.
2022-06-14pmic: pca9450: add DM_I2C dependencies in KconfigRasmus Villemoes
The pca9450 driver uses dm_i2c_{read,write}, which are (unsurprisingly) only available with DM_I2C. Make sure one can't create an unbuildable .config by adding proper dependencies. While here, append "in SPL" to the prompt for the SPL_ variant so it doesn't read the same as the one for the non-SPL_ variant. Signed-off-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk> Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
2022-06-10arm: mach-k3: am62: Introduce autogenerated SoC dataSuman Anna
Introduce autogenerated SoC data support clk and device data for the AM62. Hook it upto to power-domain and clk frameworks of U-Boot. Signed-off-by: Dave Gerlach <d-gerlach@ti.com> Signed-off-by: Suman Anna <s-anna@ti.com> Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
2022-05-20pmic: pca9450: Add regulator driverMarek Vasut
Add PCA9450 regulator driver. This is complementary driver for the BUCKn and LDOn regulators provided by the PCA9450 PMIC driver. Currently the driver permits reading the settngs and configuring the BUCKn and LDOn regulators. Reviewed-by: Fabio Estevam <festevam@denx.de> Signed-off-by: Marek Vasut <marex@denx.de> Cc: Fabio Estevam <festevam@denx.de> Cc: Peng Fan <peng.fan@nxp.com> Cc: Stefano Babic <sbabic@denx.de>
2022-05-20pmic: pca9450: Add upstream regulators subnode matchMarek Vasut
The upstream DT regulators node subnodes are named BUCKn and LDOn, the downstream DT regulators node subnodes are named buckn and ldon, add the upstream match. Reviewed-by: Fabio Estevam <festevam@denx.de> Signed-off-by: Marek Vasut <marex@denx.de> Cc: Fabio Estevam <festevam@denx.de> Cc: Peng Fan <peng.fan@nxp.com> Cc: Stefano Babic <sbabic@denx.de>
2022-05-09regulator: add driver for the TPS65219 BUCK & LDO regulatorsNeil Armstrong
The TPS65219 I2S PMIC features 3 Buck converters and 4 linear regulators, 2 GPOs, 1 GPIO, and 3 multi-function-pin. This adds the driver for the Buck converters & linear regulators. Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
2022-05-09power: add driver for the TPS65219 PMICNeil Armstrong
The TPS65219 I2S PMIC features 3 Buck converters and 4 linear regulators, 2 GPOs, 1 GPIO, and 3 multi-function-pin. This adds the PMIC driver, loading the regulator sub-nodes. Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
2022-04-29x86: sandbox: Add missing PCI bar to barinfoAndrew Scull
There are expecte to be bars 0 through 5, but the last of these was missing leading to an read beyond the buffer. Add the missing element with zero values. Signed-off-by: Andrew Scull <ascull@google.com> Cc: Simon Glass <sjg@chromium.org> Cc: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2022-04-22Merge https://gitlab.denx.de/u-boot/custodians/u-boot-pmicTom Rini