From patchwork Thu Jul 21 23:54:58 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Lin, Meng-Bo" X-Patchwork-Id: 592500 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 4A7EEC43334 for ; Thu, 21 Jul 2022 23:55:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233632AbiGUXzP (ORCPT ); Thu, 21 Jul 2022 19:55:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60952 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233814AbiGUXzK (ORCPT ); Thu, 21 Jul 2022 19:55:10 -0400 Received: from mail-40141.protonmail.ch (mail-40141.protonmail.ch [185.70.40.141]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 736BAEE2A for ; Thu, 21 Jul 2022 16:55:07 -0700 (PDT) Date: Thu, 21 Jul 2022 23:54:58 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail3; t=1658447705; x=1658706905; bh=f7S0wFYVa94uuYvy/CA+AbuAXJ6TWBZwRlc6ONo3zXs=; h=Date:To:From:Cc:Reply-To:Subject:Message-ID:In-Reply-To: References:Feedback-ID:From:To:Cc:Date:Subject:Reply-To: Feedback-ID:Message-ID; b=boNTiMLNpCM8YWqVx7D1wRp8FsMvGWxCuFG/oOsBELSC3wrLE/lq73XwT9UA/wErm n/EdrS6YO+0GzN8uxlFyfd4ZfA7JRv9DHAljWwB1yz79tSXq2DvJqsslaSLqXItkk2 ae9A/sfTq8IzdUQ+SnhUDT1s3KbTurdrDqbfWRenOKloBfUzQLOJ3494o2dAXM6rRy dhlBmAMTdE8Q8kVpgeE1zaNCOO0RWmz8X9huclWITfRAFOzK4EqiTDDEGX3KefAFod CDIKsyOlLmfxJrq6LWOxOjPyVkWmAdLMxVmW6nKBfONM9daqYqnzIkTcXeVLyKE9hX 3XExs5GbaZSEw== To: devicetree@vger.kernel.org From: "Lin, Meng-Bo" Cc: Andy Gross , Bjorn Andersson , Konrad Dybcio , Rob Herring , Krzysztof Kozlowski , linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, Stephan Gerhold , Nikita Travkin , ~postmarketos/upstreaming@lists.sr.ht Reply-To: "Lin, Meng-Bo" Subject: [PATCH v4 4/4] arm64: dts: qcom: msm8916-samsung-e2015: Add touchkey Message-ID: <20220721235353.75440-1-linmengbo0689@protonmail.com> In-Reply-To: <20220721235205.74741-1-linmengbo0689@protonmail.com> References: <20220721235205.74741-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 On the Samsung Galaxy E5 and E7 the touch key is supplied by a single fixed regulator (enabled via GPIO 97) that supplies both MCU and LED. Add it to the device tree. Signed-off-by: Lin, Meng-Bo --- .../qcom/msm8916-samsung-e2015-common.dtsi | 26 +++++++++++++++++++ .../dts/qcom/msm8916-samsung-grandmax.dts | 4 +++ 2 files changed, 30 insertions(+) -- 2.30.2 diff --git a/arch/arm64/boot/dts/qcom/msm8916-samsung-e2015-common.dtsi b/arch/arm64/boot/dts/qcom/msm8916-samsung-e2015-common.dtsi index 93a14bfcf8f8..4a6cc575c451 100644 --- a/arch/arm64/boot/dts/qcom/msm8916-samsung-e2015-common.dtsi +++ b/arch/arm64/boot/dts/qcom/msm8916-samsung-e2015-common.dtsi @@ -19,6 +19,19 @@ muic: extcon@14 { }; }; + reg_touch_key: regulator-touch-key { + compatible = "regulator-fixed"; + regulator-name = "touch_key"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + + gpio = <&msmgpio 97 GPIO_ACTIVE_HIGH>; + enable-active-high; + + pinctrl-names = "default"; + pinctrl-0 = <&tkey_en_default>; + }; + vibrator: vibrator { compatible = "gpio-vibrator"; enable-gpios = <&msmgpio 76 GPIO_ACTIVE_HIGH>; @@ -36,6 +49,11 @@ &blsp_i2c2 { status = "disabled"; }; +&touchkey { + vcc-supply = <®_touch_key>; + vdd-supply = <®_touch_key>; +}; + &msmgpio { motor_en_default: motor-en-default { pins = "gpio76"; @@ -44,4 +62,12 @@ motor_en_default: motor-en-default { drive-strength = <2>; bias-disable; }; + + tkey_en_default: tkey-en-default { + pins = "gpio97"; + function = "gpio"; + + drive-strength = <2>; + bias-disable; + }; }; diff --git a/arch/arm64/boot/dts/qcom/msm8916-samsung-grandmax.dts b/arch/arm64/boot/dts/qcom/msm8916-samsung-grandmax.dts index 74c07a970317..87e990f4f9fc 100644 --- a/arch/arm64/boot/dts/qcom/msm8916-samsung-grandmax.dts +++ b/arch/arm64/boot/dts/qcom/msm8916-samsung-grandmax.dts @@ -37,6 +37,10 @@ keyled { }; }; +®_touch_key { + status = "disabled"; +}; + &vibrator { enable-gpios = <&msmgpio 72 GPIO_ACTIVE_HIGH>; };