blob: 4953a0db5552c95fd9db52fa4cf331c1db2f05b0 [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>
7#include "stm32mp157-u-boot.dtsi"
8#include "stm32mp15-ddr3-2x4Gb-1066-binG.dtsi"
9
10/ {
11 aliases {
Patrice Chotard00442d02019-02-12 16:50:38 +010012 i2c3 = &i2c4;
Patrick Delaunay06020d82018-03-12 10:46:17 +010013 mmc0 = &sdmmc1;
Patrick Delaunay8d050102018-03-20 10:54:52 +010014 mmc1 = &sdmmc2;
Patrick Delaunay06020d82018-03-12 10:46:17 +010015 };
Patrick Delaunay1d6fa272018-07-27 16:37:05 +020016
Patrick Delaunay008d3c32019-02-27 17:01:20 +010017 config {
Patrick Delaunayae0931d02019-07-30 19:16:39 +020018 u-boot,boot-led = "heartbeat";
19 u-boot,error-led = "error";
Patrick Delaunay008d3c32019-02-27 17:01:20 +010020 st,fastboot-gpios = <&gpioa 13 GPIO_ACTIVE_LOW>;
21 st,stm32prog-gpios = <&gpioa 14 GPIO_ACTIVE_LOW>;
22 };
23
Patrick Delaunay1d6fa272018-07-27 16:37:05 +020024 led {
Patrick Delaunay1d6fa272018-07-27 16:37:05 +020025 red {
Patrick Delaunayae0931d02019-07-30 19:16:39 +020026 label = "error";
Patrick Delaunay1d6fa272018-07-27 16:37:05 +020027 gpios = <&gpioa 13 GPIO_ACTIVE_LOW>;
28 default-state = "off";
Patrick Delaunayae0931d02019-07-30 19:16:39 +020029 status = "okay";
Patrick Delaunay1d6fa272018-07-27 16:37:05 +020030 };
Patrick Delaunayae0931d02019-07-30 19:16:39 +020031
Patrick Delaunay1d6fa272018-07-27 16:37:05 +020032 blue {
Patrick Delaunayae0931d02019-07-30 19:16:39 +020033 default-state = "on";
Patrick Delaunay1d6fa272018-07-27 16:37:05 +020034 };
35 };
Patrick Delaunay06020d82018-03-12 10:46:17 +010036};
37
Patrick Delaunay0c220e02019-01-30 13:07:05 +010038&clk_hse {
39 st,digbypass;
40};
41
Patrice Chotard00442d02019-02-12 16:50:38 +010042&i2c4 {
Patrick Delaunay06020d82018-03-12 10:46:17 +010043 u-boot,dm-pre-reloc;
Patrick Delaunay06020d82018-03-12 10:46:17 +010044};
45
46&i2c4_pins_a {
47 u-boot,dm-pre-reloc;
48 pins {
49 u-boot,dm-pre-reloc;
50 };
51};
52
Patrick Delaunay06020d82018-03-12 10:46:17 +010053&pmic {
54 u-boot,dm-pre-reloc;
55};
56
Patrick Delaunay50599142018-07-09 15:17:19 +020057&rcc {
Patrick Delaunay06020d82018-03-12 10:46:17 +010058 st,clksrc = <
59 CLK_MPU_PLL1P
60 CLK_AXI_PLL2P
61 CLK_MCU_PLL3P
62 CLK_PLL12_HSE
63 CLK_PLL3_HSE
64 CLK_PLL4_HSE
65 CLK_RTC_LSE
66 CLK_MCO1_DISABLED
67 CLK_MCO2_DISABLED
68 >;
69
70 st,clkdiv = <
71 1 /*MPU*/
72 0 /*AXI*/
73 0 /*MCU*/
74 1 /*APB1*/
75 1 /*APB2*/
76 1 /*APB3*/
77 1 /*APB4*/
78 2 /*APB5*/
79 23 /*RTC*/
80 0 /*MCO1*/
81 0 /*MCO2*/
82 >;
83
84 st,pkcs = <
Patrick Delaunaycdd0b732018-07-09 15:17:24 +020085 CLK_CKPER_HSE
86 CLK_FMC_ACLK
87 CLK_QSPI_ACLK
88 CLK_ETH_DISABLED
Patrick Delaunay0c220e02019-01-30 13:07:05 +010089 CLK_SDMMC12_PLL4P
Patrick Delaunaycdd0b732018-07-09 15:17:24 +020090 CLK_DSI_DSIPLL
Patrick Delaunay1780a762018-03-20 11:41:26 +010091 CLK_STGEN_HSE
Patrick Delaunaycdd0b732018-07-09 15:17:24 +020092 CLK_USBPHY_HSE
93 CLK_SPI2S1_PLL3Q
94 CLK_SPI2S23_PLL3Q
95 CLK_SPI45_HSI
96 CLK_SPI6_HSI
97 CLK_I2C46_HSI
Patrick Delaunay0c220e02019-01-30 13:07:05 +010098 CLK_SDMMC3_PLL4P
Patrick Delaunaycdd0b732018-07-09 15:17:24 +020099 CLK_USBO_USBPHY
100 CLK_ADC_CKPER
101 CLK_CEC_LSE
102 CLK_I2C12_HSI
103 CLK_I2C35_HSI
104 CLK_UART1_HSI
105 CLK_UART24_HSI
106 CLK_UART35_HSI
107 CLK_UART6_HSI
108 CLK_UART78_HSI
Patrick Delaunay0c220e02019-01-30 13:07:05 +0100109 CLK_SPDIF_PLL4P
Patrick Delaunaycdd0b732018-07-09 15:17:24 +0200110 CLK_FDCAN_PLL4Q
111 CLK_SAI1_PLL3Q
112 CLK_SAI2_PLL3Q
113 CLK_SAI3_PLL3Q
114 CLK_SAI4_PLL3Q
Patrick Delaunay0c220e02019-01-30 13:07:05 +0100115 CLK_RNG1_LSI
116 CLK_RNG2_LSI
Patrick Delaunaycdd0b732018-07-09 15:17:24 +0200117 CLK_LPTIM1_PCLK1
118 CLK_LPTIM23_PCLK3
Patrick Delaunay0c220e02019-01-30 13:07:05 +0100119 CLK_LPTIM45_LSE
Patrick Delaunay06020d82018-03-12 10:46:17 +0100120 >;
121
122 /* VCO = 1300.0 MHz => P = 650 (CPU) */
123 pll1: st,pll@0 {
124 cfg = < 2 80 0 0 0 PQR(1,0,0) >;
125 frac = < 0x800 >;
126 u-boot,dm-pre-reloc;
127 };
128
129 /* VCO = 1066.0 MHz => P = 266 (AXI), Q = 533 (GPU), R = 533 (DDR) */
130 pll2: st,pll@1 {
131 cfg = < 2 65 1 0 0 PQR(1,1,1) >;
132 frac = < 0x1400 >;
133 u-boot,dm-pre-reloc;
134 };
135
Patrick Delaunay0c220e02019-01-30 13:07:05 +0100136 /* VCO = 417.8 MHz => P = 209, Q = 24, R = 11 */
Patrick Delaunay06020d82018-03-12 10:46:17 +0100137 pll3: st,pll@2 {
Patrick Delaunay0c220e02019-01-30 13:07:05 +0100138 cfg = < 1 33 1 16 36 PQR(1,1,1) >;
139 frac = < 0x1a04 >;
Patrick Delaunay06020d82018-03-12 10:46:17 +0100140 u-boot,dm-pre-reloc;
141 };
142
Patrick Delaunay0c220e02019-01-30 13:07:05 +0100143 /* VCO = 594.0 MHz => P = 99, Q = 74, R = 74 */
Patrick Delaunay06020d82018-03-12 10:46:17 +0100144 pll4: st,pll@3 {
Patrick Delaunay0c220e02019-01-30 13:07:05 +0100145 cfg = < 3 98 5 7 7 PQR(1,1,1) >;
Patrick Delaunay06020d82018-03-12 10:46:17 +0100146 u-boot,dm-pre-reloc;
147 };
148};
149
Patrick Delaunaya3705302019-07-11 11:15:28 +0200150&sdmmc1 {
151 u-boot,dm-spl;
152};
153
Patrick Delaunay06020d82018-03-12 10:46:17 +0100154&sdmmc1_b4_pins_a {
155 u-boot,dm-spl;
156 pins {
157 u-boot,dm-spl;
158 };
159};
160
161&sdmmc1_dir_pins_a {
162 u-boot,dm-spl;
Patrick Delaunaya3705302019-07-11 11:15:28 +0200163 pins1 {
164 u-boot,dm-spl;
165 };
166 pins2 {
Patrick Delaunay06020d82018-03-12 10:46:17 +0100167 u-boot,dm-spl;
168 };
169};
170
Patrick Delaunaya3705302019-07-11 11:15:28 +0200171&sdmmc2 {
Patrick Delaunay06020d82018-03-12 10:46:17 +0100172 u-boot,dm-spl;
173};
Patrick Delaunay8d050102018-03-20 10:54:52 +0100174
Patrick Delaunay8d050102018-03-20 10:54:52 +0100175&sdmmc2_b4_pins_a {
176 u-boot,dm-spl;
177 pins {
178 u-boot,dm-spl;
179 };
180};
181
182&sdmmc2_d47_pins_a {
183 u-boot,dm-spl;
184 pins {
185 u-boot,dm-spl;
186 };
187};
188
Patrice Chotard00442d02019-02-12 16:50:38 +0100189&uart4 {
190 u-boot,dm-pre-reloc;
191};
192
193&uart4_pins_a {
194 u-boot,dm-pre-reloc;
195 pins1 {
196 u-boot,dm-pre-reloc;
197 };
198 pins2 {
199 u-boot,dm-pre-reloc;
Patrick Delaunay5179a852019-07-30 19:16:18 +0200200 /* pull-up on rx to avoid floating level */
201 bias-pull-up;
Patrice Chotard00442d02019-02-12 16:50:38 +0100202 };
203};