dt-bindings: regulator: Add Richtek RT5133 Support
Subsystems (2)
PATCH v5 1/2 dt-bindings: regulator: Add Richtek RT5133 Support
From: Jeff Chang <[email protected]>
Add bindings for Richtek RT5133 IC Controlled PMIC
---
PATCH v5
1. Fix Subject RT5133
2. Update Base regulator description.
3. Move richtek,oc-shutdown-all and richtek,pgb-shutdown-all to chip layer.
4. Update richtek,oc-shutdown-all and richtek,pgb-shutdown-all description.
5. Remove rt5133-ldo-supply, just using vin-supply for pvin7 and pvin8. Pvin7,8 are power source for LDO7,8. Referecne is LDO1 Vout.
6. Using standard examples. (Node name and IRQ type)
.../bindings/regulator/richtek,rt5133.yaml | 176 ++++++++++++++++++ 1 file changed, 176 insertions(+) create mode 100644 Documentation/devicetree/bindings/regulator/richtek,rt5133.yaml
Documentation/devicetree/bindings/regulator/richtek,rt5133.yaml new file +176 -0
@@ -0,0 +1,176 @@ +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/regulator/richtek,rt5133.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Richtek RT5133 PMIC Regulator + +maintainers: + - ShihChia Chang <[email protected]> + +description: + The RT5133 is an integrated Power Management IC for portable devices, featuring + 8 LDOs and 3 GPOs. It allows programmable output voltages, soft-start times, + and protections via I2C. GPO operation depends on LDO1 voltage. + +properties: + compatible: + enum: + - richtek,rt5133 + + reg: + maxItems: 1 + + enable-gpios: + maxItems: 1 + + wakeup-source: true + + interrupts: + maxItems: 1 + + gpio-controller: true + + "#gpio-cells": + const: 2 + + richtek,oc-shutdown-all: + type: boolean + description: + Controls the behavior when any LDO (Low Dropout Regulator) enters an Over Current state. + If set to true, all LDO channels will be shut down. + If set to false (default), only the affected LDO channel will shut down itself. + + richtek,pgb-shutdown-all: + type: boolean + description: + Controls the behavior when any LDO enters a Power Bad state. + If set to true, all LDO channels will be shut down. + If set to false (default), only the affected LDO channel will shut down itself. + + regulators: + type: object + additionalProperties: false + + properties: + base: + type: object + $ref: regulator.yaml# + unevaluatedProperties: false + description: + Properties for the base regulator, which is the top-level supply for + LDO1 to LDO6. It functions merely as an on/off switch rather than + regulating voltages. If none of LDO1 to LDO6 are in use, switching off + the base will reduce the quiescent current. + + required: + - regulator-name + + patternProperties: + "^ldo([1-6])$": + type: object + $ref: regulator.yaml# + unevaluatedProperties: false + description: + Properties for single LDO regulator + + required: + - regulator-name + + "^ldo([7-8])$": + type: object + $ref: regulator.yaml# + unevaluatedProperties: false + description: + Properties for single LDO regulator + + properties: + vin-supply: true + + required: + - regulator-name + - vin-supply + +required: + - compatible + - reg + - interrupts + - wakeup-source + +unevaluatedProperties: false + +examples: + - | + #include <dt-bindings/interrupt-controller/irq.h> + i2c { + #address-cells = <1>; + #size-cells = <0>; + + pmic@18 { + compatible = "richtek,rt5133"; + reg = <0x18>; + wakeup-source; + interrupts-extended = <&gpio 0 IRQ_TYPE_EDGE_FALLING>; + enable-gpios = <&gpio 2 0>; + gpio-controller; + #gpio-cells = <2>; + richtek,oc-shutdown-all; + richtek,pgb-shutdown-all; + regulators { + base { + regulator-name = "rt5133,base"; + }; + pvin78: ldo1 { + regulator-name = "rt5133-ldo1"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <3199998>; + regulator-active-discharge = <1>; + }; + ldo2 { + regulator-name = "rt5133-ldo2"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <3200000>; + regulator-active-discharge = <1>; + }; + ldo3 { + regulator-name = "rt5133-ldo3"; + regulator-min-microvolt = <1700000>; + regulator-max-microvolt = <3000000>; + regulator-active-discharge = <1>; + }; + ldo4 { + regulator-name = "rt5133-ldo4"; + regulator-min-microvolt = <1700000>; + regulator-max-microvolt = <3000000>; + regulator-active-discharge = <1>; + }; + ldo5 { + regulator-name = "rt5133-ldo5"; + regulator-min-microvolt = <1700000>; + regulator-max-microvolt = <3000000>; + regulator-active-discharge = <1>; + }; + ldo6 { + regulator-name = "rt5133-ldo6"; + regulator-min-microvolt = <1700000>; + regulator-max-microvolt = <3000000>; + regulator-active-discharge = <1>; + }; + ldo7 { + regulator-name = "rt5133-ldo7"; + regulator-min-microvolt = <900000>; + regulator-max-microvolt = <1200000>; + regulator-active-discharge = <1>; + vin-supply = <&pvin78>; + }; + ldo8 { + regulator-name = "rt5133-ldo8"; + regulator-min-microvolt = <855000>; + regulator-max-microvolt = <1200000>; + regulator-active-discharge = <1>; + vin-supply = <&pvin78>; + }; + }; + }; + };
--
2.43.0
PATCH v5 2/2 regulator: rt5133: Add RT5133 PMIC regulator Support
From: Jeff Chang <[email protected]>
RT5133 is a highly-integrated chip. It includes 8 LDOs and 3 GPOs that can be used to drive output high/low purpose. The dependency of the GPO block is internally LDO1 Voltage.
---
PATCH v5
1. Move oc-shutdown-all, pgb-shutdown-all properties to chip layer. Remove of_parse_cb of regulators_desc.
2. Using vin as LDO7's and LDO8's supply_name.
drivers/regulator/Kconfig | 12 + drivers/regulator/Makefile | 1 + drivers/regulator/rt5133-regulator.c | 642 +++++++++++++++++++++++++++ 3 files changed, 655 insertions(+) create mode 100644 drivers/regulator/rt5133-regulator.c
drivers/regulator/Kconfig +12 -0
@@ -1229,6 +1229,18 @@ config REGULATOR_RT5120 600mV to 1395mV, per step 6.250mV. The others are all fixed voltage by external hardware circuit. +config REGULATOR_RT5133 + tristate "Richtek RT5133 PMIC Regulators" + depends on I2C && GPIOLIB && OF + select REGMAP + select CRC8 + select OF_GPIO + help + This driver adds support for RT5133 PMIC regulators. + RT5133 is an integrated chip. It includes 8 LDOs and 3 GPOs that + can be used to drive output high/low purpose. The dependency of the + GPO block is internally LDO1 Voltage. + config REGULATOR_RT5190A tristate "Richtek RT5190A PMIC" depends on I2C
drivers/regulator/Makefile +1 -0
@@ -145,6 +145,7 @@ obj-$(CONFIG_REGULATOR_RT4803) += rt4803.o obj-$(CONFIG_REGULATOR_RT4831) += rt4831-regulator.o obj-$(CONFIG_REGULATOR_RT5033) += rt5033-regulator.o obj-$(CONFIG_REGULATOR_RT5120) += rt5120-regulator.o +obj-$(CONFIG_REGULATOR_RT5133) += rt5133-regulator.o obj-$(CONFIG_REGULATOR_RT5190A) += rt5190a-regulator.o obj-$(CONFIG_REGULATOR_RT5739) += rt5739.o obj-$(CONFIG_REGULATOR_RT5759) += rt5759-regulator.o
drivers/regulator/rt5133-regulator.c new file +642 -0
642 lines not on this page · raw message
--
2.43.0
Quoted 5 lines · On 29/07/2025 08:40, [email protected] wrote:
From: Jeff Chang <[email protected]>
Add bindings for Richtek RT5133 IC Controlled PMIC
Signed-off-by Jeff Chang <[email protected]>
Subject prefix did not improve. Please read ENTIRE feedback you got at v1, v2 and v3. I think v4 is the only one you applied.
Quoted 24 lines
---
PATCH v5
1. Fix Subject RT5133
2. Update Base regulator description.
3. Move richtek,oc-shutdown-all and richtek,pgb-shutdown-all to chip layer.
4. Update richtek,oc-shutdown-all and richtek,pgb-shutdown-all description.
5. Remove rt5133-ldo-supply, just using vin-supply for pvin7 and pvin8. Pvin7,8 are power source for LDO7,8. Referecne is LDO1 Vout.
6. Using standard examples. (Node name and IRQ type).../bindings/regulator/richtek,rt5133.yaml | 176 ++++++++++++++++++ 1 file changed, 176 insertions(+) create mode 100644 Documentation/devicetree/bindings/regulator/richtek,rt5133.yamlDocumentation/devicetree/bindings/regulator/richtek,rt5133.yaml new file +3
-0@@ -0,0 +1,176 @@ +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause +%YAML 1.2 +---
Documentation/devicetree/bindings/regulator/richtek,rt5133.yaml line 13
Quoted 10 lines
Documentation/devicetree/bindings/regulator/richtek,rt5133.yaml new file +10
-0+$id: http://devicetree.org/schemas/regulator/richtek,rt5133.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Richtek RT5133 PMIC Regulator + +maintainers: + - ShihChia Chang <[email protected]> + +description: + The RT5133 is an integrated Power Management IC for portable devices, featuring
Still not wrapped.
Quoted 18 lines
Documentation/devicetree/bindings/regulator/richtek,rt5133.yaml new file +18
-0+ 8 LDOs and 3 GPOs. It allows programmable output voltages, soft-start times, + and protections via I2C. GPO operation depends on LDO1 voltage. + +properties: + compatible: + enum: + - richtek,rt5133 + + reg: + maxItems: 1 + + enable-gpios: + maxItems: 1 + + wakeup-source: true + + interrupts: + maxItems: 1
Documentation/devicetree/bindings/regulator/richtek,rt5133.yaml line 41
Quoted 10 lines
Documentation/devicetree/bindings/regulator/richtek,rt5133.yaml new file +10
-0+ + gpio-controller: true + + "#gpio-cells": + const: 2 + + richtek,oc-shutdown-all: + type: boolean + description: + Controls the behavior when any LDO (Low Dropout Regulator) enters an Over Current state.
Still not wrapped. Please follow Linux coding style.
Quoted 48 lines
Documentation/devicetree/bindings/regulator/richtek,rt5133.yaml new file +48
-0+ If set to true, all LDO channels will be shut down. + If set to false (default), only the affected LDO channel will shut down itself. + + richtek,pgb-shutdown-all: + type: boolean + description: + Controls the behavior when any LDO enters a Power Bad state. + If set to true, all LDO channels will be shut down. + If set to false (default), only the affected LDO channel will shut down itself. + + regulators: + type: object + additionalProperties: false + + properties: + base: + type: object + $ref: regulator.yaml# + unevaluatedProperties: false + description: + Properties for the base regulator, which is the top-level supply for + LDO1 to LDO6. It functions merely as an on/off switch rather than + regulating voltages. If none of LDO1 to LDO6 are in use, switching off + the base will reduce the quiescent current. + + required: + - regulator-name + + patternProperties: + "^ldo([1-6])$": + type: object + $ref: regulator.yaml# + unevaluatedProperties: false + description: + Properties for single LDO regulator + + required: + - regulator-name + + "^ldo([7-8])$": + type: object + $ref: regulator.yaml# + unevaluatedProperties: false + description: + Properties for single LDO regulator + + properties: + vin-supply: true
Documentation/devicetree/bindings/regulator/richtek,rt5133.yaml line 99
Quoted 10 lines
Documentation/devicetree/bindings/regulator/richtek,rt5133.yaml new file +10
-0+ + required: + - regulator-name + - vin-supply + +required: + - compatible + - reg + - interrupts + - wakeup-source
This is surprising. If this is required, then it is implied by the compatible. Drop it from here and from properties.
Documentation/devicetree/bindings/regulator/richtek,rt5133.yaml line 101
Quoted 2 lines
Documentation/devicetree/bindings/regulator/richtek,rt5133.yaml new file +2
-0+ +unevaluatedProperties: false
additionalProperties instead
Quoted 4 lines
Documentation/devicetree/bindings/regulator/richtek,rt5133.yaml new file +4
-0+ +examples: + - | + #include <dt-bindings/interrupt-controller/irq.h>
Documentation/devicetree/bindings/regulator/richtek,rt5133.yaml line 115
Quoted 10 lines
Documentation/devicetree/bindings/regulator/richtek,rt5133.yaml new file +10
-0+ i2c { + #address-cells = <1>; + #size-cells = <0>; + + pmic@18 { + compatible = "richtek,rt5133"; + reg = <0x18>; + wakeup-source; + interrupts-extended = <&gpio 0 IRQ_TYPE_EDGE_FALLING>; + enable-gpios = <&gpio 2 0>;
This did not improve.
Documentation/devicetree/bindings/regulator/richtek,rt5133.yaml line 122
Quoted 7 lines
Documentation/devicetree/bindings/regulator/richtek,rt5133.yaml new file +7
-0+ gpio-controller; + #gpio-cells = <2>; + richtek,oc-shutdown-all; + richtek,pgb-shutdown-all; + regulators { + base { + regulator-name = "rt5133,base";
Names do not have commas.
Documentation/devicetree/bindings/regulator/richtek,rt5133.yaml line 125
Quoted 3 lines
Documentation/devicetree/bindings/regulator/richtek,rt5133.yaml new file +3
-0+ }; + pvin78: ldo1 { + regulator-name = "rt5133-ldo1";
Drop rt5133 prefix from every name.
Best regards,
Krzysztof