Tom Rini | 8b0c8a1 | 2018-05-06 18:27:01 -0400 | [diff] [blame] | 1 | // SPDX-License-Identifier: GPL-2.0+ OR BSD-3-Clause |
Patrick Delaunay | 06020d8 | 2018-03-12 10:46:17 +0100 | [diff] [blame] | 2 | /* |
| 3 | * Copyright : STMicroelectronics 2018 |
Patrick Delaunay | 06020d8 | 2018-03-12 10:46:17 +0100 | [diff] [blame] | 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" |
Patrick Delaunay | 06020d8 | 2018-03-12 10:46:17 +0100 | [diff] [blame] | 8 | #include "stm32mp15-ddr3-2x4Gb-1066-binG.dtsi" |
| 9 | |
| 10 | / { |
| 11 | aliases { |
Patrice Chotard | 00442d0 | 2019-02-12 16:50:38 +0100 | [diff] [blame] | 12 | i2c3 = &i2c4; |
Patrick Delaunay | 06020d8 | 2018-03-12 10:46:17 +0100 | [diff] [blame] | 13 | }; |
Patrick Delaunay | 1d6fa27 | 2018-07-27 16:37:05 +0200 | [diff] [blame] | 14 | |
Patrick Delaunay | 008d3c3 | 2019-02-27 17:01:20 +0100 | [diff] [blame] | 15 | config { |
Patrick Delaunay | ae0931d0 | 2019-07-30 19:16:39 +0200 | [diff] [blame] | 16 | u-boot,boot-led = "heartbeat"; |
| 17 | u-boot,error-led = "error"; |
Patrick Delaunay | 9c88dbf | 2021-07-26 11:21:36 +0200 | [diff] [blame] | 18 | u-boot,mmc-env-partition = "fip"; |
Patrick Delaunay | 466d3af | 2021-07-09 09:53:37 +0200 | [diff] [blame] | 19 | st,fastboot-gpios = <&gpioa 13 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; |
| 20 | st,stm32prog-gpios = <&gpioa 14 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; |
Patrick Delaunay | 008d3c3 | 2019-02-27 17:01:20 +0100 | [diff] [blame] | 21 | }; |
| 22 | |
Patrick Delaunay | 4c6fcbc | 2024-01-15 15:05:57 +0100 | [diff] [blame] | 23 | #if defined(CONFIG_STM32MP15X_STM32IMAGE) || defined(CONFIG_SPL) |
Patrick Delaunay | 9c88dbf | 2021-07-26 11:21:36 +0200 | [diff] [blame] | 24 | config { |
| 25 | u-boot,mmc-env-partition = "ssbl"; |
| 26 | }; |
Patrick Delaunay | 87e8332 | 2021-09-14 14:14:52 +0200 | [diff] [blame] | 27 | #endif |
Patrick Delaunay | 9c88dbf | 2021-07-26 11:21:36 +0200 | [diff] [blame] | 28 | |
Patrick Delaunay | 4c6fcbc | 2024-01-15 15:05:57 +0100 | [diff] [blame] | 29 | #ifdef CONFIG_STM32MP15X_STM32IMAGE |
Patrick Delaunay | f8fcabf | 2021-07-26 11:21:35 +0200 | [diff] [blame] | 30 | /* only needed for boot with TF-A, witout FIP support */ |
Etienne Carriere | c461e1a | 2020-06-05 09:24:30 +0200 | [diff] [blame] | 31 | firmware { |
| 32 | optee { |
| 33 | compatible = "linaro,optee-tz"; |
| 34 | method = "smc"; |
| 35 | }; |
| 36 | }; |
| 37 | |
| 38 | reserved-memory { |
| 39 | optee@fe000000 { |
| 40 | reg = <0xfe000000 0x02000000>; |
| 41 | no-map; |
| 42 | }; |
| 43 | }; |
Patrick Delaunay | f8fcabf | 2021-07-26 11:21:35 +0200 | [diff] [blame] | 44 | #endif |
Etienne Carriere | c461e1a | 2020-06-05 09:24:30 +0200 | [diff] [blame] | 45 | |
Patrick Delaunay | 1d6fa27 | 2018-07-27 16:37:05 +0200 | [diff] [blame] | 46 | led { |
Patrick Delaunay | 1d6fa27 | 2018-07-27 16:37:05 +0200 | [diff] [blame] | 47 | red { |
Patrick Delaunay | ae0931d0 | 2019-07-30 19:16:39 +0200 | [diff] [blame] | 48 | label = "error"; |
Patrick Delaunay | 1d6fa27 | 2018-07-27 16:37:05 +0200 | [diff] [blame] | 49 | gpios = <&gpioa 13 GPIO_ACTIVE_LOW>; |
| 50 | default-state = "off"; |
Patrick Delaunay | ae0931d0 | 2019-07-30 19:16:39 +0200 | [diff] [blame] | 51 | status = "okay"; |
Patrick Delaunay | 1d6fa27 | 2018-07-27 16:37:05 +0200 | [diff] [blame] | 52 | }; |
Patrick Delaunay | 1d6fa27 | 2018-07-27 16:37:05 +0200 | [diff] [blame] | 53 | }; |
Patrick Delaunay | 06020d8 | 2018-03-12 10:46:17 +0100 | [diff] [blame] | 54 | }; |
| 55 | |
Patrick Delaunay | 0c220e0 | 2019-01-30 13:07:05 +0100 | [diff] [blame] | 56 | &clk_hse { |
| 57 | st,digbypass; |
| 58 | }; |
| 59 | |
Patrice Chotard | 00442d0 | 2019-02-12 16:50:38 +0100 | [diff] [blame] | 60 | &i2c4 { |
Simon Glass | d3a98cb | 2023-02-13 08:56:33 -0700 | [diff] [blame] | 61 | bootph-all; |
Patrick Delaunay | 06020d8 | 2018-03-12 10:46:17 +0100 | [diff] [blame] | 62 | }; |
| 63 | |
| 64 | &i2c4_pins_a { |
Simon Glass | d3a98cb | 2023-02-13 08:56:33 -0700 | [diff] [blame] | 65 | bootph-all; |
Patrick Delaunay | 06020d8 | 2018-03-12 10:46:17 +0100 | [diff] [blame] | 66 | pins { |
Simon Glass | d3a98cb | 2023-02-13 08:56:33 -0700 | [diff] [blame] | 67 | bootph-all; |
Patrick Delaunay | 06020d8 | 2018-03-12 10:46:17 +0100 | [diff] [blame] | 68 | }; |
| 69 | }; |
| 70 | |
Patrick Delaunay | 06020d8 | 2018-03-12 10:46:17 +0100 | [diff] [blame] | 71 | &pmic { |
Simon Glass | d3a98cb | 2023-02-13 08:56:33 -0700 | [diff] [blame] | 72 | bootph-all; |
Patrick Delaunay | 06020d8 | 2018-03-12 10:46:17 +0100 | [diff] [blame] | 73 | }; |
| 74 | |
Patrick Delaunay | 5059914 | 2018-07-09 15:17:19 +0200 | [diff] [blame] | 75 | &rcc { |
Patrick Delaunay | 06020d8 | 2018-03-12 10:46:17 +0100 | [diff] [blame] | 76 | st,clksrc = < |
| 77 | CLK_MPU_PLL1P |
| 78 | CLK_AXI_PLL2P |
| 79 | CLK_MCU_PLL3P |
| 80 | CLK_PLL12_HSE |
| 81 | CLK_PLL3_HSE |
| 82 | CLK_PLL4_HSE |
| 83 | CLK_RTC_LSE |
| 84 | CLK_MCO1_DISABLED |
| 85 | CLK_MCO2_DISABLED |
| 86 | >; |
| 87 | |
| 88 | st,clkdiv = < |
| 89 | 1 /*MPU*/ |
| 90 | 0 /*AXI*/ |
| 91 | 0 /*MCU*/ |
| 92 | 1 /*APB1*/ |
| 93 | 1 /*APB2*/ |
| 94 | 1 /*APB3*/ |
| 95 | 1 /*APB4*/ |
| 96 | 2 /*APB5*/ |
| 97 | 23 /*RTC*/ |
| 98 | 0 /*MCO1*/ |
| 99 | 0 /*MCO2*/ |
| 100 | >; |
| 101 | |
| 102 | st,pkcs = < |
Patrick Delaunay | cdd0b73 | 2018-07-09 15:17:24 +0200 | [diff] [blame] | 103 | CLK_CKPER_HSE |
| 104 | CLK_FMC_ACLK |
| 105 | CLK_QSPI_ACLK |
| 106 | CLK_ETH_DISABLED |
Patrick Delaunay | 0c220e0 | 2019-01-30 13:07:05 +0100 | [diff] [blame] | 107 | CLK_SDMMC12_PLL4P |
Patrick Delaunay | cdd0b73 | 2018-07-09 15:17:24 +0200 | [diff] [blame] | 108 | CLK_DSI_DSIPLL |
Patrick Delaunay | 1780a76 | 2018-03-20 11:41:26 +0100 | [diff] [blame] | 109 | CLK_STGEN_HSE |
Patrick Delaunay | cdd0b73 | 2018-07-09 15:17:24 +0200 | [diff] [blame] | 110 | CLK_USBPHY_HSE |
| 111 | CLK_SPI2S1_PLL3Q |
| 112 | CLK_SPI2S23_PLL3Q |
| 113 | CLK_SPI45_HSI |
| 114 | CLK_SPI6_HSI |
| 115 | CLK_I2C46_HSI |
Patrick Delaunay | 0c220e0 | 2019-01-30 13:07:05 +0100 | [diff] [blame] | 116 | CLK_SDMMC3_PLL4P |
Patrick Delaunay | cdd0b73 | 2018-07-09 15:17:24 +0200 | [diff] [blame] | 117 | CLK_USBO_USBPHY |
| 118 | CLK_ADC_CKPER |
| 119 | CLK_CEC_LSE |
| 120 | CLK_I2C12_HSI |
| 121 | CLK_I2C35_HSI |
| 122 | CLK_UART1_HSI |
| 123 | CLK_UART24_HSI |
| 124 | CLK_UART35_HSI |
| 125 | CLK_UART6_HSI |
| 126 | CLK_UART78_HSI |
Patrick Delaunay | 0c220e0 | 2019-01-30 13:07:05 +0100 | [diff] [blame] | 127 | CLK_SPDIF_PLL4P |
Antonio Borneo | 84159e8 | 2020-01-28 10:11:01 +0100 | [diff] [blame] | 128 | CLK_FDCAN_PLL4R |
Patrick Delaunay | cdd0b73 | 2018-07-09 15:17:24 +0200 | [diff] [blame] | 129 | CLK_SAI1_PLL3Q |
| 130 | CLK_SAI2_PLL3Q |
| 131 | CLK_SAI3_PLL3Q |
| 132 | CLK_SAI4_PLL3Q |
Patrick Delaunay | 0c220e0 | 2019-01-30 13:07:05 +0100 | [diff] [blame] | 133 | CLK_RNG1_LSI |
| 134 | CLK_RNG2_LSI |
Patrick Delaunay | cdd0b73 | 2018-07-09 15:17:24 +0200 | [diff] [blame] | 135 | CLK_LPTIM1_PCLK1 |
| 136 | CLK_LPTIM23_PCLK3 |
Patrick Delaunay | 0c220e0 | 2019-01-30 13:07:05 +0100 | [diff] [blame] | 137 | CLK_LPTIM45_LSE |
Patrick Delaunay | 06020d8 | 2018-03-12 10:46:17 +0100 | [diff] [blame] | 138 | >; |
| 139 | |
Patrick Delaunay | 06020d8 | 2018-03-12 10:46:17 +0100 | [diff] [blame] | 140 | /* VCO = 1066.0 MHz => P = 266 (AXI), Q = 533 (GPU), R = 533 (DDR) */ |
| 141 | pll2: st,pll@1 { |
Patrick Delaunay | c22caac | 2020-01-28 10:11:03 +0100 | [diff] [blame] | 142 | compatible = "st,stm32mp1-pll"; |
| 143 | reg = <1>; |
Patrick Delaunay | 06020d8 | 2018-03-12 10:46:17 +0100 | [diff] [blame] | 144 | cfg = < 2 65 1 0 0 PQR(1,1,1) >; |
| 145 | frac = < 0x1400 >; |
Simon Glass | d3a98cb | 2023-02-13 08:56:33 -0700 | [diff] [blame] | 146 | bootph-all; |
Patrick Delaunay | 06020d8 | 2018-03-12 10:46:17 +0100 | [diff] [blame] | 147 | }; |
| 148 | |
Patrick Delaunay | 0c220e0 | 2019-01-30 13:07:05 +0100 | [diff] [blame] | 149 | /* VCO = 417.8 MHz => P = 209, Q = 24, R = 11 */ |
Patrick Delaunay | 06020d8 | 2018-03-12 10:46:17 +0100 | [diff] [blame] | 150 | pll3: st,pll@2 { |
Patrick Delaunay | c22caac | 2020-01-28 10:11:03 +0100 | [diff] [blame] | 151 | compatible = "st,stm32mp1-pll"; |
| 152 | reg = <2>; |
Patrick Delaunay | 0c220e0 | 2019-01-30 13:07:05 +0100 | [diff] [blame] | 153 | cfg = < 1 33 1 16 36 PQR(1,1,1) >; |
| 154 | frac = < 0x1a04 >; |
Simon Glass | d3a98cb | 2023-02-13 08:56:33 -0700 | [diff] [blame] | 155 | bootph-all; |
Patrick Delaunay | 06020d8 | 2018-03-12 10:46:17 +0100 | [diff] [blame] | 156 | }; |
| 157 | |
Patrick Delaunay | 0c220e0 | 2019-01-30 13:07:05 +0100 | [diff] [blame] | 158 | /* VCO = 594.0 MHz => P = 99, Q = 74, R = 74 */ |
Patrick Delaunay | 06020d8 | 2018-03-12 10:46:17 +0100 | [diff] [blame] | 159 | pll4: st,pll@3 { |
Patrick Delaunay | c22caac | 2020-01-28 10:11:03 +0100 | [diff] [blame] | 160 | compatible = "st,stm32mp1-pll"; |
| 161 | reg = <3>; |
Patrick Delaunay | 0c220e0 | 2019-01-30 13:07:05 +0100 | [diff] [blame] | 162 | cfg = < 3 98 5 7 7 PQR(1,1,1) >; |
Simon Glass | d3a98cb | 2023-02-13 08:56:33 -0700 | [diff] [blame] | 163 | bootph-all; |
Patrick Delaunay | 06020d8 | 2018-03-12 10:46:17 +0100 | [diff] [blame] | 164 | }; |
| 165 | }; |
| 166 | |
Patrick Delaunay | a370530 | 2019-07-11 11:15:28 +0200 | [diff] [blame] | 167 | &sdmmc1 { |
Simon Glass | d3a98cb | 2023-02-13 08:56:33 -0700 | [diff] [blame] | 168 | bootph-pre-ram; |
Patrick Delaunay | a370530 | 2019-07-11 11:15:28 +0200 | [diff] [blame] | 169 | }; |
| 170 | |
Patrick Delaunay | 06020d8 | 2018-03-12 10:46:17 +0100 | [diff] [blame] | 171 | &sdmmc1_b4_pins_a { |
Simon Glass | d3a98cb | 2023-02-13 08:56:33 -0700 | [diff] [blame] | 172 | bootph-pre-ram; |
Patrick Delaunay | 48c5e90 | 2020-03-06 17:54:41 +0100 | [diff] [blame] | 173 | pins1 { |
Simon Glass | d3a98cb | 2023-02-13 08:56:33 -0700 | [diff] [blame] | 174 | bootph-pre-ram; |
Patrick Delaunay | 48c5e90 | 2020-03-06 17:54:41 +0100 | [diff] [blame] | 175 | }; |
| 176 | pins2 { |
Simon Glass | d3a98cb | 2023-02-13 08:56:33 -0700 | [diff] [blame] | 177 | bootph-pre-ram; |
Patrick Delaunay | 06020d8 | 2018-03-12 10:46:17 +0100 | [diff] [blame] | 178 | }; |
| 179 | }; |
| 180 | |
| 181 | &sdmmc1_dir_pins_a { |
Simon Glass | d3a98cb | 2023-02-13 08:56:33 -0700 | [diff] [blame] | 182 | bootph-pre-ram; |
Patrick Delaunay | a370530 | 2019-07-11 11:15:28 +0200 | [diff] [blame] | 183 | pins1 { |
Simon Glass | d3a98cb | 2023-02-13 08:56:33 -0700 | [diff] [blame] | 184 | bootph-pre-ram; |
Patrick Delaunay | a370530 | 2019-07-11 11:15:28 +0200 | [diff] [blame] | 185 | }; |
| 186 | pins2 { |
Simon Glass | d3a98cb | 2023-02-13 08:56:33 -0700 | [diff] [blame] | 187 | bootph-pre-ram; |
Patrick Delaunay | 06020d8 | 2018-03-12 10:46:17 +0100 | [diff] [blame] | 188 | }; |
| 189 | }; |
| 190 | |
Patrick Delaunay | a370530 | 2019-07-11 11:15:28 +0200 | [diff] [blame] | 191 | &sdmmc2 { |
Simon Glass | d3a98cb | 2023-02-13 08:56:33 -0700 | [diff] [blame] | 192 | bootph-pre-ram; |
Patrick Delaunay | 06020d8 | 2018-03-12 10:46:17 +0100 | [diff] [blame] | 193 | }; |
Patrick Delaunay | 8d05010 | 2018-03-20 10:54:52 +0100 | [diff] [blame] | 194 | |
Patrick Delaunay | 8d05010 | 2018-03-20 10:54:52 +0100 | [diff] [blame] | 195 | &sdmmc2_b4_pins_a { |
Simon Glass | d3a98cb | 2023-02-13 08:56:33 -0700 | [diff] [blame] | 196 | bootph-pre-ram; |
Patrick Delaunay | 2b0bbf5 | 2019-11-06 16:16:34 +0100 | [diff] [blame] | 197 | pins1 { |
Simon Glass | d3a98cb | 2023-02-13 08:56:33 -0700 | [diff] [blame] | 198 | bootph-pre-ram; |
Patrick Delaunay | 2b0bbf5 | 2019-11-06 16:16:34 +0100 | [diff] [blame] | 199 | }; |
| 200 | pins2 { |
Simon Glass | d3a98cb | 2023-02-13 08:56:33 -0700 | [diff] [blame] | 201 | bootph-pre-ram; |
Patrick Delaunay | 8d05010 | 2018-03-20 10:54:52 +0100 | [diff] [blame] | 202 | }; |
| 203 | }; |
| 204 | |
| 205 | &sdmmc2_d47_pins_a { |
Simon Glass | d3a98cb | 2023-02-13 08:56:33 -0700 | [diff] [blame] | 206 | bootph-pre-ram; |
Patrick Delaunay | 8d05010 | 2018-03-20 10:54:52 +0100 | [diff] [blame] | 207 | pins { |
Simon Glass | d3a98cb | 2023-02-13 08:56:33 -0700 | [diff] [blame] | 208 | bootph-pre-ram; |
Patrick Delaunay | 8d05010 | 2018-03-20 10:54:52 +0100 | [diff] [blame] | 209 | }; |
| 210 | }; |
| 211 | |
Patrice Chotard | 00442d0 | 2019-02-12 16:50:38 +0100 | [diff] [blame] | 212 | &uart4 { |
Simon Glass | d3a98cb | 2023-02-13 08:56:33 -0700 | [diff] [blame] | 213 | bootph-all; |
Patrice Chotard | 00442d0 | 2019-02-12 16:50:38 +0100 | [diff] [blame] | 214 | }; |
| 215 | |
| 216 | &uart4_pins_a { |
Simon Glass | d3a98cb | 2023-02-13 08:56:33 -0700 | [diff] [blame] | 217 | bootph-all; |
Patrice Chotard | 00442d0 | 2019-02-12 16:50:38 +0100 | [diff] [blame] | 218 | pins1 { |
Simon Glass | d3a98cb | 2023-02-13 08:56:33 -0700 | [diff] [blame] | 219 | bootph-all; |
Patrice Chotard | 00442d0 | 2019-02-12 16:50:38 +0100 | [diff] [blame] | 220 | }; |
| 221 | pins2 { |
Simon Glass | d3a98cb | 2023-02-13 08:56:33 -0700 | [diff] [blame] | 222 | bootph-all; |
Patrick Delaunay | 5179a85 | 2019-07-30 19:16:18 +0200 | [diff] [blame] | 223 | /* pull-up on rx to avoid floating level */ |
| 224 | bias-pull-up; |
Patrice Chotard | 00442d0 | 2019-02-12 16:50:38 +0100 | [diff] [blame] | 225 | }; |
| 226 | }; |