Skip to content
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

Add support for ADP5055 #2668

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
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,203 @@
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
# Copyright (c) 2024 Analog Devices, Inc.
%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 <[email protected]>

description: |
The ADP5055 combines three high performance buck regulators.
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

allOf:
- $ref: regulator.yaml#

properties:
compatible:
enum:
- adi,adp5055

reg:
description:
I2C address of the device. LSB depends on value of
hardware pin CFG2.
enum:
- 0x70
- 0x71

adi,enable-mode-code:
description:
2-bit value to configure channel enabling
0 - Physical EN pin is used for enabling.
1 - Internal Register is used for enabling.
2 - Both register and physical pin needed.
3 - Either register or physical pin.
$ref: /schemas/types.yaml#/definitions/uint32
minimum: 0
maximum: 3
default: 0

adi,ocp-blanking:
description:
Enables or disables over current protection
blanking (OCP) for all channels.
0 = Disabled
1 = Enabled
type: boolean
default: 0

adi,power-saving-mode-ch321-code:
description:
3-bit value to enable power saving mode for
individual channels. BIT[2:0] = [CH3, CH2, CH1].
$ref: /schemas/types.yaml#/definitions/uint32
minimum: 0
maximum: 7
default: 0

adi,output-discharge-function-ch321-code:
description:
3-bit value to enable output discharge functionality
for individual channels. BIT[2:0] = [CH3, CH2, CH1].
$ref: /schemas/types.yaml#/definitions/uint32
minimum: 0
maximum: 7
default: 7

adi,disable-delay-code-ch123:
description:
An array of 3-bit values to configure the disable delay
for each channel. {CH1[2:0], CH2[2:0], CH3[2:0].
0 - No delay.
1 - 2 * Tset
2 - 4 * Tset
3 - 6 * Tset
4 - 8 * Tset
5 - 10 * Tset
6 - 12 * Tset
7 - 14 * Tset
$ref: /schemas/types.yaml#/definitions/uint32-array
maxItems: 3
items:
minimum: 0
maximum: 7
default: 0, 0, 0

adi,enable-delay-code-ch123:
description:
An array of 3-bit values to configure the enable delay
for each channel. {CH1[2:0], CH2[2:0], CH3[2:0].
0 - No delay.
1 - 1 * Tset
2 - 2 * Tset
3 - 3 * Tset
4 - 4 * Tset
5 - 5 * Tset
6 - 6 * Tset
7 - 7 * Tset
$ref: /schemas/types.yaml#/definitions/uint32-array
maxItems: 3
items:
minimum: 0
maximum: 7
default: 0, 0, 0

adi,dvs-limit-upper-code-ch123:
description:
An array of 4-bit values to configure the allowable upper
side limit of the voltage output of each channel.
{CH1[3:0], CH2[3:0], CH3[3:0].
Vout_high = Vout + 192mV - (12mV * code)
$ref: /schemas/types.yaml#/definitions/uint32-array
maxItems: 3
items:
minimum: 0
maximum: 15
default: 0, 0, 0

adi,dvs-limit-lower-code-ch123:
description:
An array of 4-bit values to configure the allowable lower
side limit of the voltage output of each channel.
{CH1[3:0], CH2[3:0], CH3[3:0].
Vout_low = Vout - 190.5mV + (12mV * code)
$ref: /schemas/types.yaml#/definitions/uint32-array
maxItems: 3
items:
minimum: 0
maximum: 15
default: 0, 0, 0

adi,fast-transient-code-ch123:
description:
An array of 2-bit values to configure the fast transient
sensitivity for each channel. {CH1[1:0], CH2[1:0], CH3[1:0].
0 - No fast transient.
1 - 1.5% window with 3*350uA/V
2 - 1.5% window with 5*350uA/V
3 - 2.5% window with 5*350uA/V
$ref: /schemas/types.yaml#/definitions/uint32-array
maxItems: 3
items:
minimum: 0
maximum: 3
default: 3, 3, 3

adi,delay-power-good:
description:
Configures delay timer of the power good (PWRGD) pin.
0 - No delay.
1 - Delay timer = Tset.
type: boolean
default: 1

adi,mask-power-good-ch321-code:
description:
3-bit value to masks or unmasks individual channels to the
external PWRGD hardware pin. BIT[2:0] = [CH3, CH2, CH1].
0 - Outputs the PWRGD signal to the external PWRGD pin.
1 - Masks the PWRGD signal to the external PWRGD pin.
$ref: /schemas/types.yaml#/definitions/uint32
minimum: 0
maximum: 7
default: 0

required:
- compatible
- reg

unevaluatedProperties: false

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

regulator@70 {
compatible = "adi,adp5055";
reg = <0x70>;

adi,enable-mode-code = <0>;
adi,ocp-blanking = <0>;
adi,power-saving-mode-ch321-code = <7>;
adi,output-discharge-function-ch321-code = <0>;
adi,disable-delay-code-ch123 = <0>, <0>, <0>;
adi,enable-delay-code-ch123 = <0>, <0>, <0>;
adi,dvs-limit-upper-code-ch123 = <0>, <0>, <0>;
adi,dvs-limit-lower-code-ch123 = <0>, <0>, <0>;
adi,fast-transient-code-ch123 = <3>, <3>, <3>;
adi,delay-power-good = <1>;
adi,mask-power-good-ch321-code = <0>;

regulator-min-microvolt = <408000>;
regulator-max-microvolt = <790500>;
};
};
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
10 changes: 10 additions & 0 deletions drivers/regulator/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,16 @@ 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
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