Add ADI MAX77503 regulator driver and bindings
Subsystems (2)
v2 cover Add ADI MAX77503 regulator driver and bindings
Add MAX77503 buck converter driver and devicetree bindings. Apply patches in sequence.
Gokhan Celik (2):
regulator: max77503: Add ADI MAX77503 support
regulator: dt-bindings: Add ADI MAX77503 support
.../regulator/adi,max77503-regulator.yaml | 53 +++++++ drivers/regulator/Kconfig | 10 ++ drivers/regulator/Makefile | 1 + drivers/regulator/max77503-regulator.c | 137 ++++++++++++++++++ 4 files changed, 201 insertions(+) create mode 100644 Documentation/devicetree/bindings/regulator/adi,max77503-regulator.yaml create mode 100644 drivers/regulator/max77503-regulator.c
Signature · 1 line
2.34.1
PATCH v2 1/2 regulator: max77503: Add ADI MAX77503 support
Add ADI MAX77503 buck converter driver support.
--- drivers/regulator/Kconfig | 10 ++ drivers/regulator/Makefile | 1 + drivers/regulator/max77503-regulator.c | 137 +++++++++++++++++++++++++ 3 files changed, 148 insertions(+) create mode 100644 drivers/regulator/max77503-regulator.c
drivers/regulator/Kconfig +10 -0
@@ -556,6 +556,16 @@ config REGULATOR_MAX597X The MAX5970/5978 is a smart switch with no output regulation, but fault protection and voltage and current monitoring capabilities. +config REGULATOR_MAX77503 + tristate "Analog Devices MAX77503 Regulator" + depends on I2C + select REGMAP_I2C + help + This driver controls a Analog Devices MAX77503 14V input, 1.5A + high-efficiency buck converter via I2C bus. + Say M here if you want to include support for the regulator as a + module. + config REGULATOR_MAX77541 tristate "Analog Devices MAX77541/77540 Regulator" depends on MFD_MAX77541
drivers/regulator/Makefile +1 -0
@@ -68,6 +68,7 @@ obj-$(CONFIG_REGULATOR_LTC3676) += ltc3676.o obj-$(CONFIG_REGULATOR_MAX14577) += max14577-regulator.o obj-$(CONFIG_REGULATOR_MAX1586) += max1586.o obj-$(CONFIG_REGULATOR_MAX597X) += max597x-regulator.o +obj-$(CONFIG_REGULATOR_MAX77503) += max77503-regulator.o obj-$(CONFIG_REGULATOR_MAX77541) += max77541-regulator.o obj-$(CONFIG_REGULATOR_MAX77620) += max77620-regulator.o obj-$(CONFIG_REGULATOR_MAX77650) += max77650-regulator.o
drivers/regulator/max77503-regulator.c new file +137 -0
137 lines not on this page · raw message
Signature · 1 line
2.34.1
Mark Brown
maintainerRe: [PATCH v2 1/2] regulator: max77503: Add ADI MAX77503 support
Quoted 3 lines · Gokhan Celik
Add ADI MAX77503 buck converter driver support.
Signed-off-by Gokhan Celik <[email protected]>
The driver code itself looks good.
PATCH v2 2/2 regulator: dt-bindings: Add ADI MAX77503 support
In reply to Gokhan CelikAdd ADI MAX77503 buck converter devicetree document.
--- .../regulator/adi,max77503-regulator.yaml | 53 +++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 Documentation/devicetree/bindings/regulator/adi,max77503-regulator.yaml
Documentation/devicetree/bindings/regulator/adi,max77503-regulator.yaml new file +53 -0
@@ -0,0 +1,53 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +# Copyright (c) 2023 Analog Devices, Inc. +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/regulator/adi,max77503-regulator.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Analog Devices MAX77503 Buck Converter + +maintainers: + - Gokhan Celik <[email protected]> + +description: | + The Analog Devices MAX77503 is a single channel 14V input, 1.5A + high-efficiency buck converter. This converter has 94% efficiency + for 2-Cell/3-Cell battery applications. + +allOf: + - $ref: regulator.yaml# + +properties: + compatible: + enum: + - adi,max77503 + + reg: + description: I2C address of the device + items: + - enum: [0x1e, 0x24, 0x37] + +required: + - compatible + - reg + - regulator-min-microvolt + - regulator-max-microvolt + +unevaluatedProperties: false + +examples: + - | + i2c { + #address-cells = <1>; + #size-cells = <0>; + + regulator@1e { + compatible = "adi,max77503"; + reg = <0x1e>; + + regulator-min-microvolt = <800000>; + regulator-max-microvolt = <5000000>; + }; + }; +
Signature · 1 line
2.34.1
Mark Brown
maintainerRe: [PATCH v2 2/2] regulator: dt-bindings: Add ADI MAX77503 support
Documentation/devicetree/bindings/regulator/adi,max77503-regulator.yaml line 35
Quoted 5 lines · Gokhan Celik
Documentation/devicetree/bindings/regulator/adi,max77503-regulator.yaml new file +5
-0+required: + - compatible + - reg + - regulator-min-microvolt + - regulator-max-microvolt
There should not normally be a requirement to specify voltage constraints, it should be valid for the system to not permit any configuration of the voltage at runtime and just use whatever state it was left with when the kernel was started (eg, hardware or bootloader default).
Re: [PATCH v2 2/2] regulator: dt-bindings: Add ADI MAX77503 support
In reply to Gokhan CelikQuoted 3 lines · Gokhan Celik
Add ADI MAX77503 buck converter devicetree document.
Signed-off-by Gokhan Celik <[email protected]>
Other than Mark's comment, this seems fine to me. W/ that to his satisfaction,
Thanks,
Conor.
Quoted 67 lines
--- .../regulator/adi,max77503-regulator.yaml | 53 +++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 Documentation/devicetree/bindings/regulator/adi,max77503-regulator.yamlDocumentation/devicetree/bindings/regulator/adi,max77503-regulator.yaml new file +53
-0@@ -0,0 +1,53 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +# Copyright (c) 2023 Analog Devices, Inc. +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/regulator/adi,max77503-regulator.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Analog Devices MAX77503 Buck Converter + +maintainers: + - Gokhan Celik <[email protected]> + +description: | + The Analog Devices MAX77503 is a single channel 14V input, 1.5A + high-efficiency buck converter. This converter has 94% efficiency + for 2-Cell/3-Cell battery applications. + +allOf: + - $ref: regulator.yaml# + +properties: + compatible: + enum: + - adi,max77503 + + reg: + description: I2C address of the device + items: + - enum: [0x1e, 0x24, 0x37] + +required: + - compatible + - reg + - regulator-min-microvolt + - regulator-max-microvolt + +unevaluatedProperties: false + +examples: + - | + i2c { + #address-cells = <1>; + #size-cells = <0>; + + regulator@1e { + compatible = "adi,max77503"; + reg = <0x1e>; + + regulator-min-microvolt = <800000>; + regulator-max-microvolt = <5000000>; + }; + }; +Signature · 1 line
2.34.1