sun6i-a31-hummingbird.dts 6.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262
  1. /*
  2. * Copyright 2014 Maxime Ripard
  3. *
  4. * Maxime Ripard <maxime.ripard@free-electrons.com>
  5. *
  6. * This file is dual-licensed: you can use it either under the terms
  7. * of the GPL or the X11 license, at your option. Note that this dual
  8. * licensing only applies to this file, and not this project as a
  9. * whole.
  10. *
  11. * a) This file is free software; you can redistribute it and/or
  12. * modify it under the terms of the GNU General Public License as
  13. * published by the Free Software Foundation; either version 2 of the
  14. * License, or (at your option) any later version.
  15. *
  16. * This file is distributed in the hope that it will be useful,
  17. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  18. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  19. * GNU General Public License for more details.
  20. *
  21. * Or, alternatively,
  22. *
  23. * b) Permission is hereby granted, free of charge, to any person
  24. * obtaining a copy of this software and associated documentation
  25. * files (the "Software"), to deal in the Software without
  26. * restriction, including without limitation the rights to use,
  27. * copy, modify, merge, publish, distribute, sublicense, and/or
  28. * sell copies of the Software, and to permit persons to whom the
  29. * Software is furnished to do so, subject to the following
  30. * conditions:
  31. *
  32. * The above copyright notice and this permission notice shall be
  33. * included in all copies or substantial portions of the Software.
  34. *
  35. * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
  36. * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
  37. * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
  38. * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
  39. * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
  40. * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
  41. * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
  42. * OTHER DEALINGS IN THE SOFTWARE.
  43. */
  44. /dts-v1/;
  45. #include "sun6i-a31.dtsi"
  46. #include "sunxi-common-regulators.dtsi"
  47. #include <dt-bindings/gpio/gpio.h>
  48. #include <dt-bindings/pinctrl/sun4i-a10.h>
  49. / {
  50. model = "Merrii A31 Hummingbird";
  51. compatible = "merrii,a31-hummingbird", "allwinner,sun6i-a31";
  52. aliases {
  53. rtc0 = &pcf8563;
  54. rtc1 = &rtc;
  55. serial0 = &uart0;
  56. };
  57. chosen {
  58. stdout-path = "serial0:115200n8";
  59. };
  60. wifi_pwrseq: wifi_pwrseq {
  61. compatible = "mmc-pwrseq-simple";
  62. reset-gpios = <&pio 6 10 GPIO_ACTIVE_LOW>; /* PG10 */
  63. };
  64. };
  65. &cpu0 {
  66. cpu-supply = <&reg_dcdc3>;
  67. };
  68. &ehci0 {
  69. status = "okay";
  70. };
  71. &gmac {
  72. pinctrl-names = "default";
  73. pinctrl-0 = <&gmac_pins_rgmii_a>, <&gmac_phy_reset_pin_hummingbird>;
  74. phy = <&phy1>;
  75. phy-mode = "rgmii";
  76. snps,reset-gpio = <&pio 0 21 GPIO_ACTIVE_HIGH>;
  77. snps,reset-active-low;
  78. snps,reset-delays-us = <0 10000 30000>;
  79. status = "okay";
  80. phy1: ethernet-phy@1 {
  81. reg = <1>;
  82. };
  83. };
  84. &i2c0 {
  85. pinctrl-names = "default";
  86. pinctrl-0 = <&i2c0_pins_a>;
  87. /* pull-ups and devices require AXP221 DLDO3 */
  88. status = "failed";
  89. };
  90. &i2c1 {
  91. pinctrl-names = "default";
  92. pinctrl-0 = <&i2c1_pins_a>;
  93. status = "okay";
  94. };
  95. &i2c2 {
  96. pinctrl-names = "default";
  97. pinctrl-0 = <&i2c2_pins_a>;
  98. status = "okay";
  99. pcf8563: rtc@51 {
  100. compatible = "nxp,pcf8563";
  101. reg = <0x51>;
  102. };
  103. };
  104. &ir {
  105. pinctrl-names = "default";
  106. pinctrl-0 = <&ir_pins_a>;
  107. status = "okay";
  108. };
  109. &mmc0 {
  110. pinctrl-names = "default";
  111. pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_hummingbird>;
  112. vmmc-supply = <&reg_dcdc1>;
  113. bus-width = <4>;
  114. cd-gpios = <&pio 0 8 GPIO_ACTIVE_HIGH>; /* PA8 */
  115. cd-inverted;
  116. status = "okay";
  117. };
  118. &mmc0_pins_a {
  119. /* external pull-ups missing for some pins */
  120. allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
  121. };
  122. &mmc1 {
  123. pinctrl-names = "default";
  124. pinctrl-0 = <&mmc1_pins_a>, <&wifi_reset_pin_hummingbird>;
  125. vmmc-supply = <&reg_aldo1>;
  126. mmc-pwrseq = <&wifi_pwrseq>;
  127. bus-width = <4>;
  128. non-removable;
  129. status = "okay";
  130. };
  131. &ohci0 {
  132. status = "okay";
  133. };
  134. &pio {
  135. gmac_phy_reset_pin_hummingbird: gmac_phy_reset_pin@0 {
  136. allwinner,pins = "PA21";
  137. allwinner,function = "gpio_out";
  138. allwinner,drive = <SUN4I_PINCTRL_10_MA>;
  139. allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
  140. };
  141. mmc0_cd_pin_hummingbird: mmc0_cd_pin@0 {
  142. allwinner,pins = "PA8";
  143. allwinner,function = "gpio_in";
  144. allwinner,drive = <SUN4I_PINCTRL_10_MA>;
  145. allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
  146. };
  147. wifi_reset_pin_hummingbird: wifi_reset_pin@0 {
  148. allwinner,pins = "PG10";
  149. allwinner,function = "gpio_out";
  150. allwinner,drive = <SUN4I_PINCTRL_10_MA>;
  151. allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
  152. };
  153. };
  154. &p2wi {
  155. status = "okay";
  156. axp22x: pmic@68 {
  157. compatible = "x-powers,axp221";
  158. reg = <0x68>;
  159. interrupt-parent = <&nmi_intc>;
  160. interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
  161. };
  162. };
  163. #include "axp22x.dtsi"
  164. &reg_aldo1 {
  165. regulator-min-microvolt = <3300000>;
  166. regulator-max-microvolt = <3300000>;
  167. regulator-name = "vcc-wifi";
  168. };
  169. &reg_aldo3 {
  170. regulator-always-on;
  171. regulator-min-microvolt = <2700000>;
  172. regulator-max-microvolt = <3300000>;
  173. regulator-name = "avcc";
  174. };
  175. &reg_dc5ldo {
  176. regulator-min-microvolt = <700000>;
  177. regulator-max-microvolt = <1320000>;
  178. regulator-name = "vdd-cpus";
  179. };
  180. &reg_dcdc1 {
  181. regulator-always-on;
  182. regulator-min-microvolt = <3000000>;
  183. regulator-max-microvolt = <3000000>;
  184. regulator-name = "vcc-3v0";
  185. };
  186. &reg_dcdc2 {
  187. regulator-min-microvolt = <700000>;
  188. regulator-max-microvolt = <1320000>;
  189. regulator-name = "vdd-gpu";
  190. };
  191. &reg_dcdc3 {
  192. regulator-always-on;
  193. regulator-min-microvolt = <700000>;
  194. regulator-max-microvolt = <1320000>;
  195. regulator-name = "vdd-cpu";
  196. };
  197. &reg_dcdc4 {
  198. regulator-always-on;
  199. regulator-min-microvolt = <700000>;
  200. regulator-max-microvolt = <1320000>;
  201. regulator-name = "vdd-sys-dll";
  202. };
  203. &reg_dcdc5 {
  204. regulator-always-on;
  205. regulator-min-microvolt = <1500000>;
  206. regulator-max-microvolt = <1500000>;
  207. regulator-name = "vcc-dram";
  208. };
  209. &reg_usb1_vbus {
  210. gpio = <&pio 7 24 GPIO_ACTIVE_HIGH>; /* PH24 */
  211. status = "okay";
  212. };
  213. &uart0 {
  214. pinctrl-names = "default";
  215. pinctrl-0 = <&uart0_pins_a>;
  216. status = "okay";
  217. };
  218. &usb1_vbus_pin_a {
  219. /* different pin from sunxi-common-regulators */
  220. allwinner,pins = "PH24";
  221. };
  222. &usbphy {
  223. usb1_vbus-supply = <&reg_usb1_vbus>;
  224. status = "okay";
  225. };