sun6i-a31s-sinovoip-bpi-m2.dts 8.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334
  1. /*
  2. * Copyright 2015 Hans de Goede <[email protected]>
  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 library 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 library 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. /dts-v1/;
  43. #include "sun6i-a31s.dtsi"
  44. #include <dt-bindings/gpio/gpio.h>
  45. / {
  46. model = "Sinovoip BPI-M2";
  47. compatible = "sinovoip,bpi-m2", "allwinner,sun6i-a31s";
  48. aliases {
  49. serial0 = &uart0;
  50. };
  51. chosen {
  52. stdout-path = "serial0:115200n8";
  53. };
  54. leds {
  55. compatible = "gpio-leds";
  56. led-0 {
  57. label = "bpi-m2:blue:usr";
  58. gpios = <&pio 6 11 GPIO_ACTIVE_HIGH>; /* PG11 */
  59. };
  60. led-1 {
  61. label = "bpi-m2:green:usr";
  62. gpios = <&pio 6 10 GPIO_ACTIVE_HIGH>; /* PG10 */
  63. };
  64. led-2 {
  65. label = "bpi-m2:red:usr";
  66. gpios = <&pio 6 5 GPIO_ACTIVE_HIGH>; /* PG5 */
  67. };
  68. };
  69. mmc2_pwrseq: mmc2_pwrseq {
  70. compatible = "mmc-pwrseq-simple";
  71. reset-gpios = <&r_pio 0 8 GPIO_ACTIVE_LOW>; /* PL8 WIFI_EN */
  72. };
  73. };
  74. &cpu0 {
  75. cpu-supply = <&reg_dcdc3>;
  76. };
  77. &ehci0 {
  78. status = "okay";
  79. };
  80. &gmac {
  81. pinctrl-names = "default";
  82. pinctrl-0 = <&gmac_rgmii_pins>;
  83. phy-handle = <&phy1>;
  84. phy-mode = "rgmii";
  85. phy-supply = <&reg_dldo1>;
  86. status = "okay";
  87. };
  88. &ir {
  89. pinctrl-names = "default";
  90. pinctrl-0 = <&s_ir_rx_pin>;
  91. status = "okay";
  92. };
  93. &mdio {
  94. phy1: ethernet-phy@1 {
  95. reg = <1>;
  96. reset-gpios = <&pio 0 21 GPIO_ACTIVE_LOW>; /* PA21 */
  97. reset-assert-us = <10000>;
  98. reset-deassert-us = <30000>;
  99. };
  100. };
  101. &mmc0 {
  102. vmmc-supply = <&reg_dcdc1>;
  103. bus-width = <4>;
  104. cd-gpios = <&pio 0 4 GPIO_ACTIVE_LOW>; /* PA4 */
  105. status = "okay";
  106. };
  107. &mmc2 {
  108. pinctrl-names = "default";
  109. pinctrl-0 = <&mmc2_4bit_pins>;
  110. vmmc-supply = <&reg_aldo1>;
  111. mmc-pwrseq = <&mmc2_pwrseq>;
  112. bus-width = <4>;
  113. non-removable;
  114. status = "okay";
  115. brcmf: wifi@1 {
  116. reg = <1>;
  117. compatible = "brcm,bcm4329-fmac";
  118. interrupt-parent = <&r_pio>;
  119. interrupts = <0 5 IRQ_TYPE_LEVEL_LOW>; /* PL5 */
  120. interrupt-names = "host-wake";
  121. };
  122. };
  123. &ohci0 {
  124. status = "okay";
  125. };
  126. &p2wi {
  127. status = "okay";
  128. axp22x: pmic@68 {
  129. compatible = "x-powers,axp221";
  130. reg = <0x68>;
  131. interrupt-parent = <&r_intc>;
  132. interrupts = <GIC_SPI 32 IRQ_TYPE_LEVEL_LOW>;
  133. eldoin-supply = <&reg_dcdc1>;
  134. x-powers,drive-vbus-en;
  135. };
  136. };
  137. #include "axp22x.dtsi"
  138. &reg_aldo1 {
  139. regulator-min-microvolt = <3300000>;
  140. regulator-max-microvolt = <3300000>;
  141. regulator-name = "vcc-wifi";
  142. };
  143. &reg_aldo2 {
  144. regulator-always-on;
  145. regulator-min-microvolt = <2500000>;
  146. regulator-max-microvolt = <2500000>;
  147. regulator-name = "vcc-gmac";
  148. };
  149. &reg_aldo3 {
  150. regulator-always-on;
  151. regulator-min-microvolt = <3000000>;
  152. regulator-max-microvolt = <3000000>;
  153. regulator-name = "avcc";
  154. };
  155. &reg_dc5ldo {
  156. regulator-always-on;
  157. regulator-min-microvolt = <700000>;
  158. regulator-max-microvolt = <1320000>;
  159. regulator-name = "vdd-cpus";
  160. };
  161. &reg_dcdc1 {
  162. regulator-always-on;
  163. regulator-min-microvolt = <3000000>;
  164. regulator-max-microvolt = <3000000>;
  165. regulator-name = "vdd-3v0";
  166. };
  167. &reg_dcdc2 {
  168. regulator-min-microvolt = <700000>;
  169. regulator-max-microvolt = <1320000>;
  170. regulator-name = "vdd-gpu";
  171. };
  172. &reg_dcdc3 {
  173. regulator-always-on;
  174. regulator-min-microvolt = <700000>;
  175. regulator-max-microvolt = <1320000>;
  176. regulator-name = "vdd-cpu";
  177. };
  178. &reg_dcdc4 {
  179. regulator-always-on;
  180. regulator-min-microvolt = <700000>;
  181. regulator-max-microvolt = <1320000>;
  182. regulator-name = "vdd-sys-dll";
  183. };
  184. &reg_dcdc5 {
  185. regulator-always-on;
  186. regulator-min-microvolt = <1500000>;
  187. regulator-max-microvolt = <1500000>;
  188. regulator-name = "vcc-dram";
  189. };
  190. &reg_dldo1 {
  191. regulator-min-microvolt = <3000000>;
  192. regulator-max-microvolt = <3000000>;
  193. regulator-name = "vcc-mac";
  194. };
  195. &reg_dldo2 {
  196. regulator-min-microvolt = <2800000>;
  197. regulator-max-microvolt = <2800000>;
  198. regulator-name = "avdd-csi";
  199. };
  200. &reg_dldo3 {
  201. regulator-always-on;
  202. regulator-min-microvolt = <3300000>;
  203. regulator-max-microvolt = <3300000>;
  204. regulator-name = "vcc-pb";
  205. };
  206. &reg_eldo1 {
  207. regulator-min-microvolt = <1800000>;
  208. regulator-max-microvolt = <1800000>;
  209. regulator-name = "vdd-csi";
  210. status = "okay";
  211. };
  212. &reg_ldo_io1 {
  213. regulator-always-on;
  214. regulator-min-microvolt = <1800000>;
  215. regulator-max-microvolt = <1800000>;
  216. regulator-name = "vcc-pm-cpus";
  217. status = "okay";
  218. };
  219. &uart0 {
  220. pinctrl-names = "default";
  221. pinctrl-0 = <&uart0_ph_pins>;
  222. status = "okay";
  223. };
  224. &usbphy {
  225. status = "okay";
  226. };
  227. &pio {
  228. gpio-line-names =
  229. /* PA */
  230. "ETXD0", "ETXD1", "ETXD2", "ETXD3", "SDC0-DET", "", "",
  231. "", "ETXCLK", "ETXEN", "EGTXCLK", "ERXD0", "ERXD1",
  232. "ERXD2", "ERXD3", "", "", "", "", "ERXDV", "ERXCK",
  233. "ETXERR", "ERXERR", "ECOL", "ECRS", "ECLKIN", "EMDC",
  234. "EMDIO", "", "", "", "",
  235. /* PB */
  236. "CN7-P29", "CN7-P31", "CN7-P33", "CN7-P35", "CN7-P37",
  237. "CN7-P28", "CN7-P27", "CN7-P32", "", "", "", "", "", "",
  238. "", "", "", "", "", "", "", "", "", "", "", "", "", "",
  239. "", "", "", "",
  240. /* PC */
  241. "", "", "", "", "", "", "WL-SDIO-CMD", "WL-SDIO-CLK",
  242. "WL-SDIO-D0", "WL-SDIO-D2", "WL-SDIO-D2", "WL-SDIO-D3",
  243. "", "", "", "", "", "", "", "", "", "", "", "", "", "",
  244. "", "USB-DRV", "", "", "", "",
  245. /* PD */
  246. "CN9-P09", "CN9-P11", "CN9-P13", "CN9-P15", "CN9-P17",
  247. "CN9-P19", "CN9-P21", "CN9-P23", "CN9-P25", "CN9-P27",
  248. "CN9-P29", "CN9-P31", "CN9-P33", "CN9-P35", "CN9-P37",
  249. "CN9-P39", "CN9-P40", "CN9-P38", "CN9-P36", "CN9-P34",
  250. "CN9-P32", "CN9-P30", "CN9-P28", "CN9-P26", "CN9-P22",
  251. "CN9-P14", "CN9-P18", "CN9-P16", "", "", "", "",
  252. /* PE */
  253. "CN6-P20", "CN6-P24", "CN6-P30", "CN6-P28", "CN7-P08",
  254. "CN7-P10", "CN7-P36", "CN7-P38", "CN6-P17", "CN6-P19",
  255. "CN6-P21", "CN6-P23", "CN6-P25", "CN6-P27", "CN6-P29",
  256. "CN6-P31", "", "", "", "", "", "", "", "", "", "", "",
  257. "", "", "", "", "",
  258. /* PF */
  259. "SDC0-D1", "SDC0-D0", "SDC0-CLK", "SDC0-CMD", "SDC0-D3",
  260. "SDC0-D2", "", "", "", "", "", "", "", "", "", "", "",
  261. "", "", "", "", "", "", "", "", "", "", "", "", "", "",
  262. "",
  263. /* PG */
  264. "CN9-P06", "CN9-P08", "CN9-P20", "CN9-P12", "CN9-P07",
  265. "LED-PWR", "CN7-P13", "CN7-P11", "CN7-P22", "CN7-P15",
  266. "LED-G", "LED-B", "CN7-P26", "CN7-P24", "CN7-P23",
  267. "CN7-P19", "CN7-P21", "HCEC", "CN6-P22", "", "", "", "",
  268. "", "", "", "", "", "", "", "", "",
  269. /* PH */
  270. "", "", "", "", "", "", "", "", "", "CN7-P07",
  271. "CN7-P12", "CN7-P16", "CN7-P18", "CN9-P10", "CN6-P16",
  272. "CN6-P14", "CN9-P04", "CN9-P02", "CN7-P05", "CN7-P03",
  273. "CN8-P03", "CN8-P02", "", "", "CN6-P34", "CN6-P32",
  274. "CN6-P26", "CN6-P18", "", "", "", "";
  275. };
  276. &r_pio {
  277. gpio-line-names =
  278. /* PL */
  279. "PMU-SCK", "PMU-SDA", "VBAT-EN", "", "IR-RX",
  280. "WL-WAKE-HOST", "BT-WAKE_HOST", "BT-ENABLE",
  281. "WL-PMU-EN", "", "", "", "", "", "", "", "", "", "", "",
  282. "", "", "", "", "", "", "", "", "", "", "", "",
  283. /* PM */
  284. "CN6-P12", "CN6-P35", "CN7-P40", "", "", "", "", "", "",
  285. "", "", "", "", "", "", "", "", "", "", "", "", "", "",
  286. "", "", "", "", "", "", "", "", "";
  287. };