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