qcom-ipq4019-ncp-hg100-cellular.dts 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635
  1. // SPDX-License-Identifier: GPL-2.0-only OR MIT
  2. #include "qcom-ipq4019.dtsi"
  3. #include <dt-bindings/gpio/gpio.h>
  4. #include <dt-bindings/input/input.h>
  5. #include <dt-bindings/leds/common.h>
  6. #include <dt-bindings/soc/qcom,tcsr.h>
  7. / {
  8. model = "Sony NCP-HG100/Cellular";
  9. compatible = "sony,ncp-hg100-cellular";
  10. aliases {
  11. led-boot = &led_cloud_green;
  12. led-failsafe = &led_cloud_red;
  13. led-running = &led_cloud_green;
  14. led-upgrade = &led_cloud_green;
  15. label-mac-device = &gmac;
  16. };
  17. chosen {
  18. bootargs = "console=ttyMSM0,115200n8 root=/dev/mmcblk0p15 rootfstype=squashfs,ext4";
  19. };
  20. memory {
  21. device_type = "memory";
  22. reg = <0x80000000 0x20000000>;
  23. };
  24. soc {
  25. tcsr@1949000 {
  26. status = "okay";
  27. compatible = "qcom,tcsr";
  28. reg = <0x1949000 0x100>;
  29. qcom,wifi_glb_cfg = <TCSR_WIFI_GLB_CFG>;
  30. };
  31. tcsr@194b000 {
  32. status = "okay";
  33. compatible = "qcom,tcsr";
  34. reg = <0x194b000 0x100>;
  35. qcom,usb-hsphy-mode-select = <TCSR_USB_HSPHY_HOST_MODE>;
  36. };
  37. ess_tcsr@1953000 {
  38. status = "okay";
  39. compatible = "qcom,tcsr";
  40. reg = <0x1953000 0x1000>;
  41. qcom,ess-interface-select = <TCSR_ESS_PSGMII>;
  42. };
  43. tcsr@1957000 {
  44. status = "okay";
  45. compatible = "qcom,tcsr";
  46. reg = <0x1957000 0x100>;
  47. qcom,wifi_noc_memtype_m0_m2 = <TCSR_WIFI_NOC_MEMTYPE_M0_M2>;
  48. };
  49. dma@7984000 {
  50. status = "okay";
  51. };
  52. };
  53. keys-repeat {
  54. compatible = "gpio-keys";
  55. pinctrl-0 = <&keys_pins>;
  56. pinctrl-names = "default";
  57. autorepeat;
  58. key-volup {
  59. label = "volume up";
  60. linux,code = <KEY_VOLUMEUP>;
  61. gpios = <&tlmm 39 GPIO_ACTIVE_HIGH>;
  62. linux,input-type = <EV_KEY>;
  63. };
  64. key-voldown {
  65. label = "volume down";
  66. linux,code = <KEY_VOLUMEDOWN>;
  67. gpios = <&tlmm 40 GPIO_ACTIVE_HIGH>;
  68. linux,input-type = <EV_KEY>;
  69. };
  70. key-alexatrigger {
  71. label = "alexa trigger";
  72. linux,code = <BTN_0>;
  73. gpios = <&tlmm 42 GPIO_ACTIVE_HIGH>;
  74. linux,input-type = <EV_KEY>;
  75. };
  76. key-mute {
  77. label = "mic mute";
  78. linux,code = <BTN_1>;
  79. gpios = <&tlmm 47 GPIO_ACTIVE_LOW>;
  80. linux,input-type = <EV_SW>;
  81. };
  82. };
  83. keys {
  84. compatible = "gpio-keys";
  85. key-reset {
  86. label = "reset";
  87. gpios = <&tlmm 2 GPIO_ACTIVE_LOW>;
  88. linux,code = <KEY_RESTART>;
  89. };
  90. key-wps {
  91. label = "setup";
  92. gpios = <&tlmm 18 GPIO_ACTIVE_LOW>;
  93. linux,code = <KEY_WPS_BUTTON>;
  94. };
  95. };
  96. };
  97. &tlmm {
  98. pinctrl-0 = <&bt_pins>, <&aud_pins>, <&mcu_pins>;
  99. pinctrl-names = "default";
  100. /*
  101. * uart0 is shared for debug console and Z-Wave,
  102. * use only for debug console in OpenWrt.
  103. *
  104. * 1: debug console
  105. * 0: Z-Wave
  106. */
  107. uart0_ctrl_pins: uart0_ctrl_pinmux {
  108. mux {
  109. pins = "gpio15";
  110. function = "gpio";
  111. output-high;
  112. };
  113. };
  114. serial_pins: serial_pinmux {
  115. mux {
  116. pins = "gpio16", "gpio17";
  117. function = "blsp_uart0";
  118. bias-disable;
  119. };
  120. };
  121. /*
  122. * reset pin for Z-Wave
  123. * active-low, >= 20ns
  124. */
  125. zwave_pins: zwave_pinmux {
  126. mux {
  127. pins = "gpio59";
  128. function = "gpio";
  129. output-high;
  130. };
  131. };
  132. serial_1_pins: serial1_pinmux {
  133. mux {
  134. pins = "gpio8", "gpio9",
  135. "gpio10", "gpio11";
  136. function = "blsp_uart1";
  137. bias-disable;
  138. };
  139. };
  140. bt_pins: bt_pinmux {
  141. mux_reset {
  142. pins = "gpio66";
  143. function = "gpio";
  144. output-high;
  145. };
  146. mux_pwr {
  147. pins = "gpio68";
  148. function = "gpio";
  149. output-high;
  150. };
  151. };
  152. mdio_pins: mdio_pinmux {
  153. mux_1 {
  154. pins = "gpio6";
  155. function = "mdio";
  156. bias-pull-up;
  157. };
  158. mux_2 {
  159. pins = "gpio7";
  160. function = "mdc";
  161. bias-pull-up;
  162. };
  163. };
  164. i2c_1_pins: i2c_1_pinmux {
  165. mux {
  166. pins = "gpio12", "gpio13";
  167. function = "blsp_i2c1";
  168. bias-disable;
  169. };
  170. };
  171. keys_pins: keys_pinmux {
  172. mux_1 {
  173. pins = "gpio39", "gpio40", "gpio42", "gpio47";
  174. function = "gpio";
  175. bias-disable;
  176. };
  177. mux_2 {
  178. pins = "gpio2";
  179. function = "gpio";
  180. input;
  181. };
  182. };
  183. sd_pins: sd_pins {
  184. mux {
  185. function = "sdio";
  186. pins = "gpio23", "gpio24", "gpio25", "gpio26",
  187. "gpio28", "gpio29", "gpio30", "gpio31";
  188. drive-strength = <4>;
  189. };
  190. mux_sd_clk {
  191. function = "sdio";
  192. pins = "gpio27";
  193. drive-strength = <16>;
  194. };
  195. mux_sd7 {
  196. function = "sdio";
  197. pins = "gpio32";
  198. drive-strength = <4>;
  199. bias-disable;
  200. };
  201. };
  202. aud_pins: aud_pinmux {
  203. mux {
  204. pins = "gpio48", "gpio49", "gpio50", "gpio51";
  205. function = "aud_pin";
  206. };
  207. };
  208. alc1304_pins: alc1304_pinmux {
  209. mux_1 {
  210. pins = "gpio44";
  211. function = "gpio";
  212. bias-disable;
  213. };
  214. mux_2 {
  215. pins = "gpio45";
  216. function = "gpio";
  217. bias-disable;
  218. };
  219. };
  220. cx2902x_reset: cx2902x_pinmux {
  221. mux_1 {
  222. pins = "gpio64";
  223. function = "gpio";
  224. bias-disable;
  225. };
  226. mux_2 {
  227. pins = "gpio65";
  228. function = "gpio";
  229. bias-disable;
  230. };
  231. };
  232. lte_pins: lte_pinmux {
  233. mux_en {
  234. pins = "gpio20";
  235. function = "gpio";
  236. output-high;
  237. };
  238. mux_reset {
  239. pins = "gpio35";
  240. function = "gpio";
  241. input;
  242. };
  243. };
  244. usb3_pins: usb3_pinmux {
  245. mux_en {
  246. pins = "gpio36";
  247. function = "gpio";
  248. output-high;
  249. };
  250. mux_flt {
  251. pins = "gpio4";
  252. function = "gpio";
  253. input;
  254. };
  255. };
  256. mcu_pins: mcu_pinmux {
  257. mux_boot {
  258. pins = "gpio38";
  259. function = "gpio";
  260. output-low;
  261. };
  262. mux_reset {
  263. pins = "gpio5";
  264. function = "gpio";
  265. output-high;
  266. };
  267. };
  268. };
  269. &blsp_dma {
  270. status = "okay";
  271. };
  272. &blsp1_i2c4 {
  273. /*
  274. * There is no driver for the following devices:
  275. * - CY8C4014LQI@14 : Touch-Sensor for buttons on top
  276. * - MINI54FDE@15 : MCU for Fan/RGB LED/Thermal control
  277. * - ALC5629@18 : I2S/PCM Audio DAC
  278. * - CX20924@41 : Voice Input Processor
  279. */
  280. pinctrl-0 = <&i2c_1_pins>;
  281. pinctrl-names = "default";
  282. status = "okay";
  283. led-controller@32 {
  284. compatible = "ti,lp55231";
  285. reg = <0x32>;
  286. clock-mode = /bits/ 8 <0>;
  287. enable-gpio = <&tlmm 1 GPIO_ACTIVE_HIGH>;
  288. #address-cells = <1>;
  289. #size-cells = <0>;
  290. led@0 {
  291. chan-name = "green:wan";
  292. led-cur = /bits/ 8 <50>;
  293. max-cur = /bits/ 8 <100>;
  294. reg = <0x0>;
  295. color = <LED_COLOR_ID_GREEN>;
  296. function = LED_FUNCTION_WAN;
  297. };
  298. led@1 {
  299. chan-name = "blue:wan";
  300. led-cur = /bits/ 8 <50>;
  301. max-cur = /bits/ 8 <100>;
  302. reg = <0x1>;
  303. color = <LED_COLOR_ID_BLUE>;
  304. function = LED_FUNCTION_WAN;
  305. };
  306. led@2 {
  307. chan-name = "green:lan";
  308. led-cur = /bits/ 8 <50>;
  309. max-cur = /bits/ 8 <100>;
  310. reg = <0x2>;
  311. color = <LED_COLOR_ID_GREEN>;
  312. function = LED_FUNCTION_LAN;
  313. };
  314. led@3 {
  315. chan-name = "blue:lan";
  316. led-cur = /bits/ 8 <50>;
  317. max-cur = /bits/ 8 <100>;
  318. reg = <0x3>;
  319. color = <LED_COLOR_ID_BLUE>;
  320. function = LED_FUNCTION_LAN;
  321. };
  322. led@4 {
  323. chan-name = "green:wlan-2";
  324. led-cur = /bits/ 8 <50>;
  325. max-cur = /bits/ 8 <100>;
  326. reg = <0x4>;
  327. color = <LED_COLOR_ID_GREEN>;
  328. function = LED_FUNCTION_WLAN;
  329. function-enumerator = <2>;
  330. linux,default-trigger = "phy0tpt";
  331. };
  332. led@5 {
  333. chan-name = "blue:wlan-2";
  334. led-cur = /bits/ 8 <50>;
  335. max-cur = /bits/ 8 <100>;
  336. reg = <0x5>;
  337. color = <LED_COLOR_ID_BLUE>;
  338. function = LED_FUNCTION_WLAN;
  339. function-enumerator = <2>;
  340. };
  341. led@6 {
  342. chan-name = "red:wan";
  343. led-cur = /bits/ 8 <50>;
  344. max-cur = /bits/ 8 <100>;
  345. reg = <0x6>;
  346. color = <LED_COLOR_ID_RED>;
  347. function = LED_FUNCTION_WAN;
  348. };
  349. led@7 {
  350. chan-name = "red:lan";
  351. led-cur = /bits/ 8 <50>;
  352. max-cur = /bits/ 8 <100>;
  353. reg = <0x7>;
  354. color = <LED_COLOR_ID_RED>;
  355. function = LED_FUNCTION_LAN;
  356. };
  357. led@8 {
  358. chan-name = "red:wlan-2";
  359. led-cur = /bits/ 8 <50>;
  360. max-cur = /bits/ 8 <100>;
  361. reg = <0x8>;
  362. color = <LED_COLOR_ID_RED>;
  363. function = LED_FUNCTION_WLAN;
  364. function-enumerator = <2>;
  365. };
  366. };
  367. led-controller@33 {
  368. compatible = "ti,lp55231";
  369. reg = <0x33>;
  370. clock-mode = /bits/ 8 <0>;
  371. #address-cells = <1>;
  372. #size-cells = <0>;
  373. led@0 {
  374. chan-name = "green:wlan-5";
  375. led-cur = /bits/ 8 <50>;
  376. max-cur = /bits/ 8 <100>;
  377. reg = <0x0>;
  378. color = <LED_COLOR_ID_GREEN>;
  379. function = LED_FUNCTION_WLAN;
  380. linux,default-trigger = "phy1tpt";
  381. function-enumerator = <5>;
  382. };
  383. led@1 {
  384. chan-name = "blue:wlan-5";
  385. led-cur = /bits/ 8 <50>;
  386. max-cur = /bits/ 8 <100>;
  387. reg = <0x1>;
  388. color = <LED_COLOR_ID_BLUE>;
  389. function = LED_FUNCTION_WLAN;
  390. function-enumerator = <5>;
  391. };
  392. led@2 {
  393. chan-name = "green:wan-4";
  394. led-cur = /bits/ 8 <50>;
  395. max-cur = /bits/ 8 <100>;
  396. reg = <0x2>;
  397. color = <LED_COLOR_ID_GREEN>;
  398. function = LED_FUNCTION_WAN; /* WWAN/LTE/4G */
  399. function-enumerator = <4>; /* WWAN/LTE/4G */
  400. };
  401. led@3 {
  402. chan-name = "blue:wan-4";
  403. led-cur = /bits/ 8 <50>;
  404. max-cur = /bits/ 8 <100>;
  405. reg = <0x3>;
  406. color = <LED_COLOR_ID_BLUE>;
  407. function = LED_FUNCTION_WAN; /* WWAN/LTE/4G */
  408. function-enumerator = <4>; /* WWAN/LTE/4G */
  409. };
  410. led_cloud_green: led@4 {
  411. chan-name = "green:power";
  412. led-cur = /bits/ 8 <50>;
  413. max-cur = /bits/ 8 <100>;
  414. reg = <0x4>;
  415. color = <LED_COLOR_ID_GREEN>;
  416. function = LED_FUNCTION_POWER;
  417. };
  418. led@5 {
  419. chan-name = "blue:power";
  420. led-cur = /bits/ 8 <50>;
  421. max-cur = /bits/ 8 <100>;
  422. reg = <0x5>;
  423. color = <LED_COLOR_ID_BLUE>;
  424. function = LED_FUNCTION_POWER;
  425. };
  426. led@6 {
  427. chan-name = "red:wlan-5";
  428. led-cur = /bits/ 8 <50>;
  429. max-cur = /bits/ 8 <100>;
  430. reg = <0x6>;
  431. color = <LED_COLOR_ID_RED>;
  432. function = LED_FUNCTION_WLAN;
  433. function-enumerator = <5>;
  434. };
  435. led@7 {
  436. chan-name = "red:wan-4";
  437. led-cur = /bits/ 8 <50>;
  438. max-cur = /bits/ 8 <100>;
  439. reg = <0x7>;
  440. color = <LED_COLOR_ID_RED>;
  441. function = LED_FUNCTION_WAN; /* WWAN/LTE/4G */
  442. function-enumerator = <4>; /* WWAN/LTE/4G */
  443. };
  444. led_cloud_red: led@8 {
  445. chan-name = "red:power";
  446. led-cur = /bits/ 8 <50>;
  447. max-cur = /bits/ 8 <100>;
  448. reg = <0x8>;
  449. color = <LED_COLOR_ID_RED>;
  450. function = LED_FUNCTION_POWER;
  451. };
  452. };
  453. };
  454. &blsp1_uart1 {
  455. pinctrl-0 = <&serial_pins>, <&uart0_ctrl_pins>;
  456. pinctrl-names = "default";
  457. status = "okay";
  458. };
  459. &blsp1_uart2 {
  460. pinctrl-0 = <&serial_1_pins>;
  461. pinctrl-names = "default";
  462. status = "okay";
  463. };
  464. &crypto {
  465. status = "okay";
  466. };
  467. &cryptobam {
  468. status = "okay";
  469. };
  470. &mdio {
  471. status = "okay";
  472. pinctrl-0 = <&mdio_pins>;
  473. pinctrl-names = "default";
  474. reset-gpios = <&tlmm 41 GPIO_ACTIVE_LOW>;
  475. };
  476. &prng {
  477. status = "okay";
  478. };
  479. &vqmmc {
  480. status = "okay";
  481. };
  482. &sdhci {
  483. status = "okay";
  484. pinctrl-0 = <&sd_pins>;
  485. pinctrl-names = "default";
  486. vqmmc-supply = <&vqmmc>;
  487. non-removable;
  488. #address-cells = <1>;
  489. #size-cells = <0>;
  490. emmc@0 {
  491. compatible = "mmc-card";
  492. reg = <0>;
  493. };
  494. };
  495. &usb2 {
  496. status = "okay";
  497. };
  498. &usb2_hs_phy {
  499. status = "okay";
  500. };
  501. &usb3 {
  502. status = "okay";
  503. pinctrl-0 = <&usb3_pins>, <&lte_pins>;
  504. pinctrl-names = "default";
  505. dwc3@8a00000 {
  506. #address-cells = <1>;
  507. #size-cells = <0>;
  508. device@1 {
  509. compatible = "usb1bc7,1900";
  510. reg = <1>;
  511. };
  512. };
  513. };
  514. &usb3_hs_phy {
  515. status = "okay";
  516. };
  517. &usb3_ss_phy {
  518. status = "okay";
  519. };
  520. &gmac {
  521. status = "okay";
  522. };
  523. &switch {
  524. status = "okay";
  525. };
  526. &swport4 {
  527. status = "okay";
  528. label = "lan";
  529. };
  530. &swport5 {
  531. status = "okay";
  532. label = "wan";
  533. };
  534. &wifi0 {
  535. status = "okay";
  536. qcom,ath10k-calibration-variant = "Sony-NCP-HG100-Cellular";
  537. };
  538. &wifi1 {
  539. status = "okay";
  540. qcom,ath10k-calibration-variant = "Sony-NCP-HG100-Cellular";
  541. };
  542. &watchdog {
  543. status = "okay";
  544. };