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: 120855 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:c923:0:b0:3e4:2afc:c1 with SMTP id j3csp355923vqt; Sat, 15 Jul 2023 15:10:57 -0700 (PDT) X-Google-Smtp-Source: APBJJlFglQ6nKQ4r8RDjbiZd4mXfO8Ewt6X4L1RUrHlBDzYxd1+ciZoY+OUk1YgLUF7iJOr2auW4 X-Received: by 2002:a05:6a00:1827:b0:681:50fd:2b85 with SMTP id y39-20020a056a00182700b0068150fd2b85mr7738395pfa.27.1689459057158; Sat, 15 Jul 2023 15:10:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689459057; cv=none; d=google.com; s=arc-20160816; b=yovg8NYf3zfu5Ntdy0rstl16EMxYhBM96r/SaSyzN+Des2PD9aK1111sc8DrNpaSNN 1JeuL9idiuMmVZGrdDVazjNEcyHouQKFXcZKgNJ9lc0d00NhmqdAwsaWZY4f0Ahy7zuu CiMVQgCNOm8vmhyxfy+8LFVt/cE/KtP96UKHz10vlEZ6Mr/5DgsCYnpyXjP1XVftae03 2+++uO2B5Ewwr9Oq6uQ0QbyZzkr7XsMzPbwvZu5+UsiKyHaKA1kc/Pisz3MDt1qmL5Zg +FjfgqpaYOchaCDXMS0VlXN0eaUzVIgUIea1pd1rIlWKqGBrKXailXUPO+haC81SfYiy 1+Zw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :feedback-id:message-id:subject:cc:from:to:dkim-signature:date; bh=KldUTfmyH7/OUpsrrZmHdmob6ZlwyWT4KOLC0g0vHYA=; fh=MvBPGIPHPulC8Q1odG8LiYECIuv2LKYjDUHt1nt1gLY=; b=SfMdNkIII6wlMY5PDF5q8ywhPb/zdH/w+7XPEJg6xmYM3sUtGZqsWEWTFf8NqNdZCJ 8M54IxLCz9Wn1VvgeLJj75fsIzuRjmwe5Blr8y0mCdVrjkh93WT/Bj1NmCmmGAtukFi5 7FovSfInvCJIVq4+jIQJLnQbVn+PQnTkOkYEVyx0RjM3W7DVhuLzkasYfnUgHbu57aH0 7RJOC3poLotPLJJCeL5IPHdb5cfCJUmSZICxv+1NfA5j8Ej6CkJTqnYkh0piIrNKtwdn Em9KVGv8agz23UlnRLtFC0/Ja4WGNfEsNgiRIWIXCO3aaE8AyWZ/xvuADluW/fAiVKO0 Zlkw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@protonmail.com header.s=protonmail3 header.b=rzjtXkmD; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=protonmail.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id d64-20020a633643000000b0055c79555b8bsi4509761pga.385.2023.07.15.15.10.43; Sat, 15 Jul 2023 15:10:57 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@protonmail.com header.s=protonmail3 header.b=rzjtXkmD; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=protonmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229918AbjGOVlT (ORCPT + 99 others); Sat, 15 Jul 2023 17:41:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52134 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229530AbjGOVlR (ORCPT ); Sat, 15 Jul 2023 17:41:17 -0400 Received: from mail-40137.protonmail.ch (mail-40137.protonmail.ch [185.70.40.137]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7DCEBD7; 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 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM,RCVD_IN_DNSWL_BLOCKED,RCVD_IN_MSPIKE_H5, RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,SPF_PASS,T_SCC_BODY_TEXT_LINE, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1771526219844544269 X-GMAIL-MSGID: 1771526219844544269 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"; };