qcom-ipq8064-rb3011.dts 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359
  1. // SPDX-License-Identifier: GPL-2.0
  2. #include "qcom-ipq8064.dtsi"
  3. #include <dt-bindings/input/input.h>
  4. #include <dt-bindings/leds/common.h>
  5. / {
  6. model = "MikroTik RB3011UiAS-RM";
  7. compatible = "mikrotik,rb3011";
  8. aliases {
  9. serial0 = &gsbi7_serial;
  10. ethernet0 = &gmac0;
  11. ethernet1 = &gmac3;
  12. mdio-gpio0 = &mdio0;
  13. mdio-gpio1 = &mdio1;
  14. };
  15. chosen {
  16. bootargs = "loglevel=8 console=ttyMSM0,115200";
  17. stdout-path = "serial0:115200n8";
  18. };
  19. memory@42000000 {
  20. reg = <0x42000000 0x3e000000>;
  21. device_type = "memory";
  22. };
  23. mdio0: mdio-0 {
  24. status = "okay";
  25. compatible = "virtual,mdio-gpio";
  26. gpios = <&qcom_pinmux 1 GPIO_ACTIVE_HIGH>,
  27. <&qcom_pinmux 0 GPIO_ACTIVE_HIGH>;
  28. #address-cells = <1>;
  29. #size-cells = <0>;
  30. pinctrl-0 = <&mdio0_pins>;
  31. pinctrl-names = "default";
  32. switch0: switch@10 {
  33. compatible = "qca,qca8337";
  34. #address-cells = <1>;
  35. #size-cells = <0>;
  36. dsa,member = <0 0>;
  37. pinctrl-0 = <&sw0_reset_pin>;
  38. pinctrl-names = "default";
  39. reset-gpios = <&qcom_pinmux 16 GPIO_ACTIVE_LOW>;
  40. reg = <0x10>;
  41. ports {
  42. #address-cells = <1>;
  43. #size-cells = <0>;
  44. switch0cpu: port@0 {
  45. reg = <0>;
  46. label = "cpu";
  47. ethernet = <&gmac0>;
  48. phy-mode = "rgmii-id";
  49. fixed-link {
  50. speed = <1000>;
  51. full-duplex;
  52. };
  53. };
  54. port@1 {
  55. reg = <1>;
  56. label = "sw1";
  57. };
  58. port@2 {
  59. reg = <2>;
  60. label = "sw2";
  61. };
  62. port@3 {
  63. reg = <3>;
  64. label = "sw3";
  65. };
  66. port@4 {
  67. reg = <4>;
  68. label = "sw4";
  69. };
  70. port@5 {
  71. reg = <5>;
  72. label = "sw5";
  73. };
  74. };
  75. };
  76. };
  77. mdio1: mdio-1 {
  78. status = "okay";
  79. compatible = "virtual,mdio-gpio";
  80. gpios = <&qcom_pinmux 11 GPIO_ACTIVE_HIGH>,
  81. <&qcom_pinmux 10 GPIO_ACTIVE_HIGH>;
  82. #address-cells = <1>;
  83. #size-cells = <0>;
  84. pinctrl-0 = <&mdio1_pins>;
  85. pinctrl-names = "default";
  86. switch1: switch@14 {
  87. compatible = "qca,qca8337";
  88. #address-cells = <1>;
  89. #size-cells = <0>;
  90. dsa,member = <1 0>;
  91. pinctrl-0 = <&sw1_reset_pin>;
  92. pinctrl-names = "default";
  93. reset-gpios = <&qcom_pinmux 17 GPIO_ACTIVE_LOW>;
  94. reg = <0x10>;
  95. ports {
  96. #address-cells = <1>;
  97. #size-cells = <0>;
  98. switch1cpu: port@0 {
  99. reg = <0>;
  100. label = "cpu";
  101. ethernet = <&gmac3>;
  102. phy-mode = "sgmii";
  103. fixed-link {
  104. speed = <1000>;
  105. full-duplex;
  106. };
  107. };
  108. port@1 {
  109. reg = <1>;
  110. label = "sw6";
  111. };
  112. port@2 {
  113. reg = <2>;
  114. label = "sw7";
  115. };
  116. port@3 {
  117. reg = <3>;
  118. label = "sw8";
  119. };
  120. port@4 {
  121. reg = <4>;
  122. label = "sw9";
  123. };
  124. port@5 {
  125. reg = <5>;
  126. label = "sw10";
  127. };
  128. };
  129. };
  130. };
  131. soc {
  132. gsbi5: gsbi@1a200000 {
  133. qcom,mode = <GSBI_PROT_SPI>;
  134. status = "okay";
  135. spi4: spi@1a280000 {
  136. status = "okay";
  137. spi-max-frequency = <50000000>;
  138. pinctrl-0 = <&spi_pins>;
  139. pinctrl-names = "default";
  140. cs-gpios = <&qcom_pinmux 20 GPIO_ACTIVE_HIGH>;
  141. norflash: flash@0 {
  142. compatible = "jedec,spi-nor";
  143. #address-cells = <1>;
  144. #size-cells = <1>;
  145. spi-max-frequency = <50000000>;
  146. reg = <0>;
  147. partition@0 {
  148. label = "RouterBoot";
  149. reg = <0x0 0x40000>;
  150. };
  151. };
  152. };
  153. };
  154. gpio-keys {
  155. compatible = "gpio-keys";
  156. pinctrl-0 = <&buttons_pins>;
  157. pinctrl-names = "default";
  158. button {
  159. label = "reset";
  160. linux,code = <KEY_RESTART>;
  161. gpios = <&qcom_pinmux 66 GPIO_ACTIVE_LOW>;
  162. linux,input-type = <1>;
  163. debounce-interval = <60>;
  164. };
  165. };
  166. leds {
  167. compatible = "gpio-leds";
  168. pinctrl-0 = <&leds_pins>;
  169. pinctrl-names = "default";
  170. led@7 {
  171. label = "rb3011:green:user";
  172. color = <LED_COLOR_ID_GREEN>;
  173. gpios = <&qcom_pinmux 33 GPIO_ACTIVE_HIGH>;
  174. default-state = "off";
  175. };
  176. };
  177. };
  178. };
  179. &adm_dma {
  180. status = "okay";
  181. };
  182. &gmac0 {
  183. status = "okay";
  184. phy-mode = "rgmii";
  185. qcom,id = <0>;
  186. phy-handle = <&switch0cpu>;
  187. fixed-link {
  188. speed = <1000>;
  189. full-duplex;
  190. };
  191. };
  192. &gmac3 {
  193. status = "okay";
  194. phy-mode = "sgmii";
  195. qcom,id = <3>;
  196. phy-handle = <&switch1cpu>;
  197. fixed-link {
  198. speed = <1000>;
  199. full-duplex;
  200. };
  201. };
  202. &gsbi7 {
  203. status = "okay";
  204. qcom,mode = <GSBI_PROT_I2C_UART>;
  205. };
  206. &gsbi7_serial {
  207. status = "okay";
  208. };
  209. &hs_phy_1 {
  210. status = "okay";
  211. };
  212. &nand {
  213. status = "okay";
  214. nandcs@0 {
  215. compatible = "qcom,nandcs";
  216. reg = <0>;
  217. nand-ecc-strength = <4>;
  218. nand-bus-width = <8>;
  219. nand-ecc-step-size = <512>;
  220. partitions {
  221. compatible = "fixed-partitions";
  222. #address-cells = <1>;
  223. #size-cells = <1>;
  224. boot@0 {
  225. label = "RouterBoard NAND 1 Boot";
  226. reg = <0x0000000 0x0800000>;
  227. };
  228. main@800000 {
  229. label = "RouterBoard NAND 1 Main";
  230. reg = <0x0800000 0x7800000>;
  231. };
  232. };
  233. };
  234. };
  235. &qcom_pinmux {
  236. buttons_pins: buttons_pins {
  237. mux {
  238. pins = "gpio66";
  239. drive-strength = <16>;
  240. bias-disable;
  241. };
  242. };
  243. leds_pins: leds_pins {
  244. mux {
  245. pins = "gpio33";
  246. drive-strength = <16>;
  247. bias-disable;
  248. };
  249. };
  250. mdio1_pins: mdio1_pins {
  251. mux {
  252. pins = "gpio10", "gpio11";
  253. function = "gpio";
  254. drive-strength = <8>;
  255. bias-disable;
  256. };
  257. };
  258. sw0_reset_pin: sw0_reset_pin {
  259. mux {
  260. pins = "gpio16";
  261. drive-strength = <16>;
  262. function = "gpio";
  263. bias-disable;
  264. input-disable;
  265. };
  266. };
  267. sw1_reset_pin: sw1_reset_pin {
  268. mux {
  269. pins = "gpio17";
  270. drive-strength = <16>;
  271. function = "gpio";
  272. bias-disable;
  273. input-disable;
  274. };
  275. };
  276. usb1_pwr_en_pins: usb1_pwr_en_pins {
  277. mux {
  278. pins = "gpio4";
  279. function = "gpio";
  280. drive-strength = <16>;
  281. bias-disable;
  282. output-high;
  283. };
  284. };
  285. };
  286. &ss_phy_1 {
  287. status = "okay";
  288. };
  289. &usb3_1 {
  290. pinctrl-0 = <&usb1_pwr_en_pins>;
  291. pinctrl-names = "default";
  292. status = "okay";
  293. };