Advertisement
codekipper

sun6-a31-i7.dts

Jul 3rd, 2016
149
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.58 KB | None | 0 0
  1. /*
  2. * Copyright 2015 Marcus Cooper <codekipper@gmail.com>
  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 file 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 file 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.  
  43. /dts-v1/;
  44. #include "sun6i-a31.dtsi"
  45. #include "sunxi-common-regulators.dtsi"
  46.  
  47. #include <dt-bindings/gpio/gpio.h>
  48. #include <dt-bindings/pinctrl/sun4i-a10.h>
  49.  
  50. / {
  51. model = "Mele I7 Quad top set box";
  52. compatible = "mele,i7", "allwinner,sun6i-a31";
  53.  
  54. aliases {
  55. serial0 = &uart0;
  56. };
  57.  
  58. chosen {
  59. stdout-path = "serial0:115200n8";
  60. };
  61.  
  62. leds {
  63. compatible = "gpio-leds";
  64. pinctrl-names = "default";
  65. pinctrl-0 = <&led_pins_i7>;
  66.  
  67. blue {
  68. label = "i7:blue:pwr";
  69. gpios = <&pio 7 13 GPIO_ACTIVE_HIGH>;
  70. default-state = "on";
  71. };
  72. };
  73.  
  74. sound {
  75. compatible = "simple-audio-card";
  76. simple-audio-card,name = "On-board SPDIF";
  77. simple-audio-card,cpu {
  78. sound-dai = <&spdif>;
  79. };
  80.  
  81. simple-audio-card,codec {
  82. sound-dai = <&spdif_out>;
  83. };
  84. };
  85.  
  86. spdif_out: spdif-out {
  87. #sound-dai-cells = <0>;
  88. compatible = "linux,spdif-dit";
  89. };
  90. };
  91.  
  92. &codec {
  93. routing =
  94. "Headphone Jack", "HP Right",
  95. "Headphone Jack", "HP Left";
  96. status = "okay";
  97. };
  98.  
  99. &cpu0 {
  100. cpu-supply = <&reg_dcdc3>;
  101. };
  102.  
  103. &ehci0 {
  104. status = "okay";
  105. };
  106.  
  107. &ehci1 {
  108. status = "okay";
  109. };
  110.  
  111. &gmac {
  112. pinctrl-names = "default";
  113. pinctrl-0 = <&gmac_pins_rgmii_a>;
  114. phy = <&phy1>;
  115. phy-mode = "rgmii";
  116. phy-supply = <&reg_dldo1>;
  117. snps,reset-active-low;
  118. snps,reset-delays-us = <0 10000 30000>;
  119. status = "okay";
  120.  
  121. phy1: ethernet-phy@1 {
  122. reg = <1>;
  123. };
  124. };
  125.  
  126. &ir {
  127. pinctrl-names = "default";
  128. pinctrl-0 = <&ir_pins_a>;
  129. status = "okay";
  130. };
  131.  
  132. &mmc0 {
  133. pinctrl-names = "default";
  134. pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_i7>;
  135. vmmc-supply = <&reg_dcdc1>;
  136. bus-width = <4>;
  137. cd-gpios = <&pio 7 22 GPIO_ACTIVE_HIGH>; /* PH22 */
  138. cd-inverted;
  139. status = "okay";
  140. };
  141.  
  142. &mmc0_pins_a {
  143. allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
  144. };
  145.  
  146. &p2wi {
  147. status = "okay";
  148.  
  149. axp22x: pmic@68 {
  150. compatible = "x-powers,axp221";
  151. reg = <0x68>;
  152. interrupt-parent = <&nmi_intc>;
  153. interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
  154. };
  155. };
  156.  
  157. #include "axp22x.dtsi"
  158.  
  159. &pio {
  160. led_pins_i7: led_pins@0 {
  161. allwinner,pins = "PH13";
  162. allwinner,function = "gpio_out";
  163. allwinner,drive = <SUN4I_PINCTRL_10_MA>;
  164. allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
  165. };
  166.  
  167. mmc0_cd_pin_i7: mmc0_cd_pin@0 {
  168. allwinner,pins = "PH22";
  169. allwinner,function = "gpio_in";
  170. allwinner,drive = <SUN4I_PINCTRL_10_MA>;
  171. allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
  172. };
  173.  
  174. usb1_vbus_pin_i7: usb1_vbus_pin@0 {
  175. allwinner,pins = "PC27";
  176. allwinner,function = "gpio_out";
  177. allwinner,drive = <SUN4I_PINCTRL_10_MA>;
  178. allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
  179. };
  180. };
  181.  
  182. &reg_aldo1 {
  183. regulator-min-microvolt = <3300000>;
  184. regulator-max-microvolt = <3300000>;
  185. regulator-name = "vcc-wifi";
  186. };
  187.  
  188. &reg_aldo3 {
  189. regulator-always-on;
  190. regulator-min-microvolt = <2700000>;
  191. regulator-max-microvolt = <3300000>;
  192. regulator-name = "avcc";
  193. };
  194.  
  195. &reg_dc5ldo {
  196. regulator-always-on;
  197. regulator-min-microvolt = <700000>;
  198. regulator-max-microvolt = <1320000>;
  199. regulator-name = "vdd-cpus";
  200. };
  201.  
  202. &reg_dcdc1 {
  203. regulator-always-on;
  204. regulator-min-microvolt = <3000000>;
  205. regulator-max-microvolt = <3000000>;
  206. regulator-name = "vcc-3v0";
  207. };
  208.  
  209. &reg_dcdc2 {
  210. regulator-min-microvolt = <700000>;
  211. regulator-max-microvolt = <1320000>;
  212. regulator-name = "vdd-gpu";
  213. };
  214.  
  215. &reg_dcdc3 {
  216. regulator-always-on;
  217. regulator-min-microvolt = <700000>;
  218. regulator-max-microvolt = <1320000>;
  219. regulator-name = "vdd-cpu";
  220. };
  221.  
  222. &reg_dcdc4 {
  223. regulator-always-on;
  224. regulator-min-microvolt = <700000>;
  225. regulator-max-microvolt = <1320000>;
  226. regulator-name = "vdd-sys-dll";
  227. };
  228.  
  229. &reg_dcdc5 {
  230. regulator-always-on;
  231. regulator-min-microvolt = <1500000>;
  232. regulator-max-microvolt = <1500000>;
  233. regulator-name = "vcc-dram";
  234. };
  235.  
  236. &reg_dldo1 {
  237. regulator-min-microvolt = <3300000>;
  238. regulator-max-microvolt = <3300000>;
  239. regulator-name = "vcc-ethernet-phy";
  240. };
  241.  
  242. /*
  243. * Both reg_usb1_vbus and reg_dldo4 need to be on for the hub attached
  244. * to usb1 to work, and we can list only one usb1_vbus-supply, so dldo4 is
  245. * marked as regulator-always-on.
  246. */
  247. &reg_dldo4 {
  248. regulator-always-on;
  249. regulator-min-microvolt = <3300000>;
  250. regulator-max-microvolt = <3300000>;
  251. regulator-name = "vcc-usb-hub";
  252. };
  253.  
  254. &reg_usb1_vbus {
  255. pinctrl-names = "default";
  256. pinctrl-0 = <&usb1_vbus_pin_i7>;
  257. gpio = <&pio 2 27 GPIO_ACTIVE_HIGH>;
  258. status = "okay";
  259. };
  260.  
  261. &spdif {
  262. pinctrl-names = "default";
  263. pinctrl-0 = <&spdif_pins_a>;
  264. spdif-out = "okay";
  265. status = "okay";
  266. };
  267.  
  268. &uart0 {
  269. pinctrl-names = "default";
  270. pinctrl-0 = <&uart0_pins_a>;
  271. status = "okay";
  272. };
  273.  
  274. &usbphy {
  275. usb1_vbus-supply = <&reg_usb1_vbus>;
  276. usb2_vbus-supply = <&reg_aldo1>;
  277. status = "okay";
  278. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement