stm32mp157c-osd32mp1-red.dts 12 KB

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