qcom-msm8974pro-fairphone-fp2.dts 8.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464
  1. // SPDX-License-Identifier: GPL-2.0
  2. #include "qcom-msm8974pro.dtsi"
  3. #include "qcom-pm8841.dtsi"
  4. #include "qcom-pm8941.dtsi"
  5. #include <dt-bindings/input/input.h>
  6. #include <dt-bindings/leds/common.h>
  7. #include <dt-bindings/pinctrl/qcom,pmic-gpio.h>
  8. / {
  9. model = "Fairphone 2";
  10. compatible = "fairphone,fp2", "qcom,msm8974";
  11. aliases {
  12. mmc0 = &sdhc_1;
  13. mmc1 = &sdhc_2;
  14. serial0 = &blsp1_uart2;
  15. };
  16. chosen {
  17. stdout-path = "serial0:115200n8";
  18. };
  19. gpio-keys {
  20. compatible = "gpio-keys";
  21. pinctrl-names = "default";
  22. pinctrl-0 = <&gpio_keys_pin_a>;
  23. key-camera-snapshot {
  24. label = "camera_snapshot";
  25. gpios = <&pm8941_gpios 1 GPIO_ACTIVE_LOW>;
  26. linux,code = <KEY_CAMERA>;
  27. wakeup-source;
  28. debounce-interval = <15>;
  29. };
  30. key-volume-down {
  31. label = "volume_down";
  32. gpios = <&pm8941_gpios 2 GPIO_ACTIVE_LOW>;
  33. linux,code = <KEY_VOLUMEDOWN>;
  34. wakeup-source;
  35. debounce-interval = <15>;
  36. };
  37. key-volume-up {
  38. label = "volume_up";
  39. gpios = <&pm8941_gpios 5 GPIO_ACTIVE_LOW>;
  40. linux,code = <KEY_VOLUMEUP>;
  41. wakeup-source;
  42. debounce-interval = <15>;
  43. };
  44. };
  45. vibrator {
  46. compatible = "gpio-vibrator";
  47. enable-gpios = <&tlmm 86 GPIO_ACTIVE_HIGH>;
  48. vcc-supply = <&pm8941_l18>;
  49. };
  50. };
  51. &blsp1_i2c2 {
  52. status = "okay";
  53. touchscreen@41 {
  54. compatible = "ilitek,ili2120";
  55. reg = <0x41>;
  56. interrupt-parent = <&tlmm>;
  57. interrupts = <28 IRQ_TYPE_EDGE_FALLING>;
  58. reset-gpios = <&tlmm 55 GPIO_ACTIVE_LOW>;
  59. touchscreen-size-x = <1080>;
  60. touchscreen-size-y = <1920>;
  61. };
  62. };
  63. &blsp1_uart2 {
  64. status = "okay";
  65. };
  66. &imem {
  67. reboot-mode {
  68. mode-normal = <0x77665501>;
  69. mode-bootloader = <0x77665500>;
  70. mode-recovery = <0x77665502>;
  71. };
  72. };
  73. &otg {
  74. status = "okay";
  75. phys = <&usb_hs1_phy>;
  76. phy-select = <&tcsr 0xb000 0>;
  77. extcon = <&smbb>, <&usb_id>;
  78. vbus-supply = <&chg_otg>;
  79. hnp-disable;
  80. srp-disable;
  81. adp-disable;
  82. ulpi {
  83. phy@a {
  84. status = "okay";
  85. v1p8-supply = <&pm8941_l6>;
  86. v3p3-supply = <&pm8941_l24>;
  87. extcon = <&smbb>;
  88. qcom,init-seq = /bits/ 8 <0x1 0x64>;
  89. };
  90. };
  91. };
  92. &pm8941_gpios {
  93. gpio_keys_pin_a: gpio-keys-active-state {
  94. pins = "gpio1", "gpio2", "gpio5";
  95. function = "normal";
  96. bias-pull-up;
  97. power-source = <PM8941_GPIO_S3>;
  98. };
  99. };
  100. &pm8941_lpg {
  101. status = "okay";
  102. qcom,power-source = <1>;
  103. multi-led {
  104. color = <LED_COLOR_ID_RGB>;
  105. function = LED_FUNCTION_STATUS;
  106. #address-cells = <1>;
  107. #size-cells = <0>;
  108. led@7 {
  109. reg = <7>;
  110. color = <LED_COLOR_ID_RED>;
  111. };
  112. led@6 {
  113. reg = <6>;
  114. color = <LED_COLOR_ID_GREEN>;
  115. };
  116. led@5 {
  117. reg = <5>;
  118. color = <LED_COLOR_ID_BLUE>;
  119. };
  120. };
  121. };
  122. &pronto {
  123. status = "okay";
  124. vddmx-supply = <&pm8841_s1>;
  125. vddcx-supply = <&pm8841_s2>;
  126. vddpx-supply = <&pm8941_s3>;
  127. pinctrl-names = "default";
  128. pinctrl-0 = <&wcnss_pin_a>;
  129. iris {
  130. vddxo-supply = <&pm8941_l6>;
  131. vddrfa-supply = <&pm8941_l11>;
  132. vddpa-supply = <&pm8941_l19>;
  133. vdddig-supply = <&pm8941_s3>;
  134. };
  135. smd-edge {
  136. qcom,remote-pid = <4>;
  137. label = "pronto";
  138. wcnss {
  139. status = "okay";
  140. };
  141. };
  142. };
  143. &remoteproc_adsp {
  144. status = "okay";
  145. cx-supply = <&pm8841_s2>;
  146. };
  147. &remoteproc_mss {
  148. status = "okay";
  149. cx-supply = <&pm8841_s2>;
  150. mss-supply = <&pm8841_s3>;
  151. mx-supply = <&pm8841_s1>;
  152. pll-supply = <&pm8941_l12>;
  153. };
  154. &rpm_requests {
  155. pm8841-regulators {
  156. compatible = "qcom,rpm-pm8841-regulators";
  157. pm8841_s1: s1 {
  158. regulator-min-microvolt = <675000>;
  159. regulator-max-microvolt = <1050000>;
  160. };
  161. pm8841_s2: s2 {
  162. regulator-min-microvolt = <500000>;
  163. regulator-max-microvolt = <1050000>;
  164. };
  165. pm8841_s3: s3 {
  166. regulator-min-microvolt = <1050000>;
  167. regulator-max-microvolt = <1050000>;
  168. };
  169. };
  170. pm8941-regulators {
  171. compatible = "qcom,rpm-pm8941-regulators";
  172. vdd_l1_l3-supply = <&pm8941_s1>;
  173. vdd_l2_lvs1_2_3-supply = <&pm8941_s3>;
  174. vdd_l4_l11-supply = <&pm8941_s1>;
  175. vdd_l5_l7-supply = <&pm8941_s2>;
  176. vdd_l6_l12_l14_l15-supply = <&pm8941_s2>;
  177. vdd_l9_l10_l17_l22-supply = <&vreg_boost>;
  178. vdd_l13_l20_l23_l24-supply = <&vreg_boost>;
  179. vdd_l21-supply = <&vreg_boost>;
  180. pm8941_s1: s1 {
  181. regulator-min-microvolt = <1300000>;
  182. regulator-max-microvolt = <1300000>;
  183. regulator-always-on;
  184. regulator-boot-on;
  185. };
  186. pm8941_s2: s2 {
  187. regulator-min-microvolt = <2150000>;
  188. regulator-max-microvolt = <2150000>;
  189. regulator-boot-on;
  190. };
  191. pm8941_s3: s3 {
  192. regulator-min-microvolt = <1800000>;
  193. regulator-max-microvolt = <1800000>;
  194. regulator-always-on;
  195. regulator-boot-on;
  196. };
  197. pm8941_l1: l1 {
  198. regulator-min-microvolt = <1225000>;
  199. regulator-max-microvolt = <1225000>;
  200. regulator-always-on;
  201. regulator-boot-on;
  202. };
  203. pm8941_l2: l2 {
  204. regulator-min-microvolt = <1200000>;
  205. regulator-max-microvolt = <1200000>;
  206. };
  207. pm8941_l3: l3 {
  208. regulator-min-microvolt = <1225000>;
  209. regulator-max-microvolt = <1225000>;
  210. };
  211. pm8941_l4: l4 {
  212. regulator-min-microvolt = <1225000>;
  213. regulator-max-microvolt = <1225000>;
  214. };
  215. pm8941_l5: l5 {
  216. regulator-min-microvolt = <1800000>;
  217. regulator-max-microvolt = <1800000>;
  218. };
  219. pm8941_l6: l6 {
  220. regulator-min-microvolt = <1800000>;
  221. regulator-max-microvolt = <1800000>;
  222. regulator-boot-on;
  223. };
  224. pm8941_l7: l7 {
  225. regulator-min-microvolt = <1800000>;
  226. regulator-max-microvolt = <1800000>;
  227. regulator-boot-on;
  228. };
  229. pm8941_l8: l8 {
  230. regulator-min-microvolt = <1800000>;
  231. regulator-max-microvolt = <1800000>;
  232. };
  233. pm8941_l9: l9 {
  234. regulator-min-microvolt = <1800000>;
  235. regulator-max-microvolt = <2950000>;
  236. };
  237. pm8941_l10: l10 {
  238. regulator-min-microvolt = <1800000>;
  239. regulator-max-microvolt = <2950000>;
  240. };
  241. pm8941_l11: l11 {
  242. regulator-min-microvolt = <1225000>;
  243. regulator-max-microvolt = <1350000>;
  244. };
  245. pm8941_l12: l12 {
  246. regulator-min-microvolt = <1800000>;
  247. regulator-max-microvolt = <1800000>;
  248. regulator-always-on;
  249. regulator-boot-on;
  250. };
  251. pm8941_l13: l13 {
  252. regulator-min-microvolt = <1800000>;
  253. regulator-max-microvolt = <2950000>;
  254. regulator-boot-on;
  255. };
  256. pm8941_l14: l14 {
  257. regulator-min-microvolt = <1800000>;
  258. regulator-max-microvolt = <1800000>;
  259. };
  260. pm8941_l15: l15 {
  261. regulator-min-microvolt = <2050000>;
  262. regulator-max-microvolt = <2050000>;
  263. };
  264. pm8941_l16: l16 {
  265. regulator-min-microvolt = <2700000>;
  266. regulator-max-microvolt = <2700000>;
  267. };
  268. pm8941_l17: l17 {
  269. regulator-min-microvolt = <2850000>;
  270. regulator-max-microvolt = <2850000>;
  271. };
  272. pm8941_l18: l18 {
  273. regulator-min-microvolt = <2850000>;
  274. regulator-max-microvolt = <2850000>;
  275. };
  276. pm8941_l19: l19 {
  277. regulator-min-microvolt = <2900000>;
  278. regulator-max-microvolt = <3350000>;
  279. };
  280. pm8941_l20: l20 {
  281. regulator-min-microvolt = <2950000>;
  282. regulator-max-microvolt = <2950000>;
  283. regulator-system-load = <200000>;
  284. regulator-allow-set-load;
  285. regulator-boot-on;
  286. };
  287. pm8941_l21: l21 {
  288. regulator-min-microvolt = <2950000>;
  289. regulator-max-microvolt = <2950000>;
  290. regulator-boot-on;
  291. };
  292. pm8941_l22: l22 {
  293. regulator-min-microvolt = <3000000>;
  294. regulator-max-microvolt = <3300000>;
  295. };
  296. pm8941_l23: l23 {
  297. regulator-min-microvolt = <3000000>;
  298. regulator-max-microvolt = <3000000>;
  299. };
  300. pm8941_l24: l24 {
  301. regulator-min-microvolt = <3075000>;
  302. regulator-max-microvolt = <3075000>;
  303. regulator-boot-on;
  304. };
  305. };
  306. };
  307. &sdhc_1 {
  308. status = "okay";
  309. vmmc-supply = <&pm8941_l20>;
  310. vqmmc-supply = <&pm8941_s3>;
  311. pinctrl-names = "default", "sleep";
  312. pinctrl-0 = <&sdc1_on>;
  313. pinctrl-1 = <&sdc1_off>;
  314. };
  315. &sdhc_2 {
  316. status = "okay";
  317. vmmc-supply = <&pm8941_l21>;
  318. vqmmc-supply = <&pm8941_l13>;
  319. pinctrl-names = "default", "sleep";
  320. pinctrl-0 = <&sdc2_on>;
  321. pinctrl-1 = <&sdc2_off>;
  322. };
  323. &smbb {
  324. usb-charge-current-limit = <1500000>;
  325. qcom,fast-charge-safe-current = <1500000>;
  326. qcom,fast-charge-current-limit = <1500000>;
  327. qcom,fast-charge-safe-voltage = <4380000>;
  328. qcom,fast-charge-high-threshold-voltage = <4350000>;
  329. qcom,auto-recharge-threshold-voltage = <4240000>;
  330. qcom,minimum-input-voltage = <4450000>;
  331. };
  332. &tlmm {
  333. sdc1_on: sdc1-on {
  334. clk {
  335. pins = "sdc1_clk";
  336. drive-strength = <16>;
  337. bias-disable;
  338. };
  339. cmd-data {
  340. pins = "sdc1_cmd", "sdc1_data";
  341. drive-strength = <10>;
  342. bias-pull-up;
  343. };
  344. };
  345. sdc2_on: sdc2-on {
  346. clk {
  347. pins = "sdc2_clk";
  348. drive-strength = <10>;
  349. bias-disable;
  350. };
  351. cmd-data {
  352. pins = "sdc2_cmd", "sdc2_data";
  353. drive-strength = <6>;
  354. bias-pull-up;
  355. };
  356. };
  357. wcnss_pin_a: wcnss-pin-active {
  358. wlan {
  359. pins = "gpio36", "gpio37", "gpio38", "gpio39", "gpio40";
  360. function = "wlan";
  361. drive-strength = <6>;
  362. bias-pull-down;
  363. };
  364. bt {
  365. pins = "gpio35", "gpio43", "gpio44";
  366. function = "bt";
  367. drive-strength = <2>;
  368. bias-pull-down;
  369. };
  370. fm {
  371. pins = "gpio41", "gpio42";
  372. function = "fm";
  373. drive-strength = <2>;
  374. bias-pull-down;
  375. };
  376. };
  377. };