stm32mp157a-stinger96.dtsi 6.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341
  1. // SPDX-License-Identifier: (GPL-2.0+ OR MIT)
  2. /*
  3. * Copyright (C) 2020 Manivannan Sadhasivam
  4. */
  5. /dts-v1/;
  6. #include "stm32mp157.dtsi"
  7. #include "stm32mp15-pinctrl.dtsi"
  8. #include "stm32mp15xxac-pinctrl.dtsi"
  9. #include <dt-bindings/gpio/gpio.h>
  10. #include <dt-bindings/mfd/st,stpmic1.h>
  11. / {
  12. aliases {
  13. mmc0 = &sdmmc1;
  14. serial0 = &uart4;
  15. serial1 = &uart7;
  16. serial2 = &usart2;
  17. spi0 = &spi4;
  18. };
  19. chosen {
  20. stdout-path = "serial1:115200n8";
  21. };
  22. memory@c0000000 {
  23. device_type = "memory";
  24. reg = <0xc0000000 0x10000000>;
  25. };
  26. led {
  27. compatible = "gpio-leds";
  28. led1 {
  29. label = "green:user1";
  30. gpios = <&gpioa 13 GPIO_ACTIVE_HIGH>;
  31. linux,default-trigger = "heartbeat";
  32. default-state = "off";
  33. };
  34. led2 {
  35. label = "green:user2";
  36. gpios = <&gpioh 3 GPIO_ACTIVE_HIGH>;
  37. linux,default-trigger = "mmc0";
  38. default-state = "off";
  39. };
  40. led3 {
  41. label = "green:user3";
  42. gpios = <&gpioh 2 GPIO_ACTIVE_HIGH>;
  43. linux,default-trigger = "mmc1";
  44. default-state = "off";
  45. };
  46. led4 {
  47. label = "green:user4";
  48. gpios = <&gpiof 12 GPIO_ACTIVE_HIGH>;
  49. linux,default-trigger = "none";
  50. default-state = "off";
  51. panic-indicator;
  52. };
  53. };
  54. sd_switch: regulator-sd_switch {
  55. compatible = "regulator-gpio";
  56. regulator-name = "sd_switch";
  57. regulator-min-microvolt = <1800000>;
  58. regulator-max-microvolt = <2900000>;
  59. regulator-type = "voltage";
  60. regulator-always-on;
  61. gpios = <&gpioa 8 GPIO_ACTIVE_HIGH>;
  62. gpios-states = <0>;
  63. states = <1800000 0x1>,
  64. <2900000 0x0>;
  65. };
  66. };
  67. /* Only headless mode is supported */
  68. &gpu {
  69. status = "disabled";
  70. };
  71. /* LS-I2C0 */
  72. &i2c2 {
  73. pinctrl-names = "default";
  74. pinctrl-0 = <&i2c2_pins_a>;
  75. i2c-scl-rising-time-ns = <1000>;
  76. i2c-scl-falling-time-ns = <300>;
  77. status = "okay";
  78. /delete-property/dmas;
  79. /delete-property/dma-names;
  80. };
  81. &i2c4 {
  82. pinctrl-names = "default";
  83. pinctrl-0 = <&i2c4_pins_a>;
  84. i2c-scl-rising-time-ns = <185>;
  85. i2c-scl-falling-time-ns = <20>;
  86. status = "okay";
  87. /delete-property/dmas;
  88. /delete-property/dma-names;
  89. pmic: stpmic@33 {
  90. compatible = "st,stpmic1";
  91. reg = <0x33>;
  92. interrupts-extended = <&gpioa 0 IRQ_TYPE_EDGE_FALLING>;
  93. interrupt-controller;
  94. #interrupt-cells = <2>;
  95. status = "okay";
  96. regulators {
  97. compatible = "st,stpmic1-regulators";
  98. ldo1-supply = <&v3v3>;
  99. ldo2-supply = <&v3v3>;
  100. ldo3-supply = <&vdd_ddr>;
  101. ldo5-supply = <&v3v3>;
  102. ldo6-supply = <&v3v3>;
  103. pwr_sw1-supply = <&bst_out>;
  104. pwr_sw2-supply = <&bst_out>;
  105. vddcore: buck1 {
  106. regulator-name = "vddcore";
  107. regulator-min-microvolt = <1200000>;
  108. regulator-max-microvolt = <1350000>;
  109. regulator-always-on;
  110. regulator-initial-mode = <0>;
  111. regulator-over-current-protection;
  112. };
  113. vdd_ddr: buck2 {
  114. regulator-name = "vdd_ddr";
  115. regulator-min-microvolt = <1500000>;
  116. regulator-max-microvolt = <1500000>;
  117. regulator-always-on;
  118. regulator-initial-mode = <0>;
  119. regulator-over-current-protection;
  120. };
  121. vdd: buck3 {
  122. regulator-name = "vdd";
  123. regulator-min-microvolt = <1800000>;
  124. regulator-max-microvolt = <1800000>;
  125. regulator-always-on;
  126. st,mask-reset;
  127. regulator-initial-mode = <0>;
  128. regulator-over-current-protection;
  129. };
  130. v3v3: buck4 {
  131. regulator-name = "v3v3";
  132. regulator-min-microvolt = <3300000>;
  133. regulator-max-microvolt = <3300000>;
  134. regulator-always-on;
  135. regulator-over-current-protection;
  136. regulator-initial-mode = <0>;
  137. };
  138. vdda: ldo1 {
  139. regulator-name = "vdda";
  140. regulator-min-microvolt = <1800000>;
  141. regulator-max-microvolt = <1800000>;
  142. regulator-always-on;
  143. interrupts = <IT_CURLIM_LDO1 0>;
  144. };
  145. v2v9: ldo2 {
  146. regulator-name = "v2v9";
  147. regulator-min-microvolt = <2900000>;
  148. regulator-max-microvolt = <2900000>;
  149. regulator-always-on;
  150. interrupts = <IT_CURLIM_LDO2 0>;
  151. };
  152. vtt_ddr: ldo3 {
  153. regulator-name = "vtt_ddr";
  154. regulator-min-microvolt = <500000>;
  155. regulator-max-microvolt = <750000>;
  156. regulator-always-on;
  157. regulator-over-current-protection;
  158. };
  159. vdd_usb: ldo4 {
  160. regulator-name = "vdd_usb";
  161. interrupts = <IT_CURLIM_LDO4 0>;
  162. };
  163. vdd_sd: ldo5 {
  164. regulator-name = "vdd_sd";
  165. regulator-min-microvolt = <2900000>;
  166. regulator-max-microvolt = <2900000>;
  167. interrupts = <IT_CURLIM_LDO5 0>;
  168. regulator-boot-on;
  169. };
  170. v1v8: ldo6 {
  171. regulator-name = "v1v8";
  172. regulator-min-microvolt = <1800000>;
  173. regulator-max-microvolt = <1800000>;
  174. regulator-always-on;
  175. interrupts = <IT_CURLIM_LDO6 0>;
  176. };
  177. vref_ddr: vref_ddr {
  178. regulator-name = "vref_ddr";
  179. regulator-always-on;
  180. };
  181. bst_out: boost {
  182. regulator-name = "bst_out";
  183. interrupts = <IT_OCP_BOOST 0>;
  184. };
  185. vbus_otg: pwr_sw1 {
  186. regulator-name = "vbus_otg";
  187. interrupts = <IT_OCP_OTG 0>;
  188. regulator-active-discharge = <1>;
  189. };
  190. vbus_sw: pwr_sw2 {
  191. regulator-name = "vbus_sw";
  192. interrupts = <IT_OCP_SWOUT 0>;
  193. regulator-active-discharge = <1>;
  194. };
  195. };
  196. onkey {
  197. compatible = "st,stpmic1-onkey";
  198. interrupts = <IT_PONKEY_F 0>, <IT_PONKEY_R 1>;
  199. interrupt-names = "onkey-falling", "onkey-rising";
  200. status = "okay";
  201. };
  202. watchdog {
  203. compatible = "st,stpmic1-wdt";
  204. status = "disabled";
  205. };
  206. };
  207. };
  208. &iwdg2 {
  209. timeout-sec = <32>;
  210. status = "okay";
  211. };
  212. &pwr_regulators {
  213. vdd-supply = <&vdd>;
  214. vdd_3v3_usbfs-supply = <&vdd_usb>;
  215. };
  216. &rng1 {
  217. status = "okay";
  218. };
  219. &rtc {
  220. status = "okay";
  221. };
  222. &sdmmc1 {
  223. pinctrl-names = "default", "opendrain", "sleep";
  224. pinctrl-0 = <&sdmmc1_b4_pins_a &sdmmc1_dir_pins_b>;
  225. pinctrl-1 = <&sdmmc1_b4_od_pins_a &sdmmc1_dir_pins_b>;
  226. pinctrl-2 = <&sdmmc1_b4_sleep_pins_a &sdmmc1_dir_sleep_pins_b>;
  227. broken-cd;
  228. disable-wp;
  229. st,sig-dir;
  230. st,neg-edge;
  231. st,use-ckin;
  232. bus-width = <4>;
  233. vmmc-supply = <&vdd_sd>;
  234. vqmmc-supply = <&sd_switch>;
  235. status = "okay";
  236. };
  237. /* LS-SPI0 */
  238. &spi4 {
  239. pinctrl-names = "default";
  240. pinctrl-0 = <&spi4_pins_a>;
  241. cs-gpios = <&gpioe 11 GPIO_ACTIVE_HIGH>;
  242. status = "okay";
  243. };
  244. /* BG96 */
  245. &usart2 {
  246. pinctrl-names = "default", "sleep";
  247. pinctrl-0 = <&usart2_pins_b>;
  248. pinctrl-1 = <&usart2_sleep_pins_b>;
  249. st,hw-flow-ctrl;
  250. /delete-property/dmas;
  251. /delete-property/dma-names;
  252. status = "okay";
  253. };
  254. /* LS-UART0 */
  255. &uart4 {
  256. pinctrl-names = "default";
  257. pinctrl-0 = <&uart4_pins_c>;
  258. st,hw-flow-ctrl;
  259. /delete-property/dmas;
  260. /delete-property/dma-names;
  261. status = "okay";
  262. };
  263. /* Debug console */
  264. &uart7 {
  265. pinctrl-names = "default";
  266. pinctrl-0 = <&uart7_pins_b>;
  267. /delete-property/dmas;
  268. /delete-property/dma-names;
  269. status = "okay";
  270. };
  271. &usbh_ehci {
  272. phys = <&usbphyc_port0>;
  273. phy-names = "usb";
  274. status = "okay";
  275. };
  276. &usbotg_hs {
  277. dr_mode = "peripheral";
  278. pinctrl-0 = <&usbotg_hs_pins_a>;
  279. pinctrl-names = "default";
  280. phy-names = "usb2-phy";
  281. phys = <&usbphyc_port1 0>;
  282. vbus-supply = <&vbus_otg>;
  283. status = "okay";
  284. };
  285. &usbphyc {
  286. status = "okay";
  287. };
  288. &usbphyc_port0 {
  289. phy-supply = <&vdd_usb>;
  290. };
  291. &usbphyc_port1 {
  292. phy-supply = <&vdd_usb>;
  293. };