Commit graph

77 commits

Author SHA1 Message Date
Rene Colato
7fa815c929 regulator: Updated function call use flag that initalizes GPIO.
Fixes bug where GPIO_ACTIVE_LOW would not initialize properly.

Signed-off-by: Rene Colato <rcolato@boston-engineering.com>
2025-06-16 14:12:03 +02:00
Jordan Yates
5dcaf077e7 regulator: npm1300: configure active discharge
Configure the active discharge feature for both the BUCK and LDO/LDSW
blocks through the appropriate registers.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2025-06-12 11:40:32 +02:00
Jordan Yates
4904c27777 regulator: npm1300: convert regulator GPIOs to array
Convert the enable, pwm, and retention `gpios` properties away from the
GPIO specifier space to an integer array.

While this is a less specific type than the GPIO property, it has the
advantage of not requiring the PMIC gpios node to be both present and
enabled.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2025-05-22 13:44:31 +02:00
Aksel Skauge Mellbye
4b4d40017a dts: bindings: silabs: Clean up descriptions, add titles
Clean up dt binding descriptions and introduce titles where
needed to make board documentation pages look nice. The supported
hardware table on board documentation pages sources its data
from dt bindings, and needs succinct titles.

Signed-off-by: Aksel Skauge Mellbye <aksel.mellbye@silabs.com>
2025-05-02 09:15:50 +02:00
TOKITA Hiroshi
ff9d35ab95 dts: bindings: Define a bus for the axp192/axp2101.
Define a bus to show the dependencies of each function
on the AXP192/AXP2101 MFD.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2025-04-24 16:53:20 +02:00
Andrew Featherstone
a2aa0a3e2b docs: raspberrrypi: Correct names of products
Replace occurrences of "RaspberryPi" with "Raspberry Pi" in
documentation, comment blocks etc. Correct the name of "PicoW" to
"Pico W", matching Raspberry Pi's documentation at
https://www.raspberrypi.com/documentation/microcontrollers/pico-series.html .

Signed-off-by: Andrew Featherstone <andrew.featherstone@gmail.com>
2025-04-03 15:27:50 -07:00
Lothar Felten
1c50c3a12b drivers: regulator: add support for AXP2101 power management IC
Add initial support for the AXP2101 power management IC from X-powers.
Remark: only DC/DC1 and ALDO have been tested on real hardware.

Co-authored-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
Co-authored-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>

Signed-off-by: Lothar Felten <lothar.felten@gmail.com>
2025-03-07 19:43:05 +01:00
Sergei Ovchinnikov
b432a01c23 drivers: regulator: npm1300: add reference to anomaly 38
Added reference to nPM1300 anomaly 38 replacing generic "LDO bug"

Signed-off-by: Sergei Ovchinnikov <sergei.ovchinnikov@nordicsemi.no>
2025-02-19 14:50:02 +00:00
Martino Facchin
efe3bf5b29 drivers: add nxp pf1550 mfd (charger+regulator)
Add driver for nxp pf1550 PMIC

Signed-off-by: Martino Facchin <m.facchin@arduino.cc>
2025-02-14 03:03:10 +01:00
Sergei Ovchinnikov
2d343589bb drivers: regulator: npm1300: workaround for LDO HW bug
There is a HW bug in nPM1300 LDO which causes the LDO output voltage to
reach its target very slowly in specific cases. This is worked around by
performing an additional i2c read shortly after an LDO is enabled.

Signed-off-by: Sergei Ovchinnikov <sergei.ovchinnikov@nordicsemi.no>
2025-01-29 15:12:40 +01:00
Audun Korneliussen
f4443617d8 drivers: regulator: npm2100: Add driver for npm2100 pmic
Add regulator driver for npm2100 pmic.
This pmic has one boost and one ldo regulator.

Signed-off-by: Audun Korneliussen <audun.korneliussen@nordicsemi.no>
2024-12-04 14:19:53 -05:00
Declan Snyder
e4deb46ba1 dts: nxp_vref: Add current compensation prop
Add DT property to enable current compensation feature of NXP VREF.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-10-25 18:52:10 +01:00
Ricardo Rivera-Matos
a684c36e77 dts: bindings: cp9314: Adds cirrus,hw-i2c-lock property
Documents cirrus,hw-i2c-lock property in the devicetree bindings. This
flag indicates that the control port write-lock was enabled in hardware
via the PGPIO2 pin.

Signed-off-by: Ricardo Rivera-Matos <rriveram@opensource.cirrus.com>
2024-10-24 14:08:36 +02:00
Aksel Skauge Mellbye
3d0909ed18 soc: silabs: Initialize DCDC from device tree
The DC-DC converter was unconditionally initialized with default
settings on Series 2. Add device tree binding and nodes, and guard
call to init function. Map DT options to config header from HAL.

Signed-off-by: Aksel Skauge Mellbye <aksel.mellbye@silabs.com>
2024-10-22 20:41:23 +02:00
Elias Speinle
022cfdff98 drivers: regulator: add basic mps mpm54304 driver
add driver for Monolithic Power Systems MPM54304 with basic
functionality to enable/disable the buck regulators

Signed-off-by: Elias Speinle <e.speinle@vogl-electronic.com>
2024-09-03 14:39:52 +01:00
Karol Lasończyk
85c292ac59 soc: nordic: Move DCDC configuration to DT for nRF54L15
Moving configuration for nRF54L15 device from kconfig to dts.

Signed-off-by: Karol Lasończyk <karol.lasonczyk@nordicsemi.no>
2024-08-23 15:49:52 +01:00
Gerard Marull-Paretas
d11db98d42 dts: bindings: regulator: add nordic,nrf91x-regulators
To describe nRF91X specific REGULATORS IP.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-08-06 09:17:10 +01:00
Gerard Marull-Paretas
e5e01a7f33 dts: bindings: regulator: add nordic,nrf53x-regulator-hv
nRF53X HV regulator differs from eg nRF52X as it offers a silent mode
option. For this reason, a new compatible is used, even if now such
capability is not exposed yet.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-08-06 09:17:10 +01:00
Gerard Marull-Paretas
8d6695030f dts: bindings: regulator: add nordic,nrf53x-regulators
nRF53X regulator IP is specific to that series, eg, not equal to nRF91X.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-08-06 09:17:10 +01:00
Gerard Marull-Paretas
02a30c1c2b dts: bindings: regulator: add nordic,nrf5[2]x-regulator[-hv]
Some Nordic SoCs, like nRF52 contain an internal regulator for the main
SoC supply. Depending on the SoC, the regulator can have multiple
configurations (e.g. single/double stage), which mainly depends on
supporting "high-voltage" mode or not (VDDH pin supply). This patch adds
bindings for nRF5X regulator and nRF52X HV regulator.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-08-06 09:17:10 +01:00
Zhaoxiang Jin
bb524682c7 dts: bindings: vref: Add specifier cells for nxp vref
Add specifier cells for nxp vref, when some other
peripherals use the vref to provide reference voltage,
this cells can be used to pass-in vref target voltage.

Signed-off-by: Zhaoxiang Jin <Zhaoxiang.Jin_1@nxp.com>
2024-07-08 14:57:55 -04:00
Zhaoxiang Jin
fd736c4f2d drivers: regulator/nxp_vref: Remove nxp_ground_select property
Remove nxp_ground_select property.
Delete the use of NXP vref peripheral CSR register REFL_GRL_SEL bit.

Signed-off-by: Zhaoxiang Jin <Zhaoxiang.Jin_1@nxp.com>
2024-05-15 17:28:38 +02:00
Benjamin Cabé
5d7216fc93 dts: fix bad SPDX-License-Identifier header
fix typo in SPDX header

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-05-08 09:23:16 -04:00
Ricardo Rivera-Matos
f9ce311855 regulator: cp9314: Adds support for PGOOD pin
Adds support for the PGOOD pin. This pin is asserted by the
regulator when converter startup has completed and the output
is stable. If the PGOOD pin is not used, the PGOOD state is
check via the PGOOD_PIN_STS bit.

Signed-off-by: Ricardo Rivera-Matos <rriveram@opensource.cirrus.com>
2024-04-26 16:08:39 +02:00
Andy Sinclair
a14abeb2e6 dts: bindings: regulator: Added regulator-boot-off to allowlists
Added regulator-boot-off to property-allowlist for adp5360, npm1300,
npm6001 and axp192.

Signed-off-by: Andy Sinclair <andy.sinclair@nordicsemi.no>
2024-03-05 09:43:17 -05:00
Andy Sinclair
b46e2f3d8a drivers: regulator: fake: Added is_enabled property
Added is_enabled devicetree property to fake regulator.
Allows testing of init behaviour when regulator is enabled
in hardware.

Signed-off-by: Andy Sinclair <andy.sinclair@nordicsemi.no>
2024-03-05 09:43:17 -05:00
Andy Sinclair
977fc0c2ad drivers: regulator: common: Added regulator-boot-off
Added regulator-boot-off option to common regulator driver.

Signed-off-by: Andy Sinclair <andy.sinclair@nordicsemi.no>
2024-03-05 09:43:17 -05:00
Ricardo Rivera-Matos
a4713be4eb dts: regulator: Adds bindings for CP9314 Buck
Adds devicetree bindings for the Cirrus CP9314 Switched
Capacitor 3:1/2:1 DC/DC converter.

Signed-off-by: Ricardo Rivera-Matos <rriveram@opensource.cirrus.com>
2024-02-27 14:57:12 +01:00
Bartosz Bilas
9618b761ec dts: bindings: max20335: add regulator-init-microvolt/microamp to allowlist
This PMIC can handle those features, so let's add them.

Signed-off-by: Bartosz Bilas <b.bilas@grinn-global.com>
2024-01-08 15:09:35 +01:00
Bartosz Bilas
0b5ffac8af dts: bindings: max20335: adjust properties order
Match it to the order of the regulator.yaml.

Signed-off-by: Bartosz Bilas <b.bilas@grinn-global.com>
2024-01-08 15:09:35 +01:00
Bartosz Bilas
7ef10d0f71 drivers: regulator: add regulator-init-microamp property
It allows setting regulator current value during driver
initialization automatically.

Signed-off-by: Bartosz Bilas <b.bilas@grinn-global.com>
2024-01-05 09:07:10 +01:00
Jerzy Kasenberg
46bbe052d3 drivers: regulator: add LDO/DCDC support for Smartbond.
This add regulator driver for Smartbond DA1469X SOC.
Driver can control VDD, V14, V18, V18P, V30 rails,
full voltage range supported by SOC is covered.
For VDD, V14, V18, V18P DCDC can be configured.

Special VDD_CLAMP (always on) and VDD_SLEPP are added
to allow configuration of VDD in sleep modes.

Signed-off-by: Jerzy Kasenberg <jerzy.kasenberg@codecoup.pl>
2023-11-22 14:55:16 +00:00
Andy Sinclair
04e18f093f drivers: regulator: Added startup and off/on delay to common driver
A configurable delay during regulator switch on is currently
only supported by the GPIO and fixed regulator drivers.

This functionality has been moved to the common driver, so it can
be easily added to any regulator driver.

Signed-off-by: Andy Sinclair <andy.sinclair@nordicsemi.no>
2023-11-13 21:30:10 +00:00
Andy Sinclair
488f56c033 drivers: regulator: npm1300: soft start configuration
Added configuration of soft start functionality

Signed-off-by: Andy Sinclair <andy.sinclair@nordicsemi.no>
2023-11-09 15:32:17 +01:00
Bartosz Bilas
e87fd3165f drivers: regulator: add MAX20335 driver
Add a MAX20335 MFD subdriver to manage the built-in PMIC.

Signed-off-by: Bartosz Bilas <b.bilas@grinn-global.com>
2023-11-02 20:32:40 +00:00
Dennis Grijalva
2516aa8b0b drivers: regulator: pca9420: Add support for configuring ASYS UVLO
Add support for configuring ASYS UVLO (under voltage lock out) threshold

Signed-off-by: Dennis Grijalva <dennisgrijalva@meta.com>
2023-10-20 15:14:04 +02:00
Declan Snyder
b1d2a8a9b6 drivers: regulator: Add NXP VREF driver
Add binding, include header, and driver for NXP VREF IP block.

NXP VREF is an internal voltage reference generator on some SOCs
that fits well with the regulator API in zephyr.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2023-09-21 09:26:57 +02:00
Ricardo Rivera-Matos
4c04f4488a dts: regulator: Fix reoccurring typo in properties
Corrects 'propably' to 'probably' in the regulator devicetree
bindings.

Signed-off-by: Ricardo Rivera-Matos <ricardo.rivera-matos@cirrus.com>
2023-09-13 17:34:27 -04:00
Martin Kiepfer
74db02bad1 drivers: gpio: AXP192 GPIO driver
AXP192 is a small power management IC, that also
features 5 GPIOS.
Besides GPIO driver this commit also includes needed modifications
in axp192 regulator and mfd driver as LDOIO0 functioanlity
is multiplexed with GPIO0 pin.

Signed-off-by: Martin Kiepfer <mrmarteng@teleschirm.org>
2023-08-22 18:08:51 +02:00
Mykola Kvach
5a87252c53 drivers: regulator: add regulator-gpio driver
Add basic support of 'regulator-gpio'. For now, it is support
only controling voltage and driver presents only six functions:
  * enable and disable the regulator;
  * set and get voltage;
  * count and list of voltage(s).

Signed-off-by: Mykola Kvach <mykola_kvach@epam.com>
2023-08-21 10:55:26 +02:00
Mykola Kvach
d9fe261f8e drivers: regulator-fixed: extend api of driver (list/count voltages)
Allow properties 'regulator-min-microvolt' and 'regulator-max-microvolt'
for fixed regulators: Note: they should be equal.

Add simple functions for getting list of allowed and count of voltages.

Signed-off-by: Mykola Kvach <mykola_kvach@epam.com>
2023-08-10 18:11:35 +00:00
Mykola Kvach
ed9ca0f6d3 drivers: regulator-fixed: add possibility to work without enable pins
Possible situation is that in some driver, devices can be controlled in
different ways: in some, we can only turn the power on or off, in others,
we can only control the voltage, and in some, we can control power supply
or voltage level. There may also be devices where there is no control
over power supply at all. A clear example of this can be eMMC devices
where the voltage is usually fixed and they are always powered on.
However, we would like to have a common code for controlling all the
mentioned types of devices, at least the driver shouldn't worry about the
implementation details of voltage regulators. Therefore, there may exist
empty regulators - regulators that only contain information about the
supported voltage, and we cannot change anything in them. The device tree
node description for such a regulator is only necessary for compatibility
with other regulators. Hence, we need to add the possibility of the
existence of such a dummy fixed-regulator.

In this commit, support for a fixed dummy regulator without the ability
for any control has been added. Note that such support also exists in the
Linux kernel. In other words, the logic of the fixed regulator has been
aligned with the logic of the fixed regulator inside the Linux kernel.

Signed-off-by: Mykola Kvach <mykola_kvach@epam.com>
2023-08-10 18:11:35 +00:00
Martin Kiepfer
09da4cf89d driver: regulator: Add support for AXP192 power management IC
AXP192 is a small and simple power management IC featuring different
LDOs, DCDCs, AINs and also GPIOs. It also offers functionaltiy for
battery management.
This change includes the basic regulator driver functionaltiy for
LDO2-3 and DCDC1-3 as well as the mfd driver layer. Further drivers
for GPIO and ADC will follow.
Drivers have been developed and tested on M5StackCore2, an ESP32-based
board. Support for M5StackCore2 is still in progress.

Signed-off-by: Martin Kiepfer <mrmarteng@teleschirm.org>
2023-07-19 09:52:15 +00:00
Gerard Marull-Paretas
9494981181 drivers: regulator: npm6001: remove common device
Common device part is now handled by the nPM6001 MFD device driver.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2023-05-24 19:39:55 -04:00
Gerard Marull-Paretas
e05df8faf1 drivers: regulator: adp5360: initial version
Add a new regulator driver for Analog Devices ADP5360. While it is a MFD
device, only support for BUCK/BUCKBOOST regulators is added in this
patch.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2023-05-24 11:54:30 +00:00
Andy Sinclair
d1e201ccf6 drivers: regulator: npm1300: Initial driver for nPM1300 PMIC
Initial regulator driver for Nordic NPM1300 PMIC.

Signed-off-by: Andy Sinclair <andy.sinclair@nordicsemi.no>
2023-04-17 10:14:40 +02:00
Andy Sinclair
a00713bc45 drivers: regulator: Added initial voltage configuration
The regulator driver has a configured min/max range that is used
to limit set values, and to initialise the regulator.

A new init value has been added, so that the startup voltage can
be higher than the lowest permitted value.

Signed-off-by: Andy Sinclair <andy.sinclair@nordicsemi.no>
2023-03-22 21:19:51 +01:00
TOKITA Hiroshi
47f52bba42 drivers: regulator: add support for RaspberryPi Pico regulator.
Add support for rpi_pico regulator.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@fujitsu.com>
2023-03-02 21:14:34 +01:00
Gerard Marull-Paretas
8c73db666c drivers: regulator: npm1100: add initial support
While nPM1100 is to be operated in fixed configuration for some
applications, it has some degree of configuration via GPIOs. For
example, mode (auto/PWM) can be configured via MODE pin. VBUS current
can also be adjusted using ISET pin, even though there is no API yet to
limit the PMIC input current.

This patch adds a new regulator class driver for nPM1100 PMIC, so that
it can be used with the standard regulator API when needed.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2023-01-12 19:07:05 +01:00
Fabio Baltieri
eb0a524972 yamllint: indentation: fix dts/bindings/
Fix the YAML files indentation for files in dts/bindings/.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2023-01-04 14:23:53 +01:00