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