meson-gxl-s905x-libretech-cc-v2.dts 6.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314
  1. // SPDX-License-Identifier: (GPL-2.0+ OR MIT)
  2. /*
  3. * Copyright (c) 2020 BayLibre, SAS.
  4. * Author: Jerome Brunet <[email protected]>
  5. */
  6. /dts-v1/;
  7. #include <dt-bindings/input/input.h>
  8. #include <dt-bindings/leds/common.h>
  9. #include <dt-bindings/sound/meson-aiu.h>
  10. #include "meson-gxl-s905x.dtsi"
  11. / {
  12. compatible = "libretech,aml-s905x-cc-v2", "amlogic,s905x",
  13. "amlogic,meson-gxl";
  14. model = "Libre Computer AML-S905X-CC V2";
  15. aliases {
  16. serial0 = &uart_AO;
  17. ethernet0 = &ethmac;
  18. spi0 = &spifc;
  19. };
  20. chosen {
  21. stdout-path = "serial0:115200n8";
  22. };
  23. emmc_pwrseq: emmc-pwrseq {
  24. compatible = "mmc-pwrseq-emmc";
  25. reset-gpios = <&gpio BOOT_9 GPIO_ACTIVE_LOW>;
  26. };
  27. hdmi-connector {
  28. compatible = "hdmi-connector";
  29. type = "a";
  30. port {
  31. hdmi_connector_in: endpoint {
  32. remote-endpoint = <&hdmi_tx_tmds_out>;
  33. };
  34. };
  35. };
  36. leds {
  37. compatible = "gpio-leds";
  38. led-blue {
  39. color = <LED_COLOR_ID_BLUE>;
  40. function = LED_FUNCTION_STATUS;
  41. gpios = <&gpio GPIODV_24 GPIO_ACTIVE_HIGH>;
  42. linux,default-trigger = "heartbeat";
  43. panic-indicator;
  44. };
  45. led-green {
  46. color = <LED_COLOR_ID_GREEN>;
  47. function = LED_FUNCTION_DISK_ACTIVITY;
  48. gpios = <&gpio_ao GPIOAO_2 GPIO_ACTIVE_HIGH>;
  49. linux,default-trigger = "disk-activity";
  50. };
  51. };
  52. memory@0 {
  53. device_type = "memory";
  54. reg = <0x0 0x0 0x0 0x80000000>;
  55. };
  56. ao_5v: regulator-ao_5v {
  57. compatible = "regulator-fixed";
  58. regulator-name = "AO_5V";
  59. regulator-min-microvolt = <5000000>;
  60. regulator-max-microvolt = <5000000>;
  61. vin-supply = <&dc_in>;
  62. regulator-always-on;
  63. };
  64. dc_in: regulator-dc_in {
  65. compatible = "regulator-fixed";
  66. regulator-name = "DC_IN";
  67. regulator-min-microvolt = <5000000>;
  68. regulator-max-microvolt = <5000000>;
  69. regulator-always-on;
  70. };
  71. vcck: regulator-vcck {
  72. compatible = "regulator-fixed";
  73. regulator-name = "VCCK";
  74. regulator-min-microvolt = <3300000>;
  75. regulator-max-microvolt = <3300000>;
  76. vin-supply = <&ao_5v>;
  77. regulator-always-on;
  78. };
  79. vcc_card: regulator-vcc_card {
  80. compatible = "regulator-fixed";
  81. regulator-name = "VCC_CARD";
  82. regulator-min-microvolt = <3300000>;
  83. regulator-max-microvolt = <3300000>;
  84. vin-supply = <&vddio_ao3v3>;
  85. gpio = <&gpio GPIOCLK_1 GPIO_ACTIVE_HIGH>;
  86. enable-active-high;
  87. };
  88. vcc5v: regulator-vcc5v {
  89. compatible = "regulator-fixed";
  90. regulator-name = "VCC5V";
  91. regulator-min-microvolt = <5000000>;
  92. regulator-max-microvolt = <5000000>;
  93. vin-supply = <&ao_5v>;
  94. gpio = <&gpio GPIOH_3 GPIO_OPEN_DRAIN>;
  95. };
  96. vddio_ao3v3: regulator-vddio_ao3v3 {
  97. compatible = "regulator-fixed";
  98. regulator-name = "VDDIO_AO3V3";
  99. regulator-min-microvolt = <3300000>;
  100. regulator-max-microvolt = <3300000>;
  101. vin-supply = <&ao_5v>;
  102. regulator-always-on;
  103. };
  104. vddio_card: regulator-vddio-card {
  105. compatible = "regulator-gpio";
  106. regulator-name = "VDDIO_CARD";
  107. regulator-min-microvolt = <1800000>;
  108. regulator-max-microvolt = <3300000>;
  109. gpios = <&gpio_ao GPIOAO_3 GPIO_ACTIVE_HIGH>;
  110. gpios-states = <0>;
  111. states = <3300000 0>,
  112. <1800000 1>;
  113. regulator-settling-time-up-us = <200>;
  114. regulator-settling-time-down-us = <50000>;
  115. };
  116. vddio_ao18: regulator-vddio_ao18 {
  117. compatible = "regulator-fixed";
  118. regulator-name = "VDDIO_AO18";
  119. regulator-min-microvolt = <1800000>;
  120. regulator-max-microvolt = <1800000>;
  121. vin-supply = <&vddio_ao3v3>;
  122. regulator-always-on;
  123. };
  124. vcc_1v8: regulator-vcc_1v8 {
  125. compatible = "regulator-fixed";
  126. regulator-name = "VCC 1V8";
  127. regulator-min-microvolt = <1800000>;
  128. regulator-max-microvolt = <1800000>;
  129. vin-supply = <&vddio_ao3v3>;
  130. regulator-always-on;
  131. };
  132. sound {
  133. compatible = "amlogic,gx-sound-card";
  134. model = "LIBRETECH-CC-V2";
  135. assigned-clocks = <&clkc CLKID_MPLL0>,
  136. <&clkc CLKID_MPLL1>,
  137. <&clkc CLKID_MPLL2>;
  138. assigned-clock-parents = <0>, <0>, <0>;
  139. assigned-clock-rates = <294912000>,
  140. <270950400>,
  141. <393216000>;
  142. status = "okay";
  143. dai-link-0 {
  144. sound-dai = <&aiu AIU_CPU CPU_I2S_FIFO>;
  145. };
  146. dai-link-1 {
  147. sound-dai = <&aiu AIU_CPU CPU_I2S_ENCODER>;
  148. dai-format = "i2s";
  149. mclk-fs = <256>;
  150. codec-0 {
  151. sound-dai = <&aiu AIU_HDMI CTRL_I2S>;
  152. };
  153. };
  154. dai-link-2 {
  155. sound-dai = <&aiu AIU_HDMI CTRL_OUT>;
  156. codec-0 {
  157. sound-dai = <&hdmi_tx>;
  158. };
  159. };
  160. };
  161. };
  162. &aiu {
  163. status = "okay";
  164. };
  165. &cec_AO {
  166. status = "okay";
  167. pinctrl-0 = <&ao_cec_pins>;
  168. pinctrl-names = "default";
  169. hdmi-phandle = <&hdmi_tx>;
  170. };
  171. &ethmac {
  172. status = "okay";
  173. };
  174. &internal_phy {
  175. pinctrl-0 = <&eth_link_led_pins>, <&eth_act_led_pins>;
  176. pinctrl-names = "default";
  177. };
  178. &ir {
  179. status = "okay";
  180. pinctrl-0 = <&remote_input_ao_pins>;
  181. pinctrl-names = "default";
  182. };
  183. &hdmi_tx {
  184. status = "okay";
  185. pinctrl-0 = <&hdmi_hpd_pins>, <&hdmi_i2c_pins>;
  186. hdmi-supply = <&vcc5v>;
  187. pinctrl-names = "default";
  188. };
  189. &hdmi_tx_tmds_port {
  190. hdmi_tx_tmds_out: endpoint {
  191. remote-endpoint = <&hdmi_connector_in>;
  192. };
  193. };
  194. &saradc {
  195. status = "okay";
  196. vref-supply = <&vddio_ao18>;
  197. };
  198. /* SD card */
  199. &sd_emmc_b {
  200. pinctrl-0 = <&sdcard_pins>;
  201. pinctrl-1 = <&sdcard_clk_gate_pins>;
  202. pinctrl-names = "default", "clk-gate";
  203. bus-width = <4>;
  204. cap-sd-highspeed;
  205. sd-uhs-sdr12;
  206. sd-uhs-sdr25;
  207. sd-uhs-sdr50;
  208. sd-uhs-ddr50;
  209. max-frequency = <100000000>;
  210. disable-wp;
  211. cd-gpios = <&gpio CARD_6 GPIO_ACTIVE_LOW>;
  212. vmmc-supply = <&vcc_card>;
  213. vqmmc-supply = <&vddio_card>;
  214. status = "okay";
  215. };
  216. /* eMMC */
  217. &sd_emmc_c {
  218. pinctrl-0 = <&emmc_pins>;
  219. pinctrl-1 = <&emmc_clk_gate_pins>;
  220. pinctrl-names = "default", "clk-gate";
  221. bus-width = <8>;
  222. cap-mmc-highspeed;
  223. mmc-hs200-1_8v;
  224. max-frequency = <200000000>;
  225. disable-wp;
  226. mmc-pwrseq = <&emmc_pwrseq>;
  227. vmmc-supply = <&vddio_ao3v3>;
  228. vqmmc-supply = <&vcc_1v8>;
  229. status = "okay";
  230. };
  231. &spifc {
  232. status = "okay";
  233. pinctrl-0 = <&nor_pins>;
  234. pinctrl-names = "default";
  235. nor_4u1: flash@0 {
  236. #address-cells = <1>;
  237. #size-cells = <1>;
  238. compatible = "jedec,spi-nor";
  239. reg = <0>;
  240. spi-max-frequency = <3000000>;
  241. };
  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 = "host";
  251. };
  252. &usb2_phy0 {
  253. pinctrl-names = "default";
  254. phy-supply = <&vcc5v>;
  255. };
  256. &usb2_phy1 {
  257. phy-supply = <&vcc5v>;
  258. };