public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
From: Conor Dooley <conor@kernel.org>
To: Linus Walleij <linus.walleij@linaro.org>
Cc: Gary Yang <gary.yang@cixtech.com>,
	robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org,
	linux-gpio@vger.kernel.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	cix-kernel-upstream@cixtech.com
Subject: Re: [PATCH v3 1/3] dt-bindings: pinctrl: Add cix,sky1-pinctrl
Date: Tue, 14 Oct 2025 18:58:49 +0100	[thread overview]
Message-ID: <20251014-backyard-parted-572627bfc540@spud> (raw)
In-Reply-To: <CACRpkda-2BNj+Pt2kS9u_bbr41bsWGRGDqNd3EXVnys-xSqg0g@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 2369 bytes --]

On Tue, Oct 14, 2025 at 12:44:15PM +0200, Linus Walleij wrote:
> Hi Gary,
> 
> thanks for your patch!
> 
> On Tue, Oct 14, 2025 at 3:57 AM Gary Yang <gary.yang@cixtech.com> wrote:
> 
> 
> > +# Client device subnode's properties
> > +patternProperties:
> > +  'pins$':
> > +    type: object
> > +    additionalProperties: false
> > +    patternProperties:
> > +      '(^pins|pins?$)':
> > +        type: object
> > +        additionalProperties: false
> > +        description:
> > +          A pinctrl node should contain at least one subnodes representing the
> > +          pinctrl groups available on the machine. Each subnode will list the
> > +          pins it needs, and how they should be configured, with regard to muxer
> > +          configuration, pullups, and drive strength.
> > +
> > +        properties:
> > +          pinmux:
> > +            description:
> > +              Values are constructed from pin number and mux setting and are
> > +              defined as macros in arch/arm64/boot/dts/cix/sky1-pinfunc.h directly.
> > +
> > +          bias-disable: true
> > +
> > +          bias-pull-up: true
> > +
> > +          bias-pull-down: true
> > +
> > +          drive-strength:
> > +            description:
> > +              Can support 15 levels, from DS_LEVEL1 to DS_LEVEL15.
> > +              defined as macros in arch/arm64/boot/dts/cix/sky1-pinfunc.h.

Isn't this wrong?
drive-strength is in mA but you're just shoving register values in here.
pw-bot: changes-requested

> > +
> > +        required:
> > +          - pinmux
> 
> Can't you just include both pinmux-node.yaml and pincfg-node.yaml
> to get validation from the generic schemas?
> 
> 'pins$':
>   type: object
>   additionalProperties: false
>   patternProperties:
>     '(^pins|pins?$)':

Why does this pattern allow foopin but not pinfoo?
Also seems overkill to have both suffix and prefix options, instead of
just sticking to one!

>       type: object
>       $ref: /schemas/pinctrl/pinmux-node.yaml
>       $ref: /schemas/pinctrl/pincfg-node.yaml
>       additionalProperties: false
> 
> Something like this, I never get this right before actually testcompiling...

spacemit,k1-pinctrl has a node of this type, that can be copied from
Gary. Essentially, you need an allOf: for the two references.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

  reply	other threads:[~2025-10-14 17:59 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-10-14  1:57 [PATCH v3 0/3] Add pinctrl support for Sky1 Gary Yang
2025-10-14  1:57 ` [PATCH v3 1/3] dt-bindings: pinctrl: Add cix,sky1-pinctrl Gary Yang
2025-10-14 10:44   ` Linus Walleij
2025-10-14 17:58     ` Conor Dooley [this message]
2025-10-14 19:17       ` Linus Walleij
2025-10-14  1:57 ` [PATCH v3 2/3] pinctrl: cix: Add pin-controller support for sky1 Gary Yang
2025-10-14 10:57   ` Linus Walleij
2025-10-16  5:41     ` 回复: " Gary Yang
2025-10-16 22:51       ` Linus Walleij
2025-10-17  1:43         ` 回复: " Gary Yang
2025-10-14  1:57 ` [PATCH v3 3/3] arm64: dts: cix: Add pinctrl nodes " Gary Yang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20251014-backyard-parted-572627bfc540@spud \
    --to=conor@kernel.org \
    --cc=cix-kernel-upstream@cixtech.com \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=gary.yang@cixtech.com \
    --cc=krzk+dt@kernel.org \
    --cc=linus.walleij@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=robh@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox