meson-sm1-ac2xx.dtsi 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300
  1. // SPDX-License-Identifier: (GPL-2.0+ OR MIT)
  2. /*
  3. * Copyright (c) 2019 BayLibre SAS. All rights reserved.
  4. * Copyright (c) 2020 Christian Hewitt <[email protected]>
  5. *
  6. * AC200/AC202 = S905D3
  7. * AC213/AC214 = S905X3
  8. *
  9. */
  10. #include "meson-sm1.dtsi"
  11. #include <dt-bindings/gpio/gpio.h>
  12. #include <dt-bindings/gpio/meson-g12a-gpio.h>
  13. #include <dt-bindings/input/input.h>
  14. / {
  15. aliases {
  16. serial0 = &uart_AO;
  17. ethernet0 = &ethmac;
  18. };
  19. chosen {
  20. stdout-path = "serial0:115200n8";
  21. };
  22. emmc_pwrseq: emmc-pwrseq {
  23. compatible = "mmc-pwrseq-emmc";
  24. reset-gpios = <&gpio BOOT_12 GPIO_ACTIVE_LOW>;
  25. };
  26. cvbs-connector {
  27. compatible = "composite-video-connector";
  28. port {
  29. cvbs_connector_in: endpoint {
  30. remote-endpoint = <&cvbs_vdac_out>;
  31. };
  32. };
  33. };
  34. hdmi-connector {
  35. compatible = "hdmi-connector";
  36. type = "a";
  37. port {
  38. hdmi_connector_in: endpoint {
  39. remote-endpoint = <&hdmi_tx_tmds_out>;
  40. };
  41. };
  42. };
  43. memory@0 {
  44. device_type = "memory";
  45. reg = <0x0 0x0 0x0 0x40000000>;
  46. };
  47. ao_5v: regulator-ao_5v {
  48. compatible = "regulator-fixed";
  49. regulator-name = "AO_5V";
  50. regulator-min-microvolt = <5000000>;
  51. regulator-max-microvolt = <5000000>;
  52. vin-supply = <&dc_in>;
  53. regulator-always-on;
  54. };
  55. dc_in: regulator-dc_in {
  56. compatible = "regulator-fixed";
  57. regulator-name = "DC_IN";
  58. regulator-min-microvolt = <5000000>;
  59. regulator-max-microvolt = <5000000>;
  60. regulator-always-on;
  61. };
  62. emmc_1v8: regulator-emmc_1v8 {
  63. compatible = "regulator-fixed";
  64. regulator-name = "EMMC_1V8";
  65. regulator-min-microvolt = <1800000>;
  66. regulator-max-microvolt = <1800000>;
  67. vin-supply = <&vddao_3v3>;
  68. regulator-always-on;
  69. };
  70. vddao_3v3: regulator-vddao_3v3 {
  71. compatible = "regulator-fixed";
  72. regulator-name = "VDDAO_3V3";
  73. regulator-min-microvolt = <3300000>;
  74. regulator-max-microvolt = <3300000>;
  75. vin-supply = <&dc_in>;
  76. regulator-always-on;
  77. };
  78. vddcpu: regulator-vddcpu {
  79. compatible = "pwm-regulator";
  80. regulator-name = "VDDCPU";
  81. regulator-min-microvolt = <690000>;
  82. regulator-max-microvolt = <1050000>;
  83. vin-supply = <&dc_in>;
  84. pwms = <&pwm_AO_cd 1 1500 0>;
  85. pwm-dutycycle-range = <100 0>;
  86. regulator-boot-on;
  87. regulator-always-on;
  88. };
  89. vddio_ao1v8: regulator-vddio_ao1v8 {
  90. compatible = "regulator-fixed";
  91. regulator-name = "VDDIO_AO1V8";
  92. regulator-min-microvolt = <1800000>;
  93. regulator-max-microvolt = <1800000>;
  94. vin-supply = <&vddao_3v3>;
  95. regulator-always-on;
  96. };
  97. sdio_pwrseq: sdio-pwrseq {
  98. compatible = "mmc-pwrseq-simple";
  99. reset-gpios = <&gpio GPIOX_6 GPIO_ACTIVE_LOW>;
  100. clocks = <&wifi32k>;
  101. clock-names = "ext_clock";
  102. };
  103. wifi32k: wifi32k {
  104. compatible = "pwm-clock";
  105. #clock-cells = <0>;
  106. clock-frequency = <32768>;
  107. pwms = <&pwm_ef 0 30518 0>; /* PWM_E at 32.768KHz */
  108. };
  109. };
  110. &cec_AO {
  111. pinctrl-0 = <&cec_ao_a_h_pins>;
  112. pinctrl-names = "default";
  113. status = "disabled";
  114. hdmi-phandle = <&hdmi_tx>;
  115. };
  116. &cecb_AO {
  117. pinctrl-0 = <&cec_ao_b_h_pins>;
  118. pinctrl-names = "default";
  119. status = "okay";
  120. hdmi-phandle = <&hdmi_tx>;
  121. };
  122. &cpu0 {
  123. cpu-supply = <&vddcpu>;
  124. operating-points-v2 = <&cpu_opp_table>;
  125. clocks = <&clkc CLKID_CPU_CLK>;
  126. clock-latency = <50000>;
  127. };
  128. &cpu1 {
  129. cpu-supply = <&vddcpu>;
  130. operating-points-v2 = <&cpu_opp_table>;
  131. clocks = <&clkc CLKID_CPU1_CLK>;
  132. clock-latency = <50000>;
  133. };
  134. &cpu2 {
  135. cpu-supply = <&vddcpu>;
  136. operating-points-v2 = <&cpu_opp_table>;
  137. clocks = <&clkc CLKID_CPU2_CLK>;
  138. clock-latency = <50000>;
  139. };
  140. &cpu3 {
  141. cpu-supply = <&vddcpu>;
  142. operating-points-v2 = <&cpu_opp_table>;
  143. clocks = <&clkc CLKID_CPU3_CLK>;
  144. clock-latency = <50000>;
  145. };
  146. &cvbs_vdac_port {
  147. cvbs_vdac_out: endpoint {
  148. remote-endpoint = <&cvbs_connector_in>;
  149. };
  150. };
  151. &hdmi_tx {
  152. status = "okay";
  153. pinctrl-0 = <&hdmitx_hpd_pins>, <&hdmitx_ddc_pins>;
  154. pinctrl-names = "default";
  155. };
  156. &hdmi_tx_tmds_port {
  157. hdmi_tx_tmds_out: endpoint {
  158. remote-endpoint = <&hdmi_connector_in>;
  159. };
  160. };
  161. &ir {
  162. status = "okay";
  163. pinctrl-0 = <&remote_input_ao_pins>;
  164. pinctrl-names = "default";
  165. };
  166. &pwm_AO_ab {
  167. status = "okay";
  168. pinctrl-0 = <&pwm_ao_a_pins>;
  169. pinctrl-names = "default";
  170. clocks = <&xtal>;
  171. clock-names = "clkin0";
  172. };
  173. &pwm_AO_cd {
  174. pinctrl-0 = <&pwm_ao_d_e_pins>;
  175. pinctrl-names = "default";
  176. clocks = <&xtal>;
  177. clock-names = "clkin1";
  178. status = "okay";
  179. };
  180. &pwm_ef {
  181. status = "okay";
  182. pinctrl-0 = <&pwm_e_pins>;
  183. pinctrl-names = "default";
  184. clocks = <&xtal>;
  185. clock-names = "clkin0";
  186. };
  187. &saradc {
  188. status = "okay";
  189. vref-supply = <&vddio_ao1v8>;
  190. };
  191. /* SDIO */
  192. &sd_emmc_a {
  193. status = "okay";
  194. pinctrl-0 = <&sdio_pins>;
  195. pinctrl-1 = <&sdio_clk_gate_pins>;
  196. pinctrl-names = "default", "clk-gate";
  197. #address-cells = <1>;
  198. #size-cells = <0>;
  199. bus-width = <4>;
  200. cap-sd-highspeed;
  201. sd-uhs-sdr104;
  202. max-frequency = <200000000>;
  203. non-removable;
  204. disable-wp;
  205. /* WiFi firmware requires power to be kept while in suspend */
  206. keep-power-in-suspend;
  207. mmc-pwrseq = <&sdio_pwrseq>;
  208. vmmc-supply = <&vddao_3v3>;
  209. vqmmc-supply = <&vddio_ao1v8>;
  210. };
  211. /* SD Card */
  212. &sd_emmc_b {
  213. status = "okay";
  214. pinctrl-0 = <&sdcard_c_pins>;
  215. pinctrl-1 = <&sdcard_clk_gate_c_pins>;
  216. pinctrl-names = "default", "clk-gate";
  217. bus-width = <4>;
  218. cap-sd-highspeed;
  219. /* CRC errors are observed at 50MHz */
  220. max-frequency = <35000000>;
  221. disable-wp;
  222. cd-gpios = <&gpio GPIOC_6 GPIO_ACTIVE_LOW>;
  223. vmmc-supply = <&vddao_3v3>;
  224. vqmmc-supply = <&vddao_3v3>;
  225. };
  226. /* eMMC */
  227. &sd_emmc_c {
  228. status = "okay";
  229. pinctrl-0 = <&emmc_ctrl_pins>, <&emmc_data_8b_pins>, <&emmc_ds_pins>;
  230. pinctrl-1 = <&emmc_clk_gate_pins>;
  231. pinctrl-names = "default", "clk-gate";
  232. bus-width = <8>;
  233. cap-mmc-highspeed;
  234. mmc-ddr-1_8v;
  235. mmc-hs200-1_8v;
  236. max-frequency = <200000000>;
  237. non-removable;
  238. disable-wp;
  239. mmc-pwrseq = <&emmc_pwrseq>;
  240. vmmc-supply = <&vddao_3v3>;
  241. vqmmc-supply = <&emmc_1v8>;
  242. };
  243. &uart_AO {
  244. status = "okay";
  245. pinctrl-0 = <&uart_ao_a_pins>;
  246. pinctrl-names = "default";
  247. };
  248. &usb {
  249. status = "okay";
  250. dr_mode = "otg";
  251. };