Skip to contentSkip to conversation

Add Richtek RT5759 buck converter support

PATCH In review cy_huang 3 participants 5 messages Mar 26, 2022 – Apr 7, 2022

Subsystems (2)
lore
Share & tools
lore

cy_huang

author
#0 lore raw

v2 cover Add Richtek RT5759 buck converter support

From: ChiYuan Huang <[email protected]>

This patch series add Richtek RT5759 buck converter support.

since V2
- Fix typo in title description.
- Put allOf and if/then to be together.
- Change node name to generic 'regulator'.
- Remove seperate wdt_enable variable.
- Add of_match_ptr in struct driver of_match_table declaration.

ChiYuan Huang (2):
dt-bindings: regulator: Add binding for Richtek RT5759 DCDC converter
regulator: rt5759: Add support for Richtek RT5759 DCDC converter

 .../regulator/richtek,rt5759-regulator.yaml        |  90 +++++
 drivers/regulator/Kconfig                          |  10 +
 drivers/regulator/Makefile                         |   1 +
 drivers/regulator/rt5759-regulator.c               | 369 +++++++++++++++++++++
 4 files changed, 470 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/regulator/richtek,rt5759-regulator.yaml
 create mode 100644 drivers/regulator/rt5759-regulator.c
Signature · 1 line
2.7.4
author
#1 lore raw

PATCH v2 1/2 dt-bindings: regulator: Add binding for Richtek RT5759 DCDC converter

From: ChiYuan Huang <[email protected]>

Add bindings for Richtek RT5759 high-performance DCDC converter.

---
 .../regulator/richtek,rt5759-regulator.yaml        | 90 ++++++++++++++++++++++
 1 file changed, 90 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/regulator/richtek,rt5759-regulator.yaml
Documentation/devicetree/bindings/regulator/richtek,rt5759-regulator.yaml new file +90 -0
new file mode 100644
index 00000000..0a4c957
@@ -0,0 +1,90 @@
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/regulator/richtek,rt5759-regulator.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Richtek RT5759 High Performance DCDC Converter
+
+maintainers:
+  - ChiYuan Huang <[email protected]>
+
+description: |
+  The RT5759 is a high-performance, synchronous step-down DC-DC converter that
+  can deliver up to 9A output current from 3V to 6.5V input supply, The output
+  voltage can be programmable with I2C controlled 7-Bit VID.
+
+  Datasheet is available at
+  https://www.richtek.com/assets/product_file/RT5759/DS5759-00.pdf
+
+properties:
+  compatible:
+    enum:
+      - richtek,rt5759
+      - richtek,rt5759a
+
+  reg:
+    maxItems: 1
+
+  regulator-allowed-modes:
+    description: |
+      buck allowed operating mode
+        0: auto mode (PSKIP: pulse skipping)
+        1: force pwm mode
+    items:
+      enum: [0, 1]
+
+  richtek,watchdog-enable:
+    description: enable the external watchdog reset pin listening
+    type: boolean
+
+allOf:
+  - $ref: regulator.yaml#
+
+  - if:
+      properties:
+        compatible:
+          contains:
+            const: richtek,rt5759
+    then:
+      properties:
+        richtek,watchdog-enable: false
+
+required:
+  - compatible
+  - reg
+
+unevaluatedProperties: false
+
+examples:
+  # example 1 for RT5759
+  - |
+    i2c {
+      #address-cells = <1>;
+      #size-cells = <0>;
+
+      regulator@62 {
+        compatible = "richtek,rt5759";
+        reg = <0x62>;
+        regulator-name = "rt5759-buck";
+        regulator-min-microvolt = <600000>;
+        regulator-max-microvolt = <1500000>;
+        regulator-boot-on;
+      };
+    };
+  # example 2 for RT5759A
+  - |
+    i2c {
+      #address-cells = <1>;
+      #size-cells = <0>;
+
+      regulator@62 {
+        compatible = "richtek,rt5759a";
+        reg = <0x62>;
+        regulator-name = "rt5759a-buck";
+        regulator-min-microvolt = <600000>;
+        regulator-max-microvolt = <1725000>;
+        regulator-boot-on;
+        richtek,watchdog-enable;
+      };
+    };
Signature · 1 line
2.7.4
Reviewed-by on v2 1/2
#2 lore raw

Re: [PATCH v2 1/2] dt-bindings: regulator: Add binding for Richtek RT5759 DCDC converter

Quoted 10 lines · cy_huang

From: ChiYuan Huang <[email protected]>

Add bindings for Richtek RT5759 high-performance DCDC converter.

---
 .../regulator/richtek,rt5759-regulator.yaml        | 90 ++++++++++++++++++++++
 1 file changed, 90 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/regulator/richtek,rt5759-regulator.yaml

Best regards,
Krzysztof

author
#3 lore raw

PATCH v2 2/2 regulator: rt5759: Add support for Richtek RT5759 DCDC converter

In reply to cy_huang

From: ChiYuan Huang <[email protected]>

Add support for Richtek RT5759 high-performance DCDC converter.

---
 drivers/regulator/Kconfig            |  10 +
 drivers/regulator/Makefile           |   1 +
 drivers/regulator/rt5759-regulator.c | 369 +++++++++++++++++++++++++++++++++++
 3 files changed, 380 insertions(+)
 create mode 100644 drivers/regulator/rt5759-regulator.c
drivers/regulator/Kconfig +10 -0
index 1c35fed2..72e0318 100644
@@ -1046,6 +1046,16 @@ config REGULATOR_RT5033
 	  RT5033 PMIC. The device supports multiple regulators like
 	  current source, LDO and Buck.
 
+config REGULATOR_RT5759
+	tristate "Richtek RT5759 Regulator"
+	depends on I2C
+	select REGMAP_I2C
+	help
+	  This adds support for voltage regulator in Richtek RT5759.
+	  The RT5759 is a high-performance, synchronous step-down DC-DC
+	  converter that can deliver up to 9A output current from 3V to 6.5V
+	  input supply.
+
 config REGULATOR_RT6160
 	tristate "Richtek RT6160 BuckBoost voltage regulator"
 	depends on I2C
drivers/regulator/Makefile +1 -0
index 2e1b087..239a3a3 100644
@@ -126,6 +126,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_RT5759)	+= rt5759-regulator.o
 obj-$(CONFIG_REGULATOR_RT6160)	+= rt6160-regulator.o
 obj-$(CONFIG_REGULATOR_RT6245)	+= rt6245-regulator.o
 obj-$(CONFIG_REGULATOR_RTMV20)	+= rtmv20-regulator.o
drivers/regulator/rt5759-regulator.c new file +369 -0

369 lines not on this page · raw message

Signature · 1 line
2.7.4
maintainer
#4 lore raw
In reply to cy_huang
Quoted 4 lines · cy_huang

From: ChiYuan Huang <[email protected]>

This patch series add Richtek RT5759 buck converter support.

Quoted 8 lines

since V2
- Fix typo in title description.
- Put allOf and if/then to be together.
- Change node name to generic 'regulator'.
- Remove seperate wdt_enable variable.
- Add of_match_ptr in struct driver of_match_table declaration.

[...]

Applied to

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

Thanks!

[1/2] dt-bindings: regulator: Add binding for Richtek RT5759 DCDC converter

      commit: 2a826d9c4251e4a64aa79113aac8cedf7cd0ff57
[2/2] regulator: rt5759: Add support for Richtek RT5759 DCDC converter
      commit: 7b36ddb208bd1744f4769f11e530bc08c3701964

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