msm8996-xiaomi-natrium.dts 9.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414
  1. // SPDX-License-Identifier: BSD-3-Clause
  2. /*
  3. * Copyright (c) 2022, Alec Su <[email protected]>
  4. */
  5. /dts-v1/;
  6. #include "msm8996-xiaomi-common.dtsi"
  7. #include "pmi8996.dtsi"
  8. #include <dt-bindings/sound/qcom,q6afe.h>
  9. #include <dt-bindings/sound/qcom,q6asm.h>
  10. / {
  11. model = "Xiaomi Mi 5s Plus";
  12. compatible = "xiaomi,natrium", "qcom,msm8996";
  13. chassis-type = "handset";
  14. qcom,msm-id = <305 0x10000>;
  15. qcom,board-id = <47 0>;
  16. };
  17. &adsp_pil {
  18. firmware-name = "qcom/msm8996/natrium/adsp.mbn";
  19. };
  20. &blsp2_i2c6 {
  21. touchscreen@20 {
  22. compatible = "syna,rmi4-i2c";
  23. reg = <0x20>;
  24. interrupt-parent = <&tlmm>;
  25. interrupts = <125 IRQ_TYPE_LEVEL_LOW>;
  26. vdd-supply = <&vdd_3v2_tp>;
  27. syna,reset-delay-ms = <200>;
  28. syna,startup-delay-ms = <5>;
  29. pinctrl-names = "default", "sleep";
  30. pinctrl-0 = <&touchscreen_default>;
  31. pinctrl-1 = <&touchscreen_sleep>;
  32. };
  33. };
  34. &dsi0 {
  35. status = "okay";
  36. vdda-supply = <&vreg_l2a_1p25>;
  37. vcca-supply = <&vreg_l28a_0p925>;
  38. pinctrl-names = "default", "sleep";
  39. pinctrl-0 = <&mdss_dsi_default &mdss_te_default>;
  40. pinctrl-1 = <&mdss_dsi_sleep &mdss_te_sleep>;
  41. panel: panel@0 {
  42. compatible = "jdi,fhd-r63452";
  43. reg = <0>;
  44. reset-gpios = <&tlmm 8 GPIO_ACTIVE_LOW>;
  45. backlight = <&pmi8994_wled>;
  46. port {
  47. panel_in: endpoint {
  48. remote-endpoint = <&dsi0_out>;
  49. };
  50. };
  51. };
  52. };
  53. &dsi0_out {
  54. remote-endpoint = <&panel_in>;
  55. };
  56. &gpu {
  57. zap-shader {
  58. firmware-name = "qcom/msm8996/natrium/a530_zap.mbn";
  59. };
  60. };
  61. &mss_pil {
  62. firmware-name = "qcom/msm8996/natrium/mba.mbn",
  63. "qcom/msm8996/natrium/modem.mbn";
  64. };
  65. &pmi8994_wled {
  66. status = "okay";
  67. qcom,enabled-strings = <0 1>;
  68. qcom,switching-freq = <600>;
  69. };
  70. &q6asmdai {
  71. dai@0 {
  72. reg = <0>;
  73. };
  74. dai@1 {
  75. reg = <1>;
  76. };
  77. dai@2 {
  78. reg = <2>;
  79. };
  80. };
  81. &slpi_pil {
  82. firmware-name = "qcom/msm8996/natrium/slpi.mbn";
  83. };
  84. &sound {
  85. compatible = "qcom,apq8096-sndcard";
  86. model = "natrium";
  87. audio-routing = "RX_BIAS", "MCLK";
  88. mm1-dai-link {
  89. link-name = "MultiMedia1";
  90. cpu {
  91. sound-dai = <&q6asmdai MSM_FRONTEND_DAI_MULTIMEDIA1>;
  92. };
  93. };
  94. mm2-dai-link {
  95. link-name = "MultiMedia2";
  96. cpu {
  97. sound-dai = <&q6asmdai MSM_FRONTEND_DAI_MULTIMEDIA2>;
  98. };
  99. };
  100. mm3-dai-link {
  101. link-name = "MultiMedia3";
  102. cpu {
  103. sound-dai = <&q6asmdai MSM_FRONTEND_DAI_MULTIMEDIA3>;
  104. };
  105. };
  106. slim-dai-link {
  107. link-name = "SLIM Playback";
  108. cpu {
  109. sound-dai = <&q6afedai SLIMBUS_6_RX>;
  110. };
  111. platform {
  112. sound-dai = <&q6routing>;
  113. };
  114. codec {
  115. sound-dai = <&wcd9335 6>;
  116. };
  117. };
  118. slimcap-dai-link {
  119. link-name = "SLIM Capture";
  120. cpu {
  121. sound-dai = <&q6afedai SLIMBUS_0_TX>;
  122. };
  123. platform {
  124. sound-dai = <&q6routing>;
  125. };
  126. codec {
  127. sound-dai = <&wcd9335 1>;
  128. };
  129. };
  130. };
  131. &venus {
  132. firmware-name = "qcom/msm8996/natrium/venus.mbn";
  133. };
  134. &rpm_requests {
  135. pm8994-regulators {
  136. vreg_l3a_0p875: l3 {
  137. regulator-name = "vreg_l3a_0p875";
  138. regulator-min-microvolt = <850000>;
  139. regulator-max-microvolt = <1300000>;
  140. };
  141. vreg_l11a_1p1: l11 {
  142. regulator-name = "vreg_l11a_1p1";
  143. regulator-min-microvolt = <1100000>;
  144. regulator-max-microvolt = <1100000>;
  145. };
  146. vreg_l17a_2p8: l17 {
  147. regulator-name = "vreg_l17a_2p8";
  148. regulator-min-microvolt = <2800000>;
  149. regulator-max-microvolt = <2800000>;
  150. };
  151. vreg_l18a_2p8: l18 {
  152. regulator-name = "vreg_l18a_2p8";
  153. regulator-min-microvolt = <2800000>;
  154. regulator-max-microvolt = <2800000>;
  155. };
  156. vreg_l29a_2p8: l29 {
  157. regulator-name = "vreg_l29a_2p8";
  158. regulator-min-microvolt = <2800000>;
  159. regulator-max-microvolt = <2800000>;
  160. };
  161. };
  162. };
  163. &pm8994_gpios {
  164. gpio-line-names =
  165. "NC", /* GPIO_1 */
  166. "VOL_UP_N", /* GPIO_2 */
  167. "SPKR_ID", /* GPIO_3 */
  168. "PWM_HAPTICS", /* GPIO_4 */
  169. "INFARED_DRV", /* GPIO_5 */
  170. "NC", /* GPIO_6 */
  171. "KEYPAD_LED_EN_A", /* GPIO_7 */
  172. "WL_EN", /* GPIO_8 */
  173. "3P3_ENABLE", /* GPIO_9 */
  174. "NC", /* GPIO_10 */
  175. "NC", /* GPIO_11 */
  176. "NC", /* GPIO_12 */
  177. "NC", /* GPIO_13 */
  178. "NC", /* GPIO_14 */
  179. "DIVCLK1_CDC", /* GPIO_15 */
  180. "DIVCLK2_HAPTICS", /* GPIO_16 */
  181. "NC", /* GPIO_17 */
  182. "32KHz_CLK_IN", /* GPIO_18 */
  183. "BT_EN", /* GPIO_19 */
  184. "PMIC_SLB", /* GPIO_20 */
  185. "UIM_BATT_ALARM", /* GPIO_21 */
  186. "NC"; /* GPIO_22 */
  187. };
  188. &pm8994_mpps {
  189. gpio-line-names =
  190. "NC", /* MPP_1 */
  191. "CCI_TIMER1", /* MPP_2 */
  192. "PMIC_SLB", /* MPP_3 */
  193. "EXT_FET_WLED_PWR_EN_N",/* MPP_4 */
  194. "NC", /* MPP_5 */
  195. "NC", /* MPP_6 */
  196. "NC", /* MPP_7 */
  197. "NC"; /* MPP_8 */
  198. };
  199. &pmi8994_gpios {
  200. gpio-line-names =
  201. "NC", /* GPIO_1 */
  202. "SPKR_PA_EN", /* GPIO_2 */
  203. "NC", /* GPIO_3 */
  204. "NC", /* GPIO_4 */
  205. "NC", /* GPIO_5 */
  206. "NC", /* GPIO_6 */
  207. "NC", /* GPIO_7 */
  208. "NC", /* GPIO_8 */
  209. "NC", /* GPIO_9 */
  210. "NC"; /* GPIO_10 */
  211. };
  212. &tlmm {
  213. gpio-line-names =
  214. "ESE_SPI_MOSI", /* GPIO_0 */
  215. "ESE_SPI_MISO", /* GPIO_1 */
  216. "NC", /* GPIO_2 */
  217. "ESE_SPI_CLK", /* GPIO_3 */
  218. "MSM_UART_TX", /* GPIO_4 */
  219. "MSM_UART_RX", /* GPIO_5 */
  220. "NFC_I2C_SDA", /* GPIO_6 */
  221. "NFC_I2C_SCL", /* GPIO_7 */
  222. "LCD0_RESET_N", /* GPIO_8 */
  223. "NFC_IRQ", /* GPIO_9 */
  224. "LCD_TE", /* GPIO_10 */
  225. "LCD_ID_DET1", /* GPIO_11 */
  226. "NFC_DISABLE", /* GPIO_12 */
  227. "CAM_MCLK0", /* GPIO_13 */
  228. "CAM_MCLK1", /* GPIO_14 */
  229. "CAM_MCLK2", /* GPIO_15 */
  230. "ESE_PWR_REQ", /* GPIO_16 */
  231. "CCI_I2C_SDA0", /* GPIO_17 */
  232. "CCI_I2C_SCL0", /* GPIO_18 */
  233. "CCI_I2C_SDA1", /* GPIO_19 */
  234. "CCI_I2C_SCL1", /* GPIO_20 */
  235. "NFC_DWL_REQ", /* GPIO_21 */
  236. "CCI_TIMER1", /* GPIO_22 */
  237. "WEBCAM1_RESET_N", /* GPIO_23 */
  238. "ESE_IRQ", /* GPIO_24 */
  239. "NC", /* GPIO_25 */
  240. "WEBCAM1_STANDBY", /* GPIO_26 */
  241. "NC", /* GPIO_27 */
  242. "NC", /* GPIO_28 */
  243. "NC", /* GPIO_29 */
  244. "CAM_VDD_1P2_EN_2", /* GPIO_30 */
  245. "CAM_RESET_0", /* GPIO_31 */
  246. "CAM_RESET_1", /* GPIO_32 */
  247. "NC", /* GPIO_33 */
  248. "NC", /* GPIO_34 */
  249. "PCI_E0_RST_N", /* GPIO_35 */
  250. "PCI_E0_CLKREQ_N", /* GPIO_36 */
  251. "PCI_E0_WAKE", /* GPIO_37 */
  252. "CHARGER_INT", /* GPIO_38 */
  253. "CHARGER_RESET", /* GPIO_39 */
  254. "NC", /* GPIO_40 */
  255. "QCA_UART_TXD", /* GPIO_41 */
  256. "QCA_UART_RXD", /* GPIO_42 */
  257. "QCA_UART_CTS", /* GPIO_43 */
  258. "QCA_UART_RTS", /* GPIO_44 */
  259. "MAWC_UART_TX", /* GPIO_45 */
  260. "MAWC_UART_RX", /* GPIO_46 */
  261. "NC", /* GPIO_47 */
  262. "NC", /* GPIO_48 */
  263. "NC", /* GPIO_49 */
  264. "FP_SPI_RST", /* GPIO_50 */
  265. "TYPEC_I2C_SDA", /* GPIO_51 */
  266. "TYPEC_I2C_SCL", /* GPIO_52 */
  267. "CODEC_INT2_N", /* GPIO_53 */
  268. "CODEC_INT1_N", /* GPIO_54 */
  269. "APPS_I2C7_SDA", /* GPIO_55 */
  270. "APPS_I2C7_SCL", /* GPIO_56 */
  271. "FORCE_USB_BOOT", /* GPIO_57 */
  272. "NC", /* GPIO_58 */
  273. "NC", /* GPIO_59 */
  274. "NC", /* GPIO_60 */
  275. "NC", /* GPIO_61 */
  276. "ESE_RSTN", /* GPIO_62 */
  277. "TYPEC_INT", /* GPIO_63 */
  278. "CODEC_RESET_N", /* GPIO_64 */
  279. "PCM_CLK", /* GPIO_65 */
  280. "PCM_SYNC", /* GPIO_66 */
  281. "PCM_DIN", /* GPIO_67 */
  282. "PCM_DOUT", /* GPIO_68 */
  283. "CDC_44K1_CLK", /* GPIO_69 */
  284. "SLIMBUS_CLK", /* GPIO_70 */
  285. "SLIMBUS_DATA0", /* GPIO_71 */
  286. "SLIMBUS_DATA1", /* GPIO_72 */
  287. "LDO_5V_IN_EN", /* GPIO_73 */
  288. "TYPEC_EN_N", /* GPIO_74 */
  289. "NC", /* GPIO_75 */
  290. "NC", /* GPIO_76 */
  291. "NC", /* GPIO_77 */
  292. "NC", /* GPIO_78 */
  293. "NC", /* GPIO_79 */
  294. "SENSOR_RESET_N", /* GPIO_80 */
  295. "FP_SPI_MOSI", /* GPIO_81 */
  296. "FP_SPI_MISO", /* GPIO_82 */
  297. "FP_SPI_CS_N", /* GPIO_83 */
  298. "FP_SPI_CLK", /* GPIO_84 */
  299. "NC", /* GPIO_85 */
  300. "CAM_VDD_1P2_EN", /* GPIO_86 */
  301. "MSM_TS_I2C_SDA", /* GPIO_87 */
  302. "MSM_TS_I2C_SCL", /* GPIO_88 */
  303. "TS_RESOUT_N", /* GPIO_89 */
  304. "ESE_SPI_CS_N", /* GPIO_90 */
  305. "NC", /* GPIO_91 */
  306. "CAM2_AVDD_EN", /* GPIO_92 */
  307. "CAM2_VCM_EN", /* GPIO_93 */
  308. "NC", /* GPIO_94 */
  309. "NC", /* GPIO_95 */
  310. "NC", /* GPIO_96 */
  311. "GRFC_0", /* GPIO_97 */
  312. "GRFC_1", /* GPIO_98 */
  313. "NC", /* GPIO_99 */
  314. "GRFC_3", /* GPIO_100 */
  315. "GRFC_4", /* GPIO_101 */
  316. "GRFC_5", /* GPIO_102 */
  317. "NC", /* GPIO_103 */
  318. "GRFC_7", /* GPIO_104 */
  319. "UIM2_DATA", /* GPIO_105 */
  320. "UIM2_CLK", /* GPIO_106 */
  321. "UIM2_RESET", /* GPIO_107 */
  322. "UIM2_PRESENT", /* GPIO_108 */
  323. "UIM1_DATA", /* GPIO_109 */
  324. "UIM1_CLK", /* GPIO_110 */
  325. "UIM1_RESET", /* GPIO_111 */
  326. "UIM1_PRESENT", /* GPIO_112 */
  327. "UIM_BATT_ALARM", /* GPIO_113 */
  328. "GRFC_8", /* GPIO_114 */
  329. "GRFC_9", /* GPIO_115 */
  330. "TX_GTR_THRES", /* GPIO_116 */
  331. "ACCEL_INT", /* GPIO_117 */
  332. "GYRO_INT", /* GPIO_118 */
  333. "COMPASS_INT", /* GPIO_119 */
  334. "PROXIMITY_INT_N", /* GPIO_120 */
  335. "FP_IRQ", /* GPIO_121 */
  336. "P_SENSE", /* GPIO_122 */
  337. "HALL_INTR2", /* GPIO_123 */
  338. "HALL_INTR1", /* GPIO_124 */
  339. "TS_INT_N", /* GPIO_125 */
  340. "NC", /* GPIO_126 */
  341. "GRFC_11", /* GPIO_127 */
  342. "NC", /* GPIO_128 */
  343. "EXT_GPS_LNA_EN", /* GPIO_129 */
  344. "NC", /* GPIO_130 */
  345. "LCD_ID_DET2", /* GPIO_131 */
  346. "LCD_TE2", /* GPIO_132 */
  347. "GRFC_14", /* GPIO_133 */
  348. "GSM_TX2_PHASE_D", /* GPIO_134 */
  349. "NC", /* GPIO_135 */
  350. "GRFC_15", /* GPIO_136 */
  351. "RFFE3_DATA", /* GPIO_137 */
  352. "RFFE3_CLK", /* GPIO_138 */
  353. "NC", /* GPIO_139 */
  354. "NC", /* GPIO_140 */
  355. "RFFE5_DATA", /* GPIO_141 */
  356. "RFFE5_CLK", /* GPIO_142 */
  357. "NC", /* GPIO_143 */
  358. "COEX_UART_TX", /* GPIO_144 */
  359. "COEX_UART_RX", /* GPIO_145 */
  360. "RFFE2_DATA", /* GPIO_146 */
  361. "RFFE2_CLK", /* GPIO_147 */
  362. "RFFE1_DATA", /* GPIO_148 */
  363. "RFFE1_CLK"; /* GPIO_149 */
  364. touchscreen_default: touchscreen-default {
  365. pins = "gpio89", "gpio125";
  366. function = "gpio";
  367. drive-strength = <10>;
  368. bias-pull-up;
  369. };
  370. touchscreen_sleep: touchscreen-sleep {
  371. pins = "gpio89", "gpio125";
  372. function = "gpio";
  373. drive-strength = <2>;
  374. bias-disable;
  375. };
  376. };