lkml.org 
[lkml]   [2022]   [Oct]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH v2 2/2] dt-bindings: pinctrl: add loongson2 pinctrl
From
On 21/10/2022 22:09, Yinbo Zhu wrote:
> Add the loongson2 pinctrl binding with DT schema format using
> json-schema.
>
> Signed-off-by: Yinbo Zhu <zhuyinbo@loongson.cn>
> ---
> Change in v2:
> 1. Add "$ref to pinctrl.yaml".
> 2. Put required after patternProperties.
> 3. Add "additionalProperties: false" after '-pins$'
> 4. Add "unevaluatedProperties: false" after 'pinmux$'
> 5. Fixup the broken indentation in patternProperties node.
> 6. Use 4 spaces for example indentation.
>
> .../pinctrl/loongson,ls2k-pinctrl.yaml | 126 ++++++++++++++++++
> MAINTAINERS | 1 +
> 2 files changed, 127 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..bb511e103a4b
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/pinctrl/loongson,ls2k-pinctrl.yaml
> @@ -0,0 +1,126 @@
> +# 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@loongson.cn>
> + - Yinbo Zhu <zhuyinbo@loongson.cn>
> +
> +allOf:
> + - $ref: "pinctrl.yaml#"

Drop the quotes.

> +
> +properties:
> + compatible:
> + const: loongson,ls2k-pinctrl
> +
> + reg:
> + maxItems: 1
> +
> +patternProperties:
> + '-pins$':
> + type: object
> +
> + additionalProperties: false
> +
> + patternProperties:
> + 'pinmux$':
> + type: object
> + description: node for pinctrl.
> + $ref: pinmux-node.yaml#
> +
> + unevaluatedProperties: false
> +
> + 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:

Function is one string, so no 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]

If you wanted to say they are both required, add "required:" here.
Otherwise you allow a pinmux without groups and function. Is it desired?

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

Best regards,
Krzysztof

\
 
 \ /
  Last update: 2022-10-22 18:34    [W:0.041 / U:0.076 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site