stm32mp151a-prtt1a.dts 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237
  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
  36. &qspi_bk1_pins_a
  37. &qspi_cs1_pins_a>;
  38. reg = <0x58003000 0x1000>, <0x70000000 0x4000000>;
  39. #address-cells = <1>;
  40. #size-cells = <0>;
  41. status = "okay";
  42. flash@0 {
  43. compatible = "spi-nand";
  44. reg = <0>;
  45. spi-rx-bus-width = <4>;
  46. spi-max-frequency = <104000000>;
  47. #address-cells = <1>;
  48. #size-cells = <1>;
  49. };
  50. };
  51. &qspi_bk1_pins_a {
  52. pins {
  53. bias-pull-up;
  54. drive-push-pull;
  55. slew-rate = <1>;
  56. };
  57. };
  58. &rcc {
  59. st,clksrc = <
  60. CLK_MPU_PLL1P
  61. CLK_AXI_PLL2P
  62. CLK_MCU_PLL3P
  63. CLK_PLL12_HSE
  64. CLK_PLL3_HSE
  65. CLK_PLL4_HSE
  66. CLK_RTC_LSI
  67. CLK_MCO1_DISABLED
  68. CLK_MCO2_DISABLED
  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. st,pkcs = <
  84. CLK_CKPER_HSE
  85. CLK_FMC_ACLK
  86. CLK_QSPI_ACLK
  87. CLK_ETH_DISABLED
  88. CLK_SDMMC12_PLL4P
  89. CLK_DSI_DSIPLL
  90. CLK_STGEN_HSE
  91. CLK_USBPHY_HSE
  92. CLK_SPI2S1_PLL3Q
  93. CLK_SPI2S23_PLL3Q
  94. CLK_SPI45_HSI
  95. CLK_SPI6_HSI
  96. CLK_I2C46_HSI
  97. CLK_SDMMC3_PLL4P
  98. CLK_USBO_USBPHY
  99. CLK_ADC_CKPER
  100. CLK_CEC_LSI
  101. CLK_I2C12_HSI
  102. CLK_I2C35_HSI
  103. CLK_UART1_HSI
  104. CLK_UART24_HSI
  105. CLK_UART35_HSI
  106. CLK_UART6_HSI
  107. CLK_UART78_HSI
  108. CLK_SPDIF_PLL4P
  109. CLK_FDCAN_PLL4R
  110. CLK_SAI1_PLL3Q
  111. CLK_SAI2_PLL3Q
  112. CLK_SAI3_PLL3Q
  113. CLK_SAI4_PLL3Q
  114. CLK_RNG1_LSI
  115. CLK_RNG2_LSI
  116. CLK_LPTIM1_PCLK1
  117. CLK_LPTIM23_PCLK3
  118. CLK_LPTIM45_LSI
  119. >;
  120. /* VCO = 1300.0 MHz => P = 650 (CPU) */
  121. pll1: st,pll@0 {
  122. compatible = "st,stm32mp1-pll";
  123. reg = <0>;
  124. cfg = <2 80 0 0 0 PQR(1,0,0)>;
  125. frac = <0x800>;
  126. };
  127. /* VCO = 1066.0 MHz => P = 266 (AXI), Q = 533 (GPU), R = 533 (DDR) */
  128. pll2: st,pll@1 {
  129. compatible = "st,stm32mp1-pll";
  130. reg = <1>;
  131. cfg = <2 65 1 0 0 PQR(1,1,1)>;
  132. frac = <0x1400>;
  133. };
  134. /* VCO = 417.8 MHz => P = 209, Q = 24, R = 11 */
  135. pll3: st,pll@2 {
  136. compatible = "st,stm32mp1-pll";
  137. reg = <2>;
  138. cfg = <1 33 1 16 36 PQR(1,1,1)>;
  139. frac = <0x1a04>;
  140. };
  141. /* VCO = 480.0 MHz => P = 120, Q = 40, R = 96 */
  142. pll4: st,pll@3 {
  143. compatible = "st,stm32mp1-pll";
  144. reg = <3>;
  145. cfg = <1 39 3 11 4 PQR(1,1,1)>;
  146. };
  147. };
  148. &rng1 {
  149. status = "okay";
  150. };
  151. &rtc {
  152. status = "okay";
  153. };
  154. &sdmmc1 {
  155. pinctrl-names = "default";
  156. pinctrl-0 = <&sdmmc1_b4_pins_a>;
  157. bus-width = <4>;
  158. status = "okay";
  159. };
  160. &sdmmc1_b4_pins_a {
  161. pins1 {
  162. bias-pull-up;
  163. };
  164. pins2 {
  165. bias-pull-up;
  166. };
  167. };
  168. /* NOTE: Although the PRTT1A does not have an eMMC, we declare it
  169. * anyway, in order to be able to use the same binary for the
  170. * PRTT1C also. All involved pins are N.C. on PRTT1A/S for that
  171. * reason, so it should do no harm. All inputs configured with
  172. * pull-ups to avoid floating inputs. */
  173. &sdmmc2 {
  174. pinctrl-names = "default";
  175. pinctrl-0 = <&sdmmc2_b4_pins_a &sdmmc2_d47_pins_a>;
  176. bus-width = <8>;
  177. status = "okay";
  178. };
  179. &sdmmc2_b4_pins_a {
  180. pins1 {
  181. pinmux = <STM32_PINMUX('B', 14, AF9)>, /* SDMMC2_D0 */
  182. <STM32_PINMUX('B', 7, AF10)>, /* SDMMC2_D1 */
  183. <STM32_PINMUX('B', 3, AF9)>, /* SDMMC2_D2 */
  184. <STM32_PINMUX('B', 4, AF9)>, /* SDMMC2_D3 */
  185. <STM32_PINMUX('G', 6, AF10)>; /* SDMMC2_CMD */
  186. };
  187. };
  188. &sdmmc2_d47_pins_a {
  189. pins {
  190. pinmux = <STM32_PINMUX('A', 8, AF9)>, /* SDMMC2_D4 */
  191. <STM32_PINMUX('A', 9, AF10)>, /* SDMMC2_D5 */
  192. <STM32_PINMUX('C', 6, AF10)>, /* SDMMC2_D6 */
  193. <STM32_PINMUX('C', 7, AF10)>; /* SDMMC2_D7 */
  194. };
  195. };
  196. &uart4 {
  197. pinctrl-names = "default";
  198. pinctrl-0 = <&uart4_pins_a>;
  199. status = "okay";
  200. };
  201. &uart4_pins_a {
  202. pins1 {
  203. pinmux = <STM32_PINMUX('B', 9, AF8)>; /* UART4_TX */
  204. bias-disable;
  205. drive-push-pull;
  206. slew-rate = <0>;
  207. };
  208. pins2 {
  209. pinmux = <STM32_PINMUX('B', 2, AF8)>; /* UART4_RX */
  210. bias-pull-up;
  211. };
  212. };