rk3288-rock2-square.dts 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199
  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. /dts-v1/;
  41. #include "rk3288-rock2-som.dtsi"
  42. / {
  43. model = "Radxa Rock 2 Square";
  44. compatible = "radxa,rock2-square", "rockchip,rk3288";
  45. chosen {
  46. stdout-path = "serial2:115200n8";
  47. };
  48. ir: ir-receiver {
  49. compatible = "gpio-ir-receiver";
  50. gpios = <&gpio8 1 GPIO_ACTIVE_LOW>;
  51. pinctrl-names = "default";
  52. pinctrl-0 = <&ir_int>;
  53. };
  54. sound {
  55. compatible = "simple-audio-card";
  56. simple-audio-card,name = "SPDIF";
  57. simple-audio-card,dai-link@1 { /* S/PDIF - S/PDIF */
  58. cpu { sound-dai = <&spdif>; };
  59. codec { sound-dai = <&spdif_out>; };
  60. };
  61. };
  62. spdif_out: spdif-out {
  63. compatible = "linux,spdif-dit";
  64. #sound-dai-cells = <0>;
  65. };
  66. vcc_usb_host: vcc-host-regulator {
  67. compatible = "regulator-fixed";
  68. enable-active-high;
  69. gpio = <&gpio0 14 GPIO_ACTIVE_HIGH>;
  70. pinctrl-names = "default";
  71. pinctrl-0 = <&host_vbus_drv>;
  72. /* Always on as the rockchip usb phy doesn't have a vbus-supply
  73. * property
  74. */
  75. regulator-always-on;
  76. regulator-name = "vcc_host";
  77. };
  78. vcc_sd: sdmmc-regulator {
  79. compatible = "regulator-fixed";
  80. gpio = <&gpio7 11 GPIO_ACTIVE_LOW>;
  81. pinctrl-names = "default";
  82. pinctrl-0 = <&sdmmc_pwr>;
  83. regulator-name = "vcc_sd";
  84. regulator-min-microvolt = <3300000>;
  85. regulator-max-microvolt = <3300000>;
  86. vin-supply = <&vcc_io>;
  87. };
  88. };
  89. &sdmmc {
  90. u-boot,dm-pre-reloc;
  91. bus-width = <4>;
  92. cap-mmc-highspeed;
  93. cap-sd-highspeed;
  94. card-detect-delay = <200>;
  95. disable-wp; /* wp not hooked up */
  96. num-slots = <1>;
  97. pinctrl-names = "default";
  98. pinctrl-0 = <&sdmmc_clk &sdmmc_cmd &sdmmc_cd &sdmmc_bus4>;
  99. vmmc-supply = <&vcc_sd>;
  100. vqmmc-supply = <&vccio_sd>;
  101. status = "okay";
  102. };
  103. &gmac {
  104. status = "okay";
  105. };
  106. &hdmi {
  107. ddc-i2c-bus = <&i2c5>;
  108. status = "okay";
  109. };
  110. &i2c0 {
  111. hym8563@51 {
  112. compatible = "haoyu,hym8563";
  113. reg = <0x51>;
  114. #clock-cells = <0>;
  115. clock-frequency = <32768>;
  116. clock-output-names = "xin32k";
  117. interrupt-parent = <&gpio0>;
  118. interrupts = <4 IRQ_TYPE_EDGE_FALLING>;
  119. pinctrl-names = "default";
  120. pinctrl-0 = <&pmic_int>;
  121. };
  122. };
  123. &i2c5 {
  124. status = "okay";
  125. };
  126. &pinctrl {
  127. u-boot,dm-pre-reloc;
  128. ir {
  129. ir_int: ir-int {
  130. rockchip,pins = <8 1 RK_FUNC_GPIO &pcfg_pull_up>;
  131. };
  132. };
  133. pmic {
  134. pmic_int: pmic-int {
  135. rockchip,pins = <0 4 RK_FUNC_GPIO &pcfg_pull_up>;
  136. };
  137. };
  138. usb {
  139. host_vbus_drv: host-vbus-drv {
  140. rockchip,pins = <0 14 RK_FUNC_GPIO &pcfg_pull_none>;
  141. };
  142. };
  143. sdmmc {
  144. sdmmc_pwr: sdmmc-pwr {
  145. rockchip,pins = <7 11 RK_FUNC_GPIO &pcfg_pull_none>;
  146. };
  147. };
  148. };
  149. &spdif {
  150. status = "okay";
  151. };
  152. &uart2 {
  153. status = "okay";
  154. u-boot,dm-pre-reloc;
  155. reg-shift = <2>;
  156. };
  157. &usbphy {
  158. status = "okay";
  159. };
  160. &usb_host0_ehci {
  161. status = "okay";
  162. };
  163. &dmc {
  164. rockchip,pctl-timing = <0x29a 0xc8 0x1f8 0x42 0x4e 0x4 0xea 0xa
  165. 0x5 0x0 0xa 0x7 0x19 0x24 0xa 0x7
  166. 0x5 0xa 0x5 0x200 0x5 0x10 0x40 0x0
  167. 0x1 0x7 0x7 0x4 0xc 0x43 0x100 0x0
  168. 0x5 0x0>;
  169. rockchip,phy-timing = <0x48f9aab4 0xea0910 0x1002c200
  170. 0xa60 0x40 0x10 0x0>;
  171. rockchip,sdram-params = <0x30B25564 0x627 3 666000000 3 9 1>;
  172. };
  173. &gpio7 {
  174. u-boot,dm-pre-reloc;
  175. };