Re: [PATCH 1/3] dt-binding: pinctrl: Document Loongson 2K0300 pin controller

From: Linus Walleij

Date: Tue Oct 14 2025 - 06:39:12 EST


Hi Yao,

On Tue, Oct 14, 2025 at 4:23 AM Yao Zi <ziyao@xxxxxxxxxxx> wrote:

> To confirm my understanding, would you like to drop the outside node
> (which now refers to pincfg-node.yaml) and refer to both
> pinmux-node.yaml and pincfg-node.yaml in the single level of subnode?
> i.e.
>
> pinctrl {
> uart0_defaults: uart0-pins {
> function = "uart0";
> drive-strength = <2>;
> pinmux = <...>;
> };
> };

Yes this looks really good.

As you see it is also very easy for a human to read and understand
this device tree.

If you want you can take it a step further and use just "pins"
instead of "pinmux" and infer the function part of pinmux
from the function listed there such as "uart0" so you only encode
the information once. But it results in a bit of tables inside
your driver.

Thanks,
Linus Walleij