0001 /*
0002 * Copyright 2017 - Vikas MANOCHA <vikas.manocha@st.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/gpio/gpio.h>
0048
0049 / {
0050 model = "STMicroelectronics STM32F746-DISCO board";
0051 compatible = "st,stm32f746-disco", "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 0x800000>;
0061 };
0062
0063 aliases {
0064 serial0 = &usart1;
0065 };
0066
0067 usbotg_hs_phy: usb-phy {
0068 #phy-cells = <0>;
0069 compatible = "usb-nop-xceiv";
0070 clocks = <&rcc 0 STM32F7_AHB1_CLOCK(OTGHSULPI)>;
0071 clock-names = "main_clk";
0072 };
0073
0074 /* This turns on vbus for otg fs for host mode (dwc2) */
0075 vcc5v_otg_fs: vcc5v-otg-fs-regulator {
0076 compatible = "regulator-fixed";
0077 gpio = <&gpiod 5 0>;
0078 regulator-name = "vcc5_host1";
0079 regulator-always-on;
0080 };
0081
0082 mmc_vcard: mmc_vcard {
0083 compatible = "regulator-fixed";
0084 regulator-name = "mmc_vcard";
0085 regulator-min-microvolt = <3300000>;
0086 regulator-max-microvolt = <3300000>;
0087 };
0088 };
0089
0090 &clk_hse {
0091 clock-frequency = <25000000>;
0092 };
0093
0094 &i2c1 {
0095 pinctrl-0 = <&i2c1_pins_b>;
0096 pinctrl-names = "default";
0097 i2c-scl-rising-time-ns = <185>;
0098 i2c-scl-falling-time-ns = <20>;
0099 status = "okay";
0100 };
0101
0102 &sdio1 {
0103 status = "okay";
0104 vmmc-supply = <&mmc_vcard>;
0105 cd-gpios = <&gpioc 13 GPIO_ACTIVE_LOW>;
0106 pinctrl-names = "default", "opendrain";
0107 pinctrl-0 = <&sdio_pins_a>;
0108 pinctrl-1 = <&sdio_pins_od_a>;
0109 bus-width = <4>;
0110 };
0111
0112 &timers5 {
0113 /* Override timer5 to act as clockevent */
0114 compatible = "st,stm32-timer";
0115 interrupts = <50>;
0116 status = "okay";
0117 /delete-property/#address-cells;
0118 /delete-property/#size-cells;
0119 /delete-property/clock-names;
0120 /delete-node/pwm;
0121 /delete-node/timer@4;
0122 };
0123
0124 &usart1 {
0125 pinctrl-0 = <&usart1_pins_b>;
0126 pinctrl-names = "default";
0127 status = "okay";
0128 };
0129
0130 &usbotg_fs {
0131 dr_mode = "host";
0132 pinctrl-0 = <&usbotg_fs_pins_a>;
0133 pinctrl-names = "default";
0134 status = "okay";
0135 };
0136
0137 &usbotg_hs {
0138 dr_mode = "host";
0139 phys = <&usbotg_hs_phy>;
0140 phy-names = "usb2-phy";
0141 pinctrl-0 = <&usbotg_hs_pins_b>;
0142 pinctrl-names = "default";
0143 status = "okay";
0144 };