meson-gx-p23x-q20x.dtsi 6.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324
  1. // SPDX-License-Identifier: (GPL-2.0+ OR MIT)
  2. /*
  3. * Copyright (c) 2016 Endless Computers, Inc.
  4. * Author: Carlo Caione <[email protected]>
  5. */
  6. /* Common DTSI for same Amlogic Q200/Q201 and P230/P231 boards using either
  7. * the pin-compatible S912 (GXM) or S905D (GXL) SoCs.
  8. */
  9. #include <dt-bindings/sound/meson-aiu.h>
  10. / {
  11. aliases {
  12. serial0 = &uart_AO;
  13. ethernet0 = &ethmac;
  14. };
  15. dio2133: analog-amplifier {
  16. compatible = "simple-audio-amplifier";
  17. sound-name-prefix = "AU2";
  18. VCC-supply = <&hdmi_5v>;
  19. enable-gpios = <&gpio GPIOH_5 GPIO_ACTIVE_HIGH>;
  20. };
  21. spdif_dit: audio-codec-0 {
  22. #sound-dai-cells = <0>;
  23. compatible = "linux,spdif-dit";
  24. status = "okay";
  25. sound-name-prefix = "DIT";
  26. };
  27. chosen {
  28. stdout-path = "serial0:115200n8";
  29. };
  30. memory@0 {
  31. device_type = "memory";
  32. reg = <0x0 0x0 0x0 0x80000000>;
  33. };
  34. hdmi_5v: regulator-hdmi-5v {
  35. compatible = "regulator-fixed";
  36. regulator-name = "HDMI_5V";
  37. regulator-min-microvolt = <5000000>;
  38. regulator-max-microvolt = <5000000>;
  39. gpio = <&gpio GPIOH_3 GPIO_ACTIVE_HIGH>;
  40. enable-active-high;
  41. regulator-always-on;
  42. };
  43. vddio_ao18: regulator-vddio_ao18 {
  44. compatible = "regulator-fixed";
  45. regulator-name = "VDDIO_AO18";
  46. regulator-min-microvolt = <1800000>;
  47. regulator-max-microvolt = <1800000>;
  48. };
  49. vddio_boot: regulator-vddio_boot {
  50. compatible = "regulator-fixed";
  51. regulator-name = "VDDIO_BOOT";
  52. regulator-min-microvolt = <1800000>;
  53. regulator-max-microvolt = <1800000>;
  54. };
  55. vddao_3v3: regulator-vddao_3v3 {
  56. compatible = "regulator-fixed";
  57. regulator-name = "VDDAO_3V3";
  58. regulator-min-microvolt = <3300000>;
  59. regulator-max-microvolt = <3300000>;
  60. };
  61. vcc_3v3: regulator-vcc_3v3 {
  62. compatible = "regulator-fixed";
  63. regulator-name = "VCC_3V3";
  64. regulator-min-microvolt = <3300000>;
  65. regulator-max-microvolt = <3300000>;
  66. };
  67. emmc_pwrseq: emmc-pwrseq {
  68. compatible = "mmc-pwrseq-emmc";
  69. reset-gpios = <&gpio BOOT_9 GPIO_ACTIVE_LOW>;
  70. };
  71. wifi32k: wifi32k {
  72. compatible = "pwm-clock";
  73. #clock-cells = <0>;
  74. clock-frequency = <32768>;
  75. pwms = <&pwm_ef 0 30518 0>; /* PWM_E at 32.768KHz */
  76. };
  77. sdio_pwrseq: sdio-pwrseq {
  78. compatible = "mmc-pwrseq-simple";
  79. reset-gpios = <&gpio GPIOX_6 GPIO_ACTIVE_LOW>;
  80. clocks = <&wifi32k>;
  81. clock-names = "ext_clock";
  82. };
  83. cvbs-connector {
  84. compatible = "composite-video-connector";
  85. port {
  86. cvbs_connector_in: endpoint {
  87. remote-endpoint = <&cvbs_vdac_out>;
  88. };
  89. };
  90. };
  91. hdmi-connector {
  92. compatible = "hdmi-connector";
  93. type = "a";
  94. port {
  95. hdmi_connector_in: endpoint {
  96. remote-endpoint = <&hdmi_tx_tmds_out>;
  97. };
  98. };
  99. };
  100. sound {
  101. compatible = "amlogic,gx-sound-card";
  102. model = "P230-Q200";
  103. audio-aux-devs = <&dio2133>;
  104. audio-widgets = "Line", "Lineout";
  105. audio-routing = "AU2 INL", "ACODEC LOLP",
  106. "AU2 INR", "ACODEC LORP",
  107. "AU2 INL", "ACODEC LOLN",
  108. "AU2 INR", "ACODEC LORN",
  109. "Lineout", "AU2 OUTL",
  110. "Lineout", "AU2 OUTR";
  111. assigned-clocks = <&clkc CLKID_MPLL0>,
  112. <&clkc CLKID_MPLL1>,
  113. <&clkc CLKID_MPLL2>;
  114. assigned-clock-parents = <0>, <0>, <0>;
  115. assigned-clock-rates = <294912000>,
  116. <270950400>,
  117. <393216000>;
  118. status = "okay";
  119. dai-link-0 {
  120. sound-dai = <&aiu AIU_CPU CPU_I2S_FIFO>;
  121. };
  122. dai-link-1 {
  123. sound-dai = <&aiu AIU_CPU CPU_SPDIF_FIFO>;
  124. };
  125. dai-link-2 {
  126. sound-dai = <&aiu AIU_CPU CPU_I2S_ENCODER>;
  127. dai-format = "i2s";
  128. mclk-fs = <256>;
  129. codec-0 {
  130. sound-dai = <&aiu AIU_HDMI CTRL_I2S>;
  131. };
  132. codec-1 {
  133. sound-dai = <&aiu AIU_ACODEC CTRL_I2S>;
  134. };
  135. };
  136. dai-link-3 {
  137. sound-dai = <&aiu AIU_CPU CPU_SPDIF_ENCODER>;
  138. codec-0 {
  139. sound-dai = <&spdif_dit>;
  140. };
  141. };
  142. dai-link-4 {
  143. sound-dai = <&aiu AIU_HDMI CTRL_OUT>;
  144. codec-0 {
  145. sound-dai = <&hdmi_tx>;
  146. };
  147. };
  148. dai-link-5 {
  149. sound-dai = <&aiu AIU_ACODEC CTRL_OUT>;
  150. codec-0 {
  151. sound-dai = <&acodec>;
  152. };
  153. };
  154. };
  155. };
  156. &acodec {
  157. AVDD-supply = <&vddio_ao18>;
  158. status = "okay";
  159. };
  160. &aiu {
  161. status = "okay";
  162. pinctrl-0 = <&spdif_out_h_pins>;
  163. pinctrl-names = "default";
  164. };
  165. &cec_AO {
  166. status = "okay";
  167. pinctrl-0 = <&ao_cec_pins>;
  168. pinctrl-names = "default";
  169. hdmi-phandle = <&hdmi_tx>;
  170. };
  171. &cvbs_vdac_port {
  172. cvbs_vdac_out: endpoint {
  173. remote-endpoint = <&cvbs_connector_in>;
  174. };
  175. };
  176. &ethmac {
  177. status = "okay";
  178. };
  179. &hdmi_tx {
  180. status = "okay";
  181. pinctrl-0 = <&hdmi_hpd_pins>, <&hdmi_i2c_pins>;
  182. pinctrl-names = "default";
  183. hdmi-supply = <&hdmi_5v>;
  184. };
  185. &hdmi_tx_tmds_port {
  186. hdmi_tx_tmds_out: endpoint {
  187. remote-endpoint = <&hdmi_connector_in>;
  188. };
  189. };
  190. &ir {
  191. status = "okay";
  192. pinctrl-0 = <&remote_input_ao_pins>;
  193. pinctrl-names = "default";
  194. };
  195. &pwm_ef {
  196. status = "okay";
  197. pinctrl-0 = <&pwm_e_pins>;
  198. pinctrl-names = "default";
  199. clocks = <&clkc CLKID_FCLK_DIV4>;
  200. clock-names = "clkin0";
  201. };
  202. &saradc {
  203. status = "okay";
  204. vref-supply = <&vddio_ao18>;
  205. };
  206. /* Wireless SDIO Module */
  207. &sd_emmc_a {
  208. status = "okay";
  209. pinctrl-0 = <&sdio_pins>;
  210. pinctrl-1 = <&sdio_clk_gate_pins>;
  211. pinctrl-names = "default", "clk-gate";
  212. #address-cells = <1>;
  213. #size-cells = <0>;
  214. bus-width = <4>;
  215. cap-sd-highspeed;
  216. max-frequency = <50000000>;
  217. non-removable;
  218. disable-wp;
  219. /* WiFi firmware requires power to be kept while in suspend */
  220. keep-power-in-suspend;
  221. mmc-pwrseq = <&sdio_pwrseq>;
  222. vmmc-supply = <&vddao_3v3>;
  223. vqmmc-supply = <&vddio_boot>;
  224. };
  225. /* SD card */
  226. &sd_emmc_b {
  227. status = "okay";
  228. pinctrl-0 = <&sdcard_pins>;
  229. pinctrl-1 = <&sdcard_clk_gate_pins>;
  230. pinctrl-names = "default", "clk-gate";
  231. bus-width = <4>;
  232. cap-sd-highspeed;
  233. max-frequency = <50000000>;
  234. disable-wp;
  235. cd-gpios = <&gpio CARD_6 GPIO_ACTIVE_LOW>;
  236. vmmc-supply = <&vddao_3v3>;
  237. vqmmc-supply = <&vddio_boot>;
  238. };
  239. /* eMMC */
  240. &sd_emmc_c {
  241. status = "okay";
  242. pinctrl-0 = <&emmc_pins>, <&emmc_ds_pins>;
  243. pinctrl-1 = <&emmc_clk_gate_pins>;
  244. pinctrl-names = "default", "clk-gate";
  245. bus-width = <8>;
  246. cap-mmc-highspeed;
  247. max-frequency = <200000000>;
  248. non-removable;
  249. disable-wp;
  250. mmc-ddr-1_8v;
  251. mmc-hs200-1_8v;
  252. mmc-pwrseq = <&emmc_pwrseq>;
  253. vmmc-supply = <&vcc_3v3>;
  254. vqmmc-supply = <&vddio_boot>;
  255. };
  256. /* This UART is brought out to the DB9 connector */
  257. &uart_AO {
  258. status = "okay";
  259. pinctrl-0 = <&uart_ao_a_pins>;
  260. pinctrl-names = "default";
  261. };
  262. &usb {
  263. status = "okay";
  264. dr_mode = "otg";
  265. };