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