lkml.org 
[lkml]   [2023]   [Apr]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH 03/43] dt-bindings: pinctrl: Add DT bindings ep93xx pinctrl
From
On 24/04/2023 14:34, Nikita Shubin wrote:
> Add YAML bindings ep93xx SoC.
>
> Signed-off-by: Nikita Shubin <nikita.shubin@maquefel.me>
> Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
> ---
>
> Notes:
> rfc->v0:
> - dropped separate bindings description, left only one with all groups,
> functions and etc...
> - added Alexander Sverdlin to maintainers
> - added Linus Reviwed-by tags, through i shoudn't =) too many changes
> - fixed warning and added seq_file header
>
> .../pinctrl/cirrus,ep93xx-pinctrl.yaml | 66 +++++++++++++++++++
> 1 file changed, 66 insertions(+)
> create mode 100644 Documentation/devicetree/bindings/pinctrl/cirrus,ep93xx-pinctrl.yaml
>
> diff --git a/Documentation/devicetree/bindings/pinctrl/cirrus,ep93xx-pinctrl.yaml b/Documentation/devicetree/bindings/pinctrl/cirrus,ep93xx-pinctrl.yaml
> new file mode 100644
> index 000000000000..cba4be7c5994
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/pinctrl/cirrus,ep93xx-pinctrl.yaml
> @@ -0,0 +1,66 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/pinctrl/cirrus,ep93xx-pinctrl.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Cirrus ep93xx pins mux controller
> +
> +maintainers:
> + - Nikita Shubin <nikita.shubin@maquefel.me>
> + - Alexander Sverdlin <alexander.sverdlin@gmail.com>
> +
> +properties:
> + compatible:
> + enum:
> + - cirrus,ep9301-pinctrl
> + - cirrus,ep9307-pinctrl
> + - cirrus,ep9312-pinctrl

Blank line

> + regmap:
> + description: phandle to syscon

This should be specific - vendor prefix, property name, explanation what
do you need here in description. "phandle to syscon" is redundant.

You also miss type.

Anyway, your example contradicts this. You do not have regmap.

> +
> +patternProperties:
> + '^pinctrl-':

'^pins-' instead, because pinctrl is the entire device.

> + type: object
> + description: pin node
> + $ref: pinmux-node.yaml#
> +
> + properties:
> + function:
> + enum: [ spi, ac97, i2s, pwm, keypad, pata, lcd, gpio1, gpio2, gpio3,
> + gpio4, gpio6, gpio7 ]

Why gpio has different versions? gpio should be one function.

> + groups:
> + minItems: 1
> + maxItems: 2
> + items:
> + enum: [ ssp, ac97, i2s_on_ssp, i2s_on_ac97, pwm1, gpio1agrp,
> + gpio2agrp, gpio3agrp, gpio4agrp, gpio6agrp, gpio7agrp,
> + rasteronsdram0grp, rasteronsdram3grp, keypadgrp, idegrp]
> +
> + required:
> + - function
> + - groups
> +
> +required:
> + - compatible
> + - regmap
> +
> +additionalProperties: false
> +
> +examples:
> + - |
> + syscon: syscon@80930000 {
> + compatible = "cirrus,ep9301-syscon",
> + "syscon", "simple-mfd";

You created now dependency on this binding. Drop the parent node. If
this is supposed to be always part of syscon, then example could be in
parent's node... but I have doubts that is a part of syscon in the first
place.

> + reg = <0x80930000 0x1000>;
> + #clock-cells = <1>;
> + #reset-cells = <1>;
> + pinctrl: pinctrl {
> + compatible = "cirrus,ep9312-pinctrl";

Mixed indentation. Actually before also looks odd...
Use 4 spaces for example indentation.

> + regmap = <&syscon>;
> + spi_default_pins: pinctrl-spi {
> + function = "spi";
> + groups = "ssp";
> + };
> + };
> + };

Best regards,
Krzysztof

\
 
 \ /
  Last update: 2023-04-25 11:25    [W:0.938 / U:0.936 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site