sun50i-a64-pine64.dts 6.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283
  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 = "Pine64";
  47. compatible = "pine64,pine64", "allwinner,sun50i-a64";
  48. aliases {
  49. ethernet0 = &emac;
  50. serial0 = &uart0;
  51. serial1 = &uart1;
  52. serial2 = &uart2;
  53. serial3 = &uart3;
  54. serial4 = &uart4;
  55. };
  56. chosen {
  57. stdout-path = "serial0:115200n8";
  58. };
  59. };
  60. &ehci0 {
  61. status = "okay";
  62. };
  63. &ehci1 {
  64. status = "okay";
  65. };
  66. &emac {
  67. pinctrl-names = "default";
  68. pinctrl-0 = <&rmii_pins>;
  69. phy-mode = "rmii";
  70. phy-handle = <&ext_rmii_phy1>;
  71. phy-supply = <&reg_dc1sw>;
  72. status = "okay";
  73. };
  74. &i2c1 {
  75. pinctrl-names = "default";
  76. pinctrl-0 = <&i2c1_pins>;
  77. status = "okay";
  78. };
  79. &i2c1_pins {
  80. bias-pull-up;
  81. };
  82. &mdio {
  83. ext_rmii_phy1: ethernet-phy@1 {
  84. compatible = "ethernet-phy-ieee802.3-c22";
  85. reg = <1>;
  86. };
  87. };
  88. &mmc0 {
  89. pinctrl-names = "default";
  90. pinctrl-0 = <&mmc0_pins>;
  91. vmmc-supply = <&reg_dcdc1>;
  92. cd-gpios = <&pio 5 6 GPIO_ACTIVE_LOW>;
  93. disable-wp;
  94. bus-width = <4>;
  95. status = "okay";
  96. };
  97. &ohci0 {
  98. status = "okay";
  99. };
  100. &ohci1 {
  101. status = "okay";
  102. };
  103. &r_rsb {
  104. status = "okay";
  105. axp803: pmic@3a3 {
  106. compatible = "x-powers,axp803";
  107. reg = <0x3a3>;
  108. interrupt-parent = <&r_intc>;
  109. interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
  110. };
  111. };
  112. #include "axp803.dtsi"
  113. &reg_aldo2 {
  114. regulator-always-on;
  115. regulator-min-microvolt = <1800000>;
  116. regulator-max-microvolt = <3300000>;
  117. regulator-name = "vcc-pl";
  118. };
  119. &reg_aldo3 {
  120. regulator-always-on;
  121. regulator-min-microvolt = <3000000>;
  122. regulator-max-microvolt = <3000000>;
  123. regulator-name = "vcc-pll-avcc";
  124. };
  125. &reg_dc1sw {
  126. regulator-name = "vcc-phy";
  127. };
  128. &reg_dcdc1 {
  129. regulator-always-on;
  130. regulator-min-microvolt = <3300000>;
  131. regulator-max-microvolt = <3300000>;
  132. regulator-name = "vcc-3v3";
  133. };
  134. &reg_dcdc2 {
  135. regulator-always-on;
  136. regulator-min-microvolt = <1040000>;
  137. regulator-max-microvolt = <1300000>;
  138. regulator-name = "vdd-cpux";
  139. };
  140. /* DCDC3 is polyphased with DCDC2 */
  141. /*
  142. * The DRAM chips used by Pine64 boards are DDR3L-compatible, so they can
  143. * work at 1.35V with less power consumption.
  144. * As AXP803 DCDC5 cannot reach 1.35V accurately, use 1.36V instead.
  145. */
  146. &reg_dcdc5 {
  147. regulator-always-on;
  148. regulator-min-microvolt = <1360000>;
  149. regulator-max-microvolt = <1360000>;
  150. regulator-name = "vcc-dram";
  151. };
  152. &reg_dcdc6 {
  153. regulator-always-on;
  154. regulator-min-microvolt = <1100000>;
  155. regulator-max-microvolt = <1100000>;
  156. regulator-name = "vdd-sys";
  157. };
  158. &reg_dldo1 {
  159. regulator-min-microvolt = <3300000>;
  160. regulator-max-microvolt = <3300000>;
  161. regulator-name = "vcc-hdmi";
  162. };
  163. &reg_dldo2 {
  164. regulator-min-microvolt = <3300000>;
  165. regulator-max-microvolt = <3300000>;
  166. regulator-name = "vcc-mipi";
  167. };
  168. &reg_dldo4 {
  169. regulator-min-microvolt = <3300000>;
  170. regulator-max-microvolt = <3300000>;
  171. regulator-name = "vcc-wifi";
  172. };
  173. &reg_eldo1 {
  174. regulator-min-microvolt = <1800000>;
  175. regulator-max-microvolt = <1800000>;
  176. regulator-name = "cpvdd";
  177. };
  178. &reg_fldo1 {
  179. regulator-min-microvolt = <1200000>;
  180. regulator-max-microvolt = <1200000>;
  181. regulator-name = "vcc-1v2-hsic";
  182. };
  183. /*
  184. * The A64 chip cannot work without this regulator off, although
  185. * it seems to be only driving the AR100 core.
  186. * Maybe we don't still know well about CPUs domain.
  187. */
  188. &reg_fldo2 {
  189. regulator-always-on;
  190. regulator-min-microvolt = <1100000>;
  191. regulator-max-microvolt = <1100000>;
  192. regulator-name = "vdd-cpus";
  193. };
  194. &reg_rtc_ldo {
  195. regulator-name = "vcc-rtc";
  196. };
  197. &simplefb_hdmi {
  198. vcc-hdmi-supply = <&reg_dldo1>;
  199. };
  200. /* On Euler connector */
  201. &spdif {
  202. status = "disabled";
  203. };
  204. /* On Exp and Euler connectors */
  205. &uart0 {
  206. pinctrl-names = "default";
  207. pinctrl-0 = <&uart0_pins_a>;
  208. status = "okay";
  209. };
  210. /* On Wifi/BT connector, with RTS/CTS */
  211. &uart1 {
  212. pinctrl-names = "default";
  213. pinctrl-0 = <&uart1_pins>, <&uart1_rts_cts_pins>;
  214. status = "disabled";
  215. };
  216. /* On Pi-2 connector */
  217. &uart2 {
  218. pinctrl-names = "default";
  219. pinctrl-0 = <&uart2_pins>;
  220. status = "disabled";
  221. };
  222. /* On Euler connector */
  223. &uart3 {
  224. pinctrl-names = "default";
  225. pinctrl-0 = <&uart3_pins>;
  226. status = "disabled";
  227. };
  228. /* On Euler connector, RTS/CTS optional */
  229. &uart4 {
  230. pinctrl-names = "default";
  231. pinctrl-0 = <&uart4_pins>;
  232. status = "disabled";
  233. };
  234. &usb_otg {
  235. dr_mode = "host";
  236. status = "okay";
  237. };
  238. &usbphy {
  239. status = "okay";
  240. };