Michael Kurz | b1a8de7 | 2017-01-22 16:04:23 +0100 | [diff] [blame] | 1 | /* |
| 2 | * Copyright 2016 - Michael Kurz <michi.kurz@gmail.com> |
Vikas Manocha | fd198ee | 2017-04-10 15:02:53 -0700 | [diff] [blame] | 3 | * Copyright 2016 - Vikas MANOCHA <vikas.manocha@st.com> |
Michael Kurz | b1a8de7 | 2017-01-22 16:04:23 +0100 | [diff] [blame] | 4 | * |
| 5 | * Based on: |
| 6 | * stm32f469-disco.dts from Linux |
| 7 | * Copyright 2016 - Lee Jones <lee.jones@linaro.org> |
| 8 | * |
| 9 | * This file is dual-licensed: you can use it either under the terms |
| 10 | * of the GPL or the X11 license, at your option. Note that this dual |
| 11 | * licensing only applies to this file, and not this project as a |
| 12 | * whole. |
| 13 | * |
| 14 | * a) This file is free software; you can redistribute it and/or |
| 15 | * modify it under the terms of the GNU General Public License as |
| 16 | * published by the Free Software Foundation; either version 2 of the |
| 17 | * License, or (at your option) any later version. |
| 18 | * |
| 19 | * This file is distributed in the hope that it will be useful, |
| 20 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 21 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 22 | * GNU General Public License for more details. |
| 23 | * |
| 24 | * Or, alternatively, |
| 25 | * |
| 26 | * b) Permission is hereby granted, free of charge, to any person |
| 27 | * obtaining a copy of this software and associated documentation |
| 28 | * files (the "Software"), to deal in the Software without |
| 29 | * restriction, including without limitation the rights to use, |
| 30 | * copy, modify, merge, publish, distribute, sublicense, and/or |
| 31 | * sell copies of the Software, and to permit persons to whom the |
| 32 | * Software is furnished to do so, subject to the following |
| 33 | * conditions: |
| 34 | * |
| 35 | * The above copyright notice and this permission notice shall be |
| 36 | * included in all copies or substantial portions of the Software. |
| 37 | * |
| 38 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, |
| 39 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES |
| 40 | * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND |
| 41 | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT |
| 42 | * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, |
| 43 | * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING |
| 44 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR |
| 45 | * OTHER DEALINGS IN THE SOFTWARE. |
| 46 | */ |
| 47 | |
| 48 | /dts-v1/; |
| 49 | #include "stm32f746.dtsi" |
Vikas Manocha | 6c9a100 | 2017-04-10 15:02:56 -0700 | [diff] [blame] | 50 | #include <dt-bindings/memory/stm32-sdram.h> |
Michael Kurz | b1a8de7 | 2017-01-22 16:04:23 +0100 | [diff] [blame] | 51 | |
| 52 | / { |
| 53 | model = "STMicroelectronics STM32F746-DISCO board"; |
| 54 | compatible = "st,stm32f746-disco", "st,stm32f746"; |
| 55 | |
| 56 | chosen { |
| 57 | bootargs = "root=/dev/ram rdinit=/linuxrc"; |
| 58 | stdout-path = "serial0:115200n8"; |
| 59 | }; |
| 60 | |
| 61 | memory { |
| 62 | reg = <0xC0000000 0x800000>; |
| 63 | }; |
| 64 | |
| 65 | aliases { |
Vikas Manocha | 84bfdc1 | 2017-02-12 10:25:47 -0800 | [diff] [blame] | 66 | serial0 = &usart1; |
Michael Kurz | b1a8de7 | 2017-01-22 16:04:23 +0100 | [diff] [blame] | 67 | spi0 = &qspi; |
Vikas Manocha | d33a6a2 | 2017-04-10 15:02:58 -0700 | [diff] [blame] | 68 | /* Aliases for gpios so as to use sequence */ |
| 69 | gpio0 = &gpioa; |
| 70 | gpio1 = &gpiob; |
| 71 | gpio2 = &gpioc; |
| 72 | gpio3 = &gpiod; |
| 73 | gpio4 = &gpioe; |
| 74 | gpio5 = &gpiof; |
| 75 | gpio6 = &gpiog; |
| 76 | gpio7 = &gpioh; |
| 77 | gpio8 = &gpioi; |
| 78 | gpio9 = &gpioj; |
| 79 | gpio10 = &gpiok; |
Michael Kurz | b1a8de7 | 2017-01-22 16:04:23 +0100 | [diff] [blame] | 80 | }; |
Vikas Manocha | 2f80a9f | 2017-04-10 15:03:00 -0700 | [diff] [blame] | 81 | |
| 82 | led1 { |
| 83 | compatible = "st,led1"; |
| 84 | led-gpio = <&gpioi 1 0>; |
| 85 | }; |
| 86 | |
| 87 | button1 { |
| 88 | compatible = "st,button1"; |
| 89 | button-gpio = <&gpioi 11 0>; |
| 90 | }; |
Michael Kurz | b1a8de7 | 2017-01-22 16:04:23 +0100 | [diff] [blame] | 91 | }; |
| 92 | |
Vikas Manocha | 84bfdc1 | 2017-02-12 10:25:47 -0800 | [diff] [blame] | 93 | &clk_hse { |
| 94 | clock-frequency = <25000000>; |
| 95 | }; |
| 96 | |
Vikas Manocha | e34e19f | 2017-02-12 10:25:51 -0800 | [diff] [blame] | 97 | &usart1 { |
| 98 | pinctrl-0 = <&usart1_pins_a>; |
| 99 | pinctrl-names = "default"; |
| 100 | status = "okay"; |
| 101 | }; |
| 102 | |
Vikas Manocha | fd198ee | 2017-04-10 15:02:53 -0700 | [diff] [blame] | 103 | &fmc { |
| 104 | pinctrl-0 = <&fmc_pins>; |
| 105 | pinctrl-names = "default"; |
| 106 | status = "okay"; |
Vikas Manocha | 6c9a100 | 2017-04-10 15:02:56 -0700 | [diff] [blame] | 107 | |
| 108 | mr-nbanks = <1>; |
Vikas Manocha | bfea69a | 2017-04-10 15:03:03 -0700 | [diff] [blame] | 109 | /* Memory configuration from sdram datasheet MT48LC_4M32_B2B5-6A */ |
Vikas Manocha | 6c9a100 | 2017-04-10 15:02:56 -0700 | [diff] [blame] | 110 | bank1: bank@0 { |
Vikas Manocha | bfea69a | 2017-04-10 15:03:03 -0700 | [diff] [blame] | 111 | st,sdram-control = /bits/ 8 <NO_COL_8 NO_ROW_12 MWIDTH_16 BANKS_4 |
| 112 | CAS_3 SDCLK_2 RD_BURST_EN |
| 113 | RD_PIPE_DL_0>; |
| 114 | st,sdram-timing = /bits/ 8 <TMRD_2 TXSR_6 TRAS_4 TRC_6 TWR_2 |
| 115 | TRP_2 TRCD_2>; |
| 116 | /* refcount = (64msec/total_row_sdram)*freq - 20 */ |
| 117 | st,sdram-refcount = < 1542 >; |
Vikas Manocha | 6c9a100 | 2017-04-10 15:02:56 -0700 | [diff] [blame] | 118 | }; |
Vikas Manocha | fd198ee | 2017-04-10 15:02:53 -0700 | [diff] [blame] | 119 | }; |
| 120 | |
Michael Kurz | b1a8de7 | 2017-01-22 16:04:23 +0100 | [diff] [blame] | 121 | &mac { |
| 122 | status = "okay"; |
Vikas Manocha | c428a95 | 2017-02-12 10:25:52 -0800 | [diff] [blame] | 123 | pinctrl-0 = <ðernet_mii>; |
Michael Kurz | b1a8de7 | 2017-01-22 16:04:23 +0100 | [diff] [blame] | 124 | phy-mode = "rmii"; |
| 125 | phy-handle = <&phy0>; |
| 126 | |
| 127 | mdio0 { |
| 128 | #address-cells = <1>; |
| 129 | #size-cells = <0>; |
| 130 | compatible = "snps,dwmac-mdio"; |
| 131 | phy0: ethernet-phy@0 { |
| 132 | reg = <0>; |
| 133 | }; |
| 134 | }; |
| 135 | }; |
| 136 | |
| 137 | &qspi { |
Vikas Manocha | e245f1a | 2017-02-12 10:25:53 -0800 | [diff] [blame] | 138 | pinctrl-0 = <&qspi_pins>; |
Michael Kurz | b1a8de7 | 2017-01-22 16:04:23 +0100 | [diff] [blame] | 139 | status = "okay"; |
| 140 | |
| 141 | qflash0: n25q128a { |
| 142 | #address-cells = <1>; |
| 143 | #size-cells = <1>; |
| 144 | compatible = "micron,n25q128a13", "spi-flash"; |
| 145 | spi-max-frequency = <108000000>; |
| 146 | spi-tx-bus-width = <1>; |
| 147 | spi-rx-bus-width = <1>; |
| 148 | memory-map = <0x90000000 0x1000000>; |
| 149 | reg = <0>; |
| 150 | }; |
| 151 | }; |