From patchwork Sat Feb 3 19:11:58 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anton Bambura X-Patchwork-Id: 196361 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:168b:b0:106:860b:bbdd with SMTP id ma11csp46739dyb; Sat, 3 Feb 2024 11:14:19 -0800 (PST) X-Google-Smtp-Source: AGHT+IF7byWKmMQ2LP4q/+eb1OaCHJnQgCBInA4R+q8Dmj0WU5SB6+N2R065wRohCdicfMxQYKfd X-Received: by 2002:a05:620a:110e:b0:783:a662:2bba with SMTP id o14-20020a05620a110e00b00783a6622bbamr9063178qkk.73.1706987659392; Sat, 03 Feb 2024 11:14:19 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706987659; cv=pass; d=google.com; s=arc-20160816; b=SeNuUfUklvVAhlKIqvu1sfaFqv3IFNXAXLhLecAjQuLbs+47mLLyqFXqnnLs15XirY Bi121pXIc3b6/cxjLoD21PUS4TbZ9QQkh/+BRhwneYBefuTqnrtKZkR5uFuH3PRpsm72 se5iLeXkM17DPBmbVY3AnFqdLfi7izIsBvyfzO0KZIOzmfgPJSrdCyXCWzcbQP1mchHW 7zVxWvVvpxnwxHemm10cXzIBU5XdhZd1ZC5nHoLIiDe06KFrUPVmqEq1Ho93KVN2SMf+ GQvdj0gh7ZZz9YqTTPLmajn3AG0OCHUa3Pc61xrrAyO+k62WbhFn0amHE1Dfk/gxqpxS pqIg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=gYHXn/FsWUe2ytcr0pi3c4QgJvZ4Eb2tVvL9ad3fkVg=; fh=pUaQbPsDk5NqdV85Nwq1KOp8iSmhUeq6mGwQg7ljkjM=; b=Z89PIeAbOXLG4dg831QH1KdV+unvnp3+zX3Ky9VAJVz2PsVG8qOcaQHtlji9M9jUdv jjDtVSMvG7sVq0TC+N3z39uGTDtgTfGWHph70I3T+vGbHB48zdx35/5IBGEcwau9+UML vpHGHcew8EPjtFrS06u36rB5DNxxvebaYIgurEPQEm3BN53+BPANmtQyhQZzo4BDRhO5 xpwIeNO1D/1E9nHxpuJqMab92QufVVSEacWC8PD/hcYxW67tc5NQK+jCN1UZ8/Xou59I SQRoyVZ8iKr2gv0FP0CtMKctebny+QwC9L4cXNNiUaQyGrgI5+Qikb0FlCGAYg5QpyWj RwlA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@postmarketos.org header.s=key1 header.b=RbjIWUwX; arc=pass (i=1 spf=pass spfdomain=postmarketos.org dkim=pass dkdomain=postmarketos.org dmarc=pass fromdomain=postmarketos.org); spf=pass (google.com: domain of linux-kernel+bounces-51260-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-51260-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=postmarketos.org X-Forwarded-Encrypted: i=1; AJvYcCVyNQ7toElVZMmvRkf+4zc0ExYGiIUnJnOhw5urGXxjwnrskKdxZRtmdk9fSsd6XL3slJirgwOe85Bgk9PqvytqB2S5PA== Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id e25-20020a05620a12d900b0078548bf3a43si4912520qkl.713.2024.02.03.11.14.19 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 03 Feb 2024 11:14:19 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-51260-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@postmarketos.org header.s=key1 header.b=RbjIWUwX; arc=pass (i=1 spf=pass spfdomain=postmarketos.org dkim=pass dkdomain=postmarketos.org dmarc=pass fromdomain=postmarketos.org); spf=pass (google.com: domain of linux-kernel+bounces-51260-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-51260-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=postmarketos.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 317C01C21D4F for ; Sat, 3 Feb 2024 19:14:19 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 0E50A63101; Sat, 3 Feb 2024 19:12:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=postmarketos.org header.i=@postmarketos.org header.b="RbjIWUwX" Received: from out-185.mta0.migadu.com (out-185.mta0.migadu.com [91.218.175.185]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E4DAA5F554 for ; Sat, 3 Feb 2024 19:12:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=91.218.175.185 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706987551; cv=none; b=GYtBgBOccShbxH/VaEtN9V3+XXLW9mxwqui8TR74ulfVbLdqaqrT5hvchc1Hv4efaBn2G6Y+99pVjKrK8dFPMLYh4X9gmdIlnQhi4vPvW3+6FDTC0By5al7GNZg/YhzjbxQMvbuKc/acIKnSdnumWrYgU1KQIQmMNtRUhGkXJ4c= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706987551; c=relaxed/simple; bh=Kyg5hCGVIsasfn2sYOZ2Upwno/GNqXDiIQfjVDfxKzQ=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=GFpTgVHGkYZX82ODZgSaAu3ee64fRiX2nNjl5IGE35J+ZjVotgJCVgaz3/qP2d1jEjiL3p1bTr4ePRBUHOQyAAQwUDVa+PWU/U2oUBZN6In+7SrOgWAERSGYOhpFMOhQh5noOEgSqbbaNHYBT9zYpZ1O2iEuArWIV/G4VBJoKsU= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=postmarketos.org; spf=pass smtp.mailfrom=postmarketos.org; dkim=pass (2048-bit key) header.d=postmarketos.org header.i=@postmarketos.org header.b=RbjIWUwX; arc=none smtp.client-ip=91.218.175.185 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=postmarketos.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=postmarketos.org X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=postmarketos.org; s=key1; t=1706987548; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=gYHXn/FsWUe2ytcr0pi3c4QgJvZ4Eb2tVvL9ad3fkVg=; b=RbjIWUwXmQ9KchClb5AWuFa2usojLqz8Bv+i2risRZblgtQW+0z4oIfe6f0rb5VhoY6d7G IPQTzKnoT957/z2cORub5Fcv4RXTT8xXEn4JsZGFC496CS5DxrTBiAAxSjrlK8vKmVuhHr 9ofvbkgDweD4oqZ0JZqCyC4yz0KAuPVmmeMkQkCXNiWqmfwDnPu8ApHEpzxO822WuyubVe Dt6duOZd5Xcs+vjzwyUfOXhpYmOdAAqnyjihds0LTJ8itLWvIkgpvNXsANs1Bq8CjPLdni BL4jvQ9cZCbBAEfCn6UaONbi+PI3DjyrS6XOksBchN/ul2yE4NAR61CNrChlnw== From: Anton Bambura To: Bjorn Andersson , Konrad Dybcio , Rob Herring , Krzysztof Kozlowski , Conor Dooley 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 Message-ID: <20240203191200.99185-5-jenneron@postmarketos.org> In-Reply-To: <20240203191200.99185-1-jenneron@postmarketos.org> References: <20240203191200.99185-1-jenneron@postmarketos.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Migadu-Flow: FLOW_OUT X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1789906292023144708 X-GMAIL-MSGID: 1789906292023144708 Set regulators, reset gpio and delays according to ACPI tables. Signed-off-by: Anton Bambura Reviewed-by: Konrad Dybcio --- .../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 = ; }; + vreg_l4c_3p3: ldo4 { + regulator-min-microvolt = <3296000>; + regulator-max-microvolt = <3304000>; + regulator-initial-mode = ; + }; + vreg_l10c_3p3: ldo10 { regulator-min-microvolt = <3000000>; regulator-max-microvolt = <3312000>; @@ -337,6 +343,12 @@ vreg_l10e_2p9: ldo10 { regulator-initial-mode = ; }; + vreg_l12e_1p8: ldo12 { + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + regulator-initial-mode = ; + }; + 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";