blob: 92153b2a65730fd3e6abe3b2db73c543d158785e [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";
Patrice Chotardda15d0b2024-04-09 17:02:06 +020019 u-boot,error-led = "led-red";
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 {
Patrice Chotardda15d0b2024-04-09 17:02:06 +020067 led-red {
Patrice Chotard00442d02019-02-12 16:50:38 +010068 gpios = <&gpioa 13 GPIO_ACTIVE_LOW>;
Patrice Chotard00442d02019-02-12 16:50:38 +010069 };
Patrice Chotard00442d02019-02-12 16:50:38 +010070 };
71};
72
Patrice Chotarde861c202019-02-12 16:50:41 +010073&adc {
Patrice Chotarde861c202019-02-12 16:50:41 +010074 status = "okay";
Patrice Chotarde861c202019-02-12 16:50:41 +010075};
76
Patrice Chotard00442d02019-02-12 16:50:38 +010077&clk_hse {
78 st,digbypass;
79};
80
81&i2c4 {
Simon Glassd3a98cb2023-02-13 08:56:33 -070082 bootph-all;
Patrice Chotard00442d02019-02-12 16:50:38 +010083};
84
85&i2c4_pins_a {
Simon Glassd3a98cb2023-02-13 08:56:33 -070086 bootph-all;
Patrice Chotard00442d02019-02-12 16:50:38 +010087 pins {
Simon Glassd3a98cb2023-02-13 08:56:33 -070088 bootph-all;
Patrice Chotard00442d02019-02-12 16:50:38 +010089 };
90};
91
92&pmic {
Simon Glassd3a98cb2023-02-13 08:56:33 -070093 bootph-all;
Patrice Chotard00442d02019-02-12 16:50:38 +010094};
95
96&rcc {
97 st,clksrc = <
98 CLK_MPU_PLL1P
99 CLK_AXI_PLL2P
100 CLK_MCU_PLL3P
101 CLK_PLL12_HSE
102 CLK_PLL3_HSE
103 CLK_PLL4_HSE
104 CLK_RTC_LSE
105 CLK_MCO1_DISABLED
106 CLK_MCO2_DISABLED
107 >;
108
109 st,clkdiv = <
110 1 /*MPU*/
111 0 /*AXI*/
112 0 /*MCU*/
113 1 /*APB1*/
114 1 /*APB2*/
115 1 /*APB3*/
116 1 /*APB4*/
117 2 /*APB5*/
118 23 /*RTC*/
119 0 /*MCO1*/
120 0 /*MCO2*/
121 >;
122
123 st,pkcs = <
124 CLK_CKPER_HSE
125 CLK_FMC_ACLK
126 CLK_QSPI_ACLK
127 CLK_ETH_DISABLED
128 CLK_SDMMC12_PLL4P
129 CLK_DSI_DSIPLL
130 CLK_STGEN_HSE
131 CLK_USBPHY_HSE
132 CLK_SPI2S1_PLL3Q
133 CLK_SPI2S23_PLL3Q
134 CLK_SPI45_HSI
135 CLK_SPI6_HSI
136 CLK_I2C46_HSI
137 CLK_SDMMC3_PLL4P
138 CLK_USBO_USBPHY
139 CLK_ADC_CKPER
140 CLK_CEC_LSE
141 CLK_I2C12_HSI
142 CLK_I2C35_HSI
143 CLK_UART1_HSI
144 CLK_UART24_HSI
145 CLK_UART35_HSI
146 CLK_UART6_HSI
147 CLK_UART78_HSI
148 CLK_SPDIF_PLL4P
Antonio Borneo84159e82020-01-28 10:11:01 +0100149 CLK_FDCAN_PLL4R
Patrice Chotard00442d02019-02-12 16:50:38 +0100150 CLK_SAI1_PLL3Q
151 CLK_SAI2_PLL3Q
152 CLK_SAI3_PLL3Q
153 CLK_SAI4_PLL3Q
154 CLK_RNG1_LSI
155 CLK_RNG2_LSI
156 CLK_LPTIM1_PCLK1
157 CLK_LPTIM23_PCLK3
158 CLK_LPTIM45_LSE
159 >;
160
Patrice Chotard00442d02019-02-12 16:50:38 +0100161 /* VCO = 1066.0 MHz => P = 266 (AXI), Q = 533 (GPU), R = 533 (DDR) */
162 pll2: st,pll@1 {
Patrick Delaunayc22caac2020-01-28 10:11:03 +0100163 compatible = "st,stm32mp1-pll";
164 reg = <1>;
Patrice Chotard00442d02019-02-12 16:50:38 +0100165 cfg = < 2 65 1 0 0 PQR(1,1,1) >;
166 frac = < 0x1400 >;
Simon Glassd3a98cb2023-02-13 08:56:33 -0700167 bootph-all;
Patrice Chotard00442d02019-02-12 16:50:38 +0100168 };
169
170 /* VCO = 417.8 MHz => P = 209, Q = 24, R = 11 */
171 pll3: st,pll@2 {
Patrick Delaunayc22caac2020-01-28 10:11:03 +0100172 compatible = "st,stm32mp1-pll";
173 reg = <2>;
Patrice Chotard00442d02019-02-12 16:50:38 +0100174 cfg = < 1 33 1 16 36 PQR(1,1,1) >;
175 frac = < 0x1a04 >;
Simon Glassd3a98cb2023-02-13 08:56:33 -0700176 bootph-all;
Patrice Chotard00442d02019-02-12 16:50:38 +0100177 };
178
179 /* VCO = 594.0 MHz => P = 99, Q = 74, R = 74 */
180 pll4: st,pll@3 {
Patrick Delaunayc22caac2020-01-28 10:11:03 +0100181 compatible = "st,stm32mp1-pll";
182 reg = <3>;
Patrice Chotard00442d02019-02-12 16:50:38 +0100183 cfg = < 3 98 5 7 7 PQR(1,1,1) >;
Simon Glassd3a98cb2023-02-13 08:56:33 -0700184 bootph-all;
Patrice Chotard00442d02019-02-12 16:50:38 +0100185 };
186};
187
188&sdmmc1 {
Simon Glassd3a98cb2023-02-13 08:56:33 -0700189 bootph-pre-ram;
Patrice Chotard00442d02019-02-12 16:50:38 +0100190};
191
192&sdmmc1_b4_pins_a {
Simon Glassd3a98cb2023-02-13 08:56:33 -0700193 bootph-pre-ram;
Patrick Delaunay48c5e902020-03-06 17:54:41 +0100194 pins1 {
Simon Glassd3a98cb2023-02-13 08:56:33 -0700195 bootph-pre-ram;
Patrick Delaunay48c5e902020-03-06 17:54:41 +0100196 };
197 pins2 {
Simon Glassd3a98cb2023-02-13 08:56:33 -0700198 bootph-pre-ram;
Patrice Chotard00442d02019-02-12 16:50:38 +0100199 };
200};
201
202&uart4 {
Simon Glassd3a98cb2023-02-13 08:56:33 -0700203 bootph-all;
Patrice Chotard00442d02019-02-12 16:50:38 +0100204};
205
206&uart4_pins_a {
Simon Glassd3a98cb2023-02-13 08:56:33 -0700207 bootph-all;
Patrice Chotard00442d02019-02-12 16:50:38 +0100208 pins1 {
Simon Glassd3a98cb2023-02-13 08:56:33 -0700209 bootph-all;
Patrice Chotard00442d02019-02-12 16:50:38 +0100210 };
211 pins2 {
Simon Glassd3a98cb2023-02-13 08:56:33 -0700212 bootph-all;
Patrick Delaunay5179a852019-07-30 19:16:18 +0200213 /* pull-up on rx to avoid floating level */
214 bias-pull-up;
Patrice Chotard00442d02019-02-12 16:50:38 +0100215 };
216};
217
218&usbotg_hs {
Patrick Delaunay7f3384d2019-03-29 15:42:24 +0100219 u-boot,force-b-session-valid;
Patrice Chotard00442d02019-02-12 16:50:38 +0100220};