Advertisement
Guest User

Untitled

a guest
Apr 3rd, 2015
230
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.49 KB | None | 0 0
  1. /dts-v1/;
  2. /plugin/;
  3.  
  4. / {
  5. compatible = "brcm,bcm2835", "brcm,bcm2708", "brcm,bcm2709";
  6.  
  7. fragment@0 {
  8. target = <&gpio>;
  9. __overlay__ {
  10. pistomachine_pins: pistomachine_pins {
  11. brcm,pins = <2 3 4 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27>;
  12. brcm,function = <0>; /* in */
  13. brcm,pull = <2>; /* up */
  14. };
  15. };
  16. };
  17.  
  18. /*
  19. BUTTON PIN
  20.  
  21. PLAYER 1
  22. joystick
  23. left 3
  24. up 4
  25. right 17
  26. down 2
  27. yellow left 27
  28. blue left 22
  29. green 14
  30. red 15
  31. yellow right 23
  32. blue right 18
  33. start 10
  34. coin 9
  35.  
  36. escape 11
  37.  
  38. PLAYER 2
  39. joystick
  40. left 8
  41. up 25
  42. right 24
  43. down 7
  44. yellow left 16
  45. blue left 12
  46. green 26
  47. red 13
  48. yellow right 19
  49. blue right 6
  50. start 21
  51. coin 20
  52. */
  53.  
  54. fragment@1 {
  55. target-path = "/soc";
  56. __overlay__ {
  57. pistomachine: pistomachine {
  58. compatible = "gpio-keys";
  59. #address-cells = <1>;
  60. #size-cells = <0>;
  61. pinctrl-names = "default";
  62. pinctrl-0 = <&pistomachine_pins>;
  63. status = "okay";
  64. autorepeat;
  65.  
  66. button@4 {
  67. label = "GPIO KEY_UP";
  68. linux,code = <103>;
  69. gpios = <&gpio 4 0>;
  70. };
  71. button@2 {
  72. label = "GPIO KEY_DOWN";
  73. linux,code = <108>;
  74. gpios = <&gpio 2 0>;
  75. };
  76. button@3 {
  77. label = "GPIO KEY_LEFT";
  78. linux,code = <105>;
  79. gpios = <&gpio 27 0>;
  80. };
  81. button@17 {
  82. label = "GPIO KEY_RIGHT";
  83. linux,code = <106>;
  84. gpios = <&gpio 17 0>;
  85. };
  86. };
  87. };
  88. };
  89.  
  90. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement