1f126890aSEmmanuel Vadot/* 2f126890aSEmmanuel Vadot * Copyright 2017 - Vikas MANOCHA <vikas.manocha@st.com> 3f126890aSEmmanuel Vadot * 4f126890aSEmmanuel Vadot * This file is dual-licensed: you can use it either under the terms 5f126890aSEmmanuel Vadot * of the GPL or the X11 license, at your option. Note that this dual 6f126890aSEmmanuel Vadot * licensing only applies to this file, and not this project as a 7f126890aSEmmanuel Vadot * whole. 8f126890aSEmmanuel Vadot * 9f126890aSEmmanuel Vadot * a) This file is free software; you can redistribute it and/or 10f126890aSEmmanuel Vadot * modify it under the terms of the GNU General Public License as 11f126890aSEmmanuel Vadot * published by the Free Software Foundation; either version 2 of the 12f126890aSEmmanuel Vadot * License, or (at your option) any later version. 13f126890aSEmmanuel Vadot * 14f126890aSEmmanuel Vadot * This file is distributed in the hope that it will be useful, 15f126890aSEmmanuel Vadot * but WITHOUT ANY WARRANTY; without even the implied warranty of 16f126890aSEmmanuel Vadot * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17f126890aSEmmanuel Vadot * GNU General Public License for more details. 18f126890aSEmmanuel Vadot * 19f126890aSEmmanuel Vadot * Or, alternatively, 20f126890aSEmmanuel Vadot * 21f126890aSEmmanuel Vadot * b) Permission is hereby granted, free of charge, to any person 22f126890aSEmmanuel Vadot * obtaining a copy of this software and associated documentation 23f126890aSEmmanuel Vadot * files (the "Software"), to deal in the Software without 24f126890aSEmmanuel Vadot * restriction, including without limitation the rights to use, 25f126890aSEmmanuel Vadot * copy, modify, merge, publish, distribute, sublicense, and/or 26f126890aSEmmanuel Vadot * sell copies of the Software, and to permit persons to whom the 27f126890aSEmmanuel Vadot * Software is furnished to do so, subject to the following 28f126890aSEmmanuel Vadot * conditions: 29f126890aSEmmanuel Vadot * 30f126890aSEmmanuel Vadot * The above copyright notice and this permission notice shall be 31f126890aSEmmanuel Vadot * included in all copies or substantial portions of the Software. 32f126890aSEmmanuel Vadot * 33f126890aSEmmanuel Vadot * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 34f126890aSEmmanuel Vadot * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 35f126890aSEmmanuel Vadot * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 36f126890aSEmmanuel Vadot * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 37f126890aSEmmanuel Vadot * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 38f126890aSEmmanuel Vadot * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 39f126890aSEmmanuel Vadot * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 40f126890aSEmmanuel Vadot * OTHER DEALINGS IN THE SOFTWARE. 41f126890aSEmmanuel Vadot */ 42f126890aSEmmanuel Vadot 43f126890aSEmmanuel Vadot/dts-v1/; 44f126890aSEmmanuel Vadot#include "stm32f746.dtsi" 45f126890aSEmmanuel Vadot#include "stm32f746-pinctrl.dtsi" 46f126890aSEmmanuel Vadot#include <dt-bindings/gpio/gpio.h> 47aa1a8ff2SEmmanuel Vadot#include <dt-bindings/input/input.h> 48aa1a8ff2SEmmanuel Vadot#include <dt-bindings/interrupt-controller/irq.h> 49f126890aSEmmanuel Vadot 50f126890aSEmmanuel Vadot/ { 51f126890aSEmmanuel Vadot model = "STMicroelectronics STM32F746-DISCO board"; 52f126890aSEmmanuel Vadot compatible = "st,stm32f746-disco", "st,stm32f746"; 53f126890aSEmmanuel Vadot 54f126890aSEmmanuel Vadot chosen { 55f126890aSEmmanuel Vadot bootargs = "root=/dev/ram"; 56f126890aSEmmanuel Vadot stdout-path = "serial0:115200n8"; 57f126890aSEmmanuel Vadot }; 58f126890aSEmmanuel Vadot 59f126890aSEmmanuel Vadot memory@c0000000 { 60f126890aSEmmanuel Vadot device_type = "memory"; 61f126890aSEmmanuel Vadot reg = <0xC0000000 0x800000>; 62f126890aSEmmanuel Vadot }; 63f126890aSEmmanuel Vadot 64aa1a8ff2SEmmanuel Vadot reserved-memory { 65aa1a8ff2SEmmanuel Vadot #address-cells = <1>; 66aa1a8ff2SEmmanuel Vadot #size-cells = <1>; 67aa1a8ff2SEmmanuel Vadot ranges; 68aa1a8ff2SEmmanuel Vadot 69aa1a8ff2SEmmanuel Vadot linux,cma { 70aa1a8ff2SEmmanuel Vadot compatible = "shared-dma-pool"; 71aa1a8ff2SEmmanuel Vadot no-map; 72aa1a8ff2SEmmanuel Vadot size = <0x80000>; 73aa1a8ff2SEmmanuel Vadot linux,dma-default; 74aa1a8ff2SEmmanuel Vadot }; 75aa1a8ff2SEmmanuel Vadot }; 76aa1a8ff2SEmmanuel Vadot 77f126890aSEmmanuel Vadot aliases { 78f126890aSEmmanuel Vadot serial0 = &usart1; 79f126890aSEmmanuel Vadot }; 80f126890aSEmmanuel Vadot 81f126890aSEmmanuel Vadot usbotg_hs_phy: usb-phy { 82f126890aSEmmanuel Vadot #phy-cells = <0>; 83f126890aSEmmanuel Vadot compatible = "usb-nop-xceiv"; 84f126890aSEmmanuel Vadot clocks = <&rcc 0 STM32F7_AHB1_CLOCK(OTGHSULPI)>; 85f126890aSEmmanuel Vadot clock-names = "main_clk"; 86f126890aSEmmanuel Vadot }; 87f126890aSEmmanuel Vadot 88f126890aSEmmanuel Vadot /* This turns on vbus for otg fs for host mode (dwc2) */ 89f126890aSEmmanuel Vadot vcc5v_otg_fs: vcc5v-otg-fs-regulator { 90f126890aSEmmanuel Vadot compatible = "regulator-fixed"; 91f126890aSEmmanuel Vadot gpio = <&gpiod 5 0>; 92f126890aSEmmanuel Vadot regulator-name = "vcc5_host1"; 93f126890aSEmmanuel Vadot regulator-always-on; 94f126890aSEmmanuel Vadot }; 95f126890aSEmmanuel Vadot 96aa1a8ff2SEmmanuel Vadot vcc_3v3: vcc-3v3 { 97f126890aSEmmanuel Vadot compatible = "regulator-fixed"; 98aa1a8ff2SEmmanuel Vadot regulator-name = "vcc_3v3"; 99f126890aSEmmanuel Vadot regulator-min-microvolt = <3300000>; 100f126890aSEmmanuel Vadot regulator-max-microvolt = <3300000>; 101f126890aSEmmanuel Vadot }; 102aa1a8ff2SEmmanuel Vadot 103aa1a8ff2SEmmanuel Vadot backlight: backlight { 104aa1a8ff2SEmmanuel Vadot compatible = "gpio-backlight"; 105aa1a8ff2SEmmanuel Vadot gpios = <&gpiok 3 GPIO_ACTIVE_HIGH>; 106aa1a8ff2SEmmanuel Vadot status = "okay"; 107aa1a8ff2SEmmanuel Vadot }; 108aa1a8ff2SEmmanuel Vadot 109aa1a8ff2SEmmanuel Vadot panel_rgb: panel-rgb { 110aa1a8ff2SEmmanuel Vadot compatible = "rocktech,rk043fn48h"; 111aa1a8ff2SEmmanuel Vadot power-supply = <&vcc_3v3>; 112aa1a8ff2SEmmanuel Vadot backlight = <&backlight>; 113aa1a8ff2SEmmanuel Vadot enable-gpios = <&gpioi 12 GPIO_ACTIVE_HIGH>; 114aa1a8ff2SEmmanuel Vadot status = "okay"; 115aa1a8ff2SEmmanuel Vadot port { 116aa1a8ff2SEmmanuel Vadot panel_in_rgb: endpoint { 117aa1a8ff2SEmmanuel Vadot remote-endpoint = <<dc_out_rgb>; 118aa1a8ff2SEmmanuel Vadot }; 119aa1a8ff2SEmmanuel Vadot }; 120aa1a8ff2SEmmanuel Vadot }; 121f126890aSEmmanuel Vadot}; 122f126890aSEmmanuel Vadot 123f126890aSEmmanuel Vadot&clk_hse { 124f126890aSEmmanuel Vadot clock-frequency = <25000000>; 125f126890aSEmmanuel Vadot}; 126f126890aSEmmanuel Vadot 127f126890aSEmmanuel Vadot&i2c1 { 128f126890aSEmmanuel Vadot pinctrl-0 = <&i2c1_pins_b>; 129f126890aSEmmanuel Vadot pinctrl-names = "default"; 130f126890aSEmmanuel Vadot i2c-scl-rising-time-ns = <185>; 131f126890aSEmmanuel Vadot i2c-scl-falling-time-ns = <20>; 132f126890aSEmmanuel Vadot status = "okay"; 133f126890aSEmmanuel Vadot}; 134f126890aSEmmanuel Vadot 135aa1a8ff2SEmmanuel Vadot&i2c3 { 136aa1a8ff2SEmmanuel Vadot pinctrl-0 = <&i2c3_pins_a>; 137aa1a8ff2SEmmanuel Vadot pinctrl-names = "default"; 138aa1a8ff2SEmmanuel Vadot clock-frequency = <400000>; 139aa1a8ff2SEmmanuel Vadot status = "okay"; 140aa1a8ff2SEmmanuel Vadot 141aa1a8ff2SEmmanuel Vadot touchscreen@38 { 142aa1a8ff2SEmmanuel Vadot compatible = "edt,edt-ft5306"; 143aa1a8ff2SEmmanuel Vadot reg = <0x38>; 144aa1a8ff2SEmmanuel Vadot interrupt-parent = <&gpioi>; 145aa1a8ff2SEmmanuel Vadot interrupts = <13 IRQ_TYPE_EDGE_FALLING>; 146aa1a8ff2SEmmanuel Vadot touchscreen-size-x = <480>; 147aa1a8ff2SEmmanuel Vadot touchscreen-size-y = <272>; 148aa1a8ff2SEmmanuel Vadot }; 149aa1a8ff2SEmmanuel Vadot}; 150aa1a8ff2SEmmanuel Vadot 151aa1a8ff2SEmmanuel Vadot<dc { 152aa1a8ff2SEmmanuel Vadot pinctrl-0 = <<dc_pins_a>; 153aa1a8ff2SEmmanuel Vadot pinctrl-names = "default"; 154aa1a8ff2SEmmanuel Vadot status = "okay"; 155aa1a8ff2SEmmanuel Vadot 156aa1a8ff2SEmmanuel Vadot port { 157aa1a8ff2SEmmanuel Vadot ltdc_out_rgb: endpoint { 158aa1a8ff2SEmmanuel Vadot remote-endpoint = <&panel_in_rgb>; 159aa1a8ff2SEmmanuel Vadot }; 160aa1a8ff2SEmmanuel Vadot }; 161aa1a8ff2SEmmanuel Vadot}; 162aa1a8ff2SEmmanuel Vadot 163f126890aSEmmanuel Vadot&sdio1 { 164f126890aSEmmanuel Vadot status = "okay"; 165aa1a8ff2SEmmanuel Vadot vmmc-supply = <&vcc_3v3>; 166f126890aSEmmanuel Vadot cd-gpios = <&gpioc 13 GPIO_ACTIVE_LOW>; 167*84943d6fSEmmanuel Vadot pinctrl-names = "default", "opendrain", "sleep"; 168f126890aSEmmanuel Vadot pinctrl-0 = <&sdio_pins_a>; 169f126890aSEmmanuel Vadot pinctrl-1 = <&sdio_pins_od_a>; 170*84943d6fSEmmanuel Vadot pinctrl-2 = <&sdio_pins_sleep_a>; 171f126890aSEmmanuel Vadot bus-width = <4>; 172f126890aSEmmanuel Vadot}; 173f126890aSEmmanuel Vadot 174f126890aSEmmanuel Vadot&timers5 { 175f126890aSEmmanuel Vadot /* Override timer5 to act as clockevent */ 176f126890aSEmmanuel Vadot compatible = "st,stm32-timer"; 177f126890aSEmmanuel Vadot interrupts = <50>; 178f126890aSEmmanuel Vadot status = "okay"; 179f126890aSEmmanuel Vadot /delete-property/#address-cells; 180f126890aSEmmanuel Vadot /delete-property/#size-cells; 181f126890aSEmmanuel Vadot /delete-property/clock-names; 182f126890aSEmmanuel Vadot /delete-node/pwm; 183f126890aSEmmanuel Vadot /delete-node/timer@4; 184f126890aSEmmanuel Vadot}; 185f126890aSEmmanuel Vadot 186f126890aSEmmanuel Vadot&usart1 { 187f126890aSEmmanuel Vadot pinctrl-0 = <&usart1_pins_b>; 188f126890aSEmmanuel Vadot pinctrl-names = "default"; 189f126890aSEmmanuel Vadot status = "okay"; 190f126890aSEmmanuel Vadot}; 191f126890aSEmmanuel Vadot 192f126890aSEmmanuel Vadot&usbotg_fs { 193f126890aSEmmanuel Vadot dr_mode = "host"; 194f126890aSEmmanuel Vadot pinctrl-0 = <&usbotg_fs_pins_a>; 195f126890aSEmmanuel Vadot pinctrl-names = "default"; 196f126890aSEmmanuel Vadot status = "okay"; 197f126890aSEmmanuel Vadot}; 198f126890aSEmmanuel Vadot 199f126890aSEmmanuel Vadot&usbotg_hs { 200f126890aSEmmanuel Vadot dr_mode = "host"; 201f126890aSEmmanuel Vadot phys = <&usbotg_hs_phy>; 202f126890aSEmmanuel Vadot phy-names = "usb2-phy"; 203f126890aSEmmanuel Vadot pinctrl-0 = <&usbotg_hs_pins_b>; 204f126890aSEmmanuel Vadot pinctrl-names = "default"; 205f126890aSEmmanuel Vadot status = "okay"; 206f126890aSEmmanuel Vadot}; 207