mt7623n-bananapi-bpi-r2.dts 6.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442
  1. /*
  2. * Copyright 2017-2018 Sean Wang <[email protected]>
  3. *
  4. * SPDX-License-Identifier: (GPL-2.0+ OR MIT)
  5. */
  6. /dts-v1/;
  7. #include <dt-bindings/input/input.h>
  8. #include "mt7623n.dtsi"
  9. #include "mt6323.dtsi"
  10. / {
  11. model = "Bananapi BPI-R2";
  12. compatible = "bananapi,bpi-r2", "mediatek,mt7623";
  13. aliases {
  14. serial2 = &uart2;
  15. };
  16. chosen {
  17. stdout-path = "serial2:115200n8";
  18. };
  19. connector {
  20. compatible = "hdmi-connector";
  21. label = "hdmi";
  22. type = "d";
  23. ddc-i2c-bus = <&hdmiddc0>;
  24. port {
  25. hdmi_connector_in: endpoint {
  26. remote-endpoint = <&hdmi0_out>;
  27. };
  28. };
  29. };
  30. cpus {
  31. cpu@0 {
  32. proc-supply = <&mt6323_vproc_reg>;
  33. };
  34. cpu@1 {
  35. proc-supply = <&mt6323_vproc_reg>;
  36. };
  37. cpu@2 {
  38. proc-supply = <&mt6323_vproc_reg>;
  39. };
  40. cpu@3 {
  41. proc-supply = <&mt6323_vproc_reg>;
  42. };
  43. };
  44. reg_1p8v: regulator-1p8v {
  45. compatible = "regulator-fixed";
  46. regulator-name = "fixed-1.8V";
  47. regulator-min-microvolt = <1800000>;
  48. regulator-max-microvolt = <1800000>;
  49. regulator-boot-on;
  50. regulator-always-on;
  51. };
  52. reg_3p3v: regulator-3p3v {
  53. compatible = "regulator-fixed";
  54. regulator-name = "fixed-3.3V";
  55. regulator-min-microvolt = <3300000>;
  56. regulator-max-microvolt = <3300000>;
  57. regulator-boot-on;
  58. regulator-always-on;
  59. };
  60. reg_5v: regulator-5v {
  61. compatible = "regulator-fixed";
  62. regulator-name = "fixed-5V";
  63. regulator-min-microvolt = <5000000>;
  64. regulator-max-microvolt = <5000000>;
  65. regulator-boot-on;
  66. regulator-always-on;
  67. };
  68. reg_vgpu: fixedregulator@0 {
  69. compatible = "regulator-fixed";
  70. regulator-name = "vdd_fixed_vgpu";
  71. regulator-min-microvolt = <1150000>;
  72. regulator-max-microvolt = <1150000>;
  73. };
  74. gpio-keys {
  75. compatible = "gpio-keys";
  76. pinctrl-names = "default";
  77. pinctrl-0 = <&key_pins_a>;
  78. button-factory {
  79. label = "factory";
  80. linux,code = <BTN_0>;
  81. gpios = <&pio 256 GPIO_ACTIVE_LOW>;
  82. };
  83. button-wps {
  84. label = "wps";
  85. linux,code = <KEY_WPS_BUTTON>;
  86. gpios = <&pio 257 GPIO_ACTIVE_HIGH>;
  87. };
  88. };
  89. leds {
  90. compatible = "gpio-leds";
  91. pinctrl-names = "default";
  92. pinctrl-0 = <&led_pins_a>;
  93. blue {
  94. label = "bpi-r2:pio:blue";
  95. gpios = <&pio 240 GPIO_ACTIVE_LOW>;
  96. default-state = "off";
  97. };
  98. green {
  99. label = "bpi-r2:pio:green";
  100. gpios = <&pio 241 GPIO_ACTIVE_LOW>;
  101. default-state = "off";
  102. };
  103. red {
  104. label = "bpi-r2:pio:red";
  105. gpios = <&pio 239 GPIO_ACTIVE_LOW>;
  106. default-state = "off";
  107. };
  108. };
  109. memory@80000000 {
  110. device_type = "memory";
  111. reg = <0 0x80000000 0 0x80000000>;
  112. };
  113. };
  114. &bls {
  115. status = "okay";
  116. };
  117. &btif {
  118. status = "okay";
  119. };
  120. &cec {
  121. status = "okay";
  122. };
  123. &cir {
  124. pinctrl-names = "default";
  125. pinctrl-0 = <&cir_pins_a>;
  126. status = "okay";
  127. };
  128. &crypto {
  129. status = "okay";
  130. };
  131. &dpi0 {
  132. status = "okay";
  133. ports {
  134. #address-cells = <1>;
  135. #size-cells = <0>;
  136. port@0 {
  137. reg = <0>;
  138. dpi0_out: endpoint {
  139. remote-endpoint = <&hdmi0_in>;
  140. };
  141. };
  142. };
  143. };
  144. &eth {
  145. status = "okay";
  146. gmac0: mac@0 {
  147. compatible = "mediatek,eth-mac";
  148. reg = <0>;
  149. phy-mode = "trgmii";
  150. fixed-link {
  151. speed = <1000>;
  152. full-duplex;
  153. pause;
  154. };
  155. };
  156. mdio: mdio-bus {
  157. #address-cells = <1>;
  158. #size-cells = <0>;
  159. switch@0 {
  160. compatible = "mediatek,mt7530";
  161. reg = <0>;
  162. reset-gpios = <&pio 33 0>;
  163. core-supply = <&mt6323_vpa_reg>;
  164. io-supply = <&mt6323_vemc3v3_reg>;
  165. ports {
  166. #address-cells = <1>;
  167. #size-cells = <0>;
  168. port@0 {
  169. reg = <0>;
  170. label = "wan";
  171. };
  172. port@1 {
  173. reg = <1>;
  174. label = "lan0";
  175. };
  176. port@2 {
  177. reg = <2>;
  178. label = "lan1";
  179. };
  180. port@3 {
  181. reg = <3>;
  182. label = "lan2";
  183. };
  184. port@4 {
  185. reg = <4>;
  186. label = "lan3";
  187. };
  188. port@6 {
  189. reg = <6>;
  190. label = "cpu";
  191. ethernet = <&gmac0>;
  192. phy-mode = "trgmii";
  193. fixed-link {
  194. speed = <1000>;
  195. full-duplex;
  196. pause;
  197. };
  198. };
  199. };
  200. };
  201. };
  202. };
  203. &hdmi0 {
  204. pinctrl-names = "default";
  205. pinctrl-0 = <&hdmi_pins_a>;
  206. status = "okay";
  207. ports {
  208. #address-cells = <1>;
  209. #size-cells = <0>;
  210. port@0 {
  211. reg = <0>;
  212. hdmi0_in: endpoint {
  213. remote-endpoint = <&dpi0_out>;
  214. };
  215. };
  216. port@1 {
  217. reg = <1>;
  218. hdmi0_out: endpoint {
  219. remote-endpoint = <&hdmi_connector_in>;
  220. };
  221. };
  222. };
  223. };
  224. &hdmiddc0 {
  225. pinctrl-names = "default";
  226. pinctrl-0 = <&hdmi_ddc_pins_a>;
  227. status = "okay";
  228. };
  229. &hdmi_phy {
  230. mediatek,ibias = <0xa>;
  231. mediatek,ibias_up = <0x1c>;
  232. status = "okay";
  233. };
  234. &i2c0 {
  235. pinctrl-names = "default";
  236. pinctrl-0 = <&i2c0_pins_a>;
  237. status = "okay";
  238. };
  239. &i2c1 {
  240. pinctrl-names = "default";
  241. pinctrl-0 = <&i2c1_pins_a>;
  242. status = "okay";
  243. };
  244. &mali {
  245. mali-supply = <&reg_vgpu>;
  246. status = "okay";
  247. };
  248. &mmc0 {
  249. pinctrl-names = "default", "state_uhs";
  250. pinctrl-0 = <&mmc0_pins_default>;
  251. pinctrl-1 = <&mmc0_pins_uhs>;
  252. status = "okay";
  253. bus-width = <8>;
  254. max-frequency = <50000000>;
  255. cap-mmc-highspeed;
  256. vmmc-supply = <&reg_3p3v>;
  257. vqmmc-supply = <&reg_1p8v>;
  258. non-removable;
  259. };
  260. &mmc1 {
  261. pinctrl-names = "default", "state_uhs";
  262. pinctrl-0 = <&mmc1_pins_default>;
  263. pinctrl-1 = <&mmc1_pins_uhs>;
  264. status = "okay";
  265. bus-width = <4>;
  266. max-frequency = <50000000>;
  267. cap-sd-highspeed;
  268. cd-gpios = <&pio 261 GPIO_ACTIVE_LOW>;
  269. vmmc-supply = <&reg_3p3v>;
  270. vqmmc-supply = <&reg_3p3v>;
  271. };
  272. &mt6323_leds {
  273. status = "okay";
  274. led@0 {
  275. reg = <0>;
  276. label = "bpi-r2:isink:green";
  277. default-state = "off";
  278. };
  279. led@1 {
  280. reg = <1>;
  281. label = "bpi-r2:isink:red";
  282. default-state = "off";
  283. };
  284. led@2 {
  285. reg = <2>;
  286. label = "bpi-r2:isink:blue";
  287. default-state = "off";
  288. };
  289. };
  290. &pcie {
  291. pinctrl-names = "default";
  292. pinctrl-0 = <&pcie_default>;
  293. status = "okay";
  294. pcie@0,0 {
  295. status = "okay";
  296. };
  297. pcie@1,0 {
  298. status = "okay";
  299. };
  300. };
  301. &pcie0_phy {
  302. status = "okay";
  303. };
  304. &pcie1_phy {
  305. status = "okay";
  306. };
  307. &pio {
  308. musb_pins: musb {
  309. pins-musb {
  310. pinmux = <MT7623_PIN_237_EXT_SDIO2_FUNC_DRV_VBUS>;
  311. };
  312. };
  313. };
  314. &pwm {
  315. pinctrl-names = "default";
  316. pinctrl-0 = <&pwm_pins_a>;
  317. status = "okay";
  318. };
  319. &spi0 {
  320. pinctrl-names = "default";
  321. pinctrl-0 = <&spi0_pins_a>;
  322. status = "okay";
  323. };
  324. &uart0 {
  325. pinctrl-names = "default";
  326. pinctrl-0 = <&uart0_pins_a>;
  327. status = "okay";
  328. };
  329. &uart1 {
  330. pinctrl-names = "default";
  331. pinctrl-0 = <&uart1_pins_a>;
  332. status = "okay";
  333. };
  334. &uart2 {
  335. pinctrl-names = "default";
  336. pinctrl-0 = <&uart2_pins_a>;
  337. status = "okay";
  338. };
  339. &usb0 {
  340. pinctrl-names = "default";
  341. pinctrl-0 = <&musb_pins>;
  342. status = "okay";
  343. usb-role-switch;
  344. connector {
  345. compatible = "gpio-usb-b-connector", "usb-b-connector";
  346. type = "micro";
  347. id-gpios = <&pio 44 GPIO_ACTIVE_HIGH>;
  348. };
  349. };
  350. &usb1 {
  351. vusb33-supply = <&reg_3p3v>;
  352. vbus-supply = <&reg_5v>;
  353. status = "okay";
  354. };
  355. &usb2 {
  356. vusb33-supply = <&reg_3p3v>;
  357. vbus-supply = <&reg_5v>;
  358. status = "okay";
  359. };
  360. &u2phy1 {
  361. status = "okay";
  362. };
  363. &u3phy1 {
  364. status = "okay";
  365. };
  366. &u3phy2 {
  367. status = "okay";
  368. };