Thread (5 messages) 5 messages, 3 authors, 2026-02-13

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

From: Linus Walleij <linusw@kernel.org>
Date: 2026-02-13 13:47:52
Also in: linux-aspeed, linux-devicetree, linux-gpio, lkml

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 [off-list ref] 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 <redacted>
(...)
+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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help