1/* SPDX-License-Identifier: Apache-2.0 */ 2 3#include <zephyr/dt-bindings/input/input-event-codes.h> 4 5/ { 6 aliases { 7 led0 = &led0; 8 led1 = &led1; 9 led2 = &led2; 10 led3 = &led3; 11 led4 = &led4; 12 led5 = &led5; 13 led6 = &led6; 14 led7 = &led7; 15 led8 = &led8; 16 sw0 = &button0; 17 sw1 = &button1; 18 sw2 = &button2; 19 }; 20 21 leds { 22 compatible = "gpio-leds"; 23 led0: led_0 { 24 gpios = <&gpio1 0 0>; 25 label = "LED 0"; 26 }; 27 led1: led_1 { 28 gpios = <&gpio1 1 0>; 29 label = "LED 1"; 30 }; 31 led2: led_2 { 32 gpios = <&gpio1 2 0>; 33 label = "LED 2"; 34 }; 35 led3: led_3 { 36 gpios = <&gpio1 3 0>; 37 label = "LED 3"; 38 }; 39 led4: led_4 { 40 gpios = <&gpio1 4 0>; 41 label = "LED 4"; 42 }; 43 led5: led_5 { 44 gpios = <&gpio1 5 0>; 45 label = "LED 5"; 46 }; 47 led6: led_6 { 48 gpios = <&gpio1 6 0>; 49 label = "LED 6"; 50 }; 51 led7: led_7 { 52 gpios = <&gpio1 7 0>; 53 label = "LED 7"; 54 }; 55 led8: led_8 { 56 gpios = <&gpio1 8 0>; 57 label = "LED 8"; 58 }; 59 60 }; 61 62 buttons { 63 compatible = "gpio-keys"; 64 button0: button_0 { 65 /* gpio flags need validation */ 66 gpios = <&gpio0 0 GPIO_ACTIVE_LOW>; 67 label = "Push button switch 0"; 68 zephyr,code = <INPUT_KEY_0>; 69 }; 70 button1: button_1 { 71 /* gpio flags need validation */ 72 gpios = <&gpio0 1 GPIO_ACTIVE_LOW>; 73 label = "Push button switch 1"; 74 zephyr,code = <INPUT_KEY_1>; 75 }; 76 button2: button_2 { 77 /* gpio flags need validation */ 78 gpios = <&gpio0 2 GPIO_ACTIVE_LOW>; 79 label = "Push button switch 2"; 80 zephyr,code = <INPUT_KEY_2>; 81 }; 82 switch0: switch_0 { 83 /* gpio flags need validation */ 84 gpios = <&gpio2 0 GPIO_ACTIVE_LOW>; 85 label = "DIP SW1 - Switch 1"; 86 zephyr,code = <INPUT_KEY_3>; 87 }; 88 switch1: switch_1 { 89 /* gpio flags need validation */ 90 gpios = <&gpio2 1 GPIO_ACTIVE_LOW>; 91 label = "DIP SW1 - Switch 2"; 92 zephyr,code = <INPUT_KEY_4>; 93 }; 94 switch2: switch_2 { 95 /* gpio flags need validation */ 96 gpios = <&gpio2 2 GPIO_ACTIVE_LOW>; 97 label = "DIP SW1 - Switch 3"; 98 zephyr,code = <INPUT_KEY_5>; 99 }; 100 switch3: switch_3 { 101 /* gpio flags need validation */ 102 gpios = <&gpio2 3 GPIO_ACTIVE_LOW>; 103 label = "DIP SW1 - Switch 4"; 104 zephyr,code = <INPUT_KEY_6>; 105 }; 106 }; 107 108}; 109