msm8994-sony-xperia-kitakami.dtsi 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492
  1. // SPDX-License-Identifier: BSD-3-Clause
  2. /*
  3. * Copyright (c) 2020, Konrad Dybcio <[email protected]>
  4. */
  5. #include "msm8994.dtsi"
  6. #include "pm8994.dtsi"
  7. #include "pmi8994.dtsi"
  8. #include <dt-bindings/gpio/gpio.h>
  9. #include <dt-bindings/input/gpio-keys.h>
  10. / {
  11. /* required for bootloader to select correct board */
  12. /*
  13. * We support MSM8994 v2 (0x20000) and v2.1 (0x20001).
  14. * The V1 chip (0x0 and 0x10000) is significantly different
  15. * and requires driver-side changes (including CPR, be warned!!).
  16. * Besides that, it's very rare.
  17. */
  18. qcom,msm-id = <207 0x20000>, <207 0x20001>;
  19. /* We only use pm8994+pmi8994. */
  20. qcom,pmic-id = <0x10009 0x1000a 0x00 0x00>;
  21. /* This property is shared across all kitakami devices. */
  22. qcom,board-id = <8 0>;
  23. /* Kitakami firmware doesn't support PSCI */
  24. /delete-node/ psci;
  25. gpio-keys {
  26. compatible = "gpio-keys";
  27. autorepeat;
  28. button-0 {
  29. label = "Volume Down";
  30. gpios = <&pm8994_gpios 2 GPIO_ACTIVE_LOW>;
  31. linux,input-type = <1>;
  32. linux,code = <KEY_VOLUMEDOWN>;
  33. wakeup-source;
  34. debounce-interval = <15>;
  35. };
  36. button-1 {
  37. label = "Volume Up";
  38. gpios = <&pm8994_gpios 3 GPIO_ACTIVE_LOW>;
  39. linux,input-type = <1>;
  40. linux,code = <KEY_VOLUMEUP>;
  41. wakeup-source;
  42. debounce-interval = <15>;
  43. };
  44. button-2 {
  45. label = "Camera Snapshot";
  46. gpios = <&pm8994_gpios 4 GPIO_ACTIVE_LOW>;
  47. linux,input-type = <1>;
  48. linux,code = <KEY_CAMERA>;
  49. wakeup-source;
  50. debounce-interval = <15>;
  51. };
  52. button-3 {
  53. label = "Camera Focus";
  54. gpios = <&pm8994_gpios 5 GPIO_ACTIVE_LOW>;
  55. linux,input-type = <1>;
  56. linux,code = <KEY_VOLUMEUP>;
  57. wakeup-source;
  58. debounce-interval = <15>;
  59. };
  60. };
  61. reserved-memory {
  62. /* This is for getting crash logs using Android downstream kernels */
  63. ramoops@1fe00000 {
  64. compatible = "ramoops";
  65. reg = <0 0x1fe00000 0 0x200000>;
  66. console-size = <0x100000>;
  67. record-size = <0x10000>;
  68. ftrace-size = <0x10000>;
  69. pmsg-size = <0x80000>;
  70. };
  71. fb_region: fb_region@40000000 {
  72. reg = <0 0x40000000 0 0x1000000>;
  73. no-map;
  74. };
  75. tzapp: memory@c7800000 {
  76. reg = <0 0xc7800000 0 0x1900000>;
  77. no-map;
  78. };
  79. };
  80. };
  81. &blsp1_spi1 {
  82. status = "okay";
  83. /* FPC fingerprint reader */
  84. };
  85. /* I2C1 is disabled on this board */
  86. &blsp1_i2c2 {
  87. status = "okay";
  88. clock-frequency = <355000>;
  89. /* NXP PN547 NFC */
  90. };
  91. &blsp1_i2c6 {
  92. status = "okay";
  93. clock-frequency = <355000>;
  94. touchscreen: rmi4-i2c-dev@2c {
  95. compatible = "syna,rmi4-i2c";
  96. reg = <0x2c>;
  97. #address-cells = <1>;
  98. #size-cells = <0>;
  99. interrupt-parent = <&tlmm>;
  100. interrupts = <42 IRQ_TYPE_EDGE_FALLING>;
  101. pinctrl-names = "default";
  102. pinctrl-0 = <&ts_int_active &ts_reset_active>;
  103. vdd-supply = <&pm8994_l22>;
  104. vio-supply = <&pm8994_s4>;
  105. syna,reset-delay-ms = <220>;
  106. syna,startup-delay-ms = <220>;
  107. rmi4-f01@1 {
  108. reg = <0x01>;
  109. syna,nosleep-mode = <1>;
  110. };
  111. rmi4-f11@11 {
  112. reg = <0x11>;
  113. syna,sensor-type = <1>;
  114. };
  115. };
  116. };
  117. &blsp1_uart2 {
  118. status = "okay";
  119. };
  120. &blsp2_i2c5 {
  121. status = "okay";
  122. clock-frequency = <355000>;
  123. /* sii8620 HDMI/MHL bridge */
  124. };
  125. &blsp2_uart2 {
  126. status = "okay";
  127. };
  128. /*
  129. * Kitakami bootloader only turns cont_splash on when it detects
  130. * specific downstream MDSS/backlight nodes in the active DTB.
  131. * One way to use that framebuffer is to load a secondary instance of
  132. * LK with the downstream DTB appended and then, only from there, load
  133. * mainline Linux.
  134. */
  135. &cont_splash_mem {
  136. reg = <0 0x3401000 0 0x2200000>;
  137. };
  138. &pmi8994_spmi_regulators {
  139. /*
  140. * Yeah, this one *is* managed by RPMPD, but also needs
  141. * to be hacked up as a-o due to the GPU device only accepting a single
  142. * power domain.. which still isn't enough and forces us to bind
  143. * OXILI_CX and OXILI_GX together!
  144. */
  145. vdd_gfx: s2 {
  146. regulator-name = "VDD_GFX";
  147. regulator-min-microvolt = <980000>;
  148. regulator-max-microvolt = <980000>;
  149. /* hack until we rig up the gpu consumer */
  150. regulator-always-on;
  151. };
  152. };
  153. &rpm_requests {
  154. /* PMI8994 should probe first, because pmi8994_bby supplies some of PM8994's regulators */
  155. pmi8994_regulators: pmi8994-regulators {
  156. compatible = "qcom,rpm-pmi8994-regulators";
  157. vdd_s1-supply = <&vph_pwr>;
  158. vdd_bst_byp-supply = <&vph_pwr>;
  159. pmi8994_s1: s1 {
  160. regulator-min-microvolt = <1025000>;
  161. regulator-max-microvolt = <1025000>;
  162. };
  163. /* S2 & S3 - VDD_GFX */
  164. pmi8994_bby: boost-bypass {
  165. regulator-min-microvolt = <3150000>;
  166. regulator-max-microvolt = <3600000>;
  167. };
  168. };
  169. pm8994_regulators: pm8994-regulators {
  170. compatible = "qcom,rpm-pm8994-regulators";
  171. vdd_s3-supply = <&vph_pwr>;
  172. vdd_s4-supply = <&vph_pwr>;
  173. vdd_s5-supply = <&vph_pwr>;
  174. vdd_s6-supply = <&vph_pwr>;
  175. vdd_s7-supply = <&vph_pwr>;
  176. vdd_l1-supply = <&pmi8994_s1>;
  177. vdd_l2_l26_l28-supply = <&pm8994_s3>;
  178. vdd_l3_l11-supply = <&pm8994_s3>;
  179. vdd_l4_l27_l31-supply = <&pm8994_s3>;
  180. vdd_l6_l12_l32-supply = <&pm8994_s5>;
  181. vdd_l8_l16_l30-supply = <&vph_pwr>;
  182. vdd_l9_l10_l18_l22-supply = <&pmi8994_bby>;
  183. vdd_l13_l19_l23_l24-supply = <&pmi8994_bby>;
  184. vdd_l14_l15-supply = <&pm8994_s5>;
  185. vdd_l17_l29-supply = <&pmi8994_bby>;
  186. vdd_l20_l21-supply = <&pmi8994_bby>;
  187. vdd_l25-supply = <&pm8994_s3>;
  188. vdd_lvs1_2-supply = <&pm8994_s4>;
  189. /* S1, S2, S6 and S12 are managed by RPMPD */
  190. pm8994_s3: s3 {
  191. regulator-min-microvolt = <1300000>;
  192. regulator-max-microvolt = <1300000>;
  193. };
  194. pm8994_s4: s4 {
  195. regulator-min-microvolt = <1800000>;
  196. regulator-max-microvolt = <1800000>;
  197. regulator-system-load = <325000>;
  198. regulator-allow-set-load;
  199. regulator-always-on;
  200. };
  201. pm8994_s5: s5 {
  202. regulator-min-microvolt = <2150000>;
  203. regulator-max-microvolt = <2150000>;
  204. };
  205. pm8994_s7: s7 {
  206. regulator-min-microvolt = <1000000>;
  207. regulator-max-microvolt = <1000000>;
  208. };
  209. /*
  210. * S8 - SPMI-managed VDD_APC0
  211. * S9, S10 and S11 (the main one) - SPMI-managed VDD_APC1
  212. */
  213. pm8994_l1: l1 {
  214. regulator-min-microvolt = <1000000>;
  215. regulator-max-microvolt = <1000000>;
  216. };
  217. pm8994_l2: l2 {
  218. regulator-min-microvolt = <1250000>;
  219. regulator-max-microvolt = <1250000>;
  220. regulator-system-load = <10000>;
  221. regulator-allow-set-load;
  222. };
  223. pm8994_l3: l3 {
  224. regulator-min-microvolt = <1100000>;
  225. regulator-max-microvolt = <1100000>;
  226. regulator-boot-on;
  227. };
  228. pm8994_l4: l4 {
  229. regulator-min-microvolt = <1225000>;
  230. regulator-max-microvolt = <1225000>;
  231. };
  232. /* L5 is inaccessible from RPM */
  233. pm8994_l6: l6 {
  234. regulator-min-microvolt = <1800000>;
  235. regulator-max-microvolt = <1800000>;
  236. };
  237. /* L7 is inaccessible from RPM */
  238. pm8994_l8: l8 {
  239. regulator-min-microvolt = <1800000>;
  240. regulator-max-microvolt = <1800000>;
  241. };
  242. pm8994_l9: l9 {
  243. regulator-min-microvolt = <1800000>;
  244. regulator-max-microvolt = <1800000>;
  245. };
  246. pm8994_l10: l10 {
  247. regulator-min-microvolt = <1800000>;
  248. regulator-max-microvolt = <1800000>;
  249. };
  250. pm8994_l11: l11 {
  251. regulator-min-microvolt = <1200000>;
  252. regulator-max-microvolt = <1200000>;
  253. };
  254. pm8994_l12: l12 {
  255. regulator-min-microvolt = <1800000>;
  256. regulator-max-microvolt = <1800000>;
  257. regulator-system-load = <10000>;
  258. regulator-allow-set-load;
  259. };
  260. pm8994_l13: l13 {
  261. regulator-min-microvolt = <1800000>;
  262. regulator-max-microvolt = <2950000>;
  263. };
  264. pm8994_l14: l14 {
  265. regulator-min-microvolt = <1800000>;
  266. regulator-max-microvolt = <1800000>;
  267. regulator-system-load = <10000>;
  268. regulator-allow-set-load;
  269. regulator-boot-on;
  270. };
  271. pm8994_l15: l15 {
  272. regulator-min-microvolt = <1800000>;
  273. regulator-max-microvolt = <1800000>;
  274. };
  275. pm8994_l16: l16 {
  276. regulator-min-microvolt = <2700000>;
  277. regulator-max-microvolt = <2700000>;
  278. };
  279. pm8994_l17: l17 {
  280. regulator-min-microvolt = <2200000>;
  281. regulator-max-microvolt = <2200000>;
  282. regulator-boot-on;
  283. };
  284. pm8994_l18: l18 {
  285. regulator-min-microvolt = <2850000>;
  286. regulator-max-microvolt = <2850000>;
  287. regulator-always-on;
  288. regulator-boot-on;
  289. };
  290. pm8994_l19: l19 {
  291. regulator-min-microvolt = <2850000>;
  292. regulator-max-microvolt = <2850000>;
  293. regulator-boot-on;
  294. };
  295. pm8994_l20: l20 {
  296. regulator-min-microvolt = <2950000>;
  297. regulator-max-microvolt = <2950000>;
  298. regulator-system-load = <570000>;
  299. regulator-allow-set-load;
  300. };
  301. pm8994_l21: l21 {
  302. regulator-min-microvolt = <2950000>;
  303. regulator-max-microvolt = <2950000>;
  304. regulator-system-load = <800000>;
  305. regulator-allow-set-load;
  306. };
  307. pm8994_l22: l22 {
  308. regulator-min-microvolt = <3000000>;
  309. regulator-max-microvolt = <3000000>;
  310. regulator-boot-on;
  311. };
  312. pm8994_l23: l23 {
  313. regulator-min-microvolt = <2800000>;
  314. regulator-max-microvolt = <2800000>;
  315. regulator-always-on;
  316. regulator-boot-on;
  317. };
  318. pm8994_l24: l24 {
  319. regulator-min-microvolt = <3075000>;
  320. regulator-max-microvolt = <3150000>;
  321. };
  322. pm8994_l25: l25 {
  323. regulator-min-microvolt = <1000000>;
  324. regulator-max-microvolt = <1000000>;
  325. regulator-boot-on;
  326. };
  327. pm8994_l26: l26 {
  328. regulator-min-microvolt = <987500>;
  329. regulator-max-microvolt = <987500>;
  330. };
  331. pm8994_l27: l27 {
  332. regulator-min-microvolt = <1200000>;
  333. regulator-max-microvolt = <1200000>;
  334. regulator-boot-on;
  335. };
  336. pm8994_l28: l28 {
  337. regulator-min-microvolt = <1000000>;
  338. regulator-max-microvolt = <1000000>;
  339. regulator-system-load = <10000>;
  340. regulator-allow-set-load;
  341. };
  342. pm8994_l29: l29 {
  343. regulator-min-microvolt = <2700000>;
  344. regulator-max-microvolt = <2700000>;
  345. regulator-boot-on;
  346. };
  347. pm8994_l30: l30 {
  348. regulator-min-microvolt = <1800000>;
  349. regulator-max-microvolt = <1800000>;
  350. regulator-boot-on;
  351. };
  352. pm8994_l31: l31 {
  353. regulator-min-microvolt = <1200000>;
  354. regulator-max-microvolt = <1200000>;
  355. regulator-system-load = <10000>;
  356. regulator-allow-set-load;
  357. };
  358. pm8994_l32: l32 {
  359. regulator-min-microvolt = <1800000>;
  360. regulator-max-microvolt = <1800000>;
  361. };
  362. pm8994_lvs1: lvs1 {
  363. regulator-boot-on;
  364. };
  365. pm8994_lvs2: lvs2 {
  366. regulator-boot-on;
  367. };
  368. };
  369. };
  370. &sdhc1 {
  371. /*
  372. * There is an issue with the eMMC causing permanent
  373. * damage to the card if a quirk isn't addressed.
  374. * Until it's fixed, disable the MMC so as not to brick
  375. * devices.
  376. */
  377. status = "disabled";
  378. /*
  379. * Downstream pushes 2.95V to the sdhci device,
  380. * but upstream driver REALLY wants to make vmmc 1.8v
  381. * cause of the hs400-1_8v mode. MMC works fine without
  382. * that regulator, so let's not use it for now.
  383. * vqmmc is also disabled cause driver stll complains.
  384. *
  385. * vmmc-supply = <&pm8994_l20>;
  386. * vqmmc-supply = <&pm8994_s4>;
  387. */
  388. };
  389. &sdhc2 {
  390. status = "okay";
  391. cd-gpios = <&tlmm 100 GPIO_ACTIVE_HIGH>;
  392. vmmc-supply = <&pm8994_l21>;
  393. vqmmc-supply = <&pm8994_l13>;
  394. };
  395. &tlmm {
  396. ts_int_active: ts-int-active {
  397. pins = "gpio42";
  398. drive-strength = <2>;
  399. bias-disable;
  400. input-enable;
  401. };
  402. ts_reset_active: ts-reset-active {
  403. pins = "gpio109";
  404. drive-strength = <2>;
  405. bias-disable;
  406. output-low;
  407. };
  408. };