stm32mp15xx-dhcom-pdk2.dtsi 6.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332
  1. // SPDX-License-Identifier: GPL-2.0+ OR BSD-3-Clause
  2. /*
  3. * Copyright (C) 2019-2020 Marek Vasut <[email protected]>
  4. */
  5. #include <dt-bindings/input/input.h>
  6. #include <dt-bindings/pwm/pwm.h>
  7. / {
  8. aliases {
  9. serial0 = &uart4;
  10. serial1 = &usart3;
  11. serial2 = &uart8;
  12. };
  13. chosen {
  14. stdout-path = "serial0:115200n8";
  15. };
  16. clk_ext_audio_codec: clock-codec {
  17. compatible = "fixed-clock";
  18. #clock-cells = <0>;
  19. clock-frequency = <24000000>;
  20. };
  21. display_bl: display-bl {
  22. compatible = "pwm-backlight";
  23. pwms = <&pwm2 3 500000 PWM_POLARITY_INVERTED>;
  24. brightness-levels = <0 16 22 30 40 55 75 102 138 188 255>;
  25. default-brightness-level = <8>;
  26. enable-gpios = <&gpioi 0 GPIO_ACTIVE_HIGH>;
  27. power-supply = <&reg_panel_bl>;
  28. status = "okay";
  29. };
  30. gpio-keys-polled {
  31. compatible = "gpio-keys-polled";
  32. poll-interval = <20>;
  33. /*
  34. * The EXTi IRQ line 3 is shared with ethernet,
  35. * so mark this as polled GPIO key.
  36. */
  37. button-0 {
  38. label = "TA1-GPIO-A";
  39. linux,code = <KEY_A>;
  40. gpios = <&gpiof 3 GPIO_ACTIVE_LOW>;
  41. };
  42. /*
  43. * The EXTi IRQ line 6 is shared with touchscreen,
  44. * so mark this as polled GPIO key.
  45. */
  46. button-1 {
  47. label = "TA2-GPIO-B";
  48. linux,code = <KEY_B>;
  49. gpios = <&gpiod 6 GPIO_ACTIVE_LOW>;
  50. };
  51. /*
  52. * The EXTi IRQ line 0 is shared with PMIC,
  53. * so mark this as polled GPIO key.
  54. */
  55. button-2 {
  56. label = "TA3-GPIO-C";
  57. linux,code = <KEY_C>;
  58. gpios = <&gpiog 0 GPIO_ACTIVE_LOW>;
  59. };
  60. };
  61. gpio-keys {
  62. compatible = "gpio-keys";
  63. button-3 {
  64. label = "TA4-GPIO-D";
  65. linux,code = <KEY_D>;
  66. gpios = <&gpiod 12 GPIO_ACTIVE_LOW>;
  67. wakeup-source;
  68. };
  69. };
  70. led {
  71. compatible = "gpio-leds";
  72. led-0 {
  73. label = "green:led5";
  74. gpios = <&gpioc 6 GPIO_ACTIVE_HIGH>;
  75. default-state = "off";
  76. status = "disabled";
  77. };
  78. led-1 {
  79. label = "green:led6";
  80. gpios = <&gpiod 11 GPIO_ACTIVE_HIGH>;
  81. default-state = "off";
  82. };
  83. led-2 {
  84. label = "green:led7";
  85. gpios = <&gpioi 2 GPIO_ACTIVE_HIGH>;
  86. default-state = "off";
  87. };
  88. led-3 {
  89. label = "green:led8";
  90. gpios = <&gpioi 3 GPIO_ACTIVE_HIGH>;
  91. default-state = "off";
  92. };
  93. };
  94. panel {
  95. compatible = "edt,etm0700g0edh6";
  96. backlight = <&display_bl>;
  97. power-supply = <&reg_panel_bl>;
  98. port {
  99. lcd_panel_in: endpoint {
  100. remote-endpoint = <&lcd_display_out>;
  101. };
  102. };
  103. };
  104. reg_panel_bl: regulator-panel-bl {
  105. compatible = "regulator-fixed";
  106. regulator-name = "panel_backlight";
  107. regulator-min-microvolt = <3300000>;
  108. regulator-max-microvolt = <3300000>;
  109. vin-supply = <&reg_panel_supply>;
  110. };
  111. reg_panel_supply: regulator-panel-supply {
  112. compatible = "regulator-fixed";
  113. regulator-name = "panel_supply";
  114. regulator-min-microvolt = <24000000>;
  115. regulator-max-microvolt = <24000000>;
  116. };
  117. sound {
  118. compatible = "audio-graph-card";
  119. widgets = "Headphone", "Headphone Jack",
  120. "Line", "Line In Jack",
  121. "Microphone", "Microphone Jack";
  122. routing = "Headphone Jack", "HP_OUT",
  123. "LINE_IN", "Line In Jack",
  124. "MIC_IN", "Microphone Jack",
  125. "Microphone Jack", "Mic Bias";
  126. dais = <&sai2a_port &sai2b_port>;
  127. status = "okay";
  128. };
  129. };
  130. &cec {
  131. pinctrl-names = "default";
  132. pinctrl-0 = <&cec_pins_a>;
  133. status = "okay";
  134. };
  135. &i2c2 { /* Header X22 */
  136. pinctrl-names = "default";
  137. pinctrl-0 = <&i2c2_pins_a>;
  138. i2c-scl-rising-time-ns = <185>;
  139. i2c-scl-falling-time-ns = <20>;
  140. status = "okay";
  141. /* spare dmas for other usage */
  142. /delete-property/dmas;
  143. /delete-property/dma-names;
  144. status = "okay";
  145. };
  146. &i2c5 { /* Header X21 */
  147. pinctrl-names = "default";
  148. pinctrl-0 = <&i2c5_pins_a>;
  149. i2c-scl-rising-time-ns = <185>;
  150. i2c-scl-falling-time-ns = <20>;
  151. status = "okay";
  152. /* spare dmas for other usage */
  153. /delete-property/dmas;
  154. /delete-property/dma-names;
  155. sgtl5000: codec@a {
  156. compatible = "fsl,sgtl5000";
  157. reg = <0x0a>;
  158. #sound-dai-cells = <0>;
  159. clocks = <&clk_ext_audio_codec>;
  160. VDDA-supply = <&v3v3>;
  161. VDDIO-supply = <&vdd>;
  162. sgtl5000_port: port {
  163. #address-cells = <1>;
  164. #size-cells = <0>;
  165. sgtl5000_tx_endpoint: endpoint@0 {
  166. reg = <0>;
  167. remote-endpoint = <&sai2a_endpoint>;
  168. frame-master = <&sgtl5000_tx_endpoint>;
  169. bitclock-master = <&sgtl5000_tx_endpoint>;
  170. };
  171. sgtl5000_rx_endpoint: endpoint@1 {
  172. reg = <1>;
  173. remote-endpoint = <&sai2b_endpoint>;
  174. frame-master = <&sgtl5000_rx_endpoint>;
  175. bitclock-master = <&sgtl5000_rx_endpoint>;
  176. };
  177. };
  178. };
  179. touchscreen@38 {
  180. compatible = "edt,edt-ft5406";
  181. reg = <0x38>;
  182. interrupt-parent = <&gpioc>;
  183. interrupts = <6 IRQ_TYPE_EDGE_FALLING>; /* GPIO E */
  184. };
  185. };
  186. &ltdc {
  187. pinctrl-names = "default", "sleep";
  188. pinctrl-0 = <&ltdc_pins_b>;
  189. pinctrl-1 = <&ltdc_sleep_pins_b>;
  190. status = "okay";
  191. port {
  192. lcd_display_out: endpoint {
  193. remote-endpoint = <&lcd_panel_in>;
  194. };
  195. };
  196. };
  197. &sai2 {
  198. clocks = <&rcc SAI2>, <&rcc PLL3_Q>, <&rcc PLL3_R>;
  199. clock-names = "pclk", "x8k", "x11k";
  200. pinctrl-names = "default", "sleep";
  201. pinctrl-0 = <&sai2a_pins_b &sai2b_pins_b>;
  202. pinctrl-1 = <&sai2a_sleep_pins_b &sai2b_sleep_pins_b>;
  203. status = "okay";
  204. sai2a: audio-controller@4400b004 {
  205. #clock-cells = <0>;
  206. dma-names = "tx";
  207. clocks = <&rcc SAI2_K>;
  208. clock-names = "sai_ck";
  209. status = "okay";
  210. sai2a_port: port {
  211. sai2a_endpoint: endpoint {
  212. remote-endpoint = <&sgtl5000_tx_endpoint>;
  213. format = "i2s";
  214. mclk-fs = <512>;
  215. dai-tdm-slot-num = <2>;
  216. dai-tdm-slot-width = <16>;
  217. };
  218. };
  219. };
  220. sai2b: audio-controller@4400b024 {
  221. dma-names = "rx";
  222. st,sync = <&sai2a 2>;
  223. clocks = <&rcc SAI2_K>, <&sai2a>;
  224. clock-names = "sai_ck", "MCLK";
  225. status = "okay";
  226. sai2b_port: port {
  227. sai2b_endpoint: endpoint {
  228. remote-endpoint = <&sgtl5000_rx_endpoint>;
  229. format = "i2s";
  230. mclk-fs = <512>;
  231. dai-tdm-slot-num = <2>;
  232. dai-tdm-slot-width = <16>;
  233. };
  234. };
  235. };
  236. };
  237. &timers2 {
  238. /* spare dmas for other usage (un-delete to enable pwm capture) */
  239. /delete-property/dmas;
  240. /delete-property/dma-names;
  241. status = "okay";
  242. pwm2: pwm {
  243. pinctrl-0 = <&pwm2_pins_a>;
  244. pinctrl-names = "default";
  245. status = "okay";
  246. };
  247. timer@1 {
  248. status = "okay";
  249. };
  250. };
  251. &usart3 {
  252. pinctrl-names = "default";
  253. pinctrl-0 = <&usart3_pins_a>;
  254. /delete-property/dmas;
  255. /delete-property/dma-names;
  256. status = "okay";
  257. };
  258. &uart8 {
  259. pinctrl-names = "default";
  260. pinctrl-0 = <&uart8_pins_a &uart8_rtscts_pins_a>;
  261. uart-has-rtscts;
  262. /delete-property/dmas;
  263. /delete-property/dma-names;
  264. status = "okay";
  265. };
  266. &usbh_ehci {
  267. phys = <&usbphyc_port0>;
  268. status = "okay";
  269. };
  270. &usbotg_hs {
  271. dr_mode = "otg";
  272. pinctrl-0 = <&usbotg_hs_pins_a>;
  273. pinctrl-names = "default";
  274. phy-names = "usb2-phy";
  275. phys = <&usbphyc_port1 0>;
  276. vbus-supply = <&vbus_otg>;
  277. status = "okay";
  278. };
  279. &usbphyc {
  280. status = "okay";
  281. };
  282. &usbphyc_port0 {
  283. phy-supply = <&vdd_usb>;
  284. };
  285. &usbphyc_port1 {
  286. phy-supply = <&vdd_usb>;
  287. };