Skip to contentSkip to conversation

regulator: rt6160: Add DT binding document for Richtek RT6160

PATCH Superseded cy_huang 2 participants 3 messages Jun 1, 2021 – Jun 3, 2021

Subsystems (2)

v6 of 7 Superseded Latest is v7 →

lore
Share & tools
lore

cy_huang

author
#0 lore raw

PATCH v6 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 v4
- Add Reviewed-by.

since v3
- Move all regulator related properties to the upper node.

since v2
- Move buckboost node from patternProperties to Properties.

---
 .../regulator/richtek,rt6160-regulator.yaml        | 61 ++++++++++++++++++++++
 1 file changed, 61 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/regulator/richtek,rt6160-regulator.yaml
Documentation/devicetree/bindings/regulator/richtek,rt6160-regulator.yaml new file +61 -0
new file mode 100644
index 00000000..0534b0d
@@ -0,0 +1,61 @@
+# 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
+
+allOf:
+  - $ref: regulator.yaml#
+
+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
+
+required:
+  - compatible
+  - reg
+
+unevaluatedProperties: false
+
+examples:
+  - |
+    i2c {
+      #address-cells = <1>;
+      #size-cells = <0>;
+
+      rt6160@75 {
+        compatible = "richtek,rt6160";
+        reg = <0x75>;
+        enable-gpios = <&gpio26 2 0>;
+        regulator-name = "rt6160-buckboost";
+        regulator-min-microvolt = <2025000>;
+        regulator-max-microvolt = <5200000>;
+      };
+    };
Signature · 1 line
2.7.4
author
#1 lore raw

PATCH v6 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 v6
- Emergency fix for kernel test robot PTR_ERR fail.

since v5
- Add 'enable" gpio control into regulator enable/disable.
- Refine regulator ramp delay ops.
- Due to 'enable' gpio H to L cause register reset, use regcache.

since v4
- Add of_node into regulator_config to fix regulator_get by device tree node parsing.

since v3
- Use more header file like as of_regulator.h and property.h.
- Change the parsing string from 'richtek,vsel_active_low' to 'richtek,vsel-active-low'.
- Use of_get_regulator_init_data to get the regulator init_data.

since v2
- Fix W=1 warning for of_device_id.

---
 drivers/regulator/Kconfig            |  11 ++
 drivers/regulator/Makefile           |   1 +
 drivers/regulator/rt6160-regulator.c | 328 +++++++++++++++++++++++++++++++++++
 3 files changed, 340 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 +328 -0

328 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

Add DT binding document for Richtek RT6160 voltage regulator.

Applied to

https://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator.git for-next

Thanks!

[1/2] regulator: rt6160: Add DT binding document for Richtek RT6160

      commit: bce18e52c866ff6ded13ac8ac37e9271f786c005
[2/2] regulator: rt6160: Add support for Richtek RT6160
      commit: de20b747c5836ffc6768914b95d7617139fac4f4

All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying to this mail.

Thanks,
Mark