stm32mp157c-ev1.dts 8.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407
  1. // SPDX-License-Identifier: (GPL-2.0+ OR BSD-3-Clause)
  2. /*
  3. * Copyright (C) STMicroelectronics 2017 - All Rights Reserved
  4. * Author: Ludovic Barre <[email protected]> for STMicroelectronics.
  5. */
  6. /dts-v1/;
  7. #include "stm32mp157c-ed1.dts"
  8. #include <dt-bindings/gpio/gpio.h>
  9. #include <dt-bindings/input/input.h>
  10. / {
  11. model = "STMicroelectronics STM32MP157C eval daughter on eval mother";
  12. compatible = "st,stm32mp157c-ev1", "st,stm32mp157c-ed1", "st,stm32mp157";
  13. chosen {
  14. stdout-path = "serial0:115200n8";
  15. };
  16. aliases {
  17. serial0 = &uart4;
  18. serial1 = &usart3;
  19. ethernet0 = &ethernet0;
  20. };
  21. clocks {
  22. clk_ext_camera: clk-ext-camera {
  23. #clock-cells = <0>;
  24. compatible = "fixed-clock";
  25. clock-frequency = <24000000>;
  26. };
  27. };
  28. joystick {
  29. compatible = "gpio-keys";
  30. pinctrl-0 = <&joystick_pins>;
  31. pinctrl-names = "default";
  32. button-0 {
  33. label = "JoySel";
  34. linux,code = <KEY_ENTER>;
  35. interrupt-parent = <&stmfx_pinctrl>;
  36. interrupts = <0 IRQ_TYPE_EDGE_RISING>;
  37. };
  38. button-1 {
  39. label = "JoyDown";
  40. linux,code = <KEY_DOWN>;
  41. interrupt-parent = <&stmfx_pinctrl>;
  42. interrupts = <1 IRQ_TYPE_EDGE_RISING>;
  43. };
  44. button-2 {
  45. label = "JoyLeft";
  46. linux,code = <KEY_LEFT>;
  47. interrupt-parent = <&stmfx_pinctrl>;
  48. interrupts = <2 IRQ_TYPE_EDGE_RISING>;
  49. };
  50. button-3 {
  51. label = "JoyRight";
  52. linux,code = <KEY_RIGHT>;
  53. interrupt-parent = <&stmfx_pinctrl>;
  54. interrupts = <3 IRQ_TYPE_EDGE_RISING>;
  55. };
  56. button-4 {
  57. label = "JoyUp";
  58. linux,code = <KEY_UP>;
  59. interrupt-parent = <&stmfx_pinctrl>;
  60. interrupts = <4 IRQ_TYPE_EDGE_RISING>;
  61. };
  62. };
  63. panel_backlight: panel-backlight {
  64. compatible = "gpio-backlight";
  65. gpios = <&gpiod 13 GPIO_ACTIVE_LOW>;
  66. default-on;
  67. status = "okay";
  68. };
  69. };
  70. &cec {
  71. pinctrl-names = "default";
  72. pinctrl-0 = <&cec_pins_a>;
  73. status = "okay";
  74. };
  75. &dcmi {
  76. status = "okay";
  77. pinctrl-names = "default", "sleep";
  78. pinctrl-0 = <&dcmi_pins_a>;
  79. pinctrl-1 = <&dcmi_sleep_pins_a>;
  80. port {
  81. dcmi_0: endpoint {
  82. remote-endpoint = <&ov5640_0>;
  83. bus-type = <5>;
  84. bus-width = <8>;
  85. hsync-active = <0>;
  86. vsync-active = <0>;
  87. pclk-sample = <1>;
  88. };
  89. };
  90. };
  91. &dsi {
  92. phy-dsi-supply = <&reg18>;
  93. status = "okay";
  94. ports {
  95. port@0 {
  96. reg = <0>;
  97. dsi_in: endpoint {
  98. remote-endpoint = <&ltdc_ep0_out>;
  99. };
  100. };
  101. port@1 {
  102. reg = <1>;
  103. dsi_out: endpoint {
  104. remote-endpoint = <&dsi_panel_in>;
  105. };
  106. };
  107. };
  108. panel-dsi@0 {
  109. compatible = "raydium,rm68200";
  110. reg = <0>;
  111. reset-gpios = <&gpiof 15 GPIO_ACTIVE_LOW>;
  112. backlight = <&panel_backlight>;
  113. power-supply = <&v3v3>;
  114. status = "okay";
  115. port {
  116. dsi_panel_in: endpoint {
  117. remote-endpoint = <&dsi_out>;
  118. };
  119. };
  120. };
  121. };
  122. &ethernet0 {
  123. status = "okay";
  124. pinctrl-0 = <&ethernet0_rgmii_pins_a>;
  125. pinctrl-1 = <&ethernet0_rgmii_sleep_pins_a>;
  126. pinctrl-names = "default", "sleep";
  127. phy-mode = "rgmii-id";
  128. max-speed = <1000>;
  129. phy-handle = <&phy0>;
  130. mdio {
  131. #address-cells = <1>;
  132. #size-cells = <0>;
  133. compatible = "snps,dwmac-mdio";
  134. phy0: ethernet-phy@0 {
  135. reg = <0>;
  136. };
  137. };
  138. };
  139. &fmc {
  140. pinctrl-names = "default", "sleep";
  141. pinctrl-0 = <&fmc_pins_a>;
  142. pinctrl-1 = <&fmc_sleep_pins_a>;
  143. status = "okay";
  144. nand-controller@4,0 {
  145. status = "okay";
  146. nand@0 {
  147. reg = <0>;
  148. nand-on-flash-bbt;
  149. #address-cells = <1>;
  150. #size-cells = <1>;
  151. };
  152. };
  153. };
  154. &i2c2 {
  155. pinctrl-names = "default", "sleep";
  156. pinctrl-0 = <&i2c2_pins_a>;
  157. pinctrl-1 = <&i2c2_sleep_pins_a>;
  158. i2c-scl-rising-time-ns = <185>;
  159. i2c-scl-falling-time-ns = <20>;
  160. status = "okay";
  161. ov5640: camera@3c {
  162. compatible = "ovti,ov5640";
  163. reg = <0x3c>;
  164. clocks = <&clk_ext_camera>;
  165. clock-names = "xclk";
  166. DOVDD-supply = <&v2v8>;
  167. powerdown-gpios = <&stmfx_pinctrl 18 (GPIO_ACTIVE_HIGH | GPIO_PUSH_PULL)>;
  168. reset-gpios = <&stmfx_pinctrl 19 (GPIO_ACTIVE_LOW | GPIO_PUSH_PULL)>;
  169. rotation = <180>;
  170. status = "okay";
  171. port {
  172. ov5640_0: endpoint {
  173. remote-endpoint = <&dcmi_0>;
  174. bus-width = <8>;
  175. data-shift = <2>; /* lines 9:2 are used */
  176. hsync-active = <0>;
  177. vsync-active = <0>;
  178. pclk-sample = <1>;
  179. };
  180. };
  181. };
  182. stmfx: stmfx@42 {
  183. compatible = "st,stmfx-0300";
  184. reg = <0x42>;
  185. interrupts = <8 IRQ_TYPE_EDGE_RISING>;
  186. interrupt-parent = <&gpioi>;
  187. vdd-supply = <&v3v3>;
  188. stmfx_pinctrl: pinctrl {
  189. compatible = "st,stmfx-0300-pinctrl";
  190. gpio-controller;
  191. #gpio-cells = <2>;
  192. interrupt-controller;
  193. #interrupt-cells = <2>;
  194. gpio-ranges = <&stmfx_pinctrl 0 0 24>;
  195. joystick_pins: joystick-pins {
  196. pins = "gpio0", "gpio1", "gpio2", "gpio3", "gpio4";
  197. bias-pull-down;
  198. };
  199. };
  200. };
  201. };
  202. &i2c5 {
  203. pinctrl-names = "default", "sleep";
  204. pinctrl-0 = <&i2c5_pins_a>;
  205. pinctrl-1 = <&i2c5_sleep_pins_a>;
  206. i2c-scl-rising-time-ns = <185>;
  207. i2c-scl-falling-time-ns = <20>;
  208. status = "okay";
  209. };
  210. &ltdc {
  211. status = "okay";
  212. port {
  213. ltdc_ep0_out: endpoint@0 {
  214. reg = <0>;
  215. remote-endpoint = <&dsi_in>;
  216. };
  217. };
  218. };
  219. &m_can1 {
  220. pinctrl-names = "default", "sleep";
  221. pinctrl-0 = <&m_can1_pins_a>;
  222. pinctrl-1 = <&m_can1_sleep_pins_a>;
  223. status = "okay";
  224. };
  225. &qspi {
  226. pinctrl-names = "default", "sleep";
  227. pinctrl-0 = <&qspi_clk_pins_a
  228. &qspi_bk1_pins_a
  229. &qspi_cs1_pins_a
  230. &qspi_bk2_pins_a
  231. &qspi_cs2_pins_a>;
  232. pinctrl-1 = <&qspi_clk_sleep_pins_a
  233. &qspi_bk1_sleep_pins_a
  234. &qspi_cs1_sleep_pins_a
  235. &qspi_bk2_sleep_pins_a
  236. &qspi_cs2_sleep_pins_a>;
  237. reg = <0x58003000 0x1000>, <0x70000000 0x4000000>;
  238. #address-cells = <1>;
  239. #size-cells = <0>;
  240. status = "okay";
  241. flash0: flash@0 {
  242. compatible = "jedec,spi-nor";
  243. reg = <0>;
  244. spi-rx-bus-width = <4>;
  245. spi-max-frequency = <108000000>;
  246. #address-cells = <1>;
  247. #size-cells = <1>;
  248. };
  249. flash1: flash@1 {
  250. compatible = "jedec,spi-nor";
  251. reg = <1>;
  252. spi-rx-bus-width = <4>;
  253. spi-max-frequency = <108000000>;
  254. #address-cells = <1>;
  255. #size-cells = <1>;
  256. };
  257. };
  258. &sdmmc3 {
  259. pinctrl-names = "default", "opendrain", "sleep";
  260. pinctrl-0 = <&sdmmc3_b4_pins_a>;
  261. pinctrl-1 = <&sdmmc3_b4_od_pins_a>;
  262. pinctrl-2 = <&sdmmc3_b4_sleep_pins_a>;
  263. broken-cd;
  264. st,neg-edge;
  265. bus-width = <4>;
  266. vmmc-supply = <&v3v3>;
  267. status = "disabled";
  268. };
  269. &spi1 {
  270. pinctrl-names = "default";
  271. pinctrl-0 = <&spi1_pins_a>;
  272. status = "disabled";
  273. };
  274. &timers2 {
  275. /* spare dmas for other usage (un-delete to enable pwm capture) */
  276. /delete-property/dmas;
  277. /delete-property/dma-names;
  278. status = "disabled";
  279. pwm {
  280. pinctrl-0 = <&pwm2_pins_a>;
  281. pinctrl-1 = <&pwm2_sleep_pins_a>;
  282. pinctrl-names = "default", "sleep";
  283. status = "okay";
  284. };
  285. timer@1 {
  286. status = "okay";
  287. };
  288. };
  289. &timers8 {
  290. /delete-property/dmas;
  291. /delete-property/dma-names;
  292. status = "disabled";
  293. pwm {
  294. pinctrl-0 = <&pwm8_pins_a>;
  295. pinctrl-1 = <&pwm8_sleep_pins_a>;
  296. pinctrl-names = "default", "sleep";
  297. status = "okay";
  298. };
  299. timer@7 {
  300. status = "okay";
  301. };
  302. };
  303. &timers12 {
  304. /delete-property/dmas;
  305. /delete-property/dma-names;
  306. status = "disabled";
  307. pwm {
  308. pinctrl-0 = <&pwm12_pins_a>;
  309. pinctrl-1 = <&pwm12_sleep_pins_a>;
  310. pinctrl-names = "default", "sleep";
  311. status = "okay";
  312. };
  313. timer@11 {
  314. status = "okay";
  315. };
  316. };
  317. &usart3 {
  318. pinctrl-names = "default", "sleep", "idle";
  319. pinctrl-0 = <&usart3_pins_b>;
  320. pinctrl-1 = <&usart3_sleep_pins_b>;
  321. pinctrl-2 = <&usart3_idle_pins_b>;
  322. /*
  323. * HW flow control USART3_RTS is optional, and isn't default wired to
  324. * the connector. SB23 needs to be soldered in order to use it, and R77
  325. * (ETH_CLK) should be removed.
  326. */
  327. uart-has-rtscts;
  328. status = "disabled";
  329. };
  330. &usbh_ehci {
  331. phys = <&usbphyc_port0>;
  332. status = "okay";
  333. };
  334. &usbotg_hs {
  335. pinctrl-0 = <&usbotg_hs_pins_a>;
  336. pinctrl-names = "default";
  337. phys = <&usbphyc_port1 0>;
  338. phy-names = "usb2-phy";
  339. status = "okay";
  340. };
  341. &usbphyc {
  342. status = "okay";
  343. };
  344. &usbphyc_port0 {
  345. st,tune-hs-dc-level = <2>;
  346. st,enable-fs-rftime-tuning;
  347. st,enable-hs-rftime-reduction;
  348. st,trim-hs-current = <15>;
  349. st,trim-hs-impedance = <1>;
  350. st,tune-squelch-level = <3>;
  351. st,tune-hs-rx-offset = <2>;
  352. st,no-lsfs-sc;
  353. };
  354. &usbphyc_port1 {
  355. st,tune-hs-dc-level = <2>;
  356. st,enable-fs-rftime-tuning;
  357. st,enable-hs-rftime-reduction;
  358. st,trim-hs-current = <15>;
  359. st,trim-hs-impedance = <1>;
  360. st,tune-squelch-level = <3>;
  361. st,tune-hs-rx-offset = <2>;
  362. st,no-lsfs-sc;
  363. };