imx6qdl-dhcom-pdk2.dtsi 7.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335
  1. // SPDX-License-Identifier: GPL-2.0+
  2. /*
  3. * Copyright (C) 2015-2021 DH electronics GmbH
  4. * Copyright (C) 2018 Marek Vasut <[email protected]>
  5. */
  6. #include <dt-bindings/gpio/gpio.h>
  7. #include <dt-bindings/input/input.h>
  8. #include <dt-bindings/leds/common.h>
  9. #include <dt-bindings/pwm/pwm.h>
  10. / {
  11. chosen {
  12. stdout-path = "serial0:115200n8";
  13. };
  14. clk_ext_audio_codec: clock-codec {
  15. #clock-cells = <0>;
  16. clock-frequency = <24000000>;
  17. compatible = "fixed-clock";
  18. };
  19. display_bl: display-bl {
  20. brightness-levels = <0 16 22 30 40 55 75 102 138 188 255>;
  21. compatible = "pwm-backlight";
  22. default-brightness-level = <8>;
  23. enable-gpios = <&gpio3 27 GPIO_ACTIVE_HIGH>; /* GPIO G */
  24. pwms = <&pwm1 0 50000 PWM_POLARITY_INVERTED>;
  25. status = "okay";
  26. };
  27. lcd_display: disp0 {
  28. #address-cells = <1>;
  29. #size-cells = <0>;
  30. compatible = "fsl,imx-parallel-display";
  31. interface-pix-fmt = "rgb24";
  32. pinctrl-0 = <&pinctrl_ipu1_lcdif &pinctrl_dhcom_g>;
  33. pinctrl-names = "default";
  34. status = "okay";
  35. port@0 {
  36. reg = <0>;
  37. lcd_display_in: endpoint {
  38. remote-endpoint = <&ipu1_di0_disp0>;
  39. };
  40. };
  41. port@1 {
  42. reg = <1>;
  43. lcd_display_out: endpoint {
  44. remote-endpoint = <&lcd_panel_in>;
  45. };
  46. };
  47. };
  48. gpio-keys {
  49. #size-cells = <0>;
  50. compatible = "gpio-keys";
  51. button-0 {
  52. gpios = <&gpio1 2 GPIO_ACTIVE_LOW>; /* GPIO A */
  53. label = "TA1-GPIO-A";
  54. linux,code = <KEY_A>;
  55. pinctrl-0 = <&pinctrl_dhcom_a>;
  56. pinctrl-names = "default";
  57. wakeup-source;
  58. };
  59. button-1 {
  60. gpios = <&gpio1 4 GPIO_ACTIVE_LOW>; /* GPIO B */
  61. label = "TA2-GPIO-B";
  62. linux,code = <KEY_B>;
  63. pinctrl-0 = <&pinctrl_dhcom_b>;
  64. pinctrl-names = "default";
  65. wakeup-source;
  66. };
  67. button-2 {
  68. gpios = <&gpio1 5 GPIO_ACTIVE_LOW>; /* GPIO C */
  69. label = "TA3-GPIO-C";
  70. linux,code = <KEY_C>;
  71. pinctrl-0 = <&pinctrl_dhcom_c>;
  72. pinctrl-names = "default";
  73. wakeup-source;
  74. };
  75. button-3 {
  76. gpios = <&gpio6 3 GPIO_ACTIVE_LOW>; /* GPIO D */
  77. label = "TA4-GPIO-D";
  78. linux,code = <KEY_D>;
  79. pinctrl-0 = <&pinctrl_dhcom_d>;
  80. pinctrl-names = "default";
  81. wakeup-source;
  82. };
  83. };
  84. led {
  85. compatible = "gpio-leds";
  86. /*
  87. * Disable led-5, because GPIO E is
  88. * already used as touch interrupt.
  89. */
  90. led-5 {
  91. color = <LED_COLOR_ID_GREEN>;
  92. default-state = "off";
  93. function = LED_FUNCTION_INDICATOR;
  94. gpios = <&gpio4 5 GPIO_ACTIVE_HIGH>; /* GPIO E */
  95. pinctrl-0 = <&pinctrl_dhcom_e>;
  96. pinctrl-names = "default";
  97. status = "disabled";
  98. };
  99. led-6 {
  100. color = <LED_COLOR_ID_GREEN>;
  101. default-state = "off";
  102. function = LED_FUNCTION_INDICATOR;
  103. gpios = <&gpio4 20 GPIO_ACTIVE_HIGH>; /* GPIO F */
  104. pinctrl-0 = <&pinctrl_dhcom_f>;
  105. pinctrl-names = "default";
  106. };
  107. led-7 {
  108. color = <LED_COLOR_ID_GREEN>;
  109. default-state = "off";
  110. function = LED_FUNCTION_INDICATOR;
  111. gpios = <&gpio4 7 GPIO_ACTIVE_HIGH>; /* GPIO H */
  112. pinctrl-0 = <&pinctrl_dhcom_h>;
  113. pinctrl-names = "default";
  114. };
  115. led-8 {
  116. color = <LED_COLOR_ID_GREEN>;
  117. default-state = "off";
  118. function = LED_FUNCTION_INDICATOR;
  119. gpios = <&gpio4 8 GPIO_ACTIVE_HIGH>; /* GPIO I */
  120. pinctrl-0 = <&pinctrl_dhcom_i>;
  121. pinctrl-names = "default";
  122. };
  123. };
  124. panel {
  125. backlight = <&display_bl>;
  126. compatible = "edt,etm0700g0edh6";
  127. port {
  128. lcd_panel_in: endpoint {
  129. remote-endpoint = <&lcd_display_out>;
  130. };
  131. };
  132. };
  133. sound {
  134. audio-codec = <&sgtl5000>;
  135. audio-routing =
  136. "MIC_IN", "Mic Jack",
  137. "Mic Jack", "Mic Bias",
  138. "LINE_IN", "Line In Jack",
  139. "Headphone Jack", "HP_OUT";
  140. compatible = "fsl,imx-audio-sgtl5000";
  141. model = "imx-sgtl5000";
  142. mux-ext-port = <3>;
  143. mux-int-port = <1>;
  144. ssi-controller = <&ssi1>;
  145. };
  146. };
  147. &audmux {
  148. pinctrl-0 = <&pinctrl_audmux_ext>;
  149. pinctrl-names = "default";
  150. status = "okay";
  151. };
  152. &can1 {
  153. status = "okay";
  154. };
  155. &can2 {
  156. status = "disabled";
  157. };
  158. /* 1G ethernet */
  159. /delete-node/ &ethphy0;
  160. &fec {
  161. phy-mode = "rgmii";
  162. phy-handle = <&ethphy7>;
  163. pinctrl-0 = <&pinctrl_enet_1G>;
  164. pinctrl-names = "default";
  165. status = "okay";
  166. mdio {
  167. #address-cells = <1>;
  168. #size-cells = <0>;
  169. ethphy7: ethernet-phy@7 { /* KSZ 9021 */
  170. compatible = "ethernet-phy-ieee802.3-c22";
  171. interrupt-parent = <&gpio1>;
  172. interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
  173. pinctrl-0 = <&pinctrl_ethphy7>;
  174. pinctrl-names = "default";
  175. reg = <7>;
  176. reset-assert-us = <1000>;
  177. reset-deassert-us = <1000>;
  178. reset-gpios = <&gpio3 29 GPIO_ACTIVE_LOW>;
  179. rxc-skew-ps = <3000>;
  180. rxd0-skew-ps = <0>;
  181. rxd1-skew-ps = <0>;
  182. rxd2-skew-ps = <0>;
  183. rxd3-skew-ps = <0>;
  184. rxdv-skew-ps = <0>;
  185. txc-skew-ps = <3000>;
  186. txd0-skew-ps = <0>;
  187. txd1-skew-ps = <0>;
  188. txd2-skew-ps = <0>;
  189. txd3-skew-ps = <0>;
  190. txen-skew-ps = <0>;
  191. };
  192. };
  193. };
  194. &hdmi {
  195. ddc-i2c-bus = <&i2c2>;
  196. status = "okay";
  197. };
  198. &i2c2 {
  199. sgtl5000: codec@a {
  200. #sound-dai-cells = <0>;
  201. clocks = <&clk_ext_audio_codec>;
  202. compatible = "fsl,sgtl5000";
  203. reg = <0x0a>;
  204. VDDA-supply = <&reg_3p3v>;
  205. VDDIO-supply = <&sw2_reg>;
  206. };
  207. touchscreen@38 {
  208. compatible = "edt,edt-ft5406";
  209. interrupt-parent = <&gpio4>;
  210. interrupts = <5 IRQ_TYPE_EDGE_FALLING>; /* GPIO E */
  211. pinctrl-0 = <&pinctrl_dhcom_e>;
  212. pinctrl-names = "default";
  213. reg = <0x38>;
  214. };
  215. };
  216. &ipu1_di0_disp0 {
  217. remote-endpoint = <&lcd_display_in>;
  218. };
  219. &pcie {
  220. pinctrl-0 = <&pinctrl_pcie &pinctrl_dhcom_j>;
  221. reset-gpio = <&gpio6 14 GPIO_ACTIVE_LOW>; /* GPIO J */
  222. status = "okay";
  223. };
  224. &pwm1 {
  225. status = "okay";
  226. };
  227. &ssi1 {
  228. status = "okay";
  229. };
  230. &usbh1 {
  231. disable-over-current;
  232. };
  233. &usdhc2 { /* SD card */
  234. status = "okay";
  235. };
  236. &iomuxc {
  237. pinctrl-0 = <
  238. /*
  239. * The following DHCOM GPIOs are used on this board.
  240. * Therefore, they have been removed from the list below.
  241. * A: key TA1
  242. * B: key TA2
  243. * C: key TA3
  244. * D: key TA4
  245. * E: touchscreen
  246. * F: led6
  247. * G: backlight enable
  248. * H: led7
  249. * I: led8
  250. * J: PCIe reset
  251. */
  252. &pinctrl_hog_base
  253. &pinctrl_dhcom_k &pinctrl_dhcom_l
  254. &pinctrl_dhcom_m &pinctrl_dhcom_n &pinctrl_dhcom_o
  255. &pinctrl_dhcom_p &pinctrl_dhcom_q &pinctrl_dhcom_r
  256. &pinctrl_dhcom_s &pinctrl_dhcom_t &pinctrl_dhcom_u
  257. &pinctrl_dhcom_v &pinctrl_dhcom_w &pinctrl_dhcom_int
  258. >;
  259. pinctrl-names = "default";
  260. pinctrl_audmux_ext: audmux-ext-grp {
  261. fsl,pins = <
  262. MX6QDL_PAD_CSI0_DAT4__AUD3_TXC 0x130b0
  263. MX6QDL_PAD_CSI0_DAT5__AUD3_TXD 0x110b0
  264. MX6QDL_PAD_CSI0_DAT6__AUD3_TXFS 0x130b0
  265. MX6QDL_PAD_CSI0_DAT7__AUD3_RXD 0x130b0
  266. >;
  267. };
  268. pinctrl_enet_1G: enet-1G-grp {
  269. fsl,pins = <
  270. MX6QDL_PAD_ENET_MDC__ENET_MDC 0x100b0
  271. MX6QDL_PAD_ENET_MDIO__ENET_MDIO 0x100b0
  272. MX6QDL_PAD_ENET_REF_CLK__ENET_TX_CLK 0x100b0
  273. MX6QDL_PAD_RGMII_RD0__RGMII_RD0 0x1b0b0
  274. MX6QDL_PAD_RGMII_RD1__RGMII_RD1 0x1b0b0
  275. MX6QDL_PAD_RGMII_RD2__RGMII_RD2 0x1b0b0
  276. MX6QDL_PAD_RGMII_RD3__RGMII_RD3 0x1b0b0
  277. MX6QDL_PAD_RGMII_RX_CTL__RGMII_RX_CTL 0x1b0b0
  278. MX6QDL_PAD_RGMII_RXC__RGMII_RXC 0x1b0b0
  279. MX6QDL_PAD_RGMII_TD0__RGMII_TD0 0x100b0
  280. MX6QDL_PAD_RGMII_TD1__RGMII_TD1 0x100b0
  281. MX6QDL_PAD_RGMII_TD2__RGMII_TD2 0x100b0
  282. MX6QDL_PAD_RGMII_TD3__RGMII_TD3 0x100b0
  283. MX6QDL_PAD_RGMII_TX_CTL__RGMII_TX_CTL 0x100b0
  284. MX6QDL_PAD_RGMII_TXC__RGMII_TXC 0x100b0
  285. >;
  286. };
  287. pinctrl_ethphy7: ethphy7-grp {
  288. fsl,pins = <
  289. MX6QDL_PAD_EIM_D26__GPIO3_IO26 0xb1 /* WOL */
  290. MX6QDL_PAD_EIM_D29__GPIO3_IO29 0xb0 /* Reset */
  291. MX6QDL_PAD_GPIO_0__GPIO1_IO00 0xb1 /* Int */
  292. >;
  293. };
  294. };