rk3288-evb.dtsi 8.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397
  1. /*
  2. * This file is dual-licensed: you can use it either under the terms
  3. * of the GPL or the X11 license, at your option. Note that this dual
  4. * licensing only applies to this file, and not this project as a
  5. * whole.
  6. *
  7. * a) This file is free software; you can redistribute it and/or
  8. * modify it under the terms of the GNU General Public License as
  9. * published by the Free Software Foundation; either version 2 of the
  10. * License, or (at your option) any later version.
  11. *
  12. * This file is distributed in the hope that it will be useful,
  13. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  14. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  15. * GNU General Public License for more details.
  16. *
  17. * Or, alternatively,
  18. *
  19. * b) Permission is hereby granted, free of charge, to any person
  20. * obtaining a copy of this software and associated documentation
  21. * files (the "Software"), to deal in the Software without
  22. * restriction, including without limitation the rights to use,
  23. * copy, modify, merge, publish, distribute, sublicense, and/or
  24. * sell copies of the Software, and to permit persons to whom the
  25. * Software is furnished to do so, subject to the following
  26. * conditions:
  27. *
  28. * The above copyright notice and this permission notice shall be
  29. * included in all copies or substantial portions of the Software.
  30. *
  31. * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
  32. * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
  33. * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
  34. * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
  35. * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
  36. * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
  37. * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
  38. * OTHER DEALINGS IN THE SOFTWARE.
  39. */
  40. #include <dt-bindings/input/input.h>
  41. #include <dt-bindings/pwm/pwm.h>
  42. #include "rk3288.dtsi"
  43. / {
  44. memory {
  45. device_type = "memory";
  46. reg = <0x0 0x80000000>;
  47. };
  48. backlight: backlight {
  49. compatible = "pwm-backlight";
  50. brightness-levels = <
  51. 0 1 2 3 4 5 6 7
  52. 8 9 10 11 12 13 14 15
  53. 16 17 18 19 20 21 22 23
  54. 24 25 26 27 28 29 30 31
  55. 32 33 34 35 36 37 38 39
  56. 40 41 42 43 44 45 46 47
  57. 48 49 50 51 52 53 54 55
  58. 56 57 58 59 60 61 62 63
  59. 64 65 66 67 68 69 70 71
  60. 72 73 74 75 76 77 78 79
  61. 80 81 82 83 84 85 86 87
  62. 88 89 90 91 92 93 94 95
  63. 96 97 98 99 100 101 102 103
  64. 104 105 106 107 108 109 110 111
  65. 112 113 114 115 116 117 118 119
  66. 120 121 122 123 124 125 126 127
  67. 128 129 130 131 132 133 134 135
  68. 136 137 138 139 140 141 142 143
  69. 144 145 146 147 148 149 150 151
  70. 152 153 154 155 156 157 158 159
  71. 160 161 162 163 164 165 166 167
  72. 168 169 170 171 172 173 174 175
  73. 176 177 178 179 180 181 182 183
  74. 184 185 186 187 188 189 190 191
  75. 192 193 194 195 196 197 198 199
  76. 200 201 202 203 204 205 206 207
  77. 208 209 210 211 212 213 214 215
  78. 216 217 218 219 220 221 222 223
  79. 224 225 226 227 228 229 230 231
  80. 232 233 234 235 236 237 238 239
  81. 240 241 242 243 244 245 246 247
  82. 248 249 250 251 252 253 254 255>;
  83. default-brightness-level = <128>;
  84. enable-gpios = <&gpio7 2 GPIO_ACTIVE_HIGH>;
  85. pinctrl-names = "default";
  86. pinctrl-0 = <&bl_en>;
  87. pwms = <&pwm0 0 1000000 PWM_POLARITY_INVERTED>;
  88. };
  89. ext_gmac: external-gmac-clock {
  90. compatible = "fixed-clock";
  91. clock-frequency = <125000000>;
  92. clock-output-names = "ext_gmac";
  93. #clock-cells = <0>;
  94. };
  95. panel: panel {
  96. compatible ="lg,lp079qx1-sp0v", "simple-panel";
  97. backlight = <&backlight>;
  98. enable-gpios = <&gpio7 4 GPIO_ACTIVE_HIGH>;
  99. pinctrl-0 = <&lcd_cs>;
  100. ports {
  101. panel_in: port {
  102. panel_in_edp: endpoint {
  103. remote-endpoint = <&edp_out_panel>;
  104. };
  105. };
  106. };
  107. };
  108. gpio-keys {
  109. compatible = "gpio-keys";
  110. autorepeat;
  111. pinctrl-names = "default";
  112. pinctrl-0 = <&pwrbtn>;
  113. power {
  114. gpios = <&gpio0 5 GPIO_ACTIVE_LOW>;
  115. linux,code = <KEY_POWER>;
  116. label = "GPIO Key Power";
  117. linux,input-type = <1>;
  118. wakeup-source;
  119. debounce-interval = <100>;
  120. };
  121. };
  122. /* This turns on USB vbus for both host0 (ehci) and host1 (dwc2) */
  123. vcc_host: vcc-host-regulator {
  124. compatible = "regulator-fixed";
  125. enable-active-high;
  126. gpio = <&gpio0 14 GPIO_ACTIVE_HIGH>;
  127. pinctrl-names = "default";
  128. pinctrl-0 = <&host_vbus_drv>;
  129. regulator-name = "vcc_host";
  130. regulator-always-on;
  131. regulator-boot-on;
  132. };
  133. vcc_phy: vcc-phy-regulator {
  134. compatible = "regulator-fixed";
  135. enable-active-high;
  136. gpio = <&gpio0 6 GPIO_ACTIVE_HIGH>;
  137. pinctrl-names = "default";
  138. pinctrl-0 = <&eth_phy_pwr>;
  139. regulator-name = "vcc_phy";
  140. regulator-min-microvolt = <3300000>;
  141. regulator-max-microvolt = <3300000>;
  142. regulator-always-on;
  143. regulator-boot-on;
  144. };
  145. vcc_sys: vsys-regulator {
  146. compatible = "regulator-fixed";
  147. regulator-name = "vcc_sys";
  148. regulator-min-microvolt = <5000000>;
  149. regulator-max-microvolt = <5000000>;
  150. regulator-always-on;
  151. regulator-boot-on;
  152. };
  153. /*
  154. * NOTE: vcc_sd isn't hooked up on v1.0 boards where power comes from
  155. * vcc_io directly. Those boards won't be able to power cycle SD cards
  156. * but it shouldn't hurt to toggle this pin there anyway.
  157. */
  158. vcc_sd: sdmmc-regulator {
  159. compatible = "regulator-fixed";
  160. gpio = <&gpio7 11 GPIO_ACTIVE_LOW>;
  161. pinctrl-names = "default";
  162. pinctrl-0 = <&sdmmc_pwr>;
  163. regulator-name = "vcc_sd";
  164. regulator-min-microvolt = <3300000>;
  165. regulator-max-microvolt = <3300000>;
  166. startup-delay-us = <100000>;
  167. vin-supply = <&vcc_io>;
  168. };
  169. };
  170. &cpu0 {
  171. cpu0-supply = <&vdd_cpu>;
  172. };
  173. &edp {
  174. force-hpd;
  175. status = "okay";
  176. ports {
  177. edp_out: port@1 {
  178. reg = <1>;
  179. #address-cells = <1>;
  180. #size-cells = <0>;
  181. edp_out_panel: endpoint {
  182. reg = <0>;
  183. remote-endpoint = <&panel_in_edp>;
  184. };
  185. };
  186. };
  187. };
  188. &edp_phy {
  189. status = "okay";
  190. };
  191. &emmc {
  192. bus-width = <8>;
  193. cap-mmc-highspeed;
  194. disable-wp;
  195. non-removable;
  196. num-slots = <1>;
  197. pinctrl-names = "default";
  198. pinctrl-0 = <&emmc_clk &emmc_cmd &emmc_pwr &emmc_bus8>;
  199. status = "okay";
  200. };
  201. &sdmmc {
  202. bus-width = <4>;
  203. cap-mmc-highspeed;
  204. cap-sd-highspeed;
  205. card-detect-delay = <200>;
  206. disable-wp; /* wp not hooked up */
  207. num-slots = <1>;
  208. pinctrl-names = "default";
  209. pinctrl-0 = <&sdmmc_clk &sdmmc_cmd &sdmmc_cd &sdmmc_bus4>;
  210. status = "okay";
  211. vmmc-supply = <&vcc_sd>;
  212. vqmmc-supply = <&vccio_sd>;
  213. };
  214. &gmac {
  215. phy-supply = <&vcc_phy>;
  216. phy-mode = "rgmii";
  217. clock_in_out = "input";
  218. snps,reset-gpio = <&gpio4 7 0>;
  219. snps,reset-active-low;
  220. snps,reset-delays-us = <0 10000 1000000>;
  221. assigned-clocks = <&cru SCLK_MAC>;
  222. assigned-clock-parents = <&ext_gmac>;
  223. pinctrl-names = "default";
  224. pinctrl-0 = <&rgmii_pins>;
  225. tx_delay = <0x30>;
  226. rx_delay = <0x10>;
  227. status = "ok";
  228. };
  229. &hdmi {
  230. ddc-i2c-bus = <&i2c5>;
  231. status = "okay";
  232. };
  233. &i2c0 {
  234. status = "okay";
  235. };
  236. &i2c5 {
  237. status = "okay";
  238. };
  239. &wdt {
  240. status = "okay";
  241. };
  242. &pwm0 {
  243. status = "okay";
  244. };
  245. &uart0 {
  246. status = "okay";
  247. };
  248. &uart1 {
  249. status = "okay";
  250. };
  251. &uart2 {
  252. status = "okay";
  253. };
  254. &uart3 {
  255. status = "okay";
  256. };
  257. &uart4 {
  258. status = "okay";
  259. };
  260. &tsadc {
  261. rockchip,hw-tshut-mode = <0>; /* tshut mode 0:CRU 1:GPIO */
  262. rockchip,hw-tshut-polarity = <0>; /* tshut polarity 0:LOW 1:HIGH */
  263. status = "okay";
  264. };
  265. &pinctrl {
  266. pcfg_pull_none_drv_8ma: pcfg-pull-none-drv-8ma {
  267. drive-strength = <8>;
  268. };
  269. pcfg_pull_up_drv_8ma: pcfg-pull-up-drv-8ma {
  270. bias-pull-up;
  271. drive-strength = <8>;
  272. };
  273. backlight {
  274. bl_en: bl-en {
  275. rockchip,pins = <7 2 RK_FUNC_GPIO &pcfg_pull_none>;
  276. };
  277. };
  278. buttons {
  279. pwrbtn: pwrbtn {
  280. rockchip,pins = <0 5 RK_FUNC_GPIO &pcfg_pull_up>;
  281. };
  282. };
  283. lcd {
  284. lcd_cs: lcd-cs {
  285. rockchip,pins = <7 4 RK_FUNC_GPIO &pcfg_pull_none>;
  286. };
  287. };
  288. pmic {
  289. pmic_int: pmic-int {
  290. rockchip,pins = <RK_GPIO0 4 RK_FUNC_GPIO &pcfg_pull_up>;
  291. };
  292. };
  293. sdmmc {
  294. /*
  295. * Default drive strength isn't enough to achieve even
  296. * high-speed mode on EVB board so bump up to 8ma.
  297. */
  298. sdmmc_bus4: sdmmc-bus4 {
  299. rockchip,pins = <6 16 RK_FUNC_1 &pcfg_pull_up_drv_8ma>,
  300. <6 17 RK_FUNC_1 &pcfg_pull_up_drv_8ma>,
  301. <6 18 RK_FUNC_1 &pcfg_pull_up_drv_8ma>,
  302. <6 19 RK_FUNC_1 &pcfg_pull_up_drv_8ma>;
  303. };
  304. sdmmc_clk: sdmmc-clk {
  305. rockchip,pins = <6 20 RK_FUNC_1 &pcfg_pull_none_drv_8ma>;
  306. };
  307. sdmmc_cmd: sdmmc-cmd {
  308. rockchip,pins = <6 21 RK_FUNC_1 &pcfg_pull_up_drv_8ma>;
  309. };
  310. sdmmc_pwr: sdmmc-pwr {
  311. rockchip,pins = <7 11 RK_FUNC_GPIO &pcfg_pull_none>;
  312. };
  313. };
  314. usb {
  315. host_vbus_drv: host-vbus-drv {
  316. rockchip,pins = <0 14 RK_FUNC_GPIO &pcfg_pull_none>;
  317. };
  318. };
  319. eth_phy {
  320. eth_phy_pwr: eth-phy-pwr {
  321. rockchip,pins = <0 6 RK_FUNC_GPIO &pcfg_pull_none>;
  322. };
  323. };
  324. };
  325. &usbphy {
  326. status = "okay";
  327. };
  328. &usb_host0_ehci {
  329. status = "okay";
  330. };
  331. &usb_host1 {
  332. status = "okay";
  333. };
  334. &vopb {
  335. status = "okay";
  336. };
  337. &vopb_mmu {
  338. status = "okay";
  339. };
  340. &vopl {
  341. status = "okay";
  342. };
  343. &vopl_mmu {
  344. status = "okay";
  345. };