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