stm32mp157c-osd32mp1-brk.dts 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581
  1. /* SPDX-License-Identifier: (GPL-2.0+ OR BSD-3-Clause) */
  2. /*
  3. * Copyright (C) STMicroelectronics 2020 - All Rights Reserved
  4. * Author: STM32CubeMX code generation for STMicroelectronics.
  5. */
  6. /* For more information on Device Tree configuration, please refer to
  7. * https://wiki.st.com/stm32mpu/wiki/Category:Device_tree_configuration
  8. */
  9. /dts-v1/;
  10. #include <dt-bindings/pinctrl/stm32-pinfunc.h>
  11. #include <dt-bindings/clock/stm32mp1-clksrc.h>
  12. #include <dt-bindings/soc/st,stm32-etzpc.h>
  13. #include <dt-bindings/power/stm32mp1-power.h>
  14. #include "osd32mp1_ddr.dtsi"
  15. #include "stm32mp157.dtsi"
  16. #include "stm32mp15xc.dtsi"
  17. #include "stm32mp15xxac-pinctrl.dtsi"
  18. #include "stm32mp15-ddr.dtsi"
  19. / {
  20. model = "Octavo OSD32MP1 BRK board";
  21. compatible = "st,stm32mp157c-osd32mp1-brk", "st,stm32mp157";
  22. memory@c0000000{
  23. device_type = "memory";
  24. reg = <0xc0000000 0x20000000>;
  25. };
  26. vin:vin{
  27. compatible = "regulator-fixed";
  28. regulator-name = "vin";
  29. regulator-min-microvolt = <5000000>;
  30. regulator-max-microvolt = <5000000>;
  31. regulator-always-on;
  32. };
  33. aliases{
  34. serial0 = &uart4;
  35. };
  36. chosen{
  37. stdout-path = "serial0:115200n8";
  38. };
  39. clocks {
  40. clk_lse: clk-lse {
  41. st,drive = < LSEDRV_MEDIUM_HIGH >;
  42. };
  43. };
  44. };
  45. &clk_hse {
  46. st,digbypass;
  47. };
  48. &pinctrl {
  49. sdmmc1_pins_mx: sdmmc1_mx-0 {
  50. pins1 {
  51. pinmux = <STM32_PINMUX('C', 8, AF12)>, /* SDMMC1_D0 */
  52. <STM32_PINMUX('C', 9, AF12)>, /* SDMMC1_D1 */
  53. <STM32_PINMUX('C', 10, AF12)>, /* SDMMC1_D2 */
  54. <STM32_PINMUX('C', 11, AF12)>, /* SDMMC1_D3 */
  55. <STM32_PINMUX('D', 2, AF12)>; /* SDMMC1_CMD */
  56. bias-disable;
  57. drive-push-pull;
  58. slew-rate = <1>;
  59. };
  60. pins2 {
  61. pinmux = <STM32_PINMUX('C', 12, AF12)>; /* SDMMC1_CK */
  62. bias-disable;
  63. drive-push-pull;
  64. slew-rate = <2>;
  65. };
  66. };
  67. uart4_pins_mx: uart4_mx-0 {
  68. pins1 {
  69. pinmux = <STM32_PINMUX('B', 2, AF8)>; /* UART4_RX */
  70. bias-disable;
  71. };
  72. pins2 {
  73. pinmux = <STM32_PINMUX('G', 11, AF6)>; /* UART4_TX */
  74. bias-disable;
  75. drive-push-pull;
  76. slew-rate = <0>;
  77. };
  78. };
  79. /* USER CODE BEGIN pinctrl */
  80. /* USER CODE END pinctrl */
  81. };
  82. &pinctrl_z {
  83. i2c4_pins_z_mx: i2c4_mx-0 {
  84. pins {
  85. pinmux = <STM32_PINMUX('Z', 4, AF6)>, /* I2C4_SCL */
  86. <STM32_PINMUX('Z', 5, AF6)>; /* I2C4_SDA */
  87. bias-disable;
  88. drive-open-drain;
  89. slew-rate = <0>;
  90. };
  91. };
  92. /* USER CODE BEGIN pinctrl_z */
  93. /* USER CODE END pinctrl_z */
  94. };
  95. &rcc {
  96. st,hsi-cal;
  97. st,csi-cal;
  98. st,cal-sec = <60>;
  99. st,clksrc = <
  100. CLK_MPU_PLL1P
  101. CLK_AXI_PLL2P
  102. CLK_MCU_PLL3P
  103. CLK_PLL12_HSE
  104. CLK_PLL3_HSE
  105. CLK_PLL4_HSE
  106. CLK_RTC_LSE
  107. CLK_MCO1_DISABLED
  108. CLK_MCO2_DISABLED
  109. >;
  110. st,clkdiv = <
  111. 1 /*MPU*/
  112. 0 /*AXI*/
  113. 0 /*MCU*/
  114. 1 /*APB1*/
  115. 1 /*APB2*/
  116. 1 /*APB3*/
  117. 1 /*APB4*/
  118. 2 /*APB5*/
  119. 23 /*RTC*/
  120. 0 /*MCO1*/
  121. 0 /*MCO2*/
  122. >;
  123. st,pkcs = <
  124. CLK_CKPER_HSE
  125. CLK_FMC_ACLK
  126. CLK_QSPI_ACLK
  127. CLK_ETH_DISABLED
  128. CLK_SDMMC12_PLL4P
  129. CLK_DSI_DSIPLL
  130. CLK_STGEN_HSE
  131. CLK_USBPHY_HSE
  132. CLK_SPI2S1_PLL3Q
  133. CLK_SPI2S23_PLL3Q
  134. CLK_SPI45_HSI
  135. CLK_SPI6_HSI
  136. CLK_I2C46_HSI
  137. CLK_SDMMC3_PLL4P
  138. CLK_USBO_USBPHY
  139. CLK_ADC_CKPER
  140. CLK_CEC_LSE
  141. CLK_I2C12_HSI
  142. CLK_I2C35_HSI
  143. CLK_UART1_HSI
  144. CLK_UART24_HSI
  145. CLK_UART35_HSI
  146. CLK_UART6_HSI
  147. CLK_UART78_HSI
  148. CLK_SPDIF_PLL4P
  149. CLK_FDCAN_PLL4R
  150. CLK_SAI1_PLL3Q
  151. CLK_SAI2_PLL3Q
  152. CLK_SAI3_PLL3Q
  153. CLK_SAI4_PLL3Q
  154. CLK_RNG1_LSI
  155. CLK_RNG2_LSI
  156. CLK_LPTIM1_PCLK1
  157. CLK_LPTIM23_PCLK3
  158. CLK_LPTIM45_LSE
  159. >;
  160. /* VCO = 1066.0 MHz => P = 266 (AXI), Q = 533 (GPU), R = 533 (DDR) */
  161. pll2: st,pll@1 {
  162. compatible = "st,stm32mp1-pll";
  163. reg = <1>;
  164. cfg = <2 65 1 0 0 PQR(1,1,1)>;
  165. frac = <0x1400>;
  166. };
  167. /* VCO = 417.8 MHz => P = 209, Q = 24, R = 11 */
  168. pll3: st,pll@2 {
  169. compatible = "st,stm32mp1-pll";
  170. reg = <2>;
  171. cfg = <1 33 1 16 36 PQR(1,1,1)>;
  172. frac = <0x1a04>;
  173. };
  174. /* VCO = 594.0 MHz => P = 99, Q = 74, R = 74 */
  175. pll4: st,pll@3 {
  176. compatible = "st,stm32mp1-pll";
  177. reg = <3>;
  178. cfg = <3 98 5 7 7 PQR(1,1,1)>;
  179. };
  180. };
  181. &bsec{
  182. board_id:board_id@ec{
  183. reg = <0xec 0x4>;
  184. st,non-secure-otp;
  185. };
  186. };
  187. &cryp1{
  188. status = "okay";
  189. /* USER CODE BEGIN cryp1 */
  190. /* USER CODE END cryp1 */
  191. };
  192. &etzpc{
  193. st,decprot = <
  194. DECPROT(STM32MP1_ETZPC_USART1_ID, DECPROT_NS_RW, DECPROT_UNLOCK)
  195. DECPROT(STM32MP1_ETZPC_SPI6_ID, DECPROT_NS_RW, DECPROT_UNLOCK)
  196. DECPROT(STM32MP1_ETZPC_I2C4_ID, DECPROT_NS_RW, DECPROT_UNLOCK)
  197. DECPROT(STM32MP1_ETZPC_I2C6_ID, DECPROT_NS_RW, DECPROT_UNLOCK)
  198. DECPROT(STM32MP1_ETZPC_RNG1_ID, DECPROT_NS_RW, DECPROT_UNLOCK)
  199. DECPROT(STM32MP1_ETZPC_HASH1_ID, DECPROT_NS_RW, DECPROT_UNLOCK)
  200. DECPROT(STM32MP1_ETZPC_CRYP1_ID, DECPROT_NS_RW, DECPROT_UNLOCK)
  201. DECPROT(STM32MP1_ETZPC_DDRCTRL_ID, DECPROT_S_RW, DECPROT_LOCK)
  202. DECPROT(STM32MP1_ETZPC_DDRPHYC_ID, DECPROT_S_RW, DECPROT_LOCK)
  203. DECPROT(STM32MP1_ETZPC_STGENC_ID, DECPROT_S_RW, DECPROT_LOCK)
  204. DECPROT(STM32MP1_ETZPC_BKPSRAM_ID, DECPROT_S_RW, DECPROT_LOCK)
  205. DECPROT(STM32MP1_ETZPC_IWDG1_ID, DECPROT_S_RW, DECPROT_LOCK)
  206. >;
  207. secure-status = "okay";
  208. };
  209. &hash1{
  210. status = "okay";
  211. };
  212. &i2c4{
  213. pinctrl-names = "default";
  214. pinctrl-0 = <&i2c4_pins_z_mx>;
  215. status = "okay";
  216. secure-status = "okay";
  217. i2c-scl-rising-time-ns = <185>;
  218. i2c-scl-falling-time-ns = <20>;
  219. clock-frequency = <400000>;
  220. pmic:stpmic@33{
  221. compatible = "st,stpmic1";
  222. reg = <0x33>;
  223. interrupts-extended = <&exti_pwr 55 IRQ_TYPE_EDGE_FALLING>;
  224. interrupt-controller;
  225. #interrupt-cells = <2>;
  226. status = "okay";
  227. secure-status = "okay";
  228. regulators{
  229. compatible = "st,stpmic1-regulators";
  230. buck1-supply = <&vin>;
  231. buck2-supply = <&vin>;
  232. buck3-supply = <&vin>;
  233. buck4-supply = <&vin>;
  234. ldo1-supply = <&v3v3>;
  235. ldo2-supply = <&vin>;
  236. ldo3-supply = <&vdd_ddr>;
  237. ldo4-supply = <&vin>;
  238. ldo5-supply = <&vin>;
  239. ldo6-supply = <&v3v3>;
  240. vref_ddr-supply = <&vin>;
  241. boost-supply = <&vin>;
  242. pwr_sw1-supply = <&bst_out>;
  243. pwr_sw2-supply = <&bst_out>;
  244. vddcore:buck1{
  245. regulator-name = "vddcore";
  246. regulator-min-microvolt = <1200000>;
  247. regulator-max-microvolt = <1350000>;
  248. regulator-always-on;
  249. regulator-initial-mode = <0>;
  250. regulator-over-current-protection;
  251. lp-stop{
  252. regulator-on-in-suspend;
  253. regulator-suspend-microvolt = <1200000>;
  254. };
  255. standby-ddr-sr{
  256. regulator-off-in-suspend;
  257. };
  258. standby-ddr-off{
  259. regulator-off-in-suspend;
  260. };
  261. };
  262. vdd_ddr:buck2{
  263. regulator-name = "vdd_ddr";
  264. regulator-min-microvolt = <1350000>;
  265. regulator-max-microvolt = <1350000>;
  266. regulator-always-on;
  267. regulator-initial-mode = <0>;
  268. regulator-over-current-protection;
  269. lp-stop{
  270. regulator-suspend-microvolt = <1350000>;
  271. regulator-on-in-suspend;
  272. };
  273. standby-ddr-sr{
  274. regulator-suspend-microvolt = <1350000>;
  275. regulator-on-in-suspend;
  276. };
  277. standby-ddr-off{
  278. regulator-off-in-suspend;
  279. };
  280. };
  281. vdd:buck3{
  282. regulator-name = "vdd";
  283. regulator-min-microvolt = <3300000>;
  284. regulator-max-microvolt = <3300000>;
  285. regulator-always-on;
  286. st,mask-reset;
  287. regulator-initial-mode = <0>;
  288. regulator-over-current-protection;
  289. lp-stop{
  290. regulator-suspend-microvolt = <3300000>;
  291. regulator-on-in-suspend;
  292. };
  293. standby-ddr-sr{
  294. regulator-suspend-microvolt = <3300000>;
  295. regulator-on-in-suspend;
  296. };
  297. standby-ddr-off{
  298. regulator-suspend-microvolt = <3300000>;
  299. regulator-on-in-suspend;
  300. };
  301. };
  302. v3v3:buck4{
  303. regulator-name = "v3v3";
  304. regulator-min-microvolt = <3300000>;
  305. regulator-max-microvolt = <3300000>;
  306. regulator-always-on;
  307. regulator-over-current-protection;
  308. regulator-initial-mode = <0>;
  309. lp-stop{
  310. regulator-suspend-microvolt = <3300000>;
  311. regulator-on-in-suspend;
  312. };
  313. standby-ddr-sr{
  314. regulator-off-in-suspend;
  315. };
  316. standby-ddr-off{
  317. regulator-off-in-suspend;
  318. };
  319. };
  320. v1v8_audio:ldo1{
  321. regulator-name = "v1v8_audio";
  322. regulator-min-microvolt = <1800000>;
  323. regulator-max-microvolt = <1800000>;
  324. regulator-always-on;
  325. standby-ddr-sr{
  326. regulator-off-in-suspend;
  327. };
  328. standby-ddr-off{
  329. regulator-off-in-suspend;
  330. };
  331. };
  332. v3v3_hdmi:ldo2{
  333. regulator-name = "v3v3_hdmi";
  334. regulator-min-microvolt = <3300000>;
  335. regulator-max-microvolt = <3300000>;
  336. regulator-always-on;
  337. standby-ddr-sr{
  338. regulator-off-in-suspend;
  339. };
  340. standby-ddr-off{
  341. regulator-off-in-suspend;
  342. };
  343. };
  344. vtt_ddr:ldo3{
  345. regulator-name = "vtt_ddr";
  346. regulator-min-microvolt = <500000>;
  347. regulator-max-microvolt = <750000>;
  348. regulator-always-on;
  349. regulator-over-current-protection;
  350. lp-stop{
  351. regulator-off-in-suspend;
  352. };
  353. standby-ddr-sr{
  354. regulator-off-in-suspend;
  355. };
  356. standby-ddr-off{
  357. regulator-off-in-suspend;
  358. };
  359. };
  360. vdd_usb:ldo4{
  361. regulator-name = "vdd_usb";
  362. regulator-min-microvolt = <3300000>;
  363. regulator-max-microvolt = <3300000>;
  364. regulator-always-on;
  365. standby-ddr-sr{
  366. regulator-on-in-suspend;
  367. };
  368. standby-ddr-off{
  369. regulator-off-in-suspend;
  370. };
  371. };
  372. vdda:ldo5{
  373. regulator-name = "vdda";
  374. regulator-min-microvolt = <2900000>;
  375. regulator-max-microvolt = <2900000>;
  376. regulator-boot-on;
  377. standby-ddr-sr{
  378. regulator-off-in-suspend;
  379. };
  380. standby-ddr-off{
  381. regulator-off-in-suspend;
  382. };
  383. };
  384. v1v2_hdmi:ldo6{
  385. regulator-name = "v1v2_hdmi";
  386. regulator-min-microvolt = <1200000>;
  387. regulator-max-microvolt = <1200000>;
  388. regulator-always-on;
  389. standby-ddr-sr{
  390. regulator-off-in-suspend;
  391. };
  392. standby-ddr-off{
  393. regulator-off-in-suspend;
  394. };
  395. };
  396. vref_ddr:vref_ddr{
  397. regulator-name = "vref_ddr";
  398. regulator-always-on;
  399. regulator-over-current-protection;
  400. lp-stop{
  401. regulator-on-in-suspend;
  402. };
  403. standby-ddr-sr{
  404. regulator-on-in-suspend;
  405. };
  406. standby-ddr-off{
  407. regulator-off-in-suspend;
  408. };
  409. };
  410. bst_out:boost{
  411. regulator-name = "bst_out";
  412. };
  413. vbus_otg:pwr_sw1{
  414. regulator-name = "vbus_otg";
  415. };
  416. vbus_sw:pwr_sw2{
  417. regulator-name = "vbus_sw";
  418. regulator-active-discharge = <1>;
  419. };
  420. };
  421. };
  422. /* USER CODE END i2c4 */
  423. };
  424. &iwdg2{
  425. status = "okay";
  426. secure-status = "okay";
  427. timeout-sec = <32>;
  428. };
  429. &rcc{
  430. status = "okay";
  431. secure-status = "okay";
  432. /* USER CODE BEGIN rcc */
  433. /* USER CODE END rcc */
  434. };
  435. &rng1{
  436. status = "okay";
  437. secure-status = "okay";
  438. };
  439. &rtc{
  440. status = "okay";
  441. secure-status = "okay";
  442. };
  443. &sdmmc1{
  444. pinctrl-names = "default";
  445. pinctrl-0 = <&sdmmc1_pins_mx>;
  446. status = "okay";
  447. disable-wp;
  448. st,neg-edge;
  449. bus-width = <4>;
  450. vmmc-supply = <&v3v3>;
  451. };
  452. &tamp{
  453. status = "okay";
  454. secure-status = "okay";
  455. /* USER CODE BEGIN tamp */
  456. /* USER CODE END tamp */
  457. };
  458. &uart4{
  459. pinctrl-names = "default";
  460. pinctrl-0 = <&uart4_pins_mx>;
  461. status = "okay";
  462. };
  463. &usbotg_hs{
  464. status = "okay";
  465. phys = <&usbphyc_port1 0>;
  466. phy-names = "usb2-phy";
  467. usb-role-switch;
  468. };
  469. &usbphyc{
  470. status = "okay";
  471. };
  472. &usbphyc_port0{
  473. phy-supply = <&vdd_usb>;
  474. };
  475. &usbphyc_port1{
  476. phy-supply = <&vdd_usb>;
  477. };
  478. &cpu0{
  479. cpu-supply = <&vddcore>;
  480. };
  481. &cpu1{
  482. cpu-supply = <&vddcore>;
  483. };
  484. &pwr_regulators {
  485. system_suspend_supported_soc_modes = <
  486. STM32_PM_CSLEEP_RUN
  487. STM32_PM_CSTOP_ALLOW_LP_STOP
  488. STM32_PM_CSTOP_ALLOW_STANDBY_DDR_SR
  489. >;
  490. system_off_soc_mode = <STM32_PM_CSTOP_ALLOW_STANDBY_DDR_OFF>;
  491. vdd-supply = <&vdd>;
  492. vdd_3v3_usbfs-supply = <&vdd_usb>;
  493. };
  494. &nvmem_layout{
  495. nvmem-cells = <&cfg0_otp>,
  496. <&part_number_otp>,
  497. <&monotonic_otp>,
  498. <&nand_otp>,
  499. <&uid_otp>,
  500. <&package_otp>,
  501. <&hw2_otp>,
  502. <&pkh_otp>,
  503. <&board_id>;
  504. nvmem-cell-names = "cfg0_otp",
  505. "part_number_otp",
  506. "monotonic_otp",
  507. "nand_otp",
  508. "uid_otp",
  509. "package_otp",
  510. "hw2_otp",
  511. "pkh_otp",
  512. "board_id";
  513. };
  514. &timers15{
  515. secure-status = "okay";
  516. st,hsi-cal-input = <7>;
  517. st,csi-cal-input = <8>;
  518. };