Advertisement
Guest User

Untitled

a guest
May 16th, 2016
128
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.68 KB | None | 0 0
  1. /dts-v1/;
  2. #include "sun7i-a20.dtsi"
  3. #include "sunxi-common-regulators.dtsi"
  4. #include <dt-bindings/gpio/gpio.h>
  5. #include <dt-bindings/interrupt-controller/arm-gic.h>
  6.  
  7. / {
  8. model = "Banana Pi BPI-M1-Plus";
  9. compatible = "sinovoip,bpi-m1-plus", "allwinner,sun7i-a20";
  10.  
  11. aliases {
  12. serial0 = &uart0;
  13. serial1 = &uart2;
  14. serial2 = &uart3;
  15. serial3 = &uart7;
  16. };
  17.  
  18. chosen {
  19. stdout-path = "serial0:115200n8";
  20. };
  21.  
  22. leds {
  23. compatible = "gpio-leds";
  24. pinctrl-names = "default";
  25. pinctrl-0 = <&led_pins_bananapi>;
  26.  
  27. red {
  28. label = "bananapi:red:usr";
  29. gpios = <&pio 7 25 GPIO_ACTIVE_HIGH>;
  30. linux,default-trigger = "default-on";
  31. };
  32.  
  33. green {
  34. label = "bananapi:green:usr";
  35. gpios = <&pio 7 24 GPIO_ACTIVE_HIGH>;
  36. linux,default-trigger = "heartbeat";
  37.  
  38. };
  39. };
  40.  
  41. reg_gmac_3v3: gmac-3v3 {
  42. compatible = "regulator-fixed";
  43. pinctrl-names = "default";
  44. pinctrl-0 = <&gmac_power_pin_bananapi>;
  45. regulator-name = "gmac-3v3";
  46. regulator-min-microvolt = <3300000>;
  47. regulator-max-microvolt = <3300000>;
  48. startup-delay-us = <100000>;
  49. enable-active-high;
  50. gpio = <&pio 7 23 GPIO_ACTIVE_HIGH>;
  51. };
  52.  
  53. reg_vmmc3: vmmc3 {
  54. compatible = "regulator-fixed";
  55. pinctrl-names = "default";
  56. pinctrl-0 = <&vmmc3_pin_bananapi>;
  57. regulator-name = "vmmc3";
  58. regulator-min-microvolt = <3300000>;
  59. regulator-max-microvolt = <3300000>;
  60. regulator-always-on;
  61. regulator-boot-on;
  62. enable-active-high;
  63. gpio = <&pio 7 22 GPIO_ACTIVE_HIGH>;
  64. };
  65. };
  66.  
  67. &ahci {
  68. status = "okay";
  69. };
  70.  
  71. &ehci0 {
  72. status = "okay";
  73. };
  74.  
  75. &ehci1 {
  76. status = "okay";
  77. };
  78.  
  79. &ohci0 {
  80. status = "okay";
  81. };
  82.  
  83. &ohci1 {
  84. status = "okay";
  85. };
  86.  
  87. &gmac {
  88. pinctrl-names = "default";
  89. pinctrl-0 = <&gmac_pins_rgmii_a>;
  90. phy = <&phy1>;
  91. phy-mode = "rgmii";
  92. phy-supply = <&reg_gmac_3v3>;
  93. status = "okay";
  94.  
  95. phy1: ethernet-phy@1 {
  96. reg = <1>;
  97. };
  98. };
  99.  
  100. &i2c0 {
  101. pinctrl-names = "default";
  102. pinctrl-0 = <&i2c0_pins_a>;
  103. status = "okay";
  104.  
  105. axp209: pmic@34 {
  106. compatible = "x-powers,axp209";
  107. reg = <0x34>;
  108. interrupt-parent = <&nmi_intc>;
  109. interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
  110.  
  111. interrupt-controller;
  112. #interrupt-cells = <1>;
  113. };
  114. };
  115.  
  116. &i2c2 {
  117. pinctrl-names = "default";
  118. pinctrl-0 = <&i2c2_pins_a>;
  119. status = "okay";
  120. };
  121.  
  122. &ir0 {
  123. pinctrl-names = "default";
  124. pinctrl-0 = <&ir0_rx_pins_a>;
  125. status = "okay";
  126. };
  127.  
  128. &mmc0 {
  129. pinctrl-names = "default";
  130. pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_bananapi>;
  131. vmmc-supply = <&reg_vcc3v3>;
  132. bus-width = <4>;
  133. cd-gpios = <&pio 7 10 GPIO_ACTIVE_HIGH>; /* PH10 */
  134. cd-inverted;
  135. status = "okay";
  136. };
  137.  
  138. &mmc3 {
  139. #address-cells = <1>;
  140. #size-cells = <0>;
  141. pinctrl-names = "default";
  142. pinctrl-0 = <&mmc3_pins_a>;
  143. vmmc-supply = <&reg_vmmc3>;
  144. bus-width = <4>;
  145. non-removable;
  146. enable-sdio-wakeup;
  147. status = "okay";
  148.  
  149. brcmf: bcrmf@1 {
  150. reg = <1>;
  151. compatible = "brcm,bcm4329-fmac";
  152. interrupt-parent = <&pio>;
  153. interrupts = <7 15 IRQ_TYPE_LEVEL_LOW>;
  154. interrupt-names = "host-wake";
  155. };
  156.  
  157. };
  158.  
  159. &mmc3_pins_a {
  160. /* AP6210 requires pull-up */
  161. allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
  162. };
  163.  
  164. &pio {
  165. gmac_power_pin_bananapi: gmac_power_pin@0 {
  166. allwinner,pins = "PH23";
  167. allwinner,function = "gpio_out";
  168. allwinner,drive = <SUN4I_PINCTRL_10_MA>;
  169. allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
  170. };
  171.  
  172. led_pins_bananapi: led_pins@0 {
  173. allwinner,pins = "PH24", "PG2";
  174. allwinner,function = "gpio_out";
  175. allwinner,drive = <SUN4I_PINCTRL_10_MA>;
  176. allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
  177. };
  178.  
  179. mmc0_cd_pin_bananapi: mmc0_cd_pin@0 {
  180. allwinner,pins = "PH10";
  181. allwinner,function = "gpio_in";
  182. allwinner,drive = <SUN4I_PINCTRL_10_MA>;
  183. allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
  184. };
  185.  
  186. usb1_vbus_pin_bananapi: usb1_vbus_pin@0 {
  187. allwinner,pins = "PH0";
  188. allwinner,function = "gpio_out";
  189. allwinner,drive = <SUN4I_PINCTRL_10_MA>;
  190. allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
  191. };
  192.  
  193. usb2_vbus_pin_bananapi: usb2_vbus_pin@0 {
  194. allwinner,pins = "PH1";
  195. allwinner,function = "gpio_out";
  196. allwinner,drive = <SUN4I_PINCTRL_10_MA>;
  197. allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
  198. };
  199.  
  200. vmmc3_pin_bananapi: vmmc3_pin@0 {
  201. allwinner,pins = "PH22";
  202. allwinner,function = "gpio_out";
  203. allwinner,drive = <SUN4I_PINCTRL_10_MA>;
  204. allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
  205. };
  206. pcm5102: pcm510x {
  207. compatible = "ti,pcm510x";
  208. pcm510x,format = "i2s";
  209. #sound-dai-cells = <0>;
  210. };
  211.  
  212. sound {
  213. compatible = "simple-audio-card";
  214. simple-audio-card,format = "i2s";
  215.  
  216. simple-audio-card,cpu {
  217. sound-dai = <&i2s0>;
  218. };
  219.  
  220. simple-audio-card,codec {
  221. sound-dai = <&pcm5102>;
  222. };
  223. };
  224. };
  225.  
  226. &reg_usb1_vbus {
  227. pinctrl-0 = <&usb1_vbus_pin_bananapi>;
  228. gpio = <&pio 7 0 GPIO_ACTIVE_HIGH>; /* PH0 */
  229. status = "okay";
  230. };
  231.  
  232. &i2s0 {
  233. pinctrl-names = "default";
  234. pinctrl-0 = <&i2s0_bclk> , <&i2s0_lrclk> , <&i2s0_sdo0>;
  235. status = "okay";
  236. };
  237. &codec {
  238. status = "okay";
  239. };
  240. &reg_usb2_vbus {
  241. pinctrl-0 = <&usb2_vbus_pin_bananapi>;
  242. gpio = <&pio 7 1 GPIO_ACTIVE_HIGH>; /* PH1 */
  243. status = "okay";
  244. };
  245.  
  246. &spi0 {
  247. pinctrl-names = "default";
  248. pinctrl-0 = <&spi0_pins_a>,
  249. <&spi0_cs0_pins_a>,
  250. <&spi0_cs1_pins_a>;
  251. status = "okay";
  252. };
  253.  
  254. &uart0 {
  255. pinctrl-names = "default";
  256. pinctrl-0 = <&uart0_pins_a>;
  257. status = "okay";
  258. };
  259.  
  260. &uart2 {
  261. pinctrl-names = "default";
  262. pinctrl-0 = <&uart2_pins_a>;
  263. status = "okay";
  264. };
  265.  
  266. &uart3 {
  267. pinctrl-names = "default";
  268. pinctrl-0 = <&uart3_pins_b>;
  269. status = "okay";
  270. };
  271.  
  272. &uart7 {
  273. pinctrl-names = "default";
  274. pinctrl-0 = <&uart7_pins_a>;
  275. status = "okay";
  276. };
  277.  
  278. &usbphy {
  279. usb1_vbus-supply = <&reg_usb1_vbus>;
  280. usb2_vbus-supply = <&reg_usb2_vbus>;
  281. status = "okay";
  282. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement