Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /dts-v1/;
- /plugin/;
- / {
- compatible = "brcm,bcm2835", "brcm,bcm2708", "brcm,bcm2709";
- fragment@0 {
- target = <&gpio>;
- __overlay__ {
- pistomachine_pins: pistomachine_pins {
- 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>;
- brcm,function = <0>; /* in */
- brcm,pull = <2>; /* up */
- };
- };
- };
- /*
- BUTTON PIN
- PLAYER 1
- joystick
- left 3
- up 4
- right 17
- down 2
- yellow left 27
- blue left 22
- green 14
- red 15
- yellow right 23
- blue right 18
- start 10
- coin 9
- escape 11
- PLAYER 2
- joystick
- left 8
- up 25
- right 24
- down 7
- yellow left 16
- blue left 12
- green 26
- red 13
- yellow right 19
- blue right 6
- start 21
- coin 20
- */
- fragment@1 {
- target-path = "/soc";
- __overlay__ {
- pistomachine: pistomachine {
- compatible = "gpio-keys";
- #address-cells = <1>;
- #size-cells = <0>;
- pinctrl-names = "default";
- pinctrl-0 = <&pistomachine_pins>;
- status = "okay";
- autorepeat;
- button@4 {
- label = "GPIO KEY_UP";
- linux,code = <103>;
- gpios = <&gpio 4 0>;
- };
- button@2 {
- label = "GPIO KEY_DOWN";
- linux,code = <108>;
- gpios = <&gpio 2 0>;
- };
- button@3 {
- label = "GPIO KEY_LEFT";
- linux,code = <105>;
- gpios = <&gpio 27 0>;
- };
- button@17 {
- label = "GPIO KEY_RIGHT";
- linux,code = <106>;
- gpios = <&gpio 17 0>;
- };
- };
- };
- };
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement