Advertisement
Guest User

Untitled

a guest
Jul 28th, 2015
316
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 9.89 KB | None | 0 0
  1. /*
  2. * Copyright 2013 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.  
  45. /dts-v1/;
  46. #include "sun7i-a20.dtsi"
  47. #include "sunxi-common-regulators.dtsi"
  48.  
  49. #include <dt-bindings/gpio/gpio.h>
  50. #include <dt-bindings/interrupt-controller/irq.h>
  51. #include <dt-bindings/pinctrl/sun4i-a10.h>
  52.  
  53. / {
  54. model = "Cubietech Cubieboard2";
  55. compatible = "cubietech,cubieboard2", "allwinner,sun7i-a20";
  56.  
  57. aliases {
  58. serial0 = &uart0;
  59. };
  60.  
  61. chosen {
  62. stdout-path = "serial0:115200n8";
  63. };
  64.  
  65. leds {
  66. compatible = "gpio-leds";
  67. pinctrl-names = "default";
  68. pinctrl-0 = <&led_pins_cubieboard2>;
  69.  
  70. blue {
  71. label = "cubieboard2:blue:usr";
  72. gpios = <&pio 7 21 GPIO_ACTIVE_HIGH>;
  73. };
  74.  
  75. green {
  76. label = "cubieboard2:green:usr";
  77. gpios = <&pio 7 20 GPIO_ACTIVE_HIGH>;
  78. };
  79. };
  80. };
  81.  
  82. &ahci {
  83. target-supply = <&reg_ahci_5v>;
  84. status = "okay";
  85. };
  86.  
  87. &codec {
  88. routing =
  89. "Headphone Jack", "HP Left",
  90. "Headphone Jack", "HP Right";
  91. status = "okay";
  92. };
  93.  
  94. &cpu0 {
  95. cpu-supply = <&reg_dcdc2>;
  96. };
  97.  
  98. &ehci0 {
  99. status = "okay";
  100. };
  101.  
  102. &ehci1 {
  103. status = "okay";
  104. };
  105.  
  106. &gmac {
  107. pinctrl-names = "default";
  108. pinctrl-0 = <&gmac_pins_mii_a>;
  109. phy = <&phy1>;
  110. phy-mode = "mii";
  111. status = "okay";
  112.  
  113. phy1: ethernet-phy@1 {
  114. reg = <1>;
  115. };
  116. };
  117.  
  118. &i2c0 {
  119. pinctrl-names = "default";
  120. pinctrl-0 = <&i2c0_pins_a>;
  121. status = "okay";
  122.  
  123. axp209: pmic@34 {
  124. reg = <0x34>;
  125. interrupt-parent = <&nmi_intc>;
  126. interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
  127. };
  128. };
  129.  
  130. &i2c1 {
  131. pinctrl-names = "default";
  132. pinctrl-0 = <&i2c1_pins_a>;
  133. status = "okay";
  134. };
  135.  
  136. &i2c2 {
  137. pinctrl-names = "default";
  138. pinctrl-0 = <&i2c2_pins_a>;
  139. status = "okay";
  140.  
  141. max9768: max9768@49 {
  142. compatible = "maxim,max9768";
  143. reg = <0x49>;
  144. shdn_gpio = <&pio 1 9 0>; /* PB9 */
  145. mute_gpio = <&pio 8 4 0>; /* PI4 */
  146. };
  147. };
  148.  
  149. &ir0 {
  150. pinctrl-names = "default";
  151. pinctrl-0 = <&ir0_rx_pins_a>;
  152. status = "okay";
  153. };
  154.  
  155. &mmc0 {
  156. pinctrl-names = "default";
  157. pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_reference_design>;
  158. vmmc-supply = <&reg_vcc3v3>;
  159. bus-width = <4>;
  160. cd-gpios = <&pio 7 1 GPIO_ACTIVE_HIGH>; /* PH1 */
  161. cd-inverted;
  162. status = "okay";
  163. };
  164.  
  165. &nfc {
  166. pinctrl-names = "default";
  167. pinctrl-0 = <&nand_pins_a>, <&nand_cs0_pins_a>, <&nand_rb0_pins_a>;
  168. status = "okay";
  169.  
  170. nand@0 {
  171. #address-cells = <2>;
  172. #size-cells = <2>;
  173. reg = <0>;
  174. allwinner,rb = <0>;
  175.  
  176. nand-ecc-mode = "hw";
  177. nand-rnd-mode = "hw";
  178. nand-on-flash-bbt;
  179.  
  180. boot0@0 {
  181. label = "boot0";
  182. reg = /bits/ 64 <0x0 0x200000>;
  183. nand-ecc-mode = "hw_syndrome";
  184. nand-rnd-mode = "hw";
  185. nand-randomizer-seeds = /bits/ 16 <0x4a80>;
  186. };
  187.  
  188. boot0-rescue@200000 {
  189. label = "boot0-rescue";
  190. reg = /bits/ 64 <0x200000 0x200000>;
  191. nand-ecc-mode = "hw_syndrome";
  192. nand-rnd-mode = "hw";
  193. nand-randomizer-seeds = /bits/ 16 <0x4a80>;
  194. };
  195.  
  196. spl@0 {
  197. label = "SPL";
  198. reg = /bits/ 64 <0x0 0x200000>;
  199. nand-ecc-mode = "hw_syndrome";
  200. nand-rnd-mode = "hw";
  201. nand-randomizer-seeds = /bits/ 16 <0x4a80>;
  202. };
  203.  
  204. spl-backup@200000 {
  205. label = "SPL-Backup";
  206. reg = /bits/ 64 <0x200000 0x200000>;
  207. nand-ecc-mode = "hw_syndrome";
  208. nand-rnd-mode = "hw";
  209. nand-randomizer-seeds = /bits/ 16 <0x4a80>;
  210. };
  211.  
  212. env@400000 {
  213. label = "U-Boot-Env";
  214. reg = /bits/ 64 <0x400000 0x200000>;
  215. nand-ecc-mode = "hw";
  216. nand-rnd-mode = "hw";
  217. nand-randomizer-seeds = /bits/ 16 <
  218. 0x2b75 0x0bd0 0x5ca3 0x62d1 0x1c93 0x07e9 0x2162 0x3a72
  219. 0x0d67 0x67f9 0x1be7 0x077d 0x032f 0x0dac 0x2716 0x2436
  220. 0x7922 0x1510 0x3860 0x5287 0x480f 0x4252 0x1789 0x5a2d
  221. 0x2a49 0x5e10 0x437f 0x4b4e 0x2f45 0x216e 0x5cb7 0x7130
  222. 0x2a3f 0x60e4 0x4dc9 0x0ef0 0x0f52 0x1bb9 0x6211 0x7a56
  223. 0x226d 0x4ea7 0x6f36 0x3692 0x38bf 0x0c62 0x05eb 0x4c55
  224. 0x60f4 0x728c 0x3b6f 0x2037 0x7f69 0x0936 0x651a 0x4ceb
  225. 0x6218 0x79f3 0x383f 0x18d9 0x4f05 0x5c82 0x2912 0x6f17
  226. 0x6856 0x5938 0x1007 0x61ab 0x3e7f 0x57c2 0x542f 0x4f62
  227. 0x7454 0x2eac 0x7739 0x42d4 0x2f90 0x435a 0x2e52 0x2064
  228. 0x637c 0x66ad 0x2c90 0x0bad 0x759c 0x0029 0x0986 0x7126
  229. 0x1ca7 0x1605 0x386a 0x27f5 0x1380 0x6d75 0x24c3 0x0f8e
  230. 0x2b7a 0x1418 0x1fd1 0x7dc1 0x2d8e 0x43af 0x2267 0x7da3
  231. 0x4e3d 0x1338 0x50db 0x454d 0x764d 0x40a3 0x42e6 0x262b
  232. 0x2d2e 0x1aea 0x2e17 0x173d 0x3a6e 0x71bf 0x25f9 0x0a5d
  233. 0x7c57 0x0fbe 0x46ce 0x4939 0x6b17 0x37bb 0x3e91 0x76db>;
  234. };
  235.  
  236. rootfs@600000 {
  237. label = "main";
  238. reg = /bits/ 64 <0x600000 0x10000000>;
  239. nand-ecc-mode = "hw";
  240. nand-rnd-mode = "hw";
  241. nand-randomizer-seeds = /bits/ 16 <
  242. 0x2b75 0x0bd0 0x5ca3 0x62d1 0x1c93 0x07e9 0x2162 0x3a72
  243. 0x0d67 0x67f9 0x1be7 0x077d 0x032f 0x0dac 0x2716 0x2436
  244. 0x7922 0x1510 0x3860 0x5287 0x480f 0x4252 0x1789 0x5a2d
  245. 0x2a49 0x5e10 0x437f 0x4b4e 0x2f45 0x216e 0x5cb7 0x7130
  246. 0x2a3f 0x60e4 0x4dc9 0x0ef0 0x0f52 0x1bb9 0x6211 0x7a56
  247. 0x226d 0x4ea7 0x6f36 0x3692 0x38bf 0x0c62 0x05eb 0x4c55
  248. 0x60f4 0x728c 0x3b6f 0x2037 0x7f69 0x0936 0x651a 0x4ceb
  249. 0x6218 0x79f3 0x383f 0x18d9 0x4f05 0x5c82 0x2912 0x6f17
  250. 0x6856 0x5938 0x1007 0x61ab 0x3e7f 0x57c2 0x542f 0x4f62
  251. 0x7454 0x2eac 0x7739 0x42d4 0x2f90 0x435a 0x2e52 0x2064
  252. 0x637c 0x66ad 0x2c90 0x0bad 0x759c 0x0029 0x0986 0x7126
  253. 0x1ca7 0x1605 0x386a 0x27f5 0x1380 0x6d75 0x24c3 0x0f8e
  254. 0x2b7a 0x1418 0x1fd1 0x7dc1 0x2d8e 0x43af 0x2267 0x7da3
  255. 0x4e3d 0x1338 0x50db 0x454d 0x764d 0x40a3 0x42e6 0x262b
  256. 0x2d2e 0x1aea 0x2e17 0x173d 0x3a6e 0x71bf 0x25f9 0x0a5d
  257. 0x7c57 0x0fbe 0x46ce 0x4939 0x6b17 0x37bb 0x3e91 0x76db>;
  258. };
  259.  
  260. user@10600000 {
  261. label = "user";
  262. reg = /bits/ 64 <0x10600000 0xffc00000>;
  263. nand-ecc-mode = "hw";
  264. nand-rnd-mode = "hw";
  265. nand-randomizer-seeds = /bits/ 16 <
  266. 0x2b75 0x0bd0 0x5ca3 0x62d1 0x1c93 0x07e9 0x2162 0x3a72
  267. 0x0d67 0x67f9 0x1be7 0x077d 0x032f 0x0dac 0x2716 0x2436
  268. 0x7922 0x1510 0x3860 0x5287 0x480f 0x4252 0x1789 0x5a2d
  269. 0x2a49 0x5e10 0x437f 0x4b4e 0x2f45 0x216e 0x5cb7 0x7130
  270. 0x2a3f 0x60e4 0x4dc9 0x0ef0 0x0f52 0x1bb9 0x6211 0x7a56
  271. 0x226d 0x4ea7 0x6f36 0x3692 0x38bf 0x0c62 0x05eb 0x4c55
  272. 0x60f4 0x728c 0x3b6f 0x2037 0x7f69 0x0936 0x651a 0x4ceb
  273. 0x6218 0x79f3 0x383f 0x18d9 0x4f05 0x5c82 0x2912 0x6f17
  274. 0x6856 0x5938 0x1007 0x61ab 0x3e7f 0x57c2 0x542f 0x4f62
  275. 0x7454 0x2eac 0x7739 0x42d4 0x2f90 0x435a 0x2e52 0x2064
  276. 0x637c 0x66ad 0x2c90 0x0bad 0x759c 0x0029 0x0986 0x7126
  277. 0x1ca7 0x1605 0x386a 0x27f5 0x1380 0x6d75 0x24c3 0x0f8e
  278. 0x2b7a 0x1418 0x1fd1 0x7dc1 0x2d8e 0x43af 0x2267 0x7da3
  279. 0x4e3d 0x1338 0x50db 0x454d 0x764d 0x40a3 0x42e6 0x262b
  280. 0x2d2e 0x1aea 0x2e17 0x173d 0x3a6e 0x71bf 0x25f9 0x0a5d
  281. 0x7c57 0x0fbe 0x46ce 0x4939 0x6b17 0x37bb 0x3e91 0x76db>;
  282. };
  283. };
  284. };
  285.  
  286. &ohci0 {
  287. status = "okay";
  288. };
  289.  
  290. &ohci1 {
  291. status = "okay";
  292. };
  293.  
  294. &pio {
  295. led_pins_cubieboard2: led_pins@0 {
  296. allwinner,pins = "PH20", "PH21";
  297. allwinner,function = "gpio_out";
  298. allwinner,drive = <SUN4I_PINCTRL_10_MA>;
  299. allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
  300. };
  301. };
  302.  
  303. &reg_ahci_5v {
  304. status = "okay";
  305. };
  306.  
  307. #include "axp209.dtsi"
  308.  
  309. &reg_dcdc2 {
  310. regulator-always-on;
  311. regulator-min-microvolt = <1000000>;
  312. regulator-max-microvolt = <1450000>;
  313. regulator-name = "vdd-cpu";
  314. };
  315.  
  316. &reg_dcdc3 {
  317. regulator-always-on;
  318. regulator-min-microvolt = <1000000>;
  319. regulator-max-microvolt = <1400000>;
  320. regulator-name = "vdd-int-dll";
  321. };
  322.  
  323. &reg_ldo1 {
  324. regulator-name = "vdd-rtc";
  325. };
  326.  
  327. &reg_ldo2 {
  328. regulator-always-on;
  329. regulator-min-microvolt = <3000000>;
  330. regulator-max-microvolt = <3000000>;
  331. regulator-name = "avcc";
  332. };
  333.  
  334. &reg_usb1_vbus {
  335. status = "okay";
  336. };
  337.  
  338. &reg_usb2_vbus {
  339. status = "okay";
  340. };
  341.  
  342. &uart0 {
  343. pinctrl-names = "default";
  344. pinctrl-0 = <&uart0_pins_a>;
  345. status = "okay";
  346. };
  347.  
  348. &usbphy {
  349. usb1_vbus-supply = <&reg_usb1_vbus>;
  350. usb2_vbus-supply = <&reg_usb2_vbus>;
  351. status = "okay";
  352. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement