Skip to contentSkip to conversation

regulator: rt6160: Add DT binding documet for Richtek RT6160

PATCH Superseded cy_huang 2 participants 4 messages May 3, 2021 – May 7, 2021

Subsystems (2)

v1 of 7 Superseded Latest is v7 →

lore
Share & tools
lore

cy_huang

author
#0 lore raw

PATCH 1/2 regulator: rt6160: Add DT binding documet for Richtek RT6160

From: ChiYuan Huang <[email protected]>

Add the DT binding document for Richtek RT6160 voltage regulator.

---
 .../regulator/richtek,rt6160-regulator.yaml        | 68 ++++++++++++++++++++++
 1 file changed, 68 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/regulator/richtek,rt6160-regulator.yaml
Documentation/devicetree/bindings/regulator/richtek,rt6160-regulator.yaml new file +68 -0
new file mode 100644
index 00000000..fe7b168
@@ -0,0 +1,68 @@
+# 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
+
+patternProperties:
+  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
author
#1 lore raw

PATCH 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 buck-boost converter to support wide input voltage range from 2200mV to 5500mV.

---
 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
index 9d84d92..4fe7ddc 100644
@@ -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
index 580b015..5b2c93e 100644
@@ -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
maintainer
#2 lore raw
In reply to cy_huang
Quoted 1 line · cy_huang

From: ChiYuan Huang <[email protected]>

Typo in the subject.

Quoted 44 lines

Add the DT binding document for Richtek RT6160 voltage regulator.

---
 .../regulator/richtek,rt6160-regulator.yaml        | 68 ++++++++++++++++++++++
 1 file changed, 68 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/regulator/richtek,rt6160-regulator.yaml
Documentation/devicetree/bindings/regulator/richtek,rt6160-regulator.yaml new file +29 -0
new file mode 100644
index 00000000..fe7b168
@@ -0,0 +1,68 @@
+# 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.

Documentation/devicetree/bindings/regulator/richtek,rt6160-regulator.yaml line 39

Quoted 10 lines
Documentation/devicetree/bindings/regulator/richtek,rt6160-regulator.yaml new file +10 -0
+    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
+
+patternProperties:
+  buckboost:

foo-buckboost-bar is valid name?

It's not a pattern, so move to 'properties'.

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
#3 lore raw

HI,

Rob Herring <[email protected]> 於 2021年5月6日 週四 下午11:27寫道:

Quoted 6 lines · cy_huang
Quoted 1 line

From: ChiYuan Huang <[email protected]>

Typo in the subject.

Will be fixed in next.

Quoted 57 lines
Quoted 44 lines

Add the DT binding document for Richtek RT6160 voltage regulator.

---
 .../regulator/richtek,rt6160-regulator.yaml        | 68 ++++++++++++++++++++++
 1 file changed, 68 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/regulator/richtek,rt6160-regulator.yaml
Documentation/devicetree/bindings/regulator/richtek,rt6160-regulator.yaml new file +29 -0
new file mode 100644
index 00000000..fe7b168
@@ -0,0 +1,68 @@
+# 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.

Documentation/devicetree/bindings/regulator/richtek,rt6160-regulator.yaml line 39

Quoted 10 lines
Documentation/devicetree/bindings/regulator/richtek,rt6160-regulator.yaml new file +10 -0
+    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
+
+patternProperties:
+  buckboost:

foo-buckboost-bar is valid name?

Quoted 2 lines

It's not a pattern, so move to 'properties'.

Sorry, maybe I misunderstand the meaning of patternProperty. I'll move it into the properties, 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