meson-g12a-radxa-zero.dts 7.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404
  1. // SPDX-License-Identifier: (GPL-2.0+ OR MIT)
  2. /*
  3. * Copyright (c) 2018 BayLibre SAS. All rights reserved.
  4. */
  5. /dts-v1/;
  6. #include "meson-g12a.dtsi"
  7. #include <dt-bindings/gpio/meson-g12a-gpio.h>
  8. #include <dt-bindings/sound/meson-g12a-tohdmitx.h>
  9. / {
  10. compatible = "radxa,zero", "amlogic,g12a";
  11. model = "Radxa Zero";
  12. aliases {
  13. serial0 = &uart_AO;
  14. };
  15. chosen {
  16. stdout-path = "serial0:115200n8";
  17. };
  18. memory@0 {
  19. device_type = "memory";
  20. reg = <0x0 0x0 0x0 0x40000000>;
  21. };
  22. cvbs-connector {
  23. status = "disabled";
  24. compatible = "composite-video-connector";
  25. port {
  26. cvbs_connector_in: endpoint {
  27. remote-endpoint = <&cvbs_vdac_out>;
  28. };
  29. };
  30. };
  31. hdmi-connector {
  32. compatible = "hdmi-connector";
  33. type = "a";
  34. port {
  35. hdmi_connector_in: endpoint {
  36. remote-endpoint = <&hdmi_tx_tmds_out>;
  37. };
  38. };
  39. };
  40. emmc_pwrseq: emmc-pwrseq {
  41. compatible = "mmc-pwrseq-emmc";
  42. reset-gpios = <&gpio BOOT_12 GPIO_ACTIVE_LOW>;
  43. };
  44. sdio_pwrseq: sdio-pwrseq {
  45. compatible = "mmc-pwrseq-simple";
  46. reset-gpios = <&gpio GPIOX_6 GPIO_ACTIVE_LOW>;
  47. clocks = <&wifi32k>;
  48. clock-names = "ext_clock";
  49. };
  50. ao_5v: regulator-ao_5v {
  51. compatible = "regulator-fixed";
  52. regulator-name = "AO_5V";
  53. regulator-min-microvolt = <5000000>;
  54. regulator-max-microvolt = <5000000>;
  55. regulator-always-on;
  56. };
  57. vcc_1v8: regulator-vcc_1v8 {
  58. compatible = "regulator-fixed";
  59. regulator-name = "VCC_1V8";
  60. regulator-min-microvolt = <1800000>;
  61. regulator-max-microvolt = <1800000>;
  62. vin-supply = <&vcc_3v3>;
  63. regulator-always-on;
  64. };
  65. vcc_3v3: regulator-vcc_3v3 {
  66. compatible = "regulator-fixed";
  67. regulator-name = "VCC_3V3";
  68. regulator-min-microvolt = <3300000>;
  69. regulator-max-microvolt = <3300000>;
  70. vin-supply = <&vddao_3v3>;
  71. regulator-always-on;
  72. };
  73. hdmi_pw: regulator-hdmi_pw {
  74. compatible = "regulator-fixed";
  75. regulator-name = "HDMI_PW";
  76. regulator-min-microvolt = <5000000>;
  77. regulator-max-microvolt = <5000000>;
  78. vin-supply = <&ao_5v>;
  79. regulator-always-on;
  80. };
  81. vddao_1v8: regulator-vddao_1v8 {
  82. compatible = "regulator-fixed";
  83. regulator-name = "VDDAO_1V8";
  84. regulator-min-microvolt = <1800000>;
  85. regulator-max-microvolt = <1800000>;
  86. vin-supply = <&vddao_3v3>;
  87. regulator-always-on;
  88. };
  89. vddao_3v3: regulator-vddao_3v3 {
  90. compatible = "regulator-fixed";
  91. regulator-name = "VDDAO_3V3";
  92. regulator-min-microvolt = <3300000>;
  93. regulator-max-microvolt = <3300000>;
  94. vin-supply = <&ao_5v>;
  95. regulator-always-on;
  96. };
  97. vddcpu: regulator-vddcpu {
  98. compatible = "pwm-regulator";
  99. regulator-name = "VDDCPU";
  100. regulator-min-microvolt = <721000>;
  101. regulator-max-microvolt = <1022000>;
  102. vin-supply = <&ao_5v>;
  103. pwms = <&pwm_AO_cd 1 1250 0>;
  104. pwm-dutycycle-range = <100 0>;
  105. regulator-boot-on;
  106. regulator-always-on;
  107. };
  108. sound {
  109. compatible = "amlogic,axg-sound-card";
  110. model = "RADXA-ZERO";
  111. audio-aux-devs = <&tdmout_b>;
  112. audio-routing = "TDMOUT_B IN 0", "FRDDR_A OUT 1",
  113. "TDMOUT_B IN 1", "FRDDR_B OUT 1",
  114. "TDMOUT_B IN 2", "FRDDR_C OUT 1",
  115. "TDM_B Playback", "TDMOUT_B OUT";
  116. assigned-clocks = <&clkc CLKID_MPLL2>,
  117. <&clkc CLKID_MPLL0>,
  118. <&clkc CLKID_MPLL1>;
  119. assigned-clock-parents = <0>, <0>, <0>;
  120. assigned-clock-rates = <294912000>,
  121. <270950400>,
  122. <393216000>;
  123. status = "okay";
  124. dai-link-0 {
  125. sound-dai = <&frddr_a>;
  126. };
  127. dai-link-1 {
  128. sound-dai = <&frddr_b>;
  129. };
  130. dai-link-2 {
  131. sound-dai = <&frddr_c>;
  132. };
  133. /* 8ch hdmi interface */
  134. dai-link-3 {
  135. sound-dai = <&tdmif_b>;
  136. dai-format = "i2s";
  137. dai-tdm-slot-tx-mask-0 = <1 1>;
  138. dai-tdm-slot-tx-mask-1 = <1 1>;
  139. dai-tdm-slot-tx-mask-2 = <1 1>;
  140. dai-tdm-slot-tx-mask-3 = <1 1>;
  141. mclk-fs = <256>;
  142. codec {
  143. sound-dai = <&tohdmitx TOHDMITX_I2S_IN_B>;
  144. };
  145. };
  146. dai-link-4 {
  147. sound-dai = <&tohdmitx TOHDMITX_I2S_OUT>;
  148. codec {
  149. sound-dai = <&hdmi_tx>;
  150. };
  151. };
  152. };
  153. wifi32k: wifi32k {
  154. compatible = "pwm-clock";
  155. #clock-cells = <0>;
  156. clock-frequency = <32768>;
  157. pwms = <&pwm_ef 0 30518 0>; /* PWM_E at 32.768KHz */
  158. };
  159. };
  160. &arb {
  161. status = "okay";
  162. };
  163. &cec_AO {
  164. pinctrl-0 = <&cec_ao_a_h_pins>;
  165. pinctrl-names = "default";
  166. status = "disabled";
  167. hdmi-phandle = <&hdmi_tx>;
  168. };
  169. &cecb_AO {
  170. pinctrl-0 = <&cec_ao_b_h_pins>;
  171. pinctrl-names = "default";
  172. status = "okay";
  173. hdmi-phandle = <&hdmi_tx>;
  174. };
  175. &clkc_audio {
  176. status = "okay";
  177. };
  178. &cpu0 {
  179. cpu-supply = <&vddcpu>;
  180. operating-points-v2 = <&cpu_opp_table>;
  181. clocks = <&clkc CLKID_CPU_CLK>;
  182. clock-latency = <50000>;
  183. };
  184. &cpu1 {
  185. cpu-supply = <&vddcpu>;
  186. operating-points-v2 = <&cpu_opp_table>;
  187. clocks = <&clkc CLKID_CPU_CLK>;
  188. clock-latency = <50000>;
  189. };
  190. &cpu2 {
  191. cpu-supply = <&vddcpu>;
  192. operating-points-v2 = <&cpu_opp_table>;
  193. clocks = <&clkc CLKID_CPU_CLK>;
  194. clock-latency = <50000>;
  195. };
  196. &cpu3 {
  197. cpu-supply = <&vddcpu>;
  198. operating-points-v2 = <&cpu_opp_table>;
  199. clocks = <&clkc CLKID_CPU_CLK>;
  200. clock-latency = <50000>;
  201. };
  202. &cvbs_vdac_port {
  203. cvbs_vdac_out: endpoint {
  204. remote-endpoint = <&cvbs_connector_in>;
  205. };
  206. };
  207. &frddr_a {
  208. status = "okay";
  209. };
  210. &frddr_b {
  211. status = "okay";
  212. };
  213. &frddr_c {
  214. status = "okay";
  215. };
  216. &hdmi_tx {
  217. status = "okay";
  218. pinctrl-0 = <&hdmitx_hpd_pins>, <&hdmitx_ddc_pins>;
  219. pinctrl-names = "default";
  220. hdmi-supply = <&hdmi_pw>;
  221. };
  222. &hdmi_tx_tmds_port {
  223. hdmi_tx_tmds_out: endpoint {
  224. remote-endpoint = <&hdmi_connector_in>;
  225. };
  226. };
  227. &ir {
  228. status = "disabled";
  229. pinctrl-0 = <&remote_input_ao_pins>;
  230. pinctrl-names = "default";
  231. };
  232. &pwm_AO_cd {
  233. pinctrl-0 = <&pwm_ao_d_e_pins>;
  234. pinctrl-names = "default";
  235. clocks = <&xtal>;
  236. clock-names = "clkin1";
  237. status = "okay";
  238. };
  239. &pwm_ef {
  240. status = "okay";
  241. pinctrl-0 = <&pwm_e_pins>;
  242. pinctrl-names = "default";
  243. clocks = <&xtal>;
  244. clock-names = "clkin0";
  245. };
  246. &saradc {
  247. status = "okay";
  248. vref-supply = <&vddao_1v8>;
  249. };
  250. /* SDIO */
  251. &sd_emmc_a {
  252. status = "okay";
  253. pinctrl-0 = <&sdio_pins>;
  254. pinctrl-1 = <&sdio_clk_gate_pins>;
  255. pinctrl-names = "default", "clk-gate";
  256. #address-cells = <1>;
  257. #size-cells = <0>;
  258. bus-width = <4>;
  259. cap-sd-highspeed;
  260. sd-uhs-sdr50;
  261. max-frequency = <100000000>;
  262. non-removable;
  263. disable-wp;
  264. /* WiFi firmware requires power to be kept while in suspend */
  265. keep-power-in-suspend;
  266. mmc-pwrseq = <&sdio_pwrseq>;
  267. vmmc-supply = <&vddao_3v3>;
  268. vqmmc-supply = <&vddao_1v8>;
  269. brcmf: wifi@1 {
  270. reg = <1>;
  271. compatible = "brcm,bcm4329-fmac";
  272. };
  273. };
  274. /* SD card */
  275. &sd_emmc_b {
  276. status = "okay";
  277. pinctrl-0 = <&sdcard_c_pins>;
  278. pinctrl-1 = <&sdcard_clk_gate_c_pins>;
  279. pinctrl-names = "default", "clk-gate";
  280. bus-width = <4>;
  281. cap-sd-highspeed;
  282. max-frequency = <100000000>;
  283. disable-wp;
  284. cd-gpios = <&gpio GPIOC_6 GPIO_ACTIVE_LOW>;
  285. vmmc-supply = <&vddao_3v3>;
  286. vqmmc-supply = <&vddao_3v3>;
  287. };
  288. /* eMMC */
  289. &sd_emmc_c {
  290. status = "okay";
  291. pinctrl-0 = <&emmc_ctrl_pins>, <&emmc_data_8b_pins>, <&emmc_ds_pins>;
  292. pinctrl-1 = <&emmc_clk_gate_pins>;
  293. pinctrl-names = "default", "clk-gate";
  294. bus-width = <8>;
  295. cap-mmc-highspeed;
  296. mmc-ddr-1_8v;
  297. mmc-hs200-1_8v;
  298. max-frequency = <200000000>;
  299. disable-wp;
  300. mmc-pwrseq = <&emmc_pwrseq>;
  301. vmmc-supply = <&vcc_3v3>;
  302. vqmmc-supply = <&vcc_1v8>;
  303. };
  304. &tdmif_b {
  305. status = "okay";
  306. };
  307. &tdmout_b {
  308. status = "okay";
  309. };
  310. &tohdmitx {
  311. status = "okay";
  312. };
  313. &uart_A {
  314. status = "okay";
  315. pinctrl-0 = <&uart_a_pins>, <&uart_a_cts_rts_pins>;
  316. pinctrl-names = "default";
  317. uart-has-rtscts;
  318. bluetooth {
  319. compatible = "brcm,bcm43438-bt";
  320. shutdown-gpios = <&gpio GPIOX_17 GPIO_ACTIVE_HIGH>;
  321. max-speed = <2000000>;
  322. clocks = <&wifi32k>;
  323. clock-names = "lpo";
  324. };
  325. };
  326. &uart_AO {
  327. status = "okay";
  328. pinctrl-0 = <&uart_ao_a_pins>;
  329. pinctrl-names = "default";
  330. };
  331. &usb {
  332. status = "okay";
  333. };