2 * bbb-gpio-keypad - simple navigation keypad for the BeagleBone Black
4 * Copyright (C) 2018 Antonio Ospite <ao2@ao2.it>
6 * This program is free software: you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation, either version 2 of the License, or
9 * (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with this program. If not, see <http://www.gnu.org/licenses/>.
23 #include <dt-bindings/board/am335x-bbw-bbb-base.h>
24 #include <dt-bindings/gpio/gpio.h>
25 #include <dt-bindings/pinctrl/am33xx.h>
28 compatible = "ti,beaglebone", "ti,beaglebone-black";
31 part-number = "bbb-gpio-keypad";
34 // Resources this cape uses, see also https://ao2.it/137
44 target = <&am33xx_pinmux>;
46 keypad_pins: pinmux_gpio_pins{
47 pinctrl-single,pins = <
48 BONE_P8_07 (PIN_INPUT_PULLUP | MUX_MODE7)
49 BONE_P8_08 (PIN_INPUT_PULLUP | MUX_MODE7)
50 BONE_P8_09 (PIN_INPUT_PULLUP | MUX_MODE7)
51 BONE_P8_10 (PIN_INPUT_PULLUP | MUX_MODE7)
52 BONE_P8_26 (PIN_INPUT_PULLUP | MUX_MODE7)
53 BONE_P9_15 (PIN_INPUT_PULLUP | MUX_MODE7)
63 compatible = "gpio-keys";
65 pinctrl-names = "default";
66 pinctrl-0 = <&keypad_pins>;
69 label = "GPIO Key UP";
71 gpios = <&gpio2 2 GPIO_ACTIVE_LOW>;
72 debounce_interval = <50>;
75 label = "GPIO Key LEFT";
77 gpios = <&gpio2 3 GPIO_ACTIVE_LOW>;
78 debounce_interval = <50>;
81 label = "GPIO Key RIGHT";
83 gpios = <&gpio2 5 GPIO_ACTIVE_LOW>;
84 debounce_interval = <50>;
87 label = "GPIO Key DOWN";
89 gpios = <&gpio2 4 GPIO_ACTIVE_LOW>;
90 debounce_interval = <50>;
93 label = "GPIO Key ENTER";
95 gpios = <&gpio1 29 GPIO_ACTIVE_LOW>;
96 debounce_interval = <50>;
99 label = "GPIO Key ESC";
101 gpios = <&gpio1 16 GPIO_ACTIVE_LOW>;
102 debounce_interval = <50>;