qcom-ipq4029-insect-common.dtsi 8.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444
  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. function = LED_FUNCTION_POWER;
  89. color = <LED_COLOR_ID_ORANGE>;
  90. gpios = <&tlmm 49 GPIO_ACTIVE_LOW>;
  91. panic-indicator;
  92. };
  93. };
  94. };
  95. &blsp_dma {
  96. status = "okay";
  97. };
  98. &blsp1_uart1 {
  99. pinctrl-0 = <&serial_0_pins>;
  100. pinctrl-names = "default";
  101. status = "okay";
  102. };
  103. &cryptobam {
  104. status = "okay";
  105. };
  106. &blsp1_i2c3 {
  107. pinctrl-0 = <&i2c_0_pins>;
  108. pinctrl-names = "default";
  109. status = "okay";
  110. eeprom@50 {
  111. compatible = "atmel,24c64";
  112. pagesize = <32>;
  113. reg = <0x50>;
  114. read-only; /* This holds our MAC & Meraki board-data */
  115. #address-cells = <1>;
  116. #size-cells = <1>;
  117. mac_address: mac-address@66 {
  118. compatible = "mac-base";
  119. reg = <0x66 0x6>;
  120. #nvmem-cell-cells = <1>;
  121. };
  122. };
  123. };
  124. &blsp1_i2c4 {
  125. pinctrl-0 = <&i2c_1_pins>;
  126. pinctrl-names = "default";
  127. status = "okay";
  128. tricolor: led-controller@30 {
  129. compatible = "ti,lp5562";
  130. reg = <0x30>;
  131. clock-mode = /bits/8 <2>;
  132. #address-cells = <1>;
  133. #size-cells = <0>;
  134. /* RGB led */
  135. status_red: chan@0 {
  136. chan-name = "red:status";
  137. led-cur = /bits/ 8 <0x20>;
  138. max-cur = /bits/ 8 <0x60>;
  139. reg = <0>;
  140. color = <LED_COLOR_ID_RED>;
  141. };
  142. status_green: chan@1 {
  143. chan-name = "green:status";
  144. led-cur = /bits/ 8 <0x20>;
  145. max-cur = /bits/ 8 <0x60>;
  146. reg = <1>;
  147. color = <LED_COLOR_ID_GREEN>;
  148. };
  149. chan@2 {
  150. chan-name = "blue:status";
  151. led-cur = /bits/ 8 <0x20>;
  152. max-cur = /bits/ 8 <0x60>;
  153. reg = <2>;
  154. color = <LED_COLOR_ID_BLUE>;
  155. };
  156. chan@3 {
  157. chan-name = "white:status";
  158. led-cur = /bits/ 8 <0x20>;
  159. max-cur = /bits/ 8 <0x60>;
  160. reg = <3>;
  161. color = <LED_COLOR_ID_WHITE>;
  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 = <0x00000000 0x00100000>;
  177. read-only;
  178. };
  179. partition@100000 {
  180. label = "mibib";
  181. reg = <0x00100000 0x00100000>;
  182. read-only;
  183. };
  184. partition@200000 {
  185. label = "bootconfig";
  186. reg = <0x00200000 0x00100000>;
  187. read-only;
  188. };
  189. partition@300000 {
  190. label = "qsee";
  191. reg = <0x00300000 0x00100000>;
  192. read-only;
  193. };
  194. partition@400000 {
  195. label = "qsee_alt";
  196. reg = <0x00400000 0x00100000>;
  197. read-only;
  198. };
  199. partition@500000 {
  200. label = "cdt";
  201. reg = <0x00500000 0x00080000>;
  202. read-only;
  203. };
  204. partition@580000 {
  205. label = "cdt_alt";
  206. reg = <0x00580000 0x00080000>;
  207. read-only;
  208. };
  209. partition@600000 {
  210. label = "ddrparams";
  211. reg = <0x00600000 0x00080000>;
  212. read-only;
  213. };
  214. partition@700000 {
  215. label = "u-boot";
  216. reg = <0x00700000 0x00200000>;
  217. read-only;
  218. };
  219. partition@900000 {
  220. label = "u-boot-backup";
  221. reg = <0x00900000 0x00200000>;
  222. read-only;
  223. };
  224. partition@b00000 {
  225. label = "ART";
  226. reg = <0x00b00000 0x00080000>;
  227. read-only;
  228. };
  229. partition@c00000 {
  230. label = "ubi";
  231. reg = <0x00c00000 0x07000000>;
  232. /*
  233. * Do not try to allocate the remaining
  234. * 4 MiB to this ubi partition. It will
  235. * confuse the u-boot and it might not
  236. * find the kernel partition anymore.
  237. */
  238. };
  239. };
  240. };
  241. };
  242. &pcie0 {
  243. status = "okay";
  244. perst-gpio = <&tlmm 38 GPIO_ACTIVE_LOW>;
  245. wake-gpio = <&tlmm 50 GPIO_ACTIVE_LOW>;
  246. bridge@0,0 {
  247. reg = <0x00000000 0 0 0 0>;
  248. #address-cells = <3>;
  249. #size-cells = <2>;
  250. ranges;
  251. wifi2: wifi@1,0 {
  252. compatible = "qcom,ath10k";
  253. status = "okay";
  254. reg = <0x00010000 0 0 0 0>;
  255. nvmem-cells = <&mac_address 1>;
  256. nvmem-cell-names = "mac-address";
  257. };
  258. };
  259. };
  260. &qpic_bam {
  261. status = "okay";
  262. };
  263. &tlmm {
  264. /*
  265. * GPIO43 should be 0/1 whenever the unit is
  266. * powered through PoE or AC-Adapter.
  267. * That said, playing with this seems to
  268. * reset the AP.
  269. */
  270. mdio_pins: mdio_pinmux {
  271. mux_1 {
  272. pins = "gpio6";
  273. function = "mdio";
  274. bias-pull-up;
  275. };
  276. mux_2 {
  277. pins = "gpio7";
  278. function = "mdc";
  279. bias-pull-up;
  280. };
  281. };
  282. serial_0_pins: serial_pinmux {
  283. mux {
  284. pins = "gpio16", "gpio17";
  285. function = "blsp_uart0";
  286. bias-disable;
  287. };
  288. };
  289. serial_1_pins: serial1_pinmux {
  290. mux {
  291. /* We use the i2c-0 pins for serial_1 */
  292. pins = "gpio8", "gpio9";
  293. function = "blsp_uart1";
  294. bias-disable;
  295. };
  296. };
  297. i2c_0_pins: i2c_0_pinmux {
  298. pinmux {
  299. function = "blsp_i2c0";
  300. pins = "gpio20", "gpio21";
  301. };
  302. pinconf {
  303. pins = "gpio20", "gpio21";
  304. drive-strength = <16>;
  305. bias-disable;
  306. };
  307. };
  308. i2c_1_pins: i2c_1_pinmux {
  309. pinmux {
  310. function = "blsp_i2c1";
  311. pins = "gpio34", "gpio35";
  312. };
  313. pinconf {
  314. pins = "gpio34", "gpio35";
  315. drive-strength = <16>;
  316. bias-disable;
  317. };
  318. };
  319. nand_pins: nand_pins {
  320. /*
  321. * There are 18 pins. 15 pins are common between LCD and NAND.
  322. * The QPIC controller arbitrates between LCD and NAND. Of the
  323. * remaining 4, 2 are for NAND and 2 are for LCD exclusively.
  324. *
  325. * The meraki source hints that the bluetooth module claims
  326. * pin 52 as well. But sadly, there's no data whenever this
  327. * is a NAND or LCD exclusive pin or not.
  328. */
  329. pullups {
  330. pins = "gpio52", "gpio53", "gpio58",
  331. "gpio59";
  332. function = "qpic";
  333. bias-pull-up;
  334. };
  335. pulldowns {
  336. pins = "gpio54", "gpio55", "gpio56",
  337. "gpio57", "gpio60", "gpio61",
  338. "gpio62", "gpio63", "gpio64",
  339. "gpio65", "gpio66", "gpio67",
  340. "gpio68", "gpio69";
  341. function = "qpic";
  342. bias-pull-down;
  343. };
  344. };
  345. };
  346. &wifi0 {
  347. status = "okay";
  348. qcom,ath10k-calibration-variant = "Meraki-MR33";
  349. nvmem-cells = <&mac_address 2>;
  350. nvmem-cell-names = "mac-address";
  351. };
  352. &wifi1 {
  353. status = "okay";
  354. qcom,ath10k-calibration-variant = "Meraki-MR33";
  355. nvmem-cells = <&mac_address 3>;
  356. nvmem-cell-names = "mac-address";
  357. };
  358. &gmac {
  359. status = "okay";
  360. nvmem-cells = <&mac_address 0>;
  361. nvmem-cell-names = "mac-address";
  362. };
  363. &switch {
  364. status = "okay";
  365. /delete-property/ psgmii-ethphy;
  366. };
  367. &swport5 {
  368. status = "okay";
  369. label = "lan";
  370. phy-handle = <&ethphy1>;
  371. phy-mode = "rgmii-rxid";
  372. };
  373. &ethphy0 {
  374. status = "disabled";
  375. };
  376. &ethphy2 {
  377. status = "disabled";
  378. };
  379. &ethphy3 {
  380. status = "disabled";
  381. };
  382. &ethphy4 {
  383. status = "disabled";
  384. };
  385. &psgmiiphy {
  386. status = "disabled";
  387. };