rk3399-puma-haikou.dts 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276
  1. // SPDX-License-Identifier: (GPL-2.0+ OR MIT)
  2. /*
  3. * Copyright (c) 2017 Theobroma Systems Design und Consulting GmbH
  4. */
  5. /dts-v1/;
  6. #include "rk3399-puma.dtsi"
  7. / {
  8. model = "Theobroma Systems RK3399-Q7 SoM";
  9. compatible = "tsd,rk3399-puma-haikou", "rockchip,rk3399";
  10. aliases {
  11. mmc1 = &sdmmc;
  12. };
  13. chosen {
  14. stdout-path = "serial0:115200n8";
  15. };
  16. leds {
  17. pinctrl-0 = <&module_led_pin>, <&sd_card_led_pin>;
  18. sd_card_led: led-1 {
  19. label = "sd_card_led";
  20. gpios = <&gpio1 RK_PA2 GPIO_ACTIVE_HIGH>;
  21. linux,default-trigger = "mmc0";
  22. };
  23. };
  24. i2s0-sound {
  25. compatible = "simple-audio-card";
  26. simple-audio-card,format = "i2s";
  27. simple-audio-card,name = "Haikou,I2S-codec";
  28. simple-audio-card,mclk-fs = <512>;
  29. simple-audio-card,codec {
  30. clocks = <&sgtl5000_clk>;
  31. sound-dai = <&sgtl5000>;
  32. };
  33. simple-audio-card,cpu {
  34. bitclock-master;
  35. frame-master;
  36. sound-dai = <&i2s0>;
  37. };
  38. };
  39. sgtl5000_clk: sgtl5000-oscillator {
  40. compatible = "fixed-clock";
  41. #clock-cells = <0>;
  42. clock-frequency = <24576000>;
  43. };
  44. dc_12v: dc-12v {
  45. compatible = "regulator-fixed";
  46. regulator-name = "dc_12v";
  47. regulator-always-on;
  48. regulator-boot-on;
  49. regulator-min-microvolt = <12000000>;
  50. regulator-max-microvolt = <12000000>;
  51. };
  52. vcc3v3_baseboard: vcc3v3-baseboard {
  53. compatible = "regulator-fixed";
  54. regulator-name = "vcc3v3_baseboard";
  55. regulator-always-on;
  56. regulator-boot-on;
  57. regulator-min-microvolt = <3300000>;
  58. regulator-max-microvolt = <3300000>;
  59. vin-supply = <&dc_12v>;
  60. };
  61. vcc5v0_baseboard: vcc5v0-baseboard {
  62. compatible = "regulator-fixed";
  63. regulator-name = "vcc5v0_baseboard";
  64. regulator-always-on;
  65. regulator-boot-on;
  66. regulator-min-microvolt = <5000000>;
  67. regulator-max-microvolt = <5000000>;
  68. vin-supply = <&dc_12v>;
  69. };
  70. vcc5v0_otg: vcc5v0-otg-regulator {
  71. compatible = "regulator-fixed";
  72. enable-active-high;
  73. gpio = <&gpio0 RK_PA2 GPIO_ACTIVE_HIGH>;
  74. pinctrl-names = "default";
  75. pinctrl-0 = <&otg_vbus_drv>;
  76. regulator-name = "vcc5v0_otg";
  77. regulator-always-on;
  78. };
  79. vdda_codec: vdda-codec {
  80. compatible = "regulator-fixed";
  81. regulator-name = "vdda_codec";
  82. regulator-boot-on;
  83. regulator-min-microvolt = <3300000>;
  84. regulator-max-microvolt = <3300000>;
  85. vin-supply = <&vcc5v0_baseboard>;
  86. };
  87. vddd_codec: vddd-codec {
  88. compatible = "regulator-fixed";
  89. regulator-name = "vddd_codec";
  90. regulator-boot-on;
  91. regulator-min-microvolt = <1600000>;
  92. regulator-max-microvolt = <1600000>;
  93. vin-supply = <&vcc5v0_baseboard>;
  94. };
  95. };
  96. &hdmi {
  97. ddc-i2c-bus = <&i2c3>;
  98. status = "okay";
  99. };
  100. &i2c1 {
  101. status = "okay";
  102. clock-frequency = <400000>;
  103. };
  104. &i2c2 {
  105. status = "okay";
  106. clock-frequency = <400000>;
  107. };
  108. &i2c3 {
  109. i2c-scl-rising-time-ns = <450>;
  110. i2c-scl-falling-time-ns = <15>;
  111. status = "okay";
  112. };
  113. &i2c4 {
  114. status = "okay";
  115. clock-frequency = <400000>;
  116. sgtl5000: codec@a {
  117. compatible = "fsl,sgtl5000";
  118. reg = <0x0a>;
  119. clocks = <&sgtl5000_clk>;
  120. #sound-dai-cells = <0>;
  121. VDDA-supply = <&vdda_codec>;
  122. VDDIO-supply = <&vdda_codec>;
  123. VDDD-supply = <&vddd_codec>;
  124. status = "okay";
  125. };
  126. };
  127. &i2c6 {
  128. status = "okay";
  129. clock-frequency = <400000>;
  130. };
  131. &pcie_phy {
  132. status = "okay";
  133. };
  134. &pcie0 {
  135. ep-gpios = <&gpio4 RK_PC6 GPIO_ACTIVE_HIGH>;
  136. num-lanes = <4>;
  137. pinctrl-names = "default";
  138. pinctrl-0 = <&pcie_clkreqn_cpm>;
  139. status = "okay";
  140. };
  141. &pinctrl {
  142. pinctrl-names = "default";
  143. pinctrl-0 = <&haikou_pin_hog>;
  144. hog {
  145. haikou_pin_hog: haikou-pin-hog {
  146. rockchip,pins =
  147. /* LID_BTN */
  148. <0 RK_PA4 RK_FUNC_GPIO &pcfg_pull_up>,
  149. /* BATLOW# */
  150. <0 RK_PB2 RK_FUNC_GPIO &pcfg_pull_up>,
  151. /* SLP_BTN# */
  152. <0 RK_PB3 RK_FUNC_GPIO &pcfg_pull_up>,
  153. /* BIOS_DISABLE# */
  154. <0 RK_PB1 RK_FUNC_GPIO &pcfg_pull_up>;
  155. };
  156. };
  157. leds {
  158. sd_card_led_pin: sd-card-led-pin {
  159. rockchip,pins =
  160. <1 RK_PA2 RK_FUNC_GPIO &pcfg_pull_none>;
  161. };
  162. };
  163. usb2 {
  164. otg_vbus_drv: otg-vbus-drv {
  165. rockchip,pins =
  166. <0 RK_PA2 RK_FUNC_GPIO &pcfg_pull_none>;
  167. };
  168. };
  169. };
  170. &pwm0 {
  171. status = "okay";
  172. };
  173. &sdmmc {
  174. bus-width = <4>;
  175. cap-mmc-highspeed;
  176. cap-sd-highspeed;
  177. cd-gpios = <&gpio0 RK_PA7 GPIO_ACTIVE_LOW>;
  178. disable-wp;
  179. max-frequency = <40000000>;
  180. pinctrl-names = "default";
  181. pinctrl-0 = <&sdmmc_clk &sdmmc_cmd &sdmmc_cd &sdmmc_bus4>;
  182. vmmc-supply = <&vcc3v3_baseboard>;
  183. status = "okay";
  184. };
  185. &spi5 {
  186. status = "okay";
  187. };
  188. &tcphy0 {
  189. status = "okay";
  190. };
  191. &u2phy0 {
  192. status = "okay";
  193. };
  194. &usbdrd3_0 {
  195. status = "okay";
  196. };
  197. &usbdrd_dwc3_0 {
  198. dr_mode = "otg";
  199. extcon = <&extcon_usb3>;
  200. status = "okay";
  201. };
  202. &u2phy0_host {
  203. phy-supply = <&vcc5v0_otg>;
  204. status = "okay";
  205. };
  206. &uart0 {
  207. pinctrl-names = "default";
  208. pinctrl-0 = <&uart0_xfer &uart0_cts &uart0_rts>;
  209. status = "okay";
  210. };
  211. &uart2 {
  212. status = "okay";
  213. };
  214. &usb_host0_ehci {
  215. status = "okay";
  216. };
  217. &usb_host0_ohci {
  218. status = "okay";
  219. };
  220. &vopb {
  221. status = "okay";
  222. };
  223. &vopb_mmu {
  224. status = "okay";
  225. };
  226. &vopl {
  227. status = "okay";
  228. };
  229. &vopl_mmu {
  230. status = "okay";
  231. };