regulator: rt6160: Add DT binding document for Richtek RT6160
Subsystems (2)
PATCH v2 1/2 regulator: rt6160: Add DT binding document for Richtek RT6160
From: ChiYuan Huang <[email protected]>
Add DT binding document for Richtek RT6160 voltage regulator.
---
since v2
- Move buckboost node from patternProperties to Properties.
--- .../regulator/richtek,rt6160-regulator.yaml | 67 ++++++++++++++++++++++ 1 file changed, 67 insertions(+) create mode 100644 Documentation/devicetree/bindings/regulator/richtek,rt6160-regulator.yaml
Documentation/devicetree/bindings/regulator/richtek,rt6160-regulator.yaml new file +67 -0
@@ -0,0 +1,67 @@ +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/regulator/richtek,rt6160-regulator.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Richtek RT6160 BuckBoost converter + +maintainers: + - ChiYuan Huang <[email protected]> + +description: | + The RT6160 is a high-efficiency buck-boost converter that can provide + up to 3A output current from 2025mV to 5200mV. And it support the wide + input voltage range from 2200mV to 5500mV. + + Datasheet is available at + https://www.richtek.com/assets/product_file/RT6160A/DS6160A-00.pdf + +properties: + compatible: + enum: + - richtek,rt6160 + + reg: + maxItems: 1 + + enable-gpios: + description: A connection of the 'enable' gpio line. + maxItems: 1 + + richtek,vsel_active_low: + description: | + Used to indicate the 'vsel' pin active level. if not specified, use + high active level as the default. + type: boolean + + buckboost: + description: BuckBoost converter regulator description. + type: object + $ref: regulator.yaml# + +required: + - compatible + - reg + +additionalProperties: false + +examples: + - | + i2c { + #address-cells = <1>; + #size-cells = <0>; + + rt6160@75 { + compatible = "richtek,rt6160"; + reg = <0x75>; + enable-gpios = <&gpio26 2 0>; + + buckboost { + regulator-name = "rt6160-buckboost"; + regulator-min-microvolt = <2025000>; + regulator-max-microvolt = <5200000>; + regulator-allowed-modes = <0 1>; + }; + }; + };
Signature · 1 line
2.7.4
PATCH v2 2/2 regulator: rt6160: Add support for Richtek RT6160
From: ChiYuan Huang <[email protected]>
Add support for Richtek RT6160 voltage regulator. It can provide up to 3A output current within the adjustable voltage from 2025mV to 5200mV. It integrate a buckboost converter to support wide input voltage range from 2200mV to 5500mV.
---
since v2
- Fix W=1 warning for of_device_id.
--- drivers/regulator/Kconfig | 11 ++ drivers/regulator/Makefile | 1 + drivers/regulator/rt6160-regulator.c | 265 +++++++++++++++++++++++++++++++++++ 3 files changed, 277 insertions(+) create mode 100644 drivers/regulator/rt6160-regulator.c
drivers/regulator/Kconfig +11 -0
@@ -1030,6 +1030,17 @@ config REGULATOR_RT5033 RT5033 PMIC. The device supports multiple regulators like current source, LDO and Buck. +config REGULATOR_RT6160 + tristate "Richtek RT6160 BuckBoost voltage regulator" + depends on I2C + select REGMAP_I2C + help + This adds support for voltage regulator in Richtek RT6160. + This device automatically change voltage output mode from + Buck or Boost. The mode transistion depend on the input source voltage. + The wide output range is from 2025mV to 5200mV and can be used on most + common application scenario. + config REGULATOR_RTMV20 tristate "RTMV20 Laser Diode Regulator" depends on I2C
drivers/regulator/Makefile +1 -0
@@ -124,6 +124,7 @@ obj-$(CONFIG_REGULATOR_ROHM) += rohm-regulator.o obj-$(CONFIG_REGULATOR_RT4801) += rt4801-regulator.o obj-$(CONFIG_REGULATOR_RT4831) += rt4831-regulator.o obj-$(CONFIG_REGULATOR_RT5033) += rt5033-regulator.o +obj-$(CONFIG_REGULATOR_RT6160) += rt6160-regulator.o obj-$(CONFIG_REGULATOR_RTMV20) += rtmv20-regulator.o obj-$(CONFIG_REGULATOR_S2MPA01) += s2mpa01.o obj-$(CONFIG_REGULATOR_S2MPS11) += s2mps11.o
drivers/regulator/rt6160-regulator.c new file +265 -0
265 lines not on this page · raw message
Signature · 1 line
2.7.4
Rob Herring
maintainerQuoted 41 lines · cy_huang
From: ChiYuan Huang <[email protected]>
Add DT binding document for Richtek RT6160 voltage regulator.
Signed-off-by ChiYuan Huang <[email protected]>---
since v2
- Move buckboost node from patternProperties to Properties.--- .../regulator/richtek,rt6160-regulator.yaml | 67 ++++++++++++++++++++++ 1 file changed, 67 insertions(+) create mode 100644 Documentation/devicetree/bindings/regulator/richtek,rt6160-regulator.yamlDocumentation/devicetree/bindings/regulator/richtek,rt6160-regulator.yaml new file +22
-0@@ -0,0 +1,67 @@ +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/regulator/richtek,rt6160-regulator.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Richtek RT6160 BuckBoost converter + +maintainers: + - ChiYuan Huang <[email protected]> + +description: | + The RT6160 is a high-efficiency buck-boost converter that can provide + up to 3A output current from 2025mV to 5200mV. And it support the wide + input voltage range from 2200mV to 5500mV. + + Datasheet is available at + https://www.richtek.com/assets/product_file/RT6160A/DS6160A-00.pdf + +properties: + compatible: + enum:
Documentation/devicetree/bindings/regulator/richtek,rt6160-regulator.yaml line 32
Quoted 10 lines
Documentation/devicetree/bindings/regulator/richtek,rt6160-regulator.yaml new file +10
-0+ - richtek,rt6160 + + reg: + maxItems: 1 + + enable-gpios: + description: A connection of the 'enable' gpio line. + maxItems: 1 + + richtek,vsel_active_low:
richtek,vsel-active-low
Documentation/devicetree/bindings/regulator/richtek,rt6160-regulator.yaml line 38
Quoted 6 lines
Documentation/devicetree/bindings/regulator/richtek,rt6160-regulator.yaml new file +6
-0+ description: | + Used to indicate the 'vsel' pin active level. if not specified, use + high active level as the default. + type: boolean + + buckboost:
If this is the only regulator, you don't really need a child node here. Just move everything up.
Quoted 32 lines
Documentation/devicetree/bindings/regulator/richtek,rt6160-regulator.yaml new file +29
-0+ description: BuckBoost converter regulator description. + type: object + $ref: regulator.yaml# + +required: + - compatible + - reg + +additionalProperties: false + +examples: + - | + i2c { + #address-cells = <1>; + #size-cells = <0>; + + rt6160@75 { + compatible = "richtek,rt6160"; + reg = <0x75>; + enable-gpios = <&gpio26 2 0>; + + buckboost { + regulator-name = "rt6160-buckboost"; + regulator-min-microvolt = <2025000>; + regulator-max-microvolt = <5200000>; + regulator-allowed-modes = <0 1>; + }; + }; + };Signature · 1 line
2.7.4
Hi,
Rob Herring <[email protected]> 於 2021年5月18日 週二 下午9:38寫道:
Quoted 47 lines · cy_huang
Quoted 45 lines
From: ChiYuan Huang <[email protected]>
Add DT binding document for Richtek RT6160 voltage regulator.
Signed-off-by ChiYuan Huang <[email protected]>---
since v2
- Move buckboost node from patternProperties to Properties.--- .../regulator/richtek,rt6160-regulator.yaml | 67 ++++++++++++++++++++++ 1 file changed, 67 insertions(+) create mode 100644 Documentation/devicetree/bindings/regulator/richtek,rt6160-regulator.yamlDocumentation/devicetree/bindings/regulator/richtek,rt6160-regulator.yaml new file +26
-0@@ -0,0 +1,67 @@ +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/regulator/richtek,rt6160-regulator.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Richtek RT6160 BuckBoost converter + +maintainers: + - ChiYuan Huang <[email protected]> + +description: | + The RT6160 is a high-efficiency buck-boost converter that can provide + up to 3A output current from 2025mV to 5200mV. And it support the wide + input voltage range from 2200mV to 5500mV. + + Datasheet is available at + https://www.richtek.com/assets/product_file/RT6160A/DS6160A-00.pdf + +properties: + compatible: + enum: + - richtek,rt6160 + + reg: + maxItems: 1
Quoted 9 lines
Documentation/devicetree/bindings/regulator/richtek,rt6160-regulator.yaml line 32
Quoted 6 lines
Documentation/devicetree/bindings/regulator/richtek,rt6160-regulator.yaml new file +6
-0+ + enable-gpios: + description: A connection of the 'enable' gpio line. + maxItems: 1 + + richtek,vsel_active_low:richtek,vsel-active-low
Ack in next v3.
Quoted 10 lines
Documentation/devicetree/bindings/regulator/richtek,rt6160-regulator.yaml line 38
Quoted 6 lines
Documentation/devicetree/bindings/regulator/richtek,rt6160-regulator.yaml new file +6
-0+ description: | + Used to indicate the 'vsel' pin active level. if not specified, use + high active level as the default. + type: boolean + + buckboost:If this is the only regulator, you don't really need a child node here. Just move everything up.
OK, the original thinking is to separate the node to make the regulator property more clear.
To put the regulator property up is also good.
I'll refine it and resend the v3 patch series, Thanks.
Quoted 32 lines
Quoted 32 lines
Documentation/devicetree/bindings/regulator/richtek,rt6160-regulator.yaml new file +29
-1+ description: BuckBoost converter regulator description. + type: object + $ref: regulator.yaml# + +required: + - compatible + - reg + +additionalProperties: false + +examples: + - | + i2c { + #address-cells = <1>; + #size-cells = <0>; + + rt6160@75 { + compatible = "richtek,rt6160"; + reg = <0x75>; + enable-gpios = <&gpio26 2 0>; + + buckboost { + regulator-name = "rt6160-buckboost"; + regulator-min-microvolt = <2025000>; + regulator-max-microvolt = <5200000>; + regulator-allowed-modes = <0 1>; + }; + }; + }; --2.7.4