sun50i-a64-bananapi-m64.dts 7.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325
  1. /*
  2. * Copyright (c) 2016 ARM Ltd.
  3. *
  4. * This file is dual-licensed: you can use it either under the terms
  5. * of the GPL or the X11 license, at your option. Note that this dual
  6. * licensing only applies to this file, and not this project as a
  7. * whole.
  8. *
  9. * a) This library is free software; you can redistribute it and/or
  10. * modify it under the terms of the GNU General Public License as
  11. * published by the Free Software Foundation; either version 2 of the
  12. * License, or (at your option) any later version.
  13. *
  14. * This library is distributed in the hope that it will be useful,
  15. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  16. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  17. * GNU General Public License for more details.
  18. *
  19. * Or, alternatively,
  20. *
  21. * b) Permission is hereby granted, free of charge, to any person
  22. * obtaining a copy of this software and associated documentation
  23. * files (the "Software"), to deal in the Software without
  24. * restriction, including without limitation the rights to use,
  25. * copy, modify, merge, publish, distribute, sublicense, and/or
  26. * sell copies of the Software, and to permit persons to whom the
  27. * Software is furnished to do so, subject to the following
  28. * conditions:
  29. *
  30. * The above copyright notice and this permission notice shall be
  31. * included in all copies or substantial portions of the Software.
  32. *
  33. * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
  34. * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
  35. * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
  36. * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
  37. * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
  38. * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
  39. * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
  40. * OTHER DEALINGS IN THE SOFTWARE.
  41. */
  42. /dts-v1/;
  43. #include "sun50i-a64.dtsi"
  44. #include <dt-bindings/gpio/gpio.h>
  45. / {
  46. model = "BananaPi-M64";
  47. compatible = "sinovoip,bananapi-m64", "allwinner,sun50i-a64";
  48. aliases {
  49. ethernet0 = &emac;
  50. serial0 = &uart0;
  51. serial1 = &uart1;
  52. };
  53. chosen {
  54. stdout-path = "serial0:115200n8";
  55. };
  56. leds {
  57. compatible = "gpio-leds";
  58. pwr-led {
  59. label = "bananapi-m64:red:pwr";
  60. gpios = <&pio 3 24 GPIO_ACTIVE_HIGH>; /* PD24 */
  61. default-state = "on";
  62. };
  63. green {
  64. label = "bananapi-m64:green:user";
  65. gpios = <&pio 4 14 GPIO_ACTIVE_HIGH>; /* PE14 */
  66. };
  67. blue {
  68. label = "bananapi-m64:blue:user";
  69. gpios = <&pio 4 15 GPIO_ACTIVE_HIGH>; /* PE15 */
  70. };
  71. };
  72. wifi_pwrseq: wifi_pwrseq {
  73. compatible = "mmc-pwrseq-simple";
  74. reset-gpios = <&r_pio 0 2 GPIO_ACTIVE_LOW>; /* PL2 */
  75. };
  76. };
  77. &ehci0 {
  78. status = "okay";
  79. };
  80. &ehci1 {
  81. status = "okay";
  82. };
  83. &emac {
  84. pinctrl-names = "default";
  85. pinctrl-0 = <&rgmii_pins>;
  86. phy-mode = "rgmii";
  87. phy-handle = <&ext_rgmii_phy>;
  88. phy-supply = <&reg_dc1sw>;
  89. status = "okay";
  90. };
  91. &i2c1 {
  92. pinctrl-names = "default";
  93. pinctrl-0 = <&i2c1_pins>;
  94. status = "okay";
  95. };
  96. &i2c1_pins {
  97. bias-pull-up;
  98. };
  99. &mdio {
  100. ext_rgmii_phy: ethernet-phy@1 {
  101. compatible = "ethernet-phy-ieee802.3-c22";
  102. reg = <1>;
  103. };
  104. };
  105. &mmc0 {
  106. pinctrl-names = "default";
  107. pinctrl-0 = <&mmc0_pins>;
  108. vmmc-supply = <&reg_dcdc1>;
  109. cd-gpios = <&pio 5 6 GPIO_ACTIVE_LOW>;
  110. disable-wp;
  111. bus-width = <4>;
  112. status = "okay";
  113. };
  114. &mmc1 {
  115. pinctrl-names = "default";
  116. pinctrl-0 = <&mmc1_pins>;
  117. vmmc-supply = <&reg_dldo2>;
  118. vqmmc-supply = <&reg_dldo4>;
  119. mmc-pwrseq = <&wifi_pwrseq>;
  120. bus-width = <4>;
  121. non-removable;
  122. status = "okay";
  123. brcmf: wifi@1 {
  124. reg = <1>;
  125. compatible = "brcm,bcm4329-fmac";
  126. interrupt-parent = <&r_pio>;
  127. interrupts = <0 3 IRQ_TYPE_LEVEL_LOW>; /* PL3 */
  128. interrupt-names = "host-wake";
  129. };
  130. };
  131. &mmc2 {
  132. pinctrl-names = "default";
  133. pinctrl-0 = <&mmc2_pins>;
  134. vmmc-supply = <&reg_dcdc1>;
  135. bus-width = <8>;
  136. non-removable;
  137. cap-mmc-hw-reset;
  138. status = "okay";
  139. };
  140. &ohci0 {
  141. status = "okay";
  142. };
  143. &ohci1 {
  144. status = "okay";
  145. };
  146. &r_rsb {
  147. status = "okay";
  148. axp803: pmic@3a3 {
  149. compatible = "x-powers,axp803";
  150. reg = <0x3a3>;
  151. interrupt-parent = <&r_intc>;
  152. interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
  153. x-powers,drive-vbus-en; /* set N_VBUSEN as output pin */
  154. };
  155. };
  156. #include "axp803.dtsi"
  157. &reg_aldo1 {
  158. /*
  159. * This regulator also drives the PE pingroup GPIOs,
  160. * which also controls two LEDs.
  161. */
  162. regulator-always-on;
  163. regulator-min-microvolt = <2800000>;
  164. regulator-max-microvolt = <2800000>;
  165. regulator-name = "afvcc-csi";
  166. };
  167. &reg_aldo2 {
  168. regulator-always-on;
  169. regulator-min-microvolt = <1800000>;
  170. regulator-max-microvolt = <3300000>;
  171. regulator-name = "vcc-pl";
  172. };
  173. &reg_aldo3 {
  174. regulator-always-on;
  175. regulator-min-microvolt = <3000000>;
  176. regulator-max-microvolt = <3000000>;
  177. regulator-name = "vcc-pll-avcc";
  178. };
  179. &reg_dc1sw {
  180. /*
  181. * This regulator also indirectly drives the PD pingroup GPIOs,
  182. * which also controls the power LED.
  183. */
  184. regulator-always-on;
  185. regulator-name = "vcc-phy";
  186. };
  187. &reg_dcdc1 {
  188. regulator-always-on;
  189. regulator-min-microvolt = <3300000>;
  190. regulator-max-microvolt = <3300000>;
  191. regulator-name = "vcc-3v3";
  192. };
  193. &reg_dcdc2 {
  194. regulator-always-on;
  195. regulator-min-microvolt = <1040000>;
  196. regulator-max-microvolt = <1300000>;
  197. regulator-name = "vdd-cpux";
  198. };
  199. /* DCDC3 is polyphased with DCDC2 */
  200. &reg_dcdc5 {
  201. regulator-always-on;
  202. regulator-min-microvolt = <1500000>;
  203. regulator-max-microvolt = <1500000>;
  204. regulator-name = "vcc-dram";
  205. };
  206. &reg_dcdc6 {
  207. regulator-always-on;
  208. regulator-min-microvolt = <1100000>;
  209. regulator-max-microvolt = <1100000>;
  210. regulator-name = "vdd-sys";
  211. };
  212. &reg_dldo1 {
  213. regulator-min-microvolt = <3300000>;
  214. regulator-max-microvolt = <3300000>;
  215. regulator-name = "vcc-hdmi-dsi";
  216. };
  217. &reg_dldo2 {
  218. regulator-min-microvolt = <3300000>;
  219. regulator-max-microvolt = <3300000>;
  220. regulator-name = "vcc-wifi";
  221. };
  222. &reg_dldo4 {
  223. regulator-min-microvolt = <1800000>;
  224. regulator-max-microvolt = <3300000>;
  225. regulator-name = "vcc-wifi-io";
  226. };
  227. &reg_drivevbus {
  228. regulator-name = "usb0-vbus";
  229. status = "okay";
  230. };
  231. &reg_eldo1 {
  232. regulator-min-microvolt = <1800000>;
  233. regulator-max-microvolt = <1800000>;
  234. regulator-name = "cpvdd";
  235. };
  236. &reg_fldo1 {
  237. regulator-min-microvolt = <1200000>;
  238. regulator-max-microvolt = <1200000>;
  239. regulator-name = "vcc-1v2-hsic";
  240. };
  241. /*
  242. * The A64 chip cannot work without this regulator off, although
  243. * it seems to be only driving the AR100 core.
  244. * Maybe we don't still know well about CPUs domain.
  245. */
  246. &reg_fldo2 {
  247. regulator-always-on;
  248. regulator-min-microvolt = <1100000>;
  249. regulator-max-microvolt = <1100000>;
  250. regulator-name = "vdd-cpus";
  251. };
  252. &reg_rtc_ldo {
  253. regulator-name = "vcc-rtc";
  254. };
  255. &simplefb_hdmi {
  256. vcc-hdmi-supply = <&reg_dldo1>;
  257. };
  258. &uart0 {
  259. pinctrl-names = "default";
  260. pinctrl-0 = <&uart0_pins_a>;
  261. status = "okay";
  262. };
  263. &uart1 {
  264. pinctrl-names = "default";
  265. pinctrl-0 = <&uart1_pins>, <&uart1_rts_cts_pins>;
  266. status = "okay";
  267. };
  268. &usb_otg {
  269. dr_mode = "otg";
  270. status = "okay";
  271. };
  272. &usbphy {
  273. usb0_id_det-gpios = <&pio 7 9 GPIO_ACTIVE_HIGH>; /* PH9 */
  274. usb0_vbus-supply = <&reg_drivevbus>;
  275. status = "okay";
  276. };