meson-gxbb-wetek.dtsi 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292
  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: Kevin Hilman <[email protected]>
  6. */
  7. #include "meson-gxbb.dtsi"
  8. #include <dt-bindings/gpio/gpio.h>
  9. #include <dt-bindings/leds/common.h>
  10. / {
  11. aliases {
  12. serial0 = &uart_AO;
  13. ethernet0 = &ethmac;
  14. };
  15. chosen {
  16. stdout-path = "serial0:115200n8";
  17. };
  18. memory@0 {
  19. device_type = "memory";
  20. reg = <0x0 0x0 0x0 0x40000000>;
  21. };
  22. leds {
  23. compatible = "gpio-leds";
  24. led-power {
  25. /* red in suspend or power-off */
  26. color = <LED_COLOR_ID_BLUE>;
  27. function = LED_FUNCTION_POWER;
  28. gpios = <&gpio_ao GPIOAO_13 GPIO_ACTIVE_HIGH>;
  29. default-state = "on";
  30. panic-indicator;
  31. };
  32. };
  33. usb_pwr: regulator-usb-pwrs {
  34. compatible = "regulator-fixed";
  35. regulator-name = "USB_PWR";
  36. regulator-min-microvolt = <5000000>;
  37. regulator-max-microvolt = <5000000>;
  38. gpio = <&gpio GPIODV_24 GPIO_ACTIVE_HIGH>;
  39. enable-active-high;
  40. };
  41. vddio_boot: regulator-vddio_boot {
  42. compatible = "regulator-fixed";
  43. regulator-name = "VDDIO_BOOT";
  44. regulator-min-microvolt = <1800000>;
  45. regulator-max-microvolt = <1800000>;
  46. };
  47. vddao_3v3: regulator-vddao_3v3 {
  48. compatible = "regulator-fixed";
  49. regulator-name = "VDDAO_3V3";
  50. regulator-min-microvolt = <3300000>;
  51. regulator-max-microvolt = <3300000>;
  52. };
  53. vddio_ao18: regulator-vddio_ao18 {
  54. compatible = "regulator-fixed";
  55. regulator-name = "VDDIO_AO18";
  56. regulator-min-microvolt = <1800000>;
  57. regulator-max-microvolt = <1800000>;
  58. regulator-always-on;
  59. };
  60. vcc_3v3: regulator-vcc_3v3 {
  61. compatible = "regulator-fixed";
  62. regulator-name = "VCC_3V3";
  63. regulator-min-microvolt = <3300000>;
  64. regulator-max-microvolt = <3300000>;
  65. };
  66. emmc_pwrseq: emmc-pwrseq {
  67. compatible = "mmc-pwrseq-emmc";
  68. reset-gpios = <&gpio BOOT_9 GPIO_ACTIVE_LOW>;
  69. };
  70. wifi32k: wifi32k {
  71. compatible = "pwm-clock";
  72. #clock-cells = <0>;
  73. clock-frequency = <32768>;
  74. pwms = <&pwm_ef 0 30518 0>; /* PWM_E at 32.768KHz */
  75. };
  76. sdio_pwrseq: sdio-pwrseq {
  77. compatible = "mmc-pwrseq-simple";
  78. reset-gpios = <&gpio GPIOX_6 GPIO_ACTIVE_LOW>;
  79. clocks = <&wifi32k>;
  80. clock-names = "ext_clock";
  81. };
  82. cvbs-connector {
  83. compatible = "composite-video-connector";
  84. port {
  85. cvbs_connector_in: endpoint {
  86. remote-endpoint = <&cvbs_vdac_out>;
  87. };
  88. };
  89. };
  90. hdmi-connector {
  91. compatible = "hdmi-connector";
  92. type = "a";
  93. port {
  94. hdmi_connector_in: endpoint {
  95. remote-endpoint = <&hdmi_tx_tmds_out>;
  96. };
  97. };
  98. };
  99. };
  100. &cec_AO {
  101. status = "okay";
  102. pinctrl-0 = <&ao_cec_pins>;
  103. pinctrl-names = "default";
  104. hdmi-phandle = <&hdmi_tx>;
  105. };
  106. &cvbs_vdac_port {
  107. cvbs_vdac_out: endpoint {
  108. remote-endpoint = <&cvbs_connector_in>;
  109. };
  110. };
  111. &ethmac {
  112. status = "okay";
  113. pinctrl-0 = <&eth_rgmii_pins>;
  114. pinctrl-names = "default";
  115. phy-handle = <&eth_phy0>;
  116. phy-mode = "rgmii";
  117. amlogic,tx-delay-ns = <2>;
  118. mdio {
  119. compatible = "snps,dwmac-mdio";
  120. #address-cells = <1>;
  121. #size-cells = <0>;
  122. eth_phy0: ethernet-phy@0 {
  123. /* Realtek RTL8211F (0x001cc916) */
  124. reg = <0>;
  125. reset-assert-us = <10000>;
  126. reset-deassert-us = <80000>;
  127. reset-gpios = <&gpio GPIOZ_14 GPIO_ACTIVE_LOW>;
  128. interrupt-parent = <&gpio_intc>;
  129. /* MAC_INTR on GPIOZ_15 */
  130. interrupts = <29 IRQ_TYPE_LEVEL_LOW>;
  131. };
  132. };
  133. };
  134. &hdmi_tx {
  135. status = "okay";
  136. pinctrl-0 = <&hdmi_hpd_pins>, <&hdmi_i2c_pins>;
  137. pinctrl-names = "default";
  138. hdmi-supply = <&vddio_ao18>;
  139. };
  140. &hdmi_tx_tmds_port {
  141. hdmi_tx_tmds_out: endpoint {
  142. remote-endpoint = <&hdmi_connector_in>;
  143. };
  144. };
  145. &ir {
  146. status = "okay";
  147. pinctrl-0 = <&remote_input_ao_pins>;
  148. pinctrl-names = "default";
  149. };
  150. &pwm_ef {
  151. status = "okay";
  152. pinctrl-0 = <&pwm_e_pins>;
  153. pinctrl-names = "default";
  154. clocks = <&clkc CLKID_FCLK_DIV4>;
  155. clock-names = "clkin0";
  156. };
  157. &saradc {
  158. status = "okay";
  159. vref-supply = <&vddio_ao18>;
  160. };
  161. /* Wireless SDIO Module */
  162. &sd_emmc_a {
  163. status = "okay";
  164. pinctrl-0 = <&sdio_pins>;
  165. pinctrl-1 = <&sdio_clk_gate_pins>;
  166. pinctrl-names = "default", "clk-gate";
  167. #address-cells = <1>;
  168. #size-cells = <0>;
  169. bus-width = <4>;
  170. cap-sd-highspeed;
  171. max-frequency = <50000000>;
  172. non-removable;
  173. disable-wp;
  174. /* WiFi firmware requires power to be kept while in suspend */
  175. keep-power-in-suspend;
  176. mmc-pwrseq = <&sdio_pwrseq>;
  177. vmmc-supply = <&vddao_3v3>;
  178. vqmmc-supply = <&vddio_boot>;
  179. brcmf: wifi@1 {
  180. reg = <1>;
  181. compatible = "brcm,bcm4329-fmac";
  182. };
  183. };
  184. /* SD card */
  185. &sd_emmc_b {
  186. status = "okay";
  187. pinctrl-0 = <&sdcard_pins>;
  188. pinctrl-1 = <&sdcard_clk_gate_pins>;
  189. pinctrl-names = "default", "clk-gate";
  190. bus-width = <4>;
  191. cap-sd-highspeed;
  192. max-frequency = <50000000>;
  193. disable-wp;
  194. cd-gpios = <&gpio CARD_6 GPIO_ACTIVE_LOW>;
  195. vmmc-supply = <&vddao_3v3>;
  196. vqmmc-supply = <&vcc_3v3>;
  197. };
  198. /* eMMC */
  199. &sd_emmc_c {
  200. status = "okay";
  201. pinctrl-0 = <&emmc_pins>, <&emmc_ds_pins>;
  202. pinctrl-1 = <&emmc_clk_gate_pins>;
  203. pinctrl-names = "default", "clk-gate";
  204. bus-width = <8>;
  205. cap-mmc-highspeed;
  206. max-frequency = <200000000>;
  207. non-removable;
  208. disable-wp;
  209. mmc-ddr-1_8v;
  210. mmc-hs200-1_8v;
  211. mmc-pwrseq = <&emmc_pwrseq>;
  212. vmmc-supply = <&vcc_3v3>;
  213. vqmmc-supply = <&vddio_boot>;
  214. };
  215. /* This is connected to the Bluetooth module: */
  216. &uart_A {
  217. status = "okay";
  218. pinctrl-0 = <&uart_a_pins>, <&uart_a_cts_rts_pins>;
  219. pinctrl-names = "default";
  220. uart-has-rtscts;
  221. bluetooth {
  222. compatible = "brcm,bcm43438-bt";
  223. shutdown-gpios = <&gpio GPIOX_20 GPIO_ACTIVE_HIGH>;
  224. };
  225. };
  226. /* This UART is brought out to the DB9 connector */
  227. &uart_AO {
  228. status = "okay";
  229. pinctrl-0 = <&uart_ao_a_pins>;
  230. pinctrl-names = "default";
  231. };
  232. &usb0_phy {
  233. status = "okay";
  234. phy-supply = <&usb_pwr>;
  235. };
  236. &usb0 {
  237. status = "okay";
  238. };