sun8i-r16-parrot.dts 6.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313
  1. /*
  2. * Copyright 2016 Quentin Schulz
  3. *
  4. * Quentin Schulz <[email protected]>
  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 "sun8i-a33.dtsi"
  46. #include "sunxi-common-regulators.dtsi"
  47. #include <dt-bindings/gpio/gpio.h>
  48. #include <dt-bindings/input/input.h>
  49. / {
  50. model = "Allwinner R16 EVB (Parrot)";
  51. compatible = "allwinner,parrot", "allwinner,sun8i-a33";
  52. aliases {
  53. serial0 = &uart0;
  54. };
  55. chosen {
  56. stdout-path = "serial0:115200n8";
  57. };
  58. leds {
  59. compatible = "gpio-leds";
  60. led-1 {
  61. label = "parrot:led1:usr";
  62. gpios = <&pio 4 17 GPIO_ACTIVE_HIGH>; /* PE17 */
  63. };
  64. led-2 {
  65. label = "parrot:led2:usr";
  66. gpios = <&pio 4 16 GPIO_ACTIVE_HIGH>; /* PE16 */
  67. };
  68. };
  69. wifi_pwrseq: wifi_pwrseq {
  70. compatible = "mmc-pwrseq-simple";
  71. reset-gpios = <&r_pio 0 6 GPIO_ACTIVE_LOW>; /* PL06 */
  72. };
  73. };
  74. &codec {
  75. status = "okay";
  76. };
  77. &dai {
  78. status = "okay";
  79. };
  80. &ehci0 {
  81. status = "okay";
  82. };
  83. &i2c1 {
  84. status = "okay";
  85. /*
  86. * FIXME: An as-yet-unknown accelerometer is connected to this
  87. * i2c bus.
  88. */
  89. };
  90. &lradc {
  91. vref-supply = <&reg_aldo3>;
  92. status = "okay";
  93. button-190 {
  94. label = "V+";
  95. linux,code = <KEY_VOLUMEUP>;
  96. channel = <0>;
  97. voltage = <190000>;
  98. };
  99. button-390 {
  100. label = "V-";
  101. linux,code = <KEY_VOLUMEDOWN>;
  102. channel = <0>;
  103. voltage = <390000>;
  104. };
  105. };
  106. &mmc0 {
  107. vmmc-supply = <&reg_dcdc1>;
  108. cd-gpios = <&pio 3 14 GPIO_ACTIVE_LOW>; /* PD14 */
  109. bus-width = <4>;
  110. status = "okay";
  111. };
  112. &mmc1 {
  113. pinctrl-names = "default";
  114. pinctrl-0 = <&mmc1_pg_pins>;
  115. vmmc-supply = <&reg_aldo1>;
  116. mmc-pwrseq = <&wifi_pwrseq>;
  117. bus-width = <4>;
  118. non-removable;
  119. status = "okay";
  120. };
  121. &mmc2 {
  122. pinctrl-names = "default";
  123. pinctrl-0 = <&mmc2_8bit_pins>;
  124. vmmc-supply = <&reg_dcdc1>;
  125. bus-width = <8>;
  126. non-removable;
  127. cap-mmc-hw-reset;
  128. status = "okay";
  129. };
  130. &mmc2_8bit_pins {
  131. drive-strength = <40>;
  132. };
  133. &ohci0 {
  134. status = "okay";
  135. };
  136. &r_rsb {
  137. status = "okay";
  138. axp22x: pmic@3a3 {
  139. compatible = "x-powers,axp223";
  140. reg = <0x3a3>;
  141. interrupt-parent = <&r_intc>;
  142. interrupts = <GIC_SPI 32 IRQ_TYPE_LEVEL_LOW>;
  143. drivevbus-supply = <&reg_vcc5v0>;
  144. x-powers,drive-vbus-en;
  145. };
  146. };
  147. #include "axp223.dtsi"
  148. &reg_aldo1 {
  149. regulator-always-on;
  150. regulator-min-microvolt = <3000000>;
  151. regulator-max-microvolt = <3000000>;
  152. regulator-name = "vcc-io";
  153. };
  154. &reg_aldo2 {
  155. regulator-always-on;
  156. regulator-min-microvolt = <2350000>;
  157. regulator-max-microvolt = <2650000>;
  158. regulator-name = "vdd-dll";
  159. };
  160. &reg_aldo3 {
  161. regulator-always-on;
  162. regulator-min-microvolt = <2700000>;
  163. regulator-max-microvolt = <3300000>;
  164. regulator-name = "vcc-pll-avcc";
  165. };
  166. &reg_dc5ldo {
  167. regulator-always-on;
  168. regulator-min-microvolt = <900000>;
  169. regulator-max-microvolt = <1400000>;
  170. regulator-name = "vdd-cpus";
  171. };
  172. &reg_dcdc1 {
  173. regulator-always-on;
  174. regulator-min-microvolt = <3000000>;
  175. regulator-max-microvolt = <3000000>;
  176. regulator-name = "vcc-3v0";
  177. };
  178. &reg_dcdc2 {
  179. regulator-always-on;
  180. regulator-min-microvolt = <900000>;
  181. regulator-max-microvolt = <1400000>;
  182. regulator-name = "vdd-sys";
  183. };
  184. &reg_dcdc3 {
  185. regulator-always-on;
  186. regulator-min-microvolt = <900000>;
  187. regulator-max-microvolt = <1400000>;
  188. regulator-name = "vdd-cpu";
  189. };
  190. &reg_dcdc5 {
  191. regulator-always-on;
  192. regulator-min-microvolt = <1500000>;
  193. regulator-max-microvolt = <1500000>;
  194. regulator-name = "vcc-dram";
  195. };
  196. &reg_dldo1 {
  197. /*
  198. * TODO: WiFi chip needs dldo1 AND dldo2 to be on to be powered.
  199. * Remove next line once it is possible to sync two regulators.
  200. */
  201. regulator-always-on;
  202. regulator-min-microvolt = <3300000>;
  203. regulator-max-microvolt = <3300000>;
  204. regulator-name = "vcc-wifi0";
  205. };
  206. &reg_dldo2 {
  207. /*
  208. * TODO: WiFi chip needs dldo1 AND dldo2 to be on to be powered.
  209. * Remove next line once it is possible to sync two regulators.
  210. */
  211. regulator-always-on;
  212. regulator-min-microvolt = <3300000>;
  213. regulator-max-microvolt = <3300000>;
  214. regulator-name = "vcc-wifi1";
  215. };
  216. &reg_dldo3 {
  217. regulator-min-microvolt = <3000000>;
  218. regulator-max-microvolt = <3000000>;
  219. regulator-name = "vcc-3v0-csi";
  220. };
  221. &reg_drivevbus {
  222. regulator-name = "usb0-vbus";
  223. status = "okay";
  224. };
  225. &reg_eldo1 {
  226. regulator-min-microvolt = <1200000>;
  227. regulator-max-microvolt = <1200000>;
  228. regulator-name = "vcc-1v2-hsic";
  229. };
  230. &reg_eldo2 {
  231. regulator-min-microvolt = <3000000>;
  232. regulator-max-microvolt = <3000000>;
  233. regulator-name = "vcc-dsp";
  234. };
  235. &reg_eldo3 {
  236. regulator-min-microvolt = <3000000>;
  237. regulator-max-microvolt = <3000000>;
  238. regulator-name = "eldo3";
  239. };
  240. &reg_usb1_vbus {
  241. gpio = <&pio 3 12 GPIO_ACTIVE_HIGH>; /* PD12 */
  242. status = "okay";
  243. };
  244. &sound {
  245. status = "okay";
  246. };
  247. &uart0 {
  248. pinctrl-names = "default";
  249. pinctrl-0 = <&uart0_pb_pins>;
  250. status = "okay";
  251. };
  252. &usb_otg {
  253. dr_mode = "otg";
  254. status = "okay";
  255. };
  256. &usb_power_supply {
  257. status = "okay";
  258. };
  259. &usbphy {
  260. status = "okay";
  261. usb0_vbus-supply = <&reg_drivevbus>;
  262. usb0_id_det-gpios = <&pio 3 10 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; /* PD10 */
  263. usb0_vbus_power-supply = <&usb_power_supply>;
  264. usb1_vbus-supply = <&reg_usb1_vbus>;
  265. };