msm8916-samsung-serranove.dts 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544
  1. // SPDX-License-Identifier: GPL-2.0-only
  2. // Copyright (C) 2019 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/interrupt-controller/irq.h>
  8. /*
  9. * NOTE: The original firmware from Samsung can only boot ARM32 kernels.
  10. * Unfortunately, the firmware is signed and cannot be replaced easily.
  11. * There seems to be no way to boot ARM64 kernels on this device at the moment,
  12. * even though the hardware would support it.
  13. *
  14. * However, it is possible to use this device tree by compiling an ARM32 kernel
  15. * instead. For clarity and build testing this device tree is maintained next
  16. * to the other MSM8916 device trees. However, it is actually used through
  17. * arch/arm/boot/dts/qcom-msm8916-samsung-serranove.dts
  18. */
  19. / {
  20. model = "Samsung Galaxy S4 Mini Value Edition";
  21. compatible = "samsung,serranove", "qcom,msm8916";
  22. chassis-type = "handset";
  23. aliases {
  24. serial0 = &blsp1_uart2;
  25. };
  26. chosen {
  27. stdout-path = "serial0";
  28. };
  29. reserved-memory {
  30. /* Additional memory used by Samsung firmware modifications */
  31. tz-apps@85500000 {
  32. reg = <0x0 0x85500000 0x0 0xb00000>;
  33. no-map;
  34. };
  35. };
  36. gpio-keys {
  37. compatible = "gpio-keys";
  38. pinctrl-names = "default";
  39. pinctrl-0 = <&gpio_keys_default>;
  40. label = "GPIO Buttons";
  41. button-volume-up {
  42. label = "Volume Up";
  43. gpios = <&msmgpio 107 GPIO_ACTIVE_LOW>;
  44. linux,code = <KEY_VOLUMEUP>;
  45. };
  46. button-home {
  47. label = "Home";
  48. gpios = <&msmgpio 109 GPIO_ACTIVE_LOW>;
  49. linux,code = <KEY_HOMEPAGE>;
  50. };
  51. };
  52. gpio-hall-sensor {
  53. compatible = "gpio-keys";
  54. pinctrl-names = "default";
  55. pinctrl-0 = <&gpio_hall_sensor_default>;
  56. label = "GPIO Hall Effect Sensor";
  57. event-hall-sensor {
  58. label = "Hall Effect Sensor";
  59. gpios = <&msmgpio 52 GPIO_ACTIVE_LOW>;
  60. linux,input-type = <EV_SW>;
  61. linux,code = <SW_LID>;
  62. linux,can-disable;
  63. };
  64. };
  65. reg_vdd_tsp: regulator-vdd-tsp {
  66. compatible = "regulator-fixed";
  67. regulator-name = "vdd_tsp";
  68. regulator-min-microvolt = <3300000>;
  69. regulator-max-microvolt = <3300000>;
  70. gpio = <&msmgpio 73 GPIO_ACTIVE_HIGH>;
  71. enable-active-high;
  72. pinctrl-names = "default";
  73. pinctrl-0 = <&tsp_en_default>;
  74. };
  75. reg_touch_key: regulator-touch-key {
  76. compatible = "regulator-fixed";
  77. regulator-name = "touch_key";
  78. regulator-min-microvolt = <2800000>;
  79. regulator-max-microvolt = <2800000>;
  80. gpio = <&msmgpio 86 GPIO_ACTIVE_HIGH>;
  81. enable-active-high;
  82. pinctrl-names = "default";
  83. pinctrl-0 = <&tkey_en_default>;
  84. };
  85. reg_key_led: regulator-key-led {
  86. compatible = "regulator-fixed";
  87. regulator-name = "key_led";
  88. regulator-min-microvolt = <3300000>;
  89. regulator-max-microvolt = <3300000>;
  90. gpio = <&msmgpio 60 GPIO_ACTIVE_HIGH>;
  91. enable-active-high;
  92. pinctrl-names = "default";
  93. pinctrl-0 = <&tkey_led_en_default>;
  94. };
  95. i2c-muic {
  96. compatible = "i2c-gpio";
  97. sda-gpios = <&msmgpio 105 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>;
  98. scl-gpios = <&msmgpio 106 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>;
  99. pinctrl-names = "default";
  100. pinctrl-0 = <&muic_i2c_default>;
  101. #address-cells = <1>;
  102. #size-cells = <0>;
  103. muic: extcon@14 {
  104. compatible = "siliconmitus,sm5504-muic";
  105. reg = <0x14>;
  106. interrupt-parent = <&msmgpio>;
  107. interrupts = <12 IRQ_TYPE_EDGE_FALLING>;
  108. pinctrl-names = "default";
  109. pinctrl-0 = <&muic_irq_default>;
  110. };
  111. };
  112. i2c-tkey {
  113. compatible = "i2c-gpio";
  114. sda-gpios = <&msmgpio 16 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>;
  115. scl-gpios = <&msmgpio 17 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>;
  116. pinctrl-names = "default";
  117. pinctrl-0 = <&tkey_i2c_default>;
  118. #address-cells = <1>;
  119. #size-cells = <0>;
  120. touchkey@20 {
  121. compatible = "coreriver,tc360-touchkey";
  122. reg = <0x20>;
  123. interrupt-parent = <&msmgpio>;
  124. interrupts = <98 IRQ_TYPE_EDGE_FALLING>;
  125. vcc-supply = <&reg_touch_key>;
  126. vdd-supply = <&reg_key_led>;
  127. vddio-supply = <&pm8916_l6>;
  128. linux,keycodes = <KEY_APPSELECT KEY_BACK>;
  129. pinctrl-names = "default";
  130. pinctrl-0 = <&tkey_default>;
  131. };
  132. };
  133. i2c-nfc {
  134. compatible = "i2c-gpio";
  135. sda-gpios = <&msmgpio 0 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>;
  136. scl-gpios = <&msmgpio 1 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>;
  137. pinctrl-names = "default";
  138. pinctrl-0 = <&nfc_i2c_default>;
  139. #address-cells = <1>;
  140. #size-cells = <0>;
  141. nfc@2b {
  142. compatible = "nxp,pn547", "nxp,nxp-nci-i2c";
  143. reg = <0x2b>;
  144. interrupt-parent = <&msmgpio>;
  145. interrupts = <21 IRQ_TYPE_EDGE_RISING>;
  146. enable-gpios = <&msmgpio 20 GPIO_ACTIVE_HIGH>;
  147. firmware-gpios = <&msmgpio 49 GPIO_ACTIVE_HIGH>;
  148. pinctrl-names = "default";
  149. pinctrl-0 = <&nfc_default>;
  150. };
  151. };
  152. };
  153. &blsp_i2c2 {
  154. status = "okay";
  155. imu@6b {
  156. compatible = "st,lsm6ds3";
  157. reg = <0x6b>;
  158. interrupt-parent = <&msmgpio>;
  159. interrupts = <115 IRQ_TYPE_EDGE_RISING>;
  160. pinctrl-names = "default";
  161. pinctrl-0 = <&imu_irq_default>;
  162. };
  163. magnetometer@2e {
  164. compatible = "yamaha,yas537";
  165. reg = <0x2e>;
  166. mount-matrix = "0", "1", "0",
  167. "1", "0", "0",
  168. "0", "0", "-1";
  169. };
  170. };
  171. &blsp_i2c4 {
  172. status = "okay";
  173. battery@35 {
  174. compatible = "richtek,rt5033-battery";
  175. reg = <0x35>;
  176. interrupt-parent = <&msmgpio>;
  177. interrupts = <121 IRQ_TYPE_EDGE_FALLING>;
  178. pinctrl-names = "default";
  179. pinctrl-0 = <&fg_alert_default>;
  180. };
  181. };
  182. &blsp_i2c5 {
  183. status = "okay";
  184. touchscreen@20 {
  185. compatible = "zinitix,bt541";
  186. reg = <0x20>;
  187. interrupt-parent = <&msmgpio>;
  188. interrupts = <13 IRQ_TYPE_EDGE_FALLING>;
  189. touchscreen-size-x = <540>;
  190. touchscreen-size-y = <960>;
  191. vdd-supply = <&reg_vdd_tsp>;
  192. vddo-supply = <&pm8916_l6>;
  193. pinctrl-names = "default";
  194. pinctrl-0 = <&tsp_irq_default>;
  195. };
  196. };
  197. &blsp1_uart2 {
  198. status = "okay";
  199. };
  200. &pm8916_resin {
  201. status = "okay";
  202. linux,code = <KEY_VOLUMEDOWN>;
  203. };
  204. &pm8916_vib {
  205. status = "okay";
  206. };
  207. &pronto {
  208. status = "okay";
  209. iris {
  210. compatible = "qcom,wcn3660b";
  211. };
  212. };
  213. &sdhc_1 {
  214. status = "okay";
  215. pinctrl-names = "default", "sleep";
  216. pinctrl-0 = <&sdc1_clk_on &sdc1_cmd_on &sdc1_data_on>;
  217. pinctrl-1 = <&sdc1_clk_off &sdc1_cmd_off &sdc1_data_off>;
  218. };
  219. &sdhc_2 {
  220. status = "okay";
  221. pinctrl-names = "default", "sleep";
  222. pinctrl-0 = <&sdc2_clk_on &sdc2_cmd_on &sdc2_data_on>;
  223. pinctrl-1 = <&sdc2_clk_off &sdc2_cmd_off &sdc2_data_off>;
  224. non-removable;
  225. /*
  226. * FIXME: Disable UHS-I modes since tuning fails with:
  227. *
  228. * sdhci_msm 7864900.sdhci: mmc1: No tuning point found
  229. * mmc1: tuning execution failed: -5
  230. * mmc1: error -5 whilst initialising SD card
  231. *
  232. * This is the quirk used on downstream, which suggests this is
  233. * a hardware limitation. However, probing a card using DDR50 works
  234. * (without tuning), so maybe only tuning is broken?
  235. */
  236. no-1-8-v;
  237. };
  238. &usb {
  239. status = "okay";
  240. extcon = <&muic>, <&muic>;
  241. };
  242. &usb_hs_phy {
  243. extcon = <&muic>;
  244. };
  245. &smd_rpm_regulators {
  246. vdd_l1_l2_l3-supply = <&pm8916_s3>;
  247. vdd_l4_l5_l6-supply = <&pm8916_s4>;
  248. vdd_l7-supply = <&pm8916_s4>;
  249. s3 {
  250. regulator-min-microvolt = <1200000>;
  251. regulator-max-microvolt = <1300000>;
  252. };
  253. s4 {
  254. regulator-min-microvolt = <1800000>;
  255. regulator-max-microvolt = <2100000>;
  256. };
  257. l1 {
  258. regulator-min-microvolt = <1225000>;
  259. regulator-max-microvolt = <1225000>;
  260. };
  261. l2 {
  262. regulator-min-microvolt = <1200000>;
  263. regulator-max-microvolt = <1200000>;
  264. };
  265. l4 {
  266. regulator-min-microvolt = <2050000>;
  267. regulator-max-microvolt = <2050000>;
  268. };
  269. l5 {
  270. regulator-min-microvolt = <1800000>;
  271. regulator-max-microvolt = <1800000>;
  272. };
  273. l6 {
  274. regulator-min-microvolt = <1800000>;
  275. regulator-max-microvolt = <1800000>;
  276. };
  277. l7 {
  278. regulator-min-microvolt = <1800000>;
  279. regulator-max-microvolt = <1800000>;
  280. };
  281. l8 {
  282. regulator-min-microvolt = <2850000>;
  283. regulator-max-microvolt = <2900000>;
  284. };
  285. l9 {
  286. regulator-min-microvolt = <3300000>;
  287. regulator-max-microvolt = <3300000>;
  288. };
  289. l10 {
  290. regulator-min-microvolt = <2700000>;
  291. regulator-max-microvolt = <2800000>;
  292. };
  293. l11 {
  294. regulator-min-microvolt = <1800000>;
  295. regulator-max-microvolt = <2950000>;
  296. regulator-allow-set-load;
  297. regulator-system-load = <200000>;
  298. };
  299. l12 {
  300. regulator-min-microvolt = <1800000>;
  301. regulator-max-microvolt = <2950000>;
  302. };
  303. l13 {
  304. regulator-min-microvolt = <3075000>;
  305. regulator-max-microvolt = <3075000>;
  306. };
  307. l14 {
  308. regulator-min-microvolt = <1800000>;
  309. regulator-max-microvolt = <3300000>;
  310. };
  311. l15 {
  312. regulator-min-microvolt = <1800000>;
  313. regulator-max-microvolt = <3300000>;
  314. };
  315. l16 {
  316. regulator-min-microvolt = <1800000>;
  317. regulator-max-microvolt = <3300000>;
  318. };
  319. l17 {
  320. regulator-min-microvolt = <2850000>;
  321. regulator-max-microvolt = <2850000>;
  322. };
  323. l18 {
  324. regulator-min-microvolt = <2700000>;
  325. regulator-max-microvolt = <2700000>;
  326. };
  327. };
  328. &msmgpio {
  329. fg_alert_default: fg-alert-default {
  330. pins = "gpio121";
  331. function = "gpio";
  332. drive-strength = <2>;
  333. bias-disable;
  334. };
  335. gpio_keys_default: gpio-keys-default {
  336. pins = "gpio107", "gpio109";
  337. function = "gpio";
  338. drive-strength = <2>;
  339. bias-pull-up;
  340. };
  341. gpio_hall_sensor_default: gpio-hall-sensor-default {
  342. pins = "gpio52";
  343. function = "gpio";
  344. drive-strength = <2>;
  345. bias-disable;
  346. };
  347. imu_irq_default: imu-irq-default {
  348. pins = "gpio115";
  349. function = "gpio";
  350. drive-strength = <2>;
  351. bias-disable;
  352. };
  353. muic_i2c_default: muic-i2c-default {
  354. pins = "gpio105", "gpio106";
  355. function = "gpio";
  356. drive-strength = <2>;
  357. bias-disable;
  358. };
  359. muic_irq_default: muic-irq-default {
  360. pins = "gpio12";
  361. function = "gpio";
  362. drive-strength = <2>;
  363. bias-disable;
  364. };
  365. nfc_default: nfc-default {
  366. pins = "gpio20", "gpio49";
  367. function = "gpio";
  368. drive-strength = <2>;
  369. bias-disable;
  370. irq {
  371. pins = "gpio21";
  372. function = "gpio";
  373. drive-strength = <2>;
  374. bias-pull-down;
  375. };
  376. };
  377. nfc_i2c_default: nfc-i2c-default {
  378. pins = "gpio0", "gpio1";
  379. function = "gpio";
  380. drive-strength = <2>;
  381. bias-disable;
  382. };
  383. tkey_default: tkey-default {
  384. pins = "gpio98";
  385. function = "gpio";
  386. drive-strength = <2>;
  387. bias-disable;
  388. };
  389. tkey_en_default: tkey-en-default {
  390. pins = "gpio86";
  391. function = "gpio";
  392. drive-strength = <2>;
  393. bias-disable;
  394. };
  395. tkey_i2c_default: tkey-i2c-default {
  396. pins = "gpio16", "gpio17";
  397. function = "gpio";
  398. drive-strength = <2>;
  399. bias-disable;
  400. };
  401. tkey_led_en_default: tkey-led-en-default {
  402. pins = "gpio60";
  403. function = "gpio";
  404. drive-strength = <2>;
  405. bias-disable;
  406. };
  407. tsp_en_default: tsp-en-default {
  408. pins = "gpio73";
  409. function = "gpio";
  410. drive-strength = <2>;
  411. bias-disable;
  412. };
  413. tsp_irq_default: tsp-irq-default {
  414. pins = "gpio13";
  415. function = "gpio";
  416. drive-strength = <2>;
  417. bias-disable;
  418. };
  419. };