msm8916-samsung-a2015-common.dtsi 8.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482
  1. // SPDX-License-Identifier: GPL-2.0-only
  2. #include "msm8916-pm8916.dtsi"
  3. #include <dt-bindings/gpio/gpio.h>
  4. #include <dt-bindings/input/input.h>
  5. #include <dt-bindings/interrupt-controller/irq.h>
  6. #include <dt-bindings/pinctrl/qcom,pmic-gpio.h>
  7. / {
  8. aliases {
  9. serial0 = &blsp1_uart2;
  10. };
  11. chosen {
  12. stdout-path = "serial0";
  13. };
  14. reserved-memory {
  15. /* Additional memory used by Samsung firmware modifications */
  16. tz-apps@85500000 {
  17. reg = <0x0 0x85500000 0x0 0xb00000>;
  18. no-map;
  19. };
  20. };
  21. gpio-keys {
  22. compatible = "gpio-keys";
  23. pinctrl-names = "default";
  24. pinctrl-0 = <&gpio_keys_default>;
  25. label = "GPIO Buttons";
  26. button-volume-up {
  27. label = "Volume Up";
  28. gpios = <&msmgpio 107 GPIO_ACTIVE_LOW>;
  29. linux,code = <KEY_VOLUMEUP>;
  30. };
  31. button-home {
  32. label = "Home";
  33. gpios = <&msmgpio 109 GPIO_ACTIVE_LOW>;
  34. linux,code = <KEY_HOMEPAGE>;
  35. };
  36. };
  37. gpio-hall-sensor {
  38. compatible = "gpio-keys";
  39. pinctrl-names = "default";
  40. pinctrl-0 = <&gpio_hall_sensor_default>;
  41. label = "GPIO Hall Effect Sensor";
  42. event-hall-sensor {
  43. label = "Hall Effect Sensor";
  44. gpios = <&msmgpio 52 GPIO_ACTIVE_LOW>;
  45. linux,input-type = <EV_SW>;
  46. linux,code = <SW_LID>;
  47. linux,can-disable;
  48. };
  49. };
  50. reg_vdd_tsp_a: regulator-vdd-tsp-a {
  51. compatible = "regulator-fixed";
  52. regulator-name = "vdd_tsp_a";
  53. regulator-min-microvolt = <3300000>;
  54. regulator-max-microvolt = <3300000>;
  55. gpio = <&msmgpio 73 GPIO_ACTIVE_HIGH>;
  56. enable-active-high;
  57. pinctrl-names = "default";
  58. pinctrl-0 = <&tsp_en_default>;
  59. };
  60. i2c-muic {
  61. compatible = "i2c-gpio";
  62. sda-gpios = <&msmgpio 105 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>;
  63. scl-gpios = <&msmgpio 106 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>;
  64. pinctrl-names = "default";
  65. pinctrl-0 = <&muic_i2c_default>;
  66. #address-cells = <1>;
  67. #size-cells = <0>;
  68. muic: extcon@25 {
  69. compatible = "siliconmitus,sm5502-muic";
  70. reg = <0x25>;
  71. interrupt-parent = <&msmgpio>;
  72. interrupts = <12 IRQ_TYPE_EDGE_FALLING>;
  73. pinctrl-names = "default";
  74. pinctrl-0 = <&muic_int_default>;
  75. };
  76. };
  77. i2c-tkey {
  78. compatible = "i2c-gpio";
  79. sda-gpios = <&msmgpio 16 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>;
  80. scl-gpios = <&msmgpio 17 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>;
  81. pinctrl-names = "default";
  82. pinctrl-0 = <&tkey_i2c_default>;
  83. #address-cells = <1>;
  84. #size-cells = <0>;
  85. touchkey: touchkey@20 {
  86. /* Note: Actually an ABOV MCU that implements same interface */
  87. compatible = "coreriver,tc360-touchkey";
  88. reg = <0x20>;
  89. interrupt-parent = <&msmgpio>;
  90. interrupts = <98 IRQ_TYPE_EDGE_FALLING>;
  91. /* vcc/vdd-supply are board-specific */
  92. vddio-supply = <&pm8916_l6>;
  93. linux,keycodes = <KEY_APPSELECT KEY_BACK>;
  94. pinctrl-names = "default";
  95. pinctrl-0 = <&tkey_default>;
  96. };
  97. };
  98. i2c-nfc {
  99. compatible = "i2c-gpio";
  100. sda-gpios = <&msmgpio 0 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>;
  101. scl-gpios = <&msmgpio 1 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>;
  102. pinctrl-names = "default";
  103. pinctrl-0 = <&nfc_i2c_default>;
  104. #address-cells = <1>;
  105. #size-cells = <0>;
  106. nfc@27 {
  107. compatible = "samsung,s3fwrn5-i2c";
  108. reg = <0x27>;
  109. interrupt-parent = <&msmgpio>;
  110. interrupts = <21 IRQ_TYPE_EDGE_RISING>;
  111. en-gpios = <&msmgpio 20 GPIO_ACTIVE_HIGH>;
  112. wake-gpios = <&msmgpio 49 GPIO_ACTIVE_HIGH>;
  113. clocks = <&rpmcc RPM_SMD_BB_CLK2_PIN>;
  114. pinctrl-names = "default";
  115. pinctrl-0 = <&nfc_default &nfc_clk_req>;
  116. };
  117. };
  118. };
  119. &blsp_i2c2 {
  120. status = "okay";
  121. accelerometer: accelerometer@10 {
  122. compatible = "bosch,bmc150_accel";
  123. reg = <0x10>;
  124. interrupt-parent = <&msmgpio>;
  125. interrupts = <115 IRQ_TYPE_EDGE_RISING>;
  126. vdd-supply = <&pm8916_l17>;
  127. vddio-supply = <&pm8916_l5>;
  128. pinctrl-names = "default";
  129. pinctrl-0 = <&accel_int_default>;
  130. };
  131. magnetometer@12 {
  132. compatible = "bosch,bmc150_magn";
  133. reg = <0x12>;
  134. vdd-supply = <&pm8916_l17>;
  135. vddio-supply = <&pm8916_l5>;
  136. };
  137. };
  138. &blsp_i2c4 {
  139. status = "okay";
  140. battery@35 {
  141. compatible = "richtek,rt5033-battery";
  142. reg = <0x35>;
  143. interrupt-parent = <&msmgpio>;
  144. interrupts = <121 IRQ_TYPE_EDGE_BOTH>;
  145. pinctrl-names = "default";
  146. pinctrl-0 = <&fg_alert_default>;
  147. };
  148. };
  149. &blsp1_uart2 {
  150. status = "okay";
  151. };
  152. &dsi0 {
  153. pinctrl-names = "default", "sleep";
  154. pinctrl-0 = <&mdss_default>;
  155. pinctrl-1 = <&mdss_sleep>;
  156. };
  157. &mdss {
  158. status = "okay";
  159. };
  160. &pm8916_resin {
  161. status = "okay";
  162. linux,code = <KEY_VOLUMEDOWN>;
  163. };
  164. &pronto {
  165. status = "okay";
  166. };
  167. &sdhc_1 {
  168. status = "okay";
  169. pinctrl-names = "default", "sleep";
  170. pinctrl-0 = <&sdc1_clk_on &sdc1_cmd_on &sdc1_data_on>;
  171. pinctrl-1 = <&sdc1_clk_off &sdc1_cmd_off &sdc1_data_off>;
  172. };
  173. &sdhc_2 {
  174. status = "okay";
  175. pinctrl-names = "default", "sleep";
  176. pinctrl-0 = <&sdc2_clk_on &sdc2_cmd_on &sdc2_data_on &sdc2_cd_on>;
  177. pinctrl-1 = <&sdc2_clk_off &sdc2_cmd_off &sdc2_data_off &sdc2_cd_off>;
  178. cd-gpios = <&msmgpio 38 GPIO_ACTIVE_LOW>;
  179. };
  180. &usb {
  181. status = "okay";
  182. extcon = <&muic>, <&muic>;
  183. };
  184. &usb_hs_phy {
  185. extcon = <&muic>;
  186. };
  187. &smd_rpm_regulators {
  188. vdd_l1_l2_l3-supply = <&pm8916_s3>;
  189. vdd_l4_l5_l6-supply = <&pm8916_s4>;
  190. vdd_l7-supply = <&pm8916_s4>;
  191. s3 {
  192. regulator-min-microvolt = <1200000>;
  193. regulator-max-microvolt = <1300000>;
  194. };
  195. s4 {
  196. regulator-min-microvolt = <1800000>;
  197. regulator-max-microvolt = <2100000>;
  198. };
  199. l1 {
  200. regulator-min-microvolt = <1225000>;
  201. regulator-max-microvolt = <1225000>;
  202. };
  203. l2 {
  204. regulator-min-microvolt = <1200000>;
  205. regulator-max-microvolt = <1200000>;
  206. };
  207. l4 {
  208. regulator-min-microvolt = <2050000>;
  209. regulator-max-microvolt = <2050000>;
  210. };
  211. l5 {
  212. regulator-min-microvolt = <1800000>;
  213. regulator-max-microvolt = <1800000>;
  214. };
  215. l6 {
  216. regulator-min-microvolt = <1800000>;
  217. regulator-max-microvolt = <1800000>;
  218. };
  219. l7 {
  220. regulator-min-microvolt = <1800000>;
  221. regulator-max-microvolt = <1800000>;
  222. };
  223. l8 {
  224. regulator-min-microvolt = <2850000>;
  225. regulator-max-microvolt = <2900000>;
  226. };
  227. l9 {
  228. regulator-min-microvolt = <3300000>;
  229. regulator-max-microvolt = <3300000>;
  230. };
  231. l10 {
  232. regulator-min-microvolt = <2700000>;
  233. regulator-max-microvolt = <2800000>;
  234. };
  235. l11 {
  236. regulator-min-microvolt = <1800000>;
  237. regulator-max-microvolt = <2950000>;
  238. regulator-allow-set-load;
  239. regulator-system-load = <200000>;
  240. };
  241. l12 {
  242. regulator-min-microvolt = <1800000>;
  243. regulator-max-microvolt = <2950000>;
  244. };
  245. l13 {
  246. regulator-min-microvolt = <3075000>;
  247. regulator-max-microvolt = <3075000>;
  248. };
  249. l14 {
  250. regulator-min-microvolt = <1800000>;
  251. regulator-max-microvolt = <3300000>;
  252. };
  253. l15 {
  254. regulator-min-microvolt = <1800000>;
  255. regulator-max-microvolt = <3300000>;
  256. };
  257. l16 {
  258. regulator-min-microvolt = <1800000>;
  259. regulator-max-microvolt = <3300000>;
  260. };
  261. l17 {
  262. regulator-min-microvolt = <2850000>;
  263. regulator-max-microvolt = <2850000>;
  264. };
  265. l18 {
  266. regulator-min-microvolt = <2700000>;
  267. regulator-max-microvolt = <2700000>;
  268. };
  269. };
  270. &msmgpio {
  271. accel_int_default: accel-int-default {
  272. pins = "gpio115";
  273. function = "gpio";
  274. drive-strength = <2>;
  275. bias-disable;
  276. };
  277. fg_alert_default: fg-alert-default {
  278. pins = "gpio121";
  279. function = "gpio";
  280. drive-strength = <2>;
  281. bias-disable;
  282. };
  283. gpio_keys_default: gpio-keys-default {
  284. pins = "gpio107", "gpio109";
  285. function = "gpio";
  286. drive-strength = <2>;
  287. bias-pull-up;
  288. };
  289. gpio_hall_sensor_default: gpio-hall-sensor-default {
  290. pins = "gpio52";
  291. function = "gpio";
  292. drive-strength = <2>;
  293. bias-disable;
  294. };
  295. mdss {
  296. mdss_default: mdss-default {
  297. pins = "gpio25";
  298. function = "gpio";
  299. drive-strength = <8>;
  300. bias-disable;
  301. };
  302. mdss_sleep: mdss-sleep {
  303. pins = "gpio25";
  304. function = "gpio";
  305. drive-strength = <2>;
  306. bias-pull-down;
  307. };
  308. };
  309. muic_i2c_default: muic-i2c-default {
  310. pins = "gpio105", "gpio106";
  311. function = "gpio";
  312. drive-strength = <2>;
  313. bias-disable;
  314. };
  315. muic_int_default: muic-int-default {
  316. pins = "gpio12";
  317. function = "gpio";
  318. drive-strength = <2>;
  319. bias-disable;
  320. };
  321. nfc_default: nfc-default {
  322. pins = "gpio20", "gpio49";
  323. function = "gpio";
  324. drive-strength = <2>;
  325. bias-disable;
  326. irq {
  327. pins = "gpio21";
  328. function = "gpio";
  329. drive-strength = <2>;
  330. bias-pull-down;
  331. };
  332. };
  333. nfc_i2c_default: nfc-i2c-default {
  334. pins = "gpio0", "gpio1";
  335. function = "gpio";
  336. drive-strength = <2>;
  337. bias-disable;
  338. };
  339. tkey_default: tkey-default {
  340. pins = "gpio98";
  341. function = "gpio";
  342. drive-strength = <2>;
  343. bias-disable;
  344. };
  345. tkey_i2c_default: tkey-i2c-default {
  346. pins = "gpio16", "gpio17";
  347. function = "gpio";
  348. drive-strength = <2>;
  349. bias-disable;
  350. };
  351. tsp_en_default: tsp-en-default {
  352. pins = "gpio73";
  353. function = "gpio";
  354. drive-strength = <2>;
  355. bias-disable;
  356. };
  357. ts_int_default: ts-int-default {
  358. pins = "gpio13";
  359. function = "gpio";
  360. drive-strength = <2>;
  361. bias-disable;
  362. };
  363. };
  364. &pm8916_gpios {
  365. nfc_clk_req: nfc-clk-req-state {
  366. pins = "gpio2";
  367. function = "func1";
  368. input-enable;
  369. bias-disable;
  370. power-source = <PM8916_GPIO_L2>;
  371. };
  372. };