qcom-ipq4019-wifi.dts 6.6 KB

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