hc
2024-01-03 2f7c68cb55ecb7331f2381deb497c27155f32faf
kernel/arch/arm/boot/dts/stm32746g-eval.dts
....@@ -44,6 +44,7 @@
4444 #include "stm32f746.dtsi"
4545 #include "stm32f746-pinctrl.dtsi"
4646 #include <dt-bindings/input/input.h>
47
+#include <dt-bindings/interrupt-controller/irq.h>
4748
4849 / {
4950 model = "STMicroelectronics STM32746g-EVAL board";
....@@ -54,7 +55,8 @@
5455 stdout-path = "serial0:115200n8";
5556 };
5657
57
- memory {
58
+ memory@c0000000 {
59
+ device_type = "memory";
5860 reg = <0xc0000000 0x2000000>;
5961 };
6062
....@@ -64,12 +66,18 @@
6466
6567 leds {
6668 compatible = "gpio-leds";
67
- green {
69
+ led-green {
6870 gpios = <&gpiof 10 1>;
6971 linux,default-trigger = "heartbeat";
7072 };
71
- red {
73
+ led-orange {
74
+ gpios = <&stmfx_pinctrl 17 1>;
75
+ };
76
+ led-red {
7277 gpios = <&gpiob 7 1>;
78
+ };
79
+ led-blue {
80
+ gpios = <&stmfx_pinctrl 19 1>;
7381 };
7482 };
7583
....@@ -80,6 +88,42 @@
8088 label = "Wake up";
8189 linux,code = <KEY_WAKEUP>;
8290 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>;
83127 };
84128 };
85129
....@@ -112,6 +156,28 @@
112156 i2c-scl-rising-time-ns = <185>;
113157 i2c-scl-falling-time-ns = <20>;
114158 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
+ };
115181 };
116182
117183 &rtc {