[v2,1/2] dt-bindings: regulator: Add bindings for Richtek RT6190 regulator

Message ID 1666320059-17544-2-git-send-email-u0084500@gmail.com
State New
Headers
Series Add support for Richtek RT6190 36V 4-wwtich regulator |

Commit Message

ChiYuan Huang Oct. 21, 2022, 2:40 a.m. UTC
  From: ChiYuan Huang <cy_huang@richtek.com>

Add devicetree binding for Richtek RT6190 4-Switch buckboost controller.

Signed-off-by: ChiYuan Huang <cy_huang@richtek.com>
---
Since v2:
- Rename binding filename to 'richtek,rt6190.yaml'

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

Comments

Rob Herring Oct. 24, 2022, 4:42 p.m. UTC | #1
On Fri, Oct 21, 2022 at 10:40:58AM +0800, cy_huang wrote:
> From: ChiYuan Huang <cy_huang@richtek.com>
> 
> Add devicetree binding for Richtek RT6190 4-Switch buckboost controller.
> 
> Signed-off-by: ChiYuan Huang <cy_huang@richtek.com>
> ---
> Since v2:
> - Rename binding filename to 'richtek,rt6190.yaml'
> 
> ---
>  .../bindings/regulator/richtek,rt6190.yaml         | 77 ++++++++++++++++++++++
>  1 file changed, 77 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/regulator/richtek,rt6190.yaml
> 
> diff --git a/Documentation/devicetree/bindings/regulator/richtek,rt6190.yaml b/Documentation/devicetree/bindings/regulator/richtek,rt6190.yaml
> new file mode 100644
> index 00000000..dced404
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/regulator/richtek,rt6190.yaml
> @@ -0,0 +1,77 @@
> +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/regulator/richtek,rt6190.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Richtek RT6190 4-Switch BuckBoost controller
> +
> +maintainers:
> +  - ChiYuan Huang <cy_huang@richtek.com>
> +
> +description: |
> +  The RT6190 is 4-Switch BuckBoost controller designed for converting input
> +  voltage to output voltage that can be equal to, higher or lower than input
> +  voltage. It operates with wide input voltage range from 4.5V to 36V, and
> +  the output voltage can be set from 3V to 36V by external FB pin. It's commonly
> +  used for the application like as BuckBoost bus upply, docking station and USB

typo: upply

> +  power delivery product.
> +
> +  Datasheet is available at
> +  https://www.richtek.com/assets/product_file/RT6190/DS6190-02.pdf
> +
> +allOf:
> +  - $ref: regulator.yaml#
> +
> +properties:
> +  compatible:
> +    enum:
> +      - richtek,rt6190
> +
> +  reg:
> +    maxItems: 1
> +
> +  enable-gpios: true

       maxItems: 1

> +
> +  wakeup-source: true
> +
> +  interrupts:
> +    maxItems: 1
> +
> +  regulator-allowed-modes:
> +    description: |
> +      buck allowed operating mode
> +        0: PSM mode (light load Power Saving Mode)
> +        1: FCCM mode (Forced-CCM mode)

       maxItems: 2

> +    items:
> +      enum: [0, 1]
> +
> +required:
> +  - compatible
> +  - reg
> +
> +unevaluatedProperties: false
> +
> +examples:
> +  - |
> +    #include <dt-bindings/gpio/gpio.h>
> +    #include <dt-bindings/interrupt-controller/irq.h>
> +
> +    i2c {
> +      #address-cells = <1>;
> +      #size-cells = <0>;
> +
> +      regulator@2c {
> +        compatible = "richtek,rt6190";
> +        reg = <0x2c>;
> +        wakeup-source;
> +        interrupts-extended = <&gpio26 0 IRQ_TYPE_LEVEL_LOW>;
> +        enable-gpios = <&gpio26 1 GPIO_ACTIVE_HIGH>;
> +        regulator-name = "richtek,rt6190-buckboost";
> +        regulator-min-microvolt = <3000000>;
> +        regulator-max-microvolt = <32000000>;
> +        regulator-min-microamp = <306000>;
> +        regulator-max-microamp = <12114000>;
> +        regulator-allowed-modes = <0 1>;
> +      };
> +    };
> -- 
> 2.7.4
> 
>
  
ChiYuan Huang Oct. 25, 2022, 12:30 a.m. UTC | #2
Rob Herring <robh@kernel.org> 於 2022年10月25日 週二 凌晨12:42寫道:
>
> On Fri, Oct 21, 2022 at 10:40:58AM +0800, cy_huang wrote:
> > From: ChiYuan Huang <cy_huang@richtek.com>
> >
> > Add devicetree binding for Richtek RT6190 4-Switch buckboost controller.
> >
> > Signed-off-by: ChiYuan Huang <cy_huang@richtek.com>
> > ---
> > Since v2:
> > - Rename binding filename to 'richtek,rt6190.yaml'
> >
> > ---
> >  .../bindings/regulator/richtek,rt6190.yaml         | 77 ++++++++++++++++++++++
> >  1 file changed, 77 insertions(+)
> >  create mode 100644 Documentation/devicetree/bindings/regulator/richtek,rt6190.yaml
> >
> > diff --git a/Documentation/devicetree/bindings/regulator/richtek,rt6190.yaml b/Documentation/devicetree/bindings/regulator/richtek,rt6190.yaml
> > new file mode 100644
> > index 00000000..dced404
> > --- /dev/null
> > +++ b/Documentation/devicetree/bindings/regulator/richtek,rt6190.yaml
> > @@ -0,0 +1,77 @@
> > +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
> > +%YAML 1.2
> > +---
> > +$id: http://devicetree.org/schemas/regulator/richtek,rt6190.yaml#
> > +$schema: http://devicetree.org/meta-schemas/core.yaml#
> > +
> > +title: Richtek RT6190 4-Switch BuckBoost controller
> > +
> > +maintainers:
> > +  - ChiYuan Huang <cy_huang@richtek.com>
> > +
> > +description: |
> > +  The RT6190 is 4-Switch BuckBoost controller designed for converting input
> > +  voltage to output voltage that can be equal to, higher or lower than input
> > +  voltage. It operates with wide input voltage range from 4.5V to 36V, and
> > +  the output voltage can be set from 3V to 36V by external FB pin. It's commonly
> > +  used for the application like as BuckBoost bus upply, docking station and USB
>
> typo: upply
>
> > +  power delivery product.
> > +
> > +  Datasheet is available at
> > +  https://www.richtek.com/assets/product_file/RT6190/DS6190-02.pdf
> > +
> > +allOf:
> > +  - $ref: regulator.yaml#
> > +
> > +properties:
> > +  compatible:
> > +    enum:
> > +      - richtek,rt6190
> > +
> > +  reg:
> > +    maxItems: 1
> > +
> > +  enable-gpios: true
>
>        maxItems: 1
>
It's coming from gpio-consumer-common.yaml.
If so, does it still need to declare the 'maxItems'?
> > +
> > +  wakeup-source: true
> > +
> > +  interrupts:
> > +    maxItems: 1
> > +
> > +  regulator-allowed-modes:
> > +    description: |
> > +      buck allowed operating mode
> > +        0: PSM mode (light load Power Saving Mode)
> > +        1: FCCM mode (Forced-CCM mode)
>
>        maxItems: 2
>
> > +    items:
> > +      enum: [0, 1]
> > +
> > +required:
> > +  - compatible
> > +  - reg
> > +
> > +unevaluatedProperties: false
> > +
> > +examples:
> > +  - |
> > +    #include <dt-bindings/gpio/gpio.h>
> > +    #include <dt-bindings/interrupt-controller/irq.h>
> > +
> > +    i2c {
> > +      #address-cells = <1>;
> > +      #size-cells = <0>;
> > +
> > +      regulator@2c {
> > +        compatible = "richtek,rt6190";
> > +        reg = <0x2c>;
> > +        wakeup-source;
> > +        interrupts-extended = <&gpio26 0 IRQ_TYPE_LEVEL_LOW>;
> > +        enable-gpios = <&gpio26 1 GPIO_ACTIVE_HIGH>;
> > +        regulator-name = "richtek,rt6190-buckboost";
> > +        regulator-min-microvolt = <3000000>;
> > +        regulator-max-microvolt = <32000000>;
> > +        regulator-min-microamp = <306000>;
> > +        regulator-max-microamp = <12114000>;
> > +        regulator-allowed-modes = <0 1>;
> > +      };
> > +    };
> > --
> > 2.7.4
> >
> >
  

Patch

diff --git a/Documentation/devicetree/bindings/regulator/richtek,rt6190.yaml b/Documentation/devicetree/bindings/regulator/richtek,rt6190.yaml
new file mode 100644
index 00000000..dced404
--- /dev/null
+++ b/Documentation/devicetree/bindings/regulator/richtek,rt6190.yaml
@@ -0,0 +1,77 @@ 
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/regulator/richtek,rt6190.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Richtek RT6190 4-Switch BuckBoost controller
+
+maintainers:
+  - ChiYuan Huang <cy_huang@richtek.com>
+
+description: |
+  The RT6190 is 4-Switch BuckBoost controller designed for converting input
+  voltage to output voltage that can be equal to, higher or lower than input
+  voltage. It operates with wide input voltage range from 4.5V to 36V, and
+  the output voltage can be set from 3V to 36V by external FB pin. It's commonly
+  used for the application like as BuckBoost bus upply, docking station and USB
+  power delivery product.
+
+  Datasheet is available at
+  https://www.richtek.com/assets/product_file/RT6190/DS6190-02.pdf
+
+allOf:
+  - $ref: regulator.yaml#
+
+properties:
+  compatible:
+    enum:
+      - richtek,rt6190
+
+  reg:
+    maxItems: 1
+
+  enable-gpios: true
+
+  wakeup-source: true
+
+  interrupts:
+    maxItems: 1
+
+  regulator-allowed-modes:
+    description: |
+      buck allowed operating mode
+        0: PSM mode (light load Power Saving Mode)
+        1: FCCM mode (Forced-CCM mode)
+    items:
+      enum: [0, 1]
+
+required:
+  - compatible
+  - reg
+
+unevaluatedProperties: false
+
+examples:
+  - |
+    #include <dt-bindings/gpio/gpio.h>
+    #include <dt-bindings/interrupt-controller/irq.h>
+
+    i2c {
+      #address-cells = <1>;
+      #size-cells = <0>;
+
+      regulator@2c {
+        compatible = "richtek,rt6190";
+        reg = <0x2c>;
+        wakeup-source;
+        interrupts-extended = <&gpio26 0 IRQ_TYPE_LEVEL_LOW>;
+        enable-gpios = <&gpio26 1 GPIO_ACTIVE_HIGH>;
+        regulator-name = "richtek,rt6190-buckboost";
+        regulator-min-microvolt = <3000000>;
+        regulator-max-microvolt = <32000000>;
+        regulator-min-microamp = <306000>;
+        regulator-max-microamp = <12114000>;
+        regulator-allowed-modes = <0 1>;
+      };
+    };