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