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