stm32mp157c-emstamp-argon.dtsi 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543
  1. // SPDX-License-Identifier: (GPL-2.0 or MIT)
  2. //
  3. // Copyright (c) 2021 emtrion GmbH
  4. // Author: Reinhold Müller <[email protected]>.
  5. //
  6. #include "stm32mp157.dtsi"
  7. #include "stm32mp15xc.dtsi"
  8. #include "stm32mp15-pinctrl.dtsi"
  9. #include "stm32mp15xxac-pinctrl.dtsi"
  10. #include <dt-bindings/gpio/gpio.h>
  11. #include <dt-bindings/mfd/st,stpmic1.h>
  12. / {
  13. aliases {
  14. ethernet0 = &ethernet0;
  15. serial0 = &uart4;
  16. serial1 = &usart2;
  17. serial2 = &usart3;
  18. };
  19. chosen {
  20. stdout-path = "serial0:115200n8";
  21. };
  22. memory@c0000000 {
  23. device_type = "memory";
  24. reg = <0xc0000000 0x20000000>;
  25. };
  26. reserved-memory {
  27. #address-cells = <1>;
  28. #size-cells = <1>;
  29. ranges;
  30. mcuram2: mcuram2@10000000 {
  31. compatible = "shared-dma-pool";
  32. reg = <0x10000000 0x40000>;
  33. no-map;
  34. };
  35. vdev0vring0: vdev0vring0@10040000 {
  36. compatible = "shared-dma-pool";
  37. reg = <0x10040000 0x2000>;
  38. no-map;
  39. };
  40. vdev0vring1: vdev0vring1@10042000 {
  41. compatible = "shared-dma-pool";
  42. reg = <0x10042000 0x2000>;
  43. no-map;
  44. };
  45. vdev0buffer: vdev0buffer@10044000 {
  46. compatible = "shared-dma-pool";
  47. reg = <0x10044000 0x4000>;
  48. no-map;
  49. };
  50. mcuram: mcuram@30000000 {
  51. compatible = "shared-dma-pool";
  52. reg = <0x30000000 0x40000>;
  53. no-map;
  54. };
  55. retram: retram@38000000 {
  56. compatible = "shared-dma-pool";
  57. reg = <0x38000000 0x10000>;
  58. no-map;
  59. };
  60. };
  61. led: gpio_leds {
  62. compatible = "gpio-leds";
  63. led-0 {
  64. label = "panic";
  65. gpios = <&gpioa 13 GPIO_ACTIVE_LOW>;
  66. linux,default-trigger = "none";
  67. default-state = "off";
  68. panic-indicator;
  69. };
  70. led-1 {
  71. label = "heartbeat";
  72. gpios = <&gpioa 14 GPIO_ACTIVE_LOW>;
  73. linux,default-trigger = "heartbeat";
  74. default-state = "on";
  75. };
  76. };
  77. };
  78. &adc {
  79. vdd-supply = <&vdd>;
  80. vdda-supply = <&vdd>;
  81. vref-supply = <&vrefbuf>;
  82. status = "okay";
  83. adc1: adc@0 {
  84. pinctrl-names = "default";
  85. pinctrl-0 = <&adc1_in6_pins_a>;
  86. status = "disabled";
  87. channel@6 {
  88. reg = <6>;
  89. st,min-sample-time-ns = <5000>;
  90. };
  91. };
  92. adc2: adc@100 {
  93. #address-cells = <1>;
  94. #size-cells = <0>;
  95. status = "okay";
  96. channel@12 {
  97. reg = <12>;
  98. label = "sense_temp";
  99. st,min-sample-time-ns = <9000>;
  100. };
  101. channel@15 {
  102. reg = <15>;
  103. label = "vbat";
  104. st,min-sample-time-ns = <9000>;
  105. };
  106. channel@16 {
  107. reg = <16>;
  108. label = "dac_out1";
  109. st,min-sample-time-ns = <9000>;
  110. };
  111. channel@17 {
  112. reg = <17>;
  113. label = "dac_out1";
  114. st,min-sample-time-ns = <9000>;
  115. };
  116. };
  117. };
  118. &crc1 {
  119. status = "okay";
  120. };
  121. &cryp1 {
  122. status = "okay";
  123. };
  124. &dac {
  125. pinctrl-names = "default";
  126. pinctrl-0 = <&dac_ch1_pins_a &dac_ch2_pins_a>;
  127. vref-supply = <&vdda>;
  128. status = "disabled";
  129. dac1: dac@1 {
  130. status = "okay";
  131. };
  132. dac2: dac@2 {
  133. status = "okay";
  134. };
  135. };
  136. &dts {
  137. status = "okay";
  138. };
  139. &ethernet0 {
  140. status = "okay";
  141. snps,reset-gpio = <&gpioa 1 GPIO_ACTIVE_LOW>;
  142. snps,reset-active-low;
  143. snps,reset-delays-us = <0 30000 50000>;
  144. pinctrl-0 = <&ethernet0_rmii_pins_b>;
  145. pinctrl-1 = <&ethernet0_rmii_sleep_pins_b>;
  146. pinctrl-names = "default", "sleep";
  147. phy-mode = "rmii";
  148. max-speed = <100>;
  149. phy-handle = <&phy0>;
  150. st,eth-ref-clk-sel;
  151. mdio {
  152. #address-cells = <1>;
  153. #size-cells = <0>;
  154. compatible = "snps,dwmac-mdio";
  155. phy0: ethernet-phy@0 {
  156. reg = <0>;
  157. };
  158. };
  159. };
  160. &hash1 {
  161. status = "okay";
  162. };
  163. &i2c1 {
  164. pinctrl-names = "default", "sleep";
  165. pinctrl-0 = <&i2c1_pins_a>;
  166. pinctrl-1 = <&i2c1_sleep_pins_a>;
  167. i2c-scl-rising-time-ns = <100>;
  168. i2c-scl-falling-time-ns = <7>;
  169. status = "disabled";
  170. /delete-property/dmas;
  171. /delete-property/dma-names;
  172. };
  173. &i2c4 {
  174. pinctrl-names = "default", "sleep";
  175. pinctrl-0 = <&i2c4_pins_a>;
  176. pinctrl-1 = <&i2c4_sleep_pins_a>;
  177. i2c-scl-rising-time-ns = <185>;
  178. i2c-scl-falling-time-ns = <20>;
  179. status = "okay";
  180. /delete-property/dmas;
  181. /delete-property/dma-names;
  182. pmic: stpmic@33 {
  183. compatible = "st,stpmic1";
  184. reg = <0x33>;
  185. interrupts-extended = <&gpioa 0 IRQ_TYPE_EDGE_FALLING>;
  186. interrupt-controller;
  187. #interrupt-cells = <2>;
  188. status = "okay";
  189. regulators {
  190. compatible = "st,stpmic1-regulators";
  191. ldo1-supply = <&v3v3>;
  192. ldo3-supply = <&vdd_ddr>;
  193. ldo6-supply = <&v3v3>;
  194. pwr_sw1-supply = <&bst_out>;
  195. pwr_sw2-supply = <&bst_out>;
  196. vddcore: buck1 {
  197. regulator-name = "vddcore";
  198. regulator-min-microvolt = <1200000>;
  199. regulator-max-microvolt = <1350000>;
  200. regulator-always-on;
  201. regulator-initial-mode = <0>;
  202. regulator-over-current-protection;
  203. };
  204. vdd_ddr: buck2 {
  205. regulator-name = "vdd_ddr";
  206. regulator-min-microvolt = <1350000>;
  207. regulator-max-microvolt = <1350000>;
  208. regulator-always-on;
  209. regulator-initial-mode = <0>;
  210. regulator-over-current-protection;
  211. };
  212. vdd: buck3 {
  213. regulator-name = "vdd";
  214. regulator-min-microvolt = <3300000>;
  215. regulator-max-microvolt = <3300000>;
  216. regulator-always-on;
  217. st,mask-reset;
  218. regulator-initial-mode = <0>;
  219. regulator-over-current-protection;
  220. };
  221. v3v3: buck4 {
  222. regulator-name = "v3v3";
  223. regulator-min-microvolt = <3300000>;
  224. regulator-max-microvolt = <3300000>;
  225. regulator-always-on;
  226. regulator-over-current-protection;
  227. regulator-initial-mode = <0>;
  228. };
  229. v1v8_audio: ldo1 {
  230. regulator-name = "v1v8_audio";
  231. regulator-min-microvolt = <1800000>;
  232. regulator-max-microvolt = <1800000>;
  233. regulator-always-on;
  234. interrupts = <IT_CURLIM_LDO1 0>;
  235. };
  236. v3v3_hdmi: ldo2 {
  237. regulator-name = "v3v3_hdmi";
  238. regulator-min-microvolt = <3300000>;
  239. regulator-max-microvolt = <3300000>;
  240. regulator-always-on;
  241. interrupts = <IT_CURLIM_LDO2 0>;
  242. };
  243. vtt_ddr: ldo3 {
  244. regulator-name = "vtt_ddr";
  245. regulator-min-microvolt = <500000>;
  246. regulator-max-microvolt = <750000>;
  247. regulator-always-on;
  248. regulator-over-current-protection;
  249. };
  250. vdd_usb: ldo4 {
  251. regulator-name = "vdd_usb";
  252. regulator-min-microvolt = <3300000>;
  253. regulator-max-microvolt = <3300000>;
  254. interrupts = <IT_CURLIM_LDO4 0>;
  255. };
  256. vdd_sd: ldo5 {
  257. regulator-name = "vdd_sd";
  258. regulator-min-microvolt = <3300000>;
  259. regulator-max-microvolt = <3300000>;
  260. interrupts = <IT_CURLIM_LDO5 0>;
  261. regulator-always-on;
  262. };
  263. vdda: ldo6 {
  264. regulator-name = "vdda";
  265. regulator-min-microvolt = <2900000>;
  266. regulator-max-microvolt = <2900000>;
  267. regulator-always-on;
  268. interrupts = <IT_CURLIM_LDO6 0>;
  269. regulator-boot-on;
  270. };
  271. vref_ddr: vref_ddr {
  272. regulator-name = "vref_ddr";
  273. regulator-always-on;
  274. regulator-over-current-protection;
  275. };
  276. bst_out: boost {
  277. regulator-name = "bst_out";
  278. interrupts = <IT_OCP_BOOST 0>;
  279. };
  280. vbus_otg: pwr_sw1 {
  281. regulator-name = "vbus_otg";
  282. interrupts = <IT_OCP_OTG 0>;
  283. regulator-active-discharge;
  284. };
  285. vbus_usbh: pwr_sw2 {
  286. regulator-name = "usbh_vbus";
  287. interrupts = <IT_OCP_SWOUT 0>;
  288. regulator-always-on;
  289. regulator-boot-on;
  290. };
  291. };
  292. onkey {
  293. compatible = "st,stpmic1-onkey";
  294. interrupts = <IT_PONKEY_F 0>, <IT_PONKEY_R 1>;
  295. interrupt-names = "onkey-falling", "onkey-rising";
  296. status = "okay";
  297. };
  298. watchdog {
  299. compatible = "st,stpmic1-wdt";
  300. status = "disabled";
  301. };
  302. };
  303. };
  304. &i2c5 {
  305. pinctrl-names = "default", "sleep";
  306. pinctrl-0 = <&i2c5_pins_a>;
  307. pinctrl-1 = <&i2c5_sleep_pins_a>;
  308. i2c-scl-rising-time-ns = <185>;
  309. i2c-scl-falling-time-ns = <20>;
  310. /delete-property/dmas;
  311. /delete-property/dma-names;
  312. };
  313. &ipcc {
  314. status = "okay";
  315. };
  316. &iwdg2 {
  317. timeout-sec = <32>;
  318. status = "okay";
  319. };
  320. &m4_rproc {
  321. memory-region = <&retram>, <&mcuram>, <&mcuram2>, <&vdev0vring0>,
  322. <&vdev0vring1>, <&vdev0buffer>;
  323. mboxes = <&ipcc 0>, <&ipcc 1>, <&ipcc 2>, <&ipcc 3>;
  324. mbox-names = "vq0", "vq1", "shutdown", "detach";
  325. interrupt-parent = <&exti>;
  326. interrupts = <68 1>;
  327. interrupt-names = "wdg";
  328. recovery;
  329. status = "okay";
  330. };
  331. &pwr_regulators {
  332. vdd-supply = <&vdd>;
  333. vdd_3v3_usbfs-supply = <&vdd_usb>;
  334. };
  335. &qspi {
  336. pinctrl-names = "default", "sleep";
  337. pinctrl-0 = <&qspi_clk_pins_a
  338. &qspi_bk1_pins_a
  339. &qspi_cs1_pins_a>;
  340. pinctrl-1 = <&qspi_clk_sleep_pins_a
  341. &qspi_bk1_sleep_pins_a
  342. &qspi_cs1_sleep_pins_a>;
  343. reg = <0x58003000 0x1000>, <0x70000000 0x4000000>;
  344. #address-cells = <1>;
  345. #size-cells = <0>;
  346. status = "okay";
  347. flash0: flash@0 {
  348. compatible = "jedec,spi-nor";
  349. reg = <0>;
  350. spi-max-frequency = <133000000>;
  351. spi-rx-bus-width = <1>;
  352. spi-tx-bus-width = <1>;
  353. #address-cells = <1>;
  354. #size-cells = <1>;
  355. };
  356. };
  357. &rng1 {
  358. status = "okay";
  359. };
  360. &rtc {
  361. status = "okay";
  362. };
  363. &sdmmc2 {
  364. arm,primecell-periphid = <0x10153180>;
  365. pinctrl-names = "default", "opendrain", "sleep";
  366. pinctrl-0 = <&sdmmc2_b4_pins_b>;
  367. pinctrl-1 = <&sdmmc2_b4_od_pins_b>;
  368. pinctrl-2 = <&sdmmc2_b4_sleep_pins_a>;
  369. non-removable;
  370. st,neg-edge;
  371. bus-width = <4>;
  372. vmmc-supply = <&v3v3>;
  373. status = "okay";
  374. };
  375. &spi1 {
  376. pinctrl-names = "default";
  377. pinctrl-0 = <&spi1_pins_a>;
  378. cs-gpios = <&gpioz 3 0>;
  379. status = "disabled";
  380. };
  381. &timers1 {
  382. /* spare dmas for other usage */
  383. /delete-property/dmas;
  384. /delete-property/dma-names;
  385. pwm {
  386. pinctrl-0 = <&pwm1_pins_b>;
  387. pinctrl-1 = <&pwm1_sleep_pins_b>;
  388. pinctrl-names = "default", "sleep";
  389. status = "okay";
  390. };
  391. timer@0 {
  392. status = "okay";
  393. };
  394. };
  395. &timers4 {
  396. /delete-property/dmas;
  397. /delete-property/dma-names;
  398. pwm {
  399. pinctrl-0 = <&pwm4_pins_b>;
  400. pinctrl-1 = <&pwm4_sleep_pins_b>;
  401. pinctrl-names = "default", "sleep";
  402. status = "okay";
  403. };
  404. timer@3 {
  405. status = "okay";
  406. };
  407. };
  408. &timers5 {
  409. /delete-property/dmas;
  410. /delete-property/dma-names;
  411. pwm {
  412. pinctrl-0 = <&pwm5_pins_a>;
  413. pinctrl-1 = <&pwm5_sleep_pins_a>;
  414. pinctrl-names = "default", "sleep";
  415. status = "okay";
  416. };
  417. timer@4 {
  418. status = "okay";
  419. };
  420. };
  421. &uart4 {
  422. pinctrl-names = "default", "sleep", "idle";
  423. pinctrl-0 = <&uart4_pins_a>;
  424. pinctrl-1 = <&uart4_sleep_pins_a>;
  425. pinctrl-2 = <&uart4_idle_pins_a>;
  426. status = "okay";
  427. };
  428. &usart2 {
  429. pinctrl-names = "default", "sleep";
  430. pinctrl-0 = <&usart2_pins_a>;
  431. pinctrl-1 = <&usart2_sleep_pins_a>;
  432. status = "okay";
  433. };
  434. &usart3 {
  435. pinctrl-names = "default", "sleep", "idle";
  436. pinctrl-0 = <&usart3_pins_d>;
  437. pinctrl-1 = <&usart3_sleep_pins_d>;
  438. pinctrl-2 = <&usart3_idle_pins_d>;
  439. status = "okay";
  440. };
  441. &usbh_ehci {
  442. phys = <&usbphyc_port0>;
  443. phy-names = "usb";
  444. status = "okay";
  445. };
  446. &usbh_ohci {
  447. phys = <&usbphyc_port0>;
  448. phy-names = "usb";
  449. status = "okay";
  450. };
  451. &usbotg_hs {
  452. dr_mode = "peripheral";
  453. pinctrl-names = "default";
  454. pinctrl-0 = <&usbotg_hs_pins_a>;
  455. phy-names = "usb2-phy";
  456. phys = <&usbphyc_port1 0>;
  457. vbus-supply = <&vbus_otg>;
  458. status = "okay";
  459. };
  460. &usbphyc {
  461. status = "okay";
  462. };
  463. &usbphyc_port0 {
  464. phy-supply = <&vdd_usb>;
  465. };
  466. &usbphyc_port1 {
  467. phy-supply = <&vdd_usb>;
  468. };
  469. &vrefbuf {
  470. regulator-min-microvolt = <2500000>;
  471. regulator-max-microvolt = <2500000>;
  472. vdda-supply = <&vdd>;
  473. status = "okay";
  474. };