qcom-ipq4029-insect-common.dtsi 8.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443
  1. // SPDX-License-Identifier: GPL-2.0-only
  2. /*
  3. * Device Tree Source for Meraki "Insect" series
  4. *
  5. * Copyright (C) 2017 Chris Blake <[email protected]>
  6. * Copyright (C) 2017 Christian Lamparter <[email protected]>
  7. *
  8. * Based on Cisco Meraki DTS from GPL release r25-linux-3.14-20170427
  9. *
  10. * This file is licensed under the terms of the GNU General Public
  11. * License version 2. This program is licensed "as is" without
  12. * any warranty of any kind, whether express or implied.
  13. */
  14. #include "qcom-ipq4019.dtsi"
  15. #include <dt-bindings/gpio/gpio.h>
  16. #include <dt-bindings/input/input.h>
  17. #include <dt-bindings/soc/qcom,tcsr.h>
  18. #include <dt-bindings/leds/common.h>
  19. / {
  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. rng@22000 {
  33. status = "okay";
  34. };
  35. mdio@90000 {
  36. status = "okay";
  37. pinctrl-0 = <&mdio_pins>;
  38. pinctrl-names = "default";
  39. };
  40. /* It is a 56-bit counter that supplies the count to the ARM arch
  41. timers and without upstream driver */
  42. counter@4a1000 {
  43. compatible = "qcom,qca-gcnt";
  44. reg = <0x4a1000 0x4>;
  45. };
  46. ess_tcsr@1953000 {
  47. compatible = "qcom,tcsr";
  48. reg = <0x1953000 0x1000>;
  49. qcom,ess-interface-select = <TCSR_ESS_PSGMII_RGMII5>;
  50. };
  51. tcsr@1949000 {
  52. compatible = "qcom,tcsr";
  53. reg = <0x1949000 0x100>;
  54. qcom,wifi_glb_cfg = <TCSR_WIFI_GLB_CFG>;
  55. };
  56. tcsr@1957000 {
  57. compatible = "qcom,tcsr";
  58. reg = <0x1957000 0x100>;
  59. qcom,wifi_noc_memtype_m0_m2 = <TCSR_WIFI_NOC_MEMTYPE_M0_M2>;
  60. };
  61. serial@78b0000 {
  62. pinctrl-0 = <&serial_1_pins>;
  63. pinctrl-names = "default";
  64. status = "okay";
  65. bluetooth {
  66. compatible = "ti,cc2650";
  67. enable-gpios = <&tlmm 12 GPIO_ACTIVE_LOW>;
  68. };
  69. };
  70. crypto@8e3a000 {
  71. status = "okay";
  72. };
  73. watchdog@b017000 {
  74. status = "okay";
  75. };
  76. };
  77. keys {
  78. compatible = "gpio-keys";
  79. reset {
  80. label = "reset";
  81. gpios = <&tlmm 18 GPIO_ACTIVE_LOW>;
  82. linux,code = <KEY_RESTART>;
  83. };
  84. };
  85. leds {
  86. compatible = "gpio-leds";
  87. power_orange: power {
  88. label = "orange:power";
  89. gpios = <&tlmm 49 GPIO_ACTIVE_LOW>;
  90. panic-indicator;
  91. };
  92. };
  93. };
  94. &blsp_dma {
  95. status = "okay";
  96. };
  97. &blsp1_uart1 {
  98. pinctrl-0 = <&serial_0_pins>;
  99. pinctrl-names = "default";
  100. status = "okay";
  101. };
  102. &cryptobam {
  103. status = "okay";
  104. };
  105. &blsp1_i2c3 {
  106. pinctrl-0 = <&i2c_0_pins>;
  107. pinctrl-names = "default";
  108. status = "okay";
  109. eeprom@50 {
  110. compatible = "atmel,24c64";
  111. pagesize = <32>;
  112. reg = <0x50>;
  113. read-only; /* This holds our MAC & Meraki board-data */
  114. #address-cells = <1>;
  115. #size-cells = <1>;
  116. mac_address: mac-address@66 {
  117. compatible = "mac-base";
  118. reg = <0x66 0x6>;
  119. #nvmem-cell-cells = <1>;
  120. };
  121. };
  122. };
  123. &blsp1_i2c4 {
  124. pinctrl-0 = <&i2c_1_pins>;
  125. pinctrl-names = "default";
  126. status = "okay";
  127. tricolor: led-controller@30 {
  128. compatible = "ti,lp5562";
  129. reg = <0x30>;
  130. clock-mode = /bits/8 <2>;
  131. #address-cells = <1>;
  132. #size-cells = <0>;
  133. /* RGB led */
  134. status_red: chan@0 {
  135. chan-name = "red:status";
  136. led-cur = /bits/ 8 <0x20>;
  137. max-cur = /bits/ 8 <0x60>;
  138. reg = <0>;
  139. color = <LED_COLOR_ID_RED>;
  140. };
  141. status_green: chan@1 {
  142. chan-name = "green:status";
  143. led-cur = /bits/ 8 <0x20>;
  144. max-cur = /bits/ 8 <0x60>;
  145. reg = <1>;
  146. color = <LED_COLOR_ID_GREEN>;
  147. };
  148. chan@2 {
  149. chan-name = "blue:status";
  150. led-cur = /bits/ 8 <0x20>;
  151. max-cur = /bits/ 8 <0x60>;
  152. reg = <2>;
  153. color = <LED_COLOR_ID_BLUE>;
  154. };
  155. chan@3 {
  156. chan-name = "white:status";
  157. led-cur = /bits/ 8 <0x20>;
  158. max-cur = /bits/ 8 <0x60>;
  159. reg = <3>;
  160. color = <LED_COLOR_ID_WHITE>;
  161. };
  162. };
  163. };
  164. &nand {
  165. pinctrl-0 = <&nand_pins>;
  166. pinctrl-names = "default";
  167. status = "okay";
  168. nand@0 {
  169. partitions {
  170. compatible = "fixed-partitions";
  171. #address-cells = <1>;
  172. #size-cells = <1>;
  173. partition@0 {
  174. label = "sbl1";
  175. reg = <0x00000000 0x00100000>;
  176. read-only;
  177. };
  178. partition@100000 {
  179. label = "mibib";
  180. reg = <0x00100000 0x00100000>;
  181. read-only;
  182. };
  183. partition@200000 {
  184. label = "bootconfig";
  185. reg = <0x00200000 0x00100000>;
  186. read-only;
  187. };
  188. partition@300000 {
  189. label = "qsee";
  190. reg = <0x00300000 0x00100000>;
  191. read-only;
  192. };
  193. partition@400000 {
  194. label = "qsee_alt";
  195. reg = <0x00400000 0x00100000>;
  196. read-only;
  197. };
  198. partition@500000 {
  199. label = "cdt";
  200. reg = <0x00500000 0x00080000>;
  201. read-only;
  202. };
  203. partition@580000 {
  204. label = "cdt_alt";
  205. reg = <0x00580000 0x00080000>;
  206. read-only;
  207. };
  208. partition@600000 {
  209. label = "ddrparams";
  210. reg = <0x00600000 0x00080000>;
  211. read-only;
  212. };
  213. partition@700000 {
  214. label = "u-boot";
  215. reg = <0x00700000 0x00200000>;
  216. read-only;
  217. };
  218. partition@900000 {
  219. label = "u-boot-backup";
  220. reg = <0x00900000 0x00200000>;
  221. read-only;
  222. };
  223. partition@b00000 {
  224. label = "ART";
  225. reg = <0x00b00000 0x00080000>;
  226. read-only;
  227. };
  228. partition@c00000 {
  229. label = "ubi";
  230. reg = <0x00c00000 0x07000000>;
  231. /*
  232. * Do not try to allocate the remaining
  233. * 4 MiB to this ubi partition. It will
  234. * confuse the u-boot and it might not
  235. * find the kernel partition anymore.
  236. */
  237. };
  238. };
  239. };
  240. };
  241. &pcie0 {
  242. status = "okay";
  243. perst-gpio = <&tlmm 38 GPIO_ACTIVE_LOW>;
  244. wake-gpio = <&tlmm 50 GPIO_ACTIVE_LOW>;
  245. bridge@0,0 {
  246. reg = <0x00000000 0 0 0 0>;
  247. #address-cells = <3>;
  248. #size-cells = <2>;
  249. ranges;
  250. wifi2: wifi@1,0 {
  251. compatible = "qcom,ath10k";
  252. status = "okay";
  253. reg = <0x00010000 0 0 0 0>;
  254. nvmem-cells = <&mac_address 1>;
  255. nvmem-cell-names = "mac-address";
  256. };
  257. };
  258. };
  259. &qpic_bam {
  260. status = "okay";
  261. };
  262. &tlmm {
  263. /*
  264. * GPIO43 should be 0/1 whenever the unit is
  265. * powered through PoE or AC-Adapter.
  266. * That said, playing with this seems to
  267. * reset the AP.
  268. */
  269. mdio_pins: mdio_pinmux {
  270. mux_1 {
  271. pins = "gpio6";
  272. function = "mdio";
  273. bias-pull-up;
  274. };
  275. mux_2 {
  276. pins = "gpio7";
  277. function = "mdc";
  278. bias-pull-up;
  279. };
  280. };
  281. serial_0_pins: serial_pinmux {
  282. mux {
  283. pins = "gpio16", "gpio17";
  284. function = "blsp_uart0";
  285. bias-disable;
  286. };
  287. };
  288. serial_1_pins: serial1_pinmux {
  289. mux {
  290. /* We use the i2c-0 pins for serial_1 */
  291. pins = "gpio8", "gpio9";
  292. function = "blsp_uart1";
  293. bias-disable;
  294. };
  295. };
  296. i2c_0_pins: i2c_0_pinmux {
  297. pinmux {
  298. function = "blsp_i2c0";
  299. pins = "gpio20", "gpio21";
  300. };
  301. pinconf {
  302. pins = "gpio20", "gpio21";
  303. drive-strength = <16>;
  304. bias-disable;
  305. };
  306. };
  307. i2c_1_pins: i2c_1_pinmux {
  308. pinmux {
  309. function = "blsp_i2c1";
  310. pins = "gpio34", "gpio35";
  311. };
  312. pinconf {
  313. pins = "gpio34", "gpio35";
  314. drive-strength = <16>;
  315. bias-disable;
  316. };
  317. };
  318. nand_pins: nand_pins {
  319. /*
  320. * There are 18 pins. 15 pins are common between LCD and NAND.
  321. * The QPIC controller arbitrates between LCD and NAND. Of the
  322. * remaining 4, 2 are for NAND and 2 are for LCD exclusively.
  323. *
  324. * The meraki source hints that the bluetooth module claims
  325. * pin 52 as well. But sadly, there's no data whenever this
  326. * is a NAND or LCD exclusive pin or not.
  327. */
  328. pullups {
  329. pins = "gpio52", "gpio53", "gpio58",
  330. "gpio59";
  331. function = "qpic";
  332. bias-pull-up;
  333. };
  334. pulldowns {
  335. pins = "gpio54", "gpio55", "gpio56",
  336. "gpio57", "gpio60", "gpio61",
  337. "gpio62", "gpio63", "gpio64",
  338. "gpio65", "gpio66", "gpio67",
  339. "gpio68", "gpio69";
  340. function = "qpic";
  341. bias-pull-down;
  342. };
  343. };
  344. };
  345. &wifi0 {
  346. status = "okay";
  347. qcom,ath10k-calibration-variant = "Meraki-MR33";
  348. nvmem-cells = <&mac_address 2>;
  349. nvmem-cell-names = "mac-address";
  350. };
  351. &wifi1 {
  352. status = "okay";
  353. qcom,ath10k-calibration-variant = "Meraki-MR33";
  354. nvmem-cells = <&mac_address 3>;
  355. nvmem-cell-names = "mac-address";
  356. };
  357. &gmac {
  358. status = "okay";
  359. nvmem-cells = <&mac_address 0>;
  360. nvmem-cell-names = "mac-address";
  361. };
  362. &switch {
  363. status = "okay";
  364. /delete-property/ psgmii-ethphy;
  365. };
  366. &swport5 {
  367. status = "okay";
  368. label = "lan";
  369. phy-handle = <&ethphy1>;
  370. phy-mode = "rgmii-rxid";
  371. };
  372. &ethphy0 {
  373. status = "disabled";
  374. };
  375. &ethphy2 {
  376. status = "disabled";
  377. };
  378. &ethphy3 {
  379. status = "disabled";
  380. };
  381. &ethphy4 {
  382. status = "disabled";
  383. };
  384. &psgmiiphy {
  385. status = "disabled";
  386. };