rk3399-firefly.dts 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943
  1. // SPDX-License-Identifier: (GPL-2.0+ OR MIT)
  2. /*
  3. * Copyright (c) 2017 Fuzhou Rockchip Electronics Co., Ltd.
  4. */
  5. /dts-v1/;
  6. #include <dt-bindings/input/linux-event-codes.h>
  7. #include <dt-bindings/interrupt-controller/irq.h>
  8. #include <dt-bindings/pwm/pwm.h>
  9. #include <dt-bindings/usb/pd.h>
  10. #include "rk3399.dtsi"
  11. #include "rk3399-opp.dtsi"
  12. / {
  13. model = "Firefly-RK3399 Board";
  14. compatible = "firefly,firefly-rk3399", "rockchip,rk3399";
  15. aliases {
  16. mmc0 = &sdio0;
  17. mmc1 = &sdmmc;
  18. mmc2 = &sdhci;
  19. };
  20. chosen {
  21. stdout-path = "serial2:1500000n8";
  22. };
  23. backlight: backlight {
  24. compatible = "pwm-backlight";
  25. enable-gpios = <&gpio1 RK_PB5 GPIO_ACTIVE_HIGH>;
  26. pwms = <&pwm0 0 25000 0>;
  27. brightness-levels = <
  28. 0 1 2 3 4 5 6 7
  29. 8 9 10 11 12 13 14 15
  30. 16 17 18 19 20 21 22 23
  31. 24 25 26 27 28 29 30 31
  32. 32 33 34 35 36 37 38 39
  33. 40 41 42 43 44 45 46 47
  34. 48 49 50 51 52 53 54 55
  35. 56 57 58 59 60 61 62 63
  36. 64 65 66 67 68 69 70 71
  37. 72 73 74 75 76 77 78 79
  38. 80 81 82 83 84 85 86 87
  39. 88 89 90 91 92 93 94 95
  40. 96 97 98 99 100 101 102 103
  41. 104 105 106 107 108 109 110 111
  42. 112 113 114 115 116 117 118 119
  43. 120 121 122 123 124 125 126 127
  44. 128 129 130 131 132 133 134 135
  45. 136 137 138 139 140 141 142 143
  46. 144 145 146 147 148 149 150 151
  47. 152 153 154 155 156 157 158 159
  48. 160 161 162 163 164 165 166 167
  49. 168 169 170 171 172 173 174 175
  50. 176 177 178 179 180 181 182 183
  51. 184 185 186 187 188 189 190 191
  52. 192 193 194 195 196 197 198 199
  53. 200 201 202 203 204 205 206 207
  54. 208 209 210 211 212 213 214 215
  55. 216 217 218 219 220 221 222 223
  56. 224 225 226 227 228 229 230 231
  57. 232 233 234 235 236 237 238 239
  58. 240 241 242 243 244 245 246 247
  59. 248 249 250 251 252 253 254 255>;
  60. default-brightness-level = <200>;
  61. };
  62. clkin_gmac: external-gmac-clock {
  63. compatible = "fixed-clock";
  64. clock-frequency = <125000000>;
  65. clock-output-names = "clkin_gmac";
  66. #clock-cells = <0>;
  67. };
  68. dc_12v: dc-12v {
  69. compatible = "regulator-fixed";
  70. regulator-name = "dc_12v";
  71. regulator-always-on;
  72. regulator-boot-on;
  73. regulator-min-microvolt = <12000000>;
  74. regulator-max-microvolt = <12000000>;
  75. };
  76. gpio-keys {
  77. compatible = "gpio-keys";
  78. autorepeat;
  79. pinctrl-names = "default";
  80. pinctrl-0 = <&pwrbtn>;
  81. key-power {
  82. debounce-interval = <100>;
  83. gpios = <&gpio0 RK_PA5 GPIO_ACTIVE_LOW>;
  84. label = "GPIO Key Power";
  85. linux,code = <KEY_POWER>;
  86. wakeup-source;
  87. };
  88. };
  89. ir-receiver {
  90. compatible = "gpio-ir-receiver";
  91. gpios = <&gpio0 RK_PA6 GPIO_ACTIVE_LOW>;
  92. pinctrl-0 = <&ir_int>;
  93. pinctrl-names = "default";
  94. };
  95. leds {
  96. compatible = "gpio-leds";
  97. pinctrl-names = "default";
  98. pinctrl-0 = <&work_led_pin>, <&diy_led_pin>;
  99. work_led: led-0 {
  100. label = "work";
  101. default-state = "on";
  102. gpios = <&gpio2 RK_PD3 GPIO_ACTIVE_HIGH>;
  103. };
  104. diy_led: led-1 {
  105. label = "diy";
  106. default-state = "off";
  107. gpios = <&gpio0 RK_PB5 GPIO_ACTIVE_HIGH>;
  108. };
  109. };
  110. rt5640-sound {
  111. compatible = "simple-audio-card";
  112. simple-audio-card,name = "rockchip,rt5640-codec";
  113. simple-audio-card,format = "i2s";
  114. simple-audio-card,mclk-fs = <256>;
  115. simple-audio-card,widgets =
  116. "Microphone", "Mic Jack",
  117. "Headphone", "Headphone Jack";
  118. simple-audio-card,routing =
  119. "Mic Jack", "MICBIAS1",
  120. "IN1P", "Mic Jack",
  121. "Headphone Jack", "HPOL",
  122. "Headphone Jack", "HPOR";
  123. simple-audio-card,cpu {
  124. sound-dai = <&i2s1>;
  125. };
  126. simple-audio-card,codec {
  127. sound-dai = <&rt5640>;
  128. };
  129. };
  130. sdio_pwrseq: sdio-pwrseq {
  131. compatible = "mmc-pwrseq-simple";
  132. clocks = <&rk808 1>;
  133. clock-names = "ext_clock";
  134. pinctrl-names = "default";
  135. pinctrl-0 = <&wifi_enable_h>;
  136. /*
  137. * On the module itself this is one of these (depending
  138. * on the actual card populated):
  139. * - SDIO_RESET_L_WL_REG_ON
  140. * - PDN (power down when low)
  141. */
  142. reset-gpios = <&gpio0 RK_PB2 GPIO_ACTIVE_LOW>;
  143. };
  144. sound-dit {
  145. compatible = "audio-graph-card";
  146. label = "SPDIF";
  147. dais = <&spdif_p0>;
  148. };
  149. spdif-dit {
  150. compatible = "linux,spdif-dit";
  151. #sound-dai-cells = <0>;
  152. port {
  153. dit_p0_0: endpoint {
  154. remote-endpoint = <&spdif_p0_0>;
  155. };
  156. };
  157. };
  158. /* switched by pmic_sleep */
  159. vcc1v8_s3: vcca1v8_s3: vcc1v8-s3 {
  160. compatible = "regulator-fixed";
  161. regulator-name = "vcc1v8_s3";
  162. regulator-always-on;
  163. regulator-boot-on;
  164. regulator-min-microvolt = <1800000>;
  165. regulator-max-microvolt = <1800000>;
  166. vin-supply = <&vcc_1v8>;
  167. };
  168. vcc3v3_pcie: vcc3v3-pcie-regulator {
  169. compatible = "regulator-fixed";
  170. enable-active-high;
  171. gpio = <&gpio1 RK_PC1 GPIO_ACTIVE_HIGH>;
  172. pinctrl-names = "default";
  173. pinctrl-0 = <&pcie_pwr_en>;
  174. regulator-name = "vcc3v3_pcie";
  175. regulator-always-on;
  176. regulator-boot-on;
  177. vin-supply = <&dc_12v>;
  178. };
  179. vcc3v3_sys: vcc3v3-sys {
  180. compatible = "regulator-fixed";
  181. regulator-name = "vcc3v3_sys";
  182. regulator-always-on;
  183. regulator-boot-on;
  184. regulator-min-microvolt = <3300000>;
  185. regulator-max-microvolt = <3300000>;
  186. vin-supply = <&vcc_sys>;
  187. };
  188. /* Actually 3 regulators (host0, 1, 2) controlled by the same gpio */
  189. vcc5v0_host: vcc5v0-host-regulator {
  190. compatible = "regulator-fixed";
  191. enable-active-high;
  192. gpio = <&gpio1 RK_PA0 GPIO_ACTIVE_HIGH>;
  193. pinctrl-names = "default";
  194. pinctrl-0 = <&vcc5v0_host_en>;
  195. regulator-name = "vcc5v0_host";
  196. regulator-always-on;
  197. vin-supply = <&vcc_sys>;
  198. };
  199. vcc5v0_typec: vcc5v0-typec-regulator {
  200. compatible = "regulator-fixed";
  201. enable-active-high;
  202. gpio = <&gpio1 RK_PA3 GPIO_ACTIVE_HIGH>;
  203. pinctrl-names = "default";
  204. pinctrl-0 = <&vcc5v0_typec_en>;
  205. regulator-name = "vcc5v0_typec";
  206. regulator-always-on;
  207. vin-supply = <&vcc_sys>;
  208. };
  209. vcc_sys: vcc-sys {
  210. compatible = "regulator-fixed";
  211. regulator-name = "vcc_sys";
  212. regulator-always-on;
  213. regulator-boot-on;
  214. regulator-min-microvolt = <5000000>;
  215. regulator-max-microvolt = <5000000>;
  216. vin-supply = <&dc_12v>;
  217. };
  218. vdd_log: vdd-log {
  219. compatible = "pwm-regulator";
  220. pwms = <&pwm2 0 25000 1>;
  221. pwm-supply = <&vcc_sys>;
  222. regulator-name = "vdd_log";
  223. regulator-always-on;
  224. regulator-boot-on;
  225. regulator-min-microvolt = <430000>;
  226. regulator-max-microvolt = <1400000>;
  227. };
  228. };
  229. &cpu_l0 {
  230. cpu-supply = <&vdd_cpu_l>;
  231. };
  232. &cpu_l1 {
  233. cpu-supply = <&vdd_cpu_l>;
  234. };
  235. &cpu_l2 {
  236. cpu-supply = <&vdd_cpu_l>;
  237. };
  238. &cpu_l3 {
  239. cpu-supply = <&vdd_cpu_l>;
  240. };
  241. &cpu_b0 {
  242. cpu-supply = <&vdd_cpu_b>;
  243. };
  244. &cpu_b1 {
  245. cpu-supply = <&vdd_cpu_b>;
  246. };
  247. &emmc_phy {
  248. status = "okay";
  249. };
  250. &gmac {
  251. assigned-clocks = <&cru SCLK_RMII_SRC>;
  252. assigned-clock-parents = <&clkin_gmac>;
  253. clock_in_out = "input";
  254. phy-supply = <&vcc_lan>;
  255. phy-mode = "rgmii";
  256. pinctrl-names = "default";
  257. pinctrl-0 = <&rgmii_pins>;
  258. snps,reset-gpio = <&gpio3 RK_PB7 GPIO_ACTIVE_LOW>;
  259. snps,reset-active-low;
  260. snps,reset-delays-us = <0 10000 50000>;
  261. tx_delay = <0x28>;
  262. rx_delay = <0x11>;
  263. status = "okay";
  264. };
  265. &gpu {
  266. mali-supply = <&vdd_gpu>;
  267. status = "okay";
  268. };
  269. &hdmi {
  270. ddc-i2c-bus = <&i2c3>;
  271. pinctrl-names = "default";
  272. pinctrl-0 = <&hdmi_cec>;
  273. status = "okay";
  274. };
  275. &i2c0 {
  276. clock-frequency = <400000>;
  277. i2c-scl-rising-time-ns = <168>;
  278. i2c-scl-falling-time-ns = <4>;
  279. status = "okay";
  280. rk808: pmic@1b {
  281. compatible = "rockchip,rk808";
  282. reg = <0x1b>;
  283. interrupt-parent = <&gpio1>;
  284. interrupts = <21 IRQ_TYPE_LEVEL_LOW>;
  285. #clock-cells = <1>;
  286. clock-output-names = "xin32k", "rk808-clkout2";
  287. pinctrl-names = "default";
  288. pinctrl-0 = <&pmic_int_l>;
  289. rockchip,system-power-controller;
  290. wakeup-source;
  291. vcc1-supply = <&vcc_sys>;
  292. vcc2-supply = <&vcc_sys>;
  293. vcc3-supply = <&vcc_sys>;
  294. vcc4-supply = <&vcc_sys>;
  295. vcc6-supply = <&vcc_sys>;
  296. vcc7-supply = <&vcc_sys>;
  297. vcc8-supply = <&vcc3v3_sys>;
  298. vcc9-supply = <&vcc_sys>;
  299. vcc10-supply = <&vcc_sys>;
  300. vcc11-supply = <&vcc_sys>;
  301. vcc12-supply = <&vcc3v3_sys>;
  302. vddio-supply = <&vcc1v8_pmu>;
  303. regulators {
  304. vdd_center: DCDC_REG1 {
  305. regulator-name = "vdd_center";
  306. regulator-always-on;
  307. regulator-boot-on;
  308. regulator-min-microvolt = <750000>;
  309. regulator-max-microvolt = <1350000>;
  310. regulator-ramp-delay = <6001>;
  311. regulator-state-mem {
  312. regulator-off-in-suspend;
  313. };
  314. };
  315. vdd_cpu_l: DCDC_REG2 {
  316. regulator-name = "vdd_cpu_l";
  317. regulator-always-on;
  318. regulator-boot-on;
  319. regulator-min-microvolt = <750000>;
  320. regulator-max-microvolt = <1350000>;
  321. regulator-ramp-delay = <6001>;
  322. regulator-state-mem {
  323. regulator-off-in-suspend;
  324. };
  325. };
  326. vcc_ddr: DCDC_REG3 {
  327. regulator-name = "vcc_ddr";
  328. regulator-always-on;
  329. regulator-boot-on;
  330. regulator-state-mem {
  331. regulator-on-in-suspend;
  332. };
  333. };
  334. vcc_1v8: DCDC_REG4 {
  335. regulator-name = "vcc_1v8";
  336. regulator-always-on;
  337. regulator-boot-on;
  338. regulator-min-microvolt = <1800000>;
  339. regulator-max-microvolt = <1800000>;
  340. regulator-state-mem {
  341. regulator-on-in-suspend;
  342. regulator-suspend-microvolt = <1800000>;
  343. };
  344. };
  345. vcc1v8_dvp: LDO_REG1 {
  346. regulator-name = "vcc1v8_dvp";
  347. regulator-always-on;
  348. regulator-boot-on;
  349. regulator-min-microvolt = <1800000>;
  350. regulator-max-microvolt = <1800000>;
  351. regulator-state-mem {
  352. regulator-off-in-suspend;
  353. };
  354. };
  355. vcc2v8_dvp: LDO_REG2 {
  356. regulator-name = "vcc2v8_dvp";
  357. regulator-always-on;
  358. regulator-boot-on;
  359. regulator-min-microvolt = <2800000>;
  360. regulator-max-microvolt = <2800000>;
  361. regulator-state-mem {
  362. regulator-off-in-suspend;
  363. };
  364. };
  365. vcc1v8_pmu: LDO_REG3 {
  366. regulator-name = "vcc1v8_pmu";
  367. regulator-always-on;
  368. regulator-boot-on;
  369. regulator-min-microvolt = <1800000>;
  370. regulator-max-microvolt = <1800000>;
  371. regulator-state-mem {
  372. regulator-on-in-suspend;
  373. regulator-suspend-microvolt = <1800000>;
  374. };
  375. };
  376. vcc_sdio: LDO_REG4 {
  377. regulator-name = "vcc_sdio";
  378. regulator-always-on;
  379. regulator-boot-on;
  380. regulator-min-microvolt = <1800000>;
  381. regulator-max-microvolt = <3000000>;
  382. regulator-state-mem {
  383. regulator-on-in-suspend;
  384. regulator-suspend-microvolt = <3000000>;
  385. };
  386. };
  387. vcca3v0_codec: LDO_REG5 {
  388. regulator-name = "vcca3v0_codec";
  389. regulator-always-on;
  390. regulator-boot-on;
  391. regulator-min-microvolt = <3000000>;
  392. regulator-max-microvolt = <3000000>;
  393. regulator-state-mem {
  394. regulator-off-in-suspend;
  395. };
  396. };
  397. vcc_1v5: LDO_REG6 {
  398. regulator-name = "vcc_1v5";
  399. regulator-always-on;
  400. regulator-boot-on;
  401. regulator-min-microvolt = <1500000>;
  402. regulator-max-microvolt = <1500000>;
  403. regulator-state-mem {
  404. regulator-on-in-suspend;
  405. regulator-suspend-microvolt = <1500000>;
  406. };
  407. };
  408. vcca1v8_codec: LDO_REG7 {
  409. regulator-name = "vcca1v8_codec";
  410. regulator-always-on;
  411. regulator-boot-on;
  412. regulator-min-microvolt = <1800000>;
  413. regulator-max-microvolt = <1800000>;
  414. regulator-state-mem {
  415. regulator-off-in-suspend;
  416. };
  417. };
  418. vcc_3v0: LDO_REG8 {
  419. regulator-name = "vcc_3v0";
  420. regulator-always-on;
  421. regulator-boot-on;
  422. regulator-min-microvolt = <3000000>;
  423. regulator-max-microvolt = <3000000>;
  424. regulator-state-mem {
  425. regulator-on-in-suspend;
  426. regulator-suspend-microvolt = <3000000>;
  427. };
  428. };
  429. vcc3v3_s3: vcc_lan: SWITCH_REG1 {
  430. regulator-name = "vcc3v3_s3";
  431. regulator-always-on;
  432. regulator-boot-on;
  433. regulator-state-mem {
  434. regulator-off-in-suspend;
  435. };
  436. };
  437. vcc3v3_s0: SWITCH_REG2 {
  438. regulator-name = "vcc3v3_s0";
  439. regulator-always-on;
  440. regulator-boot-on;
  441. regulator-state-mem {
  442. regulator-off-in-suspend;
  443. };
  444. };
  445. };
  446. };
  447. vdd_cpu_b: regulator@40 {
  448. compatible = "silergy,syr827";
  449. reg = <0x40>;
  450. fcs,suspend-voltage-selector = <0>;
  451. regulator-name = "vdd_cpu_b";
  452. regulator-min-microvolt = <712500>;
  453. regulator-max-microvolt = <1500000>;
  454. regulator-ramp-delay = <1000>;
  455. regulator-always-on;
  456. regulator-boot-on;
  457. vin-supply = <&vcc_sys>;
  458. regulator-state-mem {
  459. regulator-off-in-suspend;
  460. };
  461. };
  462. vdd_gpu: regulator@41 {
  463. compatible = "silergy,syr828";
  464. reg = <0x41>;
  465. fcs,suspend-voltage-selector = <1>;
  466. regulator-name = "vdd_gpu";
  467. regulator-min-microvolt = <712500>;
  468. regulator-max-microvolt = <1500000>;
  469. regulator-ramp-delay = <1000>;
  470. regulator-always-on;
  471. regulator-boot-on;
  472. vin-supply = <&vcc_sys>;
  473. regulator-state-mem {
  474. regulator-off-in-suspend;
  475. };
  476. };
  477. };
  478. &i2c1 {
  479. i2c-scl-rising-time-ns = <300>;
  480. i2c-scl-falling-time-ns = <15>;
  481. status = "okay";
  482. rt5640: rt5640@1c {
  483. compatible = "realtek,rt5640";
  484. reg = <0x1c>;
  485. clocks = <&cru SCLK_I2S_8CH_OUT>;
  486. clock-names = "mclk";
  487. realtek,in1-differential;
  488. #sound-dai-cells = <0>;
  489. pinctrl-names = "default";
  490. pinctrl-0 = <&rt5640_hpcon>;
  491. };
  492. };
  493. &i2c3 {
  494. i2c-scl-rising-time-ns = <450>;
  495. i2c-scl-falling-time-ns = <15>;
  496. status = "okay";
  497. };
  498. &i2c4 {
  499. i2c-scl-rising-time-ns = <600>;
  500. i2c-scl-falling-time-ns = <20>;
  501. status = "okay";
  502. fusb0: typec-portc@22 {
  503. compatible = "fcs,fusb302";
  504. reg = <0x22>;
  505. interrupt-parent = <&gpio1>;
  506. interrupts = <RK_PA2 IRQ_TYPE_LEVEL_LOW>;
  507. pinctrl-names = "default";
  508. pinctrl-0 = <&fusb0_int>;
  509. vbus-supply = <&vcc5v0_typec>;
  510. status = "okay";
  511. connector {
  512. compatible = "usb-c-connector";
  513. data-role = "host";
  514. label = "USB-C";
  515. op-sink-microwatt = <1000000>;
  516. power-role = "dual";
  517. sink-pdos =
  518. <PDO_FIXED(5000, 2500, PDO_FIXED_USB_COMM)>;
  519. source-pdos =
  520. <PDO_FIXED(5000, 1400, PDO_FIXED_USB_COMM)>;
  521. try-power-role = "sink";
  522. ports {
  523. #address-cells = <1>;
  524. #size-cells = <0>;
  525. port@0 {
  526. reg = <0>;
  527. usbc_hs: endpoint {
  528. remote-endpoint =
  529. <&u2phy0_typec_hs>;
  530. };
  531. };
  532. port@1 {
  533. reg = <1>;
  534. usbc_ss: endpoint {
  535. remote-endpoint =
  536. <&tcphy0_typec_ss>;
  537. };
  538. };
  539. };
  540. };
  541. };
  542. accelerometer@68 {
  543. compatible = "invensense,mpu6500";
  544. reg = <0x68>;
  545. interrupt-parent = <&gpio1>;
  546. interrupts = <RK_PC6 IRQ_TYPE_EDGE_RISING>;
  547. };
  548. };
  549. &i2s0 {
  550. rockchip,playback-channels = <8>;
  551. rockchip,capture-channels = <8>;
  552. status = "okay";
  553. };
  554. &i2s1 {
  555. rockchip,playback-channels = <2>;
  556. rockchip,capture-channels = <2>;
  557. status = "okay";
  558. };
  559. &i2s2 {
  560. status = "okay";
  561. };
  562. &io_domains {
  563. status = "okay";
  564. bt656-supply = <&vcc1v8_dvp>;
  565. audio-supply = <&vcca1v8_codec>;
  566. sdmmc-supply = <&vcc_sdio>;
  567. gpio1830-supply = <&vcc_3v0>;
  568. };
  569. &pcie_phy {
  570. status = "okay";
  571. };
  572. &pcie0 {
  573. ep-gpios = <&gpio4 RK_PD1 GPIO_ACTIVE_HIGH>;
  574. num-lanes = <4>;
  575. pinctrl-names = "default";
  576. pinctrl-0 = <&pcie_clkreqn_cpm>;
  577. status = "okay";
  578. };
  579. &pmu_io_domains {
  580. pmu1830-supply = <&vcc_3v0>;
  581. status = "okay";
  582. };
  583. &pinctrl {
  584. buttons {
  585. pwrbtn: pwrbtn {
  586. rockchip,pins = <0 RK_PA5 RK_FUNC_GPIO &pcfg_pull_up>;
  587. };
  588. };
  589. fusb302x {
  590. fusb0_int: fusb0-int {
  591. rockchip,pins = <1 RK_PA2 RK_FUNC_GPIO &pcfg_pull_up>;
  592. };
  593. };
  594. ir {
  595. ir_int: ir-int {
  596. rockchip,pins = <0 RK_PA6 RK_FUNC_GPIO &pcfg_pull_none>;
  597. };
  598. };
  599. lcd-panel {
  600. lcd_panel_reset: lcd-panel-reset {
  601. rockchip,pins = <4 RK_PD6 RK_FUNC_GPIO &pcfg_pull_up>;
  602. };
  603. };
  604. leds {
  605. work_led_pin: work-led-pin {
  606. rockchip,pins = <2 RK_PD3 RK_FUNC_GPIO &pcfg_pull_none>;
  607. };
  608. diy_led_pin: diy-led-pin {
  609. rockchip,pins = <0 RK_PB5 RK_FUNC_GPIO &pcfg_pull_none>;
  610. };
  611. };
  612. pcie {
  613. pcie_pwr_en: pcie-pwr-en {
  614. rockchip,pins = <1 RK_PC1 RK_FUNC_GPIO &pcfg_pull_none>;
  615. };
  616. pcie_3g_drv: pcie-3g-drv {
  617. rockchip,pins = <0 RK_PA2 RK_FUNC_GPIO &pcfg_pull_up>;
  618. };
  619. };
  620. pmic {
  621. pmic_int_l: pmic-int-l {
  622. rockchip,pins = <1 RK_PC5 RK_FUNC_GPIO &pcfg_pull_up>;
  623. };
  624. vsel1_pin: vsel1-pin {
  625. rockchip,pins = <1 RK_PC2 RK_FUNC_GPIO &pcfg_pull_down>;
  626. };
  627. vsel2_pin: vsel2-pin {
  628. rockchip,pins = <1 RK_PB6 RK_FUNC_GPIO &pcfg_pull_down>;
  629. };
  630. };
  631. rt5640 {
  632. rt5640_hpcon: rt5640-hpcon {
  633. rockchip,pins = <4 RK_PC5 RK_FUNC_GPIO &pcfg_pull_none>;
  634. };
  635. };
  636. sdio-pwrseq {
  637. wifi_enable_h: wifi-enable-h {
  638. rockchip,pins = <0 RK_PB2 RK_FUNC_GPIO &pcfg_pull_none>;
  639. };
  640. };
  641. usb-typec {
  642. vcc5v0_typec_en: vcc5v0_typec_en {
  643. rockchip,pins = <1 RK_PA3 RK_FUNC_GPIO &pcfg_pull_up>;
  644. };
  645. };
  646. usb2 {
  647. vcc5v0_host_en: vcc5v0-host-en {
  648. rockchip,pins = <1 RK_PA0 RK_FUNC_GPIO &pcfg_pull_none>;
  649. };
  650. };
  651. wifi {
  652. wifi_host_wake_l: wifi-host-wake-l {
  653. rockchip,pins = <0 RK_PA3 RK_FUNC_GPIO &pcfg_pull_none>;
  654. };
  655. };
  656. };
  657. &pwm0 {
  658. status = "okay";
  659. };
  660. &pwm2 {
  661. status = "okay";
  662. };
  663. &saradc {
  664. vref-supply = <&vcca1v8_s3>;
  665. status = "okay";
  666. };
  667. &sdio0 {
  668. /* WiFi & BT combo module Ampak AP6356S */
  669. bus-width = <4>;
  670. cap-sdio-irq;
  671. cap-sd-highspeed;
  672. keep-power-in-suspend;
  673. mmc-pwrseq = <&sdio_pwrseq>;
  674. non-removable;
  675. pinctrl-names = "default";
  676. pinctrl-0 = <&sdio0_bus4 &sdio0_cmd &sdio0_clk>;
  677. sd-uhs-sdr104;
  678. /* Power supply */
  679. vqmmc-supply = <&vcc1v8_s3>; /* IO line */
  680. vmmc-supply = <&vcc_sdio>; /* card's power */
  681. #address-cells = <1>;
  682. #size-cells = <0>;
  683. status = "okay";
  684. brcmf: wifi@1 {
  685. reg = <1>;
  686. compatible = "brcm,bcm4329-fmac";
  687. interrupt-parent = <&gpio0>;
  688. interrupts = <RK_PA3 IRQ_TYPE_LEVEL_HIGH>;
  689. interrupt-names = "host-wake";
  690. brcm,drive-strength = <5>;
  691. pinctrl-names = "default";
  692. pinctrl-0 = <&wifi_host_wake_l>;
  693. };
  694. };
  695. &sdmmc {
  696. bus-width = <4>;
  697. cap-mmc-highspeed;
  698. cap-sd-highspeed;
  699. cd-gpios = <&gpio0 7 GPIO_ACTIVE_LOW>;
  700. disable-wp;
  701. max-frequency = <150000000>;
  702. pinctrl-names = "default";
  703. pinctrl-0 = <&sdmmc_clk &sdmmc_cmd &sdmmc_bus4>;
  704. status = "okay";
  705. };
  706. &sdhci {
  707. bus-width = <8>;
  708. mmc-hs400-1_8v;
  709. mmc-hs400-enhanced-strobe;
  710. non-removable;
  711. status = "okay";
  712. };
  713. &spdif {
  714. pinctrl-0 = <&spdif_bus_1>;
  715. status = "okay";
  716. spdif_p0: port {
  717. spdif_p0_0: endpoint {
  718. remote-endpoint = <&dit_p0_0>;
  719. };
  720. };
  721. };
  722. &tcphy0 {
  723. status = "okay";
  724. };
  725. &tcphy0_usb3 {
  726. port {
  727. tcphy0_typec_ss: endpoint {
  728. remote-endpoint = <&usbc_ss>;
  729. };
  730. };
  731. };
  732. &tcphy1 {
  733. status = "okay";
  734. };
  735. &tsadc {
  736. /* tshut mode 0:CRU 1:GPIO */
  737. rockchip,hw-tshut-mode = <1>;
  738. /* tshut polarity 0:LOW 1:HIGH */
  739. rockchip,hw-tshut-polarity = <1>;
  740. status = "okay";
  741. };
  742. &u2phy0 {
  743. status = "okay";
  744. u2phy0_otg: otg-port {
  745. status = "okay";
  746. };
  747. u2phy0_host: host-port {
  748. phy-supply = <&vcc5v0_host>;
  749. status = "okay";
  750. };
  751. port {
  752. u2phy0_typec_hs: endpoint {
  753. remote-endpoint = <&usbc_hs>;
  754. };
  755. };
  756. };
  757. &u2phy1 {
  758. status = "okay";
  759. u2phy1_otg: otg-port {
  760. status = "okay";
  761. };
  762. u2phy1_host: host-port {
  763. phy-supply = <&vcc5v0_host>;
  764. status = "okay";
  765. };
  766. };
  767. &uart0 {
  768. pinctrl-names = "default";
  769. pinctrl-0 = <&uart0_xfer &uart0_cts>;
  770. status = "okay";
  771. };
  772. &uart2 {
  773. status = "okay";
  774. };
  775. &usb_host0_ehci {
  776. status = "okay";
  777. };
  778. &usb_host0_ohci {
  779. status = "okay";
  780. };
  781. &usb_host1_ehci {
  782. status = "okay";
  783. };
  784. &usb_host1_ohci {
  785. status = "okay";
  786. };
  787. &usbdrd3_0 {
  788. status = "okay";
  789. };
  790. &usbdrd_dwc3_0 {
  791. status = "okay";
  792. dr_mode = "otg";
  793. };
  794. &usbdrd3_1 {
  795. status = "okay";
  796. };
  797. &usbdrd_dwc3_1 {
  798. status = "okay";
  799. dr_mode = "host";
  800. };
  801. &vopb {
  802. status = "okay";
  803. };
  804. &vopb_mmu {
  805. status = "okay";
  806. };
  807. &vopl {
  808. status = "okay";
  809. };
  810. &vopl_mmu {
  811. status = "okay";
  812. };