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> |
Patrice Chotard | ee82a20 | 2024-04-09 17:02:04 +0200 | [diff] [blame] | 7 | #include <dt-bindings/input/linux-event-codes.h> |
Patrick Delaunay | 48c5e90 | 2020-03-06 17:54:41 +0100 | [diff] [blame] | 8 | #include "stm32mp15-u-boot.dtsi" |
Patrice Chotard | 00442d0 | 2019-02-12 16:50:38 +0100 | [diff] [blame] | 9 | #include "stm32mp15-ddr3-1x4Gb-1066-binG.dtsi" |
| 10 | |
| 11 | / { |
| 12 | aliases { |
| 13 | i2c3 = &i2c4; |
Patrick Delaunay | 58bc0cd | 2019-03-29 15:42:23 +0100 | [diff] [blame] | 14 | usb0 = &usbotg_hs; |
Patrice Chotard | 00442d0 | 2019-02-12 16:50:38 +0100 | [diff] [blame] | 15 | }; |
Patrick Delaunay | 8d43540 | 2023-06-08 17:16:41 +0200 | [diff] [blame] | 16 | |
Patrice Chotard | 00442d0 | 2019-02-12 16:50:38 +0100 | [diff] [blame] | 17 | config { |
Patrice Chotard | 3272f45 | 2024-04-09 17:02:07 +0200 | [diff] [blame] | 18 | u-boot,boot-led = "led-blue"; |
Patrice Chotard | da15d0b | 2024-04-09 17:02:06 +0200 | [diff] [blame] | 19 | u-boot,error-led = "led-red"; |
Patrick Delaunay | 9c88dbf | 2021-07-26 11:21:36 +0200 | [diff] [blame] | 20 | u-boot,mmc-env-partition = "fip"; |
Patrice Chotard | 00442d0 | 2019-02-12 16:50:38 +0100 | [diff] [blame] | 21 | st,adc_usb_pd = <&adc1 18>, <&adc1 19>; |
| 22 | }; |
Etienne Carriere | c461e1a | 2020-06-05 09:24:30 +0200 | [diff] [blame] | 23 | |
Patrick Delaunay | 4c6fcbc | 2024-01-15 15:05:57 +0100 | [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 | 4c6fcbc | 2024-01-15 15:05:57 +0100 | [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 { |
Simon Glass | d3a98cb | 2023-02-13 08:56:33 -0700 | [diff] [blame] | 40 | bootph-pre-ram; |
Alexandru Gagniuc | 9bf2f5b | 2021-07-15 14:19:27 -0500 | [diff] [blame] | 41 | |
Etienne Carriere | c461e1a | 2020-06-05 09:24:30 +0200 | [diff] [blame] | 42 | optee@de000000 { |
| 43 | reg = <0xde000000 0x02000000>; |
| 44 | no-map; |
Simon Glass | d3a98cb | 2023-02-13 08:56:33 -0700 | [diff] [blame] | 45 | bootph-pre-ram; |
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 | ee82a20 | 2024-04-09 17:02:04 +0200 | [diff] [blame] | 50 | gpio-keys { |
| 51 | compatible = "gpio-keys"; |
| 52 | |
| 53 | button-user-1 { |
| 54 | label = "User-1"; |
| 55 | linux,code = <BTN_1>; |
| 56 | gpios = <&gpioa 14 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; |
| 57 | }; |
| 58 | |
| 59 | button-user-2 { |
| 60 | label = "User-2"; |
| 61 | linux,code = <BTN_2>; |
| 62 | gpios = <&gpioa 13 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; |
| 63 | }; |
| 64 | }; |
| 65 | |
Patrice Chotard | 00442d0 | 2019-02-12 16:50:38 +0100 | [diff] [blame] | 66 | led { |
Patrice Chotard | 3272f45 | 2024-04-09 17:02:07 +0200 | [diff] [blame] | 67 | led-blue { |
| 68 | /delete-property/label; |
| 69 | }; |
| 70 | |
Patrice Chotard | da15d0b | 2024-04-09 17:02:06 +0200 | [diff] [blame] | 71 | led-red { |
Patrice Chotard | 00442d0 | 2019-02-12 16:50:38 +0100 | [diff] [blame] | 72 | gpios = <&gpioa 13 GPIO_ACTIVE_LOW>; |
Patrice Chotard | 00442d0 | 2019-02-12 16:50:38 +0100 | [diff] [blame] | 73 | }; |
Patrice Chotard | 00442d0 | 2019-02-12 16:50:38 +0100 | [diff] [blame] | 74 | }; |
| 75 | }; |
| 76 | |
Patrice Chotard | e861c20 | 2019-02-12 16:50:41 +0100 | [diff] [blame] | 77 | &adc { |
Patrice Chotard | e861c20 | 2019-02-12 16:50:41 +0100 | [diff] [blame] | 78 | status = "okay"; |
Patrice Chotard | e861c20 | 2019-02-12 16:50:41 +0100 | [diff] [blame] | 79 | }; |
| 80 | |
Patrice Chotard | 00442d0 | 2019-02-12 16:50:38 +0100 | [diff] [blame] | 81 | &clk_hse { |
| 82 | st,digbypass; |
| 83 | }; |
| 84 | |
| 85 | &i2c4 { |
Simon Glass | d3a98cb | 2023-02-13 08:56:33 -0700 | [diff] [blame] | 86 | bootph-all; |
Patrice Chotard | 00442d0 | 2019-02-12 16:50:38 +0100 | [diff] [blame] | 87 | }; |
| 88 | |
| 89 | &i2c4_pins_a { |
Simon Glass | d3a98cb | 2023-02-13 08:56:33 -0700 | [diff] [blame] | 90 | bootph-all; |
Patrice Chotard | 00442d0 | 2019-02-12 16:50:38 +0100 | [diff] [blame] | 91 | pins { |
Simon Glass | d3a98cb | 2023-02-13 08:56:33 -0700 | [diff] [blame] | 92 | bootph-all; |
Patrice Chotard | 00442d0 | 2019-02-12 16:50:38 +0100 | [diff] [blame] | 93 | }; |
| 94 | }; |
| 95 | |
| 96 | &pmic { |
Simon Glass | d3a98cb | 2023-02-13 08:56:33 -0700 | [diff] [blame] | 97 | bootph-all; |
Patrice Chotard | 00442d0 | 2019-02-12 16:50:38 +0100 | [diff] [blame] | 98 | }; |
| 99 | |
| 100 | &rcc { |
| 101 | st,clksrc = < |
| 102 | CLK_MPU_PLL1P |
| 103 | CLK_AXI_PLL2P |
| 104 | CLK_MCU_PLL3P |
| 105 | CLK_PLL12_HSE |
| 106 | CLK_PLL3_HSE |
| 107 | CLK_PLL4_HSE |
| 108 | CLK_RTC_LSE |
| 109 | CLK_MCO1_DISABLED |
| 110 | CLK_MCO2_DISABLED |
| 111 | >; |
| 112 | |
| 113 | st,clkdiv = < |
| 114 | 1 /*MPU*/ |
| 115 | 0 /*AXI*/ |
| 116 | 0 /*MCU*/ |
| 117 | 1 /*APB1*/ |
| 118 | 1 /*APB2*/ |
| 119 | 1 /*APB3*/ |
| 120 | 1 /*APB4*/ |
| 121 | 2 /*APB5*/ |
| 122 | 23 /*RTC*/ |
| 123 | 0 /*MCO1*/ |
| 124 | 0 /*MCO2*/ |
| 125 | >; |
| 126 | |
| 127 | st,pkcs = < |
| 128 | CLK_CKPER_HSE |
| 129 | CLK_FMC_ACLK |
| 130 | CLK_QSPI_ACLK |
| 131 | CLK_ETH_DISABLED |
| 132 | CLK_SDMMC12_PLL4P |
| 133 | CLK_DSI_DSIPLL |
| 134 | CLK_STGEN_HSE |
| 135 | CLK_USBPHY_HSE |
| 136 | CLK_SPI2S1_PLL3Q |
| 137 | CLK_SPI2S23_PLL3Q |
| 138 | CLK_SPI45_HSI |
| 139 | CLK_SPI6_HSI |
| 140 | CLK_I2C46_HSI |
| 141 | CLK_SDMMC3_PLL4P |
| 142 | CLK_USBO_USBPHY |
| 143 | CLK_ADC_CKPER |
| 144 | CLK_CEC_LSE |
| 145 | CLK_I2C12_HSI |
| 146 | CLK_I2C35_HSI |
| 147 | CLK_UART1_HSI |
| 148 | CLK_UART24_HSI |
| 149 | CLK_UART35_HSI |
| 150 | CLK_UART6_HSI |
| 151 | CLK_UART78_HSI |
| 152 | CLK_SPDIF_PLL4P |
Antonio Borneo | 84159e8 | 2020-01-28 10:11:01 +0100 | [diff] [blame] | 153 | CLK_FDCAN_PLL4R |
Patrice Chotard | 00442d0 | 2019-02-12 16:50:38 +0100 | [diff] [blame] | 154 | CLK_SAI1_PLL3Q |
| 155 | CLK_SAI2_PLL3Q |
| 156 | CLK_SAI3_PLL3Q |
| 157 | CLK_SAI4_PLL3Q |
| 158 | CLK_RNG1_LSI |
| 159 | CLK_RNG2_LSI |
| 160 | CLK_LPTIM1_PCLK1 |
| 161 | CLK_LPTIM23_PCLK3 |
| 162 | CLK_LPTIM45_LSE |
| 163 | >; |
| 164 | |
Patrice Chotard | 00442d0 | 2019-02-12 16:50:38 +0100 | [diff] [blame] | 165 | /* VCO = 1066.0 MHz => P = 266 (AXI), Q = 533 (GPU), R = 533 (DDR) */ |
| 166 | pll2: st,pll@1 { |
Patrick Delaunay | c22caac | 2020-01-28 10:11:03 +0100 | [diff] [blame] | 167 | compatible = "st,stm32mp1-pll"; |
| 168 | reg = <1>; |
Patrice Chotard | 00442d0 | 2019-02-12 16:50:38 +0100 | [diff] [blame] | 169 | cfg = < 2 65 1 0 0 PQR(1,1,1) >; |
| 170 | frac = < 0x1400 >; |
Simon Glass | d3a98cb | 2023-02-13 08:56:33 -0700 | [diff] [blame] | 171 | bootph-all; |
Patrice Chotard | 00442d0 | 2019-02-12 16:50:38 +0100 | [diff] [blame] | 172 | }; |
| 173 | |
| 174 | /* VCO = 417.8 MHz => P = 209, Q = 24, R = 11 */ |
| 175 | pll3: st,pll@2 { |
Patrick Delaunay | c22caac | 2020-01-28 10:11:03 +0100 | [diff] [blame] | 176 | compatible = "st,stm32mp1-pll"; |
| 177 | reg = <2>; |
Patrice Chotard | 00442d0 | 2019-02-12 16:50:38 +0100 | [diff] [blame] | 178 | cfg = < 1 33 1 16 36 PQR(1,1,1) >; |
| 179 | frac = < 0x1a04 >; |
Simon Glass | d3a98cb | 2023-02-13 08:56:33 -0700 | [diff] [blame] | 180 | bootph-all; |
Patrice Chotard | 00442d0 | 2019-02-12 16:50:38 +0100 | [diff] [blame] | 181 | }; |
| 182 | |
| 183 | /* VCO = 594.0 MHz => P = 99, Q = 74, R = 74 */ |
| 184 | pll4: st,pll@3 { |
Patrick Delaunay | c22caac | 2020-01-28 10:11:03 +0100 | [diff] [blame] | 185 | compatible = "st,stm32mp1-pll"; |
| 186 | reg = <3>; |
Patrice Chotard | 00442d0 | 2019-02-12 16:50:38 +0100 | [diff] [blame] | 187 | cfg = < 3 98 5 7 7 PQR(1,1,1) >; |
Simon Glass | d3a98cb | 2023-02-13 08:56:33 -0700 | [diff] [blame] | 188 | bootph-all; |
Patrice Chotard | 00442d0 | 2019-02-12 16:50:38 +0100 | [diff] [blame] | 189 | }; |
| 190 | }; |
| 191 | |
| 192 | &sdmmc1 { |
Simon Glass | d3a98cb | 2023-02-13 08:56:33 -0700 | [diff] [blame] | 193 | bootph-pre-ram; |
Patrice Chotard | 00442d0 | 2019-02-12 16:50:38 +0100 | [diff] [blame] | 194 | }; |
| 195 | |
| 196 | &sdmmc1_b4_pins_a { |
Simon Glass | d3a98cb | 2023-02-13 08:56:33 -0700 | [diff] [blame] | 197 | bootph-pre-ram; |
Patrick Delaunay | 48c5e90 | 2020-03-06 17:54:41 +0100 | [diff] [blame] | 198 | pins1 { |
Simon Glass | d3a98cb | 2023-02-13 08:56:33 -0700 | [diff] [blame] | 199 | bootph-pre-ram; |
Patrick Delaunay | 48c5e90 | 2020-03-06 17:54:41 +0100 | [diff] [blame] | 200 | }; |
| 201 | pins2 { |
Simon Glass | d3a98cb | 2023-02-13 08:56:33 -0700 | [diff] [blame] | 202 | bootph-pre-ram; |
Patrice Chotard | 00442d0 | 2019-02-12 16:50:38 +0100 | [diff] [blame] | 203 | }; |
| 204 | }; |
| 205 | |
| 206 | &uart4 { |
Simon Glass | d3a98cb | 2023-02-13 08:56:33 -0700 | [diff] [blame] | 207 | bootph-all; |
Patrice Chotard | 00442d0 | 2019-02-12 16:50:38 +0100 | [diff] [blame] | 208 | }; |
| 209 | |
| 210 | &uart4_pins_a { |
Simon Glass | d3a98cb | 2023-02-13 08:56:33 -0700 | [diff] [blame] | 211 | bootph-all; |
Patrice Chotard | 00442d0 | 2019-02-12 16:50:38 +0100 | [diff] [blame] | 212 | pins1 { |
Simon Glass | d3a98cb | 2023-02-13 08:56:33 -0700 | [diff] [blame] | 213 | bootph-all; |
Patrice Chotard | 00442d0 | 2019-02-12 16:50:38 +0100 | [diff] [blame] | 214 | }; |
| 215 | pins2 { |
Simon Glass | d3a98cb | 2023-02-13 08:56:33 -0700 | [diff] [blame] | 216 | bootph-all; |
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 | }; |
| 221 | |
| 222 | &usbotg_hs { |
Patrick Delaunay | 7f3384d | 2019-03-29 15:42:24 +0100 | [diff] [blame] | 223 | u-boot,force-b-session-valid; |
Patrice Chotard | 00442d0 | 2019-02-12 16:50:38 +0100 | [diff] [blame] | 224 | }; |