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 | |
| 93 | &gpioa { |
Simon Glass | d3a98cb | 2023-02-13 08:56:33 -0700 | [diff] [blame] | 94 | bootph-all; |
Patrice Chotard | cb1c938 | 2017-12-12 09:49:43 +0100 | [diff] [blame] | 95 | }; |
| 96 | |
| 97 | &gpiob { |
Simon Glass | d3a98cb | 2023-02-13 08:56:33 -0700 | [diff] [blame] | 98 | bootph-all; |
Patrice Chotard | cb1c938 | 2017-12-12 09:49:43 +0100 | [diff] [blame] | 99 | }; |
| 100 | |
| 101 | &gpioc { |
Simon Glass | d3a98cb | 2023-02-13 08:56:33 -0700 | [diff] [blame] | 102 | bootph-all; |
Patrice Chotard | cb1c938 | 2017-12-12 09:49:43 +0100 | [diff] [blame] | 103 | }; |
| 104 | |
| 105 | &gpiod { |
Simon Glass | d3a98cb | 2023-02-13 08:56:33 -0700 | [diff] [blame] | 106 | bootph-all; |
Patrice Chotard | cb1c938 | 2017-12-12 09:49:43 +0100 | [diff] [blame] | 107 | }; |
| 108 | |
| 109 | &gpioe { |
Simon Glass | d3a98cb | 2023-02-13 08:56:33 -0700 | [diff] [blame] | 110 | bootph-all; |
Patrice Chotard | cb1c938 | 2017-12-12 09:49:43 +0100 | [diff] [blame] | 111 | }; |
| 112 | |
| 113 | &gpiof { |
Simon Glass | d3a98cb | 2023-02-13 08:56:33 -0700 | [diff] [blame] | 114 | bootph-all; |
Patrice Chotard | cb1c938 | 2017-12-12 09:49:43 +0100 | [diff] [blame] | 115 | }; |
| 116 | |
| 117 | &gpiog { |
Simon Glass | d3a98cb | 2023-02-13 08:56:33 -0700 | [diff] [blame] | 118 | bootph-all; |
Patrice Chotard | cb1c938 | 2017-12-12 09:49:43 +0100 | [diff] [blame] | 119 | }; |
| 120 | |
| 121 | &gpioh { |
Simon Glass | d3a98cb | 2023-02-13 08:56:33 -0700 | [diff] [blame] | 122 | bootph-all; |
Patrice Chotard | cb1c938 | 2017-12-12 09:49:43 +0100 | [diff] [blame] | 123 | }; |
| 124 | |
| 125 | &gpioi { |
Simon Glass | d3a98cb | 2023-02-13 08:56:33 -0700 | [diff] [blame] | 126 | bootph-all; |
Patrice Chotard | cb1c938 | 2017-12-12 09:49:43 +0100 | [diff] [blame] | 127 | }; |
| 128 | |
| 129 | &gpioj { |
Simon Glass | d3a98cb | 2023-02-13 08:56:33 -0700 | [diff] [blame] | 130 | bootph-all; |
Patrice Chotard | cb1c938 | 2017-12-12 09:49:43 +0100 | [diff] [blame] | 131 | }; |
| 132 | |
| 133 | &gpiok { |
Simon Glass | d3a98cb | 2023-02-13 08:56:33 -0700 | [diff] [blame] | 134 | bootph-all; |
Patrice Chotard | cb1c938 | 2017-12-12 09:49:43 +0100 | [diff] [blame] | 135 | }; |
| 136 | |
| 137 | &pinctrl { |
Simon Glass | d3a98cb | 2023-02-13 08:56:33 -0700 | [diff] [blame] | 138 | bootph-all; |
Patrice Chotard | 8397532 | 2022-09-23 13:20:33 +0200 | [diff] [blame] | 139 | |
Patrice Chotard | cb1c938 | 2017-12-12 09:49:43 +0100 | [diff] [blame] | 140 | fmc_pins_d32: fmc_d32@0 { |
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 | pins |
| 143 | { |
| 144 | pinmux = <STM32_PINMUX('I',10, AF12)>, /* D31 */ |
| 145 | <STM32_PINMUX('I', 9, AF12)>, /* D30 */ |
| 146 | <STM32_PINMUX('I', 7, AF12)>, /* D29 */ |
| 147 | <STM32_PINMUX('I', 6, AF12)>, /* D28 */ |
| 148 | <STM32_PINMUX('I', 3, AF12)>, /* D27 */ |
| 149 | <STM32_PINMUX('I', 2, AF12)>, /* D26 */ |
| 150 | <STM32_PINMUX('I', 1, AF12)>, /* D25 */ |
| 151 | <STM32_PINMUX('I', 0, AF12)>, /* D24 */ |
| 152 | <STM32_PINMUX('H',15, AF12)>, /* D23 */ |
| 153 | <STM32_PINMUX('H',14, AF12)>, /* D22 */ |
| 154 | <STM32_PINMUX('H',13, AF12)>, /* D21 */ |
| 155 | <STM32_PINMUX('H',12, AF12)>, /* D20 */ |
| 156 | <STM32_PINMUX('H',11, AF12)>, /* D19 */ |
| 157 | <STM32_PINMUX('H',10, AF12)>, /* D18 */ |
| 158 | <STM32_PINMUX('H', 9, AF12)>, /* D17 */ |
| 159 | <STM32_PINMUX('H', 8, AF12)>, /* D16 */ |
| 160 | |
| 161 | <STM32_PINMUX('D',10, AF12)>, /* D15 */ |
| 162 | <STM32_PINMUX('D', 9, AF12)>, /* D14 */ |
| 163 | <STM32_PINMUX('D', 8, AF12)>, /* D13 */ |
| 164 | <STM32_PINMUX('E',15, AF12)>, /* D12 */ |
| 165 | <STM32_PINMUX('E',14, AF12)>, /* D11 */ |
| 166 | <STM32_PINMUX('E',13, AF12)>, /* D10 */ |
| 167 | <STM32_PINMUX('E',12, AF12)>, /* D09 */ |
| 168 | <STM32_PINMUX('E',11, AF12)>, /* D08 */ |
| 169 | <STM32_PINMUX('E',10, AF12)>, /* D07 */ |
| 170 | <STM32_PINMUX('E', 9, AF12)>, /* D06 */ |
| 171 | <STM32_PINMUX('E', 8, AF12)>, /* D05 */ |
| 172 | <STM32_PINMUX('E', 7, AF12)>, /* D04 */ |
| 173 | <STM32_PINMUX('D', 1, AF12)>, /* D03 */ |
| 174 | <STM32_PINMUX('D', 0, AF12)>, /* D02 */ |
| 175 | <STM32_PINMUX('D',15, AF12)>, /* D01 */ |
| 176 | <STM32_PINMUX('D',14, AF12)>, /* D00 */ |
| 177 | |
| 178 | <STM32_PINMUX('E', 0, AF12)>, /* NBL0 */ |
| 179 | <STM32_PINMUX('E', 1, AF12)>, /* NBL1 */ |
| 180 | <STM32_PINMUX('I', 4, AF12)>, /* NBL2 */ |
| 181 | <STM32_PINMUX('I', 5, AF12)>, /* NBL3 */ |
| 182 | |
| 183 | <STM32_PINMUX('G', 5, AF12)>, /* BA1 */ |
| 184 | <STM32_PINMUX('G', 4, AF12)>, /* BA0 */ |
| 185 | |
| 186 | <STM32_PINMUX('G', 1, AF12)>, /* A11 */ |
| 187 | <STM32_PINMUX('G', 0, AF12)>, /* A10 */ |
| 188 | <STM32_PINMUX('F',15, AF12)>, /* A09 */ |
| 189 | <STM32_PINMUX('F',14, AF12)>, /* A08 */ |
| 190 | <STM32_PINMUX('F',13, AF12)>, /* A07 */ |
| 191 | <STM32_PINMUX('F',12, AF12)>, /* A06 */ |
| 192 | <STM32_PINMUX('F', 5, AF12)>, /* A05 */ |
| 193 | <STM32_PINMUX('F', 4, AF12)>, /* A04 */ |
| 194 | <STM32_PINMUX('F', 3, AF12)>, /* A03 */ |
| 195 | <STM32_PINMUX('F', 2, AF12)>, /* A02 */ |
| 196 | <STM32_PINMUX('F', 1, AF12)>, /* A01 */ |
| 197 | <STM32_PINMUX('F', 0, AF12)>, /* A00 */ |
| 198 | |
| 199 | <STM32_PINMUX('H', 3, AF12)>, /* SDNE0 */ |
| 200 | <STM32_PINMUX('C', 0, AF12)>, /* SDNWE */ |
| 201 | <STM32_PINMUX('F',11, AF12)>, /* SDNRAS */ |
| 202 | <STM32_PINMUX('G',15, AF12)>, /* SDNCAS */ |
| 203 | <STM32_PINMUX('H', 2, AF12)>, /* SDCKE0 */ |
| 204 | <STM32_PINMUX('G', 8, AF12)>; /* SDCLK> */ |
| 205 | slew-rate = <2>; |
Simon Glass | d3a98cb | 2023-02-13 08:56:33 -0700 | [diff] [blame] | 206 | bootph-all; |
Patrice Chotard | cb1c938 | 2017-12-12 09:49:43 +0100 | [diff] [blame] | 207 | }; |
| 208 | }; |
Patrice Chotard | cfad126 | 2019-02-18 22:46:25 +0100 | [diff] [blame] | 209 | |
Patrice Chotard | 265fa12 | 2019-04-30 16:08:06 +0200 | [diff] [blame] | 210 | qspi_pins: qspi@0 { |
| 211 | pins { |
| 212 | pinmux = <STM32_PINMUX('F',10, AF9)>, /* CLK */ |
| 213 | <STM32_PINMUX('B', 6, AF10)>, /* BK1_NCS */ |
| 214 | <STM32_PINMUX('F', 8, AF10)>, /* BK1_IO0 */ |
| 215 | <STM32_PINMUX('F', 9, AF10)>, /* BK1_IO1 */ |
| 216 | <STM32_PINMUX('F', 7, AF9)>, /* BK1_IO2 */ |
| 217 | <STM32_PINMUX('F', 6, AF9)>; /* BK1_IO3 */ |
| 218 | slew-rate = <2>; |
| 219 | }; |
| 220 | }; |
| 221 | |
Patrice Chotard | 62f5616 | 2020-11-06 08:11:58 +0100 | [diff] [blame] | 222 | usart3_pins_a: usart3-0 { |
Simon Glass | d3a98cb | 2023-02-13 08:56:33 -0700 | [diff] [blame] | 223 | bootph-all; |
Patrice Chotard | cfad126 | 2019-02-18 22:46:25 +0100 | [diff] [blame] | 224 | pins1 { |
Simon Glass | d3a98cb | 2023-02-13 08:56:33 -0700 | [diff] [blame] | 225 | bootph-all; |
Patrice Chotard | cfad126 | 2019-02-18 22:46:25 +0100 | [diff] [blame] | 226 | }; |
| 227 | pins2 { |
Simon Glass | d3a98cb | 2023-02-13 08:56:33 -0700 | [diff] [blame] | 228 | bootph-all; |
Patrice Chotard | cfad126 | 2019-02-18 22:46:25 +0100 | [diff] [blame] | 229 | }; |
| 230 | }; |
Patrice Chotard | cb1c938 | 2017-12-12 09:49:43 +0100 | [diff] [blame] | 231 | }; |
Patrice Chotard | cfad126 | 2019-02-18 22:46:25 +0100 | [diff] [blame] | 232 | |
| 233 | &pwrcfg { |
Simon Glass | d3a98cb | 2023-02-13 08:56:33 -0700 | [diff] [blame] | 234 | bootph-all; |
Patrice Chotard | cfad126 | 2019-02-18 22:46:25 +0100 | [diff] [blame] | 235 | }; |
| 236 | |
Patrice Chotard | 265fa12 | 2019-04-30 16:08:06 +0200 | [diff] [blame] | 237 | &qspi { |
Patrice Chotard | 1bd7de8 | 2021-11-15 11:39:17 +0100 | [diff] [blame] | 238 | reg = <0xa0001000 0x1000>, <0x90000000 0x1000000>; |
Patrice Chotard | 62f5616 | 2020-11-06 08:11:58 +0100 | [diff] [blame] | 239 | flash0: n25q128a@0 { |
Patrice Chotard | 265fa12 | 2019-04-30 16:08:06 +0200 | [diff] [blame] | 240 | #address-cells = <1>; |
| 241 | #size-cells = <1>; |
| 242 | compatible = "jedec,spi-nor"; |
| 243 | spi-max-frequency = <108000000>; |
| 244 | spi-tx-bus-width = <4>; |
| 245 | spi-rx-bus-width = <4>; |
| 246 | reg = <0>; |
| 247 | }; |
| 248 | }; |
Patrice Chotard | 8227081 | 2020-11-06 08:11:59 +0100 | [diff] [blame] | 249 | |
| 250 | &rcc { |
Simon Glass | d3a98cb | 2023-02-13 08:56:33 -0700 | [diff] [blame] | 251 | bootph-all; |
Patrice Chotard | 8227081 | 2020-11-06 08:11:59 +0100 | [diff] [blame] | 252 | }; |
| 253 | |
| 254 | &syscfg { |
Simon Glass | d3a98cb | 2023-02-13 08:56:33 -0700 | [diff] [blame] | 255 | bootph-all; |
Patrice Chotard | 8227081 | 2020-11-06 08:11:59 +0100 | [diff] [blame] | 256 | }; |
| 257 | |
Patrice Chotard | 8397532 | 2022-09-23 13:20:33 +0200 | [diff] [blame] | 258 | &timers5 { |
Simon Glass | d3a98cb | 2023-02-13 08:56:33 -0700 | [diff] [blame] | 259 | bootph-all; |
Patrice Chotard | 8227081 | 2020-11-06 08:11:59 +0100 | [diff] [blame] | 260 | }; |