qcom-ipq4019-wifi.dts 7.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451
  1. // SPDX-License-Identifier: GPL-2.0
  2. /*
  3. * Copyright (c) 2016, 2018 The Linux Foundation. All rights reserved.
  4. * Copyright (c) 2016 Google, Inc
  5. */
  6. #include "qcom-ipq4019.dtsi"
  7. #include <dt-bindings/input/input.h>
  8. #include <dt-bindings/gpio/gpio.h>
  9. #include <dt-bindings/leds/common.h>
  10. / {
  11. model = "Google WiFi (Gale)";
  12. compatible = "google,wifi", "google,gale-v2", "qcom,ipq4019";
  13. aliases {
  14. label-mac-device = &gmac0;
  15. led-boot = &led0_blue;
  16. led-failsafe = &led0_red;
  17. led-running = &led0_blue;
  18. led-upgrade = &led0_red;
  19. };
  20. chosen {
  21. /*
  22. * rootwait: in case we're booting from slow/async USB storage.
  23. */
  24. bootargs-append = " rootwait";
  25. stdout-path = &blsp1_uart1;
  26. };
  27. memory {
  28. device_type = "memory";
  29. reg = <0x80000000 0x20000000>; /* 512MB */
  30. };
  31. soc {
  32. edma@c080000 {
  33. /*
  34. * Factory bootloader (depthcharge) will fail to boot
  35. * if this exact path (soc/edma@c080000/gmac0) doesn't
  36. * exist.
  37. */
  38. gmac0: gmac0 {
  39. };
  40. /*
  41. * Factory bootloader (depthcharge) will fail to boot
  42. * if this exact path (soc/edma@c080000/gmac1) doesn't
  43. * exist.
  44. */
  45. gmac1 {
  46. };
  47. };
  48. };
  49. keys {
  50. compatible = "gpio-keys";
  51. pinctrl-0 = <&fw_pinmux>;
  52. pinctrl-names = "default";
  53. reset {
  54. label = "reset";
  55. gpios = <&tlmm 57 GPIO_ACTIVE_LOW>;
  56. linux,code = <KEY_RESTART>;
  57. };
  58. };
  59. };
  60. &scm {
  61. qcom,sdi-enabled;
  62. };
  63. &tlmm {
  64. fw_pinmux: fw_pinmux {
  65. wp {
  66. pins = "gpio53";
  67. output-low;
  68. };
  69. recovery {
  70. pins = "gpio57";
  71. function = "gpio";
  72. bias-none;
  73. };
  74. developer {
  75. pins = "gpio41";
  76. bias-none;
  77. };
  78. };
  79. reset802_15_4 {
  80. pins = "gpio60";
  81. };
  82. led_reset {
  83. pins = "gpio22";
  84. output-high;
  85. };
  86. sys_reset {
  87. pins = "gpio19";
  88. output-high;
  89. };
  90. rx_active {
  91. pins = "gpio43";
  92. bias-pull,down;
  93. };
  94. spi_0_pins: spi_0_pinmux {
  95. pinmux {
  96. function = "blsp_spi0";
  97. pins = "gpio13", "gpio14","gpio15";
  98. };
  99. pinmux_cs {
  100. function = "gpio";
  101. pins = "gpio12";
  102. };
  103. pinconf {
  104. pins = "gpio13", "gpio14","gpio15";
  105. drive-strength = <12>;
  106. bias-disable;
  107. };
  108. pinconf_cs {
  109. pins = "gpio12";
  110. drive-strength = <2>;
  111. bias-disable;
  112. output-high;
  113. };
  114. };
  115. spi_1_pins: spi_1_pinmux {
  116. pinmux {
  117. function = "blsp_spi1";
  118. pins = "gpio44", "gpio46","gpio47";
  119. };
  120. pinmux_cs {
  121. function = "gpio";
  122. pins = "gpio45";
  123. };
  124. pinconf {
  125. pins = "gpio44", "gpio46","gpio47";
  126. drive-strength = <12>;
  127. bias-disable;
  128. };
  129. pinconf_cs {
  130. pins = "gpio45";
  131. drive-strength = <2>;
  132. bias-disable;
  133. output-high;
  134. };
  135. };
  136. serial_0_pins: serial0_pinmux {
  137. mux {
  138. pins = "gpio16", "gpio17";
  139. function = "blsp_uart0";
  140. bias-disable;
  141. };
  142. };
  143. serial_1_pins: serial1_pinmux {
  144. mux {
  145. pins = "gpio8", "gpio9", "gpio10", "gpio11";
  146. function = "blsp_uart1";
  147. bias-disable;
  148. };
  149. };
  150. i2c_0_pins: i2c_0_pinmux {
  151. mux {
  152. pins = "gpio20", "gpio21";
  153. function = "blsp_i2c0";
  154. drive-open-drain;
  155. };
  156. };
  157. i2c_1_pins: i2c_1_pinmux {
  158. mux {
  159. pins = "gpio34", "gpio35";
  160. function = "blsp_i2c1";
  161. drive-open-drain;
  162. };
  163. };
  164. sd_0_pins: sd_0_pinmux {
  165. sd0 {
  166. pins = "gpio23", "gpio24", "gpio25", "gpio26", "gpio29", "gpio30", "gpio31", "gpio32";
  167. function = "sdio";
  168. drive-strength = <10>;
  169. bias-pull-up;
  170. pull-up-res = <0>;
  171. };
  172. sdclk {
  173. pins = "gpio27";
  174. function = "sdio";
  175. drive-strength = <2>;
  176. bias-pull-up;
  177. pull-up-res = <0>;
  178. };
  179. sdcmd {
  180. pins = "gpio28";
  181. function = "sdio";
  182. drive-strength = <10>;
  183. bias-pull-up;
  184. pull-up-res = <0>;
  185. };
  186. };
  187. mdio_pins: mdio_pinmux {
  188. mux_1 {
  189. pins = "gpio6";
  190. function = "mdio";
  191. bias-disable;
  192. };
  193. mux_2 {
  194. pins = "gpio7";
  195. function = "mdc";
  196. bias-disable;
  197. };
  198. mux_3 {
  199. pins = "gpio40";
  200. function = "gpio";
  201. bias-disable;
  202. output-high;
  203. };
  204. };
  205. wifi1_1_pins: wifi2_pinmux {
  206. mux {
  207. pins = "gpio58";
  208. output-low;
  209. };
  210. };
  211. };
  212. &blsp_dma {
  213. status = "okay";
  214. };
  215. &blsp1_i2c3 {
  216. pinctrl-0 = <&i2c_0_pins>;
  217. pinctrl-names = "default";
  218. status = "okay";
  219. tpm@20 {
  220. compatible = "infineon,slb9645tt";
  221. reg = <0x20>;
  222. powered-while-suspended;
  223. };
  224. };
  225. &blsp1_i2c4 {
  226. pinctrl-0 = <&i2c_1_pins>;
  227. pinctrl-names = "default";
  228. status = "okay";
  229. led-controller@32 {
  230. #address-cells = <1>;
  231. #size-cells = <0>;
  232. compatible = "national,lp5523";
  233. reg = <0x32>;
  234. clock-mode = /bits/ 8 <1>;
  235. #if 1
  236. led0_red: led@0 {
  237. reg = <0>;
  238. chan-name = "LED0_Red";
  239. led-cur = /bits/ 8 <0x64>;
  240. max-cur = /bits/ 8 <0x78>;
  241. color = <LED_COLOR_ID_RED>;
  242. function = LED_FUNCTION_FAULT;
  243. };
  244. led@1 {
  245. reg = <1>;
  246. chan-name = "LED0_Green";
  247. led-cur = /bits/ 8 <0x64>;
  248. max-cur = /bits/ 8 <0x78>;
  249. color = <LED_COLOR_ID_GREEN>;
  250. };
  251. led0_blue: led@2 {
  252. reg = <2>;
  253. chan-name = "LED0_Blue";
  254. led-cur = /bits/ 8 <0x64>;
  255. max-cur = /bits/ 8 <0x78>;
  256. color = <LED_COLOR_ID_BLUE>;
  257. function = LED_FUNCTION_POWER;
  258. };
  259. #else
  260. /*
  261. * openwrt isn't ready to handle multi-intensity leds yet
  262. * # echo 255 255 255 > /sys/class/leds/tricolor/multi_intensity
  263. * # echo 255 > /sys/class/leds/tricolor/brightness
  264. */
  265. multi-led@2 {
  266. function = LED_FUNCTION_POWER;
  267. reg = <2>;
  268. color = <LED_COLOR_ID_RGB>;
  269. #address-cells = <1>;
  270. #size-cells = <0>;
  271. led@0 {
  272. reg = <0>;
  273. chan-name = "tricolor";
  274. led-cur = /bits/ 8 <0x64>;
  275. max-cur = /bits/ 8 <0x78>;
  276. color = <LED_COLOR_ID_RED>;
  277. };
  278. led@1 {
  279. reg = <1>;
  280. chan-name = "tricolor";
  281. led-cur = /bits/ 8 <0x64>;
  282. max-cur = /bits/ 8 <0x78>;
  283. color = <LED_COLOR_ID_GREEN>;
  284. };
  285. led@2 {
  286. reg = <2>;
  287. chan-name = "tricolor";
  288. led-cur = /bits/ 8 <0x64>;
  289. max-cur = /bits/ 8 <0x78>;
  290. color = <LED_COLOR_ID_BLUE>;
  291. };
  292. };
  293. #endif
  294. };
  295. };
  296. &blsp1_spi1 {
  297. pinctrl-0 = <&spi_0_pins>;
  298. pinctrl-names = "default";
  299. status = "okay";
  300. cs-gpios = <&tlmm 12 GPIO_ACTIVE_HIGH>;
  301. flash@0 {
  302. compatible = "jedec,spi-nor";
  303. reg = <0>;
  304. spi-max-frequency = <24000000>;
  305. };
  306. };
  307. &blsp1_spi2 {
  308. pinctrl-0 = <&spi_1_pins>;
  309. pinctrl-names = "default";
  310. status = "okay";
  311. cs-gpios = <&tlmm 45 GPIO_ACTIVE_HIGH>;
  312. /*
  313. * This "spidev" was included in the manufacturer device tree. I
  314. * suspect it's the (unused; and removed from later HW spins) Zigbee
  315. * radio -- SiliconLabs EM3581 Zigbee? There's no driver or binding for
  316. * this at the moment.
  317. */
  318. spidev@0 {
  319. compatible = "spidev";
  320. reg = <0>;
  321. spi-max-frequency = <24000000>;
  322. };
  323. };
  324. &blsp1_uart1 {
  325. pinctrl-0 = <&serial_0_pins>;
  326. pinctrl-names = "default";
  327. status = "okay";
  328. };
  329. &blsp1_uart2 {
  330. pinctrl-0 = <&serial_1_pins>;
  331. pinctrl-names = "default";
  332. status = "okay";
  333. };
  334. &gmac {
  335. status = "okay";
  336. };
  337. &mdio {
  338. status = "okay";
  339. pinctrl-0 = <&mdio_pins>;
  340. pinctrl-names = "default";
  341. };
  342. &prng {
  343. status = "okay";
  344. };
  345. &sdhci {
  346. status = "okay";
  347. pinctrl-0 = <&sd_0_pins>;
  348. pinctrl-names = "default";
  349. clock-frequency = <192000000>;
  350. vqmmc-supply = <&vqmmc>;
  351. non-removable;
  352. };
  353. &switch {
  354. status = "okay";
  355. };
  356. &swport4 {
  357. status = "okay";
  358. label = "lan";
  359. };
  360. &swport5 {
  361. status = "okay";
  362. };
  363. &usb2 {
  364. status = "okay";
  365. };
  366. &usb2_hs_phy {
  367. status = "okay";
  368. };
  369. &usb3 {
  370. status = "okay";
  371. };
  372. &usb3_ss_phy {
  373. status = "okay";
  374. };
  375. &usb3_hs_phy {
  376. status = "okay";
  377. };
  378. &vqmmc {
  379. status = "okay";
  380. };
  381. &watchdog {
  382. status = "okay";
  383. };
  384. &wifi0 {
  385. status = "okay";
  386. qcom,ath10k-calibration-variant = "GO_GALE";
  387. };
  388. &wifi1 {
  389. status = "okay";
  390. pinctrl-0 = <&wifi1_1_pins>;
  391. pinctrl-names = "default";
  392. qcom,ath10k-calibration-variant = "GO_GALE";
  393. };