blob: ee9b51d42b7bf3e5452f2de37aa99566e8a064de [file] [log] [blame]
Patrice Chotard00442d02019-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>
Patrice Chotardee82a202024-04-09 17:02:04 +02007#include <dt-bindings/input/linux-event-codes.h>
Patrick Delaunay48c5e902020-03-06 17:54:41 +01008#include "stm32mp15-u-boot.dtsi"
Patrice Chotard00442d02019-02-12 16:50:38 +01009#include "stm32mp15-ddr3-1x4Gb-1066-binG.dtsi"
10
11/ {
12 aliases {
13 i2c3 = &i2c4;
Patrick Delaunay58bc0cd2019-03-29 15:42:23 +010014 usb0 = &usbotg_hs;
Patrice Chotard00442d02019-02-12 16:50:38 +010015 };
Patrick Delaunay8d435402023-06-08 17:16:41 +020016
Patrice Chotard00442d02019-02-12 16:50:38 +010017 config {
18 u-boot,boot-led = "heartbeat";
19 u-boot,error-led = "error";
Patrick Delaunay9c88dbf2021-07-26 11:21:36 +020020 u-boot,mmc-env-partition = "fip";
Patrice Chotard00442d02019-02-12 16:50:38 +010021 st,adc_usb_pd = <&adc1 18>, <&adc1 19>;
22 };
Etienne Carrierec461e1a2020-06-05 09:24:30 +020023
Patrick Delaunay4c6fcbc2024-01-15 15:05:57 +010024#if defined(CONFIG_STM32MP15X_STM32IMAGE) || defined(CONFIG_SPL)
Patrick Delaunay9c88dbf2021-07-26 11:21:36 +020025 config {
26 u-boot,mmc-env-partition = "ssbl";
27 };
Patrick Delaunay87e83322021-09-14 14:14:52 +020028#endif
Patrick Delaunay9c88dbf2021-07-26 11:21:36 +020029
Patrick Delaunay4c6fcbc2024-01-15 15:05:57 +010030#ifdef CONFIG_STM32MP15X_STM32IMAGE
Patrick Delaunayf8fcabf2021-07-26 11:21:35 +020031 /* only needed for boot with TF-A, witout FIP support */
Etienne Carrierec461e1a2020-06-05 09:24:30 +020032 firmware {
33 optee {
34 compatible = "linaro,optee-tz";
35 method = "smc";
36 };
37 };
38
39 reserved-memory {
Simon Glassd3a98cb2023-02-13 08:56:33 -070040 bootph-pre-ram;
Alexandru Gagniuc9bf2f5b2021-07-15 14:19:27 -050041
Etienne Carrierec461e1a2020-06-05 09:24:30 +020042 optee@de000000 {
43 reg = <0xde000000 0x02000000>;
44 no-map;
Simon Glassd3a98cb2023-02-13 08:56:33 -070045 bootph-pre-ram;
Etienne Carrierec461e1a2020-06-05 09:24:30 +020046 };
47 };
Patrick Delaunayf8fcabf2021-07-26 11:21:35 +020048#endif
Etienne Carrierec461e1a2020-06-05 09:24:30 +020049
Patrice Chotardee82a202024-04-09 17:02:04 +020050 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 Chotard00442d02019-02-12 16:50:38 +010066 led {
67 red {
68 label = "error";
69 gpios = <&gpioa 13 GPIO_ACTIVE_LOW>;
Patrice Chotard00442d02019-02-12 16:50:38 +010070 status = "okay";
71 };
Patrice Chotard00442d02019-02-12 16:50:38 +010072 };
73};
74
Patrice Chotarde861c202019-02-12 16:50:41 +010075&adc {
Patrice Chotarde861c202019-02-12 16:50:41 +010076 status = "okay";
Patrice Chotarde861c202019-02-12 16:50:41 +010077};
78
Patrice Chotard00442d02019-02-12 16:50:38 +010079&clk_hse {
80 st,digbypass;
81};
82
83&i2c4 {
Simon Glassd3a98cb2023-02-13 08:56:33 -070084 bootph-all;
Patrice Chotard00442d02019-02-12 16:50:38 +010085};
86
87&i2c4_pins_a {
Simon Glassd3a98cb2023-02-13 08:56:33 -070088 bootph-all;
Patrice Chotard00442d02019-02-12 16:50:38 +010089 pins {
Simon Glassd3a98cb2023-02-13 08:56:33 -070090 bootph-all;
Patrice Chotard00442d02019-02-12 16:50:38 +010091 };
92};
93
94&pmic {
Simon Glassd3a98cb2023-02-13 08:56:33 -070095 bootph-all;
Patrice Chotard00442d02019-02-12 16:50:38 +010096};
97
98&rcc {
99 st,clksrc = <
100 CLK_MPU_PLL1P
101 CLK_AXI_PLL2P
102 CLK_MCU_PLL3P
103 CLK_PLL12_HSE
104 CLK_PLL3_HSE
105 CLK_PLL4_HSE
106 CLK_RTC_LSE
107 CLK_MCO1_DISABLED
108 CLK_MCO2_DISABLED
109 >;
110
111 st,clkdiv = <
112 1 /*MPU*/
113 0 /*AXI*/
114 0 /*MCU*/
115 1 /*APB1*/
116 1 /*APB2*/
117 1 /*APB3*/
118 1 /*APB4*/
119 2 /*APB5*/
120 23 /*RTC*/
121 0 /*MCO1*/
122 0 /*MCO2*/
123 >;
124
125 st,pkcs = <
126 CLK_CKPER_HSE
127 CLK_FMC_ACLK
128 CLK_QSPI_ACLK
129 CLK_ETH_DISABLED
130 CLK_SDMMC12_PLL4P
131 CLK_DSI_DSIPLL
132 CLK_STGEN_HSE
133 CLK_USBPHY_HSE
134 CLK_SPI2S1_PLL3Q
135 CLK_SPI2S23_PLL3Q
136 CLK_SPI45_HSI
137 CLK_SPI6_HSI
138 CLK_I2C46_HSI
139 CLK_SDMMC3_PLL4P
140 CLK_USBO_USBPHY
141 CLK_ADC_CKPER
142 CLK_CEC_LSE
143 CLK_I2C12_HSI
144 CLK_I2C35_HSI
145 CLK_UART1_HSI
146 CLK_UART24_HSI
147 CLK_UART35_HSI
148 CLK_UART6_HSI
149 CLK_UART78_HSI
150 CLK_SPDIF_PLL4P
Antonio Borneo84159e82020-01-28 10:11:01 +0100151 CLK_FDCAN_PLL4R
Patrice Chotard00442d02019-02-12 16:50:38 +0100152 CLK_SAI1_PLL3Q
153 CLK_SAI2_PLL3Q
154 CLK_SAI3_PLL3Q
155 CLK_SAI4_PLL3Q
156 CLK_RNG1_LSI
157 CLK_RNG2_LSI
158 CLK_LPTIM1_PCLK1
159 CLK_LPTIM23_PCLK3
160 CLK_LPTIM45_LSE
161 >;
162
Patrice Chotard00442d02019-02-12 16:50:38 +0100163 /* VCO = 1066.0 MHz => P = 266 (AXI), Q = 533 (GPU), R = 533 (DDR) */
164 pll2: st,pll@1 {
Patrick Delaunayc22caac2020-01-28 10:11:03 +0100165 compatible = "st,stm32mp1-pll";
166 reg = <1>;
Patrice Chotard00442d02019-02-12 16:50:38 +0100167 cfg = < 2 65 1 0 0 PQR(1,1,1) >;
168 frac = < 0x1400 >;
Simon Glassd3a98cb2023-02-13 08:56:33 -0700169 bootph-all;
Patrice Chotard00442d02019-02-12 16:50:38 +0100170 };
171
172 /* VCO = 417.8 MHz => P = 209, Q = 24, R = 11 */
173 pll3: st,pll@2 {
Patrick Delaunayc22caac2020-01-28 10:11:03 +0100174 compatible = "st,stm32mp1-pll";
175 reg = <2>;
Patrice Chotard00442d02019-02-12 16:50:38 +0100176 cfg = < 1 33 1 16 36 PQR(1,1,1) >;
177 frac = < 0x1a04 >;
Simon Glassd3a98cb2023-02-13 08:56:33 -0700178 bootph-all;
Patrice Chotard00442d02019-02-12 16:50:38 +0100179 };
180
181 /* VCO = 594.0 MHz => P = 99, Q = 74, R = 74 */
182 pll4: st,pll@3 {
Patrick Delaunayc22caac2020-01-28 10:11:03 +0100183 compatible = "st,stm32mp1-pll";
184 reg = <3>;
Patrice Chotard00442d02019-02-12 16:50:38 +0100185 cfg = < 3 98 5 7 7 PQR(1,1,1) >;
Simon Glassd3a98cb2023-02-13 08:56:33 -0700186 bootph-all;
Patrice Chotard00442d02019-02-12 16:50:38 +0100187 };
188};
189
190&sdmmc1 {
Simon Glassd3a98cb2023-02-13 08:56:33 -0700191 bootph-pre-ram;
Patrice Chotard00442d02019-02-12 16:50:38 +0100192};
193
194&sdmmc1_b4_pins_a {
Simon Glassd3a98cb2023-02-13 08:56:33 -0700195 bootph-pre-ram;
Patrick Delaunay48c5e902020-03-06 17:54:41 +0100196 pins1 {
Simon Glassd3a98cb2023-02-13 08:56:33 -0700197 bootph-pre-ram;
Patrick Delaunay48c5e902020-03-06 17:54:41 +0100198 };
199 pins2 {
Simon Glassd3a98cb2023-02-13 08:56:33 -0700200 bootph-pre-ram;
Patrice Chotard00442d02019-02-12 16:50:38 +0100201 };
202};
203
204&uart4 {
Simon Glassd3a98cb2023-02-13 08:56:33 -0700205 bootph-all;
Patrice Chotard00442d02019-02-12 16:50:38 +0100206};
207
208&uart4_pins_a {
Simon Glassd3a98cb2023-02-13 08:56:33 -0700209 bootph-all;
Patrice Chotard00442d02019-02-12 16:50:38 +0100210 pins1 {
Simon Glassd3a98cb2023-02-13 08:56:33 -0700211 bootph-all;
Patrice Chotard00442d02019-02-12 16:50:38 +0100212 };
213 pins2 {
Simon Glassd3a98cb2023-02-13 08:56:33 -0700214 bootph-all;
Patrick Delaunay5179a852019-07-30 19:16:18 +0200215 /* pull-up on rx to avoid floating level */
216 bias-pull-up;
Patrice Chotard00442d02019-02-12 16:50:38 +0100217 };
218};
219
220&usbotg_hs {
Patrick Delaunay7f3384d2019-03-29 15:42:24 +0100221 u-boot,force-b-session-valid;
Patrice Chotard00442d02019-02-12 16:50:38 +0100222};