From patchwork Sun Jul 24 09:55:43 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: 593175 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 596F1C43334 for ; Sun, 24 Jul 2022 09:56:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234120AbiGXJ4J (ORCPT ); Sun, 24 Jul 2022 05:56:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37184 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234112AbiGXJ4F (ORCPT ); Sun, 24 Jul 2022 05:56:05 -0400 Received: from mail-40130.protonmail.ch (mail-40130.protonmail.ch [185.70.40.130]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 27A13DECD for ; Sun, 24 Jul 2022 02:55:56 -0700 (PDT) Date: Sun, 24 Jul 2022 09:55:43 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail3; t=1658656554; x=1658915754; bh=FEF5AAiMS4gD8qsqPLEZ7xhLZ3WtoMjzRd22rrrxYf4=; 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=bbTAC0eGK0IsA02e6NpZaAKsH8aw6uHMRcwaz1R9tvUkTIY0MHBz35dyT+c8Ej5Au KWYsJAT3IB2nLHVMTCiWuvBQU3BWr+/KxdYJlfzc5dNCS71dOeg5tvzfNkTMpilGWH P2gRiQNby5uB2GmPREutQAQn84twp8gd70V0vGp/rPjxjHFt96EDfjL+t5bGhG1FTR fENX7i13Vlq/wISFTasvVs9ncgg6ZQkit+cUbi/uWZlypx6FTPjmLTgZO5/FUBLWZo UScWBhECWTdxi7e6aAbNaiNeVkUEMAv09NXVnTj1fKjlBc/VIjatNCLeLt9CMNv9n8 A/ZVDKItArixQ== To: devicetree@vger.kernel.org From: "Lin, Meng-Bo" Cc: Andy Gross , Bjorn Andersson , Konrad Dybcio , Rob Herring , Krzysztof Kozlowski , Arnd Bergmann , Olof Johansson , Stephen Boyd , Stephan Gerhold , Nikita Travkin , soc@kernel.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, ~postmarketos/upstreaming@lists.sr.ht Reply-To: "Lin, Meng-Bo" Subject: [PATCH v7 4/5] arm64: dts: qcom: msm8916-samsung-e2015: Add touchkey Message-ID: <20220724095426.14189-1-linmengbo0689@protonmail.com> In-Reply-To: <20220724095039.13568-1-linmengbo0689@protonmail.com> References: <20220724095039.13568-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 9caa8a161d31..542010fdfb8a 100644 --- a/arch/arm64/boot/dts/qcom/msm8916-samsung-e2015-common.dtsi +++ b/arch/arm64/boot/dts/qcom/msm8916-samsung-e2015-common.dtsi @@ -38,6 +38,19 @@ reg_motor_vdd: regulator-motor-vdd { pinctrl-names = "default"; pinctrl-0 = <&motor_en_default>; }; + + 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>; + }; }; &blsp_i2c2 { @@ -48,6 +61,11 @@ &blsp_i2c2 { /delete-node/ magnetometer@12; }; +&touchkey { + vcc-supply = <®_touch_key>; + vdd-supply = <®_touch_key>; +}; + &msmgpio { motor_en_default: motor-en-default { pins = "gpio76"; @@ -56,4 +74,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 4c1becdb9428..bc7134698978 100644 --- a/arch/arm64/boot/dts/qcom/msm8916-samsung-grandmax.dts +++ b/arch/arm64/boot/dts/qcom/msm8916-samsung-grandmax.dts @@ -41,6 +41,10 @@ ®_motor_vdd { gpio = <&msmgpio 72 GPIO_ACTIVE_HIGH>; }; +®_touch_key { + status = "disabled"; +}; + &msmgpio { gpio_leds_default: gpio-led-default { pins = "gpio60";