PageRenderTime 62ms CodeModel.GetById 24ms RepoModel.GetById 0ms app.codeStats 0ms

/arch/arm64/boot/dts/qcom/sdm845-xiaomi-beryllium.dts

https://github.com/tiwai/sound
Device Tree | 594 lines | 478 code | 107 blank | 9 comment | 0 complexity | 6da7efd3f5d355b00a3e4152c2015ebb MD5 | raw file
  1. // SPDX-License-Identifier: GPL-2.0
  2. /dts-v1/;
  3. #include <dt-bindings/pinctrl/qcom,pmic-gpio.h>
  4. #include <dt-bindings/regulator/qcom,rpmh-regulator.h>
  5. #include <dt-bindings/sound/qcom,q6afe.h>
  6. #include <dt-bindings/sound/qcom,q6asm.h>
  7. #include "sdm845.dtsi"
  8. #include "pm8998.dtsi"
  9. #include "pmi8998.dtsi"
  10. /*
  11. * Delete following upstream (sdm845.dtsi) reserved
  12. * memory mappings which are different in this device.
  13. */
  14. /delete-node/ &tz_mem;
  15. /delete-node/ &adsp_mem;
  16. /delete-node/ &wlan_msa_mem;
  17. /delete-node/ &mpss_region;
  18. /delete-node/ &venus_mem;
  19. /delete-node/ &cdsp_mem;
  20. /delete-node/ &mba_region;
  21. /delete-node/ &slpi_mem;
  22. /delete-node/ &spss_mem;
  23. /delete-node/ &rmtfs_mem;
  24. / {
  25. model = "Xiaomi Pocophone F1";
  26. compatible = "xiaomi,beryllium", "qcom,sdm845";
  27. chassis-type = "handset";
  28. /* required for bootloader to select correct board */
  29. qcom,board-id = <69 0>;
  30. qcom,msm-id = <321 0x20001>;
  31. aliases {
  32. hsuart0 = &uart6;
  33. };
  34. gpio-keys {
  35. compatible = "gpio-keys";
  36. autorepeat;
  37. pinctrl-names = "default";
  38. pinctrl-0 = <&vol_up_pin_a>;
  39. vol-up {
  40. label = "Volume Up";
  41. linux,code = <KEY_VOLUMEUP>;
  42. gpios = <&pm8998_gpio 6 GPIO_ACTIVE_LOW>;
  43. };
  44. };
  45. /* Reserved memory changes from downstream */
  46. reserved-memory {
  47. tz_mem: memory@86200000 {
  48. reg = <0 0x86200000 0 0x4900000>;
  49. no-map;
  50. };
  51. adsp_mem: memory@8c500000 {
  52. reg = <0 0x8c500000 0 0x1e00000>;
  53. no-map;
  54. };
  55. wlan_msa_mem: memory@8e300000 {
  56. reg = <0 0x8e300000 0 0x100000>;
  57. no-map;
  58. };
  59. mpss_region: memory@8e400000 {
  60. reg = <0 0x8e400000 0 0x7800000>;
  61. no-map;
  62. };
  63. venus_mem: memory@95c00000 {
  64. reg = <0 0x95c00000 0 0x500000>;
  65. no-map;
  66. };
  67. cdsp_mem: memory@96100000 {
  68. reg = <0 0x96100000 0 0x800000>;
  69. no-map;
  70. };
  71. mba_region: memory@96900000 {
  72. reg = <0 0x96900000 0 0x200000>;
  73. no-map;
  74. };
  75. slpi_mem: memory@96b00000 {
  76. reg = <0 0x96b00000 0 0x1400000>;
  77. no-map;
  78. };
  79. spss_mem: memory@97f00000 {
  80. reg = <0 0x97f00000 0 0x100000>;
  81. no-map;
  82. };
  83. rmtfs_mem: memory@f6301000 {
  84. compatible = "qcom,rmtfs-mem";
  85. reg = <0 0xf6301000 0 0x200000>;
  86. no-map;
  87. qcom,client-id = <1>;
  88. qcom,vmid = <15>;
  89. };
  90. };
  91. vreg_s4a_1p8: vreg-s4a-1p8 {
  92. compatible = "regulator-fixed";
  93. regulator-name = "vreg_s4a_1p8";
  94. regulator-min-microvolt = <1800000>;
  95. regulator-max-microvolt = <1800000>;
  96. regulator-always-on;
  97. };
  98. };
  99. &adsp_pas {
  100. status = "okay";
  101. firmware-name = "qcom/sdm845/beryllium/adsp.mbn";
  102. };
  103. &apps_rsc {
  104. pm8998-rpmh-regulators {
  105. compatible = "qcom,pm8998-rpmh-regulators";
  106. qcom,pmic-id = "a";
  107. vreg_l1a_0p875: ldo1 {
  108. regulator-min-microvolt = <880000>;
  109. regulator-max-microvolt = <880000>;
  110. regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
  111. };
  112. vreg_l5a_0p8: ldo5 {
  113. regulator-min-microvolt = <800000>;
  114. regulator-max-microvolt = <800000>;
  115. regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
  116. };
  117. vreg_l7a_1p8: ldo7 {
  118. regulator-min-microvolt = <1800000>;
  119. regulator-max-microvolt = <1800000>;
  120. regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
  121. };
  122. vreg_l12a_1p8: ldo12 {
  123. regulator-min-microvolt = <1800000>;
  124. regulator-max-microvolt = <1800000>;
  125. regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
  126. };
  127. vreg_l13a_2p95: ldo13 {
  128. regulator-min-microvolt = <1800000>;
  129. regulator-max-microvolt = <2960000>;
  130. regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
  131. };
  132. vreg_l14a_1p8: ldo14 {
  133. regulator-min-microvolt = <1800000>;
  134. regulator-max-microvolt = <1800000>;
  135. regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
  136. regulator-boot-on;
  137. regulator-always-on;
  138. };
  139. vreg_l17a_1p3: ldo17 {
  140. regulator-min-microvolt = <1304000>;
  141. regulator-max-microvolt = <1304000>;
  142. regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
  143. };
  144. vreg_l20a_2p95: ldo20 {
  145. regulator-min-microvolt = <2960000>;
  146. regulator-max-microvolt = <2968000>;
  147. regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
  148. };
  149. vreg_l21a_2p95: ldo21 {
  150. regulator-min-microvolt = <2960000>;
  151. regulator-max-microvolt = <2968000>;
  152. regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
  153. };
  154. vreg_l23a_3p3: ldo23 {
  155. regulator-min-microvolt = <3300000>;
  156. regulator-max-microvolt = <3312000>;
  157. regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
  158. };
  159. vreg_l24a_3p075: ldo24 {
  160. regulator-min-microvolt = <3088000>;
  161. regulator-max-microvolt = <3088000>;
  162. regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
  163. };
  164. vreg_l25a_3p3: ldo25 {
  165. regulator-min-microvolt = <3300000>;
  166. regulator-max-microvolt = <3312000>;
  167. regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
  168. };
  169. vreg_l26a_1p2: ldo26 {
  170. regulator-min-microvolt = <1200000>;
  171. regulator-max-microvolt = <1200000>;
  172. regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
  173. regulator-boot-on;
  174. };
  175. };
  176. };
  177. &cdsp_pas {
  178. status = "okay";
  179. firmware-name = "qcom/sdm845/beryllium/cdsp.mbn";
  180. };
  181. &dsi0 {
  182. status = "okay";
  183. vdda-supply = <&vreg_l26a_1p2>;
  184. panel@0 {
  185. compatible = "tianma,fhd-video";
  186. reg = <0>;
  187. vddio-supply = <&vreg_l14a_1p8>;
  188. vddpos-supply = <&lab>;
  189. vddneg-supply = <&ibb>;
  190. #address-cells = <1>;
  191. #size-cells = <0>;
  192. backlight = <&pmi8998_wled>;
  193. reset-gpios = <&tlmm 6 GPIO_ACTIVE_LOW>;
  194. port {
  195. tianma_nt36672a_in_0: endpoint {
  196. remote-endpoint = <&dsi0_out>;
  197. };
  198. };
  199. };
  200. };
  201. &dsi0_out {
  202. remote-endpoint = <&tianma_nt36672a_in_0>;
  203. data-lanes = <0 1 2 3>;
  204. };
  205. &dsi0_phy {
  206. status = "okay";
  207. vdds-supply = <&vreg_l1a_0p875>;
  208. };
  209. &gcc {
  210. protected-clocks = <GCC_QSPI_CORE_CLK>,
  211. <GCC_QSPI_CORE_CLK_SRC>,
  212. <GCC_QSPI_CNOC_PERIPH_AHB_CLK>,
  213. <GCC_LPASS_Q6_AXI_CLK>,
  214. <GCC_LPASS_SWAY_CLK>;
  215. };
  216. &gmu {
  217. status = "okay";
  218. };
  219. &gpu {
  220. status = "okay";
  221. zap-shader {
  222. memory-region = <&gpu_mem>;
  223. firmware-name = "qcom/sdm845/beryllium/a630_zap.mbn";
  224. };
  225. };
  226. &ibb {
  227. regulator-min-microvolt = <4600000>;
  228. regulator-max-microvolt = <6000000>;
  229. regulator-over-current-protection;
  230. regulator-pull-down;
  231. regulator-soft-start;
  232. qcom,discharge-resistor-kohms = <300>;
  233. };
  234. &lab {
  235. regulator-min-microvolt = <4600000>;
  236. regulator-max-microvolt = <6000000>;
  237. regulator-over-current-protection;
  238. regulator-pull-down;
  239. regulator-soft-start;
  240. };
  241. &mdss {
  242. status = "okay";
  243. };
  244. &mss_pil {
  245. status = "okay";
  246. firmware-name = "qcom/sdm845/beryllium/mba.mbn", "qcom/sdm845/beryllium/modem.mbn";
  247. };
  248. &ipa {
  249. status = "okay";
  250. memory-region = <&ipa_fw_mem>;
  251. firmware-name = "qcom/sdm845/beryllium/ipa_fws.mbn";
  252. };
  253. &pm8998_gpio {
  254. vol_up_pin_a: vol-up-active {
  255. pins = "gpio6";
  256. function = "normal";
  257. input-enable;
  258. bias-pull-up;
  259. qcom,drive-strength = <PMIC_GPIO_STRENGTH_NO>;
  260. };
  261. };
  262. &pmi8998_wled {
  263. status = "okay";
  264. qcom,current-boost-limit = <970>;
  265. qcom,ovp-millivolt = <29600>;
  266. qcom,current-limit-microamp = <20000>;
  267. qcom,num-strings = <2>;
  268. qcom,switching-freq = <600>;
  269. qcom,external-pfet;
  270. qcom,cabc;
  271. };
  272. &pm8998_pon {
  273. resin {
  274. compatible = "qcom,pm8941-resin";
  275. interrupts = <0x0 0x8 1 IRQ_TYPE_EDGE_BOTH>;
  276. debounce = <15625>;
  277. bias-pull-up;
  278. linux,code = <KEY_VOLUMEDOWN>;
  279. };
  280. };
  281. /* QUAT I2S Uses 1 I2S SD Line for audio on TAS2559/60 amplifiers */
  282. &q6afedai {
  283. qi2s@22 {
  284. reg = <22>;
  285. qcom,sd-lines = <0>;
  286. };
  287. };
  288. &q6asmdai {
  289. dai@0 {
  290. reg = <0>;
  291. };
  292. dai@1 {
  293. reg = <1>;
  294. };
  295. dai@2 {
  296. reg = <2>;
  297. };
  298. };
  299. &qupv3_id_0 {
  300. status = "okay";
  301. };
  302. &sdhc_2 {
  303. status = "okay";
  304. pinctrl-names = "default";
  305. pinctrl-0 = <&sdc2_default_state &sdc2_card_det_n>;
  306. vmmc-supply = <&vreg_l21a_2p95>;
  307. vqmmc-supply = <&vreg_l13a_2p95>;
  308. bus-width = <4>;
  309. cd-gpios = <&tlmm 126 GPIO_ACTIVE_HIGH>;
  310. };
  311. &sound {
  312. compatible = "qcom,db845c-sndcard";
  313. pinctrl-0 = <&quat_mi2s_active
  314. &quat_mi2s_sd0_active>;
  315. pinctrl-names = "default";
  316. model = "Xiaomi Poco F1";
  317. audio-routing =
  318. "RX_BIAS", "MCLK",
  319. "AMIC1", "MIC BIAS1",
  320. "AMIC2", "MIC BIAS2",
  321. "AMIC3", "MIC BIAS3";
  322. mm1-dai-link {
  323. link-name = "MultiMedia1";
  324. cpu {
  325. sound-dai = <&q6asmdai MSM_FRONTEND_DAI_MULTIMEDIA1>;
  326. };
  327. };
  328. mm2-dai-link {
  329. link-name = "MultiMedia2";
  330. cpu {
  331. sound-dai = <&q6asmdai MSM_FRONTEND_DAI_MULTIMEDIA2>;
  332. };
  333. };
  334. mm3-dai-link {
  335. link-name = "MultiMedia3";
  336. cpu {
  337. sound-dai = <&q6asmdai MSM_FRONTEND_DAI_MULTIMEDIA3>;
  338. };
  339. };
  340. slim-dai-link {
  341. link-name = "SLIM Playback";
  342. cpu {
  343. sound-dai = <&q6afedai SLIMBUS_0_RX>;
  344. };
  345. platform {
  346. sound-dai = <&q6routing>;
  347. };
  348. codec {
  349. sound-dai = <&wcd9340 0>;
  350. };
  351. };
  352. slimcap-dai-link {
  353. link-name = "SLIM Capture";
  354. cpu {
  355. sound-dai = <&q6afedai SLIMBUS_0_TX>;
  356. };
  357. platform {
  358. sound-dai = <&q6routing>;
  359. };
  360. codec {
  361. sound-dai = <&wcd9340 1>;
  362. };
  363. };
  364. };
  365. &tlmm {
  366. gpio-reserved-ranges = <0 4>, <81 4>;
  367. sdc2_default_state: sdc2-default {
  368. clk {
  369. pins = "sdc2_clk";
  370. bias-disable;
  371. drive-strength = <16>;
  372. };
  373. cmd {
  374. pins = "sdc2_cmd";
  375. bias-pull-up;
  376. drive-strength = <10>;
  377. };
  378. data {
  379. pins = "sdc2_data";
  380. bias-pull-up;
  381. drive-strength = <10>;
  382. };
  383. };
  384. sdc2_card_det_n: sd-card-det-n {
  385. pins = "gpio126";
  386. function = "gpio";
  387. bias-pull-up;
  388. };
  389. wcd_intr_default: wcd_intr_default {
  390. pins = <54>;
  391. function = "gpio";
  392. input-enable;
  393. bias-pull-down;
  394. drive-strength = <2>;
  395. };
  396. };
  397. &uart6 {
  398. status = "okay";
  399. bluetooth {
  400. compatible = "qcom,wcn3990-bt";
  401. vddio-supply = <&vreg_s4a_1p8>;
  402. vddxo-supply = <&vreg_l7a_1p8>;
  403. vddrf-supply = <&vreg_l17a_1p3>;
  404. vddch0-supply = <&vreg_l25a_3p3>;
  405. max-speed = <3200000>;
  406. };
  407. };
  408. &ufs_mem_hc {
  409. status = "okay";
  410. reset-gpios = <&tlmm 150 GPIO_ACTIVE_LOW>;
  411. vcc-supply = <&vreg_l20a_2p95>;
  412. vcc-max-microamp = <800000>;
  413. };
  414. &ufs_mem_phy {
  415. status = "okay";
  416. vdda-phy-supply = <&vreg_l1a_0p875>;
  417. vdda-pll-supply = <&vreg_l26a_1p2>;
  418. };
  419. &usb_1 {
  420. status = "okay";
  421. };
  422. &usb_1_dwc3 {
  423. dr_mode = "peripheral";
  424. };
  425. &usb_1_hsphy {
  426. status = "okay";
  427. vdd-supply = <&vreg_l1a_0p875>;
  428. vdda-pll-supply = <&vreg_l12a_1p8>;
  429. vdda-phy-dpdm-supply = <&vreg_l24a_3p075>;
  430. qcom,imp-res-offset-value = <8>;
  431. qcom,hstx-trim-value = <QUSB2_V2_HSTX_TRIM_21_6_MA>;
  432. qcom,preemphasis-level = <QUSB2_V2_PREEMPHASIS_5_PERCENT>;
  433. qcom,preemphasis-width = <QUSB2_V2_PREEMPHASIS_WIDTH_HALF_BIT>;
  434. };
  435. &usb_1_qmpphy {
  436. status = "okay";
  437. vdda-phy-supply = <&vreg_l26a_1p2>;
  438. vdda-pll-supply = <&vreg_l1a_0p875>;
  439. };
  440. &venus {
  441. status = "okay";
  442. firmware-name = "qcom/sdm845/beryllium/venus.mbn";
  443. };
  444. &wcd9340{
  445. pinctrl-0 = <&wcd_intr_default>;
  446. pinctrl-names = "default";
  447. clock-names = "extclk";
  448. clocks = <&rpmhcc RPMH_LN_BB_CLK2>;
  449. reset-gpios = <&tlmm 64 0>;
  450. vdd-buck-supply = <&vreg_s4a_1p8>;
  451. vdd-buck-sido-supply = <&vreg_s4a_1p8>;
  452. vdd-tx-supply = <&vreg_s4a_1p8>;
  453. vdd-rx-supply = <&vreg_s4a_1p8>;
  454. vdd-io-supply = <&vreg_s4a_1p8>;
  455. qcom,micbias1-microvolt = <2700000>;
  456. qcom,micbias2-microvolt = <1800000>;
  457. qcom,micbias3-microvolt = <2700000>;
  458. qcom,micbias4-microvolt = <2700000>;
  459. };
  460. &wifi {
  461. status = "okay";
  462. vdd-0.8-cx-mx-supply = <&vreg_l5a_0p8>;
  463. vdd-1.8-xo-supply = <&vreg_l7a_1p8>;
  464. vdd-1.3-rfa-supply = <&vreg_l17a_1p3>;
  465. vdd-3.3-ch0-supply = <&vreg_l25a_3p3>;
  466. vdd-3.3-ch1-supply = <&vreg_l23a_3p3>;
  467. };
  468. /* PINCTRL - additions to nodes defined in sdm845.dtsi */
  469. &qup_uart6_default {
  470. pinmux {
  471. pins = "gpio45", "gpio46", "gpio47", "gpio48";
  472. function = "qup6";
  473. };
  474. cts {
  475. pins = "gpio45";
  476. bias-disable;
  477. };
  478. rts-tx {
  479. pins = "gpio46", "gpio47";
  480. drive-strength = <2>;
  481. bias-disable;
  482. };
  483. rx {
  484. pins = "gpio48";
  485. bias-pull-up;
  486. };
  487. };