Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // enabled pin expander on i2c1
- fragment@3 {
- target = <&i2c1>;
- __overlay__ {
- #address-cells = <1>; // one 32bit value for reg
- #size-cells = <0>; // no size value following the address in reg
- csp:gpio@0 {
- compatible = "nxp,pca9555";
- reg = <0x20>;
- gpio-controller;
- #gpio-cells = <2>;
- interrupt-parent = <&pio>;
- interrupts = <6 1 IRQ_TYPE_EDGE_FALLING>; // "PG1"
- interrupt-controller;
- #interrupt-cells = <2>;
- };
- };
- };
- // enable keyboard
- fragment@4 {
- target-path = "/";
- __overlay__ {
- mykeypad: mykeypad {
- compatible = "gpio-keys";
- autorepeat;
- #address-cells = <1>;
- #size-cells = <0>;
- // define buttons
- button@00 {
- label = "GPIO right";
- linux,code = <0x6a>; // hex
- gpios = <&csp 1 GPIO_ACTIVE_LOW>; // pin 0.0, "1>" = active_low
- };
- };
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement