Re: [PATCH 08/13] dt-bindings: mfd: add rk806 binding

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 01/09/2022 00:54, Sebastian Reichel wrote:
> Add DT binding document for Rockchip's RK806 PMIC.
> 
> Signed-off-by: Sebastian Reichel <sebastian.reichel@xxxxxxxxxxxxx>
> ---
>  .../bindings/mfd/rockchip,rk806.yaml          | 388 ++++++++++++++++++
>  1 file changed, 388 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/mfd/rockchip,rk806.yaml
> 
> diff --git a/Documentation/devicetree/bindings/mfd/rockchip,rk806.yaml b/Documentation/devicetree/bindings/mfd/rockchip,rk806.yaml
> new file mode 100644
> index 000000000000..c775ef60db8b
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/mfd/rockchip,rk806.yaml
> @@ -0,0 +1,388 @@
> +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/mfd/rockchip,rk806.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: RK806 Power Management Integrated Circuit
> +
> +maintainers:
> +  - Sebastian Reichel <sebastian.reichel@xxxxxxxxxxxxx>
> +
> +description: |
> +  Rockchip RK806 series PMIC. This device consists of an spi or
> +  i2c controlled MFD that includes multiple switchable regulators.
> +
> +properties:
> +  compatible:
> +    enum:
> +      - rockchip,rk806
> +
> +  reg:
> +    maxItems: 1
> +
> +  interrupts:
> +    maxItems: 1
> +
> +  gpio-controller: true
> +
> +  '#gpio-cells':
> +    const: 2
> +
> +  vcc1-supply:
> +    description:
> +      The input supply for DCDC_REG1.
> +
> +  vcc2-supply:
> +    description:
> +      The input supply for DCDC_REG2.
> +
> +  vcc3-supply:
> +    description:
> +      The input supply for DCDC_REG3.
> +
> +  vcc4-supply:
> +    description:
> +      The input supply for DCDC_REG4.
> +
> +  vcc5-supply:
> +    description:
> +      The input supply for DCDC_REG5.
> +
> +  vcc6-supply:
> +    description:
> +      The input supply for DCDC_REG6.
> +
> +  vcc7-supply:
> +    description:
> +      The input supply for DCDC_REG7.
> +
> +  vcc8-supply:
> +    description:
> +      The input supply for DCDC_REG8.
> +
> +  vcc9-supply:
> +    description:
> +      The input supply for DCDC_REG9.
> +
> +  vcc10-supply:
> +    description:
> +      The input supply for DCDC_REG10.
> +
> +  vcc11-supply:
> +    description:
> +      The input supply for PLDO_REG1, PLDO_REG2 and PLDO_REG3.
> +
> +  vcc12-supply:
> +    description:
> +      The input supply for PLDO_REG4 and PLDO_REG5.
> +
> +  vcc13-supply:
> +    description:
> +      The input supply for NLDO_REG1, NLDO_REG2 and NLDO_REG3.
> +
> +  vcc14-supply:
> +    description:
> +      The input supply for NLDO_REG4 and NLDO_REG5.
> +
> +  vcca-supply:
> +    description:
> +      The input supply for PLDO_REG6.
> +
> +  regulators:
> +    type: object
> +    patternProperties:
> +      "^(DCDC_REG[1-9]0?|[PN]LDO_REG[1-6])$":

1. Your pattern is a bit wide. Seems to accept DCDC_REG90. That piece
should be ([1-9]|10)

2. Only lowercase and no underscores in node names.


> +        type: object
> +        $ref: ../regulator/regulator.yaml#

Full path, so /schemas/regulator/......

> +    unevaluatedProperties: false
> +
> +required:
> +  - compatible
> +  - reg
> +  - interrupts
> +
> +additionalProperties: false
> +
> +examples:
> +  - |
> +    #include <dt-bindings/pinctrl/rockchip.h>
> +    #include <dt-bindings/interrupt-controller/irq.h>
> +    #include <dt-bindings/gpio/gpio.h>
> +    spi {
> +        #address-cells = <1>;
> +        #size-cells = <0>;
> +
> +        pmic@0 {
> +            compatible = "rockchip,rk806";
> +            reg = <0x0>;
> +
> +            interrupts = <7 IRQ_TYPE_LEVEL_LOW>;
> +
> +            vcc1-supply = <&vcc5v0_sys>;
> +            vcc2-supply = <&vcc5v0_sys>;
> +            vcc3-supply = <&vcc5v0_sys>;
> +            vcc4-supply = <&vcc5v0_sys>;
> +            vcc5-supply = <&vcc5v0_sys>;
> +            vcc6-supply = <&vcc5v0_sys>;
> +            vcc7-supply = <&vcc5v0_sys>;
> +            vcc8-supply = <&vcc5v0_sys>;
> +            vcc9-supply = <&vcc5v0_sys>;
> +            vcc10-supply = <&vcc5v0_sys>;
> +            vcc11-supply = <&vcc_2v0_pldo_s3>;
> +            vcc12-supply = <&vcc5v0_sys>;
> +            vcc13-supply = <&vcc5v0_sys>;
> +            vcc14-supply = <&vcc_1v1_nldo_s3>;
> +            vcca-supply = <&vcc5v0_sys>;
> +
> +            regulators {
> +                vdd_gpu_s0: DCDC_REG1 {

Only lowercase and no underscores in node names.

> +                        regulator-always-on;

Messed up indentation. 4 spaces for DTS.

Best regards,
Krzysztof



[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux