[PATCH 4/8] dt-bindings: pinctrl: Add Nuvoton WPCM450
Linus Walleij
linus.walleij at linaro.org
Fri Jun 4 19:35:48 AEST 2021
Hi Jonathan!
thanks for your patch!
On Wed, Jun 2, 2021 at 2:04 PM Jonathan Neuschäfer
<j.neuschaefer at gmx.net> wrote:
> + interrupts: true
maxitems 4 right?
Make an enum:
interrupts:
- description: what IRQ0 is for
- description: what IRQ1 is for
- description: what IRQ2 is for
- description: what IRQ3 is for
And describe how these interrupts are used. Because I am suspicious that they
actually correspond to 4 different GPIO blocks, which should then be their own
nodes.
> +examples:
> + - |
> + #include <dt-bindings/interrupt-controller/irq.h>
> + #include <dt-bindings/gpio/gpio.h>
> + pinctrl: pinctrl at b8003000 {
> + compatible = "nuvoton,wpcm450-pinctrl";
> + reg = <0xb8003000 0x1000>;
> + gpio-controller;
> + #gpio-cells = <2>;
> + interrupts = <2 IRQ_TYPE_LEVEL_HIGH
> + 3 IRQ_TYPE_LEVEL_HIGH
> + 4 IRQ_TYPE_LEVEL_HIGH
> + 5 IRQ_TYPE_LEVEL_HIGH>;
So these.
> + rmii2 {
> + groups = "rmii2";
> + function = "rmii2";
> + };
> +
> + pinctrl_uid: uid {
> + pins = "gpio14";
> + input-debounce = <1>;
> + };
I challenge you here and encourage you to put a node for each
GPIO "port":
port0: gpio at 0 {
....
};
port1: gpio at 1 {
....
};
> + gpio-keys {
> + compatible = "gpio-keys";
> + pinctrl-names = "default";
> + pinctrl-0 = <&pinctrl_uid>;
> +
> + uid {
> + label = "UID";
> + linux,code = <102>;
> + gpios = <&pinctrl 14 GPIO_ACTIVE_HIGH>;
Would be gpios <&port0 14...>
Yours,
Linus Walleij
More information about the openbmc
mailing list