Hi everyone,
I'm trying to configure the SW1, SW2, SW3, SW4 and SW5 of my PicoZed FMC Carrier FMC V2. But it doesn't work and right know I'm stucked. This is part of my device tree dts file where I configure this pins:
...
amba_pl {
#address-cells = <0x1>;
#size-cells = <0x1>;
compatible = "simple-bus";
ranges;
...
ps7_gpio_buttons: gpio@41210000 {
#gpio-cells = <0x2>;
compatible = "xlnx,xps-gpio-1.00.a";
gpio-controller;
reg = <0x41210000 0x10000>;
xlnx,all-inputs = <0x1>;
xlnx,all-inputs-2 = <0x0>;
xlnx,all-outputs = <0x0>;
xlnx,all-outputs-2 = <0x0>;
xlnx,dout-default = <0x0>;
xlnx,dout-default-2 = <0x0>;
xlnx,gpio-width = <0x5>;
xlnx,gpio2-width = <0x20>;
xlnx,interrupt-present = <0x0>;
xlnx,is-dual = <0x0>;
xlnx,tri-default = <0xffffffff>;
xlnx,tri-default-2 = <0xffffffff>;
};
};
...
keypad {
compatible = "gpio-keys";
#address-cells = <1>;
#size-cells = <0>;
sw1 {
label = "sw1";
gpios = <&ps7_gpio_buttons 0 0>;
linux,code = <100>; /* up */
};
sw2 {
label = "sw2";
gpios = <&ps7_gpio_buttons 1 0>;
linux,code = <101>; /* down */
};
sw3 {
label = "sw3";
gpios = <&ps7_gpio_buttons 2 0>;
linux,code = <102>; /* right */
};
sw4 {
label = "sw4";
pios = <&ps7_gpio_buttons 3 0>;
linux,code = <103>; /* left */
};
sw5 {
label = "sw5";
gpios = <&ps7_gpio_buttons 4 0>;
linux,code = <104>; /* center */
...
I can see the associated gpio in /sys/class/gpio897
But I've got this error and it doesn't work:
gpio-keys keypad: Unable to get irq number for GPIO 897, error -6
Could anyone help me?
Best regards.