meson-gxbb-vega-s95.dtsi 6.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337
  1. // SPDX-License-Identifier: (GPL-2.0+ OR MIT)
  2. /*
  3. * Copyright (c) 2016 Andreas Färber
  4. */
  5. #include "meson-gxbb.dtsi"
  6. #include <dt-bindings/sound/meson-aiu.h>
  7. / {
  8. compatible = "tronsmart,vega-s95", "amlogic,meson-gxbb";
  9. aliases {
  10. serial0 = &uart_AO;
  11. ethernet0 = &ethmac;
  12. };
  13. chosen {
  14. stdout-path = "serial0:115200n8";
  15. };
  16. spdif_dit: audio-codec-0 {
  17. #sound-dai-cells = <0>;
  18. compatible = "linux,spdif-dit";
  19. status = "okay";
  20. sound-name-prefix = "DIT";
  21. };
  22. leds {
  23. compatible = "gpio-leds";
  24. led-blue {
  25. label = "vega-s95:blue:on";
  26. gpios = <&gpio_ao GPIOAO_13 GPIO_ACTIVE_HIGH>;
  27. default-state = "on";
  28. panic-indicator;
  29. };
  30. };
  31. usb_pwr: regulator-usb-pwrs {
  32. compatible = "regulator-fixed";
  33. regulator-name = "USB_PWR";
  34. regulator-min-microvolt = <5000000>;
  35. regulator-max-microvolt = <5000000>;
  36. gpio = <&gpio GPIODV_24 GPIO_ACTIVE_HIGH>;
  37. enable-active-high;
  38. };
  39. vddio_boot: regulator-vddio_boot {
  40. compatible = "regulator-fixed";
  41. regulator-name = "VDDIO_BOOT";
  42. regulator-min-microvolt = <1800000>;
  43. regulator-max-microvolt = <1800000>;
  44. };
  45. vddao_3v3: regulator-vddao_3v3 {
  46. compatible = "regulator-fixed";
  47. regulator-name = "VDDAO_3V3";
  48. regulator-min-microvolt = <3300000>;
  49. regulator-max-microvolt = <3300000>;
  50. };
  51. vddio_ao18: regulator-vddio_ao18 {
  52. compatible = "regulator-fixed";
  53. regulator-name = "VDDIO_AO18";
  54. regulator-min-microvolt = <1800000>;
  55. regulator-max-microvolt = <1800000>;
  56. };
  57. vcc_3v3: regulator-vcc_3v3 {
  58. compatible = "regulator-fixed";
  59. regulator-name = "VCC_3V3";
  60. regulator-min-microvolt = <3300000>;
  61. regulator-max-microvolt = <3300000>;
  62. };
  63. emmc_pwrseq: emmc-pwrseq {
  64. compatible = "mmc-pwrseq-emmc";
  65. reset-gpios = <&gpio BOOT_9 GPIO_ACTIVE_LOW>;
  66. };
  67. wifi32k: wifi32k {
  68. compatible = "pwm-clock";
  69. #clock-cells = <0>;
  70. clock-frequency = <32768>;
  71. pwms = <&pwm_ef 0 30518 0>; /* PWM_E at 32.768KHz */
  72. };
  73. hdmi-connector {
  74. compatible = "hdmi-connector";
  75. type = "a";
  76. port {
  77. hdmi_connector_in: endpoint {
  78. remote-endpoint = <&hdmi_tx_tmds_out>;
  79. };
  80. };
  81. };
  82. sdio_pwrseq: sdio-pwrseq {
  83. compatible = "mmc-pwrseq-simple";
  84. reset-gpios = <&gpio GPIOX_6 GPIO_ACTIVE_LOW>;
  85. clocks = <&wifi32k>;
  86. clock-names = "ext_clock";
  87. };
  88. sound {
  89. compatible = "amlogic,gx-sound-card";
  90. model = "VEGA-S95";
  91. assigned-clocks = <&clkc CLKID_MPLL0>,
  92. <&clkc CLKID_MPLL1>,
  93. <&clkc CLKID_MPLL2>;
  94. assigned-clock-parents = <0>, <0>, <0>;
  95. assigned-clock-rates = <294912000>,
  96. <270950400>,
  97. <393216000>;
  98. status = "okay";
  99. dai-link-0 {
  100. sound-dai = <&aiu AIU_CPU CPU_I2S_FIFO>;
  101. };
  102. dai-link-1 {
  103. sound-dai = <&aiu AIU_CPU CPU_SPDIF_FIFO>;
  104. };
  105. dai-link-2 {
  106. sound-dai = <&aiu AIU_CPU CPU_I2S_ENCODER>;
  107. dai-format = "i2s";
  108. mclk-fs = <256>;
  109. codec-0 {
  110. sound-dai = <&aiu AIU_HDMI CTRL_I2S>;
  111. };
  112. };
  113. dai-link-3 {
  114. sound-dai = <&aiu AIU_CPU CPU_SPDIF_ENCODER>;
  115. codec-0 {
  116. sound-dai = <&spdif_dit>;
  117. };
  118. };
  119. dai-link-4 {
  120. sound-dai = <&aiu AIU_HDMI CTRL_OUT>;
  121. codec-0 {
  122. sound-dai = <&hdmi_tx>;
  123. };
  124. };
  125. };
  126. };
  127. &aiu {
  128. status = "okay";
  129. pinctrl-0 = <&spdif_out_y_pins>;
  130. pinctrl-names = "default";
  131. };
  132. &cec_AO {
  133. status = "okay";
  134. pinctrl-0 = <&ao_cec_pins>;
  135. pinctrl-names = "default";
  136. hdmi-phandle = <&hdmi_tx>;
  137. };
  138. &ethmac {
  139. status = "okay";
  140. pinctrl-0 = <&eth_rgmii_pins>;
  141. pinctrl-names = "default";
  142. phy-handle = <&eth_phy0>;
  143. phy-mode = "rgmii";
  144. amlogic,tx-delay-ns = <2>;
  145. mdio {
  146. compatible = "snps,dwmac-mdio";
  147. #address-cells = <1>;
  148. #size-cells = <0>;
  149. eth_phy0: ethernet-phy@0 {
  150. /* Realtek RTL8211F (0x001cc916) */
  151. reg = <0>;
  152. reset-assert-us = <10000>;
  153. reset-deassert-us = <80000>;
  154. reset-gpios = <&gpio GPIOZ_14 GPIO_ACTIVE_LOW>;
  155. interrupt-parent = <&gpio_intc>;
  156. /* MAC_INTR on GPIOZ_15 */
  157. interrupts = <29 IRQ_TYPE_LEVEL_LOW>;
  158. };
  159. };
  160. };
  161. &hdmi_tx {
  162. status = "okay";
  163. pinctrl-0 = <&hdmi_hpd_pins>, <&hdmi_i2c_pins>;
  164. pinctrl-names = "default";
  165. };
  166. &hdmi_tx_tmds_port {
  167. hdmi_tx_tmds_out: endpoint {
  168. remote-endpoint = <&hdmi_connector_in>;
  169. };
  170. };
  171. &ir {
  172. status = "okay";
  173. pinctrl-0 = <&remote_input_ao_pins>;
  174. pinctrl-names = "default";
  175. linux,rc-map-name = "rc-vega-s9x";
  176. };
  177. &pwm_ef {
  178. status = "okay";
  179. pinctrl-0 = <&pwm_e_pins>;
  180. pinctrl-names = "default";
  181. clocks = <&clkc CLKID_FCLK_DIV4>;
  182. clock-names = "clkin0";
  183. };
  184. &saradc {
  185. status = "okay";
  186. vref-supply = <&vddio_ao18>;
  187. };
  188. /* Wireless SDIO Module */
  189. &sd_emmc_a {
  190. status = "okay";
  191. pinctrl-0 = <&sdio_pins>;
  192. pinctrl-1 = <&sdio_clk_gate_pins>;
  193. pinctrl-names = "default", "clk-gate";
  194. #address-cells = <1>;
  195. #size-cells = <0>;
  196. bus-width = <4>;
  197. cap-sd-highspeed;
  198. max-frequency = <50000000>;
  199. non-removable;
  200. disable-wp;
  201. /* WiFi firmware requires power to be kept while in suspend */
  202. keep-power-in-suspend;
  203. mmc-pwrseq = <&sdio_pwrseq>;
  204. vmmc-supply = <&vddao_3v3>;
  205. vqmmc-supply = <&vddio_boot>;
  206. brcmf: wifi@1 {
  207. reg = <1>;
  208. compatible = "brcm,bcm4329-fmac";
  209. };
  210. };
  211. /* SD card */
  212. &sd_emmc_b {
  213. status = "okay";
  214. pinctrl-0 = <&sdcard_pins>;
  215. pinctrl-1 = <&sdcard_clk_gate_pins>;
  216. pinctrl-names = "default", "clk-gate";
  217. bus-width = <4>;
  218. cap-sd-highspeed;
  219. max-frequency = <50000000>;
  220. disable-wp;
  221. cd-gpios = <&gpio CARD_6 GPIO_ACTIVE_LOW>;
  222. vmmc-supply = <&vddao_3v3>;
  223. vqmmc-supply = <&vcc_3v3>;
  224. };
  225. /* eMMC */
  226. &sd_emmc_c {
  227. status = "okay";
  228. pinctrl-0 = <&emmc_pins>, <&emmc_ds_pins>;
  229. pinctrl-1 = <&emmc_clk_gate_pins>;
  230. pinctrl-names = "default", "clk-gate";
  231. bus-width = <8>;
  232. cap-mmc-highspeed;
  233. max-frequency = <200000000>;
  234. non-removable;
  235. disable-wp;
  236. mmc-ddr-1_8v;
  237. mmc-hs200-1_8v;
  238. mmc-pwrseq = <&emmc_pwrseq>;
  239. vmmc-supply = <&vcc_3v3>;
  240. vqmmc-supply = <&vddio_boot>;
  241. };
  242. /* This is connected to the Bluetooth module: */
  243. &uart_A {
  244. status = "okay";
  245. pinctrl-0 = <&uart_a_pins>, <&uart_a_cts_rts_pins>;
  246. pinctrl-names = "default";
  247. bluetooth {
  248. compatible = "brcm,bcm43438-bt";
  249. shutdown-gpios = <&gpio GPIOX_20 GPIO_ACTIVE_HIGH>;
  250. max-speed = <2000000>;
  251. clocks = <&wifi32k>;
  252. clock-names = "lpo";
  253. };
  254. };
  255. /* This UART is brought out to the DB9 connector */
  256. &uart_AO {
  257. status = "okay";
  258. pinctrl-0 = <&uart_ao_a_pins>;
  259. pinctrl-names = "default";
  260. };
  261. &usb0_phy {
  262. status = "okay";
  263. phy-supply = <&usb_pwr>;
  264. };
  265. &usb1_phy {
  266. status = "okay";
  267. };
  268. &usb0 {
  269. status = "okay";
  270. };
  271. &usb1 {
  272. status = "okay";
  273. };