blob: eb905ad28201424b2e76781f547cfd3ce0d92a62 [file] [log] [blame]
Manivannan Sadhasivamd1564072019-05-02 13:26:44 +05301// SPDX-License-Identifier: (GPL-2.0 OR BSD-3-Clause)
2/*
3 * Copyright : STMicroelectronics 2018
4 *
5 * Copyright (C) Linaro Ltd 2019 - All Rights Reserved
6 * Author: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Marek Vasut526c9512020-03-31 19:51:36 +02007 * Copyright (C) 2020 Marek Vasut <marex@denx.de>
Manivannan Sadhasivamd1564072019-05-02 13:26:44 +05308 */
9
10#include <dt-bindings/clock/stm32mp1-clksrc.h>
Patrick Delaunay48c5e902020-03-06 17:54:41 +010011#include "stm32mp15-u-boot.dtsi"
Marek Vasut272198e2020-04-29 15:08:38 +020012#include "stm32mp15-ddr3-dhsom-2x1Gb-1066-binG.dtsi"
13#include "stm32mp15-ddr3-dhsom-2x2Gb-1066-binG.dtsi"
14#include "stm32mp15-ddr3-dhsom-2x4Gb-1066-binG.dtsi"
Manivannan Sadhasivamd1564072019-05-02 13:26:44 +053015
Marek Vasut47b98ba2020-04-22 13:18:11 +020016/ {
Simon Glassd3a98cb2023-02-13 08:56:33 -070017 bootph-all;
Marek Vasut8b08dfb2021-12-30 23:46:46 +010018
19 aliases {
20 eeprom0 = &eeprom0;
21 };
22
Marek Vasut47b98ba2020-04-22 13:18:11 +020023 config {
Marek Vasut39221b52020-04-22 13:18:14 +020024 dh,ddr3-coding-gpios = <&gpiog 0 0>, <&gpiog 1 0>;
Marek Vasut47b98ba2020-04-22 13:18:11 +020025 dh,som-coding-gpios = <&gpioz 7 0>, <&gpiof 3 0>;
26 };
27};
28
Marek Vasutc2afb112020-10-01 12:25:55 +020029&flash0 {
Simon Glassd3a98cb2023-02-13 08:56:33 -070030 bootph-pre-ram;
Patrick Delaunayf172bcb2023-06-08 17:16:48 +020031
32 partitions {
33 compatible = "fixed-partitions";
34 #address-cells = <1>;
35 #size-cells = <1>;
36
37 partition@0 {
38 label = "fsbl1";
39 reg = <0x00000000 0x00040000>;
40 };
41 partition@40000 {
42 label = "fsbl2";
43 reg = <0x00040000 0x00040000>;
44 };
45 partition@500000 {
46 label = "uboot";
47 reg = <0x00080000 0x00160000>;
48 };
49 partition@900000 {
50 label = "env1";
51 reg = <0x001E0000 0x00010000>;
52 };
53 partition@980000 {
54 label = "env2";
55 reg = <0x001F0000 0x00010000>;
56 };
57 };
Marek Vasutc2afb112020-10-01 12:25:55 +020058};
59
Manivannan Sadhasivamd1564072019-05-02 13:26:44 +053060&i2c4 {
Simon Glassd3a98cb2023-02-13 08:56:33 -070061 bootph-all;
62 bootph-pre-ram;
Marek Vasut8b08dfb2021-12-30 23:46:46 +010063
64 eeprom0: eeprom@53 {
65 };
Manivannan Sadhasivamd1564072019-05-02 13:26:44 +053066};
67
68&i2c4_pins_a {
Simon Glassd3a98cb2023-02-13 08:56:33 -070069 bootph-all;
Manivannan Sadhasivamd1564072019-05-02 13:26:44 +053070 pins {
Simon Glassd3a98cb2023-02-13 08:56:33 -070071 bootph-all;
Manivannan Sadhasivamd1564072019-05-02 13:26:44 +053072 };
73};
74
75&pmic {
Simon Glassd3a98cb2023-02-13 08:56:33 -070076 bootph-all;
77 bootph-pre-ram;
Marek Vasutacb41692021-12-06 21:58:09 +010078
79 regulators {
Simon Glassd3a98cb2023-02-13 08:56:33 -070080 bootph-pre-ram;
Marek Vasutacb41692021-12-06 21:58:09 +010081 };
82};
83
84&pwr_regulators {
Simon Glassd3a98cb2023-02-13 08:56:33 -070085 bootph-pre-ram;
Manivannan Sadhasivamd1564072019-05-02 13:26:44 +053086};
87
Marek Vasut526c9512020-03-31 19:51:36 +020088&qspi {
Simon Glassd3a98cb2023-02-13 08:56:33 -070089 bootph-pre-ram;
Marek Vasut526c9512020-03-31 19:51:36 +020090};
91
Marek Vasutc2afb112020-10-01 12:25:55 +020092&qspi_clk_pins_a {
Simon Glassd3a98cb2023-02-13 08:56:33 -070093 bootph-pre-ram;
Marek Vasutc2afb112020-10-01 12:25:55 +020094 pins {
Simon Glassd3a98cb2023-02-13 08:56:33 -070095 bootph-pre-ram;
Marek Vasutc2afb112020-10-01 12:25:55 +020096 };
97};
98
99&qspi_bk1_pins_a {
Simon Glassd3a98cb2023-02-13 08:56:33 -0700100 bootph-pre-ram;
Marek Vasutc2afb112020-10-01 12:25:55 +0200101 pins1 {
Simon Glassd3a98cb2023-02-13 08:56:33 -0700102 bootph-pre-ram;
Marek Vasutc2afb112020-10-01 12:25:55 +0200103 };
104 pins2 {
Simon Glassd3a98cb2023-02-13 08:56:33 -0700105 bootph-pre-ram;
Marek Vasutc2afb112020-10-01 12:25:55 +0200106 };
107};
108
Manivannan Sadhasivamd1564072019-05-02 13:26:44 +0530109&rcc {
110 st,clksrc = <
111 CLK_MPU_PLL1P
112 CLK_AXI_PLL2P
113 CLK_MCU_PLL3P
114 CLK_PLL12_HSE
115 CLK_PLL3_HSE
116 CLK_PLL4_HSE
117 CLK_RTC_LSE
118 CLK_MCO1_DISABLED
119 CLK_MCO2_DISABLED
120 >;
121
122 st,clkdiv = <
123 1 /*MPU*/
124 0 /*AXI*/
125 0 /*MCU*/
126 1 /*APB1*/
127 1 /*APB2*/
128 1 /*APB3*/
129 1 /*APB4*/
130 2 /*APB5*/
131 23 /*RTC*/
132 0 /*MCO1*/
133 0 /*MCO2*/
134 >;
135
136 st,pkcs = <
137 CLK_CKPER_HSE
138 CLK_FMC_ACLK
139 CLK_QSPI_ACLK
140 CLK_ETH_DISABLED
141 CLK_SDMMC12_PLL4P
142 CLK_DSI_DSIPLL
143 CLK_STGEN_HSE
144 CLK_USBPHY_HSE
145 CLK_SPI2S1_PLL3Q
146 CLK_SPI2S23_PLL3Q
147 CLK_SPI45_HSI
148 CLK_SPI6_HSI
149 CLK_I2C46_HSI
150 CLK_SDMMC3_PLL4P
151 CLK_USBO_USBPHY
152 CLK_ADC_CKPER
153 CLK_CEC_LSE
154 CLK_I2C12_HSI
155 CLK_I2C35_HSI
156 CLK_UART1_HSI
157 CLK_UART24_HSI
158 CLK_UART35_HSI
159 CLK_UART6_HSI
160 CLK_UART78_HSI
161 CLK_SPDIF_PLL4P
Antonio Borneo84159e82020-01-28 10:11:01 +0100162 CLK_FDCAN_PLL4R
Manivannan Sadhasivamd1564072019-05-02 13:26:44 +0530163 CLK_SAI1_PLL3Q
164 CLK_SAI2_PLL3Q
165 CLK_SAI3_PLL3Q
166 CLK_SAI4_PLL3Q
167 CLK_RNG1_LSI
168 CLK_RNG2_LSI
169 CLK_LPTIM1_PCLK1
170 CLK_LPTIM23_PCLK3
171 CLK_LPTIM45_LSE
172 >;
173
Marek Vasut086fa932022-10-11 22:42:44 +0200174 /*
175 * cfg = < DIVM1 DIVN P Q R PQR(p,q,r) >;
176 * frac = < f >;
177 *
178 * PRQ(p,q,r) ... for p,q,r: 0-output disabled / 1-output enabled
179 * DIVN ... actually multiplier, but RCC_PLL1CFGR1 calls the field DIVN
180 * m ... for PLL1,2: m=2 ; for PLL3,4: m=1
181 * XTAL = 24 MHz
182 *
183 * VCO = ( XTAL / (DIVM1 + 1) ) * m * ( DIVN + 1 + ( f / 8192 ) )
184 * P = VCO / (P + 1)
185 * Q = VCO / (Q + 1)
186 * R = VCO / (R + 1)
187 */
188
Manivannan Sadhasivamd1564072019-05-02 13:26:44 +0530189 /* VCO = 1066.0 MHz => P = 266 (AXI), Q = 533 (GPU), R = 533 (DDR) */
190 pll2: st,pll@1 {
Patrick Delaunayc22caac2020-01-28 10:11:03 +0100191 compatible = "st,stm32mp1-pll";
192 reg = <1>;
Manivannan Sadhasivamd1564072019-05-02 13:26:44 +0530193 cfg = < 2 65 1 0 0 PQR(1,1,1) >;
194 frac = < 0x1400 >;
Simon Glassd3a98cb2023-02-13 08:56:33 -0700195 bootph-all;
Manivannan Sadhasivamd1564072019-05-02 13:26:44 +0530196 };
197
198 /* VCO = 417.8 MHz => P = 209, Q = 24, R = 11 */
199 pll3: st,pll@2 {
Patrick Delaunayc22caac2020-01-28 10:11:03 +0100200 compatible = "st,stm32mp1-pll";
201 reg = <2>;
Manivannan Sadhasivamd1564072019-05-02 13:26:44 +0530202 cfg = < 1 33 1 16 36 PQR(1,1,1) >;
203 frac = < 0x1a04 >;
Simon Glassd3a98cb2023-02-13 08:56:33 -0700204 bootph-all;
Manivannan Sadhasivamd1564072019-05-02 13:26:44 +0530205 };
206
Marek Vasut086fa932022-10-11 22:42:44 +0200207 /* VCO = 594.0 MHz => P = 99, Q = 74, R = 99 */
Manivannan Sadhasivamd1564072019-05-02 13:26:44 +0530208 pll4: st,pll@3 {
Patrick Delaunayc22caac2020-01-28 10:11:03 +0100209 compatible = "st,stm32mp1-pll";
210 reg = <3>;
Marek Vasutb48223e2020-08-22 22:45:25 +0200211 cfg = < 3 98 5 7 5 PQR(1,1,1) >;
Simon Glassd3a98cb2023-02-13 08:56:33 -0700212 bootph-all;
Manivannan Sadhasivamd1564072019-05-02 13:26:44 +0530213 };
214};
Marek Vasutacb41692021-12-06 21:58:09 +0100215
216&reg11 {
Simon Glassd3a98cb2023-02-13 08:56:33 -0700217 bootph-pre-ram;
Marek Vasutacb41692021-12-06 21:58:09 +0100218};
219
220&reg18 {
Simon Glassd3a98cb2023-02-13 08:56:33 -0700221 bootph-pre-ram;
Marek Vasutacb41692021-12-06 21:58:09 +0100222};
223
Marek Vasut5c92da92022-01-28 19:35:20 +0100224&usb33 {
Simon Glassd3a98cb2023-02-13 08:56:33 -0700225 bootph-pre-ram;
Marek Vasut5c92da92022-01-28 19:35:20 +0100226};
227
228&usbotg_hs_pins_a {
Simon Glassd3a98cb2023-02-13 08:56:33 -0700229 bootph-pre-ram;
Marek Vasut5c92da92022-01-28 19:35:20 +0100230};
231
Marek Vasutacb41692021-12-06 21:58:09 +0100232&usbotg_hs {
Simon Glassd3a98cb2023-02-13 08:56:33 -0700233 bootph-pre-ram;
Marek Vasutacb41692021-12-06 21:58:09 +0100234};
235
236&usbphyc {
Simon Glassd3a98cb2023-02-13 08:56:33 -0700237 bootph-pre-ram;
Marek Vasutacb41692021-12-06 21:58:09 +0100238};
239
240&usbphyc_port0 {
Simon Glassd3a98cb2023-02-13 08:56:33 -0700241 bootph-pre-ram;
Marek Vasutacb41692021-12-06 21:58:09 +0100242};
243
244&usbphyc_port1 {
Simon Glassd3a98cb2023-02-13 08:56:33 -0700245 bootph-pre-ram;
Marek Vasutacb41692021-12-06 21:58:09 +0100246};
247
Marek Vasutacb41692021-12-06 21:58:09 +0100248&vdd_usb {
Simon Glassd3a98cb2023-02-13 08:56:33 -0700249 bootph-pre-ram;
Marek Vasutacb41692021-12-06 21:58:09 +0100250};