blob: e6a452c9d8ec1edacde990b171eb8eb19790148c [file] [log] [blame]
Tom Rini8b0c8a12018-05-06 18:27:01 -04001// SPDX-License-Identifier: GPL-2.0+ OR BSD-3-Clause
Patrick Delaunay06020d82018-03-12 10:46:17 +01002/*
3 * Copyright : STMicroelectronics 2018
Patrick Delaunay06020d82018-03-12 10:46:17 +01004 */
5
6#include <dt-bindings/clock/stm32mp1-clksrc.h>
Patrice Chotard758a7fd2024-04-09 17:02:08 +02007#include <dt-bindings/input/linux-event-codes.h>
Patrick Delaunay48c5e902020-03-06 17:54:41 +01008#include "stm32mp15-u-boot.dtsi"
Patrick Delaunay06020d82018-03-12 10:46:17 +01009#include "stm32mp15-ddr3-2x4Gb-1066-binG.dtsi"
10
11/ {
12 aliases {
Patrice Chotard00442d02019-02-12 16:50:38 +010013 i2c3 = &i2c4;
Patrick Delaunay06020d82018-03-12 10:46:17 +010014 };
Patrick Delaunay1d6fa272018-07-27 16:37:05 +020015
Patrick Delaunay008d3c32019-02-27 17:01:20 +010016 config {
Patrick Delaunayae0931d02019-07-30 19:16:39 +020017 u-boot,boot-led = "heartbeat";
18 u-boot,error-led = "error";
Patrick Delaunay9c88dbf2021-07-26 11:21:36 +020019 u-boot,mmc-env-partition = "fip";
Patrick Delaunay008d3c32019-02-27 17:01:20 +010020 };
21
Patrick Delaunay4c6fcbc2024-01-15 15:05:57 +010022#if defined(CONFIG_STM32MP15X_STM32IMAGE) || defined(CONFIG_SPL)
Patrick Delaunay9c88dbf2021-07-26 11:21:36 +020023 config {
24 u-boot,mmc-env-partition = "ssbl";
25 };
Patrick Delaunay87e83322021-09-14 14:14:52 +020026#endif
Patrick Delaunay9c88dbf2021-07-26 11:21:36 +020027
Patrick Delaunay4c6fcbc2024-01-15 15:05:57 +010028#ifdef CONFIG_STM32MP15X_STM32IMAGE
Patrick Delaunayf8fcabf2021-07-26 11:21:35 +020029 /* only needed for boot with TF-A, witout FIP support */
Etienne Carrierec461e1a2020-06-05 09:24:30 +020030 firmware {
31 optee {
32 compatible = "linaro,optee-tz";
33 method = "smc";
34 };
35 };
36
37 reserved-memory {
38 optee@fe000000 {
39 reg = <0xfe000000 0x02000000>;
40 no-map;
41 };
42 };
Patrick Delaunayf8fcabf2021-07-26 11:21:35 +020043#endif
Etienne Carrierec461e1a2020-06-05 09:24:30 +020044
Patrice Chotard758a7fd2024-04-09 17:02:08 +020045 gpio-keys {
46 compatible = "gpio-keys";
47
48 button-user-1 {
49 label = "User-1";
50 linux,code = <BTN_1>;
51 gpios = <&gpioa 14 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>;
52 };
53
54 button-user-2 {
55 label = "User-2";
56 linux,code = <BTN_2>;
57 gpios = <&gpioa 13 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>;
58 };
59 };
60
Patrick Delaunay1d6fa272018-07-27 16:37:05 +020061 led {
Patrick Delaunay1d6fa272018-07-27 16:37:05 +020062 red {
Patrick Delaunayae0931d02019-07-30 19:16:39 +020063 label = "error";
Patrick Delaunay1d6fa272018-07-27 16:37:05 +020064 gpios = <&gpioa 13 GPIO_ACTIVE_LOW>;
65 default-state = "off";
Patrick Delaunayae0931d02019-07-30 19:16:39 +020066 status = "okay";
Patrick Delaunay1d6fa272018-07-27 16:37:05 +020067 };
Patrick Delaunay1d6fa272018-07-27 16:37:05 +020068 };
Patrick Delaunay06020d82018-03-12 10:46:17 +010069};
70
Patrick Delaunay0c220e02019-01-30 13:07:05 +010071&clk_hse {
72 st,digbypass;
73};
74
Patrice Chotard00442d02019-02-12 16:50:38 +010075&i2c4 {
Simon Glassd3a98cb2023-02-13 08:56:33 -070076 bootph-all;
Patrick Delaunay06020d82018-03-12 10:46:17 +010077};
78
79&i2c4_pins_a {
Simon Glassd3a98cb2023-02-13 08:56:33 -070080 bootph-all;
Patrick Delaunay06020d82018-03-12 10:46:17 +010081 pins {
Simon Glassd3a98cb2023-02-13 08:56:33 -070082 bootph-all;
Patrick Delaunay06020d82018-03-12 10:46:17 +010083 };
84};
85
Patrick Delaunay06020d82018-03-12 10:46:17 +010086&pmic {
Simon Glassd3a98cb2023-02-13 08:56:33 -070087 bootph-all;
Patrick Delaunay06020d82018-03-12 10:46:17 +010088};
89
Patrick Delaunay50599142018-07-09 15:17:19 +020090&rcc {
Patrick Delaunay06020d82018-03-12 10:46:17 +010091 st,clksrc = <
92 CLK_MPU_PLL1P
93 CLK_AXI_PLL2P
94 CLK_MCU_PLL3P
95 CLK_PLL12_HSE
96 CLK_PLL3_HSE
97 CLK_PLL4_HSE
98 CLK_RTC_LSE
99 CLK_MCO1_DISABLED
100 CLK_MCO2_DISABLED
101 >;
102
103 st,clkdiv = <
104 1 /*MPU*/
105 0 /*AXI*/
106 0 /*MCU*/
107 1 /*APB1*/
108 1 /*APB2*/
109 1 /*APB3*/
110 1 /*APB4*/
111 2 /*APB5*/
112 23 /*RTC*/
113 0 /*MCO1*/
114 0 /*MCO2*/
115 >;
116
117 st,pkcs = <
Patrick Delaunaycdd0b732018-07-09 15:17:24 +0200118 CLK_CKPER_HSE
119 CLK_FMC_ACLK
120 CLK_QSPI_ACLK
121 CLK_ETH_DISABLED
Patrick Delaunay0c220e02019-01-30 13:07:05 +0100122 CLK_SDMMC12_PLL4P
Patrick Delaunaycdd0b732018-07-09 15:17:24 +0200123 CLK_DSI_DSIPLL
Patrick Delaunay1780a762018-03-20 11:41:26 +0100124 CLK_STGEN_HSE
Patrick Delaunaycdd0b732018-07-09 15:17:24 +0200125 CLK_USBPHY_HSE
126 CLK_SPI2S1_PLL3Q
127 CLK_SPI2S23_PLL3Q
128 CLK_SPI45_HSI
129 CLK_SPI6_HSI
130 CLK_I2C46_HSI
Patrick Delaunay0c220e02019-01-30 13:07:05 +0100131 CLK_SDMMC3_PLL4P
Patrick Delaunaycdd0b732018-07-09 15:17:24 +0200132 CLK_USBO_USBPHY
133 CLK_ADC_CKPER
134 CLK_CEC_LSE
135 CLK_I2C12_HSI
136 CLK_I2C35_HSI
137 CLK_UART1_HSI
138 CLK_UART24_HSI
139 CLK_UART35_HSI
140 CLK_UART6_HSI
141 CLK_UART78_HSI
Patrick Delaunay0c220e02019-01-30 13:07:05 +0100142 CLK_SPDIF_PLL4P
Antonio Borneo84159e82020-01-28 10:11:01 +0100143 CLK_FDCAN_PLL4R
Patrick Delaunaycdd0b732018-07-09 15:17:24 +0200144 CLK_SAI1_PLL3Q
145 CLK_SAI2_PLL3Q
146 CLK_SAI3_PLL3Q
147 CLK_SAI4_PLL3Q
Patrick Delaunay0c220e02019-01-30 13:07:05 +0100148 CLK_RNG1_LSI
149 CLK_RNG2_LSI
Patrick Delaunaycdd0b732018-07-09 15:17:24 +0200150 CLK_LPTIM1_PCLK1
151 CLK_LPTIM23_PCLK3
Patrick Delaunay0c220e02019-01-30 13:07:05 +0100152 CLK_LPTIM45_LSE
Patrick Delaunay06020d82018-03-12 10:46:17 +0100153 >;
154
Patrick Delaunay06020d82018-03-12 10:46:17 +0100155 /* VCO = 1066.0 MHz => P = 266 (AXI), Q = 533 (GPU), R = 533 (DDR) */
156 pll2: st,pll@1 {
Patrick Delaunayc22caac2020-01-28 10:11:03 +0100157 compatible = "st,stm32mp1-pll";
158 reg = <1>;
Patrick Delaunay06020d82018-03-12 10:46:17 +0100159 cfg = < 2 65 1 0 0 PQR(1,1,1) >;
160 frac = < 0x1400 >;
Simon Glassd3a98cb2023-02-13 08:56:33 -0700161 bootph-all;
Patrick Delaunay06020d82018-03-12 10:46:17 +0100162 };
163
Patrick Delaunay0c220e02019-01-30 13:07:05 +0100164 /* VCO = 417.8 MHz => P = 209, Q = 24, R = 11 */
Patrick Delaunay06020d82018-03-12 10:46:17 +0100165 pll3: st,pll@2 {
Patrick Delaunayc22caac2020-01-28 10:11:03 +0100166 compatible = "st,stm32mp1-pll";
167 reg = <2>;
Patrick Delaunay0c220e02019-01-30 13:07:05 +0100168 cfg = < 1 33 1 16 36 PQR(1,1,1) >;
169 frac = < 0x1a04 >;
Simon Glassd3a98cb2023-02-13 08:56:33 -0700170 bootph-all;
Patrick Delaunay06020d82018-03-12 10:46:17 +0100171 };
172
Patrick Delaunay0c220e02019-01-30 13:07:05 +0100173 /* VCO = 594.0 MHz => P = 99, Q = 74, R = 74 */
Patrick Delaunay06020d82018-03-12 10:46:17 +0100174 pll4: st,pll@3 {
Patrick Delaunayc22caac2020-01-28 10:11:03 +0100175 compatible = "st,stm32mp1-pll";
176 reg = <3>;
Patrick Delaunay0c220e02019-01-30 13:07:05 +0100177 cfg = < 3 98 5 7 7 PQR(1,1,1) >;
Simon Glassd3a98cb2023-02-13 08:56:33 -0700178 bootph-all;
Patrick Delaunay06020d82018-03-12 10:46:17 +0100179 };
180};
181
Patrick Delaunaya3705302019-07-11 11:15:28 +0200182&sdmmc1 {
Simon Glassd3a98cb2023-02-13 08:56:33 -0700183 bootph-pre-ram;
Patrick Delaunaya3705302019-07-11 11:15:28 +0200184};
185
Patrick Delaunay06020d82018-03-12 10:46:17 +0100186&sdmmc1_b4_pins_a {
Simon Glassd3a98cb2023-02-13 08:56:33 -0700187 bootph-pre-ram;
Patrick Delaunay48c5e902020-03-06 17:54:41 +0100188 pins1 {
Simon Glassd3a98cb2023-02-13 08:56:33 -0700189 bootph-pre-ram;
Patrick Delaunay48c5e902020-03-06 17:54:41 +0100190 };
191 pins2 {
Simon Glassd3a98cb2023-02-13 08:56:33 -0700192 bootph-pre-ram;
Patrick Delaunay06020d82018-03-12 10:46:17 +0100193 };
194};
195
196&sdmmc1_dir_pins_a {
Simon Glassd3a98cb2023-02-13 08:56:33 -0700197 bootph-pre-ram;
Patrick Delaunaya3705302019-07-11 11:15:28 +0200198 pins1 {
Simon Glassd3a98cb2023-02-13 08:56:33 -0700199 bootph-pre-ram;
Patrick Delaunaya3705302019-07-11 11:15:28 +0200200 };
201 pins2 {
Simon Glassd3a98cb2023-02-13 08:56:33 -0700202 bootph-pre-ram;
Patrick Delaunay06020d82018-03-12 10:46:17 +0100203 };
204};
205
Patrick Delaunaya3705302019-07-11 11:15:28 +0200206&sdmmc2 {
Simon Glassd3a98cb2023-02-13 08:56:33 -0700207 bootph-pre-ram;
Patrick Delaunay06020d82018-03-12 10:46:17 +0100208};
Patrick Delaunay8d050102018-03-20 10:54:52 +0100209
Patrick Delaunay8d050102018-03-20 10:54:52 +0100210&sdmmc2_b4_pins_a {
Simon Glassd3a98cb2023-02-13 08:56:33 -0700211 bootph-pre-ram;
Patrick Delaunay2b0bbf52019-11-06 16:16:34 +0100212 pins1 {
Simon Glassd3a98cb2023-02-13 08:56:33 -0700213 bootph-pre-ram;
Patrick Delaunay2b0bbf52019-11-06 16:16:34 +0100214 };
215 pins2 {
Simon Glassd3a98cb2023-02-13 08:56:33 -0700216 bootph-pre-ram;
Patrick Delaunay8d050102018-03-20 10:54:52 +0100217 };
218};
219
220&sdmmc2_d47_pins_a {
Simon Glassd3a98cb2023-02-13 08:56:33 -0700221 bootph-pre-ram;
Patrick Delaunay8d050102018-03-20 10:54:52 +0100222 pins {
Simon Glassd3a98cb2023-02-13 08:56:33 -0700223 bootph-pre-ram;
Patrick Delaunay8d050102018-03-20 10:54:52 +0100224 };
225};
226
Patrice Chotard00442d02019-02-12 16:50:38 +0100227&uart4 {
Simon Glassd3a98cb2023-02-13 08:56:33 -0700228 bootph-all;
Patrice Chotard00442d02019-02-12 16:50:38 +0100229};
230
231&uart4_pins_a {
Simon Glassd3a98cb2023-02-13 08:56:33 -0700232 bootph-all;
Patrice Chotard00442d02019-02-12 16:50:38 +0100233 pins1 {
Simon Glassd3a98cb2023-02-13 08:56:33 -0700234 bootph-all;
Patrice Chotard00442d02019-02-12 16:50:38 +0100235 };
236 pins2 {
Simon Glassd3a98cb2023-02-13 08:56:33 -0700237 bootph-all;
Patrick Delaunay5179a852019-07-30 19:16:18 +0200238 /* pull-up on rx to avoid floating level */
239 bias-pull-up;
Patrice Chotard00442d02019-02-12 16:50:38 +0100240 };
241};