Advertisement
Guest User

dts fail

a guest
Nov 8th, 2016
126
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.58 KB | None | 0 0
  1. // enabled pin expander on i2c1
  2. fragment@3 {
  3. target = <&i2c1>;
  4. __overlay__ {
  5. #address-cells = <1>; // one 32bit value for reg
  6. #size-cells = <0>; // no size value following the address in reg
  7. csp:gpio@0 {
  8. compatible = "nxp,pca9555";
  9. reg = <0x20>;
  10.  
  11. gpio-controller;
  12. #gpio-cells = <2>;
  13.  
  14. interrupt-parent = <&pio>;
  15. interrupts = <6 1 IRQ_TYPE_EDGE_FALLING>; // "PG1"
  16. interrupt-controller;
  17. #interrupt-cells = <2>;
  18. };
  19. };
  20. };
  21.  
  22. // enable keyboard
  23. fragment@4 {
  24. target-path = "/";
  25. __overlay__ {
  26. mykeypad: mykeypad {
  27. compatible = "gpio-keys";
  28. autorepeat;
  29. #address-cells = <1>;
  30. #size-cells = <0>;
  31.  
  32. // define buttons
  33. button@00 {
  34. label = "GPIO right";
  35. linux,code = <0x6a>; // hex
  36. gpios = <&csp 1 GPIO_ACTIVE_LOW>; // pin 0.0, "1>" = active_low
  37. };
  38. };
  39. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement