From patchwork Thu Jun 22 00:04:37 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Lin, Meng-Bo" X-Patchwork-Id: 695103 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8CFF1EB64D7 for ; Thu, 22 Jun 2023 00:16:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230120AbjFVAQk (ORCPT ); Wed, 21 Jun 2023 20:16:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54652 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229797AbjFVAQj (ORCPT ); Wed, 21 Jun 2023 20:16:39 -0400 Received: from mail-4327.protonmail.ch (mail-4327.protonmail.ch [185.70.43.27]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C65F81FF1; Wed, 21 Jun 2023 17:16:06 -0700 (PDT) Date: Thu, 22 Jun 2023 00:04:37 +0000 Authentication-Results: mail-4321.protonmail.ch; dkim=pass (2048-bit key) header.d=protonmail.com header.i=@protonmail.com header.b="QZTu5g/b" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail3; t=1687392292; x=1687651492; bh=KPV8l5vWbr9QkrijMiYUQ4TXqOgXrZpEbZB6K+/SA4w=; h=Date:To:From:Cc:Subject:Message-ID:In-Reply-To:References: Feedback-ID:From:To:Cc:Date:Subject:Reply-To:Feedback-ID: Message-ID:BIMI-Selector; b=QZTu5g/bwfZI/hjKsmmVwZoifpGc4f0JfgYX8vgDKgVyZvKwtvBJpQstpdpIcANMN FnEfjIB7e2w2jYlPnzfHqlh+gY6eDss1QLQlbBmWSXLyjbhaNdtfn7ZzvF75PcLpnx UJ8b5KTqRG08yhW57yf+BF3otxf1zx9iowo7Lm9AwtffR2v2JyrKML+otfgvipB3o1 VbyAcHjB5kaQ+0eTVVshm2VUAK0v1rQWmQ5Nx9h9Rh3VJUQYgiMbjbCCHnk3Zhl8kO 1Qw4sAbYcKTKMGI46uFqSayLpli4M6daY17IQjr30l6ffXlNiNh25r3HG3+tTU4isG jAnSp8HhAjVPw== To: linux-kernel@vger.kernel.org From: "Lin, Meng-Bo" Cc: Andy Gross , Bjorn Andersson , Konrad Dybcio , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Arnd Bergmann , Olof Johansson , Stephan Gerhold , Nikita Travkin , soc@kernel.org, linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, ~postmarketos/upstreaming@lists.sr.ht, Joe Mason , "Lin, Meng-Bo" Subject: [PATCH 5/7] arm64: dts: qcom: msm8916-samsung-fortuna: Add touchscreen Message-ID: <20230622000358.48332-1-linmengbo0689@protonmail.com> In-Reply-To: <20230622000007.48219-1-linmengbo0689@protonmail.com> References: <20230622000007.48219-1-linmengbo0689@protonmail.com> Feedback-ID: 40467236:user:proton MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org From: Joe Mason Like msm8916-samsung-a3u-eur, the Grand Prime uses a Zinitix BT541 touchscreen. Add it together with the necessary fixed-regulator to the device tree. Signed-off-by: Joe Mason Signed-off-by: Lin, Meng-Bo --- .../qcom/msm8916-samsung-fortuna-common.dtsi | 50 +++++++++++++++++++ .../qcom/msm8916-samsung-rossa-common.dtsi | 7 +++ 2 files changed, 57 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/msm8916-samsung-fortuna-common.dtsi b/arch/arm64/boot/dts/qcom/msm8916-samsung-fortuna-common.dtsi index ca147310c27a..6d9f89446105 100644 --- a/arch/arm64/boot/dts/qcom/msm8916-samsung-fortuna-common.dtsi +++ b/arch/arm64/boot/dts/qcom/msm8916-samsung-fortuna-common.dtsi @@ -64,6 +64,19 @@ reg_motor_vdd: regulator-motor-vdd { pinctrl-0 = <&motor_en_default>; pinctrl-names = "default"; }; + + reg_vdd_tsp_a: regulator-vdd-tsp-a { + compatible = "regulator-fixed"; + regulator-name = "vdd_tsp_a"; + regulator-min-microvolt = <3000000>; + regulator-max-microvolt = <3000000>; + + gpio = <&tlmm 73 GPIO_ACTIVE_HIGH>; + enable-active-high; + + pinctrl-0 = <&tsp_en_default>; + pinctrl-names = "default"; + }; }; &blsp_i2c1 { @@ -94,6 +107,29 @@ battery@35 { }; }; +&blsp_i2c5 { + status = "okay"; + + touchscreen@20 { + compatible = "zinitix,bt541"; + reg = <0x20>; + + interrupt-parent = <&tlmm>; + interrupts = <13 IRQ_TYPE_EDGE_FALLING>; + + touchscreen-size-x = <540>; + touchscreen-size-y = <960>; + + vcca-supply = <®_vdd_tsp_a>; + vdd-supply = <&pm8916_l6>; + + pinctrl-0 = <&tsp_int_default>; + pinctrl-names = "default"; + + linux,keycodes = ; + }; +}; + &blsp_uart2 { status = "okay"; }; @@ -176,4 +212,18 @@ sdc2_cd_default: sdc2-cd-default-state { drive-strength = <2>; bias-disable; }; + + tsp_en_default: tsp-en-default-state { + pins = "gpio73"; + function = "gpio"; + drive-strength = <2>; + bias-disable; + }; + + tsp_int_default: tsp-int-default-state { + pins = "gpio13"; + function = "gpio"; + drive-strength = <2>; + bias-disable; + }; }; diff --git a/arch/arm64/boot/dts/qcom/msm8916-samsung-rossa-common.dtsi b/arch/arm64/boot/dts/qcom/msm8916-samsung-rossa-common.dtsi index 5b012dc92e0e..242cb61e55fd 100644 --- a/arch/arm64/boot/dts/qcom/msm8916-samsung-rossa-common.dtsi +++ b/arch/arm64/boot/dts/qcom/msm8916-samsung-rossa-common.dtsi @@ -15,3 +15,10 @@ muic: extcon@14 { pinctrl-names = "default"; }; }; + +&blsp_i2c5 { + status = "disabled"; + + /* Touchscreen varies depending on model variant */ + /delete-node/ touchscreen@20; +};