meson-gxbb-nexbox-a95x.dts 6.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329
  1. // SPDX-License-Identifier: (GPL-2.0+ OR MIT)
  2. /*
  3. * Copyright (c) 2016 Andreas Färber
  4. * Copyright (c) 2016 BayLibre, Inc.
  5. * Author: Neil Armstrong <[email protected]>
  6. */
  7. /dts-v1/;
  8. #include "meson-gxbb.dtsi"
  9. #include <dt-bindings/gpio/gpio.h>
  10. #include <dt-bindings/input/input.h>
  11. #include <dt-bindings/sound/meson-aiu.h>
  12. / {
  13. compatible = "nexbox,a95x", "amlogic,meson-gxbb";
  14. model = "NEXBOX A95X";
  15. aliases {
  16. serial0 = &uart_AO;
  17. ethernet0 = &ethmac;
  18. };
  19. chosen {
  20. stdout-path = "serial0:115200n8";
  21. };
  22. memory@0 {
  23. device_type = "memory";
  24. reg = <0x0 0x0 0x0 0x40000000>;
  25. };
  26. leds {
  27. compatible = "gpio-leds";
  28. led-blue {
  29. label = "a95x:system-status";
  30. gpios = <&gpio_ao GPIOAO_13 GPIO_ACTIVE_LOW>;
  31. linux,default-trigger = "heartbeat";
  32. default-state = "off";
  33. };
  34. };
  35. gpio-keys-polled {
  36. compatible = "gpio-keys-polled";
  37. poll-interval = <100>;
  38. button {
  39. label = "reset";
  40. linux,code = <KEY_RESTART>;
  41. gpios = <&gpio_ao GPIOAO_3 GPIO_ACTIVE_LOW>;
  42. };
  43. };
  44. usb_pwr: regulator-usb-pwrs {
  45. compatible = "regulator-fixed";
  46. regulator-name = "USB_PWR";
  47. regulator-min-microvolt = <5000000>;
  48. regulator-max-microvolt = <5000000>;
  49. gpio = <&gpio GPIODV_24 GPIO_ACTIVE_HIGH>;
  50. enable-active-high;
  51. };
  52. vddio_card: gpio-regulator {
  53. compatible = "regulator-gpio";
  54. regulator-name = "VDDIO_CARD";
  55. regulator-min-microvolt = <1800000>;
  56. regulator-max-microvolt = <3300000>;
  57. gpios = <&gpio_ao GPIOAO_5 GPIO_ACTIVE_HIGH>;
  58. gpios-states = <1>;
  59. /* Based on P200 schematics, signal CARD_1.8V/3.3V_CTR */
  60. states = <1800000 0>,
  61. <3300000 1>;
  62. };
  63. vddio_boot: regulator-vddio_boot {
  64. compatible = "regulator-fixed";
  65. regulator-name = "VDDIO_BOOT";
  66. regulator-min-microvolt = <1800000>;
  67. regulator-max-microvolt = <1800000>;
  68. };
  69. vddao_3v3: regulator-vddao_3v3 {
  70. compatible = "regulator-fixed";
  71. regulator-name = "VDDAO_3V3";
  72. regulator-min-microvolt = <3300000>;
  73. regulator-max-microvolt = <3300000>;
  74. };
  75. vcc_3v3: regulator-vcc_3v3 {
  76. compatible = "regulator-fixed";
  77. regulator-name = "VCC_3V3";
  78. regulator-min-microvolt = <3300000>;
  79. regulator-max-microvolt = <3300000>;
  80. };
  81. emmc_pwrseq: emmc-pwrseq {
  82. compatible = "mmc-pwrseq-emmc";
  83. reset-gpios = <&gpio BOOT_9 GPIO_ACTIVE_LOW>;
  84. };
  85. wifi32k: wifi32k {
  86. compatible = "pwm-clock";
  87. #clock-cells = <0>;
  88. clock-frequency = <32768>;
  89. pwms = <&pwm_ef 0 30518 0>; /* PWM_E at 32.768KHz */
  90. };
  91. sdio_pwrseq: sdio-pwrseq {
  92. compatible = "mmc-pwrseq-simple";
  93. reset-gpios = <&gpio GPIOX_6 GPIO_ACTIVE_LOW>;
  94. clocks = <&wifi32k>;
  95. clock-names = "ext_clock";
  96. };
  97. cvbs-connector {
  98. compatible = "composite-video-connector";
  99. port {
  100. cvbs_connector_in: endpoint {
  101. remote-endpoint = <&cvbs_vdac_out>;
  102. };
  103. };
  104. };
  105. hdmi-connector {
  106. compatible = "hdmi-connector";
  107. type = "a";
  108. port {
  109. hdmi_connector_in: endpoint {
  110. remote-endpoint = <&hdmi_tx_tmds_out>;
  111. };
  112. };
  113. };
  114. sound {
  115. compatible = "amlogic,gx-sound-card";
  116. model = "NEXBOX-A95X";
  117. assigned-clocks = <&clkc CLKID_MPLL0>,
  118. <&clkc CLKID_MPLL1>,
  119. <&clkc CLKID_MPLL2>;
  120. assigned-clock-parents = <0>, <0>, <0>;
  121. assigned-clock-rates = <294912000>,
  122. <270950400>,
  123. <393216000>;
  124. status = "okay";
  125. dai-link-0 {
  126. sound-dai = <&aiu AIU_CPU CPU_I2S_FIFO>;
  127. };
  128. dai-link-1 {
  129. sound-dai = <&aiu AIU_CPU CPU_I2S_ENCODER>;
  130. dai-format = "i2s";
  131. mclk-fs = <256>;
  132. codec-0 {
  133. sound-dai = <&aiu AIU_HDMI CTRL_I2S>;
  134. };
  135. };
  136. dai-link-2 {
  137. sound-dai = <&aiu AIU_HDMI CTRL_OUT>;
  138. codec-0 {
  139. sound-dai = <&hdmi_tx>;
  140. };
  141. };
  142. };
  143. };
  144. &aiu {
  145. status = "okay";
  146. };
  147. &cvbs_vdac_port {
  148. cvbs_vdac_out: endpoint {
  149. remote-endpoint = <&cvbs_connector_in>;
  150. };
  151. };
  152. &cec_AO {
  153. status = "okay";
  154. pinctrl-0 = <&ao_cec_pins>;
  155. pinctrl-names = "default";
  156. hdmi-phandle = <&hdmi_tx>;
  157. };
  158. &ethmac {
  159. status = "okay";
  160. pinctrl-0 = <&eth_rmii_pins>;
  161. pinctrl-names = "default";
  162. phy-handle = <&eth_phy0>;
  163. phy-mode = "rmii";
  164. mdio {
  165. compatible = "snps,dwmac-mdio";
  166. #address-cells = <1>;
  167. #size-cells = <0>;
  168. eth_phy0: ethernet-phy@0 {
  169. /* IC Plus IP101GR (0x02430c54) */
  170. reg = <0>;
  171. reset-assert-us = <10000>;
  172. reset-deassert-us = <10000>;
  173. reset-gpios = <&gpio GPIOZ_14 GPIO_ACTIVE_LOW>;
  174. };
  175. };
  176. };
  177. &hdmi_tx {
  178. status = "okay";
  179. pinctrl-0 = <&hdmi_hpd_pins>, <&hdmi_i2c_pins>;
  180. pinctrl-names = "default";
  181. };
  182. &hdmi_tx_tmds_port {
  183. hdmi_tx_tmds_out: endpoint {
  184. remote-endpoint = <&hdmi_connector_in>;
  185. };
  186. };
  187. &ir {
  188. status = "okay";
  189. pinctrl-0 = <&remote_input_ao_pins>;
  190. pinctrl-names = "default";
  191. };
  192. &pwm_ef {
  193. status = "okay";
  194. pinctrl-0 = <&pwm_e_pins>;
  195. pinctrl-names = "default";
  196. clocks = <&clkc CLKID_FCLK_DIV4>;
  197. clock-names = "clkin0";
  198. };
  199. /* Wireless SDIO Module */
  200. &sd_emmc_a {
  201. status = "okay";
  202. pinctrl-0 = <&sdio_pins>;
  203. pinctrl-1 = <&sdio_clk_gate_pins>;
  204. pinctrl-names = "default", "clk-gate";
  205. #address-cells = <1>;
  206. #size-cells = <0>;
  207. bus-width = <4>;
  208. cap-sd-highspeed;
  209. max-frequency = <100000000>;
  210. non-removable;
  211. disable-wp;
  212. /* WiFi firmware requires power to be kept while in suspend */
  213. keep-power-in-suspend;
  214. mmc-pwrseq = <&sdio_pwrseq>;
  215. vmmc-supply = <&vddao_3v3>;
  216. vqmmc-supply = <&vddio_boot>;
  217. };
  218. /* SD card */
  219. &sd_emmc_b {
  220. status = "okay";
  221. pinctrl-0 = <&sdcard_pins>;
  222. pinctrl-1 = <&sdcard_clk_gate_pins>;
  223. pinctrl-names = "default", "clk-gate";
  224. bus-width = <4>;
  225. cap-sd-highspeed;
  226. max-frequency = <50000000>;
  227. disable-wp;
  228. cd-gpios = <&gpio CARD_6 GPIO_ACTIVE_LOW>;
  229. vmmc-supply = <&vddao_3v3>;
  230. vqmmc-supply = <&vddio_card>;
  231. };
  232. /* eMMC */
  233. &sd_emmc_c {
  234. status = "okay";
  235. pinctrl-0 = <&emmc_pins>, <&emmc_ds_pins>;
  236. pinctrl-1 = <&emmc_clk_gate_pins>;
  237. pinctrl-names = "default", "clk-gate";
  238. bus-width = <8>;
  239. cap-mmc-highspeed;
  240. max-frequency = <200000000>;
  241. non-removable;
  242. disable-wp;
  243. mmc-ddr-1_8v;
  244. mmc-hs200-1_8v;
  245. mmc-pwrseq = <&emmc_pwrseq>;
  246. vmmc-supply = <&vcc_3v3>;
  247. vqmmc-supply = <&vddio_boot>;
  248. };
  249. &uart_AO {
  250. status = "okay";
  251. pinctrl-0 = <&uart_ao_a_pins>;
  252. pinctrl-names = "default";
  253. };
  254. &usb0_phy {
  255. status = "okay";
  256. phy-supply = <&usb_pwr>;
  257. };
  258. &usb1_phy {
  259. status = "okay";
  260. };
  261. &usb0 {
  262. status = "okay";
  263. };
  264. &usb1 {
  265. status = "okay";
  266. };