diff mbox series

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

Message ID 1648170401-6351-2-git-send-email-u0084500@gmail.com
State Superseded, archived
Headers show
Series Add Richtek RT5759 buck converter support | expand

Checks

Context Check Description
robh/patch-applied success
robh/checkpatch success
robh/dtbs-check success
robh/dt-meta-schema success

Commit Message

ChiYuan Huang March 25, 2022, 1:06 a.m. UTC
From: ChiYuan Huang <cy_huang@richtek.com>

Add bindings for Richtek RT5759 high-performance DCDC converter.

Signed-off-by: ChiYuan Huang <cy_huang@richtek.com>
---
 .../regulator/richtek,rt5759-regulator.yaml        | 90 ++++++++++++++++++++++
 1 file changed, 90 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/regulator/richtek,rt5759-regulator.yaml

Comments

Krzysztof Kozlowski March 25, 2022, 12:14 p.m. UTC | #1
On 25/03/2022 02:06, cy_huang wrote:
> From: ChiYuan Huang <cy_huang@richtek.com>
> 
> Add bindings for Richtek RT5759 high-performance DCDC converter.
> 
> Signed-off-by: ChiYuan Huang <cy_huang@richtek.com>
> ---
>  .../regulator/richtek,rt5759-regulator.yaml        | 90 ++++++++++++++++++++++
>  1 file changed, 90 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/regulator/richtek,rt5759-regulator.yaml
> 
> diff --git a/Documentation/devicetree/bindings/regulator/richtek,rt5759-regulator.yaml b/Documentation/devicetree/bindings/regulator/richtek,rt5759-regulator.yaml
> new file mode 100644
> index 00000000..c24b583
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/regulator/richtek,rt5759-regulator.yaml
> @@ -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 Concverter

typo: Converter

> +
> +maintainers:
> +  - ChiYuan Huang <cy_huang@richtek.com>
> +
> +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
> +
> +allOf:
> +  - $ref: regulator.yaml#
> +
> +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
> +
> +if:

This should be inside allOf. Move allOf here,

> +  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>;
> +
> +      rt5759@62 {

Generic node name, so pmic.

> +        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>;
> +
> +      rt5759a@62 {

Ditto

> +        compatible = "richtek,rt5759a";
> +        reg = <0x62>;
> +        regulator-name = "rt5759a-buck";
> +        regulator-min-microvolt = <600000>;
> +        regulator-max-microvolt = <1725000>;
> +        regulator-boot-on;
> +        richtek,watchdog-enable;
> +      };
> +    };


Best regards,
Krzysztof
ChiYuan Huang March 25, 2022, 1:44 p.m. UTC | #2
Krzysztof Kozlowski <krzk@kernel.org> 於 2022年3月25日 週五 下午8:14寫道:
>
> On 25/03/2022 02:06, cy_huang wrote:
> > From: ChiYuan Huang <cy_huang@richtek.com>
> >
> > Add bindings for Richtek RT5759 high-performance DCDC converter.
> >
> > Signed-off-by: ChiYuan Huang <cy_huang@richtek.com>
> > ---
> >  .../regulator/richtek,rt5759-regulator.yaml        | 90 ++++++++++++++++++++++
> >  1 file changed, 90 insertions(+)
> >  create mode 100644 Documentation/devicetree/bindings/regulator/richtek,rt5759-regulator.yaml
> >
> > diff --git a/Documentation/devicetree/bindings/regulator/richtek,rt5759-regulator.yaml b/Documentation/devicetree/bindings/regulator/richtek,rt5759-regulator.yaml
> > new file mode 100644
> > index 00000000..c24b583
> > --- /dev/null
> > +++ b/Documentation/devicetree/bindings/regulator/richtek,rt5759-regulator.yaml
> > @@ -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 Concverter
>
> typo: Converter
>
Ack in next.
> > +
> > +maintainers:
> > +  - ChiYuan Huang <cy_huang@richtek.com>
> > +
> > +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
> > +
> > +allOf:
> > +  - $ref: regulator.yaml#
> > +
> > +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
> > +
> > +if:
>
> This should be inside allOf. Move allOf here,
>
Ack in next.
> > +  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>;
> > +
> > +      rt5759@62 {
>
> Generic node name, so pmic.
>
As my understanding, 'pmic' means there must be multiple channels of
buck or ldo.
But  rt5759 is only one channel buck converter.

> > +        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>;
> > +
> > +      rt5759a@62 {
>
> Ditto
>
> > +        compatible = "richtek,rt5759a";
> > +        reg = <0x62>;
> > +        regulator-name = "rt5759a-buck";
> > +        regulator-min-microvolt = <600000>;
> > +        regulator-max-microvolt = <1725000>;
> > +        regulator-boot-on;
> > +        richtek,watchdog-enable;
> > +      };
> > +    };
>
>
> Best regards,
> Krzysztof
Krzysztof Kozlowski March 25, 2022, 2:46 p.m. UTC | #3
On 25/03/2022 14:44, ChiYuan Huang wrote:

(...)

>>> +unevaluatedProperties: false
>>> +
>>> +examples:
>>> +  # example 1 for RT5759
>>> +  - |
>>> +    i2c {
>>> +      #address-cells = <1>;
>>> +      #size-cells = <0>;
>>> +
>>> +      rt5759@62 {
>>
>> Generic node name, so pmic.
>>
> As my understanding, 'pmic' means there must be multiple channels of
> buck or ldo.
> But  rt5759 is only one channel buck converter.

Then "regulator". rt5759 is not a generic name but specific.

Best regards,
Krzysztof
ChiYuan Huang March 25, 2022, 2:53 p.m. UTC | #4
Krzysztof Kozlowski <krzk@kernel.org> 於 2022年3月25日 週五 下午10:46寫道:
>
> On 25/03/2022 14:44, ChiYuan Huang wrote:
>
> (...)
>
> >>> +unevaluatedProperties: false
> >>> +
> >>> +examples:
> >>> +  # example 1 for RT5759
> >>> +  - |
> >>> +    i2c {
> >>> +      #address-cells = <1>;
> >>> +      #size-cells = <0>;
> >>> +
> >>> +      rt5759@62 {
> >>
> >> Generic node name, so pmic.
> >>
> > As my understanding, 'pmic' means there must be multiple channels of
> > buck or ldo.
> > But  rt5759 is only one channel buck converter.
>
> Then "regulator". rt5759 is not a generic name but specific.
>
OK, it's more generic node name for this kind of single channel buck.
> Best regards,
> Krzysztof
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/regulator/richtek,rt5759-regulator.yaml b/Documentation/devicetree/bindings/regulator/richtek,rt5759-regulator.yaml
new file mode 100644
index 00000000..c24b583
--- /dev/null
+++ b/Documentation/devicetree/bindings/regulator/richtek,rt5759-regulator.yaml
@@ -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 Concverter
+
+maintainers:
+  - ChiYuan Huang <cy_huang@richtek.com>
+
+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
+
+allOf:
+  - $ref: regulator.yaml#
+
+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
+
+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>;
+
+      rt5759@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>;
+
+      rt5759a@62 {
+        compatible = "richtek,rt5759a";
+        reg = <0x62>;
+        regulator-name = "rt5759a-buck";
+        regulator-min-microvolt = <600000>;
+        regulator-max-microvolt = <1725000>;
+        regulator-boot-on;
+        richtek,watchdog-enable;
+      };
+    };