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 { |
| 18 | st,fastboot-gpios = <&gpioa 13 GPIO_ACTIVE_LOW>; |
| 19 | st,stm32prog-gpios = <&gpioa 14 GPIO_ACTIVE_LOW>; |
| 20 | }; |
| 21 | |
Patrick Delaunay | 1d6fa27 | 2018-07-27 16:37:05 +0200 | [diff] [blame] | 22 | led { |
| 23 | compatible = "gpio-leds"; |
| 24 | |
| 25 | red { |
| 26 | label = "stm32mp:red:status"; |
| 27 | gpios = <&gpioa 13 GPIO_ACTIVE_LOW>; |
| 28 | default-state = "off"; |
| 29 | }; |
| 30 | green { |
| 31 | label = "stm32mp:green:user"; |
| 32 | gpios = <&gpioa 14 GPIO_ACTIVE_LOW>; |
| 33 | default-state = "on"; |
| 34 | }; |
| 35 | orange { |
| 36 | label = "stm32mp:orange:status"; |
| 37 | gpios = <&gpioh 7 GPIO_ACTIVE_HIGH>; |
| 38 | default-state = "off"; |
| 39 | }; |
| 40 | blue { |
| 41 | label = "stm32mp:blue:user"; |
| 42 | gpios = <&gpiod 11 GPIO_ACTIVE_HIGH>; |
| 43 | }; |
| 44 | }; |
Patrick Delaunay | 06020d8 | 2018-03-12 10:46:17 +0100 | [diff] [blame] | 45 | }; |
| 46 | |
Patrick Delaunay | 0c220e0 | 2019-01-30 13:07:05 +0100 | [diff] [blame] | 47 | &clk_hse { |
| 48 | st,digbypass; |
| 49 | }; |
| 50 | |
Patrice Chotard | 00442d0 | 2019-02-12 16:50:38 +0100 | [diff] [blame] | 51 | &i2c4 { |
Patrick Delaunay | 06020d8 | 2018-03-12 10:46:17 +0100 | [diff] [blame] | 52 | u-boot,dm-pre-reloc; |
Patrick Delaunay | 06020d8 | 2018-03-12 10:46:17 +0100 | [diff] [blame] | 53 | }; |
| 54 | |
| 55 | &i2c4_pins_a { |
| 56 | u-boot,dm-pre-reloc; |
| 57 | pins { |
| 58 | u-boot,dm-pre-reloc; |
| 59 | }; |
| 60 | }; |
| 61 | |
Patrick Delaunay | 06020d8 | 2018-03-12 10:46:17 +0100 | [diff] [blame] | 62 | &pmic { |
| 63 | u-boot,dm-pre-reloc; |
| 64 | }; |
| 65 | |
Patrick Delaunay | 5059914 | 2018-07-09 15:17:19 +0200 | [diff] [blame] | 66 | &rcc { |
Patrick Delaunay | 06020d8 | 2018-03-12 10:46:17 +0100 | [diff] [blame] | 67 | st,clksrc = < |
| 68 | CLK_MPU_PLL1P |
| 69 | CLK_AXI_PLL2P |
| 70 | CLK_MCU_PLL3P |
| 71 | CLK_PLL12_HSE |
| 72 | CLK_PLL3_HSE |
| 73 | CLK_PLL4_HSE |
| 74 | CLK_RTC_LSE |
| 75 | CLK_MCO1_DISABLED |
| 76 | CLK_MCO2_DISABLED |
| 77 | >; |
| 78 | |
| 79 | st,clkdiv = < |
| 80 | 1 /*MPU*/ |
| 81 | 0 /*AXI*/ |
| 82 | 0 /*MCU*/ |
| 83 | 1 /*APB1*/ |
| 84 | 1 /*APB2*/ |
| 85 | 1 /*APB3*/ |
| 86 | 1 /*APB4*/ |
| 87 | 2 /*APB5*/ |
| 88 | 23 /*RTC*/ |
| 89 | 0 /*MCO1*/ |
| 90 | 0 /*MCO2*/ |
| 91 | >; |
| 92 | |
| 93 | st,pkcs = < |
Patrick Delaunay | cdd0b73 | 2018-07-09 15:17:24 +0200 | [diff] [blame] | 94 | CLK_CKPER_HSE |
| 95 | CLK_FMC_ACLK |
| 96 | CLK_QSPI_ACLK |
| 97 | CLK_ETH_DISABLED |
Patrick Delaunay | 0c220e0 | 2019-01-30 13:07:05 +0100 | [diff] [blame] | 98 | CLK_SDMMC12_PLL4P |
Patrick Delaunay | cdd0b73 | 2018-07-09 15:17:24 +0200 | [diff] [blame] | 99 | CLK_DSI_DSIPLL |
Patrick Delaunay | 1780a76 | 2018-03-20 11:41:26 +0100 | [diff] [blame] | 100 | CLK_STGEN_HSE |
Patrick Delaunay | cdd0b73 | 2018-07-09 15:17:24 +0200 | [diff] [blame] | 101 | CLK_USBPHY_HSE |
| 102 | CLK_SPI2S1_PLL3Q |
| 103 | CLK_SPI2S23_PLL3Q |
| 104 | CLK_SPI45_HSI |
| 105 | CLK_SPI6_HSI |
| 106 | CLK_I2C46_HSI |
Patrick Delaunay | 0c220e0 | 2019-01-30 13:07:05 +0100 | [diff] [blame] | 107 | CLK_SDMMC3_PLL4P |
Patrick Delaunay | cdd0b73 | 2018-07-09 15:17:24 +0200 | [diff] [blame] | 108 | CLK_USBO_USBPHY |
| 109 | CLK_ADC_CKPER |
| 110 | CLK_CEC_LSE |
| 111 | CLK_I2C12_HSI |
| 112 | CLK_I2C35_HSI |
| 113 | CLK_UART1_HSI |
| 114 | CLK_UART24_HSI |
| 115 | CLK_UART35_HSI |
| 116 | CLK_UART6_HSI |
| 117 | CLK_UART78_HSI |
Patrick Delaunay | 0c220e0 | 2019-01-30 13:07:05 +0100 | [diff] [blame] | 118 | CLK_SPDIF_PLL4P |
Patrick Delaunay | cdd0b73 | 2018-07-09 15:17:24 +0200 | [diff] [blame] | 119 | CLK_FDCAN_PLL4Q |
| 120 | CLK_SAI1_PLL3Q |
| 121 | CLK_SAI2_PLL3Q |
| 122 | CLK_SAI3_PLL3Q |
| 123 | CLK_SAI4_PLL3Q |
Patrick Delaunay | 0c220e0 | 2019-01-30 13:07:05 +0100 | [diff] [blame] | 124 | CLK_RNG1_LSI |
| 125 | CLK_RNG2_LSI |
Patrick Delaunay | cdd0b73 | 2018-07-09 15:17:24 +0200 | [diff] [blame] | 126 | CLK_LPTIM1_PCLK1 |
| 127 | CLK_LPTIM23_PCLK3 |
Patrick Delaunay | 0c220e0 | 2019-01-30 13:07:05 +0100 | [diff] [blame] | 128 | CLK_LPTIM45_LSE |
Patrick Delaunay | 06020d8 | 2018-03-12 10:46:17 +0100 | [diff] [blame] | 129 | >; |
| 130 | |
| 131 | /* VCO = 1300.0 MHz => P = 650 (CPU) */ |
| 132 | pll1: st,pll@0 { |
| 133 | cfg = < 2 80 0 0 0 PQR(1,0,0) >; |
| 134 | frac = < 0x800 >; |
| 135 | u-boot,dm-pre-reloc; |
| 136 | }; |
| 137 | |
| 138 | /* VCO = 1066.0 MHz => P = 266 (AXI), Q = 533 (GPU), R = 533 (DDR) */ |
| 139 | pll2: st,pll@1 { |
| 140 | cfg = < 2 65 1 0 0 PQR(1,1,1) >; |
| 141 | frac = < 0x1400 >; |
| 142 | u-boot,dm-pre-reloc; |
| 143 | }; |
| 144 | |
Patrick Delaunay | 0c220e0 | 2019-01-30 13:07:05 +0100 | [diff] [blame] | 145 | /* VCO = 417.8 MHz => P = 209, Q = 24, R = 11 */ |
Patrick Delaunay | 06020d8 | 2018-03-12 10:46:17 +0100 | [diff] [blame] | 146 | pll3: st,pll@2 { |
Patrick Delaunay | 0c220e0 | 2019-01-30 13:07:05 +0100 | [diff] [blame] | 147 | cfg = < 1 33 1 16 36 PQR(1,1,1) >; |
| 148 | frac = < 0x1a04 >; |
Patrick Delaunay | 06020d8 | 2018-03-12 10:46:17 +0100 | [diff] [blame] | 149 | u-boot,dm-pre-reloc; |
| 150 | }; |
| 151 | |
Patrick Delaunay | 0c220e0 | 2019-01-30 13:07:05 +0100 | [diff] [blame] | 152 | /* VCO = 594.0 MHz => P = 99, Q = 74, R = 74 */ |
Patrick Delaunay | 06020d8 | 2018-03-12 10:46:17 +0100 | [diff] [blame] | 153 | pll4: st,pll@3 { |
Patrick Delaunay | 0c220e0 | 2019-01-30 13:07:05 +0100 | [diff] [blame] | 154 | cfg = < 3 98 5 7 7 PQR(1,1,1) >; |
Patrick Delaunay | 06020d8 | 2018-03-12 10:46:17 +0100 | [diff] [blame] | 155 | u-boot,dm-pre-reloc; |
| 156 | }; |
| 157 | }; |
| 158 | |
Patrick Delaunay | a370530 | 2019-07-11 11:15:28 +0200 | [diff] [blame] | 159 | &sdmmc1 { |
| 160 | u-boot,dm-spl; |
| 161 | }; |
| 162 | |
Patrick Delaunay | 06020d8 | 2018-03-12 10:46:17 +0100 | [diff] [blame] | 163 | &sdmmc1_b4_pins_a { |
| 164 | u-boot,dm-spl; |
| 165 | pins { |
| 166 | u-boot,dm-spl; |
| 167 | }; |
| 168 | }; |
| 169 | |
| 170 | &sdmmc1_dir_pins_a { |
| 171 | u-boot,dm-spl; |
Patrick Delaunay | a370530 | 2019-07-11 11:15:28 +0200 | [diff] [blame] | 172 | pins1 { |
| 173 | u-boot,dm-spl; |
| 174 | }; |
| 175 | pins2 { |
Patrick Delaunay | 06020d8 | 2018-03-12 10:46:17 +0100 | [diff] [blame] | 176 | u-boot,dm-spl; |
| 177 | }; |
| 178 | }; |
| 179 | |
Patrick Delaunay | a370530 | 2019-07-11 11:15:28 +0200 | [diff] [blame] | 180 | &sdmmc2 { |
Patrick Delaunay | 06020d8 | 2018-03-12 10:46:17 +0100 | [diff] [blame] | 181 | u-boot,dm-spl; |
| 182 | }; |
Patrick Delaunay | 8d05010 | 2018-03-20 10:54:52 +0100 | [diff] [blame] | 183 | |
Patrick Delaunay | 8d05010 | 2018-03-20 10:54:52 +0100 | [diff] [blame] | 184 | &sdmmc2_b4_pins_a { |
| 185 | u-boot,dm-spl; |
| 186 | pins { |
| 187 | u-boot,dm-spl; |
| 188 | }; |
| 189 | }; |
| 190 | |
| 191 | &sdmmc2_d47_pins_a { |
| 192 | u-boot,dm-spl; |
| 193 | pins { |
| 194 | u-boot,dm-spl; |
| 195 | }; |
| 196 | }; |
| 197 | |
Patrice Chotard | 00442d0 | 2019-02-12 16:50:38 +0100 | [diff] [blame] | 198 | &uart4 { |
| 199 | u-boot,dm-pre-reloc; |
| 200 | }; |
| 201 | |
| 202 | &uart4_pins_a { |
| 203 | u-boot,dm-pre-reloc; |
| 204 | pins1 { |
| 205 | u-boot,dm-pre-reloc; |
| 206 | }; |
| 207 | pins2 { |
| 208 | u-boot,dm-pre-reloc; |
| 209 | }; |
| 210 | }; |