blob: 2623cebf21a4cc1153fe3319c0583f37e7edec4c [file] [log] [blame]
Patrice Chotard23661602019-02-12 16:50:38 +01001// 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 Delaunay1a4f57c2020-03-06 17:54:41 +01007#include "stm32mp15-u-boot.dtsi"
Patrice Chotard23661602019-02-12 16:50:38 +01008#include "stm32mp15-ddr3-1x4Gb-1066-binG.dtsi"
9
10/ {
11 aliases {
12 i2c3 = &i2c4;
Patrick Delaunayc31000c2019-03-29 15:42:23 +010013 usb0 = &usbotg_hs;
Patrice Chotard23661602019-02-12 16:50:38 +010014 };
Patrick Delaunayc8532a02023-06-08 17:16:41 +020015
Patrice Chotard23661602019-02-12 16:50:38 +010016 config {
17 u-boot,boot-led = "heartbeat";
18 u-boot,error-led = "error";
Patrick Delaunayb73e8bf2021-07-26 11:21:36 +020019 u-boot,mmc-env-partition = "fip";
Patrice Chotard23661602019-02-12 16:50:38 +010020 st,adc_usb_pd = <&adc1 18>, <&adc1 19>;
Patrick Delaunay2a7034c2021-07-09 09:53:37 +020021 st,fastboot-gpios = <&gpioa 13 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>;
22 st,stm32prog-gpios = <&gpioa 14 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>;
Patrice Chotard23661602019-02-12 16:50:38 +010023 };
Etienne Carriere9e696962020-06-05 09:24:30 +020024
Patrick Delaunaycf39d0c2021-09-14 14:14:52 +020025#if defined(CONFIG_STM32MP15x_STM32IMAGE) || defined(CONFIG_SPL)
Patrick Delaunayb73e8bf2021-07-26 11:21:36 +020026 config {
27 u-boot,mmc-env-partition = "ssbl";
28 };
Patrick Delaunaycf39d0c2021-09-14 14:14:52 +020029#endif
Patrick Delaunayb73e8bf2021-07-26 11:21:36 +020030
Patrick Delaunaycf39d0c2021-09-14 14:14:52 +020031#ifdef CONFIG_STM32MP15x_STM32IMAGE
Patrick Delaunayf91783e2021-07-26 11:21:35 +020032 /* only needed for boot with TF-A, witout FIP support */
Etienne Carriere9e696962020-06-05 09:24:30 +020033 firmware {
34 optee {
35 compatible = "linaro,optee-tz";
36 method = "smc";
37 };
38 };
39
40 reserved-memory {
Simon Glass8c103c32023-02-13 08:56:33 -070041 bootph-pre-ram;
Alexandru Gagniuc65b3f562021-07-15 14:19:27 -050042
Etienne Carriere9e696962020-06-05 09:24:30 +020043 optee@de000000 {
44 reg = <0xde000000 0x02000000>;
45 no-map;
Simon Glass8c103c32023-02-13 08:56:33 -070046 bootph-pre-ram;
Etienne Carriere9e696962020-06-05 09:24:30 +020047 };
48 };
Patrick Delaunayf91783e2021-07-26 11:21:35 +020049#endif
Etienne Carriere9e696962020-06-05 09:24:30 +020050
Patrice Chotard23661602019-02-12 16:50:38 +010051 led {
52 red {
53 label = "error";
54 gpios = <&gpioa 13 GPIO_ACTIVE_LOW>;
55 default-state = "off";
56 status = "okay";
57 };
Patrice Chotard23661602019-02-12 16:50:38 +010058 };
59};
60
Patrice Chotard77457fa2019-02-12 16:50:41 +010061&adc {
Patrice Chotard77457fa2019-02-12 16:50:41 +010062 status = "okay";
Patrice Chotard77457fa2019-02-12 16:50:41 +010063};
64
Patrice Chotard23661602019-02-12 16:50:38 +010065&clk_hse {
66 st,digbypass;
67};
68
69&i2c4 {
Simon Glass8c103c32023-02-13 08:56:33 -070070 bootph-all;
Patrice Chotard23661602019-02-12 16:50:38 +010071};
72
73&i2c4_pins_a {
Simon Glass8c103c32023-02-13 08:56:33 -070074 bootph-all;
Patrice Chotard23661602019-02-12 16:50:38 +010075 pins {
Simon Glass8c103c32023-02-13 08:56:33 -070076 bootph-all;
Patrice Chotard23661602019-02-12 16:50:38 +010077 };
78};
79
80&pmic {
Simon Glass8c103c32023-02-13 08:56:33 -070081 bootph-all;
Patrice Chotard23661602019-02-12 16:50:38 +010082};
83
84&rcc {
85 st,clksrc = <
86 CLK_MPU_PLL1P
87 CLK_AXI_PLL2P
88 CLK_MCU_PLL3P
89 CLK_PLL12_HSE
90 CLK_PLL3_HSE
91 CLK_PLL4_HSE
92 CLK_RTC_LSE
93 CLK_MCO1_DISABLED
94 CLK_MCO2_DISABLED
95 >;
96
97 st,clkdiv = <
98 1 /*MPU*/
99 0 /*AXI*/
100 0 /*MCU*/
101 1 /*APB1*/
102 1 /*APB2*/
103 1 /*APB3*/
104 1 /*APB4*/
105 2 /*APB5*/
106 23 /*RTC*/
107 0 /*MCO1*/
108 0 /*MCO2*/
109 >;
110
111 st,pkcs = <
112 CLK_CKPER_HSE
113 CLK_FMC_ACLK
114 CLK_QSPI_ACLK
115 CLK_ETH_DISABLED
116 CLK_SDMMC12_PLL4P
117 CLK_DSI_DSIPLL
118 CLK_STGEN_HSE
119 CLK_USBPHY_HSE
120 CLK_SPI2S1_PLL3Q
121 CLK_SPI2S23_PLL3Q
122 CLK_SPI45_HSI
123 CLK_SPI6_HSI
124 CLK_I2C46_HSI
125 CLK_SDMMC3_PLL4P
126 CLK_USBO_USBPHY
127 CLK_ADC_CKPER
128 CLK_CEC_LSE
129 CLK_I2C12_HSI
130 CLK_I2C35_HSI
131 CLK_UART1_HSI
132 CLK_UART24_HSI
133 CLK_UART35_HSI
134 CLK_UART6_HSI
135 CLK_UART78_HSI
136 CLK_SPDIF_PLL4P
Antonio Borneodb0cd2d2020-01-28 10:11:01 +0100137 CLK_FDCAN_PLL4R
Patrice Chotard23661602019-02-12 16:50:38 +0100138 CLK_SAI1_PLL3Q
139 CLK_SAI2_PLL3Q
140 CLK_SAI3_PLL3Q
141 CLK_SAI4_PLL3Q
142 CLK_RNG1_LSI
143 CLK_RNG2_LSI
144 CLK_LPTIM1_PCLK1
145 CLK_LPTIM23_PCLK3
146 CLK_LPTIM45_LSE
147 >;
148
Patrice Chotard23661602019-02-12 16:50:38 +0100149 /* VCO = 1066.0 MHz => P = 266 (AXI), Q = 533 (GPU), R = 533 (DDR) */
150 pll2: st,pll@1 {
Patrick Delaunay8d93a972020-01-28 10:11:03 +0100151 compatible = "st,stm32mp1-pll";
152 reg = <1>;
Patrice Chotard23661602019-02-12 16:50:38 +0100153 cfg = < 2 65 1 0 0 PQR(1,1,1) >;
154 frac = < 0x1400 >;
Simon Glass8c103c32023-02-13 08:56:33 -0700155 bootph-all;
Patrice Chotard23661602019-02-12 16:50:38 +0100156 };
157
158 /* VCO = 417.8 MHz => P = 209, Q = 24, R = 11 */
159 pll3: st,pll@2 {
Patrick Delaunay8d93a972020-01-28 10:11:03 +0100160 compatible = "st,stm32mp1-pll";
161 reg = <2>;
Patrice Chotard23661602019-02-12 16:50:38 +0100162 cfg = < 1 33 1 16 36 PQR(1,1,1) >;
163 frac = < 0x1a04 >;
Simon Glass8c103c32023-02-13 08:56:33 -0700164 bootph-all;
Patrice Chotard23661602019-02-12 16:50:38 +0100165 };
166
167 /* VCO = 594.0 MHz => P = 99, Q = 74, R = 74 */
168 pll4: st,pll@3 {
Patrick Delaunay8d93a972020-01-28 10:11:03 +0100169 compatible = "st,stm32mp1-pll";
170 reg = <3>;
Patrice Chotard23661602019-02-12 16:50:38 +0100171 cfg = < 3 98 5 7 7 PQR(1,1,1) >;
Simon Glass8c103c32023-02-13 08:56:33 -0700172 bootph-all;
Patrice Chotard23661602019-02-12 16:50:38 +0100173 };
174};
175
176&sdmmc1 {
Simon Glass8c103c32023-02-13 08:56:33 -0700177 bootph-pre-ram;
Patrice Chotard23661602019-02-12 16:50:38 +0100178};
179
180&sdmmc1_b4_pins_a {
Simon Glass8c103c32023-02-13 08:56:33 -0700181 bootph-pre-ram;
Patrick Delaunay1a4f57c2020-03-06 17:54:41 +0100182 pins1 {
Simon Glass8c103c32023-02-13 08:56:33 -0700183 bootph-pre-ram;
Patrick Delaunay1a4f57c2020-03-06 17:54:41 +0100184 };
185 pins2 {
Simon Glass8c103c32023-02-13 08:56:33 -0700186 bootph-pre-ram;
Patrice Chotard23661602019-02-12 16:50:38 +0100187 };
188};
189
190&uart4 {
Simon Glass8c103c32023-02-13 08:56:33 -0700191 bootph-all;
Patrice Chotard23661602019-02-12 16:50:38 +0100192};
193
194&uart4_pins_a {
Simon Glass8c103c32023-02-13 08:56:33 -0700195 bootph-all;
Patrice Chotard23661602019-02-12 16:50:38 +0100196 pins1 {
Simon Glass8c103c32023-02-13 08:56:33 -0700197 bootph-all;
Patrice Chotard23661602019-02-12 16:50:38 +0100198 };
199 pins2 {
Simon Glass8c103c32023-02-13 08:56:33 -0700200 bootph-all;
Patrick Delaunay7acda7e2019-07-30 19:16:18 +0200201 /* pull-up on rx to avoid floating level */
202 bias-pull-up;
Patrice Chotard23661602019-02-12 16:50:38 +0100203 };
204};
205
206&usbotg_hs {
Patrick Delaunay6fe7dd32019-03-29 15:42:24 +0100207 u-boot,force-b-session-valid;
Patrice Chotard23661602019-02-12 16:50:38 +0100208};