rk3288-rock2-square.dts 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287
  1. // SPDX-License-Identifier: (GPL-2.0+ OR MIT)
  2. /dts-v1/;
  3. #include <dt-bindings/input/input.h>
  4. #include "rk3288-rock2-som.dtsi"
  5. / {
  6. model = "Radxa Rock 2 Square";
  7. compatible = "radxa,rock2-square", "rockchip,rk3288";
  8. chosen {
  9. stdout-path = "serial2:115200n8";
  10. };
  11. adc-keys {
  12. compatible = "adc-keys";
  13. io-channels = <&saradc 1>;
  14. io-channel-names = "buttons";
  15. keyup-threshold-microvolt = <1800000>;
  16. button-recovery {
  17. label = "Recovery";
  18. linux,code = <KEY_VENDOR>;
  19. press-threshold-microvolt = <0>;
  20. };
  21. };
  22. gpio-keys {
  23. compatible = "gpio-keys";
  24. key-power {
  25. gpios = <&gpio0 RK_PA5 GPIO_ACTIVE_LOW>;
  26. label = "GPIO Power";
  27. linux,code = <KEY_POWER>;
  28. pinctrl-names = "default";
  29. pinctrl-0 = <&pwr_key>;
  30. wakeup-source;
  31. };
  32. };
  33. gpio-leds {
  34. compatible = "gpio-leds";
  35. heartbeat_led: led-0 {
  36. gpios = <&gpio7 RK_PB7 GPIO_ACTIVE_LOW>;
  37. label = "rock2:green:state1";
  38. linux,default-trigger = "heartbeat";
  39. };
  40. mmc_led: led-1 {
  41. gpios = <&gpio0 RK_PB3 GPIO_ACTIVE_LOW>;
  42. label = "rock2:blue:state2";
  43. linux,default-trigger = "mmc0";
  44. };
  45. };
  46. ir: ir-receiver {
  47. compatible = "gpio-ir-receiver";
  48. gpios = <&gpio8 RK_PA1 GPIO_ACTIVE_LOW>;
  49. pinctrl-names = "default";
  50. pinctrl-0 = <&ir_int>;
  51. };
  52. sound {
  53. compatible = "simple-audio-card";
  54. simple-audio-card,name = "SPDIF";
  55. simple-audio-card,dai-link@1 { /* S/PDIF - S/PDIF */
  56. cpu { sound-dai = <&spdif>; };
  57. codec { sound-dai = <&spdif_out>; };
  58. };
  59. };
  60. sata_pwr: sata-prw-regulator {
  61. compatible = "regulator-fixed";
  62. enable-active-high;
  63. gpio = <&gpio0 13 GPIO_ACTIVE_HIGH>;
  64. pinctrl-names = "default";
  65. pinctrl-0 = <&sata_pwr_en>;
  66. /* Always turn on the 5V sata power connector */
  67. regulator-always-on;
  68. regulator-name = "sata_pwr";
  69. };
  70. spdif_out: spdif-out {
  71. compatible = "linux,spdif-dit";
  72. #sound-dai-cells = <0>;
  73. };
  74. sound-i2s {
  75. compatible = "rockchip,rk3288-hdmi-analog";
  76. pinctrl-names = "default";
  77. pinctrl-0 = <&phone_ctl>, <&hp_det>;
  78. rockchip,audio-codec = <&es8388>;
  79. rockchip,hp-det-gpios = <&gpio7 7 GPIO_ACTIVE_HIGH>;
  80. rockchip,hp-en-gpios = <&gpio8 0 GPIO_ACTIVE_HIGH>;
  81. rockchip,i2s-controller = <&i2s>;
  82. rockchip,model = "I2S";
  83. rockchip,routing = "Analog", "LOUT2",
  84. "Analog", "ROUT2";
  85. };
  86. sdio_pwrseq: sdio-pwrseq {
  87. compatible = "mmc-pwrseq-simple";
  88. clocks = <&hym8563>;
  89. clock-names = "ext_clock";
  90. pinctrl-names = "default";
  91. pinctrl-0 = <&wifi_enable>;
  92. reset-gpios = <&gpio4 RK_PD4 GPIO_ACTIVE_LOW>;
  93. };
  94. vcc_usb_host: vcc-host-regulator {
  95. compatible = "regulator-fixed";
  96. enable-active-high;
  97. gpio = <&gpio0 RK_PB6 GPIO_ACTIVE_HIGH>;
  98. pinctrl-names = "default";
  99. pinctrl-0 = <&host_vbus_drv>;
  100. regulator-name = "vcc_host";
  101. };
  102. vcc_sd: sdmmc-regulator {
  103. compatible = "regulator-fixed";
  104. gpio = <&gpio7 RK_PB3 GPIO_ACTIVE_LOW>;
  105. pinctrl-names = "default";
  106. pinctrl-0 = <&sdmmc_pwr>;
  107. regulator-name = "vcc_sd";
  108. regulator-min-microvolt = <3300000>;
  109. regulator-max-microvolt = <3300000>;
  110. vin-supply = <&vcc_io>;
  111. };
  112. };
  113. &sdio0 {
  114. bus-width = <4>;
  115. cap-sd-highspeed;
  116. cap-sdio-irq;
  117. mmc-pwrseq = <&sdio_pwrseq>;
  118. non-removable;
  119. pinctrl-names = "default";
  120. pinctrl-0 = <&sdio0_bus4 &sdio0_cmd &sdio0_clk &sdio0_int>;
  121. vmmc-supply = <&vcc_io>;
  122. vqmmc-supply = <&vcc_18>;
  123. status = "okay";
  124. };
  125. &sdmmc {
  126. bus-width = <4>;
  127. cap-mmc-highspeed;
  128. cap-sd-highspeed;
  129. card-detect-delay = <200>;
  130. disable-wp; /* wp not hooked up */
  131. pinctrl-names = "default";
  132. pinctrl-0 = <&sdmmc_clk &sdmmc_cmd &sdmmc_cd &sdmmc_bus4>;
  133. vmmc-supply = <&vcc_sd>;
  134. vqmmc-supply = <&vccio_sd>;
  135. status = "okay";
  136. };
  137. &gmac {
  138. status = "okay";
  139. };
  140. &hdmi {
  141. ddc-i2c-bus = <&i2c5>;
  142. status = "okay";
  143. };
  144. &i2c0 {
  145. hym8563: rtc@51 {
  146. compatible = "haoyu,hym8563";
  147. reg = <0x51>;
  148. #clock-cells = <0>;
  149. clock-output-names = "xin32k";
  150. interrupt-parent = <&gpio0>;
  151. interrupts = <RK_PA4 IRQ_TYPE_EDGE_FALLING>;
  152. pinctrl-names = "default";
  153. pinctrl-0 = <&pmic_int>;
  154. };
  155. };
  156. &i2c2 {
  157. status = "okay";
  158. es8388: es8388@10 {
  159. compatible = "everest,es8388", "everest,es8328";
  160. reg = <0x10>;
  161. AVDD-supply = <&vccio_codec>;
  162. DVDD-supply = <&vccio_codec>;
  163. HPVDD-supply = <&vccio_codec>;
  164. PVDD-supply = <&vccio_codec>;
  165. clocks = <&cru SCLK_I2S0_OUT>;
  166. };
  167. };
  168. &i2c5 {
  169. status = "okay";
  170. };
  171. &i2s {
  172. status = "okay";
  173. };
  174. &pinctrl {
  175. ir {
  176. ir_int: ir-int {
  177. rockchip,pins = <8 RK_PA1 RK_FUNC_GPIO &pcfg_pull_up>;
  178. };
  179. };
  180. keys {
  181. pwr_key: pwr-key {
  182. rockchip,pins = <0 RK_PA5 RK_FUNC_GPIO &pcfg_pull_up>;
  183. };
  184. };
  185. pmic {
  186. pmic_int: pmic-int {
  187. rockchip,pins = <0 RK_PA4 RK_FUNC_GPIO &pcfg_pull_up>;
  188. };
  189. };
  190. headphone {
  191. hp_det: hp-det {
  192. rockchip,pins = <7 RK_PA7 RK_FUNC_GPIO &pcfg_pull_none>;
  193. };
  194. phone_ctl: phone-ctl {
  195. rockchip,pins = <8 RK_PA0 RK_FUNC_GPIO &pcfg_pull_up>;
  196. };
  197. };
  198. usb {
  199. host_vbus_drv: host-vbus-drv {
  200. rockchip,pins = <0 RK_PB6 RK_FUNC_GPIO &pcfg_pull_none>;
  201. };
  202. };
  203. sata {
  204. sata_pwr_en: sata-pwr-en {
  205. rockchip,pins = <0 RK_PB5 RK_FUNC_GPIO &pcfg_pull_none>;
  206. };
  207. };
  208. sdmmc {
  209. sdmmc_pwr: sdmmc-pwr {
  210. rockchip,pins = <7 RK_PB3 RK_FUNC_GPIO &pcfg_pull_none>;
  211. };
  212. };
  213. sdio {
  214. wifi_enable: wifi-enable {
  215. rockchip,pins = <4 RK_PD4 RK_FUNC_GPIO &pcfg_pull_none>;
  216. };
  217. };
  218. };
  219. &saradc {
  220. status = "okay";
  221. };
  222. &spdif {
  223. status = "okay";
  224. };
  225. &uart2 {
  226. status = "okay";
  227. };
  228. &usbphy {
  229. status = "okay";
  230. };
  231. &usbphy1 {
  232. vbus-supply = <&vcc_usb_host>;
  233. };
  234. &usb_host0_ehci {
  235. status = "okay";
  236. };
  237. &usb_host1 {
  238. status = "okay";
  239. };
  240. &usb_otg {
  241. status = "okay";
  242. };