02-jdc_ax1800-pro.patch 48 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799
  1. From 222b0208ae8c9ccbae94ff22ba9370c2e72519e5 Mon Sep 17 00:00:00 2001
  2. From: JiaY-shi <[email protected]>
  3. Date: Thu, 21 Sep 2023 18:37:36 +0800
  4. Subject: [PATCH] QualcommAX: ipq60xx: add support for JD Cloud AX1800 Pro
  5. ---
  6. .../uboot-envtools/files/qualcommax | 5 +
  7. package/firmware/ipq-wifi/Makefile | 2 +
  8. .../ipq-wifi/src/board-jdc_ax1800-pro.ipq6018 | Bin 0 -> 65644 bytes
  9. .../boot/dts/qcom/ipq6018-jdc-ax1800-pro.dts | 424 ++++++
  10. target/linux/qualcommax/image/ipq60xx.mk | 24 +-
  11. .../ipq60xx/base-files/etc/board.d/01_leds | 4 +-
  12. .../ipq60xx/base-files/etc/board.d/02_network | 3 +
  13. .../etc/hotplug.d/firmware/11-ath11k-caldata | 3 +
  14. .../ipq60xx/base-files/lib/upgrade/mmc.sh | 83 ++
  15. .../base-files/lib/upgrade/platform.sh | 5 +
  16. ...ers-pinctrl-qcom-add-ipq6000-support.patch | 1133 +++++++++++++++++
  17. 11 files changed, 1684 insertions(+), 2 deletions(-)
  18. create mode 100644 package/firmware/ipq-wifi/src/board-jdc_ax1800-pro.ipq6018
  19. create mode 100644 target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq6018-jdc-ax1800-pro.dts
  20. create mode 100644 target/linux/qualcommax/ipq60xx/base-files/lib/upgrade/mmc.sh
  21. create mode 100644 target/linux/qualcommax/patches-6.1/2000-drivers-pinctrl-qcom-add-ipq6000-support.patch
  22. diff --git a/package/boot/uboot-envtools/files/qualcommax b/package/boot/uboot-envtools/files/qualcommax
  23. index 783073696615c..186c56c152f75 100644
  24. --- a/package/boot/uboot-envtools/files/qualcommax
  25. +++ b/package/boot/uboot-envtools/files/qualcommax
  26. @@ -20,6 +20,11 @@ glinet,gl-axt1800)
  27. [ -n "$idx" ] && \
  28. ubootenv_add_uci_config "/dev/mtd$idx" "0x0" "0x40000" "0x20000" "2"
  29. ;;
  30. + jdc,ax1800-pro)
  31. + mmcpart="$(find_mmc_part 0:APPSBLENV)"
  32. + [ -n "$mmcpart" ] && \
  33. + ubootenv_add_uci_config "$mmcpart" "0x0" "0x40000" "0x20000" "2"
  34. + ;;
  35. esac
  36. config_load ubootenv
  37. diff --git a/package/firmware/ipq-wifi/Makefile b/package/firmware/ipq-wifi/Makefile
  38. index 4474977494e4d..4b88911c0e102 100644
  39. --- a/package/firmware/ipq-wifi/Makefile
  40. +++ b/package/firmware/ipq-wifi/Makefile
  41. @@ -36,6 +36,7 @@ ALLWIFIBOARDS:= \
  42. edimax_cax1800 \
  43. glinet_gl-ax1800 \
  44. glinet_gl-axt1800 \
  45. + jdc_ax1800-pro \
  46. linksys_mr7350 \
  47. linksys_mx4200 \
  48. netgear_rax120v2 \
  49. @@ -141,6 +142,7 @@ $(eval $(call generate-ipq-wifi-package,edgecore_eap102,Edgecore EAP102))
  50. $(eval $(call generate-ipq-wifi-package,edimax_cax1800,Edimax CAX1800))
  51. $(eval $(call generate-ipq-wifi-package,glinet_gl-ax1800,GL.iNet GL-AX1800))
  52. $(eval $(call generate-ipq-wifi-package,glinet_gl-axt1800,GL.iNet GL-AXT1800))
  53. +$(eval $(call generate-ipq-wifi-package,jdc_ax1800-pro,JD Cloud AX1800 Pro))
  54. $(eval $(call generate-ipq-wifi-package,linksys_mr7350,Linksys MR7350))
  55. $(eval $(call generate-ipq-wifi-package,linksys_mx4200,Linksys MX4200))
  56. $(eval $(call generate-ipq-wifi-package,netgear_rax120v2,Netgear RAX120v2))
  57. diff --git a/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq6018-jdc-ax1800-pro.dts b/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq6018-jdc-ax1800-pro.dts
  58. new file mode 100644
  59. index 0000000000000..85032240a7a83
  60. --- /dev/null
  61. +++ b/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq6018-jdc-ax1800-pro.dts
  62. @@ -0,0 +1,424 @@
  63. +/dts-v1/;
  64. +/*
  65. + * Copyright (c) 2019, The Linux Foundation. All rights reserved.
  66. + *
  67. + * Permission to use, copy, modify, and/or distribute this software for any
  68. + * purpose with or without fee is hereby granted, provided that the above
  69. + * copyright notice and this permission notice appear in all copies.
  70. + *
  71. + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
  72. + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
  73. + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
  74. + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
  75. + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
  76. + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
  77. + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  78. + */
  79. +
  80. +#include "ipq6018.dtsi"
  81. +#include "ipq6018-512m.dtsi"
  82. +#include "ipq6018-ess.dtsi"
  83. +
  84. +
  85. +#include <dt-bindings/input/input.h>
  86. +#include <dt-bindings/gpio/gpio.h>
  87. +#include <dt-bindings/leds/common.h>
  88. +
  89. +/ {
  90. + model = "JDCloud AX1800 Pro";
  91. + compatible = "jdc,ax1800-pro", "qcom,ipq6018-cp03", "qcom,ipq6018";
  92. +
  93. + aliases {
  94. + sdhc1 = &sdhc;
  95. + serial0 = &blsp1_uart3;
  96. + led-boot = &led_red_1;
  97. + led-failsafe = &led_red_1;
  98. + led-running = &led_green_1;
  99. + led-upgrade = &led_green_1;
  100. + ethernet1 = &dp2;
  101. + ethernet2 = &dp3;
  102. + ethernet3 = &dp4;
  103. + ethernet4 = &dp5;
  104. + };
  105. +
  106. + chosen {
  107. + bootargs = "console=ttyMSM0,115200,n8";
  108. + bootargs-append = " rootfstype=squashfs,ext4 swiotlb=1 coherent_pool=2M";
  109. + };
  110. +
  111. + gpio_keys {
  112. + compatible = "gpio-keys";
  113. + status = "okay";
  114. +
  115. + joylink {
  116. + label = "joylink";
  117. + linux,code = <0x211>;
  118. + gpios = <&tlmm 0x08 GPIO_ACTIVE_LOW>;
  119. + linux,input-type = <0x01>;
  120. + debounce-interval = <0x3c>;
  121. + };
  122. +
  123. + reset {
  124. + label = "reset";
  125. + linux,code = <0x198>;
  126. + gpios = <&tlmm 0x09 GPIO_ACTIVE_LOW>;
  127. + linux,input-type = <0x01>;
  128. + debounce-interval = <0x3c>;
  129. + };
  130. + };
  131. +
  132. + leds {
  133. + compatible = "gpio-leds";
  134. +
  135. + led_blue_1: led@35 {
  136. + label = "led_b1";
  137. + gpio = <&tlmm 0x23 GPIO_ACTIVE_HIGH>;
  138. + };
  139. +
  140. + led_red_1: led@37 {
  141. + label = "led_r1";
  142. + gpio = <&tlmm 0x25 GPIO_ACTIVE_HIGH>;
  143. + };
  144. +
  145. + led_green_1: led@50 {
  146. + label = "led_g1";
  147. + gpio = <&tlmm 0x32 GPIO_ACTIVE_HIGH>;
  148. + };
  149. +
  150. + led_blue_2: led@30 {
  151. + label = "led_b2";
  152. + gpio = <&tlmm 0x1e GPIO_ACTIVE_HIGH>;
  153. + };
  154. +
  155. + led_red_2: led@32 {
  156. + label = "led_r2";
  157. + gpio = <&tlmm 0x20 GPIO_ACTIVE_HIGH>;
  158. + };
  159. +
  160. + led_green_2: led@33 {
  161. + label = "led_g2";
  162. + gpio = <&tlmm 0x21 GPIO_ACTIVE_HIGH>;
  163. + };
  164. +
  165. + led_blue_3:led@31 {
  166. + label = "led_b3";
  167. + gpio = <&tlmm 0x1f GPIO_ACTIVE_HIGH>;
  168. + };
  169. +
  170. + led_red_3: led@29 {
  171. + label = "led_r3";
  172. + gpio = <&tlmm 0x1d GPIO_ACTIVE_HIGH>;
  173. + };
  174. +
  175. + led_green_3: led@34 {
  176. + label = "led_g3";
  177. + gpio = <&tlmm 0x22 GPIO_ACTIVE_HIGH>;
  178. + };
  179. + };
  180. +};
  181. +
  182. +&tlmm {
  183. + compatible = "qcom,ipq6000-pinctrl";
  184. +
  185. + spi_1_pins: spi_1_pins {
  186. + mux {
  187. + pins = "gpio38","gpio39","gpio40","gpio41";
  188. + function = "blsp0_spi";
  189. + drive-strength = <0x08>;
  190. + bias-pull-down;
  191. + };
  192. + };
  193. +
  194. + button_pins: button_pins {
  195. + joylink_button {
  196. + pins = "gpio8";
  197. + function = "gpio";
  198. + drive-strength = <0x08>;
  199. + bias-pull-up;
  200. + };
  201. +
  202. + reset_button {
  203. + pins = "gpio9";
  204. + function = "gpio";
  205. + drive-strength = <0x08>;
  206. + bias-pull-up;
  207. + };
  208. + };
  209. +
  210. + mdio_pinmux: mdio_pinmux {
  211. + mux_0 {
  212. + pins = "gpio64";
  213. + function = "mdc";
  214. + drive-strength = <0x08>;
  215. + bias-pull-up;
  216. + };
  217. +
  218. + mux_1 {
  219. + pins = "gpio65";
  220. + function = "mdio";
  221. + drive-strength = <0x08>;
  222. + bias-pull-up;
  223. + };
  224. +
  225. + mux_2 {
  226. + pins = "gpio75";
  227. + function = "gpio";
  228. + bias-pull-up;
  229. + };
  230. + };
  231. +
  232. + leds_pins: leds_pins {
  233. + led_b1 {
  234. + pins = "gpio35";
  235. + function = "gpio";
  236. + drive-strength = <0x08>;
  237. + bias-pull-down;
  238. + };
  239. +
  240. + led_r1 {
  241. + pins = "gpio37";
  242. + function = "gpio";
  243. + drive-strength = <0x08>;
  244. + bias-pull-down;
  245. + };
  246. +
  247. + led_g1 {
  248. + pins = "gpio50";
  249. + function = "gpio";
  250. + drive-strength = <0x08>;
  251. + bias-pull-down;
  252. + };
  253. +
  254. + led_b2 {
  255. + pins = "gpio30";
  256. + function = "gpio";
  257. + drive-strength = <0x08>;
  258. + bias-pull-down;
  259. + };
  260. +
  261. + led_r2 {
  262. + pins = "gpio32";
  263. + function = "gpio";
  264. + drive-strength = <0x08>;
  265. + bias-pull-down;
  266. + };
  267. +
  268. + led_g2 {
  269. + pins = "gpio33";
  270. + function = "gpio";
  271. + drive-strength = <0x08>;
  272. + bias-pull-down;
  273. + };
  274. +
  275. + led_b3 {
  276. + pins = "gpio31";
  277. + function = "gpio";
  278. + drive-strength = <0x08>;
  279. + bias-pull-down;
  280. + };
  281. +
  282. + led_r3 {
  283. + pins = "gpio29";
  284. + function = "gpio";
  285. + drive-strength = <0x08>;
  286. + bias-pull-down;
  287. + };
  288. +
  289. + led_g3 {
  290. + pins = "gpio34";
  291. + function = "gpio";
  292. + drive-strength = <0x08>;
  293. + bias-pull-down;
  294. + };
  295. + };
  296. +};
  297. +
  298. +
  299. +&blsp1_uart3 {
  300. + pinctrl-0 = <&serial_3_pins>;
  301. + pinctrl-names = "default";
  302. + status = "okay";
  303. +};
  304. +
  305. +&blsp1_spi1 {
  306. + pinctrl-0 = <&spi_1_pins>;
  307. + pinctrl-names = "default";
  308. + cs-select = <0>;
  309. + status = "okay";
  310. +
  311. + m25p80@0 {
  312. + #address-cells = <1>;
  313. + #size-cells = <1>;
  314. + reg = <0>;
  315. + compatible = "n25q128a11";
  316. + linux,modalias = "m25p80", "n25q128a11";
  317. + spi-max-frequency = <50000000>;
  318. + use-default-sizes;
  319. + };
  320. +};
  321. +
  322. +&prng {
  323. + status = "okay";
  324. +};
  325. +
  326. +&cryptobam {
  327. + status = "okay";
  328. +};
  329. +
  330. +&crypto {
  331. + status = "okay";
  332. +};
  333. +
  334. +&qpic_bam {
  335. + status = "okay";
  336. +};
  337. +
  338. +&qusb_phy_0 {
  339. + status = "okay";
  340. +};
  341. +
  342. +&qusb_phy_1 {
  343. + status = "okay";
  344. +};
  345. +
  346. +
  347. +&ssphy_0 {
  348. + status = "okay";
  349. +};
  350. +
  351. +&usb3 {
  352. + status = "okay";
  353. +};
  354. +
  355. +&usb2 {
  356. + status = "okay";
  357. +};
  358. +
  359. +&edma {
  360. + status = "okay";
  361. +};
  362. +
  363. +&rpm {
  364. + status = "disabled";
  365. +};
  366. +
  367. +&mdio {
  368. + status = "okay";
  369. +
  370. + pinctrl-0 = <&mdio_pinmux>;
  371. + pinctrl-names = "default";
  372. + reset-gpios = <&tlmm 75 GPIO_ACTIVE_LOW>;
  373. +
  374. + ethernet_0: ethernet-phy-package@0 {
  375. + compatible = "qcom,qca8075-package";
  376. + #address-cells = <1>;
  377. + #size-cells = <0>;
  378. + reg = <0>;
  379. + qcom,package-mode = "psgmii";
  380. +
  381. + qca8075_1: ethernet-phy@1 {
  382. + compatible = "ethernet-phy-ieee802.3-c22";
  383. + reg = <1>;
  384. + };
  385. +
  386. + qca8075_2: ethernet-phy@2 {
  387. + compatible = "ethernet-phy-ieee802.3-c22";
  388. + reg = <2>;
  389. + };
  390. +
  391. + qca8075_3: ethernet-phy@3 {
  392. + compatible = "ethernet-phy-ieee802.3-c22";
  393. + reg = <3>;
  394. + };
  395. +
  396. + qca8075_4: ethernet-phy@4 {
  397. + compatible = "ethernet-phy-ieee802.3-c22";
  398. + reg = <4>;
  399. + };
  400. + };
  401. +};
  402. +
  403. +&switch {
  404. + status = "okay";
  405. +
  406. + switch_lan_bmp = <(0x8 | 0x10 | 0x20)>; /* lan port bitmap */
  407. + switch_wan_bmp = <0x4>; /* wan port bitmap */
  408. +
  409. + qcom,port_phyinfo {
  410. + port@1 {
  411. + port_id = <2>;
  412. + phy_address = <1>;
  413. + };
  414. +
  415. + port@2 {
  416. + port_id = <3>;
  417. + phy_address = <2>;
  418. + };
  419. +
  420. + port@3 {
  421. + port_id = <4>;
  422. + phy_address = <3>;
  423. + };
  424. +
  425. + port@4 {
  426. + port_id = <5>;
  427. + phy_address = <4>;
  428. + };
  429. + };
  430. +};
  431. +
  432. +&qpic_bam {
  433. + status = "okay";
  434. +};
  435. +
  436. +&wifi {
  437. + status = "okay";
  438. + qcom,ath11k-calibration-variant = "JDC-AX1800-Pro";
  439. + qcom,ath11k-fw-memory-mode = <1>;
  440. +};
  441. +
  442. +
  443. +&dp2 {
  444. + phy-handle = <&qca8075_1>;
  445. + status = "okay";
  446. +};
  447. +
  448. +&dp3 {
  449. + phy-handle = <&qca8075_2>;
  450. + status = "okay";
  451. +};
  452. +
  453. +&dp4 {
  454. + phy-handle = <&qca8075_3>;
  455. + status = "okay";
  456. +};
  457. +
  458. +&dp5 {
  459. + phy-handle = <&qca8075_4>;
  460. + phy-mode = "psgmii";
  461. + status = "okay";
  462. +};
  463. +
  464. +&sdhc {
  465. + status = "okay";
  466. +
  467. + /delete-property/ mmc-hs400-1_8v;
  468. + mmc-hs200-1_8v;
  469. + mmc-ddr-1_8v;
  470. +};
  471. +
  472. +&CPU0 {
  473. + /delete-property/ cpu-supply;
  474. +};
  475. +
  476. +&CPU1 {
  477. + /delete-property/ cpu-supply;
  478. +};
  479. +
  480. +&CPU2 {
  481. + /delete-property/ cpu-supply;
  482. +};
  483. +
  484. +&CPU3 {
  485. + /delete-property/ cpu-supply;
  486. +};
  487. diff --git a/target/linux/qualcommax/image/ipq60xx.mk b/target/linux/qualcommax/image/ipq60xx.mk
  488. index 17fd54aa4017b..efc9c8802ad0a 100644
  489. --- a/target/linux/qualcommax/image/ipq60xx.mk
  490. +++ b/target/linux/qualcommax/image/ipq60xx.mk
  491. @@ -49,6 +49,21 @@ define Device/glinet_gl-axt1800
  492. endef
  493. TARGET_DEVICES += glinet_gl-axt1800
  494. +define Device/jdc_ax1800-pro
  495. + $(call Device/FitImage)
  496. + DEVICE_VENDOR := JD Cloud
  497. + DEVICE_MODEL := JDC AX1800 Pro
  498. + DEVICE_DTS_CONFIG := config@cp03-c2
  499. + DEVICE_DTS := ipq6018-jdc-ax1800-pro
  500. + SOC := ipq6018
  501. + DEVICE_PACKAGES := ipq-wifi-jdc_ax1800-pro kmod-fs-ext4 mkf2fs f2fsck kmod-fs-f2fs
  502. + BLOCKSIZE := 64k
  503. + KERNEL_SIZE := 6144k
  504. + IMAGES += factory.bin
  505. + IMAGE/factory.bin := append-kernel | pad-to 6144k | append-rootfs | append-metadata
  506. +endef
  507. +TARGET_DEVICES += jdc_ax1800-pro
  508. +
  509. define Device/linksys_mr7350
  510. $(call Device/FitImage)
  511. DEVICE_VENDOR := Linksys
  512. diff --git a/target/linux/qualcommax/ipq60xx/base-files/etc/board.d/01_leds b/target/linux/qualcommax/ipq60xx/base-files/etc/board.d/01_leds
  513. index a75a2f071308a..6976dbabb6411 100644
  514. --- a/target/linux/qualcommax/ipq60xx/base-files/etc/board.d/01_leds
  515. +++ b/target/linux/qualcommax/ipq60xx/base-files/etc/board.d/01_leds
  516. @@ -11,6 +11,9 @@ cmiot,ax18)
  517. ucidef_set_led_netdev "wlan2g" "WLAN2G" "blue:wlan2g" "wlan1"
  518. ucidef_set_led_netdev "wlan5g" "WLAN5G" "blue:wlan5g" "wlan0"
  519. ;;
  520. +jdc,ax1800-pro)
  521. + ucidef_set_led_netdev "wan" "WAN" "net_blue" "eth3"
  522. + ;;
  523. redmi,ax5-*|\
  524. xiaomi,rm1800)
  525. ucidef_set_led_netdev "internet" "Internet" "blue:network" "wan"
  526. diff --git a/target/linux/qualcommax/ipq60xx/base-files/etc/board.d/02_network b/target/linux/qualcommax/ipq60xx/base-files/etc/board.d/02_network
  527. index ead1fb8f0fa57..cb743fa38c199 100644
  528. --- a/target/linux/qualcommax/ipq60xx/base-files/etc/board.d/02_network
  529. +++ b/target/linux/qualcommax/ipq60xx/base-files/etc/board.d/02_network
  530. @@ -24,6 +24,9 @@ ipq60xx_setup_interfaces()
  531. glinet,gl-axt1800)
  532. ucidef_set_interfaces_lan_wan "lan1 lan2" "wan"
  533. ;;
  534. + jdc,ax1800-pro)
  535. + ucidef_set_interfaces_lan_wan "eth0 eth1 eth2" "eth3"
  536. + ;;
  537. *)
  538. echo "Unsupported hardware. Network interfaces not initialized"
  539. ;;
  540. diff --git a/target/linux/qualcommax/ipq60xx/base-files/etc/hotplug.d/firmware/11-ath11k-caldata b/target/linux/qualcommax/ipq60xx/base-files/etc/hotplug.d/firmware/11-ath11k-caldata
  541. index f148438b3335d..bc30e8cc423db 100644
  542. --- a/target/linux/qualcommax/ipq60xx/base-files/etc/hotplug.d/firmware/11-ath11k-caldata
  543. +++ b/target/linux/qualcommax/ipq60xx/base-files/etc/hotplug.d/firmware/11-ath11k-caldata
  544. @@ -15,6 +15,7 @@ case "$FIRMWARE" in
  545. zn,m2)
  546. caldata_extract "0:art" 0x1000 0x10000
  547. ;;
  548. + jdc,ax1800-pro|\
  549. redmi,ax5-jdcloud)
  550. caldata_extract_mmc "0:ART" 0x1000 0x10000
  551. ;;
  552. diff --git a/target/linux/qualcommax/ipq60xx/base-files/lib/upgrade/mmc.sh b/target/linux/qualcommax/ipq60xx/base-files/lib/upgrade/mmc.sh
  553. new file mode 100644
  554. index 0000000000000..dac9ddd568654
  555. --- /dev/null
  556. +++ b/target/linux/qualcommax/ipq60xx/base-files/lib/upgrade/mmc.sh
  557. @@ -0,0 +1,83 @@
  558. +#
  559. +# Copyright (C) 2016 lede-project.org
  560. +#
  561. +
  562. +# this can be used as a generic mmc upgrade script
  563. +# just add a device entry in platform.sh,
  564. +# define "kernelname" and "rootfsname" and call mmc_do_upgrade
  565. +# after the kernel and rootfs flash a loopdev (as overlay) is
  566. +# setup on top of the rootfs partition
  567. +# for the proper function a padded rootfs image is needed, basically
  568. +# append "pad-to 64k" to the image definition
  569. +# this is based on the ipq806x zyxel.sh mmc upgrade
  570. +
  571. +. /lib/functions.sh
  572. +
  573. +mmc_do_upgrade() {
  574. + local tar_file="$1"
  575. + local rootfs=
  576. + local kernel=
  577. +
  578. + [ -z "$kernel" ] && kernel=$(find_mmc_part ${kernelname})
  579. + [ -z "$rootfs" ] && rootfs=$(find_mmc_part ${rootfsname})
  580. +
  581. + [ -z "$kernel" ] && echo "Upgrade failed: kernel partition not found! Rebooting..." && reboot -f
  582. + [ -z "$rootfs" ] && echo "Upgrade failed: rootfs partition not found! Rebooting..." && reboot -f
  583. +
  584. + mmc_do_flash $tar_file $kernel $rootfs
  585. +
  586. + return 0
  587. +}
  588. +
  589. +mmc_do_flash() {
  590. + local tar_file=$1
  591. + local kernel=$2
  592. + local rootfs=$3
  593. +
  594. + # keep sure its unbound
  595. + losetup --detach-all || {
  596. + echo Failed to detach all loop devices. Skip this try.
  597. + reboot -f
  598. + }
  599. +
  600. + # use the first found directory in the tar archive
  601. + local board_dir=$(tar tf $tar_file | grep -m 1 '^sysupgrade-.*/$')
  602. + board_dir=${board_dir%/}
  603. +
  604. + echo "flashing kernel to $kernel"
  605. + tar xf $tar_file ${board_dir}/kernel -O >$kernel
  606. +
  607. + echo "flashing rootfs to ${rootfs}"
  608. + tar xf $tar_file ${board_dir}/root -O >"${rootfs}"
  609. +
  610. + # a padded rootfs is needed for overlay fs creation
  611. + local offset=$(tar xf $tar_file ${board_dir}/root -O | wc -c)
  612. + [ $offset -lt 65536 ] && {
  613. + echo Wrong size for rootfs: $offset
  614. + sleep 10
  615. + reboot -f
  616. + }
  617. +
  618. + # Mount loop for rootfs_data
  619. + local loopdev="$(losetup -f)"
  620. + losetup -o $offset $loopdev $rootfs || {
  621. + echo "Failed to mount looped rootfs_data."
  622. + sleep 10
  623. + reboot -f
  624. + }
  625. +
  626. + echo "Format new rootfs_data at position ${offset}."
  627. + mkfs.ext4 -F -L rootfs_data $loopdev
  628. + mkdir /tmp/new_root
  629. + mount -t ext4 $loopdev /tmp/new_root && {
  630. + echo "Saving config to rootfs_data at position ${offset}."
  631. + cp -v "$UPGRADE_BACKUP" "/tmp/new_root/$BACKUP_FILE"
  632. + umount /tmp/new_root
  633. + }
  634. +
  635. + # Cleanup
  636. + losetup -d $loopdev >/dev/null 2>&1
  637. + sync
  638. + umount -a
  639. + reboot -f
  640. +}
  641. diff --git a/target/linux/qualcommax/ipq60xx/base-files/lib/upgrade/platform.sh b/target/linux/qualcommax/ipq60xx/base-files/lib/upgrade/platform.sh
  642. index 3c01d8dd967c4..d4c5072de7b13 100644
  643. --- a/target/linux/qualcommax/ipq60xx/base-files/lib/upgrade/platform.sh
  644. +++ b/target/linux/qualcommax/ipq60xx/base-files/lib/upgrade/platform.sh
  645. @@ -14,6 +14,11 @@ platform_do_upgrade() {
  646. glinet,gl-ax1800)
  647. nand_do_upgrade "$1"
  648. ;;
  649. + jdc,ax1800-pro)
  650. + kernelname="0:HLOS"
  651. + rootfsname="rootfs"
  652. + mmc_do_upgrade "$1"
  653. + ;;
  654. *)
  655. default_do_upgrade "$1"
  656. ;;
  657. diff --git a/target/linux/qualcommax/patches-6.1/2000-drivers-pinctrl-qcom-add-ipq6000-support.patch b/target/linux/qualcommax/patches-6.1/2000-drivers-pinctrl-qcom-add-ipq6000-support.patch
  658. new file mode 100644
  659. index 0000000000000..d856e56fbef64
  660. --- /dev/null
  661. +++ b/target/linux/qualcommax/patches-6.1/2000-drivers-pinctrl-qcom-add-ipq6000-support.patch
  662. @@ -0,0 +1,1133 @@
  663. +From 192ce4f2a695c1d6ed72ac1a1b69f125ada9d4c3 Mon Sep 17 00:00:00 2001
  664. +From: JiaY-shi <[email protected]>
  665. +Date: Tue, 28 Nov 2023 23:31:57 +0800
  666. +Subject: [PATCH] drivers: pinctrl: qcom: add ipq6000 support
  667. +
  668. +---
  669. + drivers/pinctrl/qcom/Makefile | 1 +
  670. + drivers/pinctrl/qcom/pinctrl-ipq6000.c | 1101 ++++++++++++++++++++++++
  671. + 2 files changed, 1102 insertions(+)
  672. + create mode 100644 drivers/pinctrl/qcom/pinctrl-ipq6000.c
  673. +
  674. +diff --git a/drivers/pinctrl/qcom/Makefile b/drivers/pinctrl/qcom/Makefile
  675. +index 8269a1db8794..0db75e183ca0 100644
  676. +--- a/drivers/pinctrl/qcom/Makefile
  677. ++++ b/drivers/pinctrl/qcom/Makefile
  678. +@@ -6,6 +6,7 @@ obj-$(CONFIG_PINCTRL_APQ8084) += pinctrl-apq8084.o
  679. + obj-$(CONFIG_PINCTRL_IPQ4019) += pinctrl-ipq4019.o
  680. + obj-$(CONFIG_PINCTRL_IPQ8064) += pinctrl-ipq8064.o
  681. + obj-$(CONFIG_PINCTRL_IPQ8074) += pinctrl-ipq8074.o
  682. ++obj-$(CONFIG_PINCTRL_IPQ6018) += pinctrl-ipq6000.o
  683. + obj-$(CONFIG_PINCTRL_IPQ6018) += pinctrl-ipq6018.o
  684. + obj-$(CONFIG_PINCTRL_MSM8226) += pinctrl-msm8226.o
  685. + obj-$(CONFIG_PINCTRL_MSM8660) += pinctrl-msm8660.o
  686. +diff --git a/drivers/pinctrl/qcom/pinctrl-ipq6000.c b/drivers/pinctrl/qcom/pinctrl-ipq6000.c
  687. +new file mode 100644
  688. +index 000000000000..cd7b16ed695d
  689. +--- /dev/null
  690. ++++ b/drivers/pinctrl/qcom/pinctrl-ipq6000.c
  691. +@@ -0,0 +1,1101 @@
  692. ++// SPDX-License-Identifier: GPL-2.0
  693. ++/*
  694. ++ * Copyright (c) 2016-2018, The Linux Foundation. All rights reserved.
  695. ++ */
  696. ++
  697. ++#include <linux/module.h>
  698. ++#include <linux/of.h>
  699. ++#include <linux/platform_device.h>
  700. ++#include <linux/pinctrl/pinctrl.h>
  701. ++
  702. ++#include "pinctrl-msm.h"
  703. ++
  704. ++#define FUNCTION(fname) \
  705. ++ [msm_mux_##fname] = { \
  706. ++ .name = #fname, \
  707. ++ .groups = fname##_groups, \
  708. ++ .ngroups = ARRAY_SIZE(fname##_groups), \
  709. ++ }
  710. ++
  711. ++#define REG_SIZE 0x1000
  712. ++#define PINGROUP(id, f1, f2, f3, f4, f5, f6, f7, f8, f9) \
  713. ++ { \
  714. ++ .name = "gpio" #id, \
  715. ++ .pins = gpio##id##_pins, \
  716. ++ .npins = (unsigned int)ARRAY_SIZE(gpio##id##_pins), \
  717. ++ .funcs = (int[]){ \
  718. ++ msm_mux_gpio, /* gpio mode */ \
  719. ++ msm_mux_##f1, \
  720. ++ msm_mux_##f2, \
  721. ++ msm_mux_##f3, \
  722. ++ msm_mux_##f4, \
  723. ++ msm_mux_##f5, \
  724. ++ msm_mux_##f6, \
  725. ++ msm_mux_##f7, \
  726. ++ msm_mux_##f8, \
  727. ++ msm_mux_##f9 \
  728. ++ }, \
  729. ++ .nfuncs = 10, \
  730. ++ .ctl_reg = REG_SIZE * id, \
  731. ++ .io_reg = 0x4 + REG_SIZE * id, \
  732. ++ .intr_cfg_reg = 0x8 + REG_SIZE * id, \
  733. ++ .intr_status_reg = 0xc + REG_SIZE * id, \
  734. ++ .intr_target_reg = 0x8 + REG_SIZE * id, \
  735. ++ .mux_bit = 2, \
  736. ++ .pull_bit = 0, \
  737. ++ .drv_bit = 6, \
  738. ++ .oe_bit = 9, \
  739. ++ .in_bit = 0, \
  740. ++ .out_bit = 1, \
  741. ++ .intr_enable_bit = 0, \
  742. ++ .intr_status_bit = 0, \
  743. ++ .intr_target_bit = 5, \
  744. ++ .intr_target_kpss_val = 3, \
  745. ++ .intr_raw_status_bit = 4, \
  746. ++ .intr_polarity_bit = 1, \
  747. ++ .intr_detection_bit = 2, \
  748. ++ .intr_detection_width = 2, \
  749. ++ }
  750. ++
  751. ++static const struct pinctrl_pin_desc ipq6018_pins[] = {
  752. ++ PINCTRL_PIN(0, "GPIO_0"),
  753. ++ PINCTRL_PIN(1, "GPIO_1"),
  754. ++ PINCTRL_PIN(2, "GPIO_2"),
  755. ++ PINCTRL_PIN(3, "GPIO_3"),
  756. ++ PINCTRL_PIN(4, "GPIO_4"),
  757. ++ PINCTRL_PIN(5, "GPIO_5"),
  758. ++ PINCTRL_PIN(6, "GPIO_6"),
  759. ++ PINCTRL_PIN(7, "GPIO_7"),
  760. ++ PINCTRL_PIN(8, "GPIO_8"),
  761. ++ PINCTRL_PIN(9, "GPIO_9"),
  762. ++ PINCTRL_PIN(10, "GPIO_10"),
  763. ++ PINCTRL_PIN(11, "GPIO_11"),
  764. ++ PINCTRL_PIN(12, "GPIO_12"),
  765. ++ PINCTRL_PIN(13, "GPIO_13"),
  766. ++ PINCTRL_PIN(14, "GPIO_14"),
  767. ++ PINCTRL_PIN(15, "GPIO_15"),
  768. ++ PINCTRL_PIN(16, "GPIO_16"),
  769. ++ PINCTRL_PIN(17, "GPIO_17"),
  770. ++ PINCTRL_PIN(18, "GPIO_18"),
  771. ++ PINCTRL_PIN(19, "GPIO_19"),
  772. ++
  773. ++ PINCTRL_PIN(21, "GPIO_21"),
  774. ++ PINCTRL_PIN(22, "GPIO_22"),
  775. ++ PINCTRL_PIN(23, "GPIO_23"),
  776. ++ PINCTRL_PIN(24, "GPIO_24"),
  777. ++ PINCTRL_PIN(25, "GPIO_25"),
  778. ++ PINCTRL_PIN(26, "GPIO_26"),
  779. ++ PINCTRL_PIN(27, "GPIO_27"),
  780. ++ PINCTRL_PIN(28, "GPIO_28"),
  781. ++ PINCTRL_PIN(29, "GPIO_29"),
  782. ++ PINCTRL_PIN(30, "GPIO_30"),
  783. ++ PINCTRL_PIN(31, "GPIO_31"),
  784. ++ PINCTRL_PIN(32, "GPIO_32"),
  785. ++ PINCTRL_PIN(33, "GPIO_33"),
  786. ++ PINCTRL_PIN(34, "GPIO_34"),
  787. ++ PINCTRL_PIN(35, "GPIO_35"),
  788. ++ PINCTRL_PIN(36, "GPIO_36"),
  789. ++ PINCTRL_PIN(37, "GPIO_37"),
  790. ++ PINCTRL_PIN(38, "GPIO_38"),
  791. ++ PINCTRL_PIN(39, "GPIO_39"),
  792. ++ PINCTRL_PIN(40, "GPIO_40"),
  793. ++ PINCTRL_PIN(41, "GPIO_41"),
  794. ++ PINCTRL_PIN(42, "GPIO_42"),
  795. ++ PINCTRL_PIN(43, "GPIO_43"),
  796. ++ PINCTRL_PIN(44, "GPIO_44"),
  797. ++ PINCTRL_PIN(45, "GPIO_45"),
  798. ++ PINCTRL_PIN(46, "GPIO_46"),
  799. ++ PINCTRL_PIN(47, "GPIO_47"),
  800. ++ PINCTRL_PIN(48, "GPIO_48"),
  801. ++ PINCTRL_PIN(49, "GPIO_49"),
  802. ++ PINCTRL_PIN(50, "GPIO_50"),
  803. ++ PINCTRL_PIN(51, "GPIO_51"),
  804. ++ PINCTRL_PIN(52, "GPIO_52"),
  805. ++ PINCTRL_PIN(53, "GPIO_53"),
  806. ++ PINCTRL_PIN(54, "GPIO_54"),
  807. ++ PINCTRL_PIN(55, "GPIO_55"),
  808. ++ PINCTRL_PIN(56, "GPIO_56"),
  809. ++ PINCTRL_PIN(57, "GPIO_57"),
  810. ++ PINCTRL_PIN(58, "GPIO_58"),
  811. ++ PINCTRL_PIN(59, "GPIO_59"),
  812. ++ PINCTRL_PIN(60, "GPIO_60"),
  813. ++ PINCTRL_PIN(61, "GPIO_61"),
  814. ++ PINCTRL_PIN(62, "GPIO_62"),
  815. ++ PINCTRL_PIN(63, "GPIO_63"),
  816. ++ PINCTRL_PIN(64, "GPIO_64"),
  817. ++ PINCTRL_PIN(65, "GPIO_65"),
  818. ++ PINCTRL_PIN(66, "GPIO_66"),
  819. ++ PINCTRL_PIN(67, "GPIO_67"),
  820. ++ PINCTRL_PIN(68, "GPIO_68"),
  821. ++ PINCTRL_PIN(69, "GPIO_69"),
  822. ++ PINCTRL_PIN(70, "GPIO_70"),
  823. ++ PINCTRL_PIN(71, "GPIO_71"),
  824. ++ PINCTRL_PIN(72, "GPIO_72"),
  825. ++ PINCTRL_PIN(73, "GPIO_73"),
  826. ++ PINCTRL_PIN(74, "GPIO_74"),
  827. ++ PINCTRL_PIN(75, "GPIO_75"),
  828. ++ PINCTRL_PIN(76, "GPIO_76"),
  829. ++ PINCTRL_PIN(77, "GPIO_77"),
  830. ++ PINCTRL_PIN(78, "GPIO_78"),
  831. ++ PINCTRL_PIN(79, "GPIO_79"),
  832. ++};
  833. ++
  834. ++#define DECLARE_MSM_GPIO_PINS(pin) \
  835. ++ static const unsigned int gpio##pin##_pins[] = { pin }
  836. ++DECLARE_MSM_GPIO_PINS(0);
  837. ++DECLARE_MSM_GPIO_PINS(1);
  838. ++DECLARE_MSM_GPIO_PINS(2);
  839. ++DECLARE_MSM_GPIO_PINS(3);
  840. ++DECLARE_MSM_GPIO_PINS(4);
  841. ++DECLARE_MSM_GPIO_PINS(5);
  842. ++DECLARE_MSM_GPIO_PINS(6);
  843. ++DECLARE_MSM_GPIO_PINS(7);
  844. ++DECLARE_MSM_GPIO_PINS(8);
  845. ++DECLARE_MSM_GPIO_PINS(9);
  846. ++DECLARE_MSM_GPIO_PINS(10);
  847. ++DECLARE_MSM_GPIO_PINS(11);
  848. ++DECLARE_MSM_GPIO_PINS(12);
  849. ++DECLARE_MSM_GPIO_PINS(13);
  850. ++DECLARE_MSM_GPIO_PINS(14);
  851. ++DECLARE_MSM_GPIO_PINS(15);
  852. ++DECLARE_MSM_GPIO_PINS(16);
  853. ++DECLARE_MSM_GPIO_PINS(17);
  854. ++DECLARE_MSM_GPIO_PINS(18);
  855. ++DECLARE_MSM_GPIO_PINS(19);
  856. ++
  857. ++DECLARE_MSM_GPIO_PINS(21);
  858. ++DECLARE_MSM_GPIO_PINS(22);
  859. ++DECLARE_MSM_GPIO_PINS(23);
  860. ++DECLARE_MSM_GPIO_PINS(24);
  861. ++DECLARE_MSM_GPIO_PINS(25);
  862. ++DECLARE_MSM_GPIO_PINS(26);
  863. ++DECLARE_MSM_GPIO_PINS(27);
  864. ++DECLARE_MSM_GPIO_PINS(28);
  865. ++DECLARE_MSM_GPIO_PINS(29);
  866. ++DECLARE_MSM_GPIO_PINS(30);
  867. ++DECLARE_MSM_GPIO_PINS(31);
  868. ++DECLARE_MSM_GPIO_PINS(32);
  869. ++DECLARE_MSM_GPIO_PINS(33);
  870. ++DECLARE_MSM_GPIO_PINS(34);
  871. ++DECLARE_MSM_GPIO_PINS(35);
  872. ++DECLARE_MSM_GPIO_PINS(36);
  873. ++DECLARE_MSM_GPIO_PINS(37);
  874. ++DECLARE_MSM_GPIO_PINS(38);
  875. ++DECLARE_MSM_GPIO_PINS(39);
  876. ++DECLARE_MSM_GPIO_PINS(40);
  877. ++DECLARE_MSM_GPIO_PINS(41);
  878. ++DECLARE_MSM_GPIO_PINS(42);
  879. ++DECLARE_MSM_GPIO_PINS(43);
  880. ++DECLARE_MSM_GPIO_PINS(44);
  881. ++DECLARE_MSM_GPIO_PINS(45);
  882. ++DECLARE_MSM_GPIO_PINS(46);
  883. ++DECLARE_MSM_GPIO_PINS(47);
  884. ++DECLARE_MSM_GPIO_PINS(48);
  885. ++DECLARE_MSM_GPIO_PINS(49);
  886. ++DECLARE_MSM_GPIO_PINS(50);
  887. ++DECLARE_MSM_GPIO_PINS(51);
  888. ++DECLARE_MSM_GPIO_PINS(52);
  889. ++DECLARE_MSM_GPIO_PINS(53);
  890. ++DECLARE_MSM_GPIO_PINS(54);
  891. ++DECLARE_MSM_GPIO_PINS(55);
  892. ++DECLARE_MSM_GPIO_PINS(56);
  893. ++DECLARE_MSM_GPIO_PINS(57);
  894. ++DECLARE_MSM_GPIO_PINS(58);
  895. ++DECLARE_MSM_GPIO_PINS(59);
  896. ++DECLARE_MSM_GPIO_PINS(60);
  897. ++DECLARE_MSM_GPIO_PINS(61);
  898. ++DECLARE_MSM_GPIO_PINS(62);
  899. ++DECLARE_MSM_GPIO_PINS(63);
  900. ++DECLARE_MSM_GPIO_PINS(64);
  901. ++DECLARE_MSM_GPIO_PINS(65);
  902. ++DECLARE_MSM_GPIO_PINS(66);
  903. ++DECLARE_MSM_GPIO_PINS(67);
  904. ++DECLARE_MSM_GPIO_PINS(68);
  905. ++DECLARE_MSM_GPIO_PINS(69);
  906. ++DECLARE_MSM_GPIO_PINS(70);
  907. ++DECLARE_MSM_GPIO_PINS(71);
  908. ++DECLARE_MSM_GPIO_PINS(72);
  909. ++DECLARE_MSM_GPIO_PINS(73);
  910. ++DECLARE_MSM_GPIO_PINS(74);
  911. ++DECLARE_MSM_GPIO_PINS(75);
  912. ++DECLARE_MSM_GPIO_PINS(76);
  913. ++DECLARE_MSM_GPIO_PINS(77);
  914. ++DECLARE_MSM_GPIO_PINS(78);
  915. ++DECLARE_MSM_GPIO_PINS(79);
  916. ++
  917. ++enum ipq6018_functions {
  918. ++ msm_mux_atest_char,
  919. ++ msm_mux_atest_char0,
  920. ++ msm_mux_atest_char1,
  921. ++
  922. ++ msm_mux_atest_char3,
  923. ++ msm_mux_audio0,
  924. ++ msm_mux_audio1,
  925. ++ msm_mux_audio2,
  926. ++ msm_mux_audio3,
  927. ++ msm_mux_audio_rxbclk,
  928. ++ msm_mux_audio_rxfsync,
  929. ++ msm_mux_audio_rxmclk,
  930. ++ msm_mux_audio_rxmclkin,
  931. ++ msm_mux_audio_txbclk,
  932. ++ msm_mux_audio_txfsync,
  933. ++ msm_mux_audio_txmclk,
  934. ++ msm_mux_audio_txmclkin,
  935. ++ msm_mux_blsp0_i2c,
  936. ++ msm_mux_blsp0_spi,
  937. ++ msm_mux_blsp0_uart,
  938. ++ msm_mux_blsp1_i2c,
  939. ++ msm_mux_blsp1_spi,
  940. ++ msm_mux_blsp1_uart,
  941. ++ msm_mux_blsp2_i2c,
  942. ++ msm_mux_blsp2_spi,
  943. ++ msm_mux_blsp2_uart,
  944. ++ msm_mux_blsp3_i2c,
  945. ++ msm_mux_blsp3_spi,
  946. ++ msm_mux_blsp3_uart,
  947. ++ msm_mux_blsp4_i2c,
  948. ++ msm_mux_blsp4_spi,
  949. ++ msm_mux_blsp4_uart,
  950. ++ msm_mux_blsp5_i2c,
  951. ++ msm_mux_blsp5_uart,
  952. ++ msm_mux_burn0,
  953. ++ msm_mux_burn1,
  954. ++ msm_mux_cri_trng,
  955. ++ msm_mux_cri_trng0,
  956. ++ msm_mux_cri_trng1,
  957. ++ msm_mux_cxc0,
  958. ++ msm_mux_cxc1,
  959. ++ msm_mux_dbg_out,
  960. ++ msm_mux_gcc_plltest,
  961. ++ msm_mux_gcc_tlmm,
  962. ++ msm_mux_gpio,
  963. ++ msm_mux_lpass_aud,
  964. ++ msm_mux_lpass_aud0,
  965. ++ msm_mux_lpass_aud1,
  966. ++ msm_mux_lpass_aud2,
  967. ++ msm_mux_lpass_pcm,
  968. ++ msm_mux_lpass_pdm,
  969. ++ msm_mux_mac00,
  970. ++ msm_mux_mac01,
  971. ++ msm_mux_mac10,
  972. ++ msm_mux_mac11,
  973. ++ msm_mux_mac12,
  974. ++ msm_mux_mac13,
  975. ++ msm_mux_mac20,
  976. ++ msm_mux_mac21,
  977. ++ msm_mux_mdc,
  978. ++ msm_mux_mdio,
  979. ++ msm_mux_pcie0_clk,
  980. ++ msm_mux_pcie0_rst,
  981. ++ msm_mux_pcie0_wake,
  982. ++ msm_mux_prng_rosc,
  983. ++ msm_mux_pta1_0,
  984. ++ msm_mux_pta1_1,
  985. ++ msm_mux_pta1_2,
  986. ++ msm_mux_pta2_0,
  987. ++ msm_mux_pta2_1,
  988. ++ msm_mux_pta2_2,
  989. ++ msm_mux_pwm00,
  990. ++ msm_mux_pwm01,
  991. ++ msm_mux_pwm02,
  992. ++ msm_mux_pwm03,
  993. ++ msm_mux_pwm04,
  994. ++ msm_mux_pwm10,
  995. ++ msm_mux_pwm11,
  996. ++ msm_mux_pwm12,
  997. ++ msm_mux_pwm13,
  998. ++ msm_mux_pwm14,
  999. ++
  1000. ++ msm_mux_pwm21,
  1001. ++ msm_mux_pwm22,
  1002. ++ msm_mux_pwm23,
  1003. ++ msm_mux_pwm24,
  1004. ++ msm_mux_pwm30,
  1005. ++ msm_mux_pwm31,
  1006. ++ msm_mux_pwm32,
  1007. ++ msm_mux_pwm33,
  1008. ++ msm_mux_qdss_cti_trig_in_a0,
  1009. ++ msm_mux_qdss_cti_trig_in_a1,
  1010. ++ msm_mux_qdss_cti_trig_out_a0,
  1011. ++ msm_mux_qdss_cti_trig_out_a1,
  1012. ++ msm_mux_qdss_cti_trig_in_b0,
  1013. ++ msm_mux_qdss_cti_trig_in_b1,
  1014. ++ msm_mux_qdss_cti_trig_out_b0,
  1015. ++ msm_mux_qdss_cti_trig_out_b1,
  1016. ++ msm_mux_qdss_traceclk_a,
  1017. ++ msm_mux_qdss_tracectl_a,
  1018. ++ msm_mux_qdss_tracedata_a,
  1019. ++ msm_mux_qdss_traceclk_b,
  1020. ++ msm_mux_qdss_tracectl_b,
  1021. ++ msm_mux_qdss_tracedata_b,
  1022. ++ msm_mux_qpic_pad,
  1023. ++ msm_mux_rx0,
  1024. ++ msm_mux_rx1,
  1025. ++ msm_mux_rx_swrm,
  1026. ++ msm_mux_rx_swrm0,
  1027. ++ msm_mux_rx_swrm1,
  1028. ++ msm_mux_sd_card,
  1029. ++ msm_mux_sd_write,
  1030. ++ msm_mux_tsens_max,
  1031. ++ msm_mux_tx_swrm,
  1032. ++ msm_mux_tx_swrm0,
  1033. ++ msm_mux_tx_swrm1,
  1034. ++ msm_mux_tx_swrm2,
  1035. ++ msm_mux_wci20,
  1036. ++ msm_mux_wci21,
  1037. ++ msm_mux_wci22,
  1038. ++ msm_mux_wci23,
  1039. ++ msm_mux_wsa_swrm,
  1040. ++ msm_mux__,
  1041. ++};
  1042. ++
  1043. ++static const char * const blsp3_uart_groups[] = {
  1044. ++ "gpio73", "gpio74", "gpio75", "gpio76",
  1045. ++};
  1046. ++
  1047. ++static const char * const blsp3_i2c_groups[] = {
  1048. ++ "gpio73", "gpio74",
  1049. ++};
  1050. ++
  1051. ++static const char * const blsp3_spi_groups[] = {
  1052. ++ "gpio73", "gpio74", "gpio75", "gpio76", "gpio77", "gpio78", "gpio79",
  1053. ++};
  1054. ++
  1055. ++static const char * const wci20_groups[] = {
  1056. ++ "gpio0", "gpio2",
  1057. ++};
  1058. ++
  1059. ++static const char * const qpic_pad_groups[] = {
  1060. ++ "gpio0", "gpio1", "gpio2", "gpio3", "gpio4", "gpio9", "gpio10",
  1061. ++ "gpio11", "gpio17", "gpio15", "gpio12", "gpio13", "gpio14", "gpio5",
  1062. ++ "gpio6", "gpio7", "gpio8",
  1063. ++};
  1064. ++
  1065. ++static const char * const burn0_groups[] = {
  1066. ++ "gpio0",
  1067. ++};
  1068. ++
  1069. ++static const char * const mac12_groups[] = {
  1070. ++ "gpio1", "gpio11",
  1071. ++};
  1072. ++
  1073. ++static const char * const qdss_tracectl_b_groups[] = {
  1074. ++ "gpio1",
  1075. ++};
  1076. ++
  1077. ++static const char * const burn1_groups[] = {
  1078. ++ "gpio1",
  1079. ++};
  1080. ++
  1081. ++static const char * const qdss_traceclk_b_groups[] = {
  1082. ++ "gpio0",
  1083. ++};
  1084. ++
  1085. ++static const char * const qdss_tracedata_b_groups[] = {
  1086. ++ "gpio2", "gpio3", "gpio4", "gpio5", "gpio6", "gpio7", "gpio8", "gpio9",
  1087. ++ "gpio10", "gpio11", "gpio12", "gpio13", "gpio14", "gpio15", "gpio16",
  1088. ++ "gpio17",
  1089. ++};
  1090. ++
  1091. ++static const char * const mac01_groups[] = {
  1092. ++ "gpio3", "gpio4",
  1093. ++};
  1094. ++
  1095. ++static const char * const mac21_groups[] = {
  1096. ++ "gpio5", "gpio6",
  1097. ++};
  1098. ++
  1099. ++static const char * const atest_char_groups[] = {
  1100. ++ "gpio9",
  1101. ++};
  1102. ++
  1103. ++static const char * const cxc0_groups[] = {
  1104. ++ "gpio9", "gpio16",
  1105. ++};
  1106. ++
  1107. ++static const char * const mac13_groups[] = {
  1108. ++ "gpio9", "gpio16",
  1109. ++};
  1110. ++
  1111. ++static const char * const dbg_out_groups[] = {
  1112. ++ "gpio9",
  1113. ++};
  1114. ++
  1115. ++static const char * const wci22_groups[] = {
  1116. ++ "gpio11", "gpio17",
  1117. ++};
  1118. ++
  1119. ++static const char * const pwm00_groups[] = {
  1120. ++ "gpio18",
  1121. ++};
  1122. ++
  1123. ++static const char * const atest_char0_groups[] = {
  1124. ++ "gpio18",
  1125. ++};
  1126. ++
  1127. ++static const char * const wci23_groups[] = {
  1128. ++ "gpio18", "gpio19",
  1129. ++};
  1130. ++
  1131. ++static const char * const mac11_groups[] = {
  1132. ++ "gpio18", "gpio19",
  1133. ++};
  1134. ++
  1135. ++static const char * const pwm10_groups[] = {
  1136. ++ "gpio19",
  1137. ++};
  1138. ++
  1139. ++static const char * const atest_char1_groups[] = {
  1140. ++ "gpio19",
  1141. ++};
  1142. ++
  1143. ++
  1144. ++static const char * const pwm30_groups[] = {
  1145. ++ "gpio21",
  1146. ++};
  1147. ++
  1148. ++static const char * const atest_char3_groups[] = {
  1149. ++ "gpio21",
  1150. ++};
  1151. ++
  1152. ++static const char * const audio_txmclk_groups[] = {
  1153. ++ "gpio22",
  1154. ++};
  1155. ++
  1156. ++static const char * const audio_txmclkin_groups[] = {
  1157. ++ "gpio22",
  1158. ++};
  1159. ++
  1160. ++static const char * const pwm02_groups[] = {
  1161. ++ "gpio22",
  1162. ++};
  1163. ++
  1164. ++static const char * const tx_swrm0_groups[] = {
  1165. ++ "gpio22",
  1166. ++};
  1167. ++
  1168. ++static const char * const qdss_cti_trig_out_b0_groups[] = {
  1169. ++ "gpio22",
  1170. ++};
  1171. ++
  1172. ++static const char * const audio_txbclk_groups[] = {
  1173. ++ "gpio23",
  1174. ++};
  1175. ++
  1176. ++static const char * const pwm12_groups[] = {
  1177. ++ "gpio23",
  1178. ++};
  1179. ++
  1180. ++static const char * const wsa_swrm_groups[] = {
  1181. ++ "gpio23", "gpio24",
  1182. ++};
  1183. ++
  1184. ++static const char * const tx_swrm1_groups[] = {
  1185. ++ "gpio23",
  1186. ++};
  1187. ++
  1188. ++static const char * const qdss_cti_trig_in_b0_groups[] = {
  1189. ++ "gpio23",
  1190. ++};
  1191. ++
  1192. ++static const char * const audio_txfsync_groups[] = {
  1193. ++ "gpio24",
  1194. ++};
  1195. ++
  1196. ++static const char * const pwm22_groups[] = {
  1197. ++ "gpio24",
  1198. ++};
  1199. ++
  1200. ++static const char * const tx_swrm2_groups[] = {
  1201. ++ "gpio24",
  1202. ++};
  1203. ++
  1204. ++static const char * const qdss_cti_trig_out_b1_groups[] = {
  1205. ++ "gpio24",
  1206. ++};
  1207. ++
  1208. ++static const char * const audio0_groups[] = {
  1209. ++ "gpio25", "gpio32",
  1210. ++};
  1211. ++
  1212. ++static const char * const pwm32_groups[] = {
  1213. ++ "gpio25",
  1214. ++};
  1215. ++
  1216. ++static const char * const tx_swrm_groups[] = {
  1217. ++ "gpio25",
  1218. ++};
  1219. ++
  1220. ++static const char * const qdss_cti_trig_in_b1_groups[] = {
  1221. ++ "gpio25",
  1222. ++};
  1223. ++
  1224. ++static const char * const audio1_groups[] = {
  1225. ++ "gpio26", "gpio33",
  1226. ++};
  1227. ++
  1228. ++static const char * const pwm04_groups[] = {
  1229. ++ "gpio26",
  1230. ++};
  1231. ++
  1232. ++static const char * const audio2_groups[] = {
  1233. ++ "gpio27",
  1234. ++};
  1235. ++
  1236. ++static const char * const pwm14_groups[] = {
  1237. ++ "gpio27",
  1238. ++};
  1239. ++
  1240. ++static const char * const audio3_groups[] = {
  1241. ++ "gpio28",
  1242. ++};
  1243. ++
  1244. ++static const char * const pwm24_groups[] = {
  1245. ++ "gpio28",
  1246. ++};
  1247. ++
  1248. ++static const char * const audio_rxmclk_groups[] = {
  1249. ++ "gpio29",
  1250. ++};
  1251. ++
  1252. ++static const char * const audio_rxmclkin_groups[] = {
  1253. ++ "gpio29",
  1254. ++};
  1255. ++
  1256. ++static const char * const pwm03_groups[] = {
  1257. ++ "gpio29",
  1258. ++};
  1259. ++
  1260. ++static const char * const lpass_pdm_groups[] = {
  1261. ++ "gpio29", "gpio30", "gpio31", "gpio32",
  1262. ++};
  1263. ++
  1264. ++static const char * const lpass_aud_groups[] = {
  1265. ++ "gpio29",
  1266. ++};
  1267. ++
  1268. ++static const char * const qdss_cti_trig_in_a1_groups[] = {
  1269. ++ "gpio29",
  1270. ++};
  1271. ++
  1272. ++static const char * const audio_rxbclk_groups[] = {
  1273. ++ "gpio30",
  1274. ++};
  1275. ++
  1276. ++static const char * const pwm13_groups[] = {
  1277. ++ "gpio30",
  1278. ++};
  1279. ++
  1280. ++static const char * const lpass_aud0_groups[] = {
  1281. ++ "gpio30",
  1282. ++};
  1283. ++
  1284. ++static const char * const rx_swrm_groups[] = {
  1285. ++ "gpio30",
  1286. ++};
  1287. ++
  1288. ++static const char * const qdss_cti_trig_out_a1_groups[] = {
  1289. ++ "gpio30",
  1290. ++};
  1291. ++
  1292. ++static const char * const audio_rxfsync_groups[] = {
  1293. ++ "gpio31",
  1294. ++};
  1295. ++
  1296. ++static const char * const pwm23_groups[] = {
  1297. ++ "gpio31",
  1298. ++};
  1299. ++
  1300. ++static const char * const lpass_aud1_groups[] = {
  1301. ++ "gpio31",
  1302. ++};
  1303. ++
  1304. ++static const char * const rx_swrm0_groups[] = {
  1305. ++ "gpio31",
  1306. ++};
  1307. ++
  1308. ++static const char * const qdss_cti_trig_in_a0_groups[] = {
  1309. ++ "gpio31",
  1310. ++};
  1311. ++
  1312. ++static const char * const pwm33_groups[] = {
  1313. ++ "gpio32",
  1314. ++};
  1315. ++
  1316. ++static const char * const lpass_aud2_groups[] = {
  1317. ++ "gpio32",
  1318. ++};
  1319. ++
  1320. ++static const char * const rx_swrm1_groups[] = {
  1321. ++ "gpio32",
  1322. ++};
  1323. ++
  1324. ++static const char * const qdss_cti_trig_out_a0_groups[] = {
  1325. ++ "gpio32",
  1326. ++};
  1327. ++
  1328. ++static const char * const lpass_pcm_groups[] = {
  1329. ++ "gpio34", "gpio35", "gpio36", "gpio37",
  1330. ++};
  1331. ++
  1332. ++static const char * const mac10_groups[] = {
  1333. ++ "gpio34", "gpio35",
  1334. ++};
  1335. ++
  1336. ++static const char * const mac00_groups[] = {
  1337. ++ "gpio34", "gpio35",
  1338. ++};
  1339. ++
  1340. ++static const char * const mac20_groups[] = {
  1341. ++ "gpio36", "gpio37",
  1342. ++};
  1343. ++
  1344. ++static const char * const blsp0_uart_groups[] = {
  1345. ++ "gpio38", "gpio39", "gpio40", "gpio41",
  1346. ++};
  1347. ++
  1348. ++static const char * const blsp0_i2c_groups[] = {
  1349. ++ "gpio38", "gpio39",
  1350. ++};
  1351. ++
  1352. ++static const char * const blsp0_spi_groups[] = {
  1353. ++ "gpio38", "gpio39", "gpio40", "gpio41",
  1354. ++};
  1355. ++
  1356. ++static const char * const blsp2_uart_groups[] = {
  1357. ++ "gpio42", "gpio43", "gpio44", "gpio45",
  1358. ++};
  1359. ++
  1360. ++static const char * const blsp2_i2c_groups[] = {
  1361. ++ "gpio42", "gpio43",
  1362. ++};
  1363. ++
  1364. ++static const char * const blsp2_spi_groups[] = {
  1365. ++ "gpio42", "gpio43", "gpio44", "gpio45",
  1366. ++};
  1367. ++
  1368. ++static const char * const blsp5_i2c_groups[] = {
  1369. ++ "gpio46", "gpio47",
  1370. ++};
  1371. ++
  1372. ++static const char * const blsp5_uart_groups[] = {
  1373. ++ "gpio48", "gpio49",
  1374. ++};
  1375. ++
  1376. ++static const char * const qdss_traceclk_a_groups[] = {
  1377. ++ "gpio48",
  1378. ++};
  1379. ++
  1380. ++static const char * const qdss_tracectl_a_groups[] = {
  1381. ++ "gpio49",
  1382. ++};
  1383. ++
  1384. ++static const char * const pwm01_groups[] = {
  1385. ++ "gpio50",
  1386. ++};
  1387. ++
  1388. ++static const char * const pta1_1_groups[] = {
  1389. ++ "gpio51",
  1390. ++};
  1391. ++
  1392. ++static const char * const pwm11_groups[] = {
  1393. ++ "gpio51",
  1394. ++};
  1395. ++
  1396. ++static const char * const rx1_groups[] = {
  1397. ++ "gpio51",
  1398. ++};
  1399. ++
  1400. ++static const char * const pta1_2_groups[] = {
  1401. ++ "gpio52",
  1402. ++};
  1403. ++
  1404. ++static const char * const pwm21_groups[] = {
  1405. ++ "gpio52",
  1406. ++};
  1407. ++
  1408. ++static const char * const pta1_0_groups[] = {
  1409. ++ "gpio53",
  1410. ++};
  1411. ++
  1412. ++static const char * const pwm31_groups[] = {
  1413. ++ "gpio53",
  1414. ++};
  1415. ++
  1416. ++static const char * const prng_rosc_groups[] = {
  1417. ++ "gpio53",
  1418. ++};
  1419. ++
  1420. ++static const char * const blsp4_uart_groups[] = {
  1421. ++ "gpio55", "gpio56", "gpio57", "gpio58",
  1422. ++};
  1423. ++
  1424. ++static const char * const blsp4_i2c_groups[] = {
  1425. ++ "gpio55", "gpio56",
  1426. ++};
  1427. ++
  1428. ++static const char * const blsp4_spi_groups[] = {
  1429. ++ "gpio55", "gpio56", "gpio57", "gpio58",
  1430. ++};
  1431. ++
  1432. ++static const char * const pcie0_clk_groups[] = {
  1433. ++ "gpio59",
  1434. ++};
  1435. ++
  1436. ++static const char * const cri_trng0_groups[] = {
  1437. ++ "gpio59",
  1438. ++};
  1439. ++
  1440. ++static const char * const pcie0_rst_groups[] = {
  1441. ++ "gpio60",
  1442. ++};
  1443. ++
  1444. ++static const char * const cri_trng1_groups[] = {
  1445. ++ "gpio60",
  1446. ++};
  1447. ++
  1448. ++static const char * const pcie0_wake_groups[] = {
  1449. ++ "gpio61",
  1450. ++};
  1451. ++
  1452. ++static const char * const cri_trng_groups[] = {
  1453. ++ "gpio61",
  1454. ++};
  1455. ++
  1456. ++static const char * const sd_card_groups[] = {
  1457. ++ "gpio62",
  1458. ++};
  1459. ++
  1460. ++static const char * const sd_write_groups[] = {
  1461. ++ "gpio63",
  1462. ++};
  1463. ++
  1464. ++static const char * const rx0_groups[] = {
  1465. ++ "gpio63",
  1466. ++};
  1467. ++
  1468. ++static const char * const tsens_max_groups[] = {
  1469. ++ "gpio63",
  1470. ++};
  1471. ++
  1472. ++static const char * const mdc_groups[] = {
  1473. ++ "gpio64",
  1474. ++};
  1475. ++
  1476. ++static const char * const qdss_tracedata_a_groups[] = {
  1477. ++ "gpio64", "gpio65", "gpio66", "gpio67", "gpio68", "gpio69", "gpio70",
  1478. ++ "gpio71", "gpio72", "gpio73", "gpio74", "gpio75", "gpio76", "gpio77",
  1479. ++ "gpio78", "gpio79",
  1480. ++};
  1481. ++
  1482. ++static const char * const mdio_groups[] = {
  1483. ++ "gpio65",
  1484. ++};
  1485. ++
  1486. ++static const char * const pta2_0_groups[] = {
  1487. ++ "gpio66",
  1488. ++};
  1489. ++
  1490. ++static const char * const wci21_groups[] = {
  1491. ++ "gpio66", "gpio68",
  1492. ++};
  1493. ++
  1494. ++static const char * const cxc1_groups[] = {
  1495. ++ "gpio66", "gpio68",
  1496. ++};
  1497. ++
  1498. ++static const char * const pta2_1_groups[] = {
  1499. ++ "gpio67",
  1500. ++};
  1501. ++
  1502. ++static const char * const pta2_2_groups[] = {
  1503. ++ "gpio68",
  1504. ++};
  1505. ++
  1506. ++static const char * const blsp1_uart_groups[] = {
  1507. ++ "gpio69", "gpio70", "gpio71", "gpio72",
  1508. ++};
  1509. ++
  1510. ++static const char * const blsp1_i2c_groups[] = {
  1511. ++ "gpio69", "gpio70",
  1512. ++};
  1513. ++
  1514. ++static const char * const blsp1_spi_groups[] = {
  1515. ++ "gpio69", "gpio70", "gpio71", "gpio72",
  1516. ++};
  1517. ++
  1518. ++static const char * const gcc_plltest_groups[] = {
  1519. ++ "gpio69", "gpio71",
  1520. ++};
  1521. ++
  1522. ++static const char * const gcc_tlmm_groups[] = {
  1523. ++ "gpio70",
  1524. ++};
  1525. ++
  1526. ++static const char * const gpio_groups[] = {
  1527. ++ "gpio0", "gpio1", "gpio2", "gpio3", "gpio4", "gpio5", "gpio6", "gpio7",
  1528. ++ "gpio8", "gpio9", "gpio10", "gpio11", "gpio12", "gpio13", "gpio14",
  1529. ++ "gpio15", "gpio16", "gpio17", "gpio18", "gpio19", "gpio20", "gpio21",
  1530. ++ "gpio22", "gpio23", "gpio24", "gpio25", "gpio26", "gpio27", "gpio28",
  1531. ++ "gpio29", "gpio30", "gpio31", "gpio32", "gpio33", "gpio34", "gpio35",
  1532. ++ "gpio36", "gpio37", "gpio38", "gpio39", "gpio40", "gpio41", "gpio42",
  1533. ++ "gpio43", "gpio44", "gpio45", "gpio46", "gpio47", "gpio48", "gpio49",
  1534. ++ "gpio50", "gpio51", "gpio52", "gpio53", "gpio54", "gpio55", "gpio56",
  1535. ++ "gpio57", "gpio58", "gpio59", "gpio60", "gpio61", "gpio62", "gpio63",
  1536. ++ "gpio64", "gpio65", "gpio66", "gpio67", "gpio68", "gpio69", "gpio70",
  1537. ++ "gpio71", "gpio72", "gpio73", "gpio74", "gpio75", "gpio76", "gpio77",
  1538. ++ "gpio78", "gpio79",
  1539. ++};
  1540. ++
  1541. ++static const struct msm_function ipq6018_functions[] = {
  1542. ++ FUNCTION(atest_char),
  1543. ++ FUNCTION(atest_char0),
  1544. ++ FUNCTION(atest_char1),
  1545. ++
  1546. ++ FUNCTION(atest_char3),
  1547. ++ FUNCTION(audio0),
  1548. ++ FUNCTION(audio1),
  1549. ++ FUNCTION(audio2),
  1550. ++ FUNCTION(audio3),
  1551. ++ FUNCTION(audio_rxbclk),
  1552. ++ FUNCTION(audio_rxfsync),
  1553. ++ FUNCTION(audio_rxmclk),
  1554. ++ FUNCTION(audio_rxmclkin),
  1555. ++ FUNCTION(audio_txbclk),
  1556. ++ FUNCTION(audio_txfsync),
  1557. ++ FUNCTION(audio_txmclk),
  1558. ++ FUNCTION(audio_txmclkin),
  1559. ++ FUNCTION(blsp0_i2c),
  1560. ++ FUNCTION(blsp0_spi),
  1561. ++ FUNCTION(blsp0_uart),
  1562. ++ FUNCTION(blsp1_i2c),
  1563. ++ FUNCTION(blsp1_spi),
  1564. ++ FUNCTION(blsp1_uart),
  1565. ++ FUNCTION(blsp2_i2c),
  1566. ++ FUNCTION(blsp2_spi),
  1567. ++ FUNCTION(blsp2_uart),
  1568. ++ FUNCTION(blsp3_i2c),
  1569. ++ FUNCTION(blsp3_spi),
  1570. ++ FUNCTION(blsp3_uart),
  1571. ++ FUNCTION(blsp4_i2c),
  1572. ++ FUNCTION(blsp4_spi),
  1573. ++ FUNCTION(blsp4_uart),
  1574. ++ FUNCTION(blsp5_i2c),
  1575. ++ FUNCTION(blsp5_uart),
  1576. ++ FUNCTION(burn0),
  1577. ++ FUNCTION(burn1),
  1578. ++ FUNCTION(cri_trng),
  1579. ++ FUNCTION(cri_trng0),
  1580. ++ FUNCTION(cri_trng1),
  1581. ++ FUNCTION(cxc0),
  1582. ++ FUNCTION(cxc1),
  1583. ++ FUNCTION(dbg_out),
  1584. ++ FUNCTION(gcc_plltest),
  1585. ++ FUNCTION(gcc_tlmm),
  1586. ++ FUNCTION(gpio),
  1587. ++ FUNCTION(lpass_aud),
  1588. ++ FUNCTION(lpass_aud0),
  1589. ++ FUNCTION(lpass_aud1),
  1590. ++ FUNCTION(lpass_aud2),
  1591. ++ FUNCTION(lpass_pcm),
  1592. ++ FUNCTION(lpass_pdm),
  1593. ++ FUNCTION(mac00),
  1594. ++ FUNCTION(mac01),
  1595. ++ FUNCTION(mac10),
  1596. ++ FUNCTION(mac11),
  1597. ++ FUNCTION(mac12),
  1598. ++ FUNCTION(mac13),
  1599. ++ FUNCTION(mac20),
  1600. ++ FUNCTION(mac21),
  1601. ++ FUNCTION(mdc),
  1602. ++ FUNCTION(mdio),
  1603. ++ FUNCTION(pcie0_clk),
  1604. ++ FUNCTION(pcie0_rst),
  1605. ++ FUNCTION(pcie0_wake),
  1606. ++ FUNCTION(prng_rosc),
  1607. ++ FUNCTION(pta1_0),
  1608. ++ FUNCTION(pta1_1),
  1609. ++ FUNCTION(pta1_2),
  1610. ++ FUNCTION(pta2_0),
  1611. ++ FUNCTION(pta2_1),
  1612. ++ FUNCTION(pta2_2),
  1613. ++ FUNCTION(pwm00),
  1614. ++ FUNCTION(pwm01),
  1615. ++ FUNCTION(pwm02),
  1616. ++ FUNCTION(pwm03),
  1617. ++ FUNCTION(pwm04),
  1618. ++ FUNCTION(pwm10),
  1619. ++ FUNCTION(pwm11),
  1620. ++ FUNCTION(pwm12),
  1621. ++ FUNCTION(pwm13),
  1622. ++ FUNCTION(pwm14),
  1623. ++
  1624. ++ FUNCTION(pwm21),
  1625. ++ FUNCTION(pwm22),
  1626. ++ FUNCTION(pwm23),
  1627. ++ FUNCTION(pwm24),
  1628. ++ FUNCTION(pwm30),
  1629. ++ FUNCTION(pwm31),
  1630. ++ FUNCTION(pwm32),
  1631. ++ FUNCTION(pwm33),
  1632. ++ FUNCTION(qdss_cti_trig_in_a0),
  1633. ++ FUNCTION(qdss_cti_trig_in_a1),
  1634. ++ FUNCTION(qdss_cti_trig_out_a0),
  1635. ++ FUNCTION(qdss_cti_trig_out_a1),
  1636. ++ FUNCTION(qdss_cti_trig_in_b0),
  1637. ++ FUNCTION(qdss_cti_trig_in_b1),
  1638. ++ FUNCTION(qdss_cti_trig_out_b0),
  1639. ++ FUNCTION(qdss_cti_trig_out_b1),
  1640. ++ FUNCTION(qdss_traceclk_a),
  1641. ++ FUNCTION(qdss_tracectl_a),
  1642. ++ FUNCTION(qdss_tracedata_a),
  1643. ++ FUNCTION(qdss_traceclk_b),
  1644. ++ FUNCTION(qdss_tracectl_b),
  1645. ++ FUNCTION(qdss_tracedata_b),
  1646. ++ FUNCTION(qpic_pad),
  1647. ++ FUNCTION(rx0),
  1648. ++ FUNCTION(rx1),
  1649. ++ FUNCTION(rx_swrm),
  1650. ++ FUNCTION(rx_swrm0),
  1651. ++ FUNCTION(rx_swrm1),
  1652. ++ FUNCTION(sd_card),
  1653. ++ FUNCTION(sd_write),
  1654. ++ FUNCTION(tsens_max),
  1655. ++ FUNCTION(tx_swrm),
  1656. ++ FUNCTION(tx_swrm0),
  1657. ++ FUNCTION(tx_swrm1),
  1658. ++ FUNCTION(tx_swrm2),
  1659. ++ FUNCTION(wci20),
  1660. ++ FUNCTION(wci21),
  1661. ++ FUNCTION(wci22),
  1662. ++ FUNCTION(wci23),
  1663. ++ FUNCTION(wsa_swrm),
  1664. ++};
  1665. ++
  1666. ++static const struct msm_pingroup ipq6018_groups[] = {
  1667. ++ PINGROUP(0, qpic_pad, wci20, qdss_traceclk_b, _, burn0, _, _, _, _),
  1668. ++ PINGROUP(1, qpic_pad, mac12, qdss_tracectl_b, _, burn1, _, _, _, _),
  1669. ++ PINGROUP(2, qpic_pad, wci20, qdss_tracedata_b, _, _, _, _, _, _),
  1670. ++ PINGROUP(3, qpic_pad, mac01, qdss_tracedata_b, _, _, _, _, _, _),
  1671. ++ PINGROUP(4, qpic_pad, mac01, qdss_tracedata_b, _, _, _, _, _, _),
  1672. ++ PINGROUP(5, qpic_pad, mac21, qdss_tracedata_b, _, _, _, _, _, _),
  1673. ++ PINGROUP(6, qpic_pad, mac21, qdss_tracedata_b, _, _, _, _, _, _),
  1674. ++ PINGROUP(7, qpic_pad, qdss_tracedata_b, _, _, _, _, _, _, _),
  1675. ++ PINGROUP(8, qpic_pad, qdss_tracedata_b, _, _, _, _, _, _, _),
  1676. ++ PINGROUP(9, qpic_pad, atest_char, cxc0, mac13, dbg_out, qdss_tracedata_b, _, _, _),
  1677. ++ PINGROUP(10, qpic_pad, qdss_tracedata_b, _, _, _, _, _, _, _),
  1678. ++ PINGROUP(11, qpic_pad, wci22, mac12, qdss_tracedata_b, _, _, _, _, _),
  1679. ++ PINGROUP(12, qpic_pad, qdss_tracedata_b, _, _, _, _, _, _, _),
  1680. ++ PINGROUP(13, qpic_pad, qdss_tracedata_b, _, _, _, _, _, _, _),
  1681. ++ PINGROUP(14, qpic_pad, qdss_tracedata_b, _, _, _, _, _, _, _),
  1682. ++ PINGROUP(15, qpic_pad, qdss_tracedata_b, _, _, _, _, _, _, _),
  1683. ++ PINGROUP(16, qpic_pad, cxc0, mac13, qdss_tracedata_b, _, _, _, _, _),
  1684. ++ PINGROUP(17, qpic_pad, qdss_tracedata_b, wci22, _, _, _, _, _, _),
  1685. ++ PINGROUP(18, pwm00, atest_char0, wci23, mac11, _, _, _, _, _),
  1686. ++ PINGROUP(19, pwm10, atest_char1, wci23, mac11, _, _, _, _, _),
  1687. ++
  1688. ++ PINGROUP(21, pwm30, atest_char3, _, _, _, _, _, _, _),
  1689. ++ PINGROUP(22, audio_txmclk, audio_txmclkin, pwm02, tx_swrm0, _, qdss_cti_trig_out_b0, _, _, _),
  1690. ++ PINGROUP(23, audio_txbclk, pwm12, wsa_swrm, tx_swrm1, _, qdss_cti_trig_in_b0, _, _, _),
  1691. ++ PINGROUP(24, audio_txfsync, pwm22, wsa_swrm, tx_swrm2, _, qdss_cti_trig_out_b1, _, _, _),
  1692. ++ PINGROUP(25, audio0, pwm32, tx_swrm, _, qdss_cti_trig_in_b1, _, _, _, _),
  1693. ++ PINGROUP(26, audio1, pwm04, _, _, _, _, _, _, _),
  1694. ++ PINGROUP(27, audio2, pwm14, _, _, _, _, _, _, _),
  1695. ++ PINGROUP(28, audio3, pwm24, _, _, _, _, _, _, _),
  1696. ++ PINGROUP(29, audio_rxmclk, audio_rxmclkin, pwm03, lpass_pdm, lpass_aud, qdss_cti_trig_in_a1, _, _, _),
  1697. ++ PINGROUP(30, audio_rxbclk, pwm13, lpass_pdm, lpass_aud0, rx_swrm, _, qdss_cti_trig_out_a1, _, _),
  1698. ++ PINGROUP(31, audio_rxfsync, pwm23, lpass_pdm, lpass_aud1, rx_swrm0, _, qdss_cti_trig_in_a0, _, _),
  1699. ++ PINGROUP(32, audio0, pwm33, lpass_pdm, lpass_aud2, rx_swrm1, _, qdss_cti_trig_out_a0, _, _),
  1700. ++ PINGROUP(33, audio1, _, _, _, _, _, _, _, _),
  1701. ++ PINGROUP(34, lpass_pcm, mac10, mac00, _, _, _, _, _, _),
  1702. ++ PINGROUP(35, lpass_pcm, mac10, mac00, _, _, _, _, _, _),
  1703. ++ PINGROUP(36, lpass_pcm, mac20, _, _, _, _, _, _, _),
  1704. ++ PINGROUP(37, lpass_pcm, mac20, _, _, _, _, _, _, _),
  1705. ++ PINGROUP(38, blsp0_uart, blsp0_i2c, blsp0_spi, _, _, _, _, _, _),
  1706. ++ PINGROUP(39, blsp0_uart, blsp0_i2c, blsp0_spi, _, _, _, _, _, _),
  1707. ++ PINGROUP(40, blsp0_uart, blsp0_spi, _, _, _, _, _, _, _),
  1708. ++ PINGROUP(41, blsp0_uart, blsp0_spi, _, _, _, _, _, _, _),
  1709. ++ PINGROUP(42, blsp2_uart, blsp2_i2c, blsp2_spi, _, _, _, _, _, _),
  1710. ++ PINGROUP(43, blsp2_uart, blsp2_i2c, blsp2_spi, _, _, _, _, _, _),
  1711. ++ PINGROUP(44, blsp2_uart, blsp2_spi, _, _, _, _, _, _, _),
  1712. ++ PINGROUP(45, blsp2_uart, blsp2_spi, _, _, _, _, _, _, _),
  1713. ++ PINGROUP(46, blsp5_i2c, _, _, _, _, _, _, _, _),
  1714. ++ PINGROUP(47, blsp5_i2c, _, _, _, _, _, _, _, _),
  1715. ++ PINGROUP(48, blsp5_uart, _, qdss_traceclk_a, _, _, _, _, _, _),
  1716. ++ PINGROUP(49, blsp5_uart, _, qdss_tracectl_a, _, _, _, _, _, _),
  1717. ++ PINGROUP(50, pwm01, _, _, _, _, _, _, _, _),
  1718. ++ PINGROUP(51, pta1_1, pwm11, _, rx1, _, _, _, _, _),
  1719. ++ PINGROUP(52, pta1_2, pwm21, _, _, _, _, _, _, _),
  1720. ++ PINGROUP(53, pta1_0, pwm31, prng_rosc, _, _, _, _, _, _),
  1721. ++ PINGROUP(54, _, _, _, _, _, _, _, _, _),
  1722. ++ PINGROUP(55, blsp4_uart, blsp4_i2c, blsp4_spi, _, _, _, _, _, _),
  1723. ++ PINGROUP(56, blsp4_uart, blsp4_i2c, blsp4_spi, _, _, _, _, _, _),
  1724. ++ PINGROUP(57, blsp4_uart, blsp4_spi, _, _, _, _, _, _, _),
  1725. ++ PINGROUP(58, blsp4_uart, blsp4_spi, _, _, _, _, _, _, _),
  1726. ++ PINGROUP(59, pcie0_clk, _, _, cri_trng0, _, _, _, _, _),
  1727. ++ PINGROUP(60, pcie0_rst, _, _, cri_trng1, _, _, _, _, _),
  1728. ++ PINGROUP(61, pcie0_wake, _, _, cri_trng, _, _, _, _, _),
  1729. ++ PINGROUP(62, sd_card, _, _, _, _, _, _, _, _),
  1730. ++ PINGROUP(63, sd_write, rx0, _, tsens_max, _, _, _, _, _),
  1731. ++ PINGROUP(64, mdc, _, qdss_tracedata_a, _, _, _, _, _, _),
  1732. ++ PINGROUP(65, mdio, _, qdss_tracedata_a, _, _, _, _, _, _),
  1733. ++ PINGROUP(66, pta2_0, wci21, cxc1, qdss_tracedata_a, _, _, _, _, _),
  1734. ++ PINGROUP(67, pta2_1, qdss_tracedata_a, _, _, _, _, _, _, _),
  1735. ++ PINGROUP(68, pta2_2, wci21, cxc1, qdss_tracedata_a, _, _, _, _, _),
  1736. ++ PINGROUP(69, blsp1_uart, blsp1_i2c, blsp1_spi, gcc_plltest, qdss_tracedata_a, _, _, _, _),
  1737. ++ PINGROUP(70, blsp1_uart, blsp1_i2c, blsp1_spi, gcc_tlmm, qdss_tracedata_a, _, _, _, _),
  1738. ++ PINGROUP(71, blsp1_uart, blsp1_spi, gcc_plltest, qdss_tracedata_a, _, _, _, _, _),
  1739. ++ PINGROUP(72, blsp1_uart, blsp1_spi, qdss_tracedata_a, _, _, _, _, _, _),
  1740. ++ PINGROUP(73, blsp3_uart, blsp3_i2c, blsp3_spi, _, qdss_tracedata_a, _, _, _, _),
  1741. ++ PINGROUP(74, blsp3_uart, blsp3_i2c, blsp3_spi, _, qdss_tracedata_a, _, _, _, _),
  1742. ++ PINGROUP(75, blsp3_uart, blsp3_spi, _, qdss_tracedata_a, _, _, _, _, _),
  1743. ++ PINGROUP(76, blsp3_uart, blsp3_spi, _, qdss_tracedata_a, _, _, _, _, _),
  1744. ++ PINGROUP(77, blsp3_spi, _, qdss_tracedata_a, _, _, _, _, _, _),
  1745. ++ PINGROUP(78, blsp3_spi, _, qdss_tracedata_a, _, _, _, _, _, _),
  1746. ++ PINGROUP(79, blsp3_spi, _, qdss_tracedata_a, _, _, _, _, _, _),
  1747. ++};
  1748. ++
  1749. ++static const struct msm_pinctrl_soc_data ipq6018_pinctrl = {
  1750. ++ .pins = ipq6018_pins,
  1751. ++ .npins = ARRAY_SIZE(ipq6018_pins),
  1752. ++ .functions = ipq6018_functions,
  1753. ++ .nfunctions = ARRAY_SIZE(ipq6018_functions),
  1754. ++ .groups = ipq6018_groups,
  1755. ++ .ngroups = ARRAY_SIZE(ipq6018_groups),
  1756. ++ .ngpios = 79,
  1757. ++};
  1758. ++
  1759. ++static int ipq6018_pinctrl_probe(struct platform_device *pdev)
  1760. ++{
  1761. ++ return msm_pinctrl_probe(pdev, &ipq6018_pinctrl);
  1762. ++}
  1763. ++
  1764. ++static const struct of_device_id ipq6018_pinctrl_of_match[] = {
  1765. ++ { .compatible = "qcom,ipq6000-pinctrl", },
  1766. ++ { },
  1767. ++};
  1768. ++
  1769. ++static struct platform_driver ipq6018_pinctrl_driver = {
  1770. ++ .driver = {
  1771. ++ .name = "ipq6000-pinctrl",
  1772. ++ .of_match_table = ipq6018_pinctrl_of_match,
  1773. ++ },
  1774. ++ .probe = ipq6018_pinctrl_probe,
  1775. ++ .remove = msm_pinctrl_remove,
  1776. ++};
  1777. ++
  1778. ++static int __init ipq6018_pinctrl_init(void)
  1779. ++{
  1780. ++ return platform_driver_register(&ipq6018_pinctrl_driver);
  1781. ++}
  1782. ++arch_initcall(ipq6018_pinctrl_init);
  1783. ++
  1784. ++static void __exit ipq6018_pinctrl_exit(void)
  1785. ++{
  1786. ++ platform_driver_unregister(&ipq6018_pinctrl_driver);
  1787. ++}
  1788. ++module_exit(ipq6018_pinctrl_exit);
  1789. ++
  1790. ++MODULE_DESCRIPTION("QTI ipq6000 pinctrl driver");
  1791. ++MODULE_LICENSE("GPL v2");
  1792. ++MODULE_DEVICE_TABLE(of, ipq6018_pinctrl_of_match);
  1793. +--
  1794. +2.25.1
  1795. +