rk3399-roc-pc-plus.dts 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217
  1. // SPDX-License-Identifier: (GPL-2.0+ OR MIT)
  2. /*
  3. * Copyright (c) 2017 T-Chip Intelligent Technology Co., Ltd
  4. */
  5. /dts-v1/;
  6. #include "rk3399-roc-pc.dtsi"
  7. /*
  8. * Notice:
  9. * 1. rk3399-roc-pc-plus is powered by dc_12v directly.
  10. * 2. rk3399-roc-pc-plus has only vcc_bus_typec0 in schematic, which is coresponding
  11. * to vcc_vbus_typec1 in rk3399-roc-pc.
  12. * For simplicity, reserve the node name of vcc_vbus_typec1.
  13. * 3. vcc5v0_host is actually 2 regulators (host0, 1) controlled by the same gpio.
  14. */
  15. /delete-node/ &fusb1;
  16. /delete-node/ &hub_rst;
  17. /delete-node/ &mp8859;
  18. /delete-node/ &vcc_sys_en;
  19. /delete-node/ &vcc_vbus_typec0;
  20. /delete-node/ &yellow_led;
  21. / {
  22. model = "Firefly ROC-RK3399-PC-PLUS Board";
  23. compatible = "firefly,roc-rk3399-pc-plus", "rockchip,rk3399";
  24. dc_12v: dc-12v {
  25. compatible = "regulator-fixed";
  26. regulator-name = "dc_12v";
  27. regulator-always-on;
  28. regulator-boot-on;
  29. regulator-min-microvolt = <12000000>;
  30. regulator-max-microvolt = <12000000>;
  31. };
  32. es8388-sound {
  33. compatible = "simple-audio-card";
  34. pinctrl-names = "default";
  35. pinctrl-0 = <&hp_det_pin>;
  36. simple-audio-card,name = "rockchip,es8388-codec";
  37. simple-audio-card,format = "i2s";
  38. simple-audio-card,mclk-fs = <256>;
  39. simple-audio-card,widgets =
  40. "Microphone", "Mic Jack",
  41. "Headphone", "Headphones";
  42. simple-audio-card,routing =
  43. "LINPUT1", "Mic Jack",
  44. "Headphone Amp INL", "LOUT2",
  45. "Headphone Amp INR", "ROUT2",
  46. "Headphones", "Headphone Amp OUTL",
  47. "Headphones", "Headphone Amp OUTR";
  48. simple-audio-card,hp-det-gpio = <&gpio2 RK_PA6 GPIO_ACTIVE_HIGH>;
  49. simple-audio-card,aux-devs = <&headphones_amp>;
  50. simple-audio-card,pin-switches = "Headphones";
  51. simple-audio-card,codec {
  52. sound-dai = <&es8388>;
  53. };
  54. simple-audio-card,cpu {
  55. sound-dai = <&i2s1>;
  56. };
  57. };
  58. gpio-fan {
  59. #cooling-cells = <2>;
  60. compatible = "gpio-fan";
  61. gpio-fan,speed-map = <0 0 3000 1>;
  62. gpios = <&gpio1 RK_PA1 GPIO_ACTIVE_HIGH>;
  63. };
  64. /delete-node/ gpio-keys;
  65. /* not amplifier, used as switcher only */
  66. headphones_amp: headphones-amp {
  67. compatible = "simple-audio-amplifier";
  68. pinctrl-names = "default";
  69. pinctrl-0 = <&ear_ctl_pin>;
  70. enable-gpios = <&gpio0 RK_PA2 GPIO_ACTIVE_HIGH>;
  71. sound-name-prefix = "Headphone Amp";
  72. VCC-supply = <&vcca3v0_codec>;
  73. };
  74. ir-receiver {
  75. linux,rc-map-name = "rc-khadas";
  76. };
  77. leds {
  78. pinctrl-names = "default";
  79. pinctrl-0 = <&work_led_pin>, <&diy_led_pin>;
  80. };
  81. };
  82. &fusb0 {
  83. vbus-supply = <&vcc_vbus_typec1>;
  84. };
  85. &i2c0 {
  86. hym8563: rtc@51 {
  87. compatible = "haoyu,hym8563";
  88. reg = <0x51>;
  89. interrupt-parent = <&gpio0>;
  90. interrupts = <RK_PA5 IRQ_TYPE_EDGE_FALLING>;
  91. #clock-cells = <0>;
  92. clock-output-names = "xin32k";
  93. pinctrl-names = "default";
  94. pinctrl-0 = <&hym8563_int>;
  95. };
  96. };
  97. &i2c1 {
  98. es8388: es8388@11 {
  99. compatible = "everest,es8388";
  100. reg = <0x11>;
  101. clock-names = "mclk";
  102. clocks = <&cru SCLK_I2S_8CH_OUT>;
  103. #sound-dai-cells = <0>;
  104. };
  105. };
  106. /* <4 RK_PA0 1 &pcfg_pull_none> is used as i2s_8ch_mclk_pin */
  107. &i2s0_8ch_bus {
  108. rockchip,pins =
  109. <3 RK_PD0 1 &pcfg_pull_none>,
  110. <3 RK_PD1 1 &pcfg_pull_none>,
  111. <3 RK_PD2 1 &pcfg_pull_none>,
  112. <3 RK_PD3 1 &pcfg_pull_none>,
  113. <3 RK_PD4 1 &pcfg_pull_none>,
  114. <3 RK_PD5 1 &pcfg_pull_none>,
  115. <3 RK_PD6 1 &pcfg_pull_none>,
  116. <3 RK_PD7 1 &pcfg_pull_none>;
  117. };
  118. &i2s1 {
  119. pinctrl-names = "default";
  120. pinctrl-0 = <&i2s_8ch_mclk_pin>, <&i2s1_2ch_bus>;
  121. rockchip,playback-channels = <2>;
  122. rockchip,capture-channels = <2>;
  123. status = "okay";
  124. };
  125. &pinctrl {
  126. es8388 {
  127. ear_ctl_pin: ear-ctl-pin {
  128. rockchip,pins = <0 RK_PA2 RK_FUNC_GPIO &pcfg_output_high>;
  129. };
  130. hp_det_pin: hp-det-pin {
  131. rockchip,pins = <2 RK_PA6 RK_FUNC_GPIO &pcfg_pull_down>;
  132. };
  133. };
  134. hym8563 {
  135. hym8563_int: hym8563-int {
  136. rockchip,pins = <0 RK_PA5 RK_FUNC_GPIO &pcfg_pull_up>;
  137. };
  138. };
  139. i2s1 {
  140. i2s_8ch_mclk_pin: i2s-8ch-mclk-pin {
  141. rockchip,pins = <4 RK_PA0 1 &pcfg_pull_none>;
  142. };
  143. };
  144. };
  145. &u2phy0 {
  146. status = "okay";
  147. u2phy0_otg: otg-port {
  148. phy-supply = <&vcc_vbus_typec1>;
  149. status = "okay";
  150. };
  151. u2phy0_host: host-port {
  152. phy-supply = <&vcc5v0_host>;
  153. status = "okay";
  154. };
  155. };
  156. &u2phy1 {
  157. status = "okay";
  158. u2phy1_otg: otg-port {
  159. phy-supply = <&vcc5v0_host>;
  160. status = "okay";
  161. };
  162. u2phy1_host: host-port {
  163. phy-supply = <&vcc5v0_host>;
  164. status = "okay";
  165. };
  166. };
  167. &uart0 {
  168. pinctrl-names = "default";
  169. pinctrl-0 = <&uart0_xfer &uart0_cts &uart0_rts>;
  170. status = "okay";
  171. };
  172. &usbdrd_dwc3_0 {
  173. dr_mode = "host";
  174. status = "okay";
  175. };
  176. &vcc_sys {
  177. /* vcc_sys is fixed, not controlled by any gpio */
  178. /delete-property/ gpio;
  179. /delete-property/ pinctrl-names;
  180. /delete-property/ pinctrl-0;
  181. };
  182. &vcc5v0_host {
  183. pinctrl-names = "default";
  184. pinctrl-0 = <&vcc5v0_host_en>;
  185. };