| .. | .. |
|---|
| 44 | 44 | #include "stm32f746.dtsi" |
|---|
| 45 | 45 | #include "stm32f746-pinctrl.dtsi" |
|---|
| 46 | 46 | #include <dt-bindings/input/input.h> |
|---|
| 47 | +#include <dt-bindings/interrupt-controller/irq.h> |
|---|
| 47 | 48 | |
|---|
| 48 | 49 | / { |
|---|
| 49 | 50 | model = "STMicroelectronics STM32746g-EVAL board"; |
|---|
| .. | .. |
|---|
| 54 | 55 | stdout-path = "serial0:115200n8"; |
|---|
| 55 | 56 | }; |
|---|
| 56 | 57 | |
|---|
| 57 | | - memory { |
|---|
| 58 | + memory@c0000000 { |
|---|
| 59 | + device_type = "memory"; |
|---|
| 58 | 60 | reg = <0xc0000000 0x2000000>; |
|---|
| 59 | 61 | }; |
|---|
| 60 | 62 | |
|---|
| .. | .. |
|---|
| 64 | 66 | |
|---|
| 65 | 67 | leds { |
|---|
| 66 | 68 | compatible = "gpio-leds"; |
|---|
| 67 | | - green { |
|---|
| 69 | + led-green { |
|---|
| 68 | 70 | gpios = <&gpiof 10 1>; |
|---|
| 69 | 71 | linux,default-trigger = "heartbeat"; |
|---|
| 70 | 72 | }; |
|---|
| 71 | | - red { |
|---|
| 73 | + led-orange { |
|---|
| 74 | + gpios = <&stmfx_pinctrl 17 1>; |
|---|
| 75 | + }; |
|---|
| 76 | + led-red { |
|---|
| 72 | 77 | gpios = <&gpiob 7 1>; |
|---|
| 78 | + }; |
|---|
| 79 | + led-blue { |
|---|
| 80 | + gpios = <&stmfx_pinctrl 19 1>; |
|---|
| 73 | 81 | }; |
|---|
| 74 | 82 | }; |
|---|
| 75 | 83 | |
|---|
| .. | .. |
|---|
| 80 | 88 | label = "Wake up"; |
|---|
| 81 | 89 | linux,code = <KEY_WAKEUP>; |
|---|
| 82 | 90 | gpios = <&gpioc 13 0>; |
|---|
| 91 | + }; |
|---|
| 92 | + }; |
|---|
| 93 | + |
|---|
| 94 | + joystick { |
|---|
| 95 | + compatible = "gpio-keys"; |
|---|
| 96 | + pinctrl-0 = <&joystick_pins>; |
|---|
| 97 | + pinctrl-names = "default"; |
|---|
| 98 | + button-0 { |
|---|
| 99 | + label = "JoySel"; |
|---|
| 100 | + linux,code = <KEY_ENTER>; |
|---|
| 101 | + interrupt-parent = <&stmfx_pinctrl>; |
|---|
| 102 | + interrupts = <0 IRQ_TYPE_EDGE_FALLING>; |
|---|
| 103 | + }; |
|---|
| 104 | + button-1 { |
|---|
| 105 | + label = "JoyDown"; |
|---|
| 106 | + linux,code = <KEY_DOWN>; |
|---|
| 107 | + interrupt-parent = <&stmfx_pinctrl>; |
|---|
| 108 | + interrupts = <1 IRQ_TYPE_EDGE_FALLING>; |
|---|
| 109 | + }; |
|---|
| 110 | + button-2 { |
|---|
| 111 | + label = "JoyLeft"; |
|---|
| 112 | + linux,code = <KEY_LEFT>; |
|---|
| 113 | + interrupt-parent = <&stmfx_pinctrl>; |
|---|
| 114 | + interrupts = <2 IRQ_TYPE_EDGE_FALLING>; |
|---|
| 115 | + }; |
|---|
| 116 | + button-3 { |
|---|
| 117 | + label = "JoyRight"; |
|---|
| 118 | + linux,code = <KEY_RIGHT>; |
|---|
| 119 | + interrupt-parent = <&stmfx_pinctrl>; |
|---|
| 120 | + interrupts = <3 IRQ_TYPE_EDGE_FALLING>; |
|---|
| 121 | + }; |
|---|
| 122 | + button-4 { |
|---|
| 123 | + label = "JoyUp"; |
|---|
| 124 | + linux,code = <KEY_UP>; |
|---|
| 125 | + interrupt-parent = <&stmfx_pinctrl>; |
|---|
| 126 | + interrupts = <4 IRQ_TYPE_EDGE_FALLING>; |
|---|
| 83 | 127 | }; |
|---|
| 84 | 128 | }; |
|---|
| 85 | 129 | |
|---|
| .. | .. |
|---|
| 112 | 156 | i2c-scl-rising-time-ns = <185>; |
|---|
| 113 | 157 | i2c-scl-falling-time-ns = <20>; |
|---|
| 114 | 158 | status = "okay"; |
|---|
| 159 | + |
|---|
| 160 | + stmfx: stmfx@42 { |
|---|
| 161 | + compatible = "st,stmfx-0300"; |
|---|
| 162 | + reg = <0x42>; |
|---|
| 163 | + interrupts = <8 IRQ_TYPE_EDGE_RISING>; |
|---|
| 164 | + interrupt-parent = <&gpioi>; |
|---|
| 165 | + |
|---|
| 166 | + stmfx_pinctrl: pinctrl { |
|---|
| 167 | + compatible = "st,stmfx-0300-pinctrl"; |
|---|
| 168 | + gpio-controller; |
|---|
| 169 | + #gpio-cells = <2>; |
|---|
| 170 | + interrupt-controller; |
|---|
| 171 | + #interrupt-cells = <2>; |
|---|
| 172 | + gpio-ranges = <&stmfx_pinctrl 0 0 24>; |
|---|
| 173 | + |
|---|
| 174 | + joystick_pins: joystick { |
|---|
| 175 | + pins = "gpio0", "gpio1", "gpio2", "gpio3", "gpio4"; |
|---|
| 176 | + drive-push-pull; |
|---|
| 177 | + bias-pull-up; |
|---|
| 178 | + }; |
|---|
| 179 | + }; |
|---|
| 180 | + }; |
|---|
| 115 | 181 | }; |
|---|
| 116 | 182 | |
|---|
| 117 | 183 | &rtc { |
|---|