Add support for Richtek RT6190 36V 4-wwtich regulator
Subsystems (2)
v2 cover Add support for Richtek RT6190 36V 4-wwtich regulator
From: ChiYuan Huang <[email protected]>
The RT6190 is a 4-switch Buck-Boost controller designed for USB power delivery (USB PD). It operates with wide input voltage range from 4.5V to 36V, and the output voltage can be programmable between 3V and 36V. It implements peak current mode control mechanism to deliver up to 100W power with the programmable constant voltage and constant current output. It also has built-in charge pumps for driving external low-cost N-MOSFETs to control the power path.
Since v2:
- Rename binding filename to 'richtek,rt6190.yaml'
ChiYuan Huang (2):
dt-bindings: regulator: Add bindings for Richtek RT6190 regulator
regulator: rt6190: Add support for Richtek RT6190 regulator
.../bindings/regulator/richtek,rt6190.yaml | 77 ++++ drivers/regulator/Kconfig | 11 + drivers/regulator/Makefile | 1 + drivers/regulator/rt6190-regulator.c | 495 +++++++++++++++++++++ 4 files changed, 584 insertions(+) create mode 100644 Documentation/devicetree/bindings/regulator/richtek,rt6190.yaml create mode 100644 drivers/regulator/rt6190-regulator.c
Signature · 1 line
2.7.4
PATCH v2 1/2 dt-bindings: regulator: Add bindings for Richtek RT6190 regulator
From: ChiYuan Huang <[email protected]>
Add devicetree binding for Richtek RT6190 4-Switch buckboost controller.
---
Since v2:
- Rename binding filename to 'richtek,rt6190.yaml'
--- .../bindings/regulator/richtek,rt6190.yaml | 77 ++++++++++++++++++++++ 1 file changed, 77 insertions(+) create mode 100644 Documentation/devicetree/bindings/regulator/richtek,rt6190.yaml
Documentation/devicetree/bindings/regulator/richtek,rt6190.yaml new file +77 -0
@@ -0,0 +1,77 @@ +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/regulator/richtek,rt6190.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Richtek RT6190 4-Switch BuckBoost controller + +maintainers: + - ChiYuan Huang <[email protected]> + +description: | + The RT6190 is 4-Switch BuckBoost controller designed for converting input + voltage to output voltage that can be equal to, higher or lower than input + voltage. It operates with wide input voltage range from 4.5V to 36V, and + the output voltage can be set from 3V to 36V by external FB pin. It's commonly + used for the application like as BuckBoost bus upply, docking station and USB + power delivery product. + + Datasheet is available at + https://www.richtek.com/assets/product_file/RT6190/DS6190-02.pdf + +allOf: + - $ref: regulator.yaml# + +properties: + compatible: + enum: + - richtek,rt6190 + + reg: + maxItems: 1 + + enable-gpios: true + + wakeup-source: true + + interrupts: + maxItems: 1 + + regulator-allowed-modes: + description: | + buck allowed operating mode + 0: PSM mode (light load Power Saving Mode) + 1: FCCM mode (Forced-CCM mode) + items: + enum: [0, 1] + +required: + - compatible + - reg + +unevaluatedProperties: false + +examples: + - | + #include <dt-bindings/gpio/gpio.h> + #include <dt-bindings/interrupt-controller/irq.h> + + i2c { + #address-cells = <1>; + #size-cells = <0>; + + regulator@2c { + compatible = "richtek,rt6190"; + reg = <0x2c>; + wakeup-source; + interrupts-extended = <&gpio26 0 IRQ_TYPE_LEVEL_LOW>; + enable-gpios = <&gpio26 1 GPIO_ACTIVE_HIGH>; + regulator-name = "richtek,rt6190-buckboost"; + regulator-min-microvolt = <3000000>; + regulator-max-microvolt = <32000000>; + regulator-min-microamp = <306000>; + regulator-max-microamp = <12114000>; + regulator-allowed-modes = <0 1>; + }; + };
Signature · 1 line
2.7.4
Rob Herring
maintainerRe: [PATCH v2 1/2] dt-bindings: regulator: Add bindings for Richtek RT6190 regulator
Quoted 27 lines · cy_huang
From: ChiYuan Huang <[email protected]>
Add devicetree binding for Richtek RT6190 4-Switch buckboost controller.
Signed-off-by ChiYuan Huang <[email protected]>---
Since v2:
- Rename binding filename to 'richtek,rt6190.yaml'--- .../bindings/regulator/richtek,rt6190.yaml | 77 ++++++++++++++++++++++ 1 file changed, 77 insertions(+) create mode 100644 Documentation/devicetree/bindings/regulator/richtek,rt6190.yamlDocumentation/devicetree/bindings/regulator/richtek,rt6190.yaml new file +7
-0@@ -0,0 +1,77 @@ +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/regulator/richtek,rt6190.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Richtek RT6190 4-Switch BuckBoost controller
Documentation/devicetree/bindings/regulator/richtek,rt6190.yaml line 17
Quoted 10 lines
Documentation/devicetree/bindings/regulator/richtek,rt6190.yaml new file +10
-0+ +maintainers: + - ChiYuan Huang <[email protected]> + +description: | + The RT6190 is 4-Switch BuckBoost controller designed for converting input + voltage to output voltage that can be equal to, higher or lower than input + voltage. It operates with wide input voltage range from 4.5V to 36V, and + the output voltage can be set from 3V to 36V by external FB pin. It's commonly + used for the application like as BuckBoost bus upply, docking station and USB
typo: upply
Quoted 7 lines
Documentation/devicetree/bindings/regulator/richtek,rt6190.yaml new file +7
-0+ power delivery product. + + Datasheet is available at + https://www.richtek.com/assets/product_file/RT6190/DS6190-02.pdf + +allOf: + - $ref: regulator.yaml#
Documentation/devicetree/bindings/regulator/richtek,rt6190.yaml line 34
Quoted 10 lines
Documentation/devicetree/bindings/regulator/richtek,rt6190.yaml new file +10
-0+ +properties: + compatible: + enum: + - richtek,rt6190 + + reg: + maxItems: 1 + + enable-gpios: true
maxItems: 1
Documentation/devicetree/bindings/regulator/richtek,rt6190.yaml line 45
Quoted 11 lines
Documentation/devicetree/bindings/regulator/richtek,rt6190.yaml new file +11
-0+ + wakeup-source: true + + interrupts: + maxItems: 1 + + regulator-allowed-modes: + description: | + buck allowed operating mode + 0: PSM mode (light load Power Saving Mode) + 1: FCCM mode (Forced-CCM mode)
maxItems: 2
Quoted 36 lines
Documentation/devicetree/bindings/regulator/richtek,rt6190.yaml new file +32
-0+ items: + enum: [0, 1] + +required: + - compatible + - reg + +unevaluatedProperties: false + +examples: + - | + #include <dt-bindings/gpio/gpio.h> + #include <dt-bindings/interrupt-controller/irq.h> + + i2c { + #address-cells = <1>; + #size-cells = <0>; + + regulator@2c { + compatible = "richtek,rt6190"; + reg = <0x2c>; + wakeup-source; + interrupts-extended = <&gpio26 0 IRQ_TYPE_LEVEL_LOW>; + enable-gpios = <&gpio26 1 GPIO_ACTIVE_HIGH>; + regulator-name = "richtek,rt6190-buckboost"; + regulator-min-microvolt = <3000000>; + regulator-max-microvolt = <32000000>; + regulator-min-microamp = <306000>; + regulator-max-microamp = <12114000>; + regulator-allowed-modes = <0 1>; + }; + };Signature · 1 line
2.7.4
Re: [PATCH v2 1/2] dt-bindings: regulator: Add bindings for Richtek RT6190 regulator
Rob Herring <[email protected]> 於 2022年10月25日 週二 凌晨12:42寫道:
Quoted 53 lines · cy_huang
Quoted 27 lines
From: ChiYuan Huang <[email protected]>
Add devicetree binding for Richtek RT6190 4-Switch buckboost controller.
Signed-off-by ChiYuan Huang <[email protected]>---
Since v2:
- Rename binding filename to 'richtek,rt6190.yaml'--- .../bindings/regulator/richtek,rt6190.yaml | 77 ++++++++++++++++++++++ 1 file changed, 77 insertions(+) create mode 100644 Documentation/devicetree/bindings/regulator/richtek,rt6190.yamlDocumentation/devicetree/bindings/regulator/richtek,rt6190.yaml new file +7
-0@@ -0,0 +1,77 @@ +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/regulator/richtek,rt6190.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Richtek RT6190 4-Switch BuckBoost controllerDocumentation/devicetree/bindings/regulator/richtek,rt6190.yaml line 17
Quoted 10 lines
Documentation/devicetree/bindings/regulator/richtek,rt6190.yaml new file +10
-0+ +maintainers: + - ChiYuan Huang <[email protected]> + +description: | + The RT6190 is 4-Switch BuckBoost controller designed for converting input + voltage to output voltage that can be equal to, higher or lower than input + voltage. It operates with wide input voltage range from 4.5V to 36V, and + the output voltage can be set from 3V to 36V by external FB pin. It's commonly + used for the application like as BuckBoost bus upply, docking station and USBtypo: upply
Quoted 11 lines
Documentation/devicetree/bindings/regulator/richtek,rt6190.yaml new file +11
-0+ power delivery product. + + Datasheet is available at + https://www.richtek.com/assets/product_file/RT6190/DS6190-02.pdf + +allOf: + - $ref: regulator.yaml# + +properties: + compatible: + enum:
Quoted 9 lines
Documentation/devicetree/bindings/regulator/richtek,rt6190.yaml line 34
Quoted 6 lines
Documentation/devicetree/bindings/regulator/richtek,rt6190.yaml new file +6
-0+ - richtek,rt6190 + + reg: + maxItems: 1 + + enable-gpios: truemaxItems: 1
It's coming from gpio-consumer-common.yaml. If so, does it still need to declare the 'maxItems'?
Quoted 50 lines
Documentation/devicetree/bindings/regulator/richtek,rt6190.yaml line 45
Quoted 11 lines
Documentation/devicetree/bindings/regulator/richtek,rt6190.yaml new file +11
-0+ + wakeup-source: true + + interrupts: + maxItems: 1 + + regulator-allowed-modes: + description: | + buck allowed operating mode + 0: PSM mode (light load Power Saving Mode) + 1: FCCM mode (Forced-CCM mode)maxItems: 2
Quoted 36 lines
Documentation/devicetree/bindings/regulator/richtek,rt6190.yaml new file +32
-1+ items: + enum: [0, 1] + +required: + - compatible + - reg + +unevaluatedProperties: false + +examples: + - | + #include <dt-bindings/gpio/gpio.h> + #include <dt-bindings/interrupt-controller/irq.h> + + i2c { + #address-cells = <1>; + #size-cells = <0>; + + regulator@2c { + compatible = "richtek,rt6190"; + reg = <0x2c>; + wakeup-source; + interrupts-extended = <&gpio26 0 IRQ_TYPE_LEVEL_LOW>; + enable-gpios = <&gpio26 1 GPIO_ACTIVE_HIGH>; + regulator-name = "richtek,rt6190-buckboost"; + regulator-min-microvolt = <3000000>; + regulator-max-microvolt = <32000000>; + regulator-min-microamp = <306000>; + regulator-max-microamp = <12114000>; + regulator-allowed-modes = <0 1>; + }; + }; --2.7.4
PATCH v2 2/2 regulator: rt6190: Add support for Richtek RT6190 regulator
In reply to cy_huangFrom: ChiYuan Huang <[email protected]>
Add support for Richtek RT6190 4-Switch BuckBoost controller.
--- drivers/regulator/Kconfig | 11 + drivers/regulator/Makefile | 1 + drivers/regulator/rt6190-regulator.c | 495 +++++++++++++++++++++++++++++++++++ 3 files changed, 507 insertions(+) create mode 100644 drivers/regulator/rt6190-regulator.c
drivers/regulator/Kconfig +11 -0
@@ -1124,6 +1124,17 @@ config REGULATOR_RT6160 The wide output range is from 2025mV to 5200mV and can be used on most common application scenario. +config REGULATOR_RT6190 + tristate "Richtek RT6190 4-Switch BuckBoost controller" + depends on I2C + select REGMAP_I2C + help + The RT6190 is a 4-Switch BuckBoost controller designed for converting + input voltage to output voltage that can be equal to, higher or lower + than input voltage. It operates with wide input voltage range from + 4.5V to 36V, and the output voltage can be set from 3V to 36V by + external FB pin. + config REGULATOR_RT6245 tristate "Richtek RT6245 voltage regulator" depends on I2C
drivers/regulator/Makefile +1 -0
@@ -134,6 +134,7 @@ obj-$(CONFIG_REGULATOR_RT5120) += rt5120-regulator.o obj-$(CONFIG_REGULATOR_RT5190A) += rt5190a-regulator.o obj-$(CONFIG_REGULATOR_RT5759) += rt5759-regulator.o obj-$(CONFIG_REGULATOR_RT6160) += rt6160-regulator.o +obj-$(CONFIG_REGULATOR_RT6190) += rt6190-regulator.o obj-$(CONFIG_REGULATOR_RT6245) += rt6245-regulator.o obj-$(CONFIG_REGULATOR_RTMV20) += rtmv20-regulator.o obj-$(CONFIG_REGULATOR_RTQ2134) += rtq2134-regulator.o
drivers/regulator/rt6190-regulator.c new file +495 -0
495 lines not on this page · raw message
Signature · 1 line
2.7.4