rk3399-pinephone-pro.dts 8.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405
  1. // SPDX-License-Identifier: (GPL-2.0+ OR MIT)
  2. /*
  3. * Copyright (c) 2020 Martijn Braam <[email protected]>
  4. * Copyright (c) 2021 Kamil Trzciński <[email protected]>
  5. */
  6. /*
  7. * PinePhone Pro datasheet:
  8. * https://files.pine64.org/doc/PinePhonePro/PinephonePro-Schematic-V1.0-20211127.pdf
  9. */
  10. /dts-v1/;
  11. #include <dt-bindings/input/linux-event-codes.h>
  12. #include "rk3399.dtsi"
  13. #include "rk3399-opp.dtsi"
  14. / {
  15. model = "Pine64 PinePhonePro";
  16. compatible = "pine64,pinephone-pro", "rockchip,rk3399";
  17. chassis-type = "handset";
  18. aliases {
  19. mmc0 = &sdio0;
  20. mmc1 = &sdmmc;
  21. mmc2 = &sdhci;
  22. };
  23. chosen {
  24. stdout-path = "serial2:115200n8";
  25. };
  26. gpio-keys {
  27. compatible = "gpio-keys";
  28. pinctrl-names = "default";
  29. pinctrl-0 = <&pwrbtn_pin>;
  30. key-power {
  31. debounce-interval = <20>;
  32. gpios = <&gpio0 RK_PA5 GPIO_ACTIVE_LOW>;
  33. label = "Power";
  34. linux,code = <KEY_POWER>;
  35. wakeup-source;
  36. };
  37. };
  38. vcc_sys: vcc-sys-regulator {
  39. compatible = "regulator-fixed";
  40. regulator-name = "vcc_sys";
  41. regulator-always-on;
  42. regulator-boot-on;
  43. };
  44. vcc3v3_sys: vcc3v3-sys-regulator {
  45. compatible = "regulator-fixed";
  46. regulator-name = "vcc3v3_sys";
  47. regulator-always-on;
  48. regulator-boot-on;
  49. regulator-min-microvolt = <3300000>;
  50. regulator-max-microvolt = <3300000>;
  51. vin-supply = <&vcc_sys>;
  52. };
  53. vcca1v8_s3: vcc1v8-s3-regulator {
  54. compatible = "regulator-fixed";
  55. regulator-name = "vcca1v8_s3";
  56. regulator-min-microvolt = <1800000>;
  57. regulator-max-microvolt = <1800000>;
  58. vin-supply = <&vcc3v3_sys>;
  59. regulator-always-on;
  60. regulator-boot-on;
  61. };
  62. vcc1v8_codec: vcc1v8-codec-regulator {
  63. compatible = "regulator-fixed";
  64. enable-active-high;
  65. gpio = <&gpio3 RK_PA4 GPIO_ACTIVE_HIGH>;
  66. pinctrl-names = "default";
  67. pinctrl-0 = <&vcc1v8_codec_en>;
  68. regulator-name = "vcc1v8_codec";
  69. regulator-min-microvolt = <1800000>;
  70. regulator-max-microvolt = <1800000>;
  71. vin-supply = <&vcc3v3_sys>;
  72. };
  73. };
  74. &cpu_alert0 {
  75. temperature = <65000>;
  76. };
  77. &cpu_alert1 {
  78. temperature = <68000>;
  79. };
  80. &cpu_l0 {
  81. cpu-supply = <&vdd_cpu_l>;
  82. };
  83. &cpu_l1 {
  84. cpu-supply = <&vdd_cpu_l>;
  85. };
  86. &cpu_l2 {
  87. cpu-supply = <&vdd_cpu_l>;
  88. };
  89. &cpu_l3 {
  90. cpu-supply = <&vdd_cpu_l>;
  91. };
  92. &cpu_b0 {
  93. cpu-supply = <&vdd_cpu_b>;
  94. };
  95. &cpu_b1 {
  96. cpu-supply = <&vdd_cpu_b>;
  97. };
  98. &emmc_phy {
  99. status = "okay";
  100. };
  101. &i2c0 {
  102. clock-frequency = <400000>;
  103. i2c-scl-rising-time-ns = <168>;
  104. i2c-scl-falling-time-ns = <4>;
  105. status = "okay";
  106. rk818: pmic@1c {
  107. compatible = "rockchip,rk818";
  108. reg = <0x1c>;
  109. interrupt-parent = <&gpio1>;
  110. interrupts = <RK_PC5 IRQ_TYPE_LEVEL_LOW>;
  111. #clock-cells = <1>;
  112. clock-output-names = "xin32k", "rk808-clkout2";
  113. pinctrl-names = "default";
  114. pinctrl-0 = <&pmic_int_l>;
  115. rockchip,system-power-controller;
  116. wakeup-source;
  117. vcc1-supply = <&vcc_sys>;
  118. vcc2-supply = <&vcc_sys>;
  119. vcc3-supply = <&vcc_sys>;
  120. vcc4-supply = <&vcc_sys>;
  121. vcc6-supply = <&vcc_sys>;
  122. vcc7-supply = <&vcc3v3_sys>;
  123. vcc8-supply = <&vcc_sys>;
  124. vcc9-supply = <&vcc3v3_sys>;
  125. regulators {
  126. vdd_cpu_l: DCDC_REG1 {
  127. regulator-name = "vdd_cpu_l";
  128. regulator-always-on;
  129. regulator-boot-on;
  130. regulator-min-microvolt = <875000>;
  131. regulator-max-microvolt = <975000>;
  132. regulator-ramp-delay = <6001>;
  133. regulator-state-mem {
  134. regulator-off-in-suspend;
  135. };
  136. };
  137. vdd_center: DCDC_REG2 {
  138. regulator-name = "vdd_center";
  139. regulator-always-on;
  140. regulator-boot-on;
  141. regulator-min-microvolt = <800000>;
  142. regulator-max-microvolt = <1000000>;
  143. regulator-ramp-delay = <6001>;
  144. regulator-state-mem {
  145. regulator-off-in-suspend;
  146. };
  147. };
  148. vcc_ddr: DCDC_REG3 {
  149. regulator-name = "vcc_ddr";
  150. regulator-always-on;
  151. regulator-boot-on;
  152. regulator-state-mem {
  153. regulator-on-in-suspend;
  154. };
  155. };
  156. vcc_1v8: DCDC_REG4 {
  157. regulator-name = "vcc_1v8";
  158. regulator-always-on;
  159. regulator-boot-on;
  160. regulator-min-microvolt = <1800000>;
  161. regulator-max-microvolt = <1800000>;
  162. regulator-state-mem {
  163. regulator-on-in-suspend;
  164. };
  165. };
  166. vcca3v0_codec: LDO_REG1 {
  167. regulator-name = "vcca3v0_codec";
  168. regulator-min-microvolt = <3000000>;
  169. regulator-max-microvolt = <3000000>;
  170. };
  171. vcc3v0_touch: LDO_REG2 {
  172. regulator-name = "vcc3v0_touch";
  173. regulator-min-microvolt = <3000000>;
  174. regulator-max-microvolt = <3000000>;
  175. };
  176. vcca1v8_codec: LDO_REG3 {
  177. regulator-name = "vcca1v8_codec";
  178. regulator-min-microvolt = <1800000>;
  179. regulator-max-microvolt = <1800000>;
  180. };
  181. rk818_pwr_on: LDO_REG4 {
  182. regulator-name = "rk818_pwr_on";
  183. regulator-always-on;
  184. regulator-boot-on;
  185. regulator-min-microvolt = <3300000>;
  186. regulator-max-microvolt = <3300000>;
  187. regulator-state-mem {
  188. regulator-on-in-suspend;
  189. };
  190. };
  191. vcc_3v0: LDO_REG5 {
  192. regulator-name = "vcc_3v0";
  193. regulator-always-on;
  194. regulator-boot-on;
  195. regulator-min-microvolt = <3000000>;
  196. regulator-max-microvolt = <3000000>;
  197. regulator-state-mem {
  198. regulator-on-in-suspend;
  199. };
  200. };
  201. vcc_1v5: LDO_REG6 {
  202. regulator-name = "vcc_1v5";
  203. regulator-always-on;
  204. regulator-boot-on;
  205. regulator-min-microvolt = <1500000>;
  206. regulator-max-microvolt = <1500000>;
  207. regulator-state-mem {
  208. regulator-on-in-suspend;
  209. };
  210. };
  211. vcc1v8_dvp: LDO_REG7 {
  212. regulator-name = "vcc1v8_dvp";
  213. regulator-min-microvolt = <1800000>;
  214. regulator-max-microvolt = <1800000>;
  215. };
  216. vcc3v3_s3: LDO_REG8 {
  217. regulator-name = "vcc3v3_s3";
  218. regulator-always-on;
  219. regulator-boot-on;
  220. regulator-min-microvolt = <3300000>;
  221. regulator-max-microvolt = <3300000>;
  222. regulator-state-mem {
  223. regulator-off-in-suspend;
  224. };
  225. };
  226. vccio_sd: LDO_REG9 {
  227. regulator-name = "vccio_sd";
  228. regulator-min-microvolt = <1800000>;
  229. regulator-max-microvolt = <3300000>;
  230. };
  231. vcc3v3_s0: SWITCH_REG {
  232. regulator-name = "vcc3v3_s0";
  233. regulator-always-on;
  234. regulator-boot-on;
  235. regulator-state-mem {
  236. regulator-on-in-suspend;
  237. };
  238. };
  239. };
  240. };
  241. vdd_cpu_b: regulator@40 {
  242. compatible = "silergy,syr827";
  243. reg = <0x40>;
  244. fcs,suspend-voltage-selector = <1>;
  245. pinctrl-names = "default";
  246. pinctrl-0 = <&vsel1_pin>;
  247. regulator-name = "vdd_cpu_b";
  248. regulator-min-microvolt = <875000>;
  249. regulator-max-microvolt = <1150000>;
  250. regulator-ramp-delay = <1000>;
  251. regulator-always-on;
  252. regulator-boot-on;
  253. regulator-state-mem {
  254. regulator-off-in-suspend;
  255. };
  256. };
  257. vdd_gpu: regulator@41 {
  258. compatible = "silergy,syr828";
  259. reg = <0x41>;
  260. fcs,suspend-voltage-selector = <1>;
  261. pinctrl-names = "default";
  262. pinctrl-0 = <&vsel2_pin>;
  263. regulator-name = "vdd_gpu";
  264. regulator-min-microvolt = <875000>;
  265. regulator-max-microvolt = <975000>;
  266. regulator-ramp-delay = <1000>;
  267. regulator-always-on;
  268. regulator-boot-on;
  269. regulator-state-mem {
  270. regulator-off-in-suspend;
  271. };
  272. };
  273. };
  274. &cluster0_opp {
  275. opp04 {
  276. status = "disabled";
  277. };
  278. opp05 {
  279. status = "disabled";
  280. };
  281. };
  282. &cluster1_opp {
  283. opp06 {
  284. opp-hz = /bits/ 64 <1500000000>;
  285. opp-microvolt = <1100000 1100000 1150000>;
  286. };
  287. opp07 {
  288. status = "disabled";
  289. };
  290. };
  291. &io_domains {
  292. bt656-supply = <&vcc1v8_dvp>;
  293. audio-supply = <&vcca1v8_codec>;
  294. sdmmc-supply = <&vccio_sd>;
  295. gpio1830-supply = <&vcc_3v0>;
  296. status = "okay";
  297. };
  298. &pmu_io_domains {
  299. pmu1830-supply = <&vcc_1v8>;
  300. status = "okay";
  301. };
  302. &pinctrl {
  303. buttons {
  304. pwrbtn_pin: pwrbtn-pin {
  305. rockchip,pins = <0 RK_PA5 RK_FUNC_GPIO &pcfg_pull_up>;
  306. };
  307. };
  308. pmic {
  309. pmic_int_l: pmic-int-l {
  310. rockchip,pins = <1 RK_PC5 RK_FUNC_GPIO &pcfg_pull_up>;
  311. };
  312. vsel1_pin: vsel1-pin {
  313. rockchip,pins = <1 RK_PC1 RK_FUNC_GPIO &pcfg_pull_down>;
  314. };
  315. vsel2_pin: vsel2-pin {
  316. rockchip,pins = <1 RK_PB6 RK_FUNC_GPIO &pcfg_pull_down>;
  317. };
  318. };
  319. sound {
  320. vcc1v8_codec_en: vcc1v8-codec-en {
  321. rockchip,pins = <3 RK_PA4 RK_FUNC_GPIO &pcfg_pull_down>;
  322. };
  323. };
  324. };
  325. &sdmmc {
  326. bus-width = <4>;
  327. cap-sd-highspeed;
  328. cd-gpios = <&gpio0 RK_PA7 GPIO_ACTIVE_LOW>;
  329. disable-wp;
  330. max-frequency = <150000000>;
  331. pinctrl-names = "default";
  332. pinctrl-0 = <&sdmmc_clk &sdmmc_cmd &sdmmc_cd &sdmmc_bus4>;
  333. vmmc-supply = <&vcc3v3_sys>;
  334. vqmmc-supply = <&vccio_sd>;
  335. status = "okay";
  336. };
  337. &sdhci {
  338. bus-width = <8>;
  339. mmc-hs200-1_8v;
  340. non-removable;
  341. status = "okay";
  342. };
  343. &tsadc {
  344. rockchip,hw-tshut-mode = <1>;
  345. rockchip,hw-tshut-polarity = <1>;
  346. status = "okay";
  347. };
  348. &uart2 {
  349. status = "okay";
  350. };