[RFC PATCH 1/6] dt-bindings: pinctrl: starfive: add JH8100 pinctrl bindings

Yuklin Soo yuklin.soo at starfivetech.com
Wed Mar 27 04:25:52 PDT 2024



> -----Original Message-----
> From: Krzysztof Kozlowski <krzysztof.kozlowski at linaro.org>
> Sent: Tuesday, March 5, 2024 10:07 PM
> To: Yuklin Soo <yuklin.soo at starfivetech.com>; Linus Walleij
> <linus.walleij at linaro.org>; Bartosz Golaszewski
> <bartosz.golaszewski at linaro.org>; Hal Feng <hal.feng at starfivetech.com>;
> Leyfoon Tan <leyfoon.tan at starfivetech.com>; Jianlong Huang
> <jianlong.huang at starfivetech.com>; Emil Renner Berthing <kernel at esmil.dk>;
> Rob Herring <robh at kernel.org>; Krzysztof Kozlowski
> <krzysztof.kozlowski+dt at linaro.org>; Conor Dooley <conor+dt at kernel.org>;
> Drew Fustini <drew at beagleboard.org>
> Cc: linux-gpio at vger.kernel.org; linux-kernel at vger.kernel.org;
> devicetree at vger.kernel.org; linux-riscv at lists.infradead.org; Paul Walmsley
> <paul.walmsley at sifive.com>; Palmer Dabbelt <palmer at dabbelt.com>; Albert
> Ou <aou at eecs.berkeley.edu>
> Subject: Re: [RFC PATCH 1/6] dt-bindings: pinctrl: starfive: add JH8100 pinctrl
> bindings
> 
> On 05/03/2024 13:00, Yuklin Soo wrote:
> >
> >
> >> -----Original Message-----
> >> From: Krzysztof Kozlowski <krzysztof.kozlowski at linaro.org>
> >> Sent: Tuesday, February 20, 2024 4:10 PM
> >> To: Yuklin Soo <yuklin.soo at starfivetech.com>; Linus Walleij
> >> <linus.walleij at linaro.org>; Bartosz Golaszewski
> >> <bartosz.golaszewski at linaro.org>; Hal Feng
> >> <hal.feng at starfivetech.com>; Leyfoon Tan
> >> <leyfoon.tan at starfivetech.com>; Jianlong Huang
> >> <jianlong.huang at starfivetech.com>; Emil Renner Berthing
> >> <kernel at esmil.dk>; Rob Herring <robh at kernel.org>; Krzysztof Kozlowski
> >> <krzysztof.kozlowski+dt at linaro.org>; Conor Dooley
> >> <conor+dt at kernel.org>; Drew Fustini <drew at beagleboard.org>
> >> Cc: linux-gpio at vger.kernel.org; linux-kernel at vger.kernel.org;
> >> devicetree at vger.kernel.org; linux-riscv at lists.infradead.org; Paul
> >> Walmsley <paul.walmsley at sifive.com>; Palmer Dabbelt
> >> <palmer at dabbelt.com>; Albert Ou <aou at eecs.berkeley.edu>
> >> Subject: Re: [RFC PATCH 1/6] dt-bindings: pinctrl: starfive: add
> >> JH8100 pinctrl bindings
> >>
> >> On 07/02/2024 03:42, Yuklin Soo wrote:
> >>>>
> >>>>> +    type: object
> >>>>> +    additionalProperties: false
> >>>>> +    patternProperties:
> >>>>> +      '-pins$':
> >>>>> +        type: object
> >>>>> +        description: |
> >>>>> +          A pinctrl node should contain at least one subnode
> >>>>> + representing
> >> the
> >>>>> +          pinctrl groups available in the domain. Each subnode will list the
> >>>>> +          pins it needs, and how they should be configured, with regard to
> >>>>> +          muxer configuration, bias, input enable/disable, input schmitt
> >>>>> +          trigger enable/disable, slew-rate and drive strength.
> >>>>> +        allOf:
> >>>>> +          - $ref: /schemas/pinctrl/pincfg-node.yaml
> >>>>> +          - $ref: /schemas/pinctrl/pinmux-node.yaml
> >>>>> +        additionalProperties: false
> >>>>
> >>>> Why the rest of the properties is not applicable?
> >>>
> >>> The regex “-pins$” make sure all client subnode names end with
> >>> suffix “-pins” (e.g, i2c0-scl-pins, i2c-sda-pins)
> >>
> >> I did not talk about subnodes.
> >>
> >> I asked why the rest of pincfg and pinmux schema properties are not
> allowed.
> >
> > Initially, I wanted to allow all properties in the pincfg and pinmux schema. I
> misunderstood the meaning of “additionalProperties: false”
> > and I thought it means all additional properties outside the pincfg
> > and pinmux schema are excluded. The “additionalProperties” will be set
> > to “true” to include the rest of the properties in pincfg and pinmux
> > schema and not to be restricted to only the properties defined in
> 
> In that case drop all the properties and use unevaluatedProperties: false.

Isn’t that sufficient just to use “unevaluatedProperties: false” ?

To drop all the properties, we will be losing information below:

          drive-strength-microamp:
            enum: [ 2000, 4000, 8000, 12000 ]

          slew-rate:
            enum: [ 0, 1 ]
            default: 0
            description: |
                0: slow (half frequency)
                1: fast

> 
> Fix your email setup, to wrap emails properly. This is unreadable.
> 
> >
> >>
> >> Best regards,
> >> Krzysztof
> >
> 
> Best regards,
> Krzysztof



More information about the linux-riscv mailing list