imx6qdl-savageboard.dtsi 6.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256
  1. /*
  2. * Copyright (C) 2017 Milo Kim <[email protected]>
  3. *
  4. * This file is dual-licensed: you can use it either under the terms
  5. * of the GPL or the X11 license, at your option. Note that this dual
  6. * licensing only applies to this file, and not this project as a
  7. * whole.
  8. *
  9. * a) This file is free software; you can redistribute it and/or
  10. * modify it under the terms of the GNU General Public License as
  11. * published by the Free Software Foundation; either version 2 of the
  12. * License, or (at your option) any later version.
  13. *
  14. * This file is distributed in the hope that it will be useful,
  15. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  16. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  17. * GNU General Public License for more details.
  18. *
  19. * Or, alternatively,
  20. *
  21. * b) Permission is hereby granted, free of charge, to any person
  22. * obtaining a copy of this software and associated documentation
  23. * files (the "Software"), to deal in the Software without
  24. * restriction, including without limitation the rights to use,
  25. * copy, modify, merge, publish, distribute, sublicense, and/or
  26. * sell copies of the Software, and to permit persons to whom the
  27. * Software is furnished to do so, subject to the following
  28. * conditions:
  29. *
  30. * The above copyright notice and this permission notice shall be
  31. * included in all copies or substantial portions of the Software.
  32. *
  33. * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
  34. * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
  35. * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
  36. * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
  37. * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
  38. * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
  39. * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
  40. * OTHER DEALINGS IN THE SOFTWARE.
  41. */
  42. #include <dt-bindings/gpio/gpio.h>
  43. #include <dt-bindings/input/input.h>
  44. / {
  45. chosen {
  46. stdout-path = &uart1;
  47. };
  48. memory@10000000 {
  49. device_type = "memory";
  50. reg = <0x10000000 0x40000000>;
  51. };
  52. gpio-keys {
  53. compatible = "gpio-keys";
  54. pinctrl-names = "default";
  55. pinctrl-0 = <&pinctrl_gpio_keys>;
  56. power {
  57. gpios = <&gpio3 7 GPIO_ACTIVE_LOW>;
  58. label = "Power Button";
  59. linux,code = <KEY_POWER>;
  60. wakeup-source;
  61. };
  62. };
  63. panel {
  64. compatible = "avic,tm097tdh02", "hannstar,hsd100pxn1";
  65. backlight = <&panel_bl>;
  66. power-supply = <&reg_3p3v>;
  67. port {
  68. panel_in: endpoint {
  69. remote-endpoint = <&lvds0_out>;
  70. };
  71. };
  72. };
  73. panel_bl: backlight {
  74. compatible = "pwm-backlight";
  75. brightness-levels = <0 4 8 16 32 64 128 255>;
  76. default-brightness-level = <4>;
  77. power-supply = <&reg_3p3v>;
  78. pwms = <&pwm1 0 10000>;
  79. };
  80. reg_3p3v: regulator-3p3v {
  81. compatible = "regulator-fixed";
  82. regulator-name = "3P3V";
  83. regulator-min-microvolt = <3300000>;
  84. regulator-max-microvolt = <3300000>;
  85. regulator-always-on;
  86. };
  87. };
  88. &clks {
  89. assigned-clocks = <&clks IMX6QDL_CLK_LDB_DI0_SEL>,
  90. <&clks IMX6QDL_CLK_LDB_DI1_SEL>;
  91. assigned-clock-parents = <&clks IMX6QDL_CLK_PLL3_USB_OTG>,
  92. <&clks IMX6QDL_CLK_PLL3_USB_OTG>;
  93. };
  94. &fec {
  95. phy-mode = "rgmii";
  96. phy-reset-gpios = <&gpio1 25 GPIO_ACTIVE_LOW>;
  97. pinctrl-names = "default";
  98. pinctrl-0 = <&pinctrl_enet>;
  99. status = "okay";
  100. };
  101. &hdmi {
  102. ddc-i2c-bus = <&i2c2>;
  103. status = "okay";
  104. };
  105. &i2c2 {
  106. clock-frequency = <100000>;
  107. pinctrl-names = "default";
  108. pinctrl-0 = <&pinctrl_i2c2>;
  109. status = "okay";
  110. };
  111. &ldb {
  112. status = "okay";
  113. lvds-channel@0 {
  114. reg = <0>;
  115. status = "okay";
  116. port@4 {
  117. reg = <4>;
  118. lvds0_out: endpoint {
  119. remote-endpoint = <&panel_in>;
  120. };
  121. };
  122. };
  123. };
  124. &pwm1 {
  125. #pwm-cells = <2>;
  126. pinctrl-names = "default";
  127. pinctrl-0 = <&pinctrl_pwm1>;
  128. status = "okay";
  129. };
  130. &uart1 {
  131. pinctrl-names = "default";
  132. pinctrl-0 = <&pinctrl_uart1>;
  133. status = "okay";
  134. };
  135. &usbh1 {
  136. status = "okay";
  137. };
  138. /* SD card */
  139. &usdhc3 {
  140. bus-width = <4>;
  141. cd-gpios = <&gpio2 0 GPIO_ACTIVE_LOW>;
  142. no-1-8-v;
  143. pinctrl-names = "default";
  144. pinctrl-0 = <&pinctrl_sd>;
  145. status = "okay";
  146. };
  147. /* eMMC */
  148. &usdhc4 {
  149. bus-width = <8>;
  150. keep-power-in-suspend;
  151. no-1-8-v;
  152. non-removable;
  153. pinctrl-names = "default";
  154. pinctrl-0 = <&pinctrl_emmc>;
  155. status = "okay";
  156. };
  157. &iomuxc {
  158. pinctrl_emmc: emmcgrp {
  159. fsl,pins = <
  160. MX6QDL_PAD_SD4_CMD__SD4_CMD 0x17059
  161. MX6QDL_PAD_SD4_CLK__SD4_CLK 0x10059
  162. MX6QDL_PAD_SD4_DAT0__SD4_DATA0 0x17059
  163. MX6QDL_PAD_SD4_DAT1__SD4_DATA1 0x17059
  164. MX6QDL_PAD_SD4_DAT2__SD4_DATA2 0x17059
  165. MX6QDL_PAD_SD4_DAT3__SD4_DATA3 0x17059
  166. MX6QDL_PAD_SD4_DAT4__SD4_DATA4 0x17059
  167. MX6QDL_PAD_SD4_DAT5__SD4_DATA5 0x17059
  168. MX6QDL_PAD_SD4_DAT6__SD4_DATA6 0x17059
  169. MX6QDL_PAD_SD4_DAT7__SD4_DATA7 0x17059
  170. >;
  171. };
  172. pinctrl_enet: enetgrp {
  173. fsl,pins = <
  174. MX6QDL_PAD_ENET_MDIO__ENET_MDIO 0x1b0b0
  175. MX6QDL_PAD_ENET_MDC__ENET_MDC 0x1b0b0
  176. MX6QDL_PAD_RGMII_TXC__RGMII_TXC 0x1b030
  177. MX6QDL_PAD_RGMII_TD0__RGMII_TD0 0x1b030
  178. MX6QDL_PAD_RGMII_TD1__RGMII_TD1 0x1b030
  179. MX6QDL_PAD_RGMII_TD2__RGMII_TD2 0x1b030
  180. MX6QDL_PAD_RGMII_TD3__RGMII_TD3 0x1b030
  181. MX6QDL_PAD_RGMII_TX_CTL__RGMII_TX_CTL 0x1b030
  182. MX6QDL_PAD_ENET_REF_CLK__ENET_TX_CLK 0x1b0b0
  183. MX6QDL_PAD_RGMII_RXC__RGMII_RXC 0x1b030
  184. MX6QDL_PAD_RGMII_RD0__RGMII_RD0 0x1b030
  185. MX6QDL_PAD_RGMII_RD1__RGMII_RD1 0x1b030
  186. MX6QDL_PAD_RGMII_RD2__RGMII_RD2 0x1b030
  187. MX6QDL_PAD_RGMII_RD3__RGMII_RD3 0x1b030
  188. MX6QDL_PAD_RGMII_RX_CTL__RGMII_RX_CTL 0x1b030
  189. /* PHY reset */
  190. MX6QDL_PAD_ENET_CRS_DV__GPIO1_IO25 0x1b0b0
  191. >;
  192. };
  193. pinctrl_gpio_keys: gpiokeysgrp {
  194. fsl,pins = <
  195. MX6QDL_PAD_EIM_DA7__GPIO3_IO07 0x1b0b1
  196. >;
  197. };
  198. pinctrl_i2c2: i2c2grp {
  199. fsl,pins = <
  200. MX6QDL_PAD_KEY_COL3__I2C2_SCL 0x4001b8b1
  201. MX6QDL_PAD_KEY_ROW3__I2C2_SDA 0x4001b8b1
  202. >;
  203. };
  204. pinctrl_pwm1: pwm1grp {
  205. fsl,pins = <
  206. MX6QDL_PAD_SD1_DAT3__PWM1_OUT 0x1b0b1
  207. >;
  208. };
  209. pinctrl_sd: sdgrp {
  210. fsl,pins = <
  211. MX6QDL_PAD_SD3_CMD__SD3_CMD 0x17059
  212. MX6QDL_PAD_SD3_CLK__SD3_CLK 0x10059
  213. MX6QDL_PAD_SD3_DAT0__SD3_DATA0 0x17059
  214. MX6QDL_PAD_SD3_DAT1__SD3_DATA1 0x17059
  215. MX6QDL_PAD_SD3_DAT2__SD3_DATA2 0x17059
  216. MX6QDL_PAD_SD3_DAT3__SD3_DATA3 0x17059
  217. /* CD pin */
  218. MX6QDL_PAD_NANDF_D0__GPIO2_IO00 0x1b0b1
  219. >;
  220. };
  221. pinctrl_uart1: uart1grp {
  222. fsl,pins = <
  223. MX6QDL_PAD_CSI0_DAT10__UART1_TX_DATA 0x1b0b1
  224. MX6QDL_PAD_CSI0_DAT11__UART1_RX_DATA 0x1b0b1
  225. >;
  226. };
  227. };