From patchwork Thu Jun 22 02:06:02 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: 695098 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 1260DEB64D8 for ; Thu, 22 Jun 2023 02:06:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230268AbjFVCGj (ORCPT ); Wed, 21 Jun 2023 22:06:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36332 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230264AbjFVCGh (ORCPT ); Wed, 21 Jun 2023 22:06:37 -0400 Received: from mail-40130.protonmail.ch (mail-40130.protonmail.ch [185.70.40.130]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0DF6F1FE9 for ; Wed, 21 Jun 2023 19:06:17 -0700 (PDT) Date: Thu, 22 Jun 2023 02:06:02 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail3; t=1687399570; x=1687658770; bh=7SfUXgxDKFs8VyBnB08DD7BLN92E+2qCeSvNcbRx2Aw=; 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=fv0DP/u8s/kP/JRVUax0RBzP3gLl7iEwVlP98yiAxlxhM/Y5i7rR5EUzWNjbz6CWO s6w6HCEhbEMiYRBwhYk0lJ4pga+LmWLxPVsAr+Pj4WGN9URrD+pfJS3lxwTnc4IbwD JQK2Zwm7lcX+RRJfh7mmRw3iJ77zUo0VfrvGZvCH4qJpZfItrQqb9H5OUSI32hV79o ZdDUY2tVFmNmdQYvTZhglu1fFS+Y0262Pj/F6Allrs2gBL1BtxYvU9WU+rlj+4D7jX 7wSkjsi692IvaVG+R5EjCY6QARRxKLQTBc6RNzMazA4NDo372eLGE0EYtVJ77akiWl 1K2WRio8FELIw== To: linux-kernel@vger.kernel.org From: "Lin, Meng-Bo" Cc: Andy Gross , Bjorn Andersson , Konrad Dybcio , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Stephan Gerhold , Nikita Travkin , linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, ~postmarketos/upstreaming@lists.sr.ht Subject: [PATCH 8/8] arm64: dts: qcom: msm8939-samsung-a7: Add touchscreen Message-ID: <20230622020553.65878-1-linmengbo0689@protonmail.com> In-Reply-To: <20230622020344.65745-1-linmengbo0689@protonmail.com> References: <20230622020344.65745-1-linmengbo0689@protonmail.com> Feedback-ID: 40467236:user:proton MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org A7 uses a Cypress TrueTouch Generation 5 that is connected to blsp_i2c5. Add it to the device tree. Signed-off-by: Lin, Meng-Bo --- .../boot/dts/qcom/msm8939-samsung-a7.dts | 66 +++++++++++++++++++ 1 file changed, 66 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/msm8939-samsung-a7.dts b/arch/arm64/boot/dts/qcom/msm8939-samsung-a7.dts index ea74b61782de..66e56ac59998 100644 --- a/arch/arm64/boot/dts/qcom/msm8939-samsung-a7.dts +++ b/arch/arm64/boot/dts/qcom/msm8939-samsung-a7.dts @@ -222,6 +222,33 @@ reg_touch_key: regulator-touch-key { pinctrl-names = "default"; }; + reg_tsp_vdd: regulator-tsp-vdd { + compatible = "regulator-fixed"; + regulator-name = "tsp_vdd"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + vin-supply = <&pm8916_s4>; + + gpio = <&tlmm 8 GPIO_ACTIVE_HIGH>; + enable-active-high; + + pinctrl-0 = <®_tsp_io_en_default>; + pinctrl-names = "default"; + }; + + reg_vdd_tsp: regulator-vdd-tsp { + compatible = "regulator-fixed"; + regulator-name = "vdd_tsp"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + + gpio = <&tlmm 73 GPIO_ACTIVE_HIGH>; + enable-active-high; + + pinctrl-0 = <®_tsp_en_default>; + pinctrl-names = "default"; + }; + reg_vibrator: regulator-vibrator { compatible = "regulator-fixed"; regulator-name = "motor_en"; @@ -260,6 +287,24 @@ muic: extcon@25 { }; }; +&blsp_i2c5 { + status = "okay"; + + touchscreen@24 { + compatible = "cypress,tt21000"; + + reg = <0x24>; + interrupt-parent = <&tlmm>; + interrupts = <13 IRQ_TYPE_EDGE_FALLING>; + + vdd-supply = <®_vdd_tsp>; + vddio-supply = <®_tsp_vdd>; + + pinctrl-0 = <&tsp_int_default>; + pinctrl-names = "default"; + }; +}; + &blsp_uart2 { status = "okay"; }; @@ -385,6 +430,20 @@ nfc_i2c_default: nfc-i2c-default-state { bias-disable; }; + reg_tsp_en_default: reg-tsp-en-default-state { + pins = "gpio73"; + function = "gpio"; + drive-strength = <2>; + bias-disable; + }; + + reg_tsp_io_en_default: reg-tsp-io-en-default-state { + pins = "gpio8"; + function = "gpio"; + drive-strength = <2>; + bias-disable; + }; + sdc2_cd_default: sdc2-cd-default-state { pins = "gpio38"; function = "gpio"; @@ -426,4 +485,11 @@ tkey_led_en_default: tkey-led-en-default-state { drive-strength = <2>; bias-disable; }; + + tsp_int_default: tsp-int-default-state { + pins = "gpio13"; + function = "gpio"; + drive-strength = <2>; + bias-disable; + }; };