Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ARM: dts: lpc4350-hitex-eval: add joystick, buttons and leds

Add the joystick, buttons and LEDs connected to the I2C I/O expander.

Signed-off-by: Joachim Eastwood <manabian@gmail.com>

+85
+85
arch/arm/boot/dts/lpc4350-hitex-eval.dts
··· 15 15 #include "lpc18xx.dtsi" 16 16 #include "lpc4350.dtsi" 17 17 18 + #include "dt-bindings/input/input.h" 19 + #include "dt-bindings/gpio/gpio.h" 20 + 18 21 / { 19 22 model = "Hitex LPC4350 Evaluation Board"; 20 23 compatible = "hitex,lpc4350-eval-board", "nxp,lpc4350"; ··· 36 33 memory { 37 34 device_type = "memory"; 38 35 reg = <0x28000000 0x800000>; /* 8 MB */ 36 + }; 37 + 38 + pca_buttons { 39 + compatible = "gpio-keys-polled"; 40 + #address-cells = <1>; 41 + #size-cells = <0>; 42 + poll-interval = <100>; 43 + autorepeat; 44 + 45 + button@0 { 46 + label = "joy:right"; 47 + linux,code = <KEY_RIGHT>; 48 + gpios = <&pca_gpio 8 GPIO_ACTIVE_LOW>; 49 + }; 50 + 51 + button@1 { 52 + label = "joy:up"; 53 + linux,code = <KEY_UP>; 54 + gpios = <&pca_gpio 9 GPIO_ACTIVE_LOW>; 55 + }; 56 + 57 + 58 + button@2 { 59 + label = "joy:enter"; 60 + linux,code = <KEY_ENTER>; 61 + gpios = <&pca_gpio 10 GPIO_ACTIVE_LOW>; 62 + }; 63 + 64 + button@3 { 65 + label = "joy:left"; 66 + linux,code = <KEY_LEFT>; 67 + gpios = <&pca_gpio 11 GPIO_ACTIVE_LOW>; 68 + }; 69 + 70 + button@4 { 71 + label = "joy:down"; 72 + linux,code = <KEY_DOWN>; 73 + gpios = <&pca_gpio 12 GPIO_ACTIVE_LOW>; 74 + }; 75 + 76 + button@5 { 77 + label = "user:sw3"; 78 + linux,code = <KEY_F1>; 79 + gpios = <&pca_gpio 13 GPIO_ACTIVE_LOW>; 80 + }; 81 + 82 + button@6 { 83 + label = "user:sw4"; 84 + linux,code = <KEY_F2>; 85 + gpios = <&pca_gpio 14 GPIO_ACTIVE_LOW>; 86 + }; 87 + 88 + button@7 { 89 + label = "user:sw5"; 90 + linux,code = <KEY_F3>; 91 + gpios = <&pca_gpio 15 GPIO_ACTIVE_LOW>; 92 + }; 93 + }; 94 + 95 + pca_leds { 96 + compatible = "gpio-leds"; 97 + 98 + led0 { 99 + label = "ext:led0"; 100 + gpios = <&pca_gpio 0 GPIO_ACTIVE_LOW>; 101 + linux,default-trigger = "heartbeat"; 102 + }; 103 + 104 + led1 { 105 + label = "ext:led1"; 106 + gpios = <&pca_gpio 1 GPIO_ACTIVE_LOW>; 107 + }; 108 + 109 + led2 { 110 + label = "ext:led2"; 111 + gpios = <&pca_gpio 2 GPIO_ACTIVE_LOW>; 112 + }; 113 + 114 + led3 { 115 + label = "ext:led3"; 116 + gpios = <&pca_gpio 3 GPIO_ACTIVE_LOW>; 117 + }; 39 118 }; 40 119 }; 41 120