public inbox for devicetree@vger.kernel.org
 help / color / mirror / Atom feed
From: Anton Bambura <jenneron@postmarketos.org>
To: Bjorn Andersson <andersson@kernel.org>,
	Konrad Dybcio <konrad.dybcio@linaro.org>,
	Rob Herring <robh+dt@kernel.org>,
	Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
	Conor Dooley <conor+dt@kernel.org>
Cc: linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: [PATCH v2 4/6] arm64: dts: qcom: sc8180x-lenovo-flex-5g: enable touchscreen
Date: Sat,  3 Feb 2024 21:11:58 +0200	[thread overview]
Message-ID: <20240203191200.99185-5-jenneron@postmarketos.org> (raw)
In-Reply-To: <20240203191200.99185-1-jenneron@postmarketos.org>

Set regulators, reset gpio and delays according to ACPI tables.

Signed-off-by: Anton Bambura <jenneron@postmarketos.org>
---
 .../boot/dts/qcom/sc8180x-lenovo-flex-5g.dts  | 30 ++++++++++++++++++-
 1 file changed, 29 insertions(+), 1 deletion(-)

diff --git a/arch/arm64/boot/dts/qcom/sc8180x-lenovo-flex-5g.dts b/arch/arm64/boot/dts/qcom/sc8180x-lenovo-flex-5g.dts
index 6ae6cb030b70..5bf6285f905f 100644
--- a/arch/arm64/boot/dts/qcom/sc8180x-lenovo-flex-5g.dts
+++ b/arch/arm64/boot/dts/qcom/sc8180x-lenovo-flex-5g.dts
@@ -271,6 +271,12 @@ vreg_l3c_1p2: ldo3 {
 			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
 		};
 
+		vreg_l4c_3p3: ldo4 {
+			regulator-min-microvolt = <3296000>;
+			regulator-max-microvolt = <3304000>;
+			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+		};
+
 		vreg_l10c_3p3: ldo10 {
 			regulator-min-microvolt = <3000000>;
 			regulator-max-microvolt = <3312000>;
@@ -337,6 +343,12 @@ vreg_l10e_2p9: ldo10 {
 			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
 		};
 
+		vreg_l12e_1p8: ldo12 {
+			regulator-min-microvolt = <1800000>;
+			regulator-max-microvolt = <1800000>;
+			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+		};
+
 		vreg_l16e_3p0: ldo16 {
 			regulator-min-microvolt = <3072000>;
 			regulator-max-microvolt = <3072000>;
@@ -365,11 +377,19 @@ &i2c1 {
 	touchscreen@10 {
 		compatible = "hid-over-i2c";
 		reg = <0x10>;
+
 		hid-descr-addr = <0x1>;
+		reset-gpios = <&tlmm 54 GPIO_ACTIVE_LOW>;
+
+		vdd-supply = <&vreg_l4c_3p3>;
+		vddl-supply = <&vreg_l12e_1p8>;
+
+		post-power-on-delay-ms = <3>;
+		post-reset-deassert-delay-ms = <200>;
 
 		interrupts-extended = <&tlmm 122 IRQ_TYPE_LEVEL_LOW>;
 
-		pinctrl-0 = <&ts_int_default>;
+		pinctrl-0 = <&ts_int_default>, <&ts_reset_default>;
 		pinctrl-names = "default";
 	};
 };
@@ -735,6 +755,14 @@ ts_int_default: ts-int-default-state {
 		drive-strength = <2>;
 	};
 
+	ts_reset_default: ts-reset-default-state {
+		pins = "gpio54";
+		function = "gpio";
+
+		bias-disable;
+		drive-strength = <16>;
+	};
+
 	usbprim_sbu_default: usbprim-sbu-state {
 		oe-n-pins {
 			pins = "gpio152";
-- 
2.42.0


  parent reply	other threads:[~2024-02-03 19:12 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-03 19:11 [PATCH v2 0/6] Device-tree improvements for Lenovo Flex/Yoga 5G laptop Anton Bambura
2024-02-03 19:11 ` [PATCH v2 1/6] arm64: dts: qcom: sc8180x-lenovo-flex-5g: fix GPU firmware path Anton Bambura
2024-02-13 17:14   ` Manivannan Sadhasivam
2024-02-13 17:33     ` jenneron
2024-02-13 17:51       ` Manivannan Sadhasivam
2024-02-13 17:59         ` jenneron
2024-02-03 19:11 ` [PATCH v2 2/6] arm64: dts: qcom: sc8180x-lenovo-flex-5g: set names for i2c hid nodes Anton Bambura
2024-02-03 19:11 ` [PATCH v2 3/6] arm64: dts: qcom: sc8180x-lenovo-flex-5g: move pinctrl to appropriate nodes Anton Bambura
2024-02-03 19:25   ` Konrad Dybcio
2024-02-03 19:11 ` Anton Bambura [this message]
2024-02-03 19:25   ` [PATCH v2 4/6] arm64: dts: qcom: sc8180x-lenovo-flex-5g: enable touchscreen Konrad Dybcio
2024-03-18  2:43   ` Bjorn Andersson
2024-03-19 22:13     ` Anton Bambura
2024-02-03 19:11 ` [PATCH v2 5/6] arm64: dts: qcom: sc8180x-lenovo-flex-5g: set touchpad i2c frequency to 1 MHz Anton Bambura
2024-02-03 19:24   ` Konrad Dybcio
2024-02-03 19:12 ` [PATCH v2 6/6] arm64: dts: qcom: sc8180x-lenovo-flex-5g: Allow UFS regulators load/mode setting Anton Bambura
2024-03-19  2:48 ` (subset) [PATCH v2 0/6] Device-tree improvements for Lenovo Flex/Yoga 5G laptop Bjorn Andersson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240203191200.99185-5-jenneron@postmarketos.org \
    --to=jenneron@postmarketos.org \
    --cc=andersson@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=konrad.dybcio@linaro.org \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=robh+dt@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox