qcom-ipq4029-mr33.dts 7.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393
  1. /*
  2. * Device Tree Source for Meraki MR33 (Stinkbug)
  3. *
  4. * Copyright (C) 2017 Chris Blake <[email protected]>
  5. * Copyright (C) 2017 Christian Lamparter <[email protected]>
  6. *
  7. * Based on Cisco Meraki DTS from GPL release r25-linux-3.14-20170427
  8. *
  9. * This file is licensed under the terms of the GNU General Public
  10. * License version 2. This program is licensed "as is" without
  11. * any warranty of any kind, whether express or implied.
  12. */
  13. #include "qcom-ipq4019.dtsi"
  14. #include <dt-bindings/gpio/gpio.h>
  15. #include <dt-bindings/input/input.h>
  16. #include <dt-bindings/soc/qcom,tcsr.h>
  17. / {
  18. model = "Meraki MR33 Access Point";
  19. compatible = "meraki,mr33", "qcom,ipq4019";
  20. aliases {
  21. led-boot = &status_green;
  22. led-failsafe = &status_red;
  23. led-running = &status_green;
  24. led-upgrade = &power_orange;
  25. };
  26. /* Do we really need this defined? */
  27. memory {
  28. device_type = "memory";
  29. reg = <0x80000000 0x10000000>;
  30. };
  31. soc {
  32. mdio@90000 {
  33. status = "okay";
  34. pinctrl-0 = <&mdio_pins>;
  35. pinctrl-names = "default";
  36. /delete-node/ ethernet-phy@0;
  37. /delete-node/ ethernet-phy@2;
  38. /delete-node/ ethernet-phy@3;
  39. /delete-node/ ethernet-phy@4;
  40. };
  41. /* It is a 56-bit counter that supplies the count to the ARM arch
  42. timers and without upstream driver */
  43. counter@4a1000 {
  44. compatible = "qcom,qca-gcnt";
  45. reg = <0x4a1000 0x4>;
  46. };
  47. ess_tcsr@1953000 {
  48. compatible = "qcom,tcsr";
  49. reg = <0x1953000 0x1000>;
  50. qcom,ess-interface-select = <TCSR_ESS_PSGMII_RGMII5>;
  51. };
  52. tcsr@1949000 {
  53. compatible = "qcom,tcsr";
  54. reg = <0x1949000 0x100>;
  55. qcom,wifi_glb_cfg = <TCSR_WIFI_GLB_CFG>;
  56. };
  57. tcsr@1957000 {
  58. compatible = "qcom,tcsr";
  59. reg = <0x1957000 0x100>;
  60. qcom,wifi_noc_memtype_m0_m2 = <TCSR_WIFI_NOC_MEMTYPE_M0_M2>;
  61. };
  62. serial@78af000 {
  63. pinctrl-0 = <&serial_0_pins>;
  64. pinctrl-names = "default";
  65. status = "okay";
  66. };
  67. serial@78b0000 {
  68. pinctrl-0 = <&serial_1_pins>;
  69. pinctrl-names = "default";
  70. status = "okay";
  71. bluetooth {
  72. compatible = "ti,cc2650";
  73. enable-gpios = <&tlmm 12 GPIO_ACTIVE_LOW>;
  74. };
  75. };
  76. crypto@8e3a000 {
  77. status = "okay";
  78. };
  79. watchdog@b017000 {
  80. status = "okay";
  81. };
  82. ess-switch@c000000 {
  83. switch_mac_mode = <0x3>; /* mac mode for RGMII RMII */
  84. switch_lan_bmp = <0x0>; /* lan port bitmap */
  85. switch_wan_bmp = <0x10>; /* wan port bitmap */
  86. };
  87. edma@c080000 {
  88. qcom,single-phy;
  89. qcom,num_gmac = <1>;
  90. phy-mode = "rgmii-rxid";
  91. status = "okay";
  92. };
  93. };
  94. gpio-keys {
  95. compatible = "gpio-keys";
  96. reset {
  97. label = "reset";
  98. gpios = <&tlmm 18 GPIO_ACTIVE_LOW>;
  99. linux,code = <KEY_RESTART>;
  100. };
  101. };
  102. gpio-leds {
  103. compatible = "gpio-leds";
  104. power_orange: power {
  105. label = "mr33:orange:power";
  106. gpios = <&tlmm 49 GPIO_ACTIVE_LOW>;
  107. panic-indicator;
  108. };
  109. };
  110. };
  111. &blsp_dma {
  112. status = "okay";
  113. };
  114. &cryptobam {
  115. status = "okay";
  116. };
  117. &gmac0 {
  118. qcom,phy_mdio_addr = <1>;
  119. qcom,poll_required = <1>;
  120. vlan_tag = <0 0x20>;
  121. };
  122. &i2c_0 {
  123. pinctrl-0 = <&i2c_0_pins>;
  124. pinctrl-names = "default";
  125. status = "okay";
  126. at24@50 {
  127. compatible = "atmel,24c64";
  128. pagesize = <32>;
  129. reg = <0x50>;
  130. read-only; /* This holds our MAC & Meraki board-data */
  131. };
  132. };
  133. &i2c_1 {
  134. pinctrl-0 = <&i2c_1_pins>;
  135. pinctrl-names = "default";
  136. status = "okay";
  137. lp5562@30 {
  138. enable-gpio = <&tlmm 48 GPIO_ACTIVE_HIGH>;
  139. compatible = "ti,lp5562";
  140. clock-mode = /bits/8 <2>;
  141. reg = <0x30>;
  142. /* RGB led */
  143. status_red: chan0 {
  144. chan-name = "mr33:red:status";
  145. led-cur = /bits/ 8 <0x20>;
  146. max-cur = /bits/ 8 <0x60>;
  147. };
  148. status_green: chan1 {
  149. chan-name = "mr33:green:status";
  150. led-cur = /bits/ 8 <0x20>;
  151. max-cur = /bits/ 8 <0x60>;
  152. };
  153. chan2 {
  154. chan-name = "mr33:blue:status";
  155. led-cur = /bits/ 8 <0x20>;
  156. max-cur = /bits/ 8 <0x60>;
  157. };
  158. chan3 {
  159. chan-name = "mr33:white:status";
  160. led-cur = /bits/ 8 <0x20>;
  161. max-cur = /bits/ 8 <0x60>;
  162. };
  163. };
  164. };
  165. &nand {
  166. pinctrl-0 = <&nand_pins>;
  167. pinctrl-names = "default";
  168. status = "okay";
  169. nand@0 {
  170. partitions {
  171. compatible = "fixed-partitions";
  172. #address-cells = <1>;
  173. #size-cells = <1>;
  174. partition@0 {
  175. label = "sbl1";
  176. reg = <0x000000000000 0x000000100000>;
  177. read-only;
  178. };
  179. partition@1 {
  180. label = "mibib";
  181. reg = <0x000000100000 0x000000100000>;
  182. read-only;
  183. };
  184. partition@2 {
  185. label = "bootconfig";
  186. reg = <0x000000200000 0x000000100000>;
  187. read-only;
  188. };
  189. partition@3 {
  190. label = "qsee";
  191. reg = <0x000000300000 0x000000100000>;
  192. read-only;
  193. };
  194. partition@4 {
  195. label = "qsee_alt";
  196. reg = <0x000000400000 0x000000100000>;
  197. read-only;
  198. };
  199. partition@5 {
  200. label = "cdt";
  201. reg = <0x000000500000 0x000000080000>;
  202. read-only;
  203. };
  204. partition@6 {
  205. label = "cdt_alt";
  206. reg = <0x000000580000 0x000000080000>;
  207. read-only;
  208. };
  209. partition@7 {
  210. label = "ddrparams";
  211. reg = <0x000000600000 0x000000080000>;
  212. read-only;
  213. };
  214. partition@8 {
  215. label = "u-boot";
  216. reg = <0x000000700000 0x000000200000>;
  217. read-only;
  218. };
  219. partition@9 {
  220. label = "u-boot-backup";
  221. reg = <0x000000900000 0x000000200000>;
  222. read-only;
  223. };
  224. partition@10 {
  225. label = "ART";
  226. reg = <0x000000b00000 0x000000080000>;
  227. read-only;
  228. };
  229. partition@11 {
  230. label = "ubi";
  231. reg = <0x000000c00000 0x000007000000>;
  232. };
  233. };
  234. };
  235. };
  236. &pcie0 {
  237. status = "okay";
  238. perst-gpio = <&tlmm 38 GPIO_ACTIVE_LOW>;
  239. wake-gpio = <&tlmm 50 GPIO_ACTIVE_LOW>;
  240. bridge@0,0 {
  241. reg = <0x00000000 0 0 0 0>;
  242. #address-cells = <3>;
  243. #size-cells = <2>;
  244. ranges;
  245. wifi2: wifi@0,0 {
  246. compatible = "qcom,ath10k";
  247. status = "okay";
  248. reg = <0x00010000 0 0 0 0>;
  249. };
  250. };
  251. };
  252. &qpic_bam {
  253. status = "okay";
  254. };
  255. &tlmm {
  256. /*
  257. * GPIO43 should be 0/1 whenever the unit is
  258. * powered through PoE or AC-Adapter.
  259. * That said, playing with this seems to
  260. * reset the AP.
  261. */
  262. mdio_pins: mdio_pinmux {
  263. mux_1 {
  264. pins = "gpio6";
  265. function = "mdio";
  266. bias-pull-up;
  267. };
  268. mux_2 {
  269. pins = "gpio7";
  270. function = "mdc";
  271. bias-pull-up;
  272. };
  273. };
  274. serial_0_pins: serial_pinmux {
  275. mux {
  276. pins = "gpio16", "gpio17";
  277. function = "blsp_uart0";
  278. bias-disable;
  279. };
  280. };
  281. serial_1_pins: serial1_pinmux {
  282. mux {
  283. /* We use the i2c-0 pins for serial_1 */
  284. pins = "gpio8", "gpio9";
  285. function = "blsp_uart1";
  286. bias-disable;
  287. };
  288. };
  289. i2c_0_pins: i2c_0_pinmux {
  290. pinmux {
  291. function = "blsp_i2c0";
  292. pins = "gpio20", "gpio21";
  293. };
  294. pinconf {
  295. pins = "gpio20", "gpio21";
  296. drive-strength = <16>;
  297. bias-disable;
  298. };
  299. };
  300. i2c_1_pins: i2c_1_pinmux {
  301. pinmux {
  302. function = "blsp_i2c1";
  303. pins = "gpio34", "gpio35";
  304. };
  305. pinconf {
  306. pins = "gpio34", "gpio35";
  307. drive-strength = <16>;
  308. bias-disable;
  309. };
  310. };
  311. nand_pins: nand_pins {
  312. /*
  313. * There are 18 pins. 15 pins are common between LCD and NAND.
  314. * The QPIC controller arbitrates between LCD and NAND. Of the
  315. * remaining 4, 2 are for NAND and 2 are for LCD exclusively.
  316. *
  317. * The meraki source hints that the bluetooth module claims
  318. * pin 52 as well. But sadly, there's no data whenever this
  319. * is a NAND or LCD exclusive pin or not.
  320. */
  321. pullups {
  322. pins = "gpio52", "gpio53", "gpio58",
  323. "gpio59";
  324. function = "qpic";
  325. bias-pull-up;
  326. };
  327. pulldowns {
  328. pins = "gpio54", "gpio55", "gpio56",
  329. "gpio57", "gpio60", "gpio61",
  330. "gpio62", "gpio63", "gpio64",
  331. "gpio65", "gpio66", "gpio67",
  332. "gpio68", "gpio69";
  333. function = "qpic";
  334. bias-pull-down;
  335. };
  336. };
  337. };
  338. &wifi0 {
  339. status = "okay";
  340. qcom,ath10k-calibration-variant = "Meraki-MR33";
  341. };
  342. &wifi1 {
  343. status = "okay";
  344. qcom,ath10k-calibration-variant = "Meraki-MR33";
  345. };