Re: [PATCH v1 2/2] dt-bindings: pinctrl: add loongson2 pinctrl

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

 



On 20/10/2022 21:27, Yinbo Zhu wrote:
> Add the loongson2 pinctrl binding with DT schema format using
> json-schema.
> 
> Signed-off-by: Yinbo Zhu <zhuyinbo@xxxxxxxxxxx>
> ---
>  .../pinctrl/loongson,ls2k-pinctrl.yaml        | 118 ++++++++++++++++++
>  MAINTAINERS                                   |   1 +
>  2 files changed, 119 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/pinctrl/loongson,ls2k-pinctrl.yaml
> 
> diff --git a/Documentation/devicetree/bindings/pinctrl/loongson,ls2k-pinctrl.yaml b/Documentation/devicetree/bindings/pinctrl/loongson,ls2k-pinctrl.yaml
> new file mode 100644
> index 000000000000..038d38ad1785
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/pinctrl/loongson,ls2k-pinctrl.yaml
> @@ -0,0 +1,118 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/pinctrl/loongson,ls2k-pinctrl.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Loongson2 SoC Pinctrl Controller
> +
> +maintainers:
> +  - zhanghongchen <zhanghongchen@xxxxxxxxxxx>
> +  - Yinbo Zhu <zhuyinbo@xxxxxxxxxxx>
> +

Missing $ref to pinctrl.yaml

> +properties:
> +  compatible:
> +    const: loongson,ls2k-pinctrl
> +
> +  reg:
> +    maxItems: 1

> +
> +required:
> +  - compatible
> +  - reg

Put required after patternProperties.

> +
> +patternProperties:
> +  '-pins$':
> +    type: object

    additionalProperties: false

and blank line

> +    patternProperties:
> +      'pinmux$':
> +        type: object
> +        description: node for pinctrl.
> +        $ref: pinmux-node.yaml#

        unevaluatedProperties: false

But actually you have here totally broken indentation and this simply
does not work. I doubt you really tested it.

> +
> +    properties:
> +      groups:
> +        description:
> +          One or more groups of pins to mux to a certain function
> +        items:
> +          enum: [gpio, sdio, can1, can0, pwm3, pwm2, pwm1, pwm0, i2c1, i2c0,
> +                 nand, sata_led, lio, i2s, hda, uart2, uart1, camera, dv01,
> +                 dvo0]
> +      function:
> +        description:
> +          The function that a group of pins is muxed to
> +        items:
> +          enum: [gpio, sdio, can1, can0, pwm3, pwm2, pwm1, pwm0, i2c1, i2c0,
> +                 nand, sata_led, lio, i2s, hda, uart2, uart1, camera, dv01,
> +                 dvo0]
> +
> +    dependencies:
> +      groups: [function]
> +      function: [groups]
> +
> +additionalProperties: false
> +
> +examples:
> +  - |
> +    pctrl: pinctrl@1fe00420 {
> +           compatible = "loongson,ls2k-pinctrl";
> +           reg = <0x1fe00420 0x18>;

Use 4 spaces for example indentation.

> +           sdio_pins_default: sdio-pins {
> +                sdio-pinmux {
> +                        groups ="sdio";
> +                        function ="sdio";
> +                };
> +
> +                sdio-det-pinmux {
> +                        groups ="pwm2";
> +                        function ="gpio";
> +                };


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