qcom-msm8974pro-sony-xperia-shinano-castor.dts 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638
  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 = "Sony Xperia Z2 Tablet";
  10. compatible = "sony,xperia-castor", "qcom,msm8974";
  11. aliases {
  12. serial0 = &blsp1_uart2;
  13. serial1 = &blsp2_uart1;
  14. };
  15. chosen {
  16. stdout-path = "serial0:115200n8";
  17. };
  18. gpio-keys {
  19. compatible = "gpio-keys";
  20. pinctrl-names = "default";
  21. pinctrl-0 = <&gpio_keys_pin_a>;
  22. key-volume-down {
  23. label = "volume_down";
  24. gpios = <&pm8941_gpios 2 GPIO_ACTIVE_LOW>;
  25. linux,input-type = <1>;
  26. linux,code = <KEY_VOLUMEDOWN>;
  27. };
  28. key-camera-snapshot {
  29. label = "camera_snapshot";
  30. gpios = <&pm8941_gpios 3 GPIO_ACTIVE_LOW>;
  31. linux,input-type = <1>;
  32. linux,code = <KEY_CAMERA>;
  33. };
  34. key-camera-focus {
  35. label = "camera_focus";
  36. gpios = <&pm8941_gpios 4 GPIO_ACTIVE_LOW>;
  37. linux,input-type = <1>;
  38. linux,code = <KEY_CAMERA_FOCUS>;
  39. };
  40. key-volume-up {
  41. label = "volume_up";
  42. gpios = <&pm8941_gpios 5 GPIO_ACTIVE_LOW>;
  43. linux,input-type = <1>;
  44. linux,code = <KEY_VOLUMEUP>;
  45. };
  46. };
  47. vreg_bl_vddio: lcd-backlight-vddio {
  48. compatible = "regulator-fixed";
  49. regulator-name = "vreg_bl_vddio";
  50. regulator-min-microvolt = <3150000>;
  51. regulator-max-microvolt = <3150000>;
  52. gpio = <&tlmm 69 0>;
  53. enable-active-high;
  54. vin-supply = <&pm8941_s3>;
  55. startup-delay-us = <70000>;
  56. pinctrl-names = "default";
  57. pinctrl-0 = <&lcd_backlight_en_pin_a>;
  58. };
  59. vreg_vsp: lcd-dcdc-regulator {
  60. compatible = "regulator-fixed";
  61. regulator-name = "vreg_vsp";
  62. regulator-min-microvolt = <5600000>;
  63. regulator-max-microvolt = <5600000>;
  64. gpio = <&pm8941_gpios 20 GPIO_ACTIVE_HIGH>;
  65. enable-active-high;
  66. pinctrl-names = "default";
  67. pinctrl-0 = <&lcd_dcdc_en_pin_a>;
  68. };
  69. vreg_wlan: wlan-regulator {
  70. compatible = "regulator-fixed";
  71. regulator-name = "wl-reg";
  72. regulator-min-microvolt = <3300000>;
  73. regulator-max-microvolt = <3300000>;
  74. gpio = <&pm8941_gpios 18 GPIO_ACTIVE_HIGH>;
  75. enable-active-high;
  76. pinctrl-names = "default";
  77. pinctrl-0 = <&wlan_regulator_pin>;
  78. };
  79. };
  80. &blsp1_uart2 {
  81. status = "okay";
  82. };
  83. &blsp2_i2c2 {
  84. status = "okay";
  85. clock-frequency = <355000>;
  86. synaptics@2c {
  87. compatible = "syna,rmi4-i2c";
  88. reg = <0x2c>;
  89. interrupt-parent = <&tlmm>;
  90. interrupts = <86 IRQ_TYPE_EDGE_FALLING>;
  91. #address-cells = <1>;
  92. #size-cells = <0>;
  93. vdd-supply = <&pm8941_l22>;
  94. vio-supply = <&pm8941_lvs3>;
  95. pinctrl-names = "default";
  96. pinctrl-0 = <&ts_int_pin>;
  97. syna,startup-delay-ms = <10>;
  98. rmi4-f01@1 {
  99. reg = <0x1>;
  100. syna,nosleep-mode = <1>;
  101. };
  102. rmi4-f11@11 {
  103. reg = <0x11>;
  104. syna,sensor-type = <1>;
  105. touchscreen-inverted-x;
  106. };
  107. };
  108. };
  109. &blsp2_i2c5 {
  110. status = "okay";
  111. clock-frequency = <355000>;
  112. lp8566_wled: backlight@2c {
  113. compatible = "ti,lp8556";
  114. reg = <0x2c>;
  115. power-supply = <&vreg_bl_vddio>;
  116. bl-name = "backlight";
  117. dev-ctrl = /bits/ 8 <0x05>;
  118. init-brt = /bits/ 8 <0x3f>;
  119. rom_a0h {
  120. rom-addr = /bits/ 8 <0xa0>;
  121. rom-val = /bits/ 8 <0xff>;
  122. };
  123. rom_a1h {
  124. rom-addr = /bits/ 8 <0xa1>;
  125. rom-val = /bits/ 8 <0x3f>;
  126. };
  127. rom_a2h {
  128. rom-addr = /bits/ 8 <0xa2>;
  129. rom-val = /bits/ 8 <0x20>;
  130. };
  131. rom_a3h {
  132. rom-addr = /bits/ 8 <0xa3>;
  133. rom-val = /bits/ 8 <0x5e>;
  134. };
  135. rom_a4h {
  136. rom-addr = /bits/ 8 <0xa4>;
  137. rom-val = /bits/ 8 <0x02>;
  138. };
  139. rom_a5h {
  140. rom-addr = /bits/ 8 <0xa5>;
  141. rom-val = /bits/ 8 <0x04>;
  142. };
  143. rom_a6h {
  144. rom-addr = /bits/ 8 <0xa6>;
  145. rom-val = /bits/ 8 <0x80>;
  146. };
  147. rom_a7h {
  148. rom-addr = /bits/ 8 <0xa7>;
  149. rom-val = /bits/ 8 <0xf7>;
  150. };
  151. rom_a9h {
  152. rom-addr = /bits/ 8 <0xa9>;
  153. rom-val = /bits/ 8 <0x80>;
  154. };
  155. rom_aah {
  156. rom-addr = /bits/ 8 <0xaa>;
  157. rom-val = /bits/ 8 <0x0f>;
  158. };
  159. rom_aeh {
  160. rom-addr = /bits/ 8 <0xae>;
  161. rom-val = /bits/ 8 <0x0f>;
  162. };
  163. };
  164. };
  165. &blsp2_uart1 {
  166. status = "okay";
  167. bluetooth {
  168. compatible = "brcm,bcm43438-bt";
  169. max-speed = <3000000>;
  170. pinctrl-names = "default";
  171. pinctrl-0 = <&bt_host_wake_pin>, <&bt_dev_wake_pin>, <&bt_reg_on_pin>;
  172. host-wakeup-gpios = <&tlmm 95 GPIO_ACTIVE_HIGH>;
  173. device-wakeup-gpios = <&tlmm 96 GPIO_ACTIVE_HIGH>;
  174. shutdown-gpios = <&pm8941_gpios 16 GPIO_ACTIVE_HIGH>;
  175. };
  176. };
  177. &otg {
  178. status = "okay";
  179. phys = <&usb_hs1_phy>;
  180. phy-select = <&tcsr 0xb000 0>;
  181. extcon = <&smbb>, <&usb_id>;
  182. vbus-supply = <&chg_otg>;
  183. hnp-disable;
  184. srp-disable;
  185. adp-disable;
  186. ulpi {
  187. phy@a {
  188. status = "okay";
  189. v1p8-supply = <&pm8941_l6>;
  190. v3p3-supply = <&pm8941_l24>;
  191. extcon = <&smbb>;
  192. qcom,init-seq = /bits/ 8 <0x1 0x64>;
  193. };
  194. };
  195. };
  196. &pm8941_coincell {
  197. status = "okay";
  198. qcom,rset-ohms = <2100>;
  199. qcom,vset-millivolts = <3000>;
  200. };
  201. &pm8941_gpios {
  202. gpio_keys_pin_a: gpio-keys-active-state {
  203. pins = "gpio2", "gpio5";
  204. function = "normal";
  205. bias-pull-up;
  206. power-source = <PM8941_GPIO_S3>;
  207. };
  208. bt_reg_on_pin: bt-reg-on-state {
  209. pins = "gpio16";
  210. function = "normal";
  211. output-low;
  212. power-source = <PM8941_GPIO_S3>;
  213. };
  214. wlan_sleep_clk_pin: wl-sleep-clk-state {
  215. pins = "gpio17";
  216. function = "func2";
  217. output-high;
  218. power-source = <PM8941_GPIO_S3>;
  219. };
  220. wlan_regulator_pin: wl-reg-active-state {
  221. pins = "gpio18";
  222. function = "normal";
  223. bias-disable;
  224. power-source = <PM8941_GPIO_S3>;
  225. };
  226. lcd_dcdc_en_pin_a: lcd-dcdc-en-active-state {
  227. pins = "gpio20";
  228. function = "normal";
  229. bias-disable;
  230. power-source = <PM8941_GPIO_S3>;
  231. input-disable;
  232. output-low;
  233. };
  234. };
  235. &pm8941_lpg {
  236. status = "okay";
  237. qcom,power-source = <1>;
  238. rgb-led {
  239. color = <LED_COLOR_ID_RGB>;
  240. function = LED_FUNCTION_STATUS;
  241. #address-cells = <1>;
  242. #size-cells = <0>;
  243. led@5 {
  244. reg = <5>;
  245. color = <LED_COLOR_ID_BLUE>;
  246. };
  247. led@6 {
  248. reg = <6>;
  249. color = <LED_COLOR_ID_GREEN>;
  250. };
  251. led@7 {
  252. reg = <7>;
  253. color = <LED_COLOR_ID_RED>;
  254. };
  255. };
  256. };
  257. &rpm_requests {
  258. pm8941-regulators {
  259. compatible = "qcom,rpm-pm8941-regulators";
  260. vdd_l1_l3-supply = <&pm8941_s1>;
  261. vdd_l2_lvs1_2_3-supply = <&pm8941_s3>;
  262. vdd_l4_l11-supply = <&pm8941_s1>;
  263. vdd_l5_l7-supply = <&pm8941_s2>;
  264. vdd_l6_l12_l14_l15-supply = <&pm8941_s2>;
  265. vdd_l9_l10_l17_l22-supply = <&vreg_boost>;
  266. vdd_l13_l20_l23_l24-supply = <&vreg_boost>;
  267. vdd_l21-supply = <&vreg_boost>;
  268. pm8941_s1: s1 {
  269. regulator-min-microvolt = <1300000>;
  270. regulator-max-microvolt = <1300000>;
  271. regulator-always-on;
  272. regulator-boot-on;
  273. };
  274. pm8941_s2: s2 {
  275. regulator-min-microvolt = <2150000>;
  276. regulator-max-microvolt = <2150000>;
  277. regulator-boot-on;
  278. };
  279. pm8941_s3: s3 {
  280. regulator-min-microvolt = <1800000>;
  281. regulator-max-microvolt = <1800000>;
  282. regulator-system-load = <154000>;
  283. regulator-always-on;
  284. regulator-boot-on;
  285. };
  286. pm8941_s4: s4 {
  287. regulator-min-microvolt = <5000000>;
  288. regulator-max-microvolt = <5000000>;
  289. };
  290. pm8941_l1: l1 {
  291. regulator-min-microvolt = <1225000>;
  292. regulator-max-microvolt = <1225000>;
  293. regulator-always-on;
  294. regulator-boot-on;
  295. };
  296. pm8941_l2: l2 {
  297. regulator-min-microvolt = <1200000>;
  298. regulator-max-microvolt = <1200000>;
  299. };
  300. pm8941_l3: l3 {
  301. regulator-min-microvolt = <1200000>;
  302. regulator-max-microvolt = <1200000>;
  303. };
  304. pm8941_l4: l4 {
  305. regulator-min-microvolt = <1225000>;
  306. regulator-max-microvolt = <1225000>;
  307. };
  308. pm8941_l5: l5 {
  309. regulator-min-microvolt = <1800000>;
  310. regulator-max-microvolt = <1800000>;
  311. };
  312. pm8941_l6: l6 {
  313. regulator-min-microvolt = <1800000>;
  314. regulator-max-microvolt = <1800000>;
  315. regulator-boot-on;
  316. };
  317. pm8941_l7: l7 {
  318. regulator-min-microvolt = <1800000>;
  319. regulator-max-microvolt = <1800000>;
  320. regulator-boot-on;
  321. };
  322. pm8941_l8: l8 {
  323. regulator-min-microvolt = <1800000>;
  324. regulator-max-microvolt = <1800000>;
  325. };
  326. pm8941_l9: l9 {
  327. regulator-min-microvolt = <1800000>;
  328. regulator-max-microvolt = <2950000>;
  329. };
  330. pm8941_l11: l11 {
  331. regulator-min-microvolt = <1300000>;
  332. regulator-max-microvolt = <1350000>;
  333. };
  334. pm8941_l12: l12 {
  335. regulator-min-microvolt = <1800000>;
  336. regulator-max-microvolt = <1800000>;
  337. regulator-always-on;
  338. regulator-boot-on;
  339. };
  340. pm8941_l13: l13 {
  341. regulator-min-microvolt = <1800000>;
  342. regulator-max-microvolt = <2950000>;
  343. regulator-boot-on;
  344. };
  345. pm8941_l14: l14 {
  346. regulator-min-microvolt = <1800000>;
  347. regulator-max-microvolt = <1800000>;
  348. };
  349. pm8941_l15: l15 {
  350. regulator-min-microvolt = <2050000>;
  351. regulator-max-microvolt = <2050000>;
  352. };
  353. pm8941_l16: l16 {
  354. regulator-min-microvolt = <2700000>;
  355. regulator-max-microvolt = <2700000>;
  356. };
  357. pm8941_l17: l17 {
  358. regulator-min-microvolt = <2700000>;
  359. regulator-max-microvolt = <2700000>;
  360. };
  361. pm8941_l18: l18 {
  362. regulator-min-microvolt = <2850000>;
  363. regulator-max-microvolt = <2850000>;
  364. };
  365. pm8941_l19: l19 {
  366. regulator-min-microvolt = <2850000>;
  367. regulator-max-microvolt = <2850000>;
  368. };
  369. pm8941_l20: l20 {
  370. regulator-min-microvolt = <2950000>;
  371. regulator-max-microvolt = <2950000>;
  372. regulator-system-load = <500000>;
  373. regulator-allow-set-load;
  374. regulator-boot-on;
  375. };
  376. pm8941_l21: l21 {
  377. regulator-min-microvolt = <2950000>;
  378. regulator-max-microvolt = <2950000>;
  379. regulator-boot-on;
  380. };
  381. pm8941_l22: l22 {
  382. regulator-min-microvolt = <3000000>;
  383. regulator-max-microvolt = <3000000>;
  384. };
  385. pm8941_l23: l23 {
  386. regulator-min-microvolt = <2800000>;
  387. regulator-max-microvolt = <2800000>;
  388. };
  389. pm8941_l24: l24 {
  390. regulator-min-microvolt = <3075000>;
  391. regulator-max-microvolt = <3075000>;
  392. regulator-boot-on;
  393. };
  394. pm8941_lvs3: lvs3 {};
  395. };
  396. };
  397. &sdhc_1 {
  398. status = "okay";
  399. vmmc-supply = <&pm8941_l20>;
  400. vqmmc-supply = <&pm8941_s3>;
  401. pinctrl-names = "default", "sleep";
  402. pinctrl-0 = <&sdc1_on>;
  403. pinctrl-1 = <&sdc1_off>;
  404. };
  405. &sdhc_2 {
  406. status = "okay";
  407. vmmc-supply = <&pm8941_l21>;
  408. vqmmc-supply = <&pm8941_l13>;
  409. cd-gpios = <&tlmm 62 GPIO_ACTIVE_LOW>;
  410. pinctrl-names = "default", "sleep";
  411. pinctrl-0 = <&sdc2_on>;
  412. pinctrl-1 = <&sdc2_off>;
  413. };
  414. &sdhc_3 {
  415. status = "okay";
  416. max-frequency = <100000000>;
  417. vmmc-supply = <&vreg_wlan>;
  418. non-removable;
  419. pinctrl-names = "default";
  420. pinctrl-0 = <&sdc3_on>;
  421. #address-cells = <1>;
  422. #size-cells = <0>;
  423. bcrmf@1 {
  424. compatible = "brcm,bcm4339-fmac", "brcm,bcm4329-fmac";
  425. reg = <1>;
  426. brcm,drive-strength = <10>;
  427. pinctrl-names = "default";
  428. pinctrl-0 = <&wlan_sleep_clk_pin>;
  429. };
  430. };
  431. &smbb {
  432. qcom,fast-charge-safe-current = <1500000>;
  433. qcom,fast-charge-current-limit = <1500000>;
  434. qcom,dc-current-limit = <1800000>;
  435. qcom,fast-charge-safe-voltage = <4400000>;
  436. qcom,fast-charge-high-threshold-voltage = <4350000>;
  437. qcom,fast-charge-low-threshold-voltage = <3400000>;
  438. qcom,auto-recharge-threshold-voltage = <4200000>;
  439. qcom,minimum-input-voltage = <4300000>;
  440. };
  441. &tlmm {
  442. lcd_backlight_en_pin_a: lcd-backlight-vddio {
  443. pins = "gpio69";
  444. drive-strength = <10>;
  445. output-low;
  446. bias-disable;
  447. };
  448. sdc1_on: sdc1-on {
  449. clk {
  450. pins = "sdc1_clk";
  451. drive-strength = <16>;
  452. bias-disable;
  453. };
  454. cmd-data {
  455. pins = "sdc1_cmd", "sdc1_data";
  456. drive-strength = <10>;
  457. bias-pull-up;
  458. };
  459. };
  460. sdc2_on: sdc2-on {
  461. clk {
  462. pins = "sdc2_clk";
  463. drive-strength = <6>;
  464. bias-disable;
  465. };
  466. cmd-data {
  467. pins = "sdc2_cmd", "sdc2_data";
  468. drive-strength = <6>;
  469. bias-pull-up;
  470. };
  471. cd {
  472. pins = "gpio62";
  473. function = "gpio";
  474. drive-strength = <2>;
  475. bias-disable;
  476. };
  477. };
  478. sdc3_on: sdc3-on {
  479. clk {
  480. pins = "gpio40";
  481. function = "sdc3";
  482. drive-strength = <10>;
  483. bias-disable;
  484. };
  485. cmd {
  486. pins = "gpio39";
  487. function = "sdc3";
  488. drive-strength = <10>;
  489. bias-pull-up;
  490. };
  491. data {
  492. pins = "gpio35", "gpio36", "gpio37", "gpio38";
  493. function = "sdc3";
  494. drive-strength = <10>;
  495. bias-pull-up;
  496. };
  497. };
  498. ts_int_pin: ts-int-pin {
  499. pins = "gpio86";
  500. function = "gpio";
  501. drive-strength = <2>;
  502. bias-disable;
  503. input-enable;
  504. };
  505. bt_host_wake_pin: bt-host-wake {
  506. pins = "gpio95";
  507. function = "gpio";
  508. drive-strength = <2>;
  509. bias-disable;
  510. output-low;
  511. };
  512. bt_dev_wake_pin: bt-dev-wake {
  513. pins = "gpio96";
  514. function = "gpio";
  515. drive-strength = <2>;
  516. bias-disable;
  517. };
  518. };