Marek Vasut | 5ff0529 | 2020-01-24 18:39:16 +0100 | [diff] [blame] | 1 | // SPDX-License-Identifier: GPL-2.0+ OR BSD-3-Clause |
| 2 | /* |
| 3 | * Copyright (C) 2019 Marek Vasut <marex@denx.de> |
| 4 | */ |
| 5 | |
| 6 | #include <dt-bindings/clock/stm32mp1-clksrc.h> |
Patrick Delaunay | 48c5e90 | 2020-03-06 17:54:41 +0100 | [diff] [blame] | 7 | #include "stm32mp15-u-boot.dtsi" |
Marek Vasut | 272198e | 2020-04-29 15:08:38 +0200 | [diff] [blame] | 8 | #include "stm32mp15-ddr3-dhsom-2x1Gb-1066-binG.dtsi" |
| 9 | #include "stm32mp15-ddr3-dhsom-2x2Gb-1066-binG.dtsi" |
| 10 | #include "stm32mp15-ddr3-dhsom-2x4Gb-1066-binG.dtsi" |
Marek Vasut | 5ff0529 | 2020-01-24 18:39:16 +0100 | [diff] [blame] | 11 | |
Marek Vasut | 7d2757f | 2021-12-30 23:46:47 +0100 | [diff] [blame] | 12 | /delete-node/ &ksz8851; |
| 13 | |
Marek Vasut | 5ff0529 | 2020-01-24 18:39:16 +0100 | [diff] [blame] | 14 | / { |
| 15 | aliases { |
| 16 | i2c1 = &i2c2; |
| 17 | i2c3 = &i2c4; |
| 18 | i2c4 = &i2c5; |
| 19 | mmc0 = &sdmmc1; |
| 20 | mmc1 = &sdmmc2; |
| 21 | spi0 = &qspi; |
| 22 | usb0 = &usbotg_hs; |
Marek Vasut | 7d2757f | 2021-12-30 23:46:47 +0100 | [diff] [blame] | 23 | eeprom0 = &eeprom0; |
| 24 | ethernet1 = &ks8851; |
Marek Vasut | 5ff0529 | 2020-01-24 18:39:16 +0100 | [diff] [blame] | 25 | }; |
| 26 | |
| 27 | config { |
| 28 | u-boot,boot-led = "heartbeat"; |
| 29 | u-boot,error-led = "error"; |
| 30 | st,fastboot-gpios = <&gpioa 13 GPIO_ACTIVE_LOW>; |
| 31 | st,stm32prog-gpios = <&gpioa 14 GPIO_ACTIVE_LOW>; |
Marek Vasut | 47b98ba | 2020-04-22 13:18:11 +0200 | [diff] [blame] | 32 | dh,som-coding-gpios = <&gpiof 12 0>, <&gpiof 13 0>, <&gpiof 15 0>; |
Marek Vasut | 39221b5 | 2020-04-22 13:18:14 +0200 | [diff] [blame] | 33 | dh,ddr3-coding-gpios = <&gpioz 6 0>, <&gpioz 7 0>; |
Marek Vasut | 5ff0529 | 2020-01-24 18:39:16 +0100 | [diff] [blame] | 34 | }; |
| 35 | |
Marek Vasut | 0839ea9 | 2020-03-28 02:01:58 +0100 | [diff] [blame] | 36 | /* This is actually on FMC2, but we do not have bus driver for that */ |
Marek Vasut | 7d2757f | 2021-12-30 23:46:47 +0100 | [diff] [blame] | 37 | ks8851: ks8851mll@64000000 { |
Marek Vasut | 0839ea9 | 2020-03-28 02:01:58 +0100 | [diff] [blame] | 38 | compatible = "micrel,ks8851-mll"; |
| 39 | reg = <0x64000000 0x20000>; |
| 40 | }; |
Marek Vasut | 5ff0529 | 2020-01-24 18:39:16 +0100 | [diff] [blame] | 41 | }; |
| 42 | |
Marek Vasut | 7d2757f | 2021-12-30 23:46:47 +0100 | [diff] [blame] | 43 | ðernet0 { |
| 44 | phy-reset-gpios = <&gpioh 3 GPIO_ACTIVE_LOW>; |
| 45 | /delete-property/ st,eth-ref-clk-sel; |
| 46 | }; |
| 47 | |
| 48 | ðernet0_rmii_pins_a { |
| 49 | pins1 { |
| 50 | pinmux = <STM32_PINMUX('G', 13, AF11)>, /* ETH1_RMII_TXD0 */ |
| 51 | <STM32_PINMUX('G', 14, AF11)>, /* ETH1_RMII_TXD1 */ |
| 52 | <STM32_PINMUX('B', 11, AF11)>, /* ETH1_RMII_TX_EN */ |
| 53 | <STM32_PINMUX('A', 1, AF11)>, /* ETH1_RMII_REF_CLK */ |
| 54 | <STM32_PINMUX('A', 2, AF11)>, /* ETH1_MDIO */ |
| 55 | <STM32_PINMUX('C', 1, AF11)>; /* ETH1_MDC */ |
| 56 | }; |
| 57 | }; |
| 58 | |
Marek Vasut | 5ff0529 | 2020-01-24 18:39:16 +0100 | [diff] [blame] | 59 | &i2c4 { |
| 60 | u-boot,dm-pre-reloc; |
Marek Vasut | 8b64230 | 2022-03-14 13:35:54 +0100 | [diff] [blame] | 61 | u-boot,dm-spl; |
Marek Vasut | 7d2757f | 2021-12-30 23:46:47 +0100 | [diff] [blame] | 62 | |
| 63 | eeprom0: eeprom@50 { |
| 64 | }; |
Marek Vasut | 5ff0529 | 2020-01-24 18:39:16 +0100 | [diff] [blame] | 65 | }; |
| 66 | |
| 67 | &i2c4_pins_a { |
| 68 | u-boot,dm-pre-reloc; |
| 69 | pins { |
| 70 | u-boot,dm-pre-reloc; |
| 71 | }; |
| 72 | }; |
| 73 | |
Marek Vasut | 7d2757f | 2021-12-30 23:46:47 +0100 | [diff] [blame] | 74 | &phy0 { |
| 75 | /delete-property/ reset-gpios; |
| 76 | }; |
| 77 | |
Marek Vasut | 0839ea9 | 2020-03-28 02:01:58 +0100 | [diff] [blame] | 78 | &pinctrl { |
| 79 | /* These should bound to FMC2 bus driver, but we do not have one */ |
Marek Vasut | ccfcde3 | 2020-12-01 11:34:48 +0100 | [diff] [blame] | 80 | pinctrl-0 = <&fmc_pins_b &mco2_pins_a>; |
| 81 | pinctrl-1 = <&fmc_sleep_pins_b &mco2_sleep_pins_a>; |
Marek Vasut | 0839ea9 | 2020-03-28 02:01:58 +0100 | [diff] [blame] | 82 | pinctrl-names = "default", "sleep"; |
| 83 | |
Marek Vasut | ccfcde3 | 2020-12-01 11:34:48 +0100 | [diff] [blame] | 84 | mco2_pins_a: mco2-0 { |
| 85 | pins { |
| 86 | pinmux = <STM32_PINMUX('G', 2, AF1)>; /* MCO2 */ |
| 87 | bias-disable; |
| 88 | drive-push-pull; |
| 89 | slew-rate = <2>; |
| 90 | }; |
| 91 | }; |
| 92 | |
| 93 | mco2_sleep_pins_a: mco2-sleep-0 { |
| 94 | pins { |
| 95 | pinmux = <STM32_PINMUX('G', 2, ANALOG)>; /* MCO2 */ |
| 96 | }; |
| 97 | }; |
Marek Vasut | 0839ea9 | 2020-03-28 02:01:58 +0100 | [diff] [blame] | 98 | }; |
| 99 | |
Marek Vasut | 5ff0529 | 2020-01-24 18:39:16 +0100 | [diff] [blame] | 100 | &pmic { |
| 101 | u-boot,dm-pre-reloc; |
Marek Vasut | 8b64230 | 2022-03-14 13:35:54 +0100 | [diff] [blame] | 102 | u-boot,dm-spl; |
| 103 | |
| 104 | regulators { |
| 105 | u-boot,dm-spl; |
| 106 | }; |
Marek Vasut | 5ff0529 | 2020-01-24 18:39:16 +0100 | [diff] [blame] | 107 | }; |
| 108 | |
| 109 | &flash0 { |
| 110 | u-boot,dm-spl; |
| 111 | }; |
| 112 | |
| 113 | &qspi { |
| 114 | u-boot,dm-spl; |
| 115 | }; |
| 116 | |
| 117 | &qspi_clk_pins_a { |
| 118 | u-boot,dm-spl; |
| 119 | pins { |
| 120 | u-boot,dm-spl; |
| 121 | }; |
| 122 | }; |
| 123 | |
| 124 | &qspi_bk1_pins_a { |
| 125 | u-boot,dm-spl; |
| 126 | pins1 { |
| 127 | u-boot,dm-spl; |
| 128 | }; |
| 129 | pins2 { |
| 130 | u-boot,dm-spl; |
| 131 | }; |
| 132 | }; |
| 133 | |
| 134 | &qspi_bk2_pins_a { |
| 135 | u-boot,dm-spl; |
| 136 | pins1 { |
| 137 | u-boot,dm-spl; |
| 138 | }; |
| 139 | pins2 { |
| 140 | u-boot,dm-spl; |
| 141 | }; |
| 142 | }; |
| 143 | |
| 144 | &rcc { |
| 145 | st,clksrc = < |
| 146 | CLK_MPU_PLL1P |
| 147 | CLK_AXI_PLL2P |
| 148 | CLK_MCU_PLL3P |
| 149 | CLK_PLL12_HSE |
| 150 | CLK_PLL3_HSE |
| 151 | CLK_PLL4_HSE |
| 152 | CLK_RTC_LSE |
| 153 | CLK_MCO1_DISABLED |
Marek Vasut | ccfcde3 | 2020-12-01 11:34:48 +0100 | [diff] [blame] | 154 | CLK_MCO2_PLL4P |
Marek Vasut | 5ff0529 | 2020-01-24 18:39:16 +0100 | [diff] [blame] | 155 | >; |
| 156 | |
| 157 | st,clkdiv = < |
| 158 | 1 /*MPU*/ |
| 159 | 0 /*AXI*/ |
| 160 | 0 /*MCU*/ |
| 161 | 1 /*APB1*/ |
| 162 | 1 /*APB2*/ |
| 163 | 1 /*APB3*/ |
| 164 | 1 /*APB4*/ |
| 165 | 2 /*APB5*/ |
| 166 | 23 /*RTC*/ |
| 167 | 0 /*MCO1*/ |
Marek Vasut | ccfcde3 | 2020-12-01 11:34:48 +0100 | [diff] [blame] | 168 | 1 /*MCO2*/ |
Marek Vasut | 5ff0529 | 2020-01-24 18:39:16 +0100 | [diff] [blame] | 169 | >; |
| 170 | |
| 171 | st,pkcs = < |
| 172 | CLK_CKPER_HSE |
| 173 | CLK_FMC_ACLK |
| 174 | CLK_QSPI_ACLK |
| 175 | CLK_ETH_PLL4P |
| 176 | CLK_SDMMC12_PLL4P |
| 177 | CLK_DSI_DSIPLL |
| 178 | CLK_STGEN_HSE |
| 179 | CLK_USBPHY_HSE |
| 180 | CLK_SPI2S1_PLL3Q |
| 181 | CLK_SPI2S23_PLL3Q |
| 182 | CLK_SPI45_HSI |
| 183 | CLK_SPI6_HSI |
| 184 | CLK_I2C46_HSI |
| 185 | CLK_SDMMC3_PLL4P |
| 186 | CLK_USBO_USBPHY |
| 187 | CLK_ADC_CKPER |
| 188 | CLK_CEC_LSE |
| 189 | CLK_I2C12_HSI |
| 190 | CLK_I2C35_HSI |
| 191 | CLK_UART1_HSI |
| 192 | CLK_UART24_HSI |
| 193 | CLK_UART35_HSI |
| 194 | CLK_UART6_HSI |
| 195 | CLK_UART78_HSI |
| 196 | CLK_SPDIF_PLL4P |
Antonio Borneo | 84159e8 | 2020-01-28 10:11:01 +0100 | [diff] [blame] | 197 | CLK_FDCAN_PLL4R |
Marek Vasut | 5ff0529 | 2020-01-24 18:39:16 +0100 | [diff] [blame] | 198 | CLK_SAI1_PLL3Q |
| 199 | CLK_SAI2_PLL3Q |
| 200 | CLK_SAI3_PLL3Q |
| 201 | CLK_SAI4_PLL3Q |
| 202 | CLK_RNG1_LSI |
| 203 | CLK_RNG2_LSI |
| 204 | CLK_LPTIM1_PCLK1 |
| 205 | CLK_LPTIM23_PCLK3 |
| 206 | CLK_LPTIM45_LSE |
| 207 | >; |
| 208 | |
Marek Vasut | 5ff0529 | 2020-01-24 18:39:16 +0100 | [diff] [blame] | 209 | /* VCO = 1066.0 MHz => P = 266 (AXI), Q = 533 (GPU), R = 533 (DDR) */ |
| 210 | pll2: st,pll@1 { |
Patrick Delaunay | c22caac | 2020-01-28 10:11:03 +0100 | [diff] [blame] | 211 | compatible = "st,stm32mp1-pll"; |
| 212 | reg = <1>; |
Marek Vasut | 5ff0529 | 2020-01-24 18:39:16 +0100 | [diff] [blame] | 213 | cfg = < 2 65 1 0 0 PQR(1,1,1) >; |
| 214 | frac = < 0x1400 >; |
| 215 | u-boot,dm-pre-reloc; |
| 216 | }; |
| 217 | |
| 218 | /* VCO = 417.8 MHz => P = 209, Q = 24, R = 11 */ |
| 219 | pll3: st,pll@2 { |
Patrick Delaunay | c22caac | 2020-01-28 10:11:03 +0100 | [diff] [blame] | 220 | compatible = "st,stm32mp1-pll"; |
| 221 | reg = <2>; |
Marek Vasut | 5ff0529 | 2020-01-24 18:39:16 +0100 | [diff] [blame] | 222 | cfg = < 1 33 1 16 36 PQR(1,1,1) >; |
| 223 | frac = < 0x1a04 >; |
| 224 | u-boot,dm-pre-reloc; |
| 225 | }; |
| 226 | |
| 227 | /* VCO = 600.0 MHz => P = 50, Q = 50, R = 50 */ |
| 228 | pll4: st,pll@3 { |
Patrick Delaunay | c22caac | 2020-01-28 10:11:03 +0100 | [diff] [blame] | 229 | compatible = "st,stm32mp1-pll"; |
| 230 | reg = <3>; |
Marek Vasut | ccfcde3 | 2020-12-01 11:34:48 +0100 | [diff] [blame] | 231 | cfg = < 1 49 5 11 11 PQR(1,1,1) >; |
Marek Vasut | 5ff0529 | 2020-01-24 18:39:16 +0100 | [diff] [blame] | 232 | u-boot,dm-pre-reloc; |
| 233 | }; |
| 234 | }; |
| 235 | |
| 236 | &sdmmc1 { |
| 237 | u-boot,dm-spl; |
Marek Vasut | 5f5ce60 | 2021-11-13 03:29:44 +0100 | [diff] [blame] | 238 | st,use-ckin; |
| 239 | st,cmd-gpios = <&gpiod 2 0>; |
| 240 | st,ck-gpios = <&gpioc 12 0>; |
| 241 | st,ckin-gpios = <&gpioe 4 0>; |
Marek Vasut | 5ff0529 | 2020-01-24 18:39:16 +0100 | [diff] [blame] | 242 | }; |
| 243 | |
| 244 | &sdmmc1_b4_pins_a { |
| 245 | u-boot,dm-spl; |
Patrick Delaunay | 48c5e90 | 2020-03-06 17:54:41 +0100 | [diff] [blame] | 246 | pins1 { |
| 247 | u-boot,dm-spl; |
| 248 | }; |
| 249 | pins2 { |
Marek Vasut | 5ff0529 | 2020-01-24 18:39:16 +0100 | [diff] [blame] | 250 | u-boot,dm-spl; |
| 251 | }; |
| 252 | }; |
| 253 | |
| 254 | &sdmmc1_dir_pins_a { |
| 255 | u-boot,dm-spl; |
| 256 | pins1 { |
| 257 | u-boot,dm-spl; |
| 258 | }; |
| 259 | pins2 { |
| 260 | u-boot,dm-spl; |
| 261 | }; |
| 262 | }; |
| 263 | |
| 264 | &sdmmc2 { |
| 265 | u-boot,dm-spl; |
| 266 | }; |
| 267 | |
| 268 | &sdmmc2_b4_pins_a { |
| 269 | u-boot,dm-spl; |
| 270 | pins { |
| 271 | u-boot,dm-spl; |
| 272 | }; |
| 273 | }; |
| 274 | |
| 275 | &sdmmc2_d47_pins_a { |
| 276 | u-boot,dm-spl; |
| 277 | pins { |
| 278 | u-boot,dm-spl; |
| 279 | }; |
| 280 | }; |
| 281 | |
| 282 | &uart4 { |
| 283 | u-boot,dm-pre-reloc; |
| 284 | }; |
| 285 | |
| 286 | &uart4_pins_a { |
| 287 | u-boot,dm-pre-reloc; |
| 288 | pins1 { |
| 289 | u-boot,dm-pre-reloc; |
| 290 | }; |
| 291 | pins2 { |
| 292 | u-boot,dm-pre-reloc; |
| 293 | /* pull-up on rx to avoid floating level */ |
| 294 | bias-pull-up; |
| 295 | }; |
| 296 | }; |
Marek Vasut | 8b64230 | 2022-03-14 13:35:54 +0100 | [diff] [blame] | 297 | |
| 298 | ®11 { |
| 299 | u-boot,dm-spl; |
| 300 | }; |
| 301 | |
| 302 | ®18 { |
| 303 | u-boot,dm-spl; |
| 304 | }; |
| 305 | |
| 306 | &usb33 { |
| 307 | u-boot,dm-spl; |
| 308 | }; |
| 309 | |
| 310 | &usbotg_hs_pins_a { |
| 311 | u-boot,dm-spl; |
| 312 | }; |
| 313 | |
| 314 | &usbotg_hs { |
| 315 | u-boot,dm-spl; |
| 316 | }; |
| 317 | |
| 318 | &usbphyc { |
| 319 | u-boot,dm-spl; |
| 320 | }; |
| 321 | |
| 322 | &usbphyc_port0 { |
| 323 | u-boot,dm-spl; |
| 324 | }; |
| 325 | |
| 326 | &usbphyc_port1 { |
| 327 | u-boot,dm-spl; |
| 328 | }; |
| 329 | |
| 330 | &vdd_usb { |
| 331 | u-boot,dm-spl; |
| 332 | }; |