vsatv102-m6.dts 7.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310
  1. /*-
  2. * Copyright (c) 2013-2015 John Wehle <john@feith.com>
  3. * All rights reserved.
  4. *
  5. * Redistribution and use in source and binary forms, with or without
  6. * modification, are permitted provided that the following conditions
  7. * are met:
  8. * 1. Redistributions of source code must retain the above copyright
  9. * notice, this list of conditions and the following disclaimer.
  10. * 2. Redistributions in binary form must reproduce the above copyright
  11. * notice, this list of conditions and the following disclaimer in the
  12. * documentation and/or other materials provided with the distribution.
  13. *
  14. * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
  15. * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  16. * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  17. * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
  18. * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  19. * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  20. * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  21. * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  22. * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  23. * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  24. * SUCH DAMAGE.
  25. *
  26. * $FreeBSD$
  27. */
  28. /*
  29. * The ordering of certain devices is significant (e.g. usb depends on
  30. * usb-phy which depends on gpio, also the timer should appear early on
  31. * to provide a reasonably accurate DELAY implementation).
  32. *
  33. * Both usb-phys devices must be configured to prevent the usb controller
  34. * from hanging during initialization.
  35. */
  36. /dts-v1/;
  37. /memreserve/ 0x84900000 0x00600000; /* 6MB frame buffer */
  38. #include "meson6.dtsi"
  39. / {
  40. /*
  41. * My development unit visually appears to be a Visson ATV-102
  42. * and the specs for both my unit and the Visson ATV-102 say
  43. * the SoC is an aml8726-m3. However the uboot prompt says
  44. * m6_mbx_v1, the RTC is located on SECBUS2 instead of AOBUS,
  45. * and there are two cores so it seems my unit is a newer
  46. * version using the later processor.
  47. */
  48. model = "visson,atv-102";
  49. compatible = "visson,atv-102", "amlogic,meson6";
  50. #address-cells = <1>;
  51. #size-cells = <1>;
  52. aliases {
  53. soc = &soc;
  54. screen = &screen;
  55. uart0 = &uart_AO;
  56. };
  57. memory {
  58. device_type = "memory";
  59. reg = <0x80000000 0x40000000>; /* 1GB RAM */
  60. };
  61. soc: soc {
  62. device_type = "soc";
  63. bus-frequency = <0>;
  64. pic: pic@c1109a40 {
  65. device_type = "interrupt-controller";
  66. compatible = "amlogic,aml8726-pic";
  67. reg = <0xc1109a40 128>; /* cbus 0x2690 */
  68. interrupt-controller;
  69. #interrupt-cells = <3>;
  70. };
  71. scu: scu@c4300000 {
  72. compatible = "arm,cortex-a9-scu";
  73. reg = <0xc4300000 0x1000>;
  74. };
  75. cpuconfig: cpuconfig@d901ff80 {
  76. compatible = "amlogic,aml8726-cpuconfig";
  77. reg = <0xd901ff80 8>;
  78. };
  79. ccm@c1104140 {
  80. compatible = "amlogic,aml8726-ccm";
  81. reg = <0xc1104140 20>; /* cbus 0x1050 */
  82. functions = "ethernet", "i2c", "rng", "sdio",
  83. "uart-a", "uart-b", "uart-c",
  84. "usb-a", "usb-b";
  85. };
  86. pinctrl: pinctrl@c11080b0 {
  87. compatible = "amlogic,aml8726-pinctrl";
  88. reg = <0xc11080b0 40>, /* mux */
  89. <0xc11080e8 24>, /* pu/pd */
  90. <0xc11080e8 24>, /* pull enable */
  91. <0xc8100014 4>, /* ao mux */
  92. <0xc810002c 4>, /* ao pu/pd */
  93. <0xc810002c 4>; /* ao pull enable */
  94. /*
  95. * Currently only pin muxing that deviates
  96. * from the power on default of gpio is
  97. * specified here.
  98. */
  99. pinctrl-names = "default";
  100. pinctrl-0 = <&pins_uartao &pins_ethernet &pins_hdmi>;
  101. pins_ethernet: ethernet {
  102. amlogic,pins = "ref_clk_in",
  103. "tx_clk", "tx_en",
  104. "tx_d0", "tx_d1",
  105. "tx_d2", "tx_d3",
  106. "rx_clk", "rx_dv",
  107. "rx_d0", "rx_d1",
  108. "rx_d2", "rx_d3",
  109. "mdc", "mdio";
  110. amlogic,function = "ethernet";
  111. };
  112. pins_hdmi: hdmi {
  113. amlogic,pins = "cec", "hpd",
  114. "scl", "sda";
  115. amlogic,function = "hdmi";
  116. };
  117. pins_sdio_b: sdio_b {
  118. amlogic,pins = "clk", "cmd",
  119. "d0", "d1",
  120. "d2", "d3";
  121. amlogic,function = "sdio-b";
  122. };
  123. pins_uartao: uartao {
  124. amlogic,pins = "tx", "rx";
  125. amlogic,function = "uart-ao";
  126. };
  127. };
  128. rtc@da004340 {
  129. compatible = "amlogic,aml8726-rtc";
  130. reg = <0xda004340 20>; /* secbus2 0xd0 */
  131. interrupts = <0 72 1>; /* AM_IRQ2(8) */
  132. };
  133. clkmsr: clkmsr@c1108758 {
  134. compatible = "amlogic,aml8726-clkmsr";
  135. reg = <0xc1108758 16>; /* cbus 0x21d6 */
  136. clocks = <&clk81>;
  137. };
  138. gpioao: gpio@c8100024 {
  139. /* gpio unit 7 */
  140. compatible = "amlogic,aml8726-gpio";
  141. reg = <0xc8100024 4>, /* oen aobus 0x9 */
  142. <0xc8100024 4>, /* out */
  143. <0xc8100028 4>; /* in */
  144. gpio-controller;
  145. #gpio-cells = <1>;
  146. pin-count = <12>;
  147. };
  148. gpio5: gpio@c110806c {
  149. compatible = "amlogic,aml8726-gpio";
  150. reg = <0xc110806c 4>, /* oen cbus 0x201b */
  151. <0xc1108070 4>, /* out */
  152. <0xc1108074 4>; /* in */
  153. gpio-controller;
  154. #gpio-cells = <1>;
  155. pin-count = <32>;
  156. };
  157. gpio6: gpio@c1108020 {
  158. compatible = "amlogic,aml8726-gpio";
  159. reg = <0xc1108020 4>, /* oen cbus 0x2008 */
  160. <0xc1108024 4>, /* out */
  161. <0xc1108028 4>; /* in */
  162. gpio-controller;
  163. #gpio-cells = <1>;
  164. pin-count = <29>;
  165. };
  166. mmc@c1108c20 {
  167. compatible = "amlogic,aml8726-mmc";
  168. reg = <0xc1108c20 32>; /* cbus 0x2308 */
  169. interrupts = <0 28 1>; /* AM_IRQ0(28) */
  170. clocks = <&clk81>;
  171. pinctrl-names = "default";
  172. pinctrl-0 = <&pins_sdio_b>;
  173. mmc-voltages = "3.3";
  174. mmc-pwr-en = <&gpio5 31 0>; /* card_8 */
  175. ins-detect = <&gpio5 29 0>; /* card_6 */
  176. };
  177. rng@c1108100 {
  178. compatible = "amlogic,aml8726-rng";
  179. reg = <0xc1108100 8>; /* cbus 0x2040 */
  180. };
  181. usb-phy@c1108400 {
  182. /* usb-a phy */
  183. compatible = "amlogic,aml8726-m6-usb-phy";
  184. reg = <0xc1108400 32>; /* cbus 0x2100 */
  185. };
  186. usb-phy@c1108420 {
  187. /* usb-b phy */
  188. compatible = "amlogic,aml8726-m6-usb-phy";
  189. reg = <0xc1108420 32>; /* cbus 0x2108 */
  190. usb-pwr-en = <&gpioao 3 1>, /* gpioao_3 vbus */
  191. <&gpio6 11 0>; /* gpioe_11 wifi */
  192. };
  193. usb@c9040000 {
  194. /* usb-a */
  195. compatible = "synopsys,designware-hs-otg2";
  196. reg = <0xc9040000 0x40000>; /* ahbbus 0x40000*/
  197. interrupts = <0 30 4>; /* AM_IRQ0(30) */
  198. #address-cells = <1>;
  199. #size-cells = <0>;
  200. };
  201. usb@c90c0000 {
  202. /* usb-b */
  203. compatible = "synopsys,designware-hs-otg2";
  204. reg = <0xc90c0000 0x40000>; /* ahbbus 0xc0000 */
  205. interrupts = <0 31 4>; /* AM_IRQ0(31) */
  206. #address-cells = <1>;
  207. #size-cells = <0>;
  208. dr_mode = "host";
  209. };
  210. eth@c9410000 {
  211. /* ethernet */
  212. compatible = "snps,dwmac";
  213. reg = <0xc9410000 0x2000>; /* ahbbus 0x410000 */
  214. interrupts = <0 8 1>; /* AM_IRQ0(8) */
  215. #address-cells = <1>;
  216. #size-cells = <0>;
  217. eth-phy-rst = <&gpio5 15 0>; /* gpioy_15 phy-rst */
  218. };
  219. screen: fb@c8006324 {
  220. device_type = "display";
  221. compatible = "amlogic,aml8726-fb";
  222. reg = <0xc8006324 12>, /* CANVAS */
  223. <0xc1106800 1024>, /* VIU */
  224. <0xc1107400 1024>; /* VPP */
  225. interrupts = <0 2 1>, /* AM_IRQ0(2) */
  226. <0 3 1>, /* AM_IRQ0(3) */
  227. <0 12 1>, /* AM_IRQ0(12) */
  228. <0 13 1>; /* AM_IRQ0(13) */
  229. address = <0x84900000>; /* match memreserve */
  230. width = <720>;
  231. height = <480>;
  232. depth = <24>;
  233. linebytes = <2160>;
  234. };
  235. };
  236. leds {
  237. compatible = "gpio-leds";
  238. sys_led {
  239. gpios = <&gpioao 2>; /* gpioao_2 sys_led */
  240. label = "sys_led";
  241. default-state = "on";
  242. };
  243. };
  244. chosen {
  245. stdin = "uart0";
  246. stdout = "uart0";
  247. };
  248. };
  249. &clk81 {
  250. clock-frequency = <0>;
  251. };
  252. &uart_AO {
  253. status = "okay";
  254. current-speed = <115200>;
  255. };