From patchwork Thu Jul 14 20:05: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: 590939 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 79DBDCCA483 for ; Thu, 14 Jul 2022 20:06:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236175AbiGNUGJ (ORCPT ); Thu, 14 Jul 2022 16:06:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60228 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234258AbiGNUGH (ORCPT ); Thu, 14 Jul 2022 16:06:07 -0400 Received: from mail-0201.mail-europe.com (mail-0201.mail-europe.com [51.77.79.158]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0B656675AA for ; Thu, 14 Jul 2022 13:06:05 -0700 (PDT) Date: Thu, 14 Jul 2022 20:05:58 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail3; t=1657829161; x=1658088361; bh=zPqdR+HafcwDy1W0JQxmXtHI+hMl6rra+AYRnvrWqpM=; h=Date:To:From:Cc:Reply-To:Subject:Message-ID:Feedback-ID:From:To: Cc:Date:Subject:Reply-To:Feedback-ID:Message-ID; b=A+ubgogu0ck5VijC32MYvvCe8jqWQWMc4W9lI3uxPxkEoCw4oeUMc6Qfc0+JALO7+ kqfRcLLxm6YIpAVSqztu7QcMIigRQIPSXuEEaXZtqMWqN1tUTAP4KLo9nyOi79nj5s yiNg/aemKe2BENFM4dfPSE1OL07xURIr7wWLH7+l/mGhBsM1f47t9d73PUKs6/gRQ9 suhWJUwhy29oLNuthM0MZrmcJfpXF2U60FG5+oY0gn7/CLOxCphbMKzuT0wHBZvukU xQeCztlnhid9eTdv0hTlnY0y8HdpU9GC90QhhEqvKHWMTWlAzL639N+1oHV1MCGMW3 8h0r0sugOY3Sw== 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 3/3] arm64: dts: qcom: msm8916-samsung-e2015: Add touchkey Message-ID: <20220714200346.22263-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 373154ee2643..9f3aca17130d 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>; @@ -28,6 +41,11 @@ vibrator: vibrator { }; }; +&touchkey { + vcc-supply = <®_touch_key>; + vdd-supply = <®_touch_key>; +}; + &msmgpio { motor_en_default: motor-en-default { pins = "gpio76"; @@ -36,4 +54,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 41aada4bfb80..f68dd3d69a33 100644 --- a/arch/arm64/boot/dts/qcom/msm8916-samsung-grandmax.dts +++ b/arch/arm64/boot/dts/qcom/msm8916-samsung-grandmax.dts @@ -27,6 +27,10 @@ / { /delete-node/ i2c-tkey; }; +®_touch_key { + status = "disabled"; +}; + &vibrator { enable-gpios = <&msmgpio 72 GPIO_ACTIVE_HIGH>; };