Tom Rini | 10e4779 | 2018-05-06 17:58:06 -0400 | [diff] [blame] | 1 | // SPDX-License-Identifier: GPL-2.0+ |
Patrice Chotard | cb1c938 | 2017-12-12 09:49:43 +0100 | [diff] [blame] | 2 | /* |
| 3 | * Copyright (C) 2017, STMicroelectronics - All Rights Reserved |
Patrice Chotard | 90e8278 | 2021-01-04 17:00:56 +0100 | [diff] [blame] | 4 | * Author(s): Patrice Chotard, <patrice.chotard@foss.st.com> for STMicroelectronics. |
Patrice Chotard | cb1c938 | 2017-12-12 09:49:43 +0100 | [diff] [blame] | 5 | */ |
| 6 | |
| 7 | #include <dt-bindings/memory/stm32-sdram.h> |
| 8 | /{ |
| 9 | clocks { |
Simon Glass | d3a98cb | 2023-02-13 08:56:33 -0700 | [diff] [blame] | 10 | bootph-all; |
Patrice Chotard | cb1c938 | 2017-12-12 09:49:43 +0100 | [diff] [blame] | 11 | }; |
| 12 | |
| 13 | aliases { |
| 14 | /* Aliases for gpios so as to use sequence */ |
| 15 | gpio0 = &gpioa; |
| 16 | gpio1 = &gpiob; |
| 17 | gpio2 = &gpioc; |
| 18 | gpio3 = &gpiod; |
| 19 | gpio4 = &gpioe; |
| 20 | gpio5 = &gpiof; |
| 21 | gpio6 = &gpiog; |
| 22 | gpio7 = &gpioh; |
| 23 | gpio8 = &gpioi; |
| 24 | gpio9 = &gpioj; |
| 25 | gpio10 = &gpiok; |
Patrice Chotard | 265fa12 | 2019-04-30 16:08:06 +0200 | [diff] [blame] | 26 | spi0 = &qspi; |
Patrice Chotard | cb1c938 | 2017-12-12 09:49:43 +0100 | [diff] [blame] | 27 | }; |
| 28 | |
| 29 | soc { |
Simon Glass | d3a98cb | 2023-02-13 08:56:33 -0700 | [diff] [blame] | 30 | bootph-all; |
Patrice Chotard | cb1c938 | 2017-12-12 09:49:43 +0100 | [diff] [blame] | 31 | |
| 32 | fmc: fmc@A0000000 { |
| 33 | compatible = "st,stm32-fmc"; |
Patrice Chotard | 1bd7de8 | 2021-11-15 11:39:17 +0100 | [diff] [blame] | 34 | reg = <0xa0000000 0x1000>; |
Patrice Chotard | cb1c938 | 2017-12-12 09:49:43 +0100 | [diff] [blame] | 35 | clocks = <&rcc 0 STM32F4_AHB3_CLOCK(FMC)>; |
| 36 | st,syscfg = <&syscfg>; |
| 37 | pinctrl-0 = <&fmc_pins_d32>; |
| 38 | pinctrl-names = "default"; |
| 39 | st,mem_remap = <4>; |
Simon Glass | d3a98cb | 2023-02-13 08:56:33 -0700 | [diff] [blame] | 40 | bootph-all; |
Patrice Chotard | cb1c938 | 2017-12-12 09:49:43 +0100 | [diff] [blame] | 41 | |
| 42 | /* |
| 43 | * Memory configuration from sdram |
| 44 | * MICRON MT48LC4M32B2B5-6A |
| 45 | */ |
| 46 | bank0: bank@0 { |
| 47 | st,sdram-control = /bits/ 8 <NO_COL_8 |
| 48 | NO_ROW_12 |
| 49 | MWIDTH_32 |
| 50 | BANKS_4 |
| 51 | CAS_3 |
| 52 | SDCLK_2 |
| 53 | RD_BURST_EN |
| 54 | RD_PIPE_DL_0>; |
| 55 | st,sdram-timing = /bits/ 8 <TMRD_2 |
| 56 | TXSR_6 |
| 57 | TRAS_4 |
| 58 | TRC_6 |
| 59 | TWR_2 |
| 60 | TRP_2 |
| 61 | TRCD_2>; |
| 62 | st,sdram-refcount = < 1292 >; |
| 63 | }; |
| 64 | }; |
Patrice Chotard | 265fa12 | 2019-04-30 16:08:06 +0200 | [diff] [blame] | 65 | |
Patrice Chotard | 62f5616 | 2020-11-06 08:11:58 +0100 | [diff] [blame] | 66 | qspi: spi@A0001000 { |
Patrice Chotard | 482ab7a | 2019-06-28 15:02:59 +0200 | [diff] [blame] | 67 | compatible = "st,stm32f469-qspi"; |
Patrice Chotard | 265fa12 | 2019-04-30 16:08:06 +0200 | [diff] [blame] | 68 | #address-cells = <1>; |
| 69 | #size-cells = <0>; |
Patrice Chotard | 1bd7de8 | 2021-11-15 11:39:17 +0100 | [diff] [blame] | 70 | reg = <0xa0001000 0x1000>, <0x90000000 0x10000000>; |
Patrice Chotard | 265fa12 | 2019-04-30 16:08:06 +0200 | [diff] [blame] | 71 | reg-names = "qspi", "qspi_mm"; |
| 72 | interrupts = <91>; |
| 73 | spi-max-frequency = <108000000>; |
| 74 | clocks = <&rcc 0 STM32F4_AHB3_CLOCK(QSPI)>; |
| 75 | resets = <&rcc STM32F4_AHB3_RESET(QSPI)>; |
| 76 | pinctrl-0 = <&qspi_pins>; |
| 77 | }; |
Patrice Chotard | cb1c938 | 2017-12-12 09:49:43 +0100 | [diff] [blame] | 78 | }; |
| 79 | }; |
| 80 | |
| 81 | &clk_hse { |
Simon Glass | d3a98cb | 2023-02-13 08:56:33 -0700 | [diff] [blame] | 82 | bootph-all; |
Patrice Chotard | cb1c938 | 2017-12-12 09:49:43 +0100 | [diff] [blame] | 83 | }; |
| 84 | |
Patrice Chotard | cb1c938 | 2017-12-12 09:49:43 +0100 | [diff] [blame] | 85 | &clk_i2s_ckin { |
Simon Glass | d3a98cb | 2023-02-13 08:56:33 -0700 | [diff] [blame] | 86 | bootph-all; |
Patrice Chotard | cb1c938 | 2017-12-12 09:49:43 +0100 | [diff] [blame] | 87 | }; |
| 88 | |
Patrice Chotard | cfad126 | 2019-02-18 22:46:25 +0100 | [diff] [blame] | 89 | &clk_lse { |
Simon Glass | d3a98cb | 2023-02-13 08:56:33 -0700 | [diff] [blame] | 90 | bootph-all; |
Patrice Chotard | cb1c938 | 2017-12-12 09:49:43 +0100 | [diff] [blame] | 91 | }; |
| 92 | |
Dario Binacchi | c650e98 | 2023-12-11 23:05:53 +0100 | [diff] [blame] | 93 | &dsi { |
| 94 | clocks = <&rcc 0 STM32F4_APB2_CLOCK(DSI)>, |
Dario Binacchi | 2a3c2ea | 2023-12-11 23:05:54 +0100 | [diff] [blame] | 95 | <&rcc 0 STM32F4_APB2_CLOCK(LTDC)>, |
Dario Binacchi | c650e98 | 2023-12-11 23:05:53 +0100 | [diff] [blame] | 96 | <&clk_hse>; |
Dario Binacchi | 2a3c2ea | 2023-12-11 23:05:54 +0100 | [diff] [blame] | 97 | clock-names = "pclk", "px_clk", "ref"; |
Dario Binacchi | c650e98 | 2023-12-11 23:05:53 +0100 | [diff] [blame] | 98 | }; |
| 99 | |
Patrice Chotard | cb1c938 | 2017-12-12 09:49:43 +0100 | [diff] [blame] | 100 | &gpioa { |
Simon Glass | d3a98cb | 2023-02-13 08:56:33 -0700 | [diff] [blame] | 101 | bootph-all; |
Patrice Chotard | cb1c938 | 2017-12-12 09:49:43 +0100 | [diff] [blame] | 102 | }; |
| 103 | |
| 104 | &gpiob { |
Simon Glass | d3a98cb | 2023-02-13 08:56:33 -0700 | [diff] [blame] | 105 | bootph-all; |
Patrice Chotard | cb1c938 | 2017-12-12 09:49:43 +0100 | [diff] [blame] | 106 | }; |
| 107 | |
| 108 | &gpioc { |
Simon Glass | d3a98cb | 2023-02-13 08:56:33 -0700 | [diff] [blame] | 109 | bootph-all; |
Patrice Chotard | cb1c938 | 2017-12-12 09:49:43 +0100 | [diff] [blame] | 110 | }; |
| 111 | |
| 112 | &gpiod { |
Simon Glass | d3a98cb | 2023-02-13 08:56:33 -0700 | [diff] [blame] | 113 | bootph-all; |
Patrice Chotard | cb1c938 | 2017-12-12 09:49:43 +0100 | [diff] [blame] | 114 | }; |
| 115 | |
| 116 | &gpioe { |
Simon Glass | d3a98cb | 2023-02-13 08:56:33 -0700 | [diff] [blame] | 117 | bootph-all; |
Patrice Chotard | cb1c938 | 2017-12-12 09:49:43 +0100 | [diff] [blame] | 118 | }; |
| 119 | |
| 120 | &gpiof { |
Simon Glass | d3a98cb | 2023-02-13 08:56:33 -0700 | [diff] [blame] | 121 | bootph-all; |
Patrice Chotard | cb1c938 | 2017-12-12 09:49:43 +0100 | [diff] [blame] | 122 | }; |
| 123 | |
| 124 | &gpiog { |
Simon Glass | d3a98cb | 2023-02-13 08:56:33 -0700 | [diff] [blame] | 125 | bootph-all; |
Patrice Chotard | cb1c938 | 2017-12-12 09:49:43 +0100 | [diff] [blame] | 126 | }; |
| 127 | |
| 128 | &gpioh { |
Simon Glass | d3a98cb | 2023-02-13 08:56:33 -0700 | [diff] [blame] | 129 | bootph-all; |
Patrice Chotard | cb1c938 | 2017-12-12 09:49:43 +0100 | [diff] [blame] | 130 | }; |
| 131 | |
| 132 | &gpioi { |
Simon Glass | d3a98cb | 2023-02-13 08:56:33 -0700 | [diff] [blame] | 133 | bootph-all; |
Patrice Chotard | cb1c938 | 2017-12-12 09:49:43 +0100 | [diff] [blame] | 134 | }; |
| 135 | |
| 136 | &gpioj { |
Simon Glass | d3a98cb | 2023-02-13 08:56:33 -0700 | [diff] [blame] | 137 | bootph-all; |
Patrice Chotard | cb1c938 | 2017-12-12 09:49:43 +0100 | [diff] [blame] | 138 | }; |
| 139 | |
| 140 | &gpiok { |
Simon Glass | d3a98cb | 2023-02-13 08:56:33 -0700 | [diff] [blame] | 141 | bootph-all; |
Patrice Chotard | cb1c938 | 2017-12-12 09:49:43 +0100 | [diff] [blame] | 142 | }; |
| 143 | |
Dario Binacchi | d971e09 | 2023-12-11 23:05:52 +0100 | [diff] [blame] | 144 | <dc { |
Dario Binacchi | 2a3c2ea | 2023-12-11 23:05:54 +0100 | [diff] [blame] | 145 | bootph-all; |
| 146 | |
Dario Binacchi | d971e09 | 2023-12-11 23:05:52 +0100 | [diff] [blame] | 147 | clocks = <&rcc 0 STM32F4_APB2_CLOCK(LTDC)>; |
| 148 | }; |
| 149 | |
Patrice Chotard | cb1c938 | 2017-12-12 09:49:43 +0100 | [diff] [blame] | 150 | &pinctrl { |
Simon Glass | d3a98cb | 2023-02-13 08:56:33 -0700 | [diff] [blame] | 151 | bootph-all; |
Patrice Chotard | 8397532 | 2022-09-23 13:20:33 +0200 | [diff] [blame] | 152 | |
Patrice Chotard | cb1c938 | 2017-12-12 09:49:43 +0100 | [diff] [blame] | 153 | fmc_pins_d32: fmc_d32@0 { |
Simon Glass | d3a98cb | 2023-02-13 08:56:33 -0700 | [diff] [blame] | 154 | bootph-all; |
Patrice Chotard | cb1c938 | 2017-12-12 09:49:43 +0100 | [diff] [blame] | 155 | pins |
| 156 | { |
| 157 | pinmux = <STM32_PINMUX('I',10, AF12)>, /* D31 */ |
| 158 | <STM32_PINMUX('I', 9, AF12)>, /* D30 */ |
| 159 | <STM32_PINMUX('I', 7, AF12)>, /* D29 */ |
| 160 | <STM32_PINMUX('I', 6, AF12)>, /* D28 */ |
| 161 | <STM32_PINMUX('I', 3, AF12)>, /* D27 */ |
| 162 | <STM32_PINMUX('I', 2, AF12)>, /* D26 */ |
| 163 | <STM32_PINMUX('I', 1, AF12)>, /* D25 */ |
| 164 | <STM32_PINMUX('I', 0, AF12)>, /* D24 */ |
| 165 | <STM32_PINMUX('H',15, AF12)>, /* D23 */ |
| 166 | <STM32_PINMUX('H',14, AF12)>, /* D22 */ |
| 167 | <STM32_PINMUX('H',13, AF12)>, /* D21 */ |
| 168 | <STM32_PINMUX('H',12, AF12)>, /* D20 */ |
| 169 | <STM32_PINMUX('H',11, AF12)>, /* D19 */ |
| 170 | <STM32_PINMUX('H',10, AF12)>, /* D18 */ |
| 171 | <STM32_PINMUX('H', 9, AF12)>, /* D17 */ |
| 172 | <STM32_PINMUX('H', 8, AF12)>, /* D16 */ |
| 173 | |
| 174 | <STM32_PINMUX('D',10, AF12)>, /* D15 */ |
| 175 | <STM32_PINMUX('D', 9, AF12)>, /* D14 */ |
| 176 | <STM32_PINMUX('D', 8, AF12)>, /* D13 */ |
| 177 | <STM32_PINMUX('E',15, AF12)>, /* D12 */ |
| 178 | <STM32_PINMUX('E',14, AF12)>, /* D11 */ |
| 179 | <STM32_PINMUX('E',13, AF12)>, /* D10 */ |
| 180 | <STM32_PINMUX('E',12, AF12)>, /* D09 */ |
| 181 | <STM32_PINMUX('E',11, AF12)>, /* D08 */ |
| 182 | <STM32_PINMUX('E',10, AF12)>, /* D07 */ |
| 183 | <STM32_PINMUX('E', 9, AF12)>, /* D06 */ |
| 184 | <STM32_PINMUX('E', 8, AF12)>, /* D05 */ |
| 185 | <STM32_PINMUX('E', 7, AF12)>, /* D04 */ |
| 186 | <STM32_PINMUX('D', 1, AF12)>, /* D03 */ |
| 187 | <STM32_PINMUX('D', 0, AF12)>, /* D02 */ |
| 188 | <STM32_PINMUX('D',15, AF12)>, /* D01 */ |
| 189 | <STM32_PINMUX('D',14, AF12)>, /* D00 */ |
| 190 | |
| 191 | <STM32_PINMUX('E', 0, AF12)>, /* NBL0 */ |
| 192 | <STM32_PINMUX('E', 1, AF12)>, /* NBL1 */ |
| 193 | <STM32_PINMUX('I', 4, AF12)>, /* NBL2 */ |
| 194 | <STM32_PINMUX('I', 5, AF12)>, /* NBL3 */ |
| 195 | |
| 196 | <STM32_PINMUX('G', 5, AF12)>, /* BA1 */ |
| 197 | <STM32_PINMUX('G', 4, AF12)>, /* BA0 */ |
| 198 | |
| 199 | <STM32_PINMUX('G', 1, AF12)>, /* A11 */ |
| 200 | <STM32_PINMUX('G', 0, AF12)>, /* A10 */ |
| 201 | <STM32_PINMUX('F',15, AF12)>, /* A09 */ |
| 202 | <STM32_PINMUX('F',14, AF12)>, /* A08 */ |
| 203 | <STM32_PINMUX('F',13, AF12)>, /* A07 */ |
| 204 | <STM32_PINMUX('F',12, AF12)>, /* A06 */ |
| 205 | <STM32_PINMUX('F', 5, AF12)>, /* A05 */ |
| 206 | <STM32_PINMUX('F', 4, AF12)>, /* A04 */ |
| 207 | <STM32_PINMUX('F', 3, AF12)>, /* A03 */ |
| 208 | <STM32_PINMUX('F', 2, AF12)>, /* A02 */ |
| 209 | <STM32_PINMUX('F', 1, AF12)>, /* A01 */ |
| 210 | <STM32_PINMUX('F', 0, AF12)>, /* A00 */ |
| 211 | |
| 212 | <STM32_PINMUX('H', 3, AF12)>, /* SDNE0 */ |
| 213 | <STM32_PINMUX('C', 0, AF12)>, /* SDNWE */ |
| 214 | <STM32_PINMUX('F',11, AF12)>, /* SDNRAS */ |
| 215 | <STM32_PINMUX('G',15, AF12)>, /* SDNCAS */ |
| 216 | <STM32_PINMUX('H', 2, AF12)>, /* SDCKE0 */ |
| 217 | <STM32_PINMUX('G', 8, AF12)>; /* SDCLK> */ |
| 218 | slew-rate = <2>; |
Simon Glass | d3a98cb | 2023-02-13 08:56:33 -0700 | [diff] [blame] | 219 | bootph-all; |
Patrice Chotard | cb1c938 | 2017-12-12 09:49:43 +0100 | [diff] [blame] | 220 | }; |
| 221 | }; |
Patrice Chotard | cfad126 | 2019-02-18 22:46:25 +0100 | [diff] [blame] | 222 | |
Patrice Chotard | 265fa12 | 2019-04-30 16:08:06 +0200 | [diff] [blame] | 223 | qspi_pins: qspi@0 { |
| 224 | pins { |
| 225 | pinmux = <STM32_PINMUX('F',10, AF9)>, /* CLK */ |
| 226 | <STM32_PINMUX('B', 6, AF10)>, /* BK1_NCS */ |
| 227 | <STM32_PINMUX('F', 8, AF10)>, /* BK1_IO0 */ |
| 228 | <STM32_PINMUX('F', 9, AF10)>, /* BK1_IO1 */ |
| 229 | <STM32_PINMUX('F', 7, AF9)>, /* BK1_IO2 */ |
| 230 | <STM32_PINMUX('F', 6, AF9)>; /* BK1_IO3 */ |
| 231 | slew-rate = <2>; |
| 232 | }; |
| 233 | }; |
| 234 | |
Patrice Chotard | 62f5616 | 2020-11-06 08:11:58 +0100 | [diff] [blame] | 235 | usart3_pins_a: usart3-0 { |
Simon Glass | d3a98cb | 2023-02-13 08:56:33 -0700 | [diff] [blame] | 236 | bootph-all; |
Patrice Chotard | cfad126 | 2019-02-18 22:46:25 +0100 | [diff] [blame] | 237 | pins1 { |
Simon Glass | d3a98cb | 2023-02-13 08:56:33 -0700 | [diff] [blame] | 238 | bootph-all; |
Patrice Chotard | cfad126 | 2019-02-18 22:46:25 +0100 | [diff] [blame] | 239 | }; |
| 240 | pins2 { |
Simon Glass | d3a98cb | 2023-02-13 08:56:33 -0700 | [diff] [blame] | 241 | bootph-all; |
Patrice Chotard | cfad126 | 2019-02-18 22:46:25 +0100 | [diff] [blame] | 242 | }; |
| 243 | }; |
Patrice Chotard | cb1c938 | 2017-12-12 09:49:43 +0100 | [diff] [blame] | 244 | }; |
Patrice Chotard | cfad126 | 2019-02-18 22:46:25 +0100 | [diff] [blame] | 245 | |
| 246 | &pwrcfg { |
Simon Glass | d3a98cb | 2023-02-13 08:56:33 -0700 | [diff] [blame] | 247 | bootph-all; |
Patrice Chotard | cfad126 | 2019-02-18 22:46:25 +0100 | [diff] [blame] | 248 | }; |
| 249 | |
Patrice Chotard | 265fa12 | 2019-04-30 16:08:06 +0200 | [diff] [blame] | 250 | &qspi { |
Patrice Chotard | 1bd7de8 | 2021-11-15 11:39:17 +0100 | [diff] [blame] | 251 | reg = <0xa0001000 0x1000>, <0x90000000 0x1000000>; |
Patrice Chotard | 62f5616 | 2020-11-06 08:11:58 +0100 | [diff] [blame] | 252 | flash0: n25q128a@0 { |
Patrice Chotard | 265fa12 | 2019-04-30 16:08:06 +0200 | [diff] [blame] | 253 | #address-cells = <1>; |
| 254 | #size-cells = <1>; |
| 255 | compatible = "jedec,spi-nor"; |
| 256 | spi-max-frequency = <108000000>; |
| 257 | spi-tx-bus-width = <4>; |
| 258 | spi-rx-bus-width = <4>; |
| 259 | reg = <0>; |
| 260 | }; |
| 261 | }; |
Patrice Chotard | 8227081 | 2020-11-06 08:11:59 +0100 | [diff] [blame] | 262 | |
| 263 | &rcc { |
Simon Glass | d3a98cb | 2023-02-13 08:56:33 -0700 | [diff] [blame] | 264 | bootph-all; |
Patrice Chotard | 8227081 | 2020-11-06 08:11:59 +0100 | [diff] [blame] | 265 | }; |
| 266 | |
| 267 | &syscfg { |
Simon Glass | d3a98cb | 2023-02-13 08:56:33 -0700 | [diff] [blame] | 268 | bootph-all; |
Patrice Chotard | 8227081 | 2020-11-06 08:11:59 +0100 | [diff] [blame] | 269 | }; |
| 270 | |
Patrice Chotard | 8397532 | 2022-09-23 13:20:33 +0200 | [diff] [blame] | 271 | &timers5 { |
Simon Glass | d3a98cb | 2023-02-13 08:56:33 -0700 | [diff] [blame] | 272 | bootph-all; |
Patrice Chotard | 8227081 | 2020-11-06 08:11:59 +0100 | [diff] [blame] | 273 | }; |