blob: f97debaa0e41de80ccacc07a5b25d5dc2bcd3dfb [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 {
Patrice Chotard3272f452024-04-09 17:02:07 +020018 u-boot,boot-led = "led-blue";
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 Chotard3272f452024-04-09 17:02:07 +020067 led-blue {
68 /delete-property/label;
69 };
70
Patrice Chotardda15d0b2024-04-09 17:02:06 +020071 led-red {
Patrice Chotard00442d02019-02-12 16:50:38 +010072 gpios = <&gpioa 13 GPIO_ACTIVE_LOW>;
Patrice Chotard00442d02019-02-12 16:50:38 +010073 };
Patrice Chotard00442d02019-02-12 16:50:38 +010074 };
75};
76
Patrice Chotarde861c202019-02-12 16:50:41 +010077&adc {
Patrice Chotarde861c202019-02-12 16:50:41 +010078 status = "okay";
Patrice Chotarde861c202019-02-12 16:50:41 +010079};
80
Patrice Chotard00442d02019-02-12 16:50:38 +010081&clk_hse {
82 st,digbypass;
83};
84
85&i2c4 {
Simon Glassd3a98cb2023-02-13 08:56:33 -070086 bootph-all;
Patrice Chotard00442d02019-02-12 16:50:38 +010087};
88
89&i2c4_pins_a {
Simon Glassd3a98cb2023-02-13 08:56:33 -070090 bootph-all;
Patrice Chotard00442d02019-02-12 16:50:38 +010091 pins {
Simon Glassd3a98cb2023-02-13 08:56:33 -070092 bootph-all;
Patrice Chotard00442d02019-02-12 16:50:38 +010093 };
94};
95
96&pmic {
Simon Glassd3a98cb2023-02-13 08:56:33 -070097 bootph-all;
Patrice Chotard00442d02019-02-12 16:50:38 +010098};
99
100&rcc {
101 st,clksrc = <
102 CLK_MPU_PLL1P
103 CLK_AXI_PLL2P
104 CLK_MCU_PLL3P
105 CLK_PLL12_HSE
106 CLK_PLL3_HSE
107 CLK_PLL4_HSE
108 CLK_RTC_LSE
109 CLK_MCO1_DISABLED
110 CLK_MCO2_DISABLED
111 >;
112
113 st,clkdiv = <
114 1 /*MPU*/
115 0 /*AXI*/
116 0 /*MCU*/
117 1 /*APB1*/
118 1 /*APB2*/
119 1 /*APB3*/
120 1 /*APB4*/
121 2 /*APB5*/
122 23 /*RTC*/
123 0 /*MCO1*/
124 0 /*MCO2*/
125 >;
126
127 st,pkcs = <
128 CLK_CKPER_HSE
129 CLK_FMC_ACLK
130 CLK_QSPI_ACLK
131 CLK_ETH_DISABLED
132 CLK_SDMMC12_PLL4P
133 CLK_DSI_DSIPLL
134 CLK_STGEN_HSE
135 CLK_USBPHY_HSE
136 CLK_SPI2S1_PLL3Q
137 CLK_SPI2S23_PLL3Q
138 CLK_SPI45_HSI
139 CLK_SPI6_HSI
140 CLK_I2C46_HSI
141 CLK_SDMMC3_PLL4P
142 CLK_USBO_USBPHY
143 CLK_ADC_CKPER
144 CLK_CEC_LSE
145 CLK_I2C12_HSI
146 CLK_I2C35_HSI
147 CLK_UART1_HSI
148 CLK_UART24_HSI
149 CLK_UART35_HSI
150 CLK_UART6_HSI
151 CLK_UART78_HSI
152 CLK_SPDIF_PLL4P
Antonio Borneo84159e82020-01-28 10:11:01 +0100153 CLK_FDCAN_PLL4R
Patrice Chotard00442d02019-02-12 16:50:38 +0100154 CLK_SAI1_PLL3Q
155 CLK_SAI2_PLL3Q
156 CLK_SAI3_PLL3Q
157 CLK_SAI4_PLL3Q
158 CLK_RNG1_LSI
159 CLK_RNG2_LSI
160 CLK_LPTIM1_PCLK1
161 CLK_LPTIM23_PCLK3
162 CLK_LPTIM45_LSE
163 >;
164
Patrice Chotard00442d02019-02-12 16:50:38 +0100165 /* VCO = 1066.0 MHz => P = 266 (AXI), Q = 533 (GPU), R = 533 (DDR) */
166 pll2: st,pll@1 {
Patrick Delaunayc22caac2020-01-28 10:11:03 +0100167 compatible = "st,stm32mp1-pll";
168 reg = <1>;
Patrice Chotard00442d02019-02-12 16:50:38 +0100169 cfg = < 2 65 1 0 0 PQR(1,1,1) >;
170 frac = < 0x1400 >;
Simon Glassd3a98cb2023-02-13 08:56:33 -0700171 bootph-all;
Patrice Chotard00442d02019-02-12 16:50:38 +0100172 };
173
174 /* VCO = 417.8 MHz => P = 209, Q = 24, R = 11 */
175 pll3: st,pll@2 {
Patrick Delaunayc22caac2020-01-28 10:11:03 +0100176 compatible = "st,stm32mp1-pll";
177 reg = <2>;
Patrice Chotard00442d02019-02-12 16:50:38 +0100178 cfg = < 1 33 1 16 36 PQR(1,1,1) >;
179 frac = < 0x1a04 >;
Simon Glassd3a98cb2023-02-13 08:56:33 -0700180 bootph-all;
Patrice Chotard00442d02019-02-12 16:50:38 +0100181 };
182
183 /* VCO = 594.0 MHz => P = 99, Q = 74, R = 74 */
184 pll4: st,pll@3 {
Patrick Delaunayc22caac2020-01-28 10:11:03 +0100185 compatible = "st,stm32mp1-pll";
186 reg = <3>;
Patrice Chotard00442d02019-02-12 16:50:38 +0100187 cfg = < 3 98 5 7 7 PQR(1,1,1) >;
Simon Glassd3a98cb2023-02-13 08:56:33 -0700188 bootph-all;
Patrice Chotard00442d02019-02-12 16:50:38 +0100189 };
190};
191
192&sdmmc1 {
Simon Glassd3a98cb2023-02-13 08:56:33 -0700193 bootph-pre-ram;
Patrice Chotard00442d02019-02-12 16:50:38 +0100194};
195
196&sdmmc1_b4_pins_a {
Simon Glassd3a98cb2023-02-13 08:56:33 -0700197 bootph-pre-ram;
Patrick Delaunay48c5e902020-03-06 17:54:41 +0100198 pins1 {
Simon Glassd3a98cb2023-02-13 08:56:33 -0700199 bootph-pre-ram;
Patrick Delaunay48c5e902020-03-06 17:54:41 +0100200 };
201 pins2 {
Simon Glassd3a98cb2023-02-13 08:56:33 -0700202 bootph-pre-ram;
Patrice Chotard00442d02019-02-12 16:50:38 +0100203 };
204};
205
206&uart4 {
Simon Glassd3a98cb2023-02-13 08:56:33 -0700207 bootph-all;
Patrice Chotard00442d02019-02-12 16:50:38 +0100208};
209
210&uart4_pins_a {
Simon Glassd3a98cb2023-02-13 08:56:33 -0700211 bootph-all;
Patrice Chotard00442d02019-02-12 16:50:38 +0100212 pins1 {
Simon Glassd3a98cb2023-02-13 08:56:33 -0700213 bootph-all;
Patrice Chotard00442d02019-02-12 16:50:38 +0100214 };
215 pins2 {
Simon Glassd3a98cb2023-02-13 08:56:33 -0700216 bootph-all;
Patrick Delaunay5179a852019-07-30 19:16:18 +0200217 /* pull-up on rx to avoid floating level */
218 bias-pull-up;
Patrice Chotard00442d02019-02-12 16:50:38 +0100219 };
220};
221
222&usbotg_hs {
Patrick Delaunay7f3384d2019-03-29 15:42:24 +0100223 u-boot,force-b-session-valid;
Patrice Chotard00442d02019-02-12 16:50:38 +0100224};