sun50i-a64-bananapi-m64.dts 7.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350
  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. hdmi-connector {
  57. compatible = "hdmi-connector";
  58. type = "a";
  59. port {
  60. hdmi_con_in: endpoint {
  61. remote-endpoint = <&hdmi_out_con>;
  62. };
  63. };
  64. };
  65. leds {
  66. compatible = "gpio-leds";
  67. pwr-led {
  68. label = "bananapi-m64:red:pwr";
  69. gpios = <&pio 3 24 GPIO_ACTIVE_HIGH>; /* PD24 */
  70. default-state = "on";
  71. };
  72. green {
  73. label = "bananapi-m64:green:user";
  74. gpios = <&pio 4 14 GPIO_ACTIVE_HIGH>; /* PE14 */
  75. };
  76. blue {
  77. label = "bananapi-m64:blue:user";
  78. gpios = <&pio 4 15 GPIO_ACTIVE_HIGH>; /* PE15 */
  79. };
  80. };
  81. wifi_pwrseq: wifi_pwrseq {
  82. compatible = "mmc-pwrseq-simple";
  83. reset-gpios = <&r_pio 0 2 GPIO_ACTIVE_LOW>; /* PL2 */
  84. };
  85. };
  86. &de {
  87. status = "okay";
  88. };
  89. &ehci0 {
  90. status = "okay";
  91. };
  92. &ehci1 {
  93. status = "okay";
  94. };
  95. &emac {
  96. pinctrl-names = "default";
  97. pinctrl-0 = <&rgmii_pins>;
  98. phy-mode = "rgmii";
  99. phy-handle = <&ext_rgmii_phy>;
  100. phy-supply = <&reg_dc1sw>;
  101. status = "okay";
  102. };
  103. &hdmi {
  104. hvcc-supply = <&reg_dldo1>;
  105. status = "okay";
  106. };
  107. &hdmi_out {
  108. hdmi_out_con: endpoint {
  109. remote-endpoint = <&hdmi_con_in>;
  110. };
  111. };
  112. &i2c1 {
  113. pinctrl-names = "default";
  114. pinctrl-0 = <&i2c1_pins>;
  115. status = "okay";
  116. };
  117. &i2c1_pins {
  118. bias-pull-up;
  119. };
  120. &mdio {
  121. ext_rgmii_phy: ethernet-phy@1 {
  122. compatible = "ethernet-phy-ieee802.3-c22";
  123. reg = <1>;
  124. };
  125. };
  126. &mmc0 {
  127. pinctrl-names = "default";
  128. pinctrl-0 = <&mmc0_pins>;
  129. vmmc-supply = <&reg_dcdc1>;
  130. cd-gpios = <&pio 5 6 GPIO_ACTIVE_LOW>;
  131. disable-wp;
  132. bus-width = <4>;
  133. status = "okay";
  134. };
  135. &mmc1 {
  136. pinctrl-names = "default";
  137. pinctrl-0 = <&mmc1_pins>;
  138. vmmc-supply = <&reg_dldo2>;
  139. vqmmc-supply = <&reg_dldo4>;
  140. mmc-pwrseq = <&wifi_pwrseq>;
  141. bus-width = <4>;
  142. non-removable;
  143. status = "okay";
  144. brcmf: wifi@1 {
  145. reg = <1>;
  146. compatible = "brcm,bcm4329-fmac";
  147. interrupt-parent = <&r_pio>;
  148. interrupts = <0 3 IRQ_TYPE_LEVEL_LOW>; /* PL3 */
  149. interrupt-names = "host-wake";
  150. };
  151. };
  152. &mmc2 {
  153. pinctrl-names = "default";
  154. pinctrl-0 = <&mmc2_pins>, <&mmc2_ds_pin>;
  155. vmmc-supply = <&reg_dcdc1>;
  156. bus-width = <8>;
  157. non-removable;
  158. cap-mmc-hw-reset;
  159. status = "okay";
  160. };
  161. &ohci0 {
  162. status = "okay";
  163. };
  164. &ohci1 {
  165. status = "okay";
  166. };
  167. &r_rsb {
  168. status = "okay";
  169. axp803: pmic@3a3 {
  170. compatible = "x-powers,axp803";
  171. reg = <0x3a3>;
  172. interrupt-parent = <&r_intc>;
  173. interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
  174. x-powers,drive-vbus-en; /* set N_VBUSEN as output pin */
  175. };
  176. };
  177. #include "axp803.dtsi"
  178. &reg_aldo1 {
  179. /*
  180. * This regulator also drives the PE pingroup GPIOs,
  181. * which also controls two LEDs.
  182. */
  183. regulator-always-on;
  184. regulator-min-microvolt = <2800000>;
  185. regulator-max-microvolt = <2800000>;
  186. regulator-name = "afvcc-csi";
  187. };
  188. &reg_aldo2 {
  189. regulator-always-on;
  190. regulator-min-microvolt = <1800000>;
  191. regulator-max-microvolt = <3300000>;
  192. regulator-name = "vcc-pl";
  193. };
  194. &reg_aldo3 {
  195. regulator-always-on;
  196. regulator-min-microvolt = <3000000>;
  197. regulator-max-microvolt = <3000000>;
  198. regulator-name = "vcc-pll-avcc";
  199. };
  200. &reg_dc1sw {
  201. /*
  202. * This regulator also indirectly drives the PD pingroup GPIOs,
  203. * which also controls the power LED.
  204. */
  205. regulator-always-on;
  206. regulator-name = "vcc-phy";
  207. };
  208. &reg_dcdc1 {
  209. regulator-always-on;
  210. regulator-min-microvolt = <3300000>;
  211. regulator-max-microvolt = <3300000>;
  212. regulator-name = "vcc-3v3";
  213. };
  214. &reg_dcdc2 {
  215. regulator-always-on;
  216. regulator-min-microvolt = <1040000>;
  217. regulator-max-microvolt = <1300000>;
  218. regulator-name = "vdd-cpux";
  219. };
  220. /* DCDC3 is polyphased with DCDC2 */
  221. &reg_dcdc5 {
  222. regulator-always-on;
  223. regulator-min-microvolt = <1500000>;
  224. regulator-max-microvolt = <1500000>;
  225. regulator-name = "vcc-dram";
  226. };
  227. &reg_dcdc6 {
  228. regulator-always-on;
  229. regulator-min-microvolt = <1100000>;
  230. regulator-max-microvolt = <1100000>;
  231. regulator-name = "vdd-sys";
  232. };
  233. &reg_dldo1 {
  234. regulator-min-microvolt = <3300000>;
  235. regulator-max-microvolt = <3300000>;
  236. regulator-name = "vcc-hdmi-dsi";
  237. };
  238. &reg_dldo2 {
  239. regulator-min-microvolt = <3300000>;
  240. regulator-max-microvolt = <3300000>;
  241. regulator-name = "vcc-wifi";
  242. };
  243. &reg_dldo4 {
  244. regulator-min-microvolt = <1800000>;
  245. regulator-max-microvolt = <3300000>;
  246. regulator-name = "vcc-wifi-io";
  247. };
  248. &reg_drivevbus {
  249. regulator-name = "usb0-vbus";
  250. status = "okay";
  251. };
  252. &reg_eldo1 {
  253. regulator-min-microvolt = <1800000>;
  254. regulator-max-microvolt = <1800000>;
  255. regulator-name = "cpvdd";
  256. };
  257. &reg_fldo1 {
  258. regulator-min-microvolt = <1200000>;
  259. regulator-max-microvolt = <1200000>;
  260. regulator-name = "vcc-1v2-hsic";
  261. };
  262. /*
  263. * The A64 chip cannot work without this regulator off, although
  264. * it seems to be only driving the AR100 core.
  265. * Maybe we don't still know well about CPUs domain.
  266. */
  267. &reg_fldo2 {
  268. regulator-always-on;
  269. regulator-min-microvolt = <1100000>;
  270. regulator-max-microvolt = <1100000>;
  271. regulator-name = "vdd-cpus";
  272. };
  273. &reg_rtc_ldo {
  274. regulator-name = "vcc-rtc";
  275. };
  276. &simplefb_hdmi {
  277. vcc-hdmi-supply = <&reg_dldo1>;
  278. };
  279. &uart0 {
  280. pinctrl-names = "default";
  281. pinctrl-0 = <&uart0_pb_pins>;
  282. status = "okay";
  283. };
  284. &uart1 {
  285. pinctrl-names = "default";
  286. pinctrl-0 = <&uart1_pins>, <&uart1_rts_cts_pins>;
  287. status = "okay";
  288. };
  289. &usb_otg {
  290. dr_mode = "otg";
  291. status = "okay";
  292. };
  293. &usbphy {
  294. usb0_id_det-gpios = <&pio 7 9 GPIO_ACTIVE_HIGH>; /* PH9 */
  295. usb0_vbus-supply = <&reg_drivevbus>;
  296. status = "okay";
  297. };