stm32mp151a-prtt1a.dts 4.4 KB

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