msm8916-longcheer-l8150.dts 7.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433
  1. // SPDX-License-Identifier: GPL-2.0-only
  2. /dts-v1/;
  3. #include "msm8916-pm8916.dtsi"
  4. #include <dt-bindings/gpio/gpio.h>
  5. #include <dt-bindings/input/input.h>
  6. #include <dt-bindings/interrupt-controller/irq.h>
  7. #include <dt-bindings/leds/common.h>
  8. / {
  9. model = "Longcheer L8150";
  10. compatible = "longcheer,l8150", "qcom,msm8916-v1-qrd/9-v1", "qcom,msm8916";
  11. chassis-type = "handset";
  12. aliases {
  13. serial0 = &blsp1_uart2;
  14. };
  15. chosen {
  16. stdout-path = "serial0";
  17. };
  18. reserved-memory {
  19. // wcnss.mdt is not relocatable, so it must be loaded at 0x8b600000
  20. /delete-node/ wcnss@89300000;
  21. wcnss_mem: wcnss@8b600000 {
  22. reg = <0x0 0x8b600000 0x0 0x600000>;
  23. no-map;
  24. };
  25. };
  26. gpio-keys {
  27. compatible = "gpio-keys";
  28. pinctrl-names = "default";
  29. pinctrl-0 = <&gpio_keys_default>;
  30. label = "GPIO Buttons";
  31. button-volume-up {
  32. label = "Volume Up";
  33. gpios = <&msmgpio 107 GPIO_ACTIVE_LOW>;
  34. linux,code = <KEY_VOLUMEUP>;
  35. };
  36. };
  37. reg_ctp: regulator-ctp {
  38. compatible = "regulator-fixed";
  39. regulator-name = "ctp";
  40. regulator-min-microvolt = <2800000>;
  41. regulator-max-microvolt = <2800000>;
  42. gpio = <&msmgpio 17 GPIO_ACTIVE_HIGH>;
  43. enable-active-high;
  44. pinctrl-names = "default";
  45. pinctrl-0 = <&ctp_pwr_en_default>;
  46. };
  47. flash-led-controller {
  48. compatible = "sgmicro,sgm3140";
  49. flash-gpios = <&msmgpio 31 GPIO_ACTIVE_HIGH>;
  50. enable-gpios = <&msmgpio 32 GPIO_ACTIVE_HIGH>;
  51. pinctrl-names = "default";
  52. pinctrl-0 = <&camera_flash_default>;
  53. flash_led: led {
  54. function = LED_FUNCTION_FLASH;
  55. color = <LED_COLOR_ID_WHITE>;
  56. flash-max-timeout-us = <250000>;
  57. };
  58. };
  59. };
  60. &blsp_i2c1 {
  61. status = "okay";
  62. led-controller@45 {
  63. compatible = "awinic,aw2013";
  64. reg = <0x45>;
  65. #address-cells = <1>;
  66. #size-cells = <0>;
  67. vcc-supply = <&pm8916_l17>;
  68. led@0 {
  69. reg = <0>;
  70. led-max-microamp = <5000>;
  71. function = LED_FUNCTION_INDICATOR;
  72. color = <LED_COLOR_ID_RED>;
  73. };
  74. led@1 {
  75. reg = <1>;
  76. led-max-microamp = <5000>;
  77. function = LED_FUNCTION_INDICATOR;
  78. color = <LED_COLOR_ID_GREEN>;
  79. };
  80. led@2 {
  81. reg = <2>;
  82. led-max-microamp = <5000>;
  83. function = LED_FUNCTION_INDICATOR;
  84. color = <LED_COLOR_ID_BLUE>;
  85. };
  86. };
  87. };
  88. &blsp_i2c2 {
  89. status = "okay";
  90. accelerometer@10 {
  91. compatible = "bosch,bmc156_accel";
  92. reg = <0x10>;
  93. /*
  94. * For some reason the interrupt line is usually not connected
  95. * to the BMC156. However, there are two pads next to the chip
  96. * that can be shorted to make it work if needed.
  97. *
  98. * interrupt-parent = <&msmgpio>;
  99. * interrupts = <116 IRQ_TYPE_EDGE_RISING>;
  100. */
  101. pinctrl-names = "default";
  102. pinctrl-0 = <&accel_int_default>;
  103. vdd-supply = <&pm8916_l17>;
  104. vddio-supply = <&pm8916_l6>;
  105. mount-matrix = "0", "1", "0",
  106. "-1", "0", "0",
  107. "0", "0", "1";
  108. };
  109. magnetometer@12 {
  110. compatible = "bosch,bmc156_magn";
  111. reg = <0x12>;
  112. interrupt-parent = <&msmgpio>;
  113. interrupts = <113 IRQ_TYPE_EDGE_RISING>;
  114. pinctrl-names = "default";
  115. pinctrl-0 = <&magn_int_default>;
  116. vdd-supply = <&pm8916_l17>;
  117. vddio-supply = <&pm8916_l6>;
  118. };
  119. light-sensor@23 {
  120. compatible = "liteon,ltr559";
  121. reg = <0x23>;
  122. proximity-near-level = <75>;
  123. interrupt-parent = <&msmgpio>;
  124. interrupts = <115 IRQ_TYPE_EDGE_FALLING>;
  125. pinctrl-names = "default";
  126. pinctrl-0 = <&light_int_default>;
  127. vdd-supply = <&pm8916_l17>;
  128. vddio-supply = <&pm8916_l6>;
  129. };
  130. gyroscope@68 {
  131. compatible = "bosch,bmg160";
  132. reg = <0x68>;
  133. interrupt-parent = <&msmgpio>;
  134. interrupts = <23 IRQ_TYPE_EDGE_RISING>,
  135. <22 IRQ_TYPE_EDGE_RISING>;
  136. pinctrl-names = "default";
  137. pinctrl-0 = <&gyro_int_default>;
  138. vdd-supply = <&pm8916_l17>;
  139. vddio-supply = <&pm8916_l6>;
  140. };
  141. };
  142. &blsp_i2c5 {
  143. status = "okay";
  144. rmi4@20 {
  145. compatible = "syna,rmi4-i2c";
  146. reg = <0x20>;
  147. #address-cells = <1>;
  148. #size-cells = <0>;
  149. interrupt-parent = <&msmgpio>;
  150. interrupts = <13 IRQ_TYPE_EDGE_FALLING>;
  151. vdd-supply = <&reg_ctp>;
  152. vio-supply = <&pm8916_l6>;
  153. pinctrl-names = "default";
  154. pinctrl-0 = <&tp_int_default>;
  155. syna,startup-delay-ms = <10>;
  156. rmi4-f01@1 {
  157. reg = <0x1>;
  158. syna,nosleep-mode = <1>; // Allow sleeping
  159. };
  160. rmi4-f12@12 {
  161. reg = <0x12>;
  162. syna,sensor-type = <1>; // Touchscreen
  163. };
  164. };
  165. };
  166. &blsp1_uart2 {
  167. status = "okay";
  168. };
  169. &pm8916_resin {
  170. status = "okay";
  171. linux,code = <KEY_VOLUMEDOWN>;
  172. };
  173. &pm8916_usbin {
  174. status = "okay";
  175. };
  176. &pm8916_vib {
  177. status = "okay";
  178. };
  179. &pronto {
  180. status = "okay";
  181. };
  182. &sdhc_1 {
  183. status = "okay";
  184. pinctrl-names = "default", "sleep";
  185. pinctrl-0 = <&sdc1_clk_on &sdc1_cmd_on &sdc1_data_on>;
  186. pinctrl-1 = <&sdc1_clk_off &sdc1_cmd_off &sdc1_data_off>;
  187. };
  188. &sdhc_2 {
  189. status = "okay";
  190. pinctrl-names = "default", "sleep";
  191. pinctrl-0 = <&sdc2_clk_on &sdc2_cmd_on &sdc2_data_on>;
  192. pinctrl-1 = <&sdc2_clk_off &sdc2_cmd_off &sdc2_data_off>;
  193. non-removable;
  194. };
  195. &usb {
  196. status = "okay";
  197. dr_mode = "peripheral";
  198. extcon = <&pm8916_usbin>;
  199. };
  200. &usb_hs_phy {
  201. extcon = <&pm8916_usbin>;
  202. };
  203. &smd_rpm_regulators {
  204. vdd_l1_l2_l3-supply = <&pm8916_s3>;
  205. vdd_l4_l5_l6-supply = <&pm8916_s4>;
  206. vdd_l7-supply = <&pm8916_s4>;
  207. s3 {
  208. regulator-min-microvolt = <1200000>;
  209. regulator-max-microvolt = <1300000>;
  210. };
  211. s4 {
  212. regulator-min-microvolt = <1800000>;
  213. regulator-max-microvolt = <2100000>;
  214. };
  215. l1 {
  216. regulator-min-microvolt = <1225000>;
  217. regulator-max-microvolt = <1225000>;
  218. };
  219. l2 {
  220. regulator-min-microvolt = <1200000>;
  221. regulator-max-microvolt = <1200000>;
  222. };
  223. l4 {
  224. regulator-min-microvolt = <2050000>;
  225. regulator-max-microvolt = <2050000>;
  226. };
  227. l5 {
  228. regulator-min-microvolt = <1800000>;
  229. regulator-max-microvolt = <1800000>;
  230. };
  231. l6 {
  232. regulator-min-microvolt = <1800000>;
  233. regulator-max-microvolt = <1800000>;
  234. };
  235. l7 {
  236. regulator-min-microvolt = <1800000>;
  237. regulator-max-microvolt = <1800000>;
  238. };
  239. l8 {
  240. regulator-min-microvolt = <2850000>;
  241. regulator-max-microvolt = <2900000>;
  242. };
  243. l9 {
  244. regulator-min-microvolt = <3300000>;
  245. regulator-max-microvolt = <3300000>;
  246. };
  247. l10 {
  248. regulator-min-microvolt = <2700000>;
  249. regulator-max-microvolt = <2800000>;
  250. };
  251. l11 {
  252. regulator-min-microvolt = <1800000>;
  253. regulator-max-microvolt = <2950000>;
  254. regulator-allow-set-load;
  255. regulator-system-load = <200000>;
  256. };
  257. l12 {
  258. regulator-min-microvolt = <1800000>;
  259. regulator-max-microvolt = <2950000>;
  260. };
  261. l13 {
  262. regulator-min-microvolt = <3075000>;
  263. regulator-max-microvolt = <3075000>;
  264. };
  265. l14 {
  266. regulator-min-microvolt = <1800000>;
  267. regulator-max-microvolt = <3300000>;
  268. };
  269. l15 {
  270. regulator-min-microvolt = <1800000>;
  271. regulator-max-microvolt = <3300000>;
  272. };
  273. l16 {
  274. regulator-min-microvolt = <1800000>;
  275. regulator-max-microvolt = <3300000>;
  276. };
  277. l17 {
  278. regulator-min-microvolt = <2850000>;
  279. regulator-max-microvolt = <2850000>;
  280. };
  281. l18 {
  282. regulator-min-microvolt = <2700000>;
  283. regulator-max-microvolt = <2700000>;
  284. };
  285. };
  286. &msmgpio {
  287. accel_int_default: accel-int-default {
  288. pins = "gpio116";
  289. function = "gpio";
  290. drive-strength = <2>;
  291. bias-disable;
  292. };
  293. camera_flash_default: camera-flash-default {
  294. pins = "gpio31", "gpio32";
  295. function = "gpio";
  296. drive-strength = <2>;
  297. bias-disable;
  298. };
  299. ctp_pwr_en_default: ctp-pwr-en-default {
  300. pins = "gpio17";
  301. function = "gpio";
  302. drive-strength = <2>;
  303. bias-disable;
  304. };
  305. gpio_keys_default: gpio-keys-default {
  306. pins = "gpio107";
  307. function = "gpio";
  308. drive-strength = <2>;
  309. bias-pull-up;
  310. };
  311. gyro_int_default: gyro-int-default {
  312. pins = "gpio22", "gpio23";
  313. function = "gpio";
  314. drive-strength = <2>;
  315. bias-disable;
  316. };
  317. light_int_default: light-int-default {
  318. pins = "gpio115";
  319. function = "gpio";
  320. drive-strength = <2>;
  321. bias-disable;
  322. };
  323. magn_int_default: magn-int-default {
  324. pins = "gpio113";
  325. function = "gpio";
  326. drive-strength = <2>;
  327. bias-disable;
  328. };
  329. tp_int_default: tp-int-default {
  330. pins = "gpio13";
  331. function = "gpio";
  332. drive-strength = <2>;
  333. bias-disable;
  334. };
  335. };