blob: ca672356293cbcf19331f841176261c081d01ea1 [file] [log] [blame]
Ahmad Fatoum86ccc012020-01-29 16:04:18 +01001/* SPDX-License-Identifier: (GPL-2.0-or-later OR BSD-3-Clause) */
2/*
3 * Copyright (C) 2020 STMicroelectronics - All Rights Reserved
4 * Copyright (C) 2020 Ahmad Fatoum, Pengutronix
5 */
6
7#include "stm32mp15-pinctrl.dtsi"
8
9&i2c4 {
10 pinctrl-names = "default";
11 pinctrl-0 = <&i2c4_pins_a>;
12 clock-frequency = <400000>;
13 i2c-scl-rising-time-ns = <185>;
14 i2c-scl-falling-time-ns = <20>;
15 status = "okay";
16
17 pmic: stpmic@33 {
18 compatible = "st,stpmic1";
19 reg = <0x33>;
20 interrupts-extended = <&gpioa 0 IRQ_TYPE_EDGE_FALLING>;
21 interrupt-controller;
22 #interrupt-cells = <2>;
23
24 regulators {
25 compatible = "st,stpmic1-regulators";
26
27 ldo1-supply = <&v3v3>;
28 ldo6-supply = <&v3v3>;
29 pwr_sw1-supply = <&bst_out>;
30
31 vddcore: buck1 {
32 regulator-name = "vddcore";
33 regulator-min-microvolt = <1200000>;
34 regulator-max-microvolt = <1350000>;
35 regulator-always-on;
36 regulator-initial-mode = <0>;
37 regulator-over-current-protection;
38 };
39
40 vdd_ddr: buck2 {
41 regulator-name = "vdd_ddr";
42 regulator-min-microvolt = <1350000>;
43 regulator-max-microvolt = <1350000>;
44 regulator-always-on;
45 regulator-initial-mode = <0>;
46 regulator-over-current-protection;
47 };
48
49 vdd: buck3 {
50 regulator-name = "vdd";
51 regulator-min-microvolt = <3300000>;
52 regulator-max-microvolt = <3300000>;
53 regulator-always-on;
54 st,mask-reset;
55 regulator-initial-mode = <0>;
56 regulator-over-current-protection;
57 };
58
59 v3v3: buck4 {
60 regulator-name = "v3v3";
61 regulator-min-microvolt = <3300000>;
62 regulator-max-microvolt = <3300000>;
63 regulator-always-on;
64 regulator-over-current-protection;
65 regulator-initial-mode = <0>;
66 };
67
68 v1v8_audio: ldo1 {
69 regulator-name = "v1v8_audio";
70 regulator-min-microvolt = <1800000>;
71 regulator-max-microvolt = <1800000>;
72 regulator-always-on;
73 };
74
75 v3v3_hdmi: ldo2 {
76 regulator-name = "v3v3_hdmi";
77 regulator-min-microvolt = <3300000>;
78 regulator-max-microvolt = <3300000>;
79 regulator-always-on;
80 };
81
82 vtt_ddr: ldo3 {
83 regulator-name = "vtt_ddr";
Ahmad Fatoum86ccc012020-01-29 16:04:18 +010084 regulator-always-on;
85 regulator-over-current-protection;
Ahmad Fatoum9d3c53c2022-06-02 06:28:31 +020086 st,regulator-sink-source;
Ahmad Fatoum86ccc012020-01-29 16:04:18 +010087 };
88
89 vdd_usb: ldo4 {
90 regulator-name = "vdd_usb";
91 regulator-min-microvolt = <3300000>;
92 regulator-max-microvolt = <3300000>;
93 };
94
95 vdda: ldo5 {
96 regulator-name = "vdda";
97 regulator-min-microvolt = <2900000>;
98 regulator-max-microvolt = <2900000>;
99 regulator-boot-on;
100 };
101
102 v1v2_hdmi: ldo6 {
103 regulator-name = "v1v2_hdmi";
104 regulator-min-microvolt = <1200000>;
105 regulator-max-microvolt = <1200000>;
106 regulator-always-on;
107 };
108
109 vref_ddr: vref_ddr {
110 regulator-name = "vref_ddr";
111 regulator-always-on;
Ahmad Fatoum86ccc012020-01-29 16:04:18 +0100112 };
113
114 bst_out: boost {
115 regulator-name = "bst_out";
116 };
117
118 vbus_otg: pwr_sw1 {
119 regulator-name = "vbus_otg";
120 regulator-active-discharge;
121 };
122
123 vbus_sw: pwr_sw2 {
124 regulator-name = "vbus_sw";
125 regulator-active-discharge;
126 };
127 };
128
129 pmic_watchdog: watchdog {
130 compatible = "st,stpmic1-wdt";
131 status = "disabled";
132 };
133 };
134};
135
136&rng1 {
137 status = "okay";
138};
139
140/* ATF Specific */
141#include <dt-bindings/clock/stm32mp1-clksrc.h>
142
143/ {
144 aliases {
145 gpio0 = &gpioa;
146 gpio1 = &gpiob;
147 gpio2 = &gpioc;
148 gpio3 = &gpiod;
149 gpio4 = &gpioe;
150 gpio5 = &gpiof;
151 gpio6 = &gpiog;
152 gpio7 = &gpioh;
153 gpio8 = &gpioi;
154 gpio25 = &gpioz;
155 i2c3 = &i2c4;
156 };
157};
158
159&bsec {
160 board_id: board_id@ec {
161 reg = <0xec 0x4>;
162 st,non-secure-otp;
163 };
164};
165
166&clk_hse {
167 st,digbypass;
168};
169
170&cpu0{
171 cpu-supply = <&vddcore>;
172};
173
174&cpu1{
175 cpu-supply = <&vddcore>;
176};
177
178&hash1 {
179 status = "okay";
180};
181
182/* CLOCK init */
183&rcc {
184 secure-status = "disabled";
185 st,clksrc = <
186 CLK_MPU_PLL1P
187 CLK_AXI_PLL2P
188 CLK_MCU_PLL3P
189 CLK_PLL12_HSE
190 CLK_PLL3_HSE
191 CLK_PLL4_HSE
192 CLK_RTC_LSE
193 CLK_MCO1_DISABLED
194 CLK_MCO2_DISABLED
195 >;
196
197 st,clkdiv = <
198 1 /*MPU*/
199 0 /*AXI*/
200 0 /*MCU*/
201 1 /*APB1*/
202 1 /*APB2*/
203 1 /*APB3*/
204 1 /*APB4*/
205 2 /*APB5*/
206 23 /*RTC*/
207 0 /*MCO1*/
208 0 /*MCO2*/
209 >;
210
211 st,pkcs = <
212 CLK_CKPER_HSE
213 CLK_FMC_ACLK
214 CLK_QSPI_ACLK
215 CLK_ETH_PLL4P
216 CLK_SDMMC12_PLL4P
217 CLK_DSI_DSIPLL
218 CLK_STGEN_HSE
219 CLK_USBPHY_HSE
220 CLK_SPI2S1_PLL3Q
221 CLK_SPI2S23_PLL3Q
222 CLK_SPI45_HSI
223 CLK_SPI6_HSI
224 CLK_I2C46_HSI
225 CLK_SDMMC3_PLL4P
226 CLK_USBO_USBPHY
227 CLK_ADC_CKPER
228 CLK_CEC_LSE
229 CLK_I2C12_HSI
230 CLK_I2C35_HSI
231 CLK_UART1_HSI
232 CLK_UART24_HSI
233 CLK_UART35_HSI
234 CLK_UART6_HSI
235 CLK_UART78_HSI
236 CLK_SPDIF_PLL4P
237 CLK_FDCAN_PLL4R
238 CLK_SAI1_PLL3Q
239 CLK_SAI2_PLL3Q
240 CLK_SAI3_PLL3Q
241 CLK_SAI4_PLL3Q
242 CLK_RNG1_LSI
243 CLK_RNG2_LSI
244 CLK_LPTIM1_PCLK1
245 CLK_LPTIM23_PCLK3
246 CLK_LPTIM45_LSE
247 >;
248
249 /* VCO = 1300.0 MHz => P = 650 (CPU) */
250 pll1: st,pll@0 {
251 compatible = "st,stm32mp1-pll";
252 reg = <0>;
253 cfg = < 2 80 0 0 0 PQR(1,0,0) >;
254 frac = < 0x800 >;
255 };
256
257 /* VCO = 1066.0 MHz => P = 266 (AXI), Q = 533 (GPU), R = 533 (DDR) */
258 pll2: st,pll@1 {
259 compatible = "st,stm32mp1-pll";
260 reg = <1>;
261 cfg = <2 65 1 0 0 PQR(1,1,1)>;
262 frac = <0x1400>;
263 };
264
265 /* VCO = 417.8 MHz => P = 209, Q = 24, R = 11 */
266 pll3: st,pll@2 {
267 compatible = "st,stm32mp1-pll";
268 reg = <2>;
269 cfg = <1 33 1 16 36 PQR(1,1,1)>;
270 frac = <0x1a04>;
271 };
272
273 /* VCO = 594.0 MHz => P = 99, Q = 74, R = 74 */
274 pll4: st,pll@3 {
275 compatible = "st,stm32mp1-pll";
276 reg = <3>;
277 cfg = <3 98 5 7 7 PQR(1,1,1)>;
278 };
279};