Skip to content

Add support for ADP5055 #2668

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Apr 22, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,157 @@
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/regulator/adi,adp5055-regulator.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Analog Devices ADP5055 Triple Buck Regulator

maintainers:
- Alexis Czezar Torreno <alexisczezar.torreno@analog.com>

description: |
The ADP5055 combines three high performance buck regulator. The device enables
direct connection to high input voltages up to 18 V with no preregulators.
https://www.analog.com/media/en/technical-documentation/data-sheets/adp5055.pdf

properties:
compatible:
enum:
- adi,adp5055

reg:
enum:
- 0x70
- 0x71

adi,tset-us:
description:
Setting time used by the device. This is changed via soldering specific
resistor values on the CFG2 pin.
enum: [2600, 20800]
default: 2600

adi,ocp-blanking:
description:
If present, overcurrent protection (OCP) blanking for all regulator is on.
type: boolean

adi,delay-power-good:
description:
Configures delay timer of the power good (PWRGD) pin. Delay is based on
Tset which can be 2.6 ms or 20.8 ms.
type: boolean
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No need for the 0, 1 description. It's a boolean so its already clear that if the property is present we have a delay. You could also mentioned that the delay is set to TSET (which can be 2.6 or 20.0ms). Just two values so you could mention them here.


'#address-cells':
const: 1

'#size-cells':
const: 0

patternProperties:
'^buck[0-2]$':
type: object
$ref: regulator.yaml#
unevaluatedProperties: false

properties:
enable-gpios:
maxItems: 1
description:
GPIO specifier to enable the GPIO control for each regulator. The
driver supports two modes of enable, hardware only (GPIOs) or software
only (Registers). Pure hardware enabling requires each regulator to
contain this property. If at least one regulator does not have this,
the driver automatically switches to software only mode.

adi,dvs-limit-upper-microvolt:
description:
Configure the allowable upper side limit of the voltage output of each
regulator in microvolt. Relative to the default Vref trimming value.
Vref = 600 mV. Voltages are in 12 mV steps, value is autoadjusted.
Vout_high = Vref_trim + dvs-limit-upper.
minimum: 12000
maximum: 192000
default: 192000

adi,dvs-limit-lower-microvolt:
description:
Configure the allowable lower side limit of the voltage output of each
regulator in microvolt. Relative to the default Vref trimming value.
Vref = 600 mV. Voltages are in 12 mV steps, value is autoadjusted.
Vout_low = Vref_trim + dvs-limit-lower.
minimum: -190500
maximum: -10500
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

are the above in uV? If so you should add the proper suffix in the property and drop $ref. See the available standard suffixes here:

https://github.com/devicetree-org/dt-schema/blob/main/dtschema/schemas/property-units.yaml#L81

default: -190500

adi,fast-transient:
description:
Configures the fast transient sensitivity for each regulator.
"none" - No fast transient.
"3G_1.5%" - 1.5% window with 3*350uA/V
"5G_1.5%" - 1.5% window with 5*350uA/V
"5G_2.5%" - 2.5% window with 5*350uA/V
enum: [none, 3G_1.5%, 5G_1.5%, 5G_2.5%]
default: 5G_2.5%

adi,mask-power-good:
description:
If present, masks individual regulators PWRGD signal to the external
PWRGD hardware pin.
type: boolean
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

again... no need for the description to mention false or true.


required:
- regulator-name

required:
- compatible
- reg

additionalProperties: false

examples:
- |
#include <dt-bindings/gpio/gpio.h>

i2c {
#address-cells = <1>;
#size-cells = <0>;

regulator@70 {
compatible = "adi,adp5055";
reg = <0x70>;
#address-cells = <1>;
#size-cells = <0>;

adi,tset-us = <2600>;
adi,ocp-blanking;
adi,delay-power-good;

buck0 {
regulator-name = "buck0";
enable-gpios = <&gpio 17 GPIO_ACTIVE_HIGH>;
adi,dvs-limit-upper-microvolt = <192000>;
adi,dvs-limit-lower-microvolt = <(-190500)>;
adi,fast-transient = "5G_2.5%";
adi,mask-power-good;
};

buck1 {
regulator-name = "buck1";
enable-gpios = <&gpio 18 GPIO_ACTIVE_HIGH>;
adi,dvs-limit-upper-microvolt = <192000>;
adi,dvs-limit-lower-microvolt = <(-190500)>;
adi,fast-transient = "5G_2.5%";
adi,mask-power-good;
};

buck2 {
regulator-name = "buck2";
enable-gpios = <&gpio 19 GPIO_ACTIVE_HIGH>;
adi,dvs-limit-upper-microvolt = <192000>;
adi,dvs-limit-lower-microvolt = <(-190500)>;
adi,fast-transient = "5G_2.5%";
adi,mask-power-good;
};
};
};
1 change: 1 addition & 0 deletions Kconfig.adi
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ config KERNEL_ALL_ADI_DRIVERS
imply REGULATOR_MAX77857
imply REGULATOR_MAX77541
imply MFD_MAX77541
imply REGULATOR_ADP5055

source "drivers/clk/Kconfig.adi"
source "drivers/hwmon/Kconfig.adi"
Expand Down
7 changes: 7 additions & 0 deletions MAINTAINERS
Original file line number Diff line number Diff line change
Expand Up @@ -1358,6 +1358,13 @@ W: https://ez.analog.com/linux-software-drivers
F: Documentation/devicetree/bindings/iio/filter/adi,admv8818.yaml
F: drivers/iio/filter/admv8818.c

ANALOG DEVICES INC ADP5055 DRIVER
M: Alexis Czezar Torreno <alexisczezar.torreno@analog.com>
S: Supported
W: https://ez.analog.com/linux-software-drivers
F: Documentation/devicetree/bindings/regulator/adi,adp5055-regulator.yaml
F: drivers/regulator/adp5055-regulator.c

ANALOG DEVICES INC ADP5061 DRIVER
M: Michael Hennerich <Michael.Hennerich@analog.com>
L: linux-pm@vger.kernel.org
Expand Down
11 changes: 11 additions & 0 deletions drivers/regulator/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,17 @@ config REGULATOR_AD5398
This driver supports AD5398 and AD5821 current regulator chips.
If building into module, its name is ad5398.ko.

config REGULATOR_ADP5055
tristate "Analog Devices ADP5055 Triple Buck Regulator"
depends on I2C
select REGMAP_I2C
help
This driver controls an Analog Devices ADP5055 with triple buck
regulators using an I2C interface.

Say M here if you want to include support for the regulator as a
module.

config REGULATOR_ANATOP
tristate "Freescale i.MX on-chip ANATOP LDO regulators"
depends on ARCH_MXC || COMPILE_TEST
Expand Down
1 change: 1 addition & 0 deletions drivers/regulator/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ obj-$(CONFIG_REGULATOR_AB8500) += ab8500-ext.o ab8500.o
obj-$(CONFIG_REGULATOR_ACT8865) += act8865-regulator.o
obj-$(CONFIG_REGULATOR_ACT8945A) += act8945a-regulator.o
obj-$(CONFIG_REGULATOR_AD5398) += ad5398.o
obj-$(CONFIG_REGULATOR_ADP5055) += adp5055-regulator.o
obj-$(CONFIG_REGULATOR_ANATOP) += anatop-regulator.o
obj-$(CONFIG_REGULATOR_ARIZONA_LDO1) += arizona-ldo1.o
obj-$(CONFIG_REGULATOR_ARIZONA_MICSUPP) += arizona-micsupp.o
Expand Down
Loading
Loading