blob: d93359f967c617226ea1776fa0e4a1d750f2cb1d [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 {
Patrice Chotard092333d2024-04-09 17:02:11 +020017 u-boot,boot-led = "led-blue";
Patrice Chotardf85d9b92024-04-09 17:02:10 +020018 u-boot,error-led = "led-red";
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 {
Patrice Chotardf85d9b92024-04-09 17:02:10 +020062 compatible = "gpio-leds";
63
Patrice Chotard092333d2024-04-09 17:02:11 +020064 led-blue {
65 gpios = <&gpiod 9 GPIO_ACTIVE_HIGH>;
66 };
67
Patrice Chotardf85d9b92024-04-09 17:02:10 +020068 led-red {
Patrick Delaunay1d6fa272018-07-27 16:37:05 +020069 gpios = <&gpioa 13 GPIO_ACTIVE_LOW>;
Patrick Delaunay1d6fa272018-07-27 16:37:05 +020070 };
Patrick Delaunay1d6fa272018-07-27 16:37:05 +020071 };
Patrick Delaunay06020d82018-03-12 10:46:17 +010072};
73
Patrick Delaunay0c220e02019-01-30 13:07:05 +010074&clk_hse {
75 st,digbypass;
76};
77
Patrice Chotard00442d02019-02-12 16:50:38 +010078&i2c4 {
Simon Glassd3a98cb2023-02-13 08:56:33 -070079 bootph-all;
Patrick Delaunay06020d82018-03-12 10:46:17 +010080};
81
82&i2c4_pins_a {
Simon Glassd3a98cb2023-02-13 08:56:33 -070083 bootph-all;
Patrick Delaunay06020d82018-03-12 10:46:17 +010084 pins {
Simon Glassd3a98cb2023-02-13 08:56:33 -070085 bootph-all;
Patrick Delaunay06020d82018-03-12 10:46:17 +010086 };
87};
88
Patrick Delaunay06020d82018-03-12 10:46:17 +010089&pmic {
Simon Glassd3a98cb2023-02-13 08:56:33 -070090 bootph-all;
Patrick Delaunay06020d82018-03-12 10:46:17 +010091};
92
Patrick Delaunay50599142018-07-09 15:17:19 +020093&rcc {
Patrick Delaunay06020d82018-03-12 10:46:17 +010094 st,clksrc = <
95 CLK_MPU_PLL1P
96 CLK_AXI_PLL2P
97 CLK_MCU_PLL3P
98 CLK_PLL12_HSE
99 CLK_PLL3_HSE
100 CLK_PLL4_HSE
101 CLK_RTC_LSE
102 CLK_MCO1_DISABLED
103 CLK_MCO2_DISABLED
104 >;
105
106 st,clkdiv = <
107 1 /*MPU*/
108 0 /*AXI*/
109 0 /*MCU*/
110 1 /*APB1*/
111 1 /*APB2*/
112 1 /*APB3*/
113 1 /*APB4*/
114 2 /*APB5*/
115 23 /*RTC*/
116 0 /*MCO1*/
117 0 /*MCO2*/
118 >;
119
120 st,pkcs = <
Patrick Delaunaycdd0b732018-07-09 15:17:24 +0200121 CLK_CKPER_HSE
122 CLK_FMC_ACLK
123 CLK_QSPI_ACLK
124 CLK_ETH_DISABLED
Patrick Delaunay0c220e02019-01-30 13:07:05 +0100125 CLK_SDMMC12_PLL4P
Patrick Delaunaycdd0b732018-07-09 15:17:24 +0200126 CLK_DSI_DSIPLL
Patrick Delaunay1780a762018-03-20 11:41:26 +0100127 CLK_STGEN_HSE
Patrick Delaunaycdd0b732018-07-09 15:17:24 +0200128 CLK_USBPHY_HSE
129 CLK_SPI2S1_PLL3Q
130 CLK_SPI2S23_PLL3Q
131 CLK_SPI45_HSI
132 CLK_SPI6_HSI
133 CLK_I2C46_HSI
Patrick Delaunay0c220e02019-01-30 13:07:05 +0100134 CLK_SDMMC3_PLL4P
Patrick Delaunaycdd0b732018-07-09 15:17:24 +0200135 CLK_USBO_USBPHY
136 CLK_ADC_CKPER
137 CLK_CEC_LSE
138 CLK_I2C12_HSI
139 CLK_I2C35_HSI
140 CLK_UART1_HSI
141 CLK_UART24_HSI
142 CLK_UART35_HSI
143 CLK_UART6_HSI
144 CLK_UART78_HSI
Patrick Delaunay0c220e02019-01-30 13:07:05 +0100145 CLK_SPDIF_PLL4P
Antonio Borneo84159e82020-01-28 10:11:01 +0100146 CLK_FDCAN_PLL4R
Patrick Delaunaycdd0b732018-07-09 15:17:24 +0200147 CLK_SAI1_PLL3Q
148 CLK_SAI2_PLL3Q
149 CLK_SAI3_PLL3Q
150 CLK_SAI4_PLL3Q
Patrick Delaunay0c220e02019-01-30 13:07:05 +0100151 CLK_RNG1_LSI
152 CLK_RNG2_LSI
Patrick Delaunaycdd0b732018-07-09 15:17:24 +0200153 CLK_LPTIM1_PCLK1
154 CLK_LPTIM23_PCLK3
Patrick Delaunay0c220e02019-01-30 13:07:05 +0100155 CLK_LPTIM45_LSE
Patrick Delaunay06020d82018-03-12 10:46:17 +0100156 >;
157
Patrick Delaunay06020d82018-03-12 10:46:17 +0100158 /* VCO = 1066.0 MHz => P = 266 (AXI), Q = 533 (GPU), R = 533 (DDR) */
159 pll2: st,pll@1 {
Patrick Delaunayc22caac2020-01-28 10:11:03 +0100160 compatible = "st,stm32mp1-pll";
161 reg = <1>;
Patrick Delaunay06020d82018-03-12 10:46:17 +0100162 cfg = < 2 65 1 0 0 PQR(1,1,1) >;
163 frac = < 0x1400 >;
Simon Glassd3a98cb2023-02-13 08:56:33 -0700164 bootph-all;
Patrick Delaunay06020d82018-03-12 10:46:17 +0100165 };
166
Patrick Delaunay0c220e02019-01-30 13:07:05 +0100167 /* VCO = 417.8 MHz => P = 209, Q = 24, R = 11 */
Patrick Delaunay06020d82018-03-12 10:46:17 +0100168 pll3: st,pll@2 {
Patrick Delaunayc22caac2020-01-28 10:11:03 +0100169 compatible = "st,stm32mp1-pll";
170 reg = <2>;
Patrick Delaunay0c220e02019-01-30 13:07:05 +0100171 cfg = < 1 33 1 16 36 PQR(1,1,1) >;
172 frac = < 0x1a04 >;
Simon Glassd3a98cb2023-02-13 08:56:33 -0700173 bootph-all;
Patrick Delaunay06020d82018-03-12 10:46:17 +0100174 };
175
Patrick Delaunay0c220e02019-01-30 13:07:05 +0100176 /* VCO = 594.0 MHz => P = 99, Q = 74, R = 74 */
Patrick Delaunay06020d82018-03-12 10:46:17 +0100177 pll4: st,pll@3 {
Patrick Delaunayc22caac2020-01-28 10:11:03 +0100178 compatible = "st,stm32mp1-pll";
179 reg = <3>;
Patrick Delaunay0c220e02019-01-30 13:07:05 +0100180 cfg = < 3 98 5 7 7 PQR(1,1,1) >;
Simon Glassd3a98cb2023-02-13 08:56:33 -0700181 bootph-all;
Patrick Delaunay06020d82018-03-12 10:46:17 +0100182 };
183};
184
Patrick Delaunaya3705302019-07-11 11:15:28 +0200185&sdmmc1 {
Simon Glassd3a98cb2023-02-13 08:56:33 -0700186 bootph-pre-ram;
Patrick Delaunaya3705302019-07-11 11:15:28 +0200187};
188
Patrick Delaunay06020d82018-03-12 10:46:17 +0100189&sdmmc1_b4_pins_a {
Simon Glassd3a98cb2023-02-13 08:56:33 -0700190 bootph-pre-ram;
Patrick Delaunay48c5e902020-03-06 17:54:41 +0100191 pins1 {
Simon Glassd3a98cb2023-02-13 08:56:33 -0700192 bootph-pre-ram;
Patrick Delaunay48c5e902020-03-06 17:54:41 +0100193 };
194 pins2 {
Simon Glassd3a98cb2023-02-13 08:56:33 -0700195 bootph-pre-ram;
Patrick Delaunay06020d82018-03-12 10:46:17 +0100196 };
197};
198
199&sdmmc1_dir_pins_a {
Simon Glassd3a98cb2023-02-13 08:56:33 -0700200 bootph-pre-ram;
Patrick Delaunaya3705302019-07-11 11:15:28 +0200201 pins1 {
Simon Glassd3a98cb2023-02-13 08:56:33 -0700202 bootph-pre-ram;
Patrick Delaunaya3705302019-07-11 11:15:28 +0200203 };
204 pins2 {
Simon Glassd3a98cb2023-02-13 08:56:33 -0700205 bootph-pre-ram;
Patrick Delaunay06020d82018-03-12 10:46:17 +0100206 };
207};
208
Patrick Delaunaya3705302019-07-11 11:15:28 +0200209&sdmmc2 {
Simon Glassd3a98cb2023-02-13 08:56:33 -0700210 bootph-pre-ram;
Patrick Delaunay06020d82018-03-12 10:46:17 +0100211};
Patrick Delaunay8d050102018-03-20 10:54:52 +0100212
Patrick Delaunay8d050102018-03-20 10:54:52 +0100213&sdmmc2_b4_pins_a {
Simon Glassd3a98cb2023-02-13 08:56:33 -0700214 bootph-pre-ram;
Patrick Delaunay2b0bbf52019-11-06 16:16:34 +0100215 pins1 {
Simon Glassd3a98cb2023-02-13 08:56:33 -0700216 bootph-pre-ram;
Patrick Delaunay2b0bbf52019-11-06 16:16:34 +0100217 };
218 pins2 {
Simon Glassd3a98cb2023-02-13 08:56:33 -0700219 bootph-pre-ram;
Patrick Delaunay8d050102018-03-20 10:54:52 +0100220 };
221};
222
223&sdmmc2_d47_pins_a {
Simon Glassd3a98cb2023-02-13 08:56:33 -0700224 bootph-pre-ram;
Patrick Delaunay8d050102018-03-20 10:54:52 +0100225 pins {
Simon Glassd3a98cb2023-02-13 08:56:33 -0700226 bootph-pre-ram;
Patrick Delaunay8d050102018-03-20 10:54:52 +0100227 };
228};
229
Patrice Chotard00442d02019-02-12 16:50:38 +0100230&uart4 {
Simon Glassd3a98cb2023-02-13 08:56:33 -0700231 bootph-all;
Patrice Chotard00442d02019-02-12 16:50:38 +0100232};
233
234&uart4_pins_a {
Simon Glassd3a98cb2023-02-13 08:56:33 -0700235 bootph-all;
Patrice Chotard00442d02019-02-12 16:50:38 +0100236 pins1 {
Simon Glassd3a98cb2023-02-13 08:56:33 -0700237 bootph-all;
Patrice Chotard00442d02019-02-12 16:50:38 +0100238 };
239 pins2 {
Simon Glassd3a98cb2023-02-13 08:56:33 -0700240 bootph-all;
Patrick Delaunay5179a852019-07-30 19:16:18 +0200241 /* pull-up on rx to avoid floating level */
242 bias-pull-up;
Patrice Chotard00442d02019-02-12 16:50:38 +0100243 };
244};