Advertisement
Guest User

Untitled

a guest
May 23rd, 2016
253
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.60 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. pcm5102: pcm510x {
  67. compatible = "ti,pcm510x";
  68. pcm510x,format = "i2s";
  69. #sound-dai-cells = <0>;
  70. };
  71.  
  72. sound_i2s {
  73. compatible = "simple-audio-card";
  74. simple-audio-card,format = "i2s";
  75. simple-audio-card,name = "uda1380 Card";
  76. simple-audio-card,routing =
  77. "Headphone Jack", "VOUTLHP",
  78. "Headphone Jack", "VOUTRHP",
  79. "Line Out Jack", "VOUTL",
  80. "Line Out Jack", "VOUTR",
  81. "VINM", "Mic Jack",
  82. "VINL", "Line In Jack",
  83. "VINR", "Line In Jack";
  84. simple-audio-card,widgets =
  85. "Headphone", "Headphone Jack",
  86. "Line", "Line In Jack",
  87. "Line", "Line Out Jack",
  88. "Microphone", "Mic Jack";
  89.  
  90. //simple-audio-card,mclk-fs = <256>; // as it's not supported in dai codec driver, see asoc_simple_card_hw_params() in sound/soc/generic/simple-card.c
  91.  
  92. simple-audio-card,cpu {
  93. sound-dai = <&i2s0>;
  94. };
  95.  
  96. simple-audio-card,codec {
  97. sound-dai = <&ext_codec>;
  98. };
  99. };
  100.  
  101. /*
  102. sound {
  103. compatible = "simple-audio-card";
  104. simple-audio-card,name = "A20-Audio";
  105.  
  106. simple-audio-card,dai-link@0 {
  107. format = "i2s";
  108. cpu {
  109. sound-dai = <&i2s0>;
  110. };
  111.  
  112. codec {
  113. sound-dai = <&pcm5102>;
  114. };
  115. };
  116. simple-audio-card,dai-link@1 {
  117. cpu {
  118. sound-dai = <&spdif>;
  119. };
  120.  
  121. codec {
  122. sound-dai = <&spdif_out>;
  123. };
  124. };
  125. };
  126. */
  127. spdif_out: spdif-out {
  128. compatible = "linux,spdif-dit";
  129. #sound-dai-cells = <0>;
  130. };
  131. };
  132.  
  133. &ahci {
  134. status = "okay";
  135. };
  136.  
  137. &ehci0 {
  138. status = "okay";
  139. };
  140.  
  141. &ehci1 {
  142. status = "okay";
  143. };
  144.  
  145. &ohci0 {
  146. status = "okay";
  147. };
  148.  
  149. &ohci1 {
  150. status = "okay";
  151. };
  152.  
  153. &gmac {
  154. pinctrl-names = "default";
  155. pinctrl-0 = <&gmac_pins_rgmii_a>;
  156. phy = <&phy1>;
  157. phy-mode = "rgmii";
  158. phy-supply = <&reg_gmac_3v3>;
  159. status = "okay";
  160.  
  161. phy1: ethernet-phy@1 {
  162. reg = <1>;
  163. };
  164. };
  165.  
  166. &i2c0 {
  167. pinctrl-names = "default";
  168. pinctrl-0 = <&i2c0_pins_a>;
  169. status = "okay";
  170.  
  171. axp209: pmic@34 {
  172. compatible = "x-powers,axp209";
  173. reg = <0x34>;
  174. interrupt-parent = <&nmi_intc>;
  175. interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
  176.  
  177. interrupt-controller;
  178. #interrupt-cells = <1>;
  179. };
  180. };
  181.  
  182. &i2c1 {
  183. pinctrl-names = "default";
  184. pinctrl-0 = <&i2c1_pins_a>;
  185. status = "okay";
  186.  
  187. /* added for test with I2S waveshare codec board based on UDA1380 */
  188. ext_codec: uda1380@18 {
  189. #sound-dai-cells = <0>; /* added for dmesg err: "could not get #sound-dai-cells for " */
  190. compatible = "nxp,uda1380";
  191. reg = <0x18>;
  192. /* reset-gpio = <&pio 7 3 GPIO_ACTIVE_HIGH>; */
  193. /*
  194. * commented out so uda1380_probe move forward..
  195. * otherwise get: asoc-simple-card sound: ASoC: failed to instantiate card -16
  196. * power-gpio = <&pio 7 11 GPIO_ACTIVE_HIGH>;
  197. */
  198. dac-clk = <1>; // SYSCLK=0, WSPLL=1
  199. };
  200. };
  201.  
  202. &i2c2 {
  203. pinctrl-names = "default";
  204. pinctrl-0 = <&i2c2_pins_a>;
  205. status = "okay";
  206. };
  207.  
  208. &ir0 {
  209. pinctrl-names = "default";
  210. pinctrl-0 = <&ir0_rx_pins_a>;
  211. status = "okay";
  212. };
  213.  
  214. &mmc0 {
  215. pinctrl-names = "default";
  216. pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_bananapi>;
  217. vmmc-supply = <&reg_vcc3v3>;
  218. bus-width = <4>;
  219. cd-gpios = <&pio 7 10 GPIO_ACTIVE_HIGH>; /* PH10 */
  220. cd-inverted;
  221. status = "okay";
  222. };
  223.  
  224. &mmc3 {
  225. #address-cells = <1>;
  226. #size-cells = <0>;
  227. pinctrl-names = "default";
  228. pinctrl-0 = <&mmc3_pins_a>;
  229. vmmc-supply = <&reg_vmmc3>;
  230. bus-width = <4>;
  231. non-removable;
  232. enable-sdio-wakeup;
  233. status = "okay";
  234.  
  235. brcmf: bcrmf@1 {
  236. reg = <1>;
  237. compatible = "brcm,bcm4329-fmac";
  238. interrupt-parent = <&pio>;
  239. interrupts = <7 15 IRQ_TYPE_LEVEL_LOW>;
  240. interrupt-names = "host-wake";
  241. };
  242.  
  243. };
  244.  
  245. &mmc3_pins_a {
  246. /* AP6210 requires pull-up */
  247. allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
  248. };
  249.  
  250. &pio {
  251. gmac_power_pin_bananapi: gmac_power_pin@0 {
  252. allwinner,pins = "PH23";
  253. allwinner,function = "gpio_out";
  254. allwinner,drive = <SUN4I_PINCTRL_10_MA>;
  255. allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
  256. };
  257.  
  258. led_pins_bananapi: led_pins@0 {
  259. allwinner,pins = "PH24", "PG2";
  260. allwinner,function = "gpio_out";
  261. allwinner,drive = <SUN4I_PINCTRL_10_MA>;
  262. allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
  263. };
  264.  
  265. mmc0_cd_pin_bananapi: mmc0_cd_pin@0 {
  266. allwinner,pins = "PH10";
  267. allwinner,function = "gpio_in";
  268. allwinner,drive = <SUN4I_PINCTRL_10_MA>;
  269. allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
  270. };
  271.  
  272. usb1_vbus_pin_bananapi: usb1_vbus_pin@0 {
  273. allwinner,pins = "PH0";
  274. allwinner,function = "gpio_out";
  275. allwinner,drive = <SUN4I_PINCTRL_10_MA>;
  276. allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
  277. };
  278.  
  279. usb2_vbus_pin_bananapi: usb2_vbus_pin@0 {
  280. allwinner,pins = "PH1";
  281. allwinner,function = "gpio_out";
  282. allwinner,drive = <SUN4I_PINCTRL_10_MA>;
  283. allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
  284. };
  285.  
  286. vmmc3_pin_bananapi: vmmc3_pin@0 {
  287. allwinner,pins = "PH22";
  288. allwinner,function = "gpio_out";
  289. allwinner,drive = <SUN4I_PINCTRL_10_MA>;
  290. allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
  291. };
  292. };
  293.  
  294. &reg_usb1_vbus {
  295. pinctrl-0 = <&usb1_vbus_pin_bananapi>;
  296. gpio = <&pio 7 0 GPIO_ACTIVE_HIGH>; /* PH0 */
  297. status = "okay";
  298. };
  299.  
  300. &i2s0 {
  301. pinctrl-names = "default";
  302. pinctrl-0 = <&i2s0_bclk> , <&i2s0_lrclk> , <&i2s0_sdo0>;
  303. status = "okay";
  304. };
  305. &codec {
  306. status = "okay";
  307. };
  308. &reg_usb2_vbus {
  309. pinctrl-0 = <&usb2_vbus_pin_bananapi>;
  310. gpio = <&pio 7 1 GPIO_ACTIVE_HIGH>; /* PH1 */
  311. status = "okay";
  312. };
  313.  
  314. &spi0 {
  315. pinctrl-names = "default";
  316. pinctrl-0 = <&spi0_pins_a>,
  317. <&spi0_cs0_pins_a>,
  318. <&spi0_cs1_pins_a>;
  319. status = "okay";
  320. };
  321.  
  322. &uart0 {
  323. pinctrl-names = "default";
  324. pinctrl-0 = <&uart0_pins_a>;
  325. status = "okay";
  326. };
  327.  
  328. &uart2 {
  329. pinctrl-names = "default";
  330. pinctrl-0 = <&uart2_pins_a>;
  331. status = "okay";
  332. };
  333.  
  334. &uart3 {
  335. pinctrl-names = "default";
  336. pinctrl-0 = <&uart3_pins_b>;
  337. status = "okay";
  338. };
  339.  
  340. &uart7 {
  341. pinctrl-names = "default";
  342. pinctrl-0 = <&uart7_pins_a>;
  343. status = "okay";
  344. };
  345.  
  346. &usbphy {
  347. usb1_vbus-supply = <&reg_usb1_vbus>;
  348. usb2_vbus-supply = <&reg_usb2_vbus>;
  349. status = "okay";
  350. };
  351. &spdif {
  352. compatible = "allwinner,sun4i-a10-spdif";
  353. reg = <0x01c21000 0x40>;
  354. interrupts = <13>;
  355. clocks = <&apb0_gates 1>, <&spdif_clk>;
  356. clock-names = "apb", "spdif";
  357. dmas = <&dma 0 2>, <&dma 0 2>;
  358. dma-names = "rx", "tx";
  359. status = "okay";
  360. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement