PageRenderTime 43ms CodeModel.GetById 13ms RepoModel.GetById 0ms app.codeStats 0ms

/arch/arm/boot/dts/qcom/msm-pmi8994.dtsi

https://gitlab.com/webhaikal/SenseiRN3
Device Tree | 573 lines | 503 code | 59 blank | 11 comment | 0 complexity | b12f282ca29d835dda6f7e3e9348a0ab MD5 | raw file
  1. /* Copyright (c) 2014, The Linux Foundation. All rights reserved.
  2. *
  3. * This program is free software; you can redistribute it and/or modify
  4. * it under the terms of the GNU General Public License version 2 and
  5. * only version 2 as published by the Free Software Foundation.
  6. *
  7. * This program is distributed in the hope that it will be useful,
  8. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  9. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  10. * GNU General Public License for more details.
  11. */
  12. &spmi_bus {
  13. #address-cells = <1>;
  14. #size-cells = <0>;
  15. interrupt-controller;
  16. #interrupt-cells = <3>;
  17. qcom,pmi8994@2 {
  18. spmi-slave-container;
  19. reg = <0x2>;
  20. #address-cells = <1>;
  21. #size-cells = <1>;
  22. pmi8994_revid: qcom,revid@100 {
  23. compatible = "qcom,qpnp-revid";
  24. reg = <0x100 0x100>;
  25. };
  26. pmi8994_gpios: gpios {
  27. spmi-dev-container;
  28. compatible = "qcom,qpnp-pin";
  29. gpio-controller;
  30. #gpio-cells = <2>;
  31. #address-cells = <1>;
  32. #size-cells = <1>;
  33. label = "pmi8994-gpio";
  34. gpio@c000 {
  35. reg = <0xc000 0x100>;
  36. qcom,pin-num = <1>;
  37. status = "disabled";
  38. };
  39. gpio@c100 {
  40. reg = <0xc100 0x100>;
  41. qcom,pin-num = <2>;
  42. status = "disabled";
  43. };
  44. gpio@c200 {
  45. reg = <0xc200 0x100>;
  46. qcom,pin-num = <3>;
  47. status = "disabled";
  48. };
  49. gpio@c300 {
  50. reg = <0xc300 0x100>;
  51. qcom,pin-num = <4>;
  52. status = "disabled";
  53. };
  54. gpio@c400 {
  55. reg = <0xc400 0x100>;
  56. qcom,pin-num = <5>;
  57. status = "disabled";
  58. };
  59. gpio@c500 {
  60. reg = <0xc500 0x100>;
  61. qcom,pin-num = <6>;
  62. status = "disabled";
  63. };
  64. gpio@c600 {
  65. reg = <0xc600 0x100>;
  66. qcom,pin-num = <7>;
  67. status = "disabled";
  68. };
  69. gpio@c700 {
  70. reg = <0xc700 0x100>;
  71. qcom,pin-num = <8>;
  72. status = "disabled";
  73. };
  74. gpio@c800 {
  75. reg = <0xc800 0x100>;
  76. qcom,pin-num = <9>;
  77. status = "disabled";
  78. };
  79. gpio@c900 {
  80. reg = <0xc900 0x100>;
  81. qcom,pin-num = <10>;
  82. status = "disabled";
  83. };
  84. };
  85. pmi8994_mpps: mpps {
  86. spmi-dev-container;
  87. compatible = "qcom,qpnp-pin";
  88. gpio-controller;
  89. #gpio-cells = <2>;
  90. #address-cells = <1>;
  91. #size-cells = <1>;
  92. label = "pmi8994-mpp";
  93. mpp@a000 {
  94. reg = <0xa000 0x100>;
  95. qcom,pin-num = <1>;
  96. status = "disabled";
  97. };
  98. mpp@a100 {
  99. reg = <0xa100 0x100>;
  100. qcom,pin-num = <2>;
  101. status = "disabled";
  102. };
  103. mpp@a200 {
  104. reg = <0xa200 0x100>;
  105. qcom,pin-num = <3>;
  106. status = "disabled";
  107. };
  108. mpp@a300 {
  109. reg = <0xa300 0x100>;
  110. qcom,pin-num = <4>;
  111. status = "disabled";
  112. };
  113. };
  114. bcl@4200 {
  115. compatible = "qcom,msm-bcl";
  116. reg = <0x4200 0xFF>;
  117. interrupts = <0x2 0x42 0x0>,
  118. <0x2 0x42 0x1>;
  119. interrupt-names = "bcl-high-ibat-int",
  120. "bcl-low-vbat-int";
  121. qcom,vbat-scaling-factor = <39000>;
  122. qcom,vbat-gain-numerator = <1>;
  123. qcom,vbat-gain-denominator = <32>;
  124. qcom,vbat-polling-delay-ms = <50>;
  125. qcom,ibat-scaling-factor = <39000>;
  126. qcom,ibat-gain-numerator = <1>;
  127. qcom,ibat-gain-denominator = <32>;
  128. qcom,ibat-offset-numerator = <1200>;
  129. qcom,ibat-offset-denominator = <1>;
  130. qcom,ibat-polling-delay-ms = <50>;
  131. };
  132. pmi8994_vadc: vadc@3100 {
  133. compatible = "qcom,qpnp-vadc";
  134. reg = <0x3100 0x100>;
  135. #address-cells = <1>;
  136. #size-cells = <0>;
  137. interrupts = <0x2 0x31 0x0>,
  138. <0x2 0x31 0x3>,
  139. <0x2 0x31 0x4>;
  140. interrupt-names = "eoc-int-en-set",
  141. "high-thr-en-set",
  142. "low-thr-en-set";
  143. qcom,adc-bit-resolution = <15>;
  144. qcom,adc-vdd-reference = <1800>;
  145. qcom,vadc-poll-eoc;
  146. qcom,vadc-meas-int-mode;
  147. };
  148. pmi8994_charger: qcom,qpnp-smbcharger {
  149. spmi-dev-container;
  150. compatible = "qcom,qpnp-smbcharger";
  151. #address-cells = <1>;
  152. #size-cells = <1>;
  153. qcom,iterm-ma = <100>;
  154. qcom,fastchg-current-ma = <2000>;
  155. qcom,float-voltage-mv = <4350>;
  156. qcom,resume-delta-mv = <200>;
  157. qcom,chg-inhibit-fg;
  158. qcom,dc-psy-type = "Mains";
  159. qcom,dc-psy-ma = <1500>;
  160. qcom,rparasitic-uohm = <100000>;
  161. qcom,bms-psy-name = "bms";
  162. qcom,thermal-mitigation = <1500 700 600 0>;
  163. qcom,parallel-usb-min-current-ma = <1400>;
  164. qcom,parallel-usb-9v-min-current-ma = <900>;
  165. qcom,parallel-allowed-lowering-ma = <500>;
  166. qcom,chgr@1000 {
  167. reg = <0x1000 0x100>;
  168. interrupts = <0x2 0x10 0x0>,
  169. <0x2 0x10 0x1>,
  170. <0x2 0x10 0x2>,
  171. <0x2 0x10 0x3>,
  172. <0x2 0x10 0x4>,
  173. <0x2 0x10 0x5>,
  174. <0x2 0x10 0x6>,
  175. <0x2 0x10 0x7>;
  176. interrupt-names = "chg-error",
  177. "chg-inhibit",
  178. "chg-prechg-sft",
  179. "chg-complete-chg-sft",
  180. "chg-p2f-thr",
  181. "chg-rechg-thr",
  182. "chg-taper-thr",
  183. "chg-tcc-thr";
  184. };
  185. qcom,otg@1100 {
  186. reg = <0x1100 0x100>;
  187. };
  188. qcom,bat-if@1200 {
  189. reg = <0x1200 0x100>;
  190. interrupts = <0x2 0x12 0x0>,
  191. <0x2 0x12 0x1>,
  192. <0x2 0x12 0x2>,
  193. <0x2 0x12 0x3>,
  194. <0x2 0x12 0x4>,
  195. <0x2 0x12 0x5>,
  196. <0x2 0x12 0x6>,
  197. <0x2 0x12 0x7>;
  198. interrupt-names = "batt-hot",
  199. "batt-warm",
  200. "batt-cold",
  201. "batt-cool",
  202. "batt-ov",
  203. "batt-low",
  204. "batt-missing",
  205. "batt-term-missing";
  206. };
  207. qcom,usb-chgpth@1300 {
  208. reg = <0x1300 0x100>;
  209. interrupts = <0x2 0x13 0x0>,
  210. <0x2 0x13 0x1>,
  211. <0x2 0x13 0x2>,
  212. <0x2 0x13 0x3>,
  213. <0x2 0x13 0x4>,
  214. <0x2 0x13 0x5>,
  215. <0x2 0x13 0x6>;
  216. interrupt-names = "usbin-uv",
  217. "usbin-ov",
  218. "usbin-src-det",
  219. "otg-fail",
  220. "otg-oc",
  221. "aicl-done",
  222. "usbid-change";
  223. };
  224. qcom,dc-chgpth@1400 {
  225. reg = <0x1400 0x100>;
  226. interrupts = <0x2 0x14 0x0>,
  227. <0x2 0x14 0x1>;
  228. interrupt-names = "dcin-uv",
  229. "dcin-ov";
  230. };
  231. qcom,chgr-misc@1600 {
  232. reg = <0x1600 0x100>;
  233. interrupts = <0x2 0x16 0x0>,
  234. <0x2 0x16 0x1>,
  235. <0x2 0x16 0x2>,
  236. <0x2 0x16 0x3>,
  237. <0x2 0x16 0x4>,
  238. <0x2 0x16 0x5>;
  239. interrupt-names = "power-ok",
  240. "temp-shutdown",
  241. "safety-timeout",
  242. "flash-fail",
  243. "otst2",
  244. "otst3";
  245. };
  246. };
  247. pmi8994_fg: qcom,fg {
  248. spmi-dev-container;
  249. compatible = "qcom,qpnp-fg";
  250. #address-cells = <1>;
  251. #size-cells = <1>;
  252. qcom,resume-soc = <95>;
  253. status = "okay";
  254. qcom,fg-soc@4000 {
  255. status = "okay";
  256. reg = <0x4000 0x100>;
  257. interrupts = <0x2 0x40 0x0>,
  258. <0x2 0x40 0x1>,
  259. <0x2 0x40 0x2>,
  260. <0x2 0x40 0x3>,
  261. <0x2 0x40 0x4>,
  262. <0x2 0x40 0x5>,
  263. <0x2 0x40 0x6>,
  264. <0x2 0x40 0x7>;
  265. interrupt-names = "high-soc",
  266. "low-soc",
  267. "full-soc",
  268. "empty-soc",
  269. "delta-soc",
  270. "first-est-done",
  271. "sw-fallbk-ocv",
  272. "sw-fallbk-new-battrt-sts",
  273. "fg-soc-irq-count";
  274. };
  275. qcom,fg-batt@4100 {
  276. reg = <0x4100 0x100>;
  277. interrupts = <0x2 0x41 0x0>,
  278. <0x2 0x41 0x1>,
  279. <0x2 0x41 0x2>,
  280. <0x2 0x41 0x3>,
  281. <0x2 0x41 0x4>,
  282. <0x2 0x41 0x5>,
  283. <0x2 0x41 0x6>,
  284. <0x2 0x41 0x7>;
  285. interrupt-names = "soft-cold",
  286. "soft-hot",
  287. "vbatt-low",
  288. "batt-ided",
  289. "batt-id-req",
  290. "batt-unknown",
  291. "batt-missing",
  292. "batt-match";
  293. };
  294. qcom,fg-adc-vbat@4254 {
  295. reg = <0x4254 0x1>;
  296. };
  297. qcom,fg-adc-ibat@4255 {
  298. reg = <0x4255 0x1>;
  299. };
  300. qcom,fg-memif@4400 {
  301. status = "okay";
  302. reg = <0x4400 0x100>;
  303. interrupts = <0x2 0x44 0x0>,
  304. <0x2 0x44 0x1>;
  305. interrupt-names = "mem-avail",
  306. "data-rcvry-sug";
  307. };
  308. };
  309. };
  310. qcom,pmi8994@3 {
  311. spmi-slave-container;
  312. reg = <0x3>;
  313. #address-cells = <1>;
  314. #size-cells = <1>;
  315. pmi8994_pwm_1: pwm@b100 {
  316. compatible = "qcom,qpnp-pwm";
  317. reg = <0xb100 0x100>,
  318. <0xb042 0x7e>;
  319. reg-names = "qpnp-lpg-channel-base", "qpnp-lpg-lut-base";
  320. qcom,channel-id = <0>;
  321. qcom,supported-sizes = <6>, <9>;
  322. qcom,ramp-index = <0>;
  323. #pwm-cells = <2>;
  324. };
  325. pmi8994_pwm_2: pwm@b200 {
  326. compatible = "qcom,qpnp-pwm";
  327. reg = <0xb200 0x100>,
  328. <0xb042 0x7e>;
  329. reg-names = "qpnp-lpg-channel-base", "qpnp-lpg-lut-base";
  330. qcom,channel-id = <1>;
  331. qcom,supported-sizes = <6>, <9>;
  332. qcom,ramp-index = <1>;
  333. #pwm-cells = <2>;
  334. };
  335. pmi8994_pwm_3: pwm@b300 {
  336. compatible = "qcom,qpnp-pwm";
  337. reg = <0xb300 0x100>,
  338. <0xb042 0x7e>;
  339. reg-names = "qpnp-lpg-channel-base", "qpnp-lpg-lut-base";
  340. qcom,channel-id = <2>;
  341. qcom,supported-sizes = <6>, <9>;
  342. qcom,ramp-index = <2>;
  343. #pwm-cells = <2>;
  344. };
  345. pmi8994_pwm_4: pwm@b400 {
  346. compatible = "qcom,qpnp-pwm";
  347. reg = <0xb400 0x100>,
  348. <0xb042 0x7e>;
  349. reg-names = "qpnp-lpg-channel-base", "qpnp-lpg-lut-base";
  350. qcom,channel-id = <3>;
  351. qcom,supported-sizes = <6>, <9>;
  352. qcom,ramp-index = <3>;
  353. #pwm-cells = <2>;
  354. };
  355. qcom,leds@d800 {
  356. compatible = "qcom,qpnp-wled";
  357. reg = <0xd800 0x100>,
  358. <0xd900 0x100>,
  359. <0xdc00 0x100>,
  360. <0xde00 0x100>;
  361. reg-names = "qpnp-wled-ctrl-base",
  362. "qpnp-wled-sink-base",
  363. "qpnp-wled-ibb-base",
  364. "qpnp-wled-lab-base";
  365. interrupts = <0x3 0xd8 0x2>;
  366. interrupt-names = "sc-irq";
  367. status = "okay";
  368. linux,name = "wled";
  369. linux,default-trigger = "bkl-trigger";
  370. qcom,fdbk-output = "auto";
  371. qcom,vref-mv = <350>;
  372. qcom,switch-freq-khz = <800>;
  373. qcom,ovp-mv = <29500>;
  374. qcom,ilim-ma = <980>;
  375. qcom,boost-duty-ns = <26>;
  376. qcom,mod-freq-khz = <9600>;
  377. qcom,dim-mode = "hybrid";
  378. qcom,dim-method = "linear";
  379. qcom,hyb-thres = <625>;
  380. qcom,sync-dly-us = <800>;
  381. qcom,fs-curr-ua = <16000>;
  382. qcom,en-phase-stag;
  383. qcom,ibb-pwrup-dly = <8>;
  384. qcom,led-strings-list = [00 01 02 03];
  385. qcom,en-ext-pfet-sc-pro;
  386. };
  387. pmi8994_haptics: qcom,haptic@c000 {
  388. status = "disabled";
  389. compatible = "qcom,qpnp-haptic";
  390. reg = <0xc000 0x100>;
  391. interrupts = <0x3 0xc0 0x0>,
  392. <0x3 0xc0 0x1>;
  393. interrupt-names = "sc-irq", "play-irq";
  394. qcom,play-mode = "direct";
  395. qcom,wave-play-rate-us = <5263>;
  396. qcom,actuator-type = "lra";
  397. qcom,wave-shape = "square";
  398. qcom,vmax-mv = <2000>;
  399. qcom,ilim-ma = <800>;
  400. qcom,sc-deb-cycles = <8>;
  401. qcom,int-pwm-freq-khz = <505>;
  402. qcom,brake-pattern = [03 03 00 00];
  403. qcom,use-play-irq;
  404. qcom,use-sc-irq;
  405. qcom,wave-samples = [3e 3e 3e 3e 3e 3e 3e 3e];
  406. qcom,wave-rep-cnt = <1>;
  407. qcom,wave-samp-rep-cnt = <1>;
  408. };
  409. qcom,leds@d000 {
  410. compatible = "qcom,leds-qpnp";
  411. reg = <0xd000 0x100>;
  412. label = "rgb";
  413. status = "okay";
  414. qcom,rgb_0 {
  415. label = "rgb";
  416. qcom,id = <3>;
  417. qcom,mode = "pwm";
  418. pwms = <&pmi8994_pwm_3 0 0>;
  419. qcom,pwm-us = <1000>;
  420. qcom,max-current = <12>;
  421. qcom,default-state = "off";
  422. linux,name = "red";
  423. linux,default-trigger =
  424. "battery-charging";
  425. };
  426. qcom,rgb_1 {
  427. label = "rgb";
  428. qcom,id = <4>;
  429. qcom,mode = "pwm";
  430. pwms = <&pmi8994_pwm_2 0 0>;
  431. qcom,pwm-us = <1000>;
  432. qcom,max-current = <12>;
  433. qcom,default-state = "off";
  434. linux,name = "green";
  435. linux,default-trigger = "battery-full";
  436. };
  437. qcom,rgb_2 {
  438. label = "rgb";
  439. qcom,id = <5>;
  440. qcom,mode = "pwm";
  441. pwms = <&pmi8994_pwm_1 0 0>;
  442. qcom,pwm-us = <1000>;
  443. qcom,max-current = <12>;
  444. qcom,default-state = "off";
  445. linux,name = "blue";
  446. };
  447. };
  448. qcom,leds@d300 {
  449. compatible = "qcom,qpnp-flash-led";
  450. status = "okay";
  451. reg = <0xd300 0x100>;
  452. label = "flash";
  453. qcom,headroom = <500>;
  454. qcom,startup-dly = <128>;
  455. qcom,clamp-curr = <200>;
  456. qcom,pmic-charger-support;
  457. qcom,self-check-enabled;
  458. qcom,thermal-derate-enabled;
  459. qcom,thermal-derate-threshold = <100>;
  460. qcom,thermal-derate-rate = "5_PERCENT";
  461. qcom,current-ramp-enabled;
  462. qcom,ramp_up_step = "6P7_US";
  463. qcom,ramp_dn_step = "6P7_US";
  464. qcom,vph-pwr-droop-enabled;
  465. qcom,vph-pwr-droop-threshold = <3000>;
  466. qcom,vph-pwr-droop-debounce-time = <10>;
  467. qcom,headroom-sense-ch0-enabled;
  468. qcom,headroom-sense-ch1-enabled;
  469. qcom,power-detect-enabled;
  470. pmi8994_flash0: qcom,flash_0 {
  471. label = "flash";
  472. qcom,led-name = "led:flash_0";
  473. qcom,default-led-trigger =
  474. "flash0_trigger";
  475. qcom,max-current = <1000>;
  476. qcom,duration = <1280>;
  477. qcom,id = <0>;
  478. qcom,current = <625>;
  479. };
  480. pmi8994_flash1: qcom,flash_1 {
  481. label = "flash";
  482. qcom,led-name = "led:flash_1";
  483. qcom,default-led-trigger =
  484. "flash1_trigger";
  485. qcom,max-current = <1000>;
  486. qcom,duration = <1280>;
  487. qcom,id = <1>;
  488. qcom,current = <625>;
  489. };
  490. pmi8994_torch0: qcom,torch_0 {
  491. label = "torch";
  492. qcom,led-name = "led:torch_0";
  493. qcom,default-led-trigger =
  494. "torch0_trigger";
  495. qcom,max-current = <200>;
  496. qcom,id = <0>;
  497. qcom,current = <120>;
  498. boost-supply = <&pmi8994_boostbypass>;
  499. boost-voltage-max = <3600000>;
  500. };
  501. pmi8994_torch1: qcom,torch_1 {
  502. label = "torch";
  503. qcom,led-name = "led:torch_1";
  504. qcom,default-led-trigger =
  505. "torch1_trigger";
  506. qcom,max-current = <200>;
  507. qcom,id = <1>;
  508. qcom,current = <120>;
  509. boost-supply = <&pmi8994_boostbypass>;
  510. boost-voltage-max = <3600000>;
  511. };
  512. };
  513. };
  514. };