stm32mp151a-prtt1a.dts 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235
  1. // SPDX-License-Identifier: (GPL-2.0+ OR BSD-3-Clause)
  2. /*
  3. * Copyright (C) 2023, Protonic Holland - All Rights Reserved
  4. * Author: David Jander <david@protonic.nl>
  5. */
  6. /dts-v1/;
  7. #include "stm32mp151.dtsi"
  8. #include "stm32mp15-pinctrl.dtsi"
  9. #include "stm32mp15xxad-pinctrl.dtsi"
  10. #include <dt-bindings/clock/stm32mp1-clksrc.h>
  11. #include "stm32mp15-ddr3-1x2Gb-1066-binG.dtsi"
  12. / {
  13. model = "Protonic PRTT1A";
  14. compatible = "prt,prtt1a", "st,stm32mp151";
  15. chosen {
  16. stdout-path = "serial0:115200n8";
  17. };
  18. aliases {
  19. mmc0 = &sdmmc1;
  20. mmc1 = &sdmmc2;
  21. serial0 = &uart4;
  22. };
  23. memory@c0000000 {
  24. device_type = "memory";
  25. reg = <0xC0000000 0x10000000>;
  26. };
  27. };
  28. &iwdg2 {
  29. timeout-sec = <32>;
  30. status = "okay";
  31. secure-status = "okay";
  32. };
  33. &qspi {
  34. pinctrl-names = "default", "sleep";
  35. pinctrl-0 = <&qspi_clk_pins_a &qspi_bk1_pins_a>;
  36. reg = <0x58003000 0x1000>, <0x70000000 0x4000000>;
  37. #address-cells = <1>;
  38. #size-cells = <0>;
  39. status = "okay";
  40. flash@0 {
  41. compatible = "spi-nand";
  42. reg = <0>;
  43. spi-rx-bus-width = <4>;
  44. spi-max-frequency = <104000000>;
  45. #address-cells = <1>;
  46. #size-cells = <1>;
  47. };
  48. };
  49. &qspi_bk1_pins_a {
  50. pins1 {
  51. bias-pull-up;
  52. drive-push-pull;
  53. slew-rate = <1>;
  54. };
  55. };
  56. &rcc {
  57. st,clksrc = <
  58. CLK_MPU_PLL1P
  59. CLK_AXI_PLL2P
  60. CLK_MCU_PLL3P
  61. CLK_PLL12_HSE
  62. CLK_PLL3_HSE
  63. CLK_PLL4_HSE
  64. CLK_RTC_LSI
  65. CLK_MCO1_DISABLED
  66. CLK_MCO2_DISABLED
  67. >;
  68. st,clkdiv = <
  69. 1 /*MPU*/
  70. 0 /*AXI*/
  71. 0 /*MCU*/
  72. 1 /*APB1*/
  73. 1 /*APB2*/
  74. 1 /*APB3*/
  75. 1 /*APB4*/
  76. 2 /*APB5*/
  77. 23 /*RTC*/
  78. 0 /*MCO1*/
  79. 0 /*MCO2*/
  80. >;
  81. st,pkcs = <
  82. CLK_CKPER_HSE
  83. CLK_FMC_ACLK
  84. CLK_QSPI_ACLK
  85. CLK_ETH_DISABLED
  86. CLK_SDMMC12_PLL4P
  87. CLK_DSI_DSIPLL
  88. CLK_STGEN_HSE
  89. CLK_USBPHY_HSE
  90. CLK_SPI2S1_PLL3Q
  91. CLK_SPI2S23_PLL3Q
  92. CLK_SPI45_HSI
  93. CLK_SPI6_HSI
  94. CLK_I2C46_HSI
  95. CLK_SDMMC3_PLL4P
  96. CLK_USBO_USBPHY
  97. CLK_ADC_CKPER
  98. CLK_CEC_LSI
  99. CLK_I2C12_HSI
  100. CLK_I2C35_HSI
  101. CLK_UART1_HSI
  102. CLK_UART24_HSI
  103. CLK_UART35_HSI
  104. CLK_UART6_HSI
  105. CLK_UART78_HSI
  106. CLK_SPDIF_PLL4P
  107. CLK_FDCAN_PLL4R
  108. CLK_SAI1_PLL3Q
  109. CLK_SAI2_PLL3Q
  110. CLK_SAI3_PLL3Q
  111. CLK_SAI4_PLL3Q
  112. CLK_RNG1_LSI
  113. CLK_RNG2_LSI
  114. CLK_LPTIM1_PCLK1
  115. CLK_LPTIM23_PCLK3
  116. CLK_LPTIM45_LSI
  117. >;
  118. /* VCO = 1300.0 MHz => P = 650 (CPU) */
  119. pll1: st,pll@0 {
  120. compatible = "st,stm32mp1-pll";
  121. reg = <0>;
  122. cfg = <2 80 0 0 0 PQR(1,0,0)>;
  123. frac = <0x800>;
  124. };
  125. /* VCO = 1066.0 MHz => P = 266 (AXI), Q = 533 (GPU), R = 533 (DDR) */
  126. pll2: st,pll@1 {
  127. compatible = "st,stm32mp1-pll";
  128. reg = <1>;
  129. cfg = <2 65 1 0 0 PQR(1,1,1)>;
  130. frac = <0x1400>;
  131. };
  132. /* VCO = 417.8 MHz => P = 209, Q = 24, R = 11 */
  133. pll3: st,pll@2 {
  134. compatible = "st,stm32mp1-pll";
  135. reg = <2>;
  136. cfg = <1 33 1 16 36 PQR(1,1,1)>;
  137. frac = <0x1a04>;
  138. };
  139. /* VCO = 480.0 MHz => P = 120, Q = 40, R = 96 */
  140. pll4: st,pll@3 {
  141. compatible = "st,stm32mp1-pll";
  142. reg = <3>;
  143. cfg = <1 39 3 11 4 PQR(1,1,1)>;
  144. };
  145. };
  146. &rng1 {
  147. status = "okay";
  148. };
  149. &rtc {
  150. status = "okay";
  151. };
  152. &sdmmc1 {
  153. pinctrl-names = "default";
  154. pinctrl-0 = <&sdmmc1_b4_pins_a>;
  155. bus-width = <4>;
  156. status = "okay";
  157. };
  158. &sdmmc1_b4_pins_a {
  159. pins1 {
  160. bias-pull-up;
  161. };
  162. pins2 {
  163. bias-pull-up;
  164. };
  165. };
  166. /* NOTE: Although the PRTT1A does not have an eMMC, we declare it
  167. * anyway, in order to be able to use the same binary for the
  168. * PRTT1C also. All involved pins are N.C. on PRTT1A/S for that
  169. * reason, so it should do no harm. All inputs configured with
  170. * pull-ups to avoid floating inputs. */
  171. &sdmmc2 {
  172. pinctrl-names = "default";
  173. pinctrl-0 = <&sdmmc2_b4_pins_a &sdmmc2_d47_pins_a>;
  174. bus-width = <8>;
  175. status = "okay";
  176. };
  177. &sdmmc2_b4_pins_a {
  178. pins1 {
  179. pinmux = <STM32_PINMUX('B', 14, AF9)>, /* SDMMC2_D0 */
  180. <STM32_PINMUX('B', 7, AF10)>, /* SDMMC2_D1 */
  181. <STM32_PINMUX('B', 3, AF9)>, /* SDMMC2_D2 */
  182. <STM32_PINMUX('B', 4, AF9)>, /* SDMMC2_D3 */
  183. <STM32_PINMUX('G', 6, AF10)>; /* SDMMC2_CMD */
  184. };
  185. };
  186. &sdmmc2_d47_pins_a {
  187. pins {
  188. pinmux = <STM32_PINMUX('A', 8, AF9)>, /* SDMMC2_D4 */
  189. <STM32_PINMUX('A', 9, AF10)>, /* SDMMC2_D5 */
  190. <STM32_PINMUX('C', 6, AF10)>, /* SDMMC2_D6 */
  191. <STM32_PINMUX('C', 7, AF10)>; /* SDMMC2_D7 */
  192. };
  193. };
  194. &uart4 {
  195. pinctrl-names = "default";
  196. pinctrl-0 = <&uart4_pins_a>;
  197. status = "okay";
  198. };
  199. &uart4_pins_a {
  200. pins1 {
  201. pinmux = <STM32_PINMUX('B', 9, AF8)>; /* UART4_TX */
  202. bias-disable;
  203. drive-push-pull;
  204. slew-rate = <0>;
  205. };
  206. pins2 {
  207. pinmux = <STM32_PINMUX('B', 2, AF8)>; /* UART4_RX */
  208. bias-pull-up;
  209. };
  210. };