msm8916-wingtech-wt88047.dts 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314
  1. // SPDX-License-Identifier: GPL-2.0-only
  2. // Copyright (C) 2020 Stephan Gerhold
  3. /dts-v1/;
  4. #include "msm8916-pm8916.dtsi"
  5. #include <dt-bindings/gpio/gpio.h>
  6. #include <dt-bindings/input/input.h>
  7. #include <dt-bindings/leds/common.h>
  8. / {
  9. model = "Xiaomi Redmi 2 (Wingtech WT88047)";
  10. compatible = "wingtech,wt88047", "qcom,msm8916";
  11. chassis-type = "handset";
  12. aliases {
  13. serial0 = &blsp1_uart2;
  14. };
  15. chosen {
  16. stdout-path = "serial0";
  17. };
  18. gpio-keys {
  19. compatible = "gpio-keys";
  20. pinctrl-names = "default";
  21. pinctrl-0 = <&gpio_keys_default>;
  22. label = "GPIO Buttons";
  23. button-volume-up {
  24. label = "Volume Up";
  25. gpios = <&msmgpio 107 GPIO_ACTIVE_LOW>;
  26. linux,code = <KEY_VOLUMEUP>;
  27. };
  28. };
  29. usb_id: usb-id {
  30. compatible = "linux,extcon-usb-gpio";
  31. id-gpio = <&msmgpio 110 GPIO_ACTIVE_HIGH>;
  32. pinctrl-names = "default";
  33. pinctrl-0 = <&usb_id_default>;
  34. };
  35. };
  36. &blsp_i2c2 {
  37. status = "okay";
  38. imu@68 {
  39. compatible = "invensense,mpu6880";
  40. reg = <0x68>;
  41. interrupt-parent = <&msmgpio>;
  42. interrupts = <115 IRQ_TYPE_EDGE_RISING>;
  43. vdd-supply = <&pm8916_l17>;
  44. vddio-supply = <&pm8916_l6>;
  45. pinctrl-names = "default";
  46. pinctrl-0 = <&imu_default>;
  47. mount-matrix = "1", "0", "0",
  48. "0", "-1", "0",
  49. "0", "0", "1";
  50. };
  51. };
  52. &blsp_i2c5 {
  53. status = "okay";
  54. touchscreen@38 {
  55. /* Likely some other model but works just fine with this one */
  56. compatible = "edt,edt-ft5506";
  57. reg = <0x38>;
  58. interrupt-parent = <&msmgpio>;
  59. interrupts = <13 IRQ_TYPE_EDGE_FALLING>;
  60. reset-gpios = <&msmgpio 12 GPIO_ACTIVE_LOW>;
  61. vcc-supply = <&pm8916_l17>;
  62. iovcc-supply = <&pm8916_l6>;
  63. touchscreen-size-x = <720>;
  64. touchscreen-size-y = <1280>;
  65. pinctrl-names = "default";
  66. pinctrl-0 = <&touchscreen_default>;
  67. };
  68. };
  69. &blsp_i2c6 {
  70. status = "okay";
  71. led-controller@45 {
  72. compatible = "awinic,aw2013";
  73. reg = <0x45>;
  74. #address-cells = <1>;
  75. #size-cells = <0>;
  76. vcc-supply = <&pm8916_l16>;
  77. led@0 {
  78. reg = <0>;
  79. led-max-microamp = <15000>;
  80. function = LED_FUNCTION_INDICATOR;
  81. color = <LED_COLOR_ID_RED>;
  82. };
  83. led@1 {
  84. reg = <1>;
  85. led-max-microamp = <15000>;
  86. function = LED_FUNCTION_INDICATOR;
  87. color = <LED_COLOR_ID_GREEN>;
  88. };
  89. led@2 {
  90. reg = <2>;
  91. led-max-microamp = <15000>;
  92. function = LED_FUNCTION_INDICATOR;
  93. color = <LED_COLOR_ID_BLUE>;
  94. };
  95. };
  96. };
  97. &blsp1_uart2 {
  98. status = "okay";
  99. };
  100. &pm8916_resin {
  101. status = "okay";
  102. linux,code = <KEY_VOLUMEDOWN>;
  103. };
  104. &pm8916_vib {
  105. status = "okay";
  106. };
  107. &pronto {
  108. status = "okay";
  109. };
  110. &sdhc_1 {
  111. status = "okay";
  112. pinctrl-names = "default", "sleep";
  113. pinctrl-0 = <&sdc1_clk_on &sdc1_cmd_on &sdc1_data_on>;
  114. pinctrl-1 = <&sdc1_clk_off &sdc1_cmd_off &sdc1_data_off>;
  115. };
  116. &sdhc_2 {
  117. status = "okay";
  118. pinctrl-names = "default", "sleep";
  119. pinctrl-0 = <&sdc2_clk_on &sdc2_cmd_on &sdc2_data_on>;
  120. pinctrl-1 = <&sdc2_clk_off &sdc2_cmd_off &sdc2_data_off>;
  121. non-removable;
  122. };
  123. &usb {
  124. status = "okay";
  125. extcon = <&usb_id>, <&usb_id>;
  126. };
  127. &usb_hs_phy {
  128. extcon = <&usb_id>;
  129. };
  130. &smd_rpm_regulators {
  131. vdd_l1_l2_l3-supply = <&pm8916_s3>;
  132. vdd_l4_l5_l6-supply = <&pm8916_s4>;
  133. vdd_l7-supply = <&pm8916_s4>;
  134. s3 {
  135. regulator-min-microvolt = <1200000>;
  136. regulator-max-microvolt = <1300000>;
  137. };
  138. s4 {
  139. regulator-min-microvolt = <1800000>;
  140. regulator-max-microvolt = <2100000>;
  141. };
  142. l1 {
  143. regulator-min-microvolt = <1225000>;
  144. regulator-max-microvolt = <1225000>;
  145. };
  146. l2 {
  147. regulator-min-microvolt = <1200000>;
  148. regulator-max-microvolt = <1200000>;
  149. };
  150. l4 {
  151. regulator-min-microvolt = <2050000>;
  152. regulator-max-microvolt = <2050000>;
  153. };
  154. l5 {
  155. regulator-min-microvolt = <1800000>;
  156. regulator-max-microvolt = <1800000>;
  157. };
  158. l6 {
  159. regulator-min-microvolt = <1800000>;
  160. regulator-max-microvolt = <1800000>;
  161. };
  162. l7 {
  163. regulator-min-microvolt = <1800000>;
  164. regulator-max-microvolt = <1800000>;
  165. };
  166. l8 {
  167. regulator-min-microvolt = <2850000>;
  168. regulator-max-microvolt = <2900000>;
  169. };
  170. l9 {
  171. regulator-min-microvolt = <3300000>;
  172. regulator-max-microvolt = <3300000>;
  173. };
  174. l10 {
  175. regulator-min-microvolt = <2700000>;
  176. regulator-max-microvolt = <2800000>;
  177. };
  178. l11 {
  179. regulator-min-microvolt = <2950000>;
  180. regulator-max-microvolt = <2950000>;
  181. regulator-allow-set-load;
  182. regulator-system-load = <200000>;
  183. };
  184. l12 {
  185. regulator-min-microvolt = <1800000>;
  186. regulator-max-microvolt = <2950000>;
  187. };
  188. l13 {
  189. regulator-min-microvolt = <3075000>;
  190. regulator-max-microvolt = <3075000>;
  191. };
  192. l14 {
  193. regulator-min-microvolt = <1800000>;
  194. regulator-max-microvolt = <3300000>;
  195. };
  196. l15 {
  197. regulator-min-microvolt = <1800000>;
  198. regulator-max-microvolt = <3300000>;
  199. };
  200. l16 {
  201. regulator-min-microvolt = <2800000>;
  202. regulator-max-microvolt = <3300000>;
  203. };
  204. l17 {
  205. regulator-min-microvolt = <2850000>;
  206. regulator-max-microvolt = <2850000>;
  207. };
  208. l18 {
  209. regulator-min-microvolt = <2700000>;
  210. regulator-max-microvolt = <2700000>;
  211. };
  212. };
  213. &msmgpio {
  214. gpio_keys_default: gpio-keys-default {
  215. pins = "gpio107";
  216. function = "gpio";
  217. drive-strength = <2>;
  218. bias-pull-up;
  219. };
  220. imu_default: imu-default {
  221. pins = "gpio115";
  222. function = "gpio";
  223. drive-strength = <2>;
  224. bias-disable;
  225. };
  226. touchscreen_default: touchscreen-default {
  227. pins = "gpio13";
  228. function = "gpio";
  229. drive-strength = <2>;
  230. bias-pull-up;
  231. reset {
  232. pins = "gpio12";
  233. function = "gpio";
  234. drive-strength = <2>;
  235. bias-disable;
  236. };
  237. };
  238. usb_id_default: usb-id-default {
  239. pins = "gpio110";
  240. function = "gpio";
  241. drive-strength = <8>;
  242. bias-pull-up;
  243. };
  244. };