|
@@ -1,49 +1,14 @@
|
|
|
+// SPDX-License-Identifier: GPL-2.0+ OR X11
|
|
|
/*
|
|
|
* Copyright 2015 - Maxime Coquelin <mcoquelin.stm32@gmail.com>
|
|
|
*
|
|
|
- * This file is dual-licensed: you can use it either under the terms
|
|
|
- * of the GPL or the X11 license, at your option. Note that this dual
|
|
|
- * licensing only applies to this file, and not this project as a
|
|
|
- * whole.
|
|
|
- *
|
|
|
- * a) This file is free software; you can redistribute it and/or
|
|
|
- * modify it under the terms of the GNU General Public License as
|
|
|
- * published by the Free Software Foundation; either version 2 of the
|
|
|
- * License, or (at your option) any later version.
|
|
|
- *
|
|
|
- * This file is distributed in the hope that it will be useful,
|
|
|
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
- * GNU General Public License for more details.
|
|
|
- *
|
|
|
- * Or, alternatively,
|
|
|
- *
|
|
|
- * b) Permission is hereby granted, free of charge, to any person
|
|
|
- * obtaining a copy of this software and associated documentation
|
|
|
- * files (the "Software"), to deal in the Software without
|
|
|
- * restriction, including without limitation the rights to use,
|
|
|
- * copy, modify, merge, publish, distribute, sublicense, and/or
|
|
|
- * sell copies of the Software, and to permit persons to whom the
|
|
|
- * Software is furnished to do so, subject to the following
|
|
|
- * conditions:
|
|
|
- *
|
|
|
- * The above copyright notice and this permission notice shall be
|
|
|
- * included in all copies or substantial portions of the Software.
|
|
|
- *
|
|
|
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
|
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
|
|
|
- * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
|
|
- * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
|
|
|
- * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
|
|
- * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
|
|
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
|
|
- * OTHER DEALINGS IN THE SOFTWARE.
|
|
|
*/
|
|
|
|
|
|
/dts-v1/;
|
|
|
#include "stm32f746.dtsi"
|
|
|
#include "stm32f746-pinctrl.dtsi"
|
|
|
#include <dt-bindings/input/input.h>
|
|
|
+#include <dt-bindings/interrupt-controller/irq.h>
|
|
|
|
|
|
/ {
|
|
|
model = "STMicroelectronics STM32746g-EVAL board";
|
|
@@ -55,6 +20,7 @@
|
|
|
};
|
|
|
|
|
|
memory {
|
|
|
+ device_type = "memory";
|
|
|
reg = <0xc0000000 0x2000000>;
|
|
|
};
|
|
|
|
|
@@ -68,9 +34,15 @@
|
|
|
gpios = <&gpiof 10 1>;
|
|
|
linux,default-trigger = "heartbeat";
|
|
|
};
|
|
|
+ orange {
|
|
|
+ gpios = <&stmfx_pinctrl 17 1>;
|
|
|
+ };
|
|
|
red {
|
|
|
gpios = <&gpiob 7 1>;
|
|
|
};
|
|
|
+ blue {
|
|
|
+ gpios = <&stmfx_pinctrl 19 1>;
|
|
|
+ };
|
|
|
};
|
|
|
|
|
|
gpio_keys {
|
|
@@ -85,6 +57,43 @@
|
|
|
};
|
|
|
};
|
|
|
|
|
|
+ joystick {
|
|
|
+ compatible = "gpio-keys";
|
|
|
+ #size-cells = <0>;
|
|
|
+ pinctrl-0 = <&joystick_pins>;
|
|
|
+ pinctrl-names = "default";
|
|
|
+ button-0 {
|
|
|
+ label = "JoySel";
|
|
|
+ linux,code = <KEY_ENTER>;
|
|
|
+ interrupt-parent = <&stmfx_pinctrl>;
|
|
|
+ interrupts = <0 IRQ_TYPE_EDGE_FALLING>;
|
|
|
+ };
|
|
|
+ button-1 {
|
|
|
+ label = "JoyDown";
|
|
|
+ linux,code = <KEY_DOWN>;
|
|
|
+ interrupt-parent = <&stmfx_pinctrl>;
|
|
|
+ interrupts = <1 IRQ_TYPE_EDGE_FALLING>;
|
|
|
+ };
|
|
|
+ button-2 {
|
|
|
+ label = "JoyLeft";
|
|
|
+ linux,code = <KEY_LEFT>;
|
|
|
+ interrupt-parent = <&stmfx_pinctrl>;
|
|
|
+ interrupts = <2 IRQ_TYPE_EDGE_FALLING>;
|
|
|
+ };
|
|
|
+ button-3 {
|
|
|
+ label = "JoyRight";
|
|
|
+ linux,code = <KEY_RIGHT>;
|
|
|
+ interrupt-parent = <&stmfx_pinctrl>;
|
|
|
+ interrupts = <3 IRQ_TYPE_EDGE_FALLING>;
|
|
|
+ };
|
|
|
+ button-4 {
|
|
|
+ label = "JoyUp";
|
|
|
+ linux,code = <KEY_UP>;
|
|
|
+ interrupt-parent = <&stmfx_pinctrl>;
|
|
|
+ interrupts = <4 IRQ_TYPE_EDGE_FALLING>;
|
|
|
+ };
|
|
|
+ };
|
|
|
+
|
|
|
usbotg_hs_phy: usb-phy {
|
|
|
#phy-cells = <0>;
|
|
|
compatible = "usb-nop-xceiv";
|
|
@@ -114,6 +123,28 @@
|
|
|
i2c-scl-rising-time-ns = <185>;
|
|
|
i2c-scl-falling-time-ns = <20>;
|
|
|
status = "okay";
|
|
|
+
|
|
|
+ stmfx: stmfx@42 {
|
|
|
+ compatible = "st,stmfx-0300";
|
|
|
+ reg = <0x42>;
|
|
|
+ interrupts = <8 IRQ_TYPE_EDGE_RISING>;
|
|
|
+ interrupt-parent = <&gpioi>;
|
|
|
+
|
|
|
+ stmfx_pinctrl: stmfx-pin-controller {
|
|
|
+ compatible = "st,stmfx-0300-pinctrl";
|
|
|
+ gpio-controller;
|
|
|
+ #gpio-cells = <2>;
|
|
|
+ interrupt-controller;
|
|
|
+ #interrupt-cells = <2>;
|
|
|
+ gpio-ranges = <&stmfx_pinctrl 0 0 24>;
|
|
|
+
|
|
|
+ joystick_pins: joystick {
|
|
|
+ pins = "gpio0", "gpio1", "gpio2", "gpio3", "gpio4";
|
|
|
+ drive-push-pull;
|
|
|
+ bias-pull-up;
|
|
|
+ };
|
|
|
+ };
|
|
|
+ };
|
|
|
};
|
|
|
|
|
|
&rtc {
|