Thanks for the response! But im afraid it isnt working still.. perhaps we need some kind of pin configuration? this is my current dts and it detects the chip fine and even adds the device on the inputs when i use evtest but there's still no input events being detected.
Code: Select all
/dts-v1/;
/plugin/;
/ {
compatible = "brcm,bcm2835";
fragment@0 {
target = <&i2c_csi_dsi>;
__overlay__ {
status = "okay";
};
};
fragment@1 {
target = <&gpio>;
__overlay__ {
mcp23017_pins: mcp23017_pins@20 {
brcm,pins = <4>;
brcm,function = <0>;
};
};
};
fragment@2 {
target = <&i2c_csi_dsi>;
__overlay__ {
#address-cells = <1>;
#size-cells = <0>;
mcp23017: mcp@20 {
compatible = "microchip,mcp23017";
reg = <0x20>;
gpio-controller;
#gpio-cells = <2>;
#interrupt-cells=<2>;
interrupt-parent = <&gpio>;
interrupts = <4 2>;
interrupt-controller;
microchip,irq-mirror;
status = "okay";
};
};
};
fragment@3 {
target = <&mcp23017>;
__dormant__ {
compatible = "microchip,mcp23008";
};
};
fragment@4 {
target-path = "/";
__overlay__ {
psp_buttons {
compatible = "gpio-keys";
status = "okay";
key_0 {
gpios = <&mcp23017 0 1>;
linux,code = <30>;
label = "KEY_A";
};
key_1 {
gpios = <&mcp23017 1 1>;
linux,code = <31>;
label = "KEY_S";
};
key_2 {
gpios = <&mcp23017 2 1>;
linux,code = <32>;
label = "KEY_D";
};
key_3 {
gpios = <&mcp23017 3 1>;
linux,code = <33>;
label = "KEY_F";
};
key_4 {
gpios = <&mcp23017 4 1>;
linux,code = <34>;
label = "KEY_G";
};
key_5 {
gpios = <&mcp23017 5 1>;
linux,code = <35>;
label = "KEY_H";
};
key_6 {
gpios = <&mcp23017 6 1>;
linux,code = <36>;
label = "KEY_J";
};
key_7 {
gpios = <&mcp23017 7 1>;
linux,code = <37>;
label = "KEY_K";
};
key_8 {
gpios = <&mcp23017 8 1>;
linux,code = <38>;
label = "KEY_L";
};
key_9 {
gpios = <&mcp23017 9 1>;
linux,code = <39>;
label = "KEY_SEMICOLON";
};
key_10 {
gpios = <&mcp23017 10 1>;
linux,code = <40>;
label = "KEY_APOSTROPHE";
};
key_11 {
gpios = <&mcp23017 11 1>;
linux,code = <41>;
label = "KEY_GRAVE";
};
key_12 {
gpios = <&mcp23017 12 1>;
linux,code = <42>;
label = "KEY_LEFTSHIFT";
};
key_13 {
gpios = <&mcp23017 13 1>;
linux,code = <43>;
label = "KEY_BACKSLASH";
};
key_14 {
gpios = <&mcp23017 14 1>;
linux,code = <44>;
label = "KEY_Z";
};
key_15 {
gpios = <&mcp23017 15 1>;
linux,code = <45>;
label = "KEY_X";
};
};
};
};
__overrides__ {
gpiopin = <&mcp23017_pins>,"brcm,pins:0",
<&mcp23017>,"interrupts:0";
addr = <&mcp23017>,"reg:0", <&mcp23017_pins>,"reg:0";
mcp23008 = <0>,"=3";
};
};
Sorry im not really well versed in device tree semantics and thanks alot for your patience.