sc8280xp-lenovo-thinkpad-x13s.dts 7.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408
  1. // SPDX-License-Identifier: BSD-3-Clause
  2. /*
  3. * Copyright (c) 2021, The Linux Foundation. All rights reserved.
  4. * Copyright (c) 2022, Linaro Limited
  5. */
  6. /dts-v1/;
  7. #include <dt-bindings/gpio/gpio.h>
  8. #include <dt-bindings/regulator/qcom,rpmh-regulator.h>
  9. #include "sc8280xp.dtsi"
  10. #include "sc8280xp-pmics.dtsi"
  11. / {
  12. model = "Lenovo ThinkPad X13s";
  13. compatible = "lenovo,thinkpad-x13s", "qcom,sc8280xp";
  14. backlight {
  15. compatible = "pwm-backlight";
  16. pwms = <&pmc8280c_lpg 3 1000000>;
  17. enable-gpios = <&pmc8280_1_gpios 8 GPIO_ACTIVE_HIGH>;
  18. power-supply = <&vreg_edp_bl>;
  19. pinctrl-names = "default";
  20. pinctrl-0 = <&edp_bl_en>, <&edp_bl_pwm>;
  21. };
  22. vreg_edp_bl: regulator-edp-bl {
  23. compatible = "regulator-fixed";
  24. regulator-name = "VBL9";
  25. regulator-min-microvolt = <3600000>;
  26. regulator-max-microvolt = <3600000>;
  27. gpio = <&pmc8280_1_gpios 9 GPIO_ACTIVE_HIGH>;
  28. enable-active-high;
  29. pinctrl-names = "default";
  30. pinctrl-0 = <&edp_bl_reg_en>;
  31. regulator-boot-on;
  32. };
  33. vreg_misc_3p3: regulator-misc-3p3 {
  34. compatible = "regulator-fixed";
  35. regulator-name = "VCC3B";
  36. regulator-min-microvolt = <3300000>;
  37. regulator-max-microvolt = <3300000>;
  38. gpio = <&pmc8280_1_gpios 1 GPIO_ACTIVE_HIGH>;
  39. enable-active-high;
  40. pinctrl-names = "default";
  41. pinctrl-0 = <&misc_3p3_reg_en>;
  42. regulator-boot-on;
  43. regulator-always-on;
  44. };
  45. };
  46. &apps_rsc {
  47. pmc8280-1-rpmh-regulators {
  48. compatible = "qcom,pm8350-rpmh-regulators";
  49. qcom,pmic-id = "b";
  50. vdd-l3-l5-supply = <&vreg_s11b>;
  51. vreg_s11b: smps11 {
  52. regulator-name = "vreg_s11b";
  53. regulator-min-microvolt = <1272000>;
  54. regulator-max-microvolt = <1272000>;
  55. regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
  56. };
  57. vreg_l3b: ldo3 {
  58. regulator-name = "vreg_l3b";
  59. regulator-min-microvolt = <1200000>;
  60. regulator-max-microvolt = <1200000>;
  61. regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
  62. regulator-boot-on;
  63. };
  64. vreg_l4b: ldo4 {
  65. regulator-name = "vreg_l4b";
  66. regulator-min-microvolt = <912000>;
  67. regulator-max-microvolt = <912000>;
  68. regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
  69. };
  70. vreg_l6b: ldo6 {
  71. regulator-name = "vreg_l6b";
  72. regulator-min-microvolt = <880000>;
  73. regulator-max-microvolt = <880000>;
  74. regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
  75. regulator-boot-on;
  76. regulator-always-on; // FIXME: VDD_A_EDP_0_0P9
  77. };
  78. };
  79. pmc8280c-rpmh-regulators {
  80. compatible = "qcom,pm8350c-rpmh-regulators";
  81. qcom,pmic-id = "c";
  82. vreg_l1c: ldo1 {
  83. regulator-name = "vreg_l1c";
  84. regulator-min-microvolt = <1800000>;
  85. regulator-max-microvolt = <1800000>;
  86. regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
  87. };
  88. vreg_l12c: ldo12 {
  89. regulator-name = "vreg_l12c";
  90. regulator-min-microvolt = <1800000>;
  91. regulator-max-microvolt = <1800000>;
  92. regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
  93. };
  94. vreg_l13c: ldo13 {
  95. regulator-name = "vreg_l13c";
  96. regulator-min-microvolt = <3072000>;
  97. regulator-max-microvolt = <3072000>;
  98. regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
  99. };
  100. };
  101. pmc8280-2-rpmh-regulators {
  102. compatible = "qcom,pm8350-rpmh-regulators";
  103. qcom,pmic-id = "d";
  104. vdd-l1-l4-supply = <&vreg_s11b>;
  105. vreg_l3d: ldo3 {
  106. regulator-name = "vreg_l3d";
  107. regulator-min-microvolt = <1200000>;
  108. regulator-max-microvolt = <1200000>;
  109. regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
  110. };
  111. vreg_l4d: ldo4 {
  112. regulator-name = "vreg_l4d";
  113. regulator-min-microvolt = <1200000>;
  114. regulator-max-microvolt = <1200000>;
  115. regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
  116. };
  117. vreg_l7d: ldo7 {
  118. regulator-name = "vreg_l7d";
  119. regulator-min-microvolt = <3072000>;
  120. regulator-max-microvolt = <3072000>;
  121. regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
  122. };
  123. vreg_l9d: ldo9 {
  124. regulator-name = "vreg_l9d";
  125. regulator-min-microvolt = <912000>;
  126. regulator-max-microvolt = <912000>;
  127. regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
  128. };
  129. };
  130. };
  131. &pmc8280c_lpg {
  132. status = "okay";
  133. };
  134. &pmk8280_pon_pwrkey {
  135. status = "okay";
  136. };
  137. &qup0 {
  138. status = "okay";
  139. };
  140. &qup0_i2c4 {
  141. clock-frequency = <400000>;
  142. pinctrl-names = "default";
  143. pinctrl-0 = <&qup0_i2c4_default>;
  144. status = "okay";
  145. /* FIXME: verify */
  146. touchscreen@10 {
  147. compatible = "hid-over-i2c";
  148. reg = <0x10>;
  149. hid-descr-addr = <0x1>;
  150. interrupts-extended = <&tlmm 175 IRQ_TYPE_LEVEL_LOW>;
  151. vdd-supply = <&vreg_misc_3p3>;
  152. pinctrl-names = "default";
  153. pinctrl-0 = <&ts0_default>;
  154. };
  155. };
  156. &qup1 {
  157. status = "okay";
  158. };
  159. &qup2 {
  160. status = "okay";
  161. };
  162. &qup2_i2c5 {
  163. clock-frequency = <400000>;
  164. pinctrl-names = "default";
  165. pinctrl-0 = <&qup2_i2c5_default>;
  166. status = "okay";
  167. touchpad@15 {
  168. compatible = "hid-over-i2c";
  169. reg = <0x15>;
  170. hid-descr-addr = <0x1>;
  171. interrupts-extended = <&tlmm 182 IRQ_TYPE_LEVEL_LOW>;
  172. vdd-supply = <&vreg_misc_3p3>;
  173. pinctrl-names = "default";
  174. pinctrl-0 = <&tpad_default>;
  175. wakeup-source;
  176. status = "disabled";
  177. };
  178. touchpad@2c {
  179. compatible = "hid-over-i2c";
  180. reg = <0x2c>;
  181. hid-descr-addr = <0x20>;
  182. interrupts-extended = <&tlmm 182 IRQ_TYPE_LEVEL_LOW>;
  183. vdd-supply = <&vreg_misc_3p3>;
  184. pinctrl-names = "default";
  185. pinctrl-0 = <&tpad_default>;
  186. wakeup-source;
  187. };
  188. keyboard@68 {
  189. compatible = "hid-over-i2c";
  190. reg = <0x68>;
  191. hid-descr-addr = <0x1>;
  192. interrupts-extended = <&tlmm 104 IRQ_TYPE_LEVEL_LOW>;
  193. vdd-supply = <&vreg_misc_3p3>;
  194. pinctrl-names = "default";
  195. pinctrl-0 = <&kybd_default>;
  196. wakeup-source;
  197. };
  198. };
  199. &remoteproc_adsp {
  200. firmware-name = "qcom/sc8280xp/LENOVO/21BX/qcadsp8280.mbn";
  201. status = "okay";
  202. };
  203. &remoteproc_nsp0 {
  204. firmware-name = "qcom/sc8280xp/LENOVO/21BX/qccdsp8280.mbn";
  205. status = "okay";
  206. };
  207. &usb_0 {
  208. status = "okay";
  209. };
  210. &usb_0_dwc3 {
  211. /* TODO: Define USB-C connector properly */
  212. dr_mode = "host";
  213. };
  214. &usb_0_hsphy {
  215. vdda-pll-supply = <&vreg_l9d>;
  216. vdda18-supply = <&vreg_l1c>;
  217. vdda33-supply = <&vreg_l7d>;
  218. status = "okay";
  219. };
  220. &usb_0_qmpphy {
  221. vdda-phy-supply = <&vreg_l9d>;
  222. vdda-pll-supply = <&vreg_l4d>;
  223. status = "okay";
  224. };
  225. &usb_1 {
  226. status = "okay";
  227. };
  228. &usb_1_dwc3 {
  229. /* TODO: Define USB-C connector properly */
  230. dr_mode = "host";
  231. };
  232. &usb_1_hsphy {
  233. vdda-pll-supply = <&vreg_l4b>;
  234. vdda18-supply = <&vreg_l1c>;
  235. vdda33-supply = <&vreg_l13c>;
  236. status = "okay";
  237. };
  238. &usb_1_qmpphy {
  239. vdda-phy-supply = <&vreg_l4b>;
  240. vdda-pll-supply = <&vreg_l3b>;
  241. status = "okay";
  242. };
  243. &xo_board_clk {
  244. clock-frequency = <38400000>;
  245. };
  246. /* PINCTRL */
  247. &pmc8280_1_gpios {
  248. edp_bl_en: edp-bl-en-state {
  249. pins = "gpio8";
  250. function = "normal";
  251. };
  252. edp_bl_reg_en: edp-bl-reg-en-state {
  253. pins = "gpio9";
  254. function = "normal";
  255. };
  256. misc_3p3_reg_en: misc-3p3-reg-en-state {
  257. pins = "gpio1";
  258. function = "normal";
  259. };
  260. };
  261. &pmc8280c_gpios {
  262. edp_bl_pwm: edp-bl-pwm-state {
  263. pins = "gpio8";
  264. function = "func1";
  265. };
  266. };
  267. &tlmm {
  268. gpio-reserved-ranges = <70 2>, <74 6>, <125 2>, <128 2>, <154 4>;
  269. kybd_default: kybd-default-state {
  270. disable {
  271. pins = "gpio102";
  272. function = "gpio";
  273. output-low;
  274. };
  275. int-n {
  276. pins = "gpio104";
  277. function = "gpio";
  278. bias-disable;
  279. };
  280. reset {
  281. pins = "gpio105";
  282. function = "gpio";
  283. bias-disable;
  284. };
  285. };
  286. qup0_i2c4_default: qup0-i2c4-default-state {
  287. pins = "gpio171", "gpio172";
  288. function = "qup4";
  289. bias-disable;
  290. drive-strength = <16>;
  291. };
  292. qup2_i2c5_default: qup2-i2c5-default-state {
  293. pins = "gpio81", "gpio82";
  294. function = "qup21";
  295. bias-disable;
  296. drive-strength = <16>;
  297. };
  298. tpad_default: tpad-default-state {
  299. int-n {
  300. pins = "gpio182";
  301. function = "gpio";
  302. bias-disable;
  303. };
  304. };
  305. ts0_default: ts0-default-state {
  306. int-n {
  307. pins = "gpio175";
  308. function = "gpio";
  309. bias-disable;
  310. };
  311. reset-n {
  312. pins = "gpio99";
  313. function = "gpio";
  314. output-high;
  315. drive-strength = <16>;
  316. };
  317. };
  318. };