Re: [PATCH RFC 1/2] dt-bindings: pinctrl: Add pinctrl-packed

From: Linus Walleij

Date: Fri Feb 13 2026 - 08:49:19 EST


Hi Billy,

thanks for your patch!

This approach is better than trying to extend pinctrl-single in my
opinion, but it has a bit of road to cover.

On Fri, Feb 13, 2026 at 9:18 AM Billy Tsai <billy_tsai@xxxxxxxxxxxxxx> wrote:

> Add a Devicetree binding for a generic pin controller where pinmux and/or
> pin configuration are represented as fixed-width fields packed
> sequentially within shared registers.
>
> The binding targets controllers that are typically exposed as subnodes of
> a syscon node and accessed via regmap-mmio through the parent.
>
> Signed-off-by: Billy Tsai <billy_tsai@xxxxxxxxxxxxxx>
(...)
> +properties:
> + compatible:
> + oneOf:
> + - enum:
> + - pinctrl-packed
> + - pinconf-packed

Why do you need two? Can't you just use one, pinctrl-packed.

> + pinctrl-packed,function-mask:
> + description: Mask of the allowed register bits for a single pin.
> + $ref: /schemas/types.yaml#/definitions/uint32

To me this could be static data in the driver but I guess the whole
point is to do what pinctrl-single is doing and store all of this
information in the device tree, because reasons.

I guess the DT binding maintainers need to decide on this and
also what to name it.

> + pinctrl-packed,gpio-range:
> + description: Optional list of pin base, nr pins & gpio function.
> + $ref: /schemas/types.yaml#/definitions/phandle-array
> + items:
> + items:
> + - description: phandle of a gpio-range node
> + - description: pin base
> + - description: number of pins
> + - description: gpio function

Just use the standard gpio-range.

> +patternProperties:
> + '-pins(-[0-9]+)?$|-pin$':
> + type: object
> + additionalProperties: false
> + properties:
> + pinctrl-packed,pins:
> + description: Array of pin index and function selector pairs.
> + $ref: /schemas/types.yaml#/definitions/uint32-array

Just use pinmux = <...>; from pinmux-node.yaml
(make sure to use the ref include.)

> + pinctrl-packed,bias-pullup:
> + pinctrl-packed,bias-pulldown:
> + pinctrl-packed,drive-strength:
> + pinctrl-packed,input-schmitt:
> + pinctrl-packed,input-schmitt-enable:
> + pinctrl-packed,low-power-mode:
> + pinctrl-packed,slew-rate:

Just use the existing configs from
pincfg-node.yaml and abstain from any new
inventions here.

Yours,
Linus Walleij