0001 /*
0002 * Copyright 2015 - Maxime Coquelin <mcoquelin.stm32@gmail.com>
0003 *
0004 * This file is dual-licensed: you can use it either under the terms
0005 * of the GPL or the X11 license, at your option. Note that this dual
0006 * licensing only applies to this file, and not this project as a
0007 * whole.
0008 *
0009 * a) This file is free software; you can redistribute it and/or
0010 * modify it under the terms of the GNU General Public License as
0011 * published by the Free Software Foundation; either version 2 of the
0012 * License, or (at your option) any later version.
0013 *
0014 * This file is distributed in the hope that it will be useful,
0015 * but WITHOUT ANY WARRANTY; without even the implied warranty of
0016 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
0017 * GNU General Public License for more details.
0018 *
0019 * Or, alternatively,
0020 *
0021 * b) Permission is hereby granted, free of charge, to any person
0022 * obtaining a copy of this software and associated documentation
0023 * files (the "Software"), to deal in the Software without
0024 * restriction, including without limitation the rights to use,
0025 * copy, modify, merge, publish, distribute, sublicense, and/or
0026 * sell copies of the Software, and to permit persons to whom the
0027 * Software is furnished to do so, subject to the following
0028 * conditions:
0029 *
0030 * The above copyright notice and this permission notice shall be
0031 * included in all copies or substantial portions of the Software.
0032 *
0033 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
0034 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
0035 * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
0036 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
0037 * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
0038 * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
0039 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
0040 * OTHER DEALINGS IN THE SOFTWARE.
0041 */
0042
0043 /dts-v1/;
0044 #include "stm32f746.dtsi"
0045 #include "stm32f746-pinctrl.dtsi"
0046 #include <dt-bindings/input/input.h>
0047 #include <dt-bindings/interrupt-controller/irq.h>
0048
0049 / {
0050 model = "STMicroelectronics STM32746g-EVAL board";
0051 compatible = "st,stm32746g-eval", "st,stm32f746";
0052
0053 chosen {
0054 bootargs = "root=/dev/ram";
0055 stdout-path = "serial0:115200n8";
0056 };
0057
0058 memory@c0000000 {
0059 device_type = "memory";
0060 reg = <0xc0000000 0x2000000>;
0061 };
0062
0063 aliases {
0064 serial0 = &usart1;
0065 };
0066
0067 leds {
0068 compatible = "gpio-leds";
0069 led-green {
0070 gpios = <&gpiof 10 1>;
0071 linux,default-trigger = "heartbeat";
0072 };
0073 led-orange {
0074 gpios = <&stmfx_pinctrl 17 1>;
0075 };
0076 led-red {
0077 gpios = <&gpiob 7 1>;
0078 };
0079 led-blue {
0080 gpios = <&stmfx_pinctrl 19 1>;
0081 };
0082 };
0083
0084 gpio-keys {
0085 compatible = "gpio-keys";
0086 autorepeat;
0087 button-0 {
0088 label = "Wake up";
0089 linux,code = <KEY_WAKEUP>;
0090 gpios = <&gpioc 13 0>;
0091 };
0092 };
0093
0094 joystick {
0095 compatible = "gpio-keys";
0096 pinctrl-0 = <&joystick_pins>;
0097 pinctrl-names = "default";
0098 button-0 {
0099 label = "JoySel";
0100 linux,code = <KEY_ENTER>;
0101 interrupt-parent = <&stmfx_pinctrl>;
0102 interrupts = <0 IRQ_TYPE_EDGE_FALLING>;
0103 };
0104 button-1 {
0105 label = "JoyDown";
0106 linux,code = <KEY_DOWN>;
0107 interrupt-parent = <&stmfx_pinctrl>;
0108 interrupts = <1 IRQ_TYPE_EDGE_FALLING>;
0109 };
0110 button-2 {
0111 label = "JoyLeft";
0112 linux,code = <KEY_LEFT>;
0113 interrupt-parent = <&stmfx_pinctrl>;
0114 interrupts = <2 IRQ_TYPE_EDGE_FALLING>;
0115 };
0116 button-3 {
0117 label = "JoyRight";
0118 linux,code = <KEY_RIGHT>;
0119 interrupt-parent = <&stmfx_pinctrl>;
0120 interrupts = <3 IRQ_TYPE_EDGE_FALLING>;
0121 };
0122 button-4 {
0123 label = "JoyUp";
0124 linux,code = <KEY_UP>;
0125 interrupt-parent = <&stmfx_pinctrl>;
0126 interrupts = <4 IRQ_TYPE_EDGE_FALLING>;
0127 };
0128 };
0129
0130 usbotg_hs_phy: usb-phy {
0131 #phy-cells = <0>;
0132 compatible = "usb-nop-xceiv";
0133 clocks = <&rcc 0 STM32F7_AHB1_CLOCK(OTGHSULPI)>;
0134 clock-names = "main_clk";
0135 };
0136
0137 mmc_vcard: mmc_vcard {
0138 compatible = "regulator-fixed";
0139 regulator-name = "mmc_vcard";
0140 regulator-min-microvolt = <3300000>;
0141 regulator-max-microvolt = <3300000>;
0142 };
0143 };
0144
0145 &clk_hse {
0146 clock-frequency = <25000000>;
0147 };
0148
0149 &crc {
0150 status = "okay";
0151 };
0152
0153 &i2c1 {
0154 pinctrl-0 = <&i2c1_pins_b>;
0155 pinctrl-names = "default";
0156 i2c-scl-rising-time-ns = <185>;
0157 i2c-scl-falling-time-ns = <20>;
0158 status = "okay";
0159
0160 stmfx: stmfx@42 {
0161 compatible = "st,stmfx-0300";
0162 reg = <0x42>;
0163 interrupts = <8 IRQ_TYPE_EDGE_RISING>;
0164 interrupt-parent = <&gpioi>;
0165
0166 stmfx_pinctrl: pinctrl {
0167 compatible = "st,stmfx-0300-pinctrl";
0168 gpio-controller;
0169 #gpio-cells = <2>;
0170 interrupt-controller;
0171 #interrupt-cells = <2>;
0172 gpio-ranges = <&stmfx_pinctrl 0 0 24>;
0173
0174 joystick_pins: joystick {
0175 pins = "gpio0", "gpio1", "gpio2", "gpio3", "gpio4";
0176 drive-push-pull;
0177 bias-pull-up;
0178 };
0179 };
0180 };
0181 };
0182
0183 &rtc {
0184 status = "okay";
0185 };
0186
0187 &sdio1 {
0188 status = "okay";
0189 vmmc-supply = <&mmc_vcard>;
0190 broken-cd;
0191 pinctrl-names = "default", "opendrain";
0192 pinctrl-0 = <&sdio_pins_a>;
0193 pinctrl-1 = <&sdio_pins_od_a>;
0194 bus-width = <4>;
0195 };
0196
0197 &timers5 {
0198 /* Override timer5 to act as clockevent */
0199 compatible = "st,stm32-timer";
0200 interrupts = <50>;
0201 status = "okay";
0202 /delete-property/#address-cells;
0203 /delete-property/#size-cells;
0204 /delete-property/clock-names;
0205 /delete-node/pwm;
0206 /delete-node/timer@4;
0207 };
0208
0209 &usart1 {
0210 pinctrl-0 = <&usart1_pins_a>;
0211 pinctrl-names = "default";
0212 status = "okay";
0213 };
0214
0215 &usbotg_hs {
0216 dr_mode = "otg";
0217 phys = <&usbotg_hs_phy>;
0218 phy-names = "usb2-phy";
0219 pinctrl-0 = <&usbotg_hs_pins_a>;
0220 pinctrl-names = "default";
0221 status = "okay";
0222 };