Advertisement
Guest User

Untitled

a guest
May 16th, 2016
130
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. pcm5102: pcm510x {
  66. compatible = "ti,pcm510x";
  67. pcm510x,format = "i2s";
  68. #sound-dai-cells = <0>;
  69. };
  70.  
  71. sound {
  72. compatible = "simple-audio-card";
  73. simple-audio-card,format = "i2s";
  74.  
  75. simple-audio-card,cpu {
  76. sound-dai = <&i2s0>;
  77. };
  78.  
  79. simple-audio-card,codec {
  80. sound-dai = <&pcm5102>;
  81. };
  82. };
  83. };
  84.  
  85. &ahci {
  86. status = "okay";
  87. };
  88.  
  89. &ehci0 {
  90. status = "okay";
  91. };
  92.  
  93. &ehci1 {
  94. status = "okay";
  95. };
  96.  
  97. &ohci0 {
  98. status = "okay";
  99. };
  100.  
  101. &ohci1 {
  102. status = "okay";
  103. };
  104.  
  105. &gmac {
  106. pinctrl-names = "default";
  107. pinctrl-0 = <&gmac_pins_rgmii_a>;
  108. phy = <&phy1>;
  109. phy-mode = "rgmii";
  110. phy-supply = <&reg_gmac_3v3>;
  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. compatible = "x-powers,axp209";
  125. reg = <0x34>;
  126. interrupt-parent = <&nmi_intc>;
  127. interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
  128.  
  129. interrupt-controller;
  130. #interrupt-cells = <1>;
  131. };
  132. };
  133.  
  134. &i2c2 {
  135. pinctrl-names = "default";
  136. pinctrl-0 = <&i2c2_pins_a>;
  137. status = "okay";
  138. };
  139.  
  140. &ir0 {
  141. pinctrl-names = "default";
  142. pinctrl-0 = <&ir0_rx_pins_a>;
  143. status = "okay";
  144. };
  145.  
  146. &mmc0 {
  147. pinctrl-names = "default";
  148. pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_bananapi>;
  149. vmmc-supply = <&reg_vcc3v3>;
  150. bus-width = <4>;
  151. cd-gpios = <&pio 7 10 GPIO_ACTIVE_HIGH>; /* PH10 */
  152. cd-inverted;
  153. status = "okay";
  154. };
  155.  
  156. &mmc3 {
  157. #address-cells = <1>;
  158. #size-cells = <0>;
  159. pinctrl-names = "default";
  160. pinctrl-0 = <&mmc3_pins_a>;
  161. vmmc-supply = <&reg_vmmc3>;
  162. bus-width = <4>;
  163. non-removable;
  164. enable-sdio-wakeup;
  165. status = "okay";
  166.  
  167. brcmf: bcrmf@1 {
  168. reg = <1>;
  169. compatible = "brcm,bcm4329-fmac";
  170. interrupt-parent = <&pio>;
  171. interrupts = <7 15 IRQ_TYPE_LEVEL_LOW>;
  172. interrupt-names = "host-wake";
  173. };
  174.  
  175. };
  176.  
  177. &mmc3_pins_a {
  178. /* AP6210 requires pull-up */
  179. allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
  180. };
  181.  
  182. &pio {
  183. gmac_power_pin_bananapi: gmac_power_pin@0 {
  184. allwinner,pins = "PH23";
  185. allwinner,function = "gpio_out";
  186. allwinner,drive = <SUN4I_PINCTRL_10_MA>;
  187. allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
  188. };
  189.  
  190. led_pins_bananapi: led_pins@0 {
  191. allwinner,pins = "PH24", "PG2";
  192. allwinner,function = "gpio_out";
  193. allwinner,drive = <SUN4I_PINCTRL_10_MA>;
  194. allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
  195. };
  196.  
  197. mmc0_cd_pin_bananapi: mmc0_cd_pin@0 {
  198. allwinner,pins = "PH10";
  199. allwinner,function = "gpio_in";
  200. allwinner,drive = <SUN4I_PINCTRL_10_MA>;
  201. allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
  202. };
  203.  
  204. usb1_vbus_pin_bananapi: usb1_vbus_pin@0 {
  205. allwinner,pins = "PH0";
  206. allwinner,function = "gpio_out";
  207. allwinner,drive = <SUN4I_PINCTRL_10_MA>;
  208. allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
  209. };
  210.  
  211. usb2_vbus_pin_bananapi: usb2_vbus_pin@0 {
  212. allwinner,pins = "PH1";
  213. allwinner,function = "gpio_out";
  214. allwinner,drive = <SUN4I_PINCTRL_10_MA>;
  215. allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
  216. };
  217.  
  218. vmmc3_pin_bananapi: vmmc3_pin@0 {
  219. allwinner,pins = "PH22";
  220. allwinner,function = "gpio_out";
  221. allwinner,drive = <SUN4I_PINCTRL_10_MA>;
  222. allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
  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