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