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> |
Patrice Chotard | 758a7fd | 2024-04-09 17:02:08 +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" |
Patrick Delaunay | 06020d8 | 2018-03-12 10:46:17 +0100 | [diff] [blame] | 9 | #include "stm32mp15-ddr3-2x4Gb-1066-binG.dtsi" |
| 10 | |
| 11 | / { |
| 12 | aliases { |
Patrice Chotard | 00442d0 | 2019-02-12 16:50:38 +0100 | [diff] [blame] | 13 | i2c3 = &i2c4; |
Patrick Delaunay | 06020d8 | 2018-03-12 10:46:17 +0100 | [diff] [blame] | 14 | }; |
Patrick Delaunay | 1d6fa27 | 2018-07-27 16:37:05 +0200 | [diff] [blame] | 15 | |
Patrick Delaunay | 008d3c3 | 2019-02-27 17:01:20 +0100 | [diff] [blame] | 16 | config { |
Patrice Chotard | 092333d | 2024-04-09 17:02:11 +0200 | [diff] [blame] | 17 | u-boot,boot-led = "led-blue"; |
Patrice Chotard | f85d9b9 | 2024-04-09 17:02:10 +0200 | [diff] [blame] | 18 | u-boot,error-led = "led-red"; |
Patrick Delaunay | 9c88dbf | 2021-07-26 11:21:36 +0200 | [diff] [blame] | 19 | u-boot,mmc-env-partition = "fip"; |
Patrick Delaunay | 008d3c3 | 2019-02-27 17:01:20 +0100 | [diff] [blame] | 20 | }; |
| 21 | |
Patrick Delaunay | 4c6fcbc | 2024-01-15 15:05:57 +0100 | [diff] [blame] | 22 | #if defined(CONFIG_STM32MP15X_STM32IMAGE) || defined(CONFIG_SPL) |
Patrick Delaunay | 9c88dbf | 2021-07-26 11:21:36 +0200 | [diff] [blame] | 23 | config { |
| 24 | u-boot,mmc-env-partition = "ssbl"; |
| 25 | }; |
Patrick Delaunay | 87e8332 | 2021-09-14 14:14:52 +0200 | [diff] [blame] | 26 | #endif |
Patrick Delaunay | 9c88dbf | 2021-07-26 11:21:36 +0200 | [diff] [blame] | 27 | |
Patrick Delaunay | 4c6fcbc | 2024-01-15 15:05:57 +0100 | [diff] [blame] | 28 | #ifdef CONFIG_STM32MP15X_STM32IMAGE |
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 { |
| 38 | optee@fe000000 { |
| 39 | reg = <0xfe000000 0x02000000>; |
| 40 | no-map; |
| 41 | }; |
| 42 | }; |
Patrick Delaunay | f8fcabf | 2021-07-26 11:21:35 +0200 | [diff] [blame] | 43 | #endif |
Etienne Carriere | c461e1a | 2020-06-05 09:24:30 +0200 | [diff] [blame] | 44 | |
Patrice Chotard | 758a7fd | 2024-04-09 17:02:08 +0200 | [diff] [blame] | 45 | gpio-keys { |
| 46 | compatible = "gpio-keys"; |
| 47 | |
| 48 | button-user-1 { |
| 49 | label = "User-1"; |
| 50 | linux,code = <BTN_1>; |
| 51 | gpios = <&gpioa 14 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; |
| 52 | }; |
| 53 | |
| 54 | button-user-2 { |
| 55 | label = "User-2"; |
| 56 | linux,code = <BTN_2>; |
| 57 | gpios = <&gpioa 13 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; |
| 58 | }; |
| 59 | }; |
| 60 | |
Patrick Delaunay | 1d6fa27 | 2018-07-27 16:37:05 +0200 | [diff] [blame] | 61 | led { |
Patrice Chotard | f85d9b9 | 2024-04-09 17:02:10 +0200 | [diff] [blame] | 62 | compatible = "gpio-leds"; |
| 63 | |
Patrice Chotard | 092333d | 2024-04-09 17:02:11 +0200 | [diff] [blame] | 64 | led-blue { |
| 65 | gpios = <&gpiod 9 GPIO_ACTIVE_HIGH>; |
| 66 | }; |
| 67 | |
Patrice Chotard | f85d9b9 | 2024-04-09 17:02:10 +0200 | [diff] [blame] | 68 | led-red { |
Patrick Delaunay | 1d6fa27 | 2018-07-27 16:37:05 +0200 | [diff] [blame] | 69 | gpios = <&gpioa 13 GPIO_ACTIVE_LOW>; |
Patrick Delaunay | 1d6fa27 | 2018-07-27 16:37:05 +0200 | [diff] [blame] | 70 | }; |
Patrick Delaunay | 1d6fa27 | 2018-07-27 16:37:05 +0200 | [diff] [blame] | 71 | }; |
Patrick Delaunay | 06020d8 | 2018-03-12 10:46:17 +0100 | [diff] [blame] | 72 | }; |
| 73 | |
Patrick Delaunay | 0c220e0 | 2019-01-30 13:07:05 +0100 | [diff] [blame] | 74 | &clk_hse { |
| 75 | st,digbypass; |
| 76 | }; |
| 77 | |
Patrice Chotard | 00442d0 | 2019-02-12 16:50:38 +0100 | [diff] [blame] | 78 | &i2c4 { |
Simon Glass | d3a98cb | 2023-02-13 08:56:33 -0700 | [diff] [blame] | 79 | bootph-all; |
Patrick Delaunay | 06020d8 | 2018-03-12 10:46:17 +0100 | [diff] [blame] | 80 | }; |
| 81 | |
| 82 | &i2c4_pins_a { |
Simon Glass | d3a98cb | 2023-02-13 08:56:33 -0700 | [diff] [blame] | 83 | bootph-all; |
Patrick Delaunay | 06020d8 | 2018-03-12 10:46:17 +0100 | [diff] [blame] | 84 | pins { |
Simon Glass | d3a98cb | 2023-02-13 08:56:33 -0700 | [diff] [blame] | 85 | bootph-all; |
Patrick Delaunay | 06020d8 | 2018-03-12 10:46:17 +0100 | [diff] [blame] | 86 | }; |
| 87 | }; |
| 88 | |
Patrick Delaunay | 06020d8 | 2018-03-12 10:46:17 +0100 | [diff] [blame] | 89 | &pmic { |
Simon Glass | d3a98cb | 2023-02-13 08:56:33 -0700 | [diff] [blame] | 90 | bootph-all; |
Patrick Delaunay | 06020d8 | 2018-03-12 10:46:17 +0100 | [diff] [blame] | 91 | }; |
| 92 | |
Patrick Delaunay | 5059914 | 2018-07-09 15:17:19 +0200 | [diff] [blame] | 93 | &rcc { |
Patrick Delaunay | 06020d8 | 2018-03-12 10:46:17 +0100 | [diff] [blame] | 94 | st,clksrc = < |
| 95 | CLK_MPU_PLL1P |
| 96 | CLK_AXI_PLL2P |
| 97 | CLK_MCU_PLL3P |
| 98 | CLK_PLL12_HSE |
| 99 | CLK_PLL3_HSE |
| 100 | CLK_PLL4_HSE |
| 101 | CLK_RTC_LSE |
| 102 | CLK_MCO1_DISABLED |
| 103 | CLK_MCO2_DISABLED |
| 104 | >; |
| 105 | |
| 106 | st,clkdiv = < |
| 107 | 1 /*MPU*/ |
| 108 | 0 /*AXI*/ |
| 109 | 0 /*MCU*/ |
| 110 | 1 /*APB1*/ |
| 111 | 1 /*APB2*/ |
| 112 | 1 /*APB3*/ |
| 113 | 1 /*APB4*/ |
| 114 | 2 /*APB5*/ |
| 115 | 23 /*RTC*/ |
| 116 | 0 /*MCO1*/ |
| 117 | 0 /*MCO2*/ |
| 118 | >; |
| 119 | |
| 120 | st,pkcs = < |
Patrick Delaunay | cdd0b73 | 2018-07-09 15:17:24 +0200 | [diff] [blame] | 121 | CLK_CKPER_HSE |
| 122 | CLK_FMC_ACLK |
| 123 | CLK_QSPI_ACLK |
| 124 | CLK_ETH_DISABLED |
Patrick Delaunay | 0c220e0 | 2019-01-30 13:07:05 +0100 | [diff] [blame] | 125 | CLK_SDMMC12_PLL4P |
Patrick Delaunay | cdd0b73 | 2018-07-09 15:17:24 +0200 | [diff] [blame] | 126 | CLK_DSI_DSIPLL |
Patrick Delaunay | 1780a76 | 2018-03-20 11:41:26 +0100 | [diff] [blame] | 127 | CLK_STGEN_HSE |
Patrick Delaunay | cdd0b73 | 2018-07-09 15:17:24 +0200 | [diff] [blame] | 128 | CLK_USBPHY_HSE |
| 129 | CLK_SPI2S1_PLL3Q |
| 130 | CLK_SPI2S23_PLL3Q |
| 131 | CLK_SPI45_HSI |
| 132 | CLK_SPI6_HSI |
| 133 | CLK_I2C46_HSI |
Patrick Delaunay | 0c220e0 | 2019-01-30 13:07:05 +0100 | [diff] [blame] | 134 | CLK_SDMMC3_PLL4P |
Patrick Delaunay | cdd0b73 | 2018-07-09 15:17:24 +0200 | [diff] [blame] | 135 | CLK_USBO_USBPHY |
| 136 | CLK_ADC_CKPER |
| 137 | CLK_CEC_LSE |
| 138 | CLK_I2C12_HSI |
| 139 | CLK_I2C35_HSI |
| 140 | CLK_UART1_HSI |
| 141 | CLK_UART24_HSI |
| 142 | CLK_UART35_HSI |
| 143 | CLK_UART6_HSI |
| 144 | CLK_UART78_HSI |
Patrick Delaunay | 0c220e0 | 2019-01-30 13:07:05 +0100 | [diff] [blame] | 145 | CLK_SPDIF_PLL4P |
Antonio Borneo | 84159e8 | 2020-01-28 10:11:01 +0100 | [diff] [blame] | 146 | CLK_FDCAN_PLL4R |
Patrick Delaunay | cdd0b73 | 2018-07-09 15:17:24 +0200 | [diff] [blame] | 147 | CLK_SAI1_PLL3Q |
| 148 | CLK_SAI2_PLL3Q |
| 149 | CLK_SAI3_PLL3Q |
| 150 | CLK_SAI4_PLL3Q |
Patrick Delaunay | 0c220e0 | 2019-01-30 13:07:05 +0100 | [diff] [blame] | 151 | CLK_RNG1_LSI |
| 152 | CLK_RNG2_LSI |
Patrick Delaunay | cdd0b73 | 2018-07-09 15:17:24 +0200 | [diff] [blame] | 153 | CLK_LPTIM1_PCLK1 |
| 154 | CLK_LPTIM23_PCLK3 |
Patrick Delaunay | 0c220e0 | 2019-01-30 13:07:05 +0100 | [diff] [blame] | 155 | CLK_LPTIM45_LSE |
Patrick Delaunay | 06020d8 | 2018-03-12 10:46:17 +0100 | [diff] [blame] | 156 | >; |
| 157 | |
Patrick Delaunay | 06020d8 | 2018-03-12 10:46:17 +0100 | [diff] [blame] | 158 | /* VCO = 1066.0 MHz => P = 266 (AXI), Q = 533 (GPU), R = 533 (DDR) */ |
| 159 | pll2: st,pll@1 { |
Patrick Delaunay | c22caac | 2020-01-28 10:11:03 +0100 | [diff] [blame] | 160 | compatible = "st,stm32mp1-pll"; |
| 161 | reg = <1>; |
Patrick Delaunay | 06020d8 | 2018-03-12 10:46:17 +0100 | [diff] [blame] | 162 | cfg = < 2 65 1 0 0 PQR(1,1,1) >; |
| 163 | frac = < 0x1400 >; |
Simon Glass | d3a98cb | 2023-02-13 08:56:33 -0700 | [diff] [blame] | 164 | bootph-all; |
Patrick Delaunay | 06020d8 | 2018-03-12 10:46:17 +0100 | [diff] [blame] | 165 | }; |
| 166 | |
Patrick Delaunay | 0c220e0 | 2019-01-30 13:07:05 +0100 | [diff] [blame] | 167 | /* VCO = 417.8 MHz => P = 209, Q = 24, R = 11 */ |
Patrick Delaunay | 06020d8 | 2018-03-12 10:46:17 +0100 | [diff] [blame] | 168 | pll3: st,pll@2 { |
Patrick Delaunay | c22caac | 2020-01-28 10:11:03 +0100 | [diff] [blame] | 169 | compatible = "st,stm32mp1-pll"; |
| 170 | reg = <2>; |
Patrick Delaunay | 0c220e0 | 2019-01-30 13:07:05 +0100 | [diff] [blame] | 171 | cfg = < 1 33 1 16 36 PQR(1,1,1) >; |
| 172 | frac = < 0x1a04 >; |
Simon Glass | d3a98cb | 2023-02-13 08:56:33 -0700 | [diff] [blame] | 173 | bootph-all; |
Patrick Delaunay | 06020d8 | 2018-03-12 10:46:17 +0100 | [diff] [blame] | 174 | }; |
| 175 | |
Patrick Delaunay | 0c220e0 | 2019-01-30 13:07:05 +0100 | [diff] [blame] | 176 | /* VCO = 594.0 MHz => P = 99, Q = 74, R = 74 */ |
Patrick Delaunay | 06020d8 | 2018-03-12 10:46:17 +0100 | [diff] [blame] | 177 | pll4: st,pll@3 { |
Patrick Delaunay | c22caac | 2020-01-28 10:11:03 +0100 | [diff] [blame] | 178 | compatible = "st,stm32mp1-pll"; |
| 179 | reg = <3>; |
Patrick Delaunay | 0c220e0 | 2019-01-30 13:07:05 +0100 | [diff] [blame] | 180 | cfg = < 3 98 5 7 7 PQR(1,1,1) >; |
Simon Glass | d3a98cb | 2023-02-13 08:56:33 -0700 | [diff] [blame] | 181 | bootph-all; |
Patrick Delaunay | 06020d8 | 2018-03-12 10:46:17 +0100 | [diff] [blame] | 182 | }; |
| 183 | }; |
| 184 | |
Patrick Delaunay | a370530 | 2019-07-11 11:15:28 +0200 | [diff] [blame] | 185 | &sdmmc1 { |
Simon Glass | d3a98cb | 2023-02-13 08:56:33 -0700 | [diff] [blame] | 186 | bootph-pre-ram; |
Patrick Delaunay | a370530 | 2019-07-11 11:15:28 +0200 | [diff] [blame] | 187 | }; |
| 188 | |
Patrick Delaunay | 06020d8 | 2018-03-12 10:46:17 +0100 | [diff] [blame] | 189 | &sdmmc1_b4_pins_a { |
Simon Glass | d3a98cb | 2023-02-13 08:56:33 -0700 | [diff] [blame] | 190 | bootph-pre-ram; |
Patrick Delaunay | 48c5e90 | 2020-03-06 17:54:41 +0100 | [diff] [blame] | 191 | pins1 { |
Simon Glass | d3a98cb | 2023-02-13 08:56:33 -0700 | [diff] [blame] | 192 | bootph-pre-ram; |
Patrick Delaunay | 48c5e90 | 2020-03-06 17:54:41 +0100 | [diff] [blame] | 193 | }; |
| 194 | pins2 { |
Simon Glass | d3a98cb | 2023-02-13 08:56:33 -0700 | [diff] [blame] | 195 | bootph-pre-ram; |
Patrick Delaunay | 06020d8 | 2018-03-12 10:46:17 +0100 | [diff] [blame] | 196 | }; |
| 197 | }; |
| 198 | |
| 199 | &sdmmc1_dir_pins_a { |
Simon Glass | d3a98cb | 2023-02-13 08:56:33 -0700 | [diff] [blame] | 200 | bootph-pre-ram; |
Patrick Delaunay | a370530 | 2019-07-11 11:15:28 +0200 | [diff] [blame] | 201 | pins1 { |
Simon Glass | d3a98cb | 2023-02-13 08:56:33 -0700 | [diff] [blame] | 202 | bootph-pre-ram; |
Patrick Delaunay | a370530 | 2019-07-11 11:15:28 +0200 | [diff] [blame] | 203 | }; |
| 204 | pins2 { |
Simon Glass | d3a98cb | 2023-02-13 08:56:33 -0700 | [diff] [blame] | 205 | bootph-pre-ram; |
Patrick Delaunay | 06020d8 | 2018-03-12 10:46:17 +0100 | [diff] [blame] | 206 | }; |
| 207 | }; |
| 208 | |
Patrick Delaunay | a370530 | 2019-07-11 11:15:28 +0200 | [diff] [blame] | 209 | &sdmmc2 { |
Simon Glass | d3a98cb | 2023-02-13 08:56:33 -0700 | [diff] [blame] | 210 | bootph-pre-ram; |
Patrick Delaunay | 06020d8 | 2018-03-12 10:46:17 +0100 | [diff] [blame] | 211 | }; |
Patrick Delaunay | 8d05010 | 2018-03-20 10:54:52 +0100 | [diff] [blame] | 212 | |
Patrick Delaunay | 8d05010 | 2018-03-20 10:54:52 +0100 | [diff] [blame] | 213 | &sdmmc2_b4_pins_a { |
Simon Glass | d3a98cb | 2023-02-13 08:56:33 -0700 | [diff] [blame] | 214 | bootph-pre-ram; |
Patrick Delaunay | 2b0bbf5 | 2019-11-06 16:16:34 +0100 | [diff] [blame] | 215 | pins1 { |
Simon Glass | d3a98cb | 2023-02-13 08:56:33 -0700 | [diff] [blame] | 216 | bootph-pre-ram; |
Patrick Delaunay | 2b0bbf5 | 2019-11-06 16:16:34 +0100 | [diff] [blame] | 217 | }; |
| 218 | pins2 { |
Simon Glass | d3a98cb | 2023-02-13 08:56:33 -0700 | [diff] [blame] | 219 | bootph-pre-ram; |
Patrick Delaunay | 8d05010 | 2018-03-20 10:54:52 +0100 | [diff] [blame] | 220 | }; |
| 221 | }; |
| 222 | |
| 223 | &sdmmc2_d47_pins_a { |
Simon Glass | d3a98cb | 2023-02-13 08:56:33 -0700 | [diff] [blame] | 224 | bootph-pre-ram; |
Patrick Delaunay | 8d05010 | 2018-03-20 10:54:52 +0100 | [diff] [blame] | 225 | pins { |
Simon Glass | d3a98cb | 2023-02-13 08:56:33 -0700 | [diff] [blame] | 226 | bootph-pre-ram; |
Patrick Delaunay | 8d05010 | 2018-03-20 10:54:52 +0100 | [diff] [blame] | 227 | }; |
| 228 | }; |
| 229 | |
Patrice Chotard | 00442d0 | 2019-02-12 16:50:38 +0100 | [diff] [blame] | 230 | &uart4 { |
Simon Glass | d3a98cb | 2023-02-13 08:56:33 -0700 | [diff] [blame] | 231 | bootph-all; |
Patrice Chotard | 00442d0 | 2019-02-12 16:50:38 +0100 | [diff] [blame] | 232 | }; |
| 233 | |
| 234 | &uart4_pins_a { |
Simon Glass | d3a98cb | 2023-02-13 08:56:33 -0700 | [diff] [blame] | 235 | bootph-all; |
Patrice Chotard | 00442d0 | 2019-02-12 16:50:38 +0100 | [diff] [blame] | 236 | pins1 { |
Simon Glass | d3a98cb | 2023-02-13 08:56:33 -0700 | [diff] [blame] | 237 | bootph-all; |
Patrice Chotard | 00442d0 | 2019-02-12 16:50:38 +0100 | [diff] [blame] | 238 | }; |
| 239 | pins2 { |
Simon Glass | d3a98cb | 2023-02-13 08:56:33 -0700 | [diff] [blame] | 240 | bootph-all; |
Patrick Delaunay | 5179a85 | 2019-07-30 19:16:18 +0200 | [diff] [blame] | 241 | /* pull-up on rx to avoid floating level */ |
| 242 | bias-pull-up; |
Patrice Chotard | 00442d0 | 2019-02-12 16:50:38 +0100 | [diff] [blame] | 243 | }; |
| 244 | }; |