sdm630-sony-xperia-nile.dtsi 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659
  1. // SPDX-License-Identifier: BSD-3-Clause
  2. /*
  3. * Copyright (c) 2020, Konrad Dybcio <[email protected]>
  4. * Copyright (c) 2020, AngeloGioacchino Del Regno
  5. * <[email protected]>
  6. */
  7. #include "pm660.dtsi"
  8. #include "pm660l.dtsi"
  9. #include <dt-bindings/gpio/gpio.h>
  10. #include <dt-bindings/input/input.h>
  11. #include <dt-bindings/input/gpio-keys.h>
  12. #include <dt-bindings/leds/common.h>
  13. / {
  14. /* required for bootloader to select correct board */
  15. qcom,msm-id = <318 0>;
  16. qcom,board-id = <8 1>;
  17. qcom,pmic-id = <0x1001b 0x101011a 0x00 0x00 0x1001b 0x201011a 0x00 0x00>;
  18. /* This part enables graphical output via bootloader-enabled display */
  19. chosen {
  20. bootargs = "earlycon=tty0 console=tty0";
  21. #address-cells = <2>;
  22. #size-cells = <2>;
  23. ranges;
  24. stdout-path = "framebuffer0";
  25. framebuffer0: framebuffer@9d400000 {
  26. compatible = "simple-framebuffer";
  27. reg = <0 0x9d400000 0 (1920 * 1080 * 4)>;
  28. width = <1080>;
  29. height = <1920>;
  30. stride = <(1080 * 4)>;
  31. format = "a8r8g8b8";
  32. status = "okay";
  33. };
  34. };
  35. board_vbat: vbat-regulator {
  36. compatible = "regulator-fixed";
  37. regulator-name = "VBAT";
  38. regulator-min-microvolt = <4000000>;
  39. regulator-max-microvolt = <4000000>;
  40. regulator-always-on;
  41. regulator-boot-on;
  42. };
  43. vph_pwr: vph-pwr-regulator {
  44. compatible = "regulator-fixed";
  45. regulator-name = "vph_pwr";
  46. regulator-always-on;
  47. regulator-boot-on;
  48. };
  49. cam_vdig_imx300_219_vreg: cam_vdig_imx300_219_vreg {
  50. compatible = "regulator-fixed";
  51. regulator-name = "cam_vdig_imx300_219_vreg";
  52. startup-delay-us = <0>;
  53. enable-active-high;
  54. gpio = <&tlmm 52 GPIO_ACTIVE_HIGH>;
  55. pinctrl-names = "default";
  56. pinctrl-0 = <&cam_vdig_default>;
  57. };
  58. cam_vana_front_vreg: cam_vana_front_vreg {
  59. compatible = "regulator-fixed";
  60. regulator-name = "cam_vana_front_vreg";
  61. startup-delay-us = <0>;
  62. enable-active-high;
  63. gpio = <&tlmm 51 GPIO_ACTIVE_HIGH>;
  64. pinctrl-names = "default";
  65. pinctrl-0 = <&imx219_vana_default>;
  66. };
  67. cam_vana_rear_vreg: cam_vana_rear_vreg {
  68. compatible = "regulator-fixed";
  69. regulator-name = "cam_vana_rear_vreg";
  70. startup-delay-us = <0>;
  71. enable-active-high;
  72. gpio = <&tlmm 50 GPIO_ACTIVE_HIGH>;
  73. regulator-always-on;
  74. pinctrl-names = "default";
  75. pinctrl-0 = <&imx300_vana_default>;
  76. };
  77. gpio-keys {
  78. compatible = "gpio-keys";
  79. key-camera-focus {
  80. label = "Camera Focus";
  81. gpios = <&tlmm 64 GPIO_ACTIVE_LOW>;
  82. linux,input-type = <1>;
  83. linux,code = <KEY_CAMERA_FOCUS>;
  84. debounce-interval = <15>;
  85. };
  86. key-camera-snapshot {
  87. label = "Camera Snapshot";
  88. gpios = <&tlmm 113 GPIO_ACTIVE_LOW>;
  89. linux,input-type = <1>;
  90. linux,code = <KEY_CAMERA>;
  91. debounce-interval = <15>;
  92. };
  93. key-vol-down {
  94. label = "Volume Down";
  95. gpios = <&pm660l_gpios 7 GPIO_ACTIVE_LOW>;
  96. linux,input-type = <1>;
  97. linux,code = <KEY_VOLUMEDOWN>;
  98. gpio-key,wakeup;
  99. debounce-interval = <15>;
  100. };
  101. };
  102. reserved-memory {
  103. #address-cells = <2>;
  104. #size-cells = <2>;
  105. ranges;
  106. ramoops@ffc00000 {
  107. compatible = "ramoops";
  108. reg = <0x0 0xffc00000 0x0 0x100000>;
  109. record-size = <0x10000>;
  110. console-size = <0x60000>;
  111. ftrace-size = <0x10000>;
  112. pmsg-size = <0x20000>;
  113. ecc-size = <16>;
  114. status = "okay";
  115. };
  116. debug_region@ffb00000 {
  117. reg = <0x00 0xffb00000 0x00 0x100000>;
  118. no-map;
  119. };
  120. removed_region@85800000 {
  121. reg = <0x00 0x85800000 0x00 0x3700000>;
  122. no-map;
  123. };
  124. };
  125. /*
  126. * Until we hook up type-c detection, we
  127. * have to stick with this. But it works.
  128. */
  129. extcon_usb: extcon-usb {
  130. compatible = "linux,extcon-usb-gpio";
  131. id-gpio = <&tlmm 58 GPIO_ACTIVE_HIGH>;
  132. };
  133. };
  134. &adsp_pil {
  135. firmware-name = "adsp.mdt";
  136. };
  137. &blsp_i2c1 {
  138. status = "okay";
  139. touchscreen: synaptics-rmi4-i2c@70 {
  140. compatible = "syna,rmi4-i2c";
  141. reg = <0x70>;
  142. #address-cells = <1>;
  143. #size-cells = <0>;
  144. interrupts-extended = <&tlmm 45 0x2008>;
  145. pinctrl-names = "default";
  146. pinctrl-0 = <&ts_int_active &ts_lcd_id_active>;
  147. syna,reset-delay-ms = <200>;
  148. syna,startup-delay-ms = <220>;
  149. rmi4-f01@1 {
  150. reg = <0x01>;
  151. syna,nosleep-mode = <1>;
  152. };
  153. rmi4-f11@11 {
  154. reg = <0x11>;
  155. syna,sensor-type = <1>;
  156. };
  157. };
  158. };
  159. &blsp_i2c2 {
  160. status = "okay";
  161. /* SMB1351 charger */
  162. };
  163. /* I2C3, 4, 5, 7 and 8 are disabled on this board. */
  164. &blsp_i2c6 {
  165. status = "okay";
  166. /* NXP NFC */
  167. };
  168. &blsp1_uart2 {
  169. status = "okay";
  170. /* MSM serial console */
  171. };
  172. &blsp2_uart1 {
  173. status = "okay";
  174. /* HCI Bluetooth */
  175. };
  176. &pm660l_lpg {
  177. qcom,power-source = <1>;
  178. status = "okay";
  179. multi-led {
  180. color = <LED_COLOR_ID_RGB>;
  181. function = LED_FUNCTION_STATUS;
  182. #address-cells = <1>;
  183. #size-cells = <0>;
  184. led@1 {
  185. reg = <1>;
  186. color = <LED_COLOR_ID_BLUE>;
  187. };
  188. led@2 {
  189. reg = <2>;
  190. color = <LED_COLOR_ID_GREEN>;
  191. };
  192. led@3 {
  193. reg = <3>;
  194. color = <LED_COLOR_ID_RED>;
  195. };
  196. };
  197. };
  198. &pon_pwrkey {
  199. status = "okay";
  200. };
  201. &pon_resin {
  202. status = "okay";
  203. linux,code = <KEY_VOLUMEUP>;
  204. };
  205. &qusb2phy0 {
  206. status = "okay";
  207. vdd-supply = <&vreg_l1b_0p925>;
  208. vdda-pll-supply = <&vreg_l10a_1p8>;
  209. vdda-phy-dpdm-supply = <&vreg_l7b_3p125>;
  210. };
  211. &rpm_requests {
  212. pm660l-regulators {
  213. compatible = "qcom,rpm-pm660l-regulators";
  214. vdd_s1-supply = <&vph_pwr>;
  215. vdd_s2-supply = <&vph_pwr>;
  216. vdd_s3_s4-supply = <&vph_pwr>;
  217. vdd_s5-supply = <&vph_pwr>;
  218. vdd_s6-supply = <&vph_pwr>;
  219. vdd_l1_l9_l10-supply = <&vreg_s2b_1p05>;
  220. vdd_l2-supply = <&vreg_bob>;
  221. vdd_l3_l5_l7_l8-supply = <&vreg_bob>;
  222. vdd_l4_l6-supply = <&vreg_bob>;
  223. vdd_bob-supply = <&vph_pwr>;
  224. vreg_s1b_1p125: s1 {
  225. regulator-min-microvolt = <1125000>;
  226. regulator-max-microvolt = <1125000>;
  227. regulator-enable-ramp-delay = <200>;
  228. regulator-ramp-delay = <0>;
  229. };
  230. vreg_s2b_1p05: s2 {
  231. regulator-min-microvolt = <1050000>;
  232. regulator-max-microvolt = <1050000>;
  233. regulator-enable-ramp-delay = <200>;
  234. regulator-ramp-delay = <0>;
  235. };
  236. /*
  237. * At least on Nile's configuration, S3B/S4B (VDD_CX) and
  238. * S5B (VDD_MX) are managed only through RPM Power Domains.
  239. * Trying to set a voltage on the main supply will create
  240. * havoc and freeze the SoC.
  241. * In any case, reference voltages for these regulators are:
  242. * S3B/S4B: 0.870V
  243. * S5B: 0.915V
  244. */
  245. /* LDOs */
  246. vreg_l1b_0p925: l1 {
  247. regulator-min-microvolt = <920000>;
  248. regulator-max-microvolt = <928000>;
  249. regulator-enable-ramp-delay = <250>;
  250. regulator-ramp-delay = <0>;
  251. regulator-allow-set-load;
  252. };
  253. vreg_l2b_2p95: l2 {
  254. /*
  255. * This regulator supports 1.648 - 3.104V on this board
  256. * but we set a max voltage of anything less than 2.7V
  257. * to satisfy a condition in sdhci.c that will disable
  258. * 3.3V SDHCI signaling, which happens to be not really
  259. * supported on the Xperia Nile/Ganges platform.
  260. */
  261. regulator-min-microvolt = <1648000>;
  262. regulator-max-microvolt = <2696000>;
  263. regulator-enable-ramp-delay = <250>;
  264. regulator-ramp-delay = <0>;
  265. regulator-allow-set-load;
  266. };
  267. vreg_l3b_3p0: l3 {
  268. regulator-min-microvolt = <2800000>;
  269. regulator-max-microvolt = <2800000>;
  270. regulator-enable-ramp-delay = <250>;
  271. regulator-ramp-delay = <0>;
  272. regulator-min-microamp = <200>;
  273. regulator-max-microamp = <600000>;
  274. regulator-system-load = <100000>;
  275. regulator-allow-set-load;
  276. };
  277. vreg_l4b_2p95: l4 {
  278. regulator-min-microvolt = <2944000>;
  279. regulator-max-microvolt = <2952000>;
  280. regulator-enable-ramp-delay = <250>;
  281. regulator-ramp-delay = <0>;
  282. regulator-min-microamp = <200>;
  283. regulator-max-microamp = <600000>;
  284. regulator-system-load = <570000>;
  285. regulator-allow-set-load;
  286. };
  287. /*
  288. * Downstream specifies a range of 1721-3600mV,
  289. * but the only assigned consumers are SDHCI2 VMMC
  290. * and Coresight QPDI that both request pinned 2.95V.
  291. * Tighten the range to 1.8-3.328 (closest to 3.3) to
  292. * make the mmc driver happy.
  293. */
  294. vreg_l5b_2p95: l5 {
  295. regulator-min-microvolt = <1800000>;
  296. regulator-max-microvolt = <3328000>;
  297. regulator-enable-ramp-delay = <250>;
  298. regulator-ramp-delay = <0>;
  299. regulator-allow-set-load;
  300. regulator-system-load = <800000>;
  301. };
  302. vreg_l6b_3p3: l6 {
  303. regulator-min-microvolt = <1704000>;
  304. regulator-max-microvolt = <3312000>;
  305. regulator-enable-ramp-delay = <250>;
  306. regulator-ramp-delay = <0>;
  307. };
  308. vreg_l7b_3p125: l7 {
  309. regulator-min-microvolt = <2704000>;
  310. regulator-max-microvolt = <3128000>;
  311. regulator-enable-ramp-delay = <250>;
  312. regulator-ramp-delay = <0>;
  313. };
  314. vreg_l8b_3p3: l8 {
  315. regulator-min-microvolt = <2800000>;
  316. regulator-max-microvolt = <3400000>;
  317. regulator-enable-ramp-delay = <250>;
  318. regulator-ramp-delay = <0>;
  319. };
  320. /* L9B (870mV) is currently unused */
  321. /* L10B (915mV) is currently unused */
  322. vreg_bob: bob {
  323. regulator-min-microvolt = <3304000>;
  324. regulator-max-microvolt = <3624000>;
  325. regulator-enable-ramp-delay = <500>;
  326. regulator-ramp-delay = <0>;
  327. };
  328. };
  329. pm660-regulators {
  330. compatible = "qcom,rpm-pm660-regulators";
  331. vdd_s1-supply = <&vph_pwr>;
  332. vdd_s2-supply = <&vph_pwr>;
  333. vdd_s3-supply = <&vph_pwr>;
  334. vdd_s4-supply = <&vph_pwr>;
  335. vdd_s5-supply = <&vph_pwr>;
  336. vdd_s6-supply = <&vph_pwr>;
  337. vdd_l1_l6_l7-supply = <&vreg_s5a_1p35>;
  338. vdd_l2_l3-supply = <&vreg_s2b_1p05>;
  339. vdd_l5-supply = <&vreg_s2b_1p05>;
  340. vdd_l8_l9_l10_l11_l12_l13_l14-supply = <&vreg_s4a_2p04>;
  341. vdd_l15_l16_l17_l18_l19-supply = <&vreg_bob>;
  342. /*
  343. * S1A (FTAPC0), S2A (FTAPC1), S3A (HFAPC1) are managed
  344. * by the Core Power Reduction hardened (CPRh) and the
  345. * Operating State Manager (OSM) HW automatically.
  346. */
  347. vreg_s4a_2p04: s4 {
  348. regulator-min-microvolt = <2040000>;
  349. regulator-max-microvolt = <2040000>;
  350. regulator-enable-ramp-delay = <200>;
  351. regulator-ramp-delay = <0>;
  352. regulator-always-on;
  353. };
  354. vreg_s5a_1p35: s5 {
  355. regulator-min-microvolt = <1224000>;
  356. regulator-max-microvolt = <1350000>;
  357. regulator-enable-ramp-delay = <200>;
  358. regulator-ramp-delay = <0>;
  359. };
  360. vreg_s6a_0p87: s6 {
  361. regulator-min-microvolt = <504000>;
  362. regulator-max-microvolt = <992000>;
  363. regulator-enable-ramp-delay = <150>;
  364. regulator-ramp-delay = <0>;
  365. };
  366. /* LDOs */
  367. vreg_l1a_1p225: l1 {
  368. regulator-min-microvolt = <1226000>;
  369. regulator-max-microvolt = <1250000>;
  370. regulator-enable-ramp-delay = <250>;
  371. regulator-ramp-delay = <0>;
  372. regulator-allow-set-load;
  373. };
  374. vreg_l2a_1p0: l2 {
  375. regulator-min-microvolt = <944000>;
  376. regulator-max-microvolt = <1008000>;
  377. regulator-enable-ramp-delay = <250>;
  378. regulator-ramp-delay = <0>;
  379. };
  380. vreg_l3a_1p0: l3 {
  381. regulator-min-microvolt = <944000>;
  382. regulator-max-microvolt = <1008000>;
  383. regulator-enable-ramp-delay = <250>;
  384. regulator-ramp-delay = <0>;
  385. };
  386. vreg_l5a_0p848: l5 {
  387. regulator-min-microvolt = <800000>;
  388. regulator-max-microvolt = <952000>;
  389. regulator-enable-ramp-delay = <250>;
  390. regulator-ramp-delay = <0>;
  391. };
  392. vreg_l6a_1p3: l6 {
  393. regulator-min-microvolt = <1304000>;
  394. regulator-max-microvolt = <1368000>;
  395. regulator-allow-set-load;
  396. regulator-enable-ramp-delay = <250>;
  397. regulator-ramp-delay = <0>;
  398. };
  399. vreg_l7a_1p2: l7 {
  400. regulator-min-microvolt = <1200000>;
  401. regulator-max-microvolt = <1200000>;
  402. regulator-enable-ramp-delay = <250>;
  403. regulator-ramp-delay = <0>;
  404. };
  405. vreg_l8a_1p8: l8 {
  406. regulator-min-microvolt = <1800000>;
  407. regulator-max-microvolt = <1800000>;
  408. regulator-enable-ramp-delay = <250>;
  409. regulator-ramp-delay = <0>;
  410. regulator-system-load = <325000>;
  411. regulator-allow-set-load;
  412. };
  413. vreg_l9a_1p8: l9 {
  414. regulator-min-microvolt = <1804000>;
  415. regulator-max-microvolt = <1896000>;
  416. regulator-enable-ramp-delay = <250>;
  417. regulator-ramp-delay = <0>;
  418. regulator-allow-set-load;
  419. };
  420. vreg_l10a_1p8: l10 {
  421. regulator-min-microvolt = <1800000>;
  422. regulator-max-microvolt = <1944000>;
  423. regulator-enable-ramp-delay = <250>;
  424. regulator-ramp-delay = <0>;
  425. regulator-allow-set-load;
  426. };
  427. vreg_l11a_1p8: l11 {
  428. regulator-min-microvolt = <1784000>;
  429. regulator-max-microvolt = <1944000>;
  430. regulator-enable-ramp-delay = <250>;
  431. regulator-ramp-delay = <0>;
  432. };
  433. vreg_l12a_1p8: l12 {
  434. regulator-min-microvolt = <1800000>;
  435. regulator-max-microvolt = <1944000>;
  436. regulator-enable-ramp-delay = <250>;
  437. regulator-ramp-delay = <0>;
  438. };
  439. /* This gives power to the LPDDR4: never turn it off! */
  440. vreg_l13a_1p8: l13 {
  441. regulator-min-microvolt = <1800000>;
  442. regulator-max-microvolt = <1944000>;
  443. regulator-enable-ramp-delay = <250>;
  444. regulator-ramp-delay = <0>;
  445. regulator-boot-on;
  446. regulator-always-on;
  447. };
  448. vreg_l14a_1p8: l14 {
  449. regulator-min-microvolt = <1710000>;
  450. regulator-max-microvolt = <1904000>;
  451. regulator-enable-ramp-delay = <250>;
  452. regulator-ramp-delay = <0>;
  453. };
  454. vreg_l15a_1p8: l15 {
  455. regulator-min-microvolt = <1648000>;
  456. regulator-max-microvolt = <2952000>;
  457. regulator-enable-ramp-delay = <250>;
  458. regulator-ramp-delay = <0>;
  459. };
  460. /* L16A (2.70V) is unused */
  461. vreg_l17a_1p8: l17 {
  462. regulator-min-microvolt = <1648000>;
  463. regulator-max-microvolt = <2952000>;
  464. regulator-enable-ramp-delay = <250>;
  465. regulator-ramp-delay = <0>;
  466. };
  467. vreg_l18a_1v8: l18 {
  468. regulator-min-microvolt = <1800000>;
  469. regulator-max-microvolt = <1800000>;
  470. regulator-enable-ramp-delay = <250>;
  471. regulator-ramp-delay = <10>;
  472. regulator-min-microamp = <200>;
  473. regulator-max-microamp = <50000>;
  474. regulator-system-load = <10000>;
  475. regulator-allow-set-load;
  476. };
  477. vreg_l19a_3p3: l19 {
  478. regulator-min-microvolt = <3312000>;
  479. regulator-max-microvolt = <3400000>;
  480. regulator-enable-ramp-delay = <250>;
  481. regulator-ramp-delay = <0>;
  482. regulator-allow-set-load;
  483. };
  484. };
  485. };
  486. &sdc2_state_on {
  487. sd-cd {
  488. pins = "gpio54";
  489. bias-pull-up;
  490. drive-strength = <2>;
  491. };
  492. };
  493. &sdc2_state_off {
  494. sd-cd {
  495. pins = "gpio54";
  496. bias-disable;
  497. drive-strength = <2>;
  498. };
  499. };
  500. &sdhc_1 {
  501. status = "okay";
  502. supports-cqe;
  503. /* SoMC Nile platform's eMMC doesn't support HS200 mode */
  504. mmc-ddr-1_8v;
  505. mmc-hs400-1_8v;
  506. mmc-hs400-enhanced-strobe;
  507. vmmc-supply = <&vreg_l4b_2p95>;
  508. vqmmc-supply = <&vreg_l8a_1p8>;
  509. };
  510. &sdhc_2 {
  511. status = "okay";
  512. vmmc-supply = <&vreg_l5b_2p95>;
  513. vqmmc-supply = <&vreg_l2b_2p95>;
  514. };
  515. &tlmm {
  516. gpio-reserved-ranges = <8 4>;
  517. ts_int_active: ts-int-active {
  518. pins = "gpio45";
  519. drive-strength = <8>;
  520. bias-pull-up;
  521. };
  522. ts_lcd_id_active: ts-lcd-id-active {
  523. pins = "gpio56";
  524. drive-strength = <8>;
  525. bias-disable;
  526. };
  527. imx300_vana_default: imx300-vana-default {
  528. pins = "gpio50";
  529. function = "gpio";
  530. bias-disable;
  531. drive-strength = <2>;
  532. };
  533. imx219_vana_default: imx219-vana-default {
  534. pins = "gpio51";
  535. function = "gpio";
  536. bias-disable;
  537. drive-strength = <2>;
  538. };
  539. cam_vdig_default: cam-vdig-default {
  540. pins = "gpio52";
  541. function = "gpio";
  542. bias-disable;
  543. drive-strength = <2>;
  544. };
  545. };
  546. &usb3 {
  547. status = "okay";
  548. };
  549. &usb3_dwc3 {
  550. dr_mode = "peripheral";
  551. extcon = <&extcon_usb>;
  552. };