From patchwork Sat Jan 7 13:33:05 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: 640130 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 A2897C54EBC for ; Sat, 7 Jan 2023 13:33:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231919AbjAGNdt (ORCPT ); Sat, 7 Jan 2023 08:33:49 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57008 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232342AbjAGNdS (ORCPT ); Sat, 7 Jan 2023 08:33:18 -0500 Received: from mail-40141.protonmail.ch (mail-40141.protonmail.ch [185.70.40.141]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 611595D41E; Sat, 7 Jan 2023 05:33:17 -0800 (PST) Date: Sat, 07 Jan 2023 13:33:05 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail3; t=1673098395; x=1673357595; bh=3JUH9jgxvrO6pX2/oOfyUckL9ueEpdJEpOBuvzO+l/o=; 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=diOEoydaVZmCYysTxD5/KrOEVRhpEHtmL6kSS96L00n7sPMVVFcc1wEqrhXwTvFE9 qv9O3QyLXn8MjzPoN77ZMECvFMPVU4qO2Z7C7nl+axxR610QaEtwl9kPVBeIWQKeSx WPT9mSyc1Tkk97YdkR+JwoVOGzTryOlrjRmhzQa0zISh4sEb7bKQpq4SKedFsqX/Er p6OitWIw1sA8taIE16W027qppXkVWNxSXb025eRo9ompr0DJsOKvQyhWO59DHNFg1Y adu9ST5NX2jIwQJ5BqqmLjsjwIJPc+ymZIkKFSi3dSHs5r93V2OMYxsv3dwwnzb2SK LdgqrijTIO1/Q== To: linux-kernel@vger.kernel.org From: "Lin, Meng-Bo" Cc: Andy Gross , Bjorn Andersson , Konrad Dybcio , Rob Herring , Krzysztof Kozlowski , Linus Walleij , Stanislav Jakubek , Miquel Raynal , Jagan Teki , Chris Morgan , Stephan Gerhold , Nikita Travkin , devicetree@vger.kernel.org, linux-arm-msm@vger.kernel.org, ~postmarketos/upstreaming@lists.sr.ht Subject: [PATCH v6 4/5] arm64: dts: qcom: msm8916-gplus-fl8005a: Add touchscreen Message-ID: <20230107133223.139893-1-linmengbo0689@protonmail.com> In-Reply-To: <20230107132932.139669-1-linmengbo0689@protonmail.com> References: <20230107132932.139669-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 FL8005A uses a Focaltech FT5402 touchscreen that is connected to blsp_i2c5. Add it to the device tree. Signed-off-by: Lin, Meng-Bo Reviewed-by: Konrad Dybcio --- .../boot/dts/qcom/msm8916-gplus-fl8005a.dts | 42 +++++++++++++++++++ 1 file changed, 42 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/msm8916-gplus-fl8005a.dts b/arch/arm64/boot/dts/qcom/msm8916-gplus-fl8005a.dts index a8c36c9f5d9d..b44c30a72784 100644 --- a/arch/arm64/boot/dts/qcom/msm8916-gplus-fl8005a.dts +++ b/arch/arm64/boot/dts/qcom/msm8916-gplus-fl8005a.dts @@ -63,6 +63,32 @@ usb_id: usb-id { }; }; +&blsp_i2c5 { + status = "okay"; + + touchscreen@38 { + /* Actually ft5402 */ + compatible = "edt,edt-ft5406"; + reg = <0x38>; + + interrupt-parent = <&msmgpio>; + interrupts = <13 IRQ_TYPE_EDGE_FALLING>; + + reset-gpios = <&msmgpio 12 GPIO_ACTIVE_LOW>; + + vcc-supply = <&pm8916_l17>; + iovcc-supply = <&pm8916_l6>; + + touchscreen-size-x = <800>; + touchscreen-size-y = <500>; + touchscreen-inverted-x; + touchscreen-swapped-x-y; + + pinctrl-0 = <&touchscreen_default>; + pinctrl-names = "default"; + }; +}; + &blsp1_uart2 { status = "okay"; }; @@ -225,6 +251,22 @@ gpio_leds_default: gpio-led-default-state { bias-disable; }; + touchscreen_default: touchscreen-default-state { + reset-pins { + pins = "gpio12"; + function = "gpio"; + drive-strength = <2>; + bias-disable; + }; + + touchscreen-pins { + pins = "gpio13"; + function = "gpio"; + drive-strength = <2>; + bias-pull-up; + }; + }; + usb_id_default: usb-id-default-state { pins = "gpio110"; function = "gpio";