From patchwork Sat Jul 15 21:41:01 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: 703559 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 8EEC1C001DF for ; Sat, 15 Jul 2023 21:41:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229889AbjGOVlS (ORCPT ); Sat, 15 Jul 2023 17:41:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52136 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229767AbjGOVlR (ORCPT ); Sat, 15 Jul 2023 17:41:17 -0400 Received: from mail-4027.protonmail.ch (mail-4027.protonmail.ch [185.70.40.27]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A71F6198A for ; Sat, 15 Jul 2023 14:41:16 -0700 (PDT) Date: Sat, 15 Jul 2023 21:41:01 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail3; t=1689457274; x=1689716474; bh=KldUTfmyH7/OUpsrrZmHdmob6ZlwyWT4KOLC0g0vHYA=; h=Date:To:From:Cc:Subject:Message-ID:Feedback-ID:From:To:Cc:Date: Subject:Reply-To:Feedback-ID:Message-ID:BIMI-Selector; b=rzjtXkmDbqrZHq9J+SPg3VzRUFhU2UzD1Kwd+b3aeA/9DFixM1vtljplQlY4PyTB6 o0kRMQ6PvfNRR1B2ylnusPKU/JkwG85zB1F3gdNRMcDOPdAyxQV1xcyEThezL4dR4J QWHMpDFJa3Tu0JzkSCVqfQKE0htDmOaUGwvGBI24u4o4c/cn6dvmOI5DWug6rb0c8p bXyJcKpCkGpGW0pQRu3bGOJpQIRnHfvZrvn6JuZegV1UlKEnc/d11GAZRNjAcBwRE3 DtQ3n+teHuBA22o6QtSDWHSrzKZmRxksBz11BUK0e1OKzth9hE/eanp0HSeMx3jwNJ Wi2OSZHwQk/+Q== 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] arm64: dts: qcom: msm8916-samsung-j5-common: Add touchscreen Message-ID: <20230715214046.14902-1-linmengbo0689@protonmail.com> Feedback-ID: 40467236:user:proton MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org J5 and J5X use an Imagis IST3038C touchscreen that is connected to blsp_i2c5. Add it to the device tree. MFD driver for SM5703 is unavailable at the moment, which is required to power up the touchscreen on J5, so it's disabled on J5 for now. Signed-off-by: Lin, Meng-Bo --- .../dts/qcom/msm8916-samsung-j5-common.dtsi | 29 +++++++++++++++++++ .../boot/dts/qcom/msm8916-samsung-j5.dts | 8 +++++ .../boot/dts/qcom/msm8916-samsung-j5x.dts | 26 +++++++++++++++++ 3 files changed, 63 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/msm8916-samsung-j5-common.dtsi b/arch/arm64/boot/dts/qcom/msm8916-samsung-j5-common.dtsi index f4fd5d72b28b..cb0e4a7faf91 100644 --- a/arch/arm64/boot/dts/qcom/msm8916-samsung-j5-common.dtsi +++ b/arch/arm64/boot/dts/qcom/msm8916-samsung-j5-common.dtsi @@ -86,6 +86,26 @@ muic: extcon@25 { }; }; +&blsp_i2c5 { + status = "okay"; + + touchscreen: touchscreen@50 { + compatible = "imagis,ist3038c"; + reg = <0x50>; + + interrupt-parent = <&tlmm>; + interrupts = <13 IRQ_TYPE_EDGE_FALLING>; + + touchscreen-size-x = <720>; + touchscreen-size-y = <1280>; + + vddio-supply = <&pm8916_l6>; + + pinctrl-0 = <&tsp_int_default>; + pinctrl-names = "default"; + }; +}; + &blsp_uart2 { status = "okay"; }; @@ -162,6 +182,15 @@ muic_int_default: muic-int-default-state { sdc2_cd_default: sdc2-cd-default-state { pins = "gpio38"; 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-j5.dts b/arch/arm64/boot/dts/qcom/msm8916-samsung-j5.dts index 0a32d33e9778..3e1ff5b4d2d7 100644 --- a/arch/arm64/boot/dts/qcom/msm8916-samsung-j5.dts +++ b/arch/arm64/boot/dts/qcom/msm8916-samsung-j5.dts @@ -10,6 +10,14 @@ / { chassis-type = "handset"; }; +&blsp_i2c5 { + status = "disabled"; +}; + +&touchscreen { + /* FIXME: Missing sm5703-mfd driver to power up vdd-supply */ +}; + &usb_hs_phy { qcom,init-seq = /bits/ 8 <0x1 0x19 0x2 0x0b>; }; diff --git a/arch/arm64/boot/dts/qcom/msm8916-samsung-j5x.dts b/arch/arm64/boot/dts/qcom/msm8916-samsung-j5x.dts index 7e1326cc13c5..b2fe109723d8 100644 --- a/arch/arm64/boot/dts/qcom/msm8916-samsung-j5x.dts +++ b/arch/arm64/boot/dts/qcom/msm8916-samsung-j5x.dts @@ -8,12 +8,38 @@ / { model = "Samsung Galaxy J5 (2016)"; compatible = "samsung,j5x", "qcom,msm8916"; chassis-type = "handset"; + + 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 108 GPIO_ACTIVE_HIGH>; + enable-active-high; + + pinctrl-0 = <&tsp_ldo_en_default>; + pinctrl-names = "default"; + }; }; &muic { interrupts = <121 IRQ_TYPE_EDGE_FALLING>; }; +&touchscreen { + vdd-supply = <®_vdd_tsp_a>; +}; + +&tlmm { + tsp_ldo_en_default: tsp-ldo-en-default-state { + pins = "gpio108"; + function = "gpio"; + drive-strength = <2>; + bias-disable; + }; +}; + &muic_int_default { pins = "gpio121"; };