blob: ef91088aa375d6c6251ba22bdae399b0b0b1fa89 [file] [log] [blame]
Tom Rini4549e782018-05-06 18:27:01 -04001// SPDX-License-Identifier: GPL-2.0+ OR BSD-3-Clause
Patrick Delaunay3d2d1152018-03-12 10:46:17 +01002/*
3 * Copyright : STMicroelectronics 2018
Patrick Delaunay3d2d1152018-03-12 10:46:17 +01004 */
5
6#include <dt-bindings/clock/stm32mp1-clksrc.h>
Patrick Delaunay1a4f57c2020-03-06 17:54:41 +01007#include "stm32mp15-u-boot.dtsi"
Patrick Delaunay3d2d1152018-03-12 10:46:17 +01008#include "stm32mp15-ddr3-2x4Gb-1066-binG.dtsi"
9
10/ {
11 aliases {
Patrice Chotard23661602019-02-12 16:50:38 +010012 i2c3 = &i2c4;
Patrick Delaunay3d2d1152018-03-12 10:46:17 +010013 };
Patrick Delaunay8e166512018-07-27 16:37:05 +020014
Patrick Delaunay9a2ba282019-02-27 17:01:20 +010015 config {
Patrick Delaunaydd281082019-07-30 19:16:39 +020016 u-boot,boot-led = "heartbeat";
17 u-boot,error-led = "error";
Patrick Delaunayb73e8bf2021-07-26 11:21:36 +020018 u-boot,mmc-env-partition = "fip";
Patrick Delaunay2a7034c2021-07-09 09:53:37 +020019 st,fastboot-gpios = <&gpioa 13 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>;
20 st,stm32prog-gpios = <&gpioa 14 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>;
Patrick Delaunay9a2ba282019-02-27 17:01:20 +010021 };
22
Patrick Delaunay9f1dc112024-01-15 15:05:57 +010023#if defined(CONFIG_STM32MP15X_STM32IMAGE) || defined(CONFIG_SPL)
Patrick Delaunayb73e8bf2021-07-26 11:21:36 +020024 config {
25 u-boot,mmc-env-partition = "ssbl";
26 };
Patrick Delaunaycf39d0c2021-09-14 14:14:52 +020027#endif
Patrick Delaunayb73e8bf2021-07-26 11:21:36 +020028
Patrick Delaunay9f1dc112024-01-15 15:05:57 +010029#ifdef CONFIG_STM32MP15X_STM32IMAGE
Patrick Delaunayf91783e2021-07-26 11:21:35 +020030 /* only needed for boot with TF-A, witout FIP support */
Etienne Carriere9e696962020-06-05 09:24:30 +020031 firmware {
32 optee {
33 compatible = "linaro,optee-tz";
34 method = "smc";
35 };
36 };
37
38 reserved-memory {
39 optee@fe000000 {
40 reg = <0xfe000000 0x02000000>;
41 no-map;
42 };
43 };
Patrick Delaunayf91783e2021-07-26 11:21:35 +020044#endif
Etienne Carriere9e696962020-06-05 09:24:30 +020045
Patrick Delaunay8e166512018-07-27 16:37:05 +020046 led {
Patrick Delaunay8e166512018-07-27 16:37:05 +020047 red {
Patrick Delaunaydd281082019-07-30 19:16:39 +020048 label = "error";
Patrick Delaunay8e166512018-07-27 16:37:05 +020049 gpios = <&gpioa 13 GPIO_ACTIVE_LOW>;
50 default-state = "off";
Patrick Delaunaydd281082019-07-30 19:16:39 +020051 status = "okay";
Patrick Delaunay8e166512018-07-27 16:37:05 +020052 };
Patrick Delaunay8e166512018-07-27 16:37:05 +020053 };
Patrick Delaunay3d2d1152018-03-12 10:46:17 +010054};
55
Patrick Delaunaye74b74c2019-01-30 13:07:05 +010056&clk_hse {
57 st,digbypass;
58};
59
Patrice Chotard23661602019-02-12 16:50:38 +010060&i2c4 {
Simon Glass8c103c32023-02-13 08:56:33 -070061 bootph-all;
Patrick Delaunay3d2d1152018-03-12 10:46:17 +010062};
63
64&i2c4_pins_a {
Simon Glass8c103c32023-02-13 08:56:33 -070065 bootph-all;
Patrick Delaunay3d2d1152018-03-12 10:46:17 +010066 pins {
Simon Glass8c103c32023-02-13 08:56:33 -070067 bootph-all;
Patrick Delaunay3d2d1152018-03-12 10:46:17 +010068 };
69};
70
Patrick Delaunay3d2d1152018-03-12 10:46:17 +010071&pmic {
Simon Glass8c103c32023-02-13 08:56:33 -070072 bootph-all;
Patrick Delaunay3d2d1152018-03-12 10:46:17 +010073};
74
Patrick Delaunaya6743132018-07-09 15:17:19 +020075&rcc {
Patrick Delaunay3d2d1152018-03-12 10:46:17 +010076 st,clksrc = <
77 CLK_MPU_PLL1P
78 CLK_AXI_PLL2P
79 CLK_MCU_PLL3P
80 CLK_PLL12_HSE
81 CLK_PLL3_HSE
82 CLK_PLL4_HSE
83 CLK_RTC_LSE
84 CLK_MCO1_DISABLED
85 CLK_MCO2_DISABLED
86 >;
87
88 st,clkdiv = <
89 1 /*MPU*/
90 0 /*AXI*/
91 0 /*MCU*/
92 1 /*APB1*/
93 1 /*APB2*/
94 1 /*APB3*/
95 1 /*APB4*/
96 2 /*APB5*/
97 23 /*RTC*/
98 0 /*MCO1*/
99 0 /*MCO2*/
100 >;
101
102 st,pkcs = <
Patrick Delaunay8a07d5b2018-07-09 15:17:24 +0200103 CLK_CKPER_HSE
104 CLK_FMC_ACLK
105 CLK_QSPI_ACLK
106 CLK_ETH_DISABLED
Patrick Delaunaye74b74c2019-01-30 13:07:05 +0100107 CLK_SDMMC12_PLL4P
Patrick Delaunay8a07d5b2018-07-09 15:17:24 +0200108 CLK_DSI_DSIPLL
Patrick Delaunayb90f0e72018-03-20 11:41:26 +0100109 CLK_STGEN_HSE
Patrick Delaunay8a07d5b2018-07-09 15:17:24 +0200110 CLK_USBPHY_HSE
111 CLK_SPI2S1_PLL3Q
112 CLK_SPI2S23_PLL3Q
113 CLK_SPI45_HSI
114 CLK_SPI6_HSI
115 CLK_I2C46_HSI
Patrick Delaunaye74b74c2019-01-30 13:07:05 +0100116 CLK_SDMMC3_PLL4P
Patrick Delaunay8a07d5b2018-07-09 15:17:24 +0200117 CLK_USBO_USBPHY
118 CLK_ADC_CKPER
119 CLK_CEC_LSE
120 CLK_I2C12_HSI
121 CLK_I2C35_HSI
122 CLK_UART1_HSI
123 CLK_UART24_HSI
124 CLK_UART35_HSI
125 CLK_UART6_HSI
126 CLK_UART78_HSI
Patrick Delaunaye74b74c2019-01-30 13:07:05 +0100127 CLK_SPDIF_PLL4P
Antonio Borneodb0cd2d2020-01-28 10:11:01 +0100128 CLK_FDCAN_PLL4R
Patrick Delaunay8a07d5b2018-07-09 15:17:24 +0200129 CLK_SAI1_PLL3Q
130 CLK_SAI2_PLL3Q
131 CLK_SAI3_PLL3Q
132 CLK_SAI4_PLL3Q
Patrick Delaunaye74b74c2019-01-30 13:07:05 +0100133 CLK_RNG1_LSI
134 CLK_RNG2_LSI
Patrick Delaunay8a07d5b2018-07-09 15:17:24 +0200135 CLK_LPTIM1_PCLK1
136 CLK_LPTIM23_PCLK3
Patrick Delaunaye74b74c2019-01-30 13:07:05 +0100137 CLK_LPTIM45_LSE
Patrick Delaunay3d2d1152018-03-12 10:46:17 +0100138 >;
139
Patrick Delaunay3d2d1152018-03-12 10:46:17 +0100140 /* VCO = 1066.0 MHz => P = 266 (AXI), Q = 533 (GPU), R = 533 (DDR) */
141 pll2: st,pll@1 {
Patrick Delaunay8d93a972020-01-28 10:11:03 +0100142 compatible = "st,stm32mp1-pll";
143 reg = <1>;
Patrick Delaunay3d2d1152018-03-12 10:46:17 +0100144 cfg = < 2 65 1 0 0 PQR(1,1,1) >;
145 frac = < 0x1400 >;
Simon Glass8c103c32023-02-13 08:56:33 -0700146 bootph-all;
Patrick Delaunay3d2d1152018-03-12 10:46:17 +0100147 };
148
Patrick Delaunaye74b74c2019-01-30 13:07:05 +0100149 /* VCO = 417.8 MHz => P = 209, Q = 24, R = 11 */
Patrick Delaunay3d2d1152018-03-12 10:46:17 +0100150 pll3: st,pll@2 {
Patrick Delaunay8d93a972020-01-28 10:11:03 +0100151 compatible = "st,stm32mp1-pll";
152 reg = <2>;
Patrick Delaunaye74b74c2019-01-30 13:07:05 +0100153 cfg = < 1 33 1 16 36 PQR(1,1,1) >;
154 frac = < 0x1a04 >;
Simon Glass8c103c32023-02-13 08:56:33 -0700155 bootph-all;
Patrick Delaunay3d2d1152018-03-12 10:46:17 +0100156 };
157
Patrick Delaunaye74b74c2019-01-30 13:07:05 +0100158 /* VCO = 594.0 MHz => P = 99, Q = 74, R = 74 */
Patrick Delaunay3d2d1152018-03-12 10:46:17 +0100159 pll4: st,pll@3 {
Patrick Delaunay8d93a972020-01-28 10:11:03 +0100160 compatible = "st,stm32mp1-pll";
161 reg = <3>;
Patrick Delaunaye74b74c2019-01-30 13:07:05 +0100162 cfg = < 3 98 5 7 7 PQR(1,1,1) >;
Simon Glass8c103c32023-02-13 08:56:33 -0700163 bootph-all;
Patrick Delaunay3d2d1152018-03-12 10:46:17 +0100164 };
165};
166
Patrick Delaunay35a54d42019-07-11 11:15:28 +0200167&sdmmc1 {
Simon Glass8c103c32023-02-13 08:56:33 -0700168 bootph-pre-ram;
Patrick Delaunay35a54d42019-07-11 11:15:28 +0200169};
170
Patrick Delaunay3d2d1152018-03-12 10:46:17 +0100171&sdmmc1_b4_pins_a {
Simon Glass8c103c32023-02-13 08:56:33 -0700172 bootph-pre-ram;
Patrick Delaunay1a4f57c2020-03-06 17:54:41 +0100173 pins1 {
Simon Glass8c103c32023-02-13 08:56:33 -0700174 bootph-pre-ram;
Patrick Delaunay1a4f57c2020-03-06 17:54:41 +0100175 };
176 pins2 {
Simon Glass8c103c32023-02-13 08:56:33 -0700177 bootph-pre-ram;
Patrick Delaunay3d2d1152018-03-12 10:46:17 +0100178 };
179};
180
181&sdmmc1_dir_pins_a {
Simon Glass8c103c32023-02-13 08:56:33 -0700182 bootph-pre-ram;
Patrick Delaunay35a54d42019-07-11 11:15:28 +0200183 pins1 {
Simon Glass8c103c32023-02-13 08:56:33 -0700184 bootph-pre-ram;
Patrick Delaunay35a54d42019-07-11 11:15:28 +0200185 };
186 pins2 {
Simon Glass8c103c32023-02-13 08:56:33 -0700187 bootph-pre-ram;
Patrick Delaunay3d2d1152018-03-12 10:46:17 +0100188 };
189};
190
Patrick Delaunay35a54d42019-07-11 11:15:28 +0200191&sdmmc2 {
Simon Glass8c103c32023-02-13 08:56:33 -0700192 bootph-pre-ram;
Patrick Delaunay3d2d1152018-03-12 10:46:17 +0100193};
Patrick Delaunay0ed232b2018-03-20 10:54:52 +0100194
Patrick Delaunay0ed232b2018-03-20 10:54:52 +0100195&sdmmc2_b4_pins_a {
Simon Glass8c103c32023-02-13 08:56:33 -0700196 bootph-pre-ram;
Patrick Delaunay4d7d0e22019-11-06 16:16:34 +0100197 pins1 {
Simon Glass8c103c32023-02-13 08:56:33 -0700198 bootph-pre-ram;
Patrick Delaunay4d7d0e22019-11-06 16:16:34 +0100199 };
200 pins2 {
Simon Glass8c103c32023-02-13 08:56:33 -0700201 bootph-pre-ram;
Patrick Delaunay0ed232b2018-03-20 10:54:52 +0100202 };
203};
204
205&sdmmc2_d47_pins_a {
Simon Glass8c103c32023-02-13 08:56:33 -0700206 bootph-pre-ram;
Patrick Delaunay0ed232b2018-03-20 10:54:52 +0100207 pins {
Simon Glass8c103c32023-02-13 08:56:33 -0700208 bootph-pre-ram;
Patrick Delaunay0ed232b2018-03-20 10:54:52 +0100209 };
210};
211
Patrice Chotard23661602019-02-12 16:50:38 +0100212&uart4 {
Simon Glass8c103c32023-02-13 08:56:33 -0700213 bootph-all;
Patrice Chotard23661602019-02-12 16:50:38 +0100214};
215
216&uart4_pins_a {
Simon Glass8c103c32023-02-13 08:56:33 -0700217 bootph-all;
Patrice Chotard23661602019-02-12 16:50:38 +0100218 pins1 {
Simon Glass8c103c32023-02-13 08:56:33 -0700219 bootph-all;
Patrice Chotard23661602019-02-12 16:50:38 +0100220 };
221 pins2 {
Simon Glass8c103c32023-02-13 08:56:33 -0700222 bootph-all;
Patrick Delaunay7acda7e2019-07-30 19:16:18 +0200223 /* pull-up on rx to avoid floating level */
224 bias-pull-up;
Patrice Chotard23661602019-02-12 16:50:38 +0100225 };
226};