sun9i-a80-cubieboard4.dts 6.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261
  1. /*
  2. * Copyright 2015 Tyler Baker
  3. *
  4. * Tyler Baker <tyler.baker@linaro.org>
  5. * Chen-Yu Tsai <wens@csie.org>
  6. *
  7. * This file is dual-licensed: you can use it either under the terms
  8. * of the GPL or the X11 license, at your option. Note that this dual
  9. * licensing only applies to this file, and not this project as a
  10. * whole.
  11. *
  12. * a) This file is free software; you can redistribute it and/or
  13. * modify it under the terms of the GNU General Public License as
  14. * published by the Free Software Foundation; either version 2 of the
  15. * License, or (at your option) any later version.
  16. *
  17. * This file is distributed in the hope that it will be useful,
  18. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  19. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  20. * GNU General Public License for more details.
  21. *
  22. * Or, alternatively,
  23. *
  24. * b) Permission is hereby granted, free of charge, to any person
  25. * obtaining a copy of this software and associated documentation
  26. * files (the "Software"), to deal in the Software without
  27. * restriction, including without limitation the rights to use,
  28. * copy, modify, merge, publish, distribute, sublicense, and/or
  29. * sell copies of the Software, and to permit persons to whom the
  30. * Software is furnished to do so, subject to the following
  31. * conditions:
  32. *
  33. * The above copyright notice and this permission notice shall be
  34. * included in all copies or substantial portions of the Software.
  35. *
  36. * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
  37. * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
  38. * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
  39. * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
  40. * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
  41. * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
  42. * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
  43. * OTHER DEALINGS IN THE SOFTWARE.
  44. */
  45. /dts-v1/;
  46. #include "sun9i-a80.dtsi"
  47. #include <dt-bindings/gpio/gpio.h>
  48. #include <dt-bindings/pinctrl/sun4i-a10.h>
  49. / {
  50. model = "Cubietech Cubieboard4";
  51. compatible = "cubietech,a80-cubieboard4", "allwinner,sun9i-a80";
  52. aliases {
  53. serial0 = &uart0;
  54. };
  55. chosen {
  56. stdout-path = "serial0:115200n8";
  57. };
  58. leds {
  59. compatible = "gpio-leds";
  60. pinctrl-names = "default";
  61. pinctrl-0 = <&led_pins_cubieboard4>;
  62. green {
  63. label = "cubieboard4:green:usr";
  64. gpios = <&pio 7 17 GPIO_ACTIVE_HIGH>; /* PH17 */
  65. };
  66. red {
  67. label = "cubieboard4:red:usr";
  68. gpios = <&pio 7 6 GPIO_ACTIVE_HIGH>; /* PH6 */
  69. };
  70. };
  71. };
  72. &mmc0 {
  73. pinctrl-names = "default";
  74. pinctrl-0 = <&mmc0_pins>, <&mmc0_cd_pin_cubieboard4>;
  75. vmmc-supply = <&reg_dcdc1>;
  76. bus-width = <4>;
  77. cd-gpios = <&pio 7 18 GPIO_ACTIVE_HIGH>; /* PH18 */
  78. cd-inverted;
  79. status = "okay";
  80. };
  81. &mmc2 {
  82. pinctrl-names = "default";
  83. pinctrl-0 = <&mmc2_8bit_pins>;
  84. vmmc-supply = <&reg_dcdc1>;
  85. bus-width = <8>;
  86. non-removable;
  87. cap-mmc-hw-reset;
  88. status = "okay";
  89. };
  90. &mmc2_8bit_pins {
  91. /* Increase drive strength for DDR modes */
  92. allwinner,drive = <SUN4I_PINCTRL_40_MA>;
  93. };
  94. &pio {
  95. led_pins_cubieboard4: led-pins@0 {
  96. allwinner,pins = "PH6", "PH17";
  97. allwinner,function = "gpio_out";
  98. allwinner,drive = <SUN4I_PINCTRL_10_MA>;
  99. allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
  100. };
  101. mmc0_cd_pin_cubieboard4: mmc0_cd_pin@0 {
  102. allwinner,pins = "PH18";
  103. allwinner,function = "gpio_in";
  104. allwinner,drive = <SUN4I_PINCTRL_10_MA>;
  105. allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
  106. };
  107. };
  108. &r_ir {
  109. status = "okay";
  110. };
  111. &r_rsb {
  112. status = "okay";
  113. axp809: pmic@3a3 {
  114. reg = <0x3a3>;
  115. interrupt-parent = <&nmi_intc>;
  116. interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
  117. regulators {
  118. reg_aldo1: aldo1 {
  119. /*
  120. * TODO: This should be handled by the
  121. * USB PHY driver.
  122. */
  123. regulator-always-on;
  124. regulator-min-microvolt = <3000000>;
  125. regulator-max-microvolt = <3000000>;
  126. regulator-name = "vcc33-usbh";
  127. };
  128. reg_aldo2: aldo2 {
  129. regulator-min-microvolt = <1800000>;
  130. regulator-max-microvolt = <1800000>;
  131. regulator-name = "vcc-pb-io-cam";
  132. };
  133. aldo3 {
  134. /* unused */
  135. };
  136. reg_dc5ldo: dc5ldo {
  137. regulator-always-on;
  138. regulator-min-microvolt = <800000>;
  139. regulator-max-microvolt = <1100000>;
  140. regulator-name = "vdd-cpus-09-usbh";
  141. };
  142. reg_dcdc1: dcdc1 {
  143. regulator-always-on;
  144. regulator-min-microvolt = <3000000>;
  145. regulator-max-microvolt = <3000000>;
  146. regulator-name = "vcc-3v";
  147. };
  148. reg_dcdc2: dcdc2 {
  149. regulator-min-microvolt = <800000>;
  150. regulator-max-microvolt = <1100000>;
  151. regulator-name = "vdd-gpu";
  152. };
  153. reg_dcdc3: dcdc3 {
  154. regulator-always-on;
  155. regulator-min-microvolt = <800000>;
  156. regulator-max-microvolt = <1100000>;
  157. regulator-name = "vdd-cpua";
  158. };
  159. reg_dcdc4: dcdc4 {
  160. regulator-always-on;
  161. regulator-min-microvolt = <800000>;
  162. regulator-max-microvolt = <1100000>;
  163. regulator-name = "vdd-sys-usb0-hdmi";
  164. };
  165. reg_dcdc5: dcdc5 {
  166. regulator-always-on;
  167. regulator-min-microvolt = <1425000>;
  168. regulator-max-microvolt = <1575000>;
  169. regulator-name = "vcc-dram";
  170. };
  171. reg_dldo1: dldo1 {
  172. /*
  173. * The WiFi chip supports a wide range
  174. * (3.0 ~ 4.8V) of voltages, and so does
  175. * this regulator (3.0 ~ 4.2V), but
  176. * Allwinner SDK always sets it to 3.3V.
  177. */
  178. regulator-min-microvolt = <3300000>;
  179. regulator-max-microvolt = <3300000>;
  180. regulator-name = "vcc-wifi";
  181. };
  182. reg_dldo2: dldo2 {
  183. regulator-always-on;
  184. regulator-min-microvolt = <3000000>;
  185. regulator-max-microvolt = <3000000>;
  186. regulator-name = "vcc-pl";
  187. };
  188. reg_eldo1: eldo1 {
  189. regulator-min-microvolt = <1200000>;
  190. regulator-max-microvolt = <1200000>;
  191. regulator-name = "vcc-dvdd-cam";
  192. };
  193. reg_eldo2: eldo2 {
  194. regulator-min-microvolt = <1800000>;
  195. regulator-max-microvolt = <1800000>;
  196. regulator-name = "vcc-pe";
  197. };
  198. reg_eldo3: eldo3 {
  199. regulator-always-on;
  200. regulator-min-microvolt = <3000000>;
  201. regulator-max-microvolt = <3000000>;
  202. regulator-name = "vcc-pm-codec-io1";
  203. };
  204. reg_ldo_io0: ldo_io0 {
  205. regulator-always-on;
  206. regulator-min-microvolt = <3000000>;
  207. regulator-max-microvolt = <3000000>;
  208. regulator-name = "vcc-pg";
  209. };
  210. reg_ldo_io1: ldo_io1 {
  211. regulator-min-microvolt = <2500000>;
  212. regulator-max-microvolt = <2500000>;
  213. regulator-name = "vcc-pa-gmac-2v5";
  214. };
  215. reg_rtc_ldo: rtc_ldo {
  216. regulator-name = "vcc-rtc-vdd1v8-io";
  217. };
  218. };
  219. };
  220. };
  221. #include "axp809.dtsi"
  222. &uart0 {
  223. pinctrl-names = "default";
  224. pinctrl-0 = <&uart0_pins_a>;
  225. status = "okay";
  226. };