Tom Rini | 8b0c8a1 | 2018-05-06 18:27:01 -0400 | [diff] [blame] | 1 | // SPDX-License-Identifier: GPL-2.0+ OR BSD-3-Clause |
Patrick Delaunay | 06020d8 | 2018-03-12 10:46:17 +0100 | [diff] [blame] | 2 | /* |
| 3 | * Copyright : STMicroelectronics 2018 |
Patrick Delaunay | 06020d8 | 2018-03-12 10:46:17 +0100 | [diff] [blame] | 4 | */ |
| 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 Chotard | 00442d0 | 2019-02-12 16:50:38 +0100 | [diff] [blame] | 12 | i2c3 = &i2c4; |
Patrick Delaunay | 06020d8 | 2018-03-12 10:46:17 +0100 | [diff] [blame] | 13 | mmc0 = &sdmmc1; |
Patrick Delaunay | 8d05010 | 2018-03-20 10:54:52 +0100 | [diff] [blame] | 14 | mmc1 = &sdmmc2; |
Patrick Delaunay | 06020d8 | 2018-03-12 10:46:17 +0100 | [diff] [blame] | 15 | }; |
Patrick Delaunay | 1d6fa27 | 2018-07-27 16:37:05 +0200 | [diff] [blame] | 16 | |
Patrick Delaunay | 008d3c3 | 2019-02-27 17:01:20 +0100 | [diff] [blame] | 17 | config { |
Patrick Delaunay | ae0931d0 | 2019-07-30 19:16:39 +0200 | [diff] [blame] | 18 | u-boot,boot-led = "heartbeat"; |
| 19 | u-boot,error-led = "error"; |
Patrick Delaunay | 008d3c3 | 2019-02-27 17:01:20 +0100 | [diff] [blame] | 20 | st,fastboot-gpios = <&gpioa 13 GPIO_ACTIVE_LOW>; |
| 21 | st,stm32prog-gpios = <&gpioa 14 GPIO_ACTIVE_LOW>; |
| 22 | }; |
| 23 | |
Patrick Delaunay | 1d6fa27 | 2018-07-27 16:37:05 +0200 | [diff] [blame] | 24 | led { |
Patrick Delaunay | 1d6fa27 | 2018-07-27 16:37:05 +0200 | [diff] [blame] | 25 | red { |
Patrick Delaunay | ae0931d0 | 2019-07-30 19:16:39 +0200 | [diff] [blame] | 26 | label = "error"; |
Patrick Delaunay | 1d6fa27 | 2018-07-27 16:37:05 +0200 | [diff] [blame] | 27 | gpios = <&gpioa 13 GPIO_ACTIVE_LOW>; |
| 28 | default-state = "off"; |
Patrick Delaunay | ae0931d0 | 2019-07-30 19:16:39 +0200 | [diff] [blame] | 29 | status = "okay"; |
Patrick Delaunay | 1d6fa27 | 2018-07-27 16:37:05 +0200 | [diff] [blame] | 30 | }; |
Patrick Delaunay | ae0931d0 | 2019-07-30 19:16:39 +0200 | [diff] [blame] | 31 | |
Patrick Delaunay | 1d6fa27 | 2018-07-27 16:37:05 +0200 | [diff] [blame] | 32 | blue { |
Patrick Delaunay | ae0931d0 | 2019-07-30 19:16:39 +0200 | [diff] [blame] | 33 | default-state = "on"; |
Patrick Delaunay | 1d6fa27 | 2018-07-27 16:37:05 +0200 | [diff] [blame] | 34 | }; |
| 35 | }; |
Patrick Delaunay | 06020d8 | 2018-03-12 10:46:17 +0100 | [diff] [blame] | 36 | }; |
| 37 | |
Patrick Delaunay | 0c220e0 | 2019-01-30 13:07:05 +0100 | [diff] [blame] | 38 | &clk_hse { |
| 39 | st,digbypass; |
| 40 | }; |
| 41 | |
Patrice Chotard | 00442d0 | 2019-02-12 16:50:38 +0100 | [diff] [blame] | 42 | &i2c4 { |
Patrick Delaunay | 06020d8 | 2018-03-12 10:46:17 +0100 | [diff] [blame] | 43 | u-boot,dm-pre-reloc; |
Patrick Delaunay | 06020d8 | 2018-03-12 10:46:17 +0100 | [diff] [blame] | 44 | }; |
| 45 | |
| 46 | &i2c4_pins_a { |
| 47 | u-boot,dm-pre-reloc; |
| 48 | pins { |
| 49 | u-boot,dm-pre-reloc; |
| 50 | }; |
| 51 | }; |
| 52 | |
Patrick Delaunay | 06020d8 | 2018-03-12 10:46:17 +0100 | [diff] [blame] | 53 | &pmic { |
| 54 | u-boot,dm-pre-reloc; |
| 55 | }; |
| 56 | |
Patrick Delaunay | 5059914 | 2018-07-09 15:17:19 +0200 | [diff] [blame] | 57 | &rcc { |
Patrick Delaunay | 06020d8 | 2018-03-12 10:46:17 +0100 | [diff] [blame] | 58 | 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 Delaunay | cdd0b73 | 2018-07-09 15:17:24 +0200 | [diff] [blame] | 85 | CLK_CKPER_HSE |
| 86 | CLK_FMC_ACLK |
| 87 | CLK_QSPI_ACLK |
| 88 | CLK_ETH_DISABLED |
Patrick Delaunay | 0c220e0 | 2019-01-30 13:07:05 +0100 | [diff] [blame] | 89 | CLK_SDMMC12_PLL4P |
Patrick Delaunay | cdd0b73 | 2018-07-09 15:17:24 +0200 | [diff] [blame] | 90 | CLK_DSI_DSIPLL |
Patrick Delaunay | 1780a76 | 2018-03-20 11:41:26 +0100 | [diff] [blame] | 91 | CLK_STGEN_HSE |
Patrick Delaunay | cdd0b73 | 2018-07-09 15:17:24 +0200 | [diff] [blame] | 92 | CLK_USBPHY_HSE |
| 93 | CLK_SPI2S1_PLL3Q |
| 94 | CLK_SPI2S23_PLL3Q |
| 95 | CLK_SPI45_HSI |
| 96 | CLK_SPI6_HSI |
| 97 | CLK_I2C46_HSI |
Patrick Delaunay | 0c220e0 | 2019-01-30 13:07:05 +0100 | [diff] [blame] | 98 | CLK_SDMMC3_PLL4P |
Patrick Delaunay | cdd0b73 | 2018-07-09 15:17:24 +0200 | [diff] [blame] | 99 | 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 Delaunay | 0c220e0 | 2019-01-30 13:07:05 +0100 | [diff] [blame] | 109 | CLK_SPDIF_PLL4P |
Patrick Delaunay | cdd0b73 | 2018-07-09 15:17:24 +0200 | [diff] [blame] | 110 | CLK_FDCAN_PLL4Q |
| 111 | CLK_SAI1_PLL3Q |
| 112 | CLK_SAI2_PLL3Q |
| 113 | CLK_SAI3_PLL3Q |
| 114 | CLK_SAI4_PLL3Q |
Patrick Delaunay | 0c220e0 | 2019-01-30 13:07:05 +0100 | [diff] [blame] | 115 | CLK_RNG1_LSI |
| 116 | CLK_RNG2_LSI |
Patrick Delaunay | cdd0b73 | 2018-07-09 15:17:24 +0200 | [diff] [blame] | 117 | CLK_LPTIM1_PCLK1 |
| 118 | CLK_LPTIM23_PCLK3 |
Patrick Delaunay | 0c220e0 | 2019-01-30 13:07:05 +0100 | [diff] [blame] | 119 | CLK_LPTIM45_LSE |
Patrick Delaunay | 06020d8 | 2018-03-12 10:46:17 +0100 | [diff] [blame] | 120 | >; |
| 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 Delaunay | 0c220e0 | 2019-01-30 13:07:05 +0100 | [diff] [blame] | 136 | /* VCO = 417.8 MHz => P = 209, Q = 24, R = 11 */ |
Patrick Delaunay | 06020d8 | 2018-03-12 10:46:17 +0100 | [diff] [blame] | 137 | pll3: st,pll@2 { |
Patrick Delaunay | 0c220e0 | 2019-01-30 13:07:05 +0100 | [diff] [blame] | 138 | cfg = < 1 33 1 16 36 PQR(1,1,1) >; |
| 139 | frac = < 0x1a04 >; |
Patrick Delaunay | 06020d8 | 2018-03-12 10:46:17 +0100 | [diff] [blame] | 140 | u-boot,dm-pre-reloc; |
| 141 | }; |
| 142 | |
Patrick Delaunay | 0c220e0 | 2019-01-30 13:07:05 +0100 | [diff] [blame] | 143 | /* VCO = 594.0 MHz => P = 99, Q = 74, R = 74 */ |
Patrick Delaunay | 06020d8 | 2018-03-12 10:46:17 +0100 | [diff] [blame] | 144 | pll4: st,pll@3 { |
Patrick Delaunay | 0c220e0 | 2019-01-30 13:07:05 +0100 | [diff] [blame] | 145 | cfg = < 3 98 5 7 7 PQR(1,1,1) >; |
Patrick Delaunay | 06020d8 | 2018-03-12 10:46:17 +0100 | [diff] [blame] | 146 | u-boot,dm-pre-reloc; |
| 147 | }; |
| 148 | }; |
| 149 | |
Patrick Delaunay | a370530 | 2019-07-11 11:15:28 +0200 | [diff] [blame] | 150 | &sdmmc1 { |
| 151 | u-boot,dm-spl; |
| 152 | }; |
| 153 | |
Patrick Delaunay | 06020d8 | 2018-03-12 10:46:17 +0100 | [diff] [blame] | 154 | &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 Delaunay | a370530 | 2019-07-11 11:15:28 +0200 | [diff] [blame] | 163 | pins1 { |
| 164 | u-boot,dm-spl; |
| 165 | }; |
| 166 | pins2 { |
Patrick Delaunay | 06020d8 | 2018-03-12 10:46:17 +0100 | [diff] [blame] | 167 | u-boot,dm-spl; |
| 168 | }; |
| 169 | }; |
| 170 | |
Patrick Delaunay | a370530 | 2019-07-11 11:15:28 +0200 | [diff] [blame] | 171 | &sdmmc2 { |
Patrick Delaunay | 06020d8 | 2018-03-12 10:46:17 +0100 | [diff] [blame] | 172 | u-boot,dm-spl; |
| 173 | }; |
Patrick Delaunay | 8d05010 | 2018-03-20 10:54:52 +0100 | [diff] [blame] | 174 | |
Patrick Delaunay | 8d05010 | 2018-03-20 10:54:52 +0100 | [diff] [blame] | 175 | &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 Chotard | 00442d0 | 2019-02-12 16:50:38 +0100 | [diff] [blame] | 189 | &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 Delaunay | 5179a85 | 2019-07-30 19:16:18 +0200 | [diff] [blame] | 200 | /* pull-up on rx to avoid floating level */ |
| 201 | bias-pull-up; |
Patrice Chotard | 00442d0 | 2019-02-12 16:50:38 +0100 | [diff] [blame] | 202 | }; |
| 203 | }; |