stm32mp157c-odyssey-som.dtsi 6.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343
  1. /*
  2. * Copyright (C) 2019-2024, STMicroelectronics. All Rights Reserved.
  3. * Copyright (C) 2021, Grzegorz Szymaszek.
  4. *
  5. * SPDX-License-Identifier: (GPL-2.0-or-later OR BSD-3-Clause)
  6. */
  7. #include "stm32mp157.dtsi"
  8. #include "stm32mp15xc.dtsi"
  9. #include "stm32mp15-pinctrl.dtsi"
  10. #include "stm32mp15xxac-pinctrl.dtsi"
  11. #include <dt-bindings/clock/stm32mp1-clksrc.h>
  12. #include "stm32mp15-ddr3-1x4Gb-1066-binG.dtsi"
  13. / {
  14. memory@c0000000 {
  15. device_type = "memory";
  16. reg = <0xc0000000 0x20000000>;
  17. };
  18. vin: vin {
  19. compatible = "regulator-fixed";
  20. regulator-name = "vin";
  21. regulator-min-microvolt = <5000000>;
  22. regulator-max-microvolt = <5000000>;
  23. regulator-always-on;
  24. };
  25. };
  26. &bsec {
  27. board_id: board-id@ec {
  28. reg = <0xec 0x4>;
  29. st,non-secure-otp;
  30. };
  31. };
  32. &clk_hse {
  33. st,digbypass;
  34. };
  35. &cpu0 {
  36. cpu-supply = <&vddcore>;
  37. };
  38. &cpu1 {
  39. cpu-supply = <&vddcore>;
  40. };
  41. &cryp1 {
  42. status = "okay";
  43. };
  44. &hash1 {
  45. status = "okay";
  46. };
  47. &i2c2 {
  48. pinctrl-names = "default";
  49. pinctrl-0 = <&i2c2_pins_a>;
  50. clock-frequency = <400000>;
  51. i2c-scl-rising-time-ns = <185>;
  52. i2c-scl-falling-time-ns = <20>;
  53. status = "okay";
  54. pmic: stpmic@33 {
  55. compatible = "st,stpmic1";
  56. reg = <0x33>;
  57. interrupts-extended = <&exti_pwr 55 IRQ_TYPE_EDGE_FALLING>;
  58. interrupt-controller;
  59. #interrupt-cells = <2>;
  60. status = "okay";
  61. regulators {
  62. compatible = "st,stpmic1-regulators";
  63. buck1-supply = <&vin>;
  64. buck2-supply = <&vin>;
  65. buck3-supply = <&vin>;
  66. buck4-supply = <&vin>;
  67. ldo1-supply = <&v3v3>;
  68. ldo2-supply = <&vin>;
  69. ldo3-supply = <&vdd_ddr>;
  70. ldo4-supply = <&vin>;
  71. ldo5-supply = <&vin>;
  72. ldo6-supply = <&v3v3>;
  73. vref_ddr-supply = <&vin>;
  74. boost-supply = <&vin>;
  75. pwr_sw1-supply = <&bst_out>;
  76. pwr_sw2-supply = <&bst_out>;
  77. vddcore: buck1 {
  78. regulator-name = "vddcore";
  79. regulator-min-microvolt = <1200000>;
  80. regulator-max-microvolt = <1350000>;
  81. regulator-always-on;
  82. regulator-initial-mode = <0>;
  83. regulator-over-current-protection;
  84. };
  85. vdd_ddr: buck2 {
  86. regulator-name = "vdd_ddr";
  87. regulator-min-microvolt = <1350000>;
  88. regulator-max-microvolt = <1350000>;
  89. regulator-always-on;
  90. regulator-initial-mode = <0>;
  91. regulator-over-current-protection;
  92. };
  93. vdd: buck3 {
  94. regulator-name = "vdd";
  95. regulator-min-microvolt = <3300000>;
  96. regulator-max-microvolt = <3300000>;
  97. regulator-always-on;
  98. st,mask-reset;
  99. regulator-initial-mode = <0>;
  100. regulator-over-current-protection;
  101. };
  102. v3v3: buck4 {
  103. regulator-name = "v3v3";
  104. regulator-min-microvolt = <3300000>;
  105. regulator-max-microvolt = <3300000>;
  106. regulator-always-on;
  107. regulator-over-current-protection;
  108. regulator-initial-mode = <0>;
  109. };
  110. v1v8_audio: ldo1 {
  111. regulator-name = "v1v8_audio";
  112. regulator-min-microvolt = <1800000>;
  113. regulator-max-microvolt = <1800000>;
  114. regulator-always-on;
  115. };
  116. v3v3_hdmi: ldo2 {
  117. regulator-name = "v3v3_hdmi";
  118. regulator-min-microvolt = <3300000>;
  119. regulator-max-microvolt = <3300000>;
  120. regulator-always-on;
  121. };
  122. vtt_ddr: ldo3 {
  123. regulator-name = "vtt_ddr";
  124. regulator-always-on;
  125. regulator-over-current-protection;
  126. st,regulator-sink-source;
  127. };
  128. vdd_usb: ldo4 {
  129. regulator-name = "vdd_usb";
  130. regulator-min-microvolt = <3300000>;
  131. regulator-max-microvolt = <3300000>;
  132. regulator-always-on;
  133. };
  134. vdda: ldo5 {
  135. regulator-name = "vdda";
  136. regulator-min-microvolt = <2900000>;
  137. regulator-max-microvolt = <2900000>;
  138. regulator-boot-on;
  139. };
  140. v1v2_hdmi: ldo6 {
  141. regulator-name = "v1v2_hdmi";
  142. regulator-min-microvolt = <1200000>;
  143. regulator-max-microvolt = <1200000>;
  144. regulator-always-on;
  145. };
  146. vref_ddr: vref_ddr {
  147. regulator-name = "vref_ddr";
  148. regulator-always-on;
  149. };
  150. bst_out: boost {
  151. regulator-name = "bst_out";
  152. };
  153. vbus_otg: pwr_sw1 {
  154. regulator-name = "vbus_otg";
  155. };
  156. vbus_sw: pwr_sw2 {
  157. regulator-name = "vbus_sw";
  158. regulator-active-discharge = <1>;
  159. };
  160. };
  161. pmic_watchdog: watchdog {
  162. compatible = "st,stpmic1-wdt";
  163. status = "disabled";
  164. };
  165. };
  166. };
  167. &iwdg2 {
  168. timeout-sec = <32>;
  169. status = "okay";
  170. };
  171. &pwr_regulators {
  172. vdd-supply = <&vdd>;
  173. vdd_3v3_usbfs-supply = <&vdd_usb>;
  174. };
  175. &rcc {
  176. st,clksrc = <
  177. CLK_MPU_PLL1P
  178. CLK_AXI_PLL2P
  179. CLK_MCU_PLL3P
  180. CLK_RTC_LSE
  181. CLK_MCO1_DISABLED
  182. CLK_MCO2_DISABLED
  183. CLK_CKPER_HSE
  184. CLK_FMC_ACLK
  185. CLK_QSPI_ACLK
  186. CLK_ETH_PLL4P
  187. CLK_SDMMC12_PLL4P
  188. CLK_DSI_DSIPLL
  189. CLK_STGEN_HSE
  190. CLK_USBPHY_HSE
  191. CLK_SPI2S1_PLL3Q
  192. CLK_SPI2S23_PLL3Q
  193. CLK_SPI45_HSI
  194. CLK_SPI6_HSI
  195. CLK_I2C46_HSI
  196. CLK_SDMMC3_PLL4P
  197. CLK_USBO_USBPHY
  198. CLK_ADC_CKPER
  199. CLK_CEC_LSE
  200. CLK_I2C12_HSI
  201. CLK_I2C35_HSI
  202. CLK_UART1_HSI
  203. CLK_UART24_HSI
  204. CLK_UART35_HSI
  205. CLK_UART6_HSI
  206. CLK_UART78_HSI
  207. CLK_SPDIF_PLL4P
  208. CLK_FDCAN_PLL4R
  209. CLK_SAI1_PLL3Q
  210. CLK_SAI2_PLL3Q
  211. CLK_SAI3_PLL3Q
  212. CLK_SAI4_PLL3Q
  213. CLK_RNG1_CSI
  214. CLK_RNG2_LSI
  215. CLK_LPTIM1_PCLK1
  216. CLK_LPTIM23_PCLK3
  217. CLK_LPTIM45_LSE
  218. >;
  219. st,clkdiv = <
  220. DIV(DIV_MPU, 1)
  221. DIV(DIV_AXI, 0)
  222. DIV(DIV_MCU, 0)
  223. DIV(DIV_APB1, 1)
  224. DIV(DIV_APB2, 1)
  225. DIV(DIV_APB3, 1)
  226. DIV(DIV_APB4, 1)
  227. DIV(DIV_APB5, 2)
  228. DIV(DIV_RTC, 23)
  229. DIV(DIV_MCO1, 0)
  230. DIV(DIV_MCO2, 0)
  231. >;
  232. st,pll_vco {
  233. pll2_vco_1066Mhz: pll2-vco-1066Mhz {
  234. src = <CLK_PLL12_HSE>;
  235. divmn = <2 65>;
  236. frac = <0x1400>;
  237. };
  238. pll3_vco_417Mhz: pll3-vco-417Mhz {
  239. src = <CLK_PLL3_HSE>;
  240. divmn = <1 33>;
  241. frac = <0x1a04>;
  242. };
  243. pll4_vco_594Mhz: pll4-vco-594Mhz {
  244. src = <CLK_PLL4_HSE>;
  245. divmn = <3 98>;
  246. };
  247. };
  248. /* VCO = 1066.0 MHz => P = 266 (AXI), Q = 533 (GPU), R = 533 (DDR) */
  249. pll2: st,pll@1 {
  250. compatible = "st,stm32mp1-pll";
  251. reg = <1>;
  252. st,pll = <&pll2_cfg1>;
  253. pll2_cfg1: pll2_cfg1 {
  254. st,pll_vco = <&pll2_vco_1066Mhz>;
  255. st,pll_div_pqr = <1 0 0>;
  256. };
  257. };
  258. /* VCO = 417.8 MHz => P = 209, Q = 24, R = 11 */
  259. pll3: st,pll@2 {
  260. compatible = "st,stm32mp1-pll";
  261. reg = <2>;
  262. st,pll = <&pll3_cfg1>;
  263. pll3_cfg1: pll3_cfg1 {
  264. st,pll_vco = <&pll3_vco_417Mhz>;
  265. st,pll_div_pqr = <1 16 36>;
  266. };
  267. };
  268. /* VCO = 594.0 MHz => P = 99, Q = 74, R = 74 */
  269. pll4: st,pll@3 {
  270. compatible = "st,stm32mp1-pll";
  271. reg = <3>;
  272. st,pll = <&pll4_cfg1>;
  273. pll4_cfg1: pll4_cfg1 {
  274. st,pll_vco = <&pll4_vco_594Mhz>;
  275. st,pll_div_pqr = <5 7 7>;
  276. };
  277. };
  278. };
  279. &rng1 {
  280. status = "okay";
  281. };
  282. &rtc {
  283. status = "okay";
  284. };
  285. &sdmmc2 {
  286. pinctrl-names = "default";
  287. pinctrl-0 = <&sdmmc2_b4_pins_a &sdmmc2_d47_pins_d>;
  288. non-removable;
  289. no-sd;
  290. no-sdio;
  291. st,neg-edge;
  292. bus-width = <8>;
  293. vmmc-supply = <&v3v3>;
  294. vqmmc-supply = <&vdd>;
  295. mmc-ddr-3_3v;
  296. status = "okay";
  297. };