From patchwork Sat Jul 23 19:00:38 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: 592870 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 D860FC433EF for ; Sat, 23 Jul 2022 19:01:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230005AbiGWTBF (ORCPT ); Sat, 23 Jul 2022 15:01:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58852 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238891AbiGWTA6 (ORCPT ); Sat, 23 Jul 2022 15:00:58 -0400 Received: from mail-4325.protonmail.ch (mail-4325.protonmail.ch [185.70.43.25]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 273D019287; Sat, 23 Jul 2022 12:00:53 -0700 (PDT) Date: Sat, 23 Jul 2022 19:00:38 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail3; t=1658602851; x=1658862051; bh=mfjREIH6eIyAt2qN+nS56MGp6DqRaaVCCioAstVF3bw=; 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=vGeNcS5ofTGG4xB1kIGIkugi+4IOiDzTw7Tc2Qa+I9BzscTYGKx73uO4+EFstNe2J /UCdYOGb8twCJaCLZ2WxrnhyA0IpyAKsmgXini4X91k+O17cI+UiXNBV6ZbGyw/T3N WI2OwkJmRA9JJ1mQ6X14KAhoQSM4vHgrtqkD6FsNTu8VAIYXbilRzRzIky0PfqstNZ ahuoc86l7hM7iH5zLGiAkNpXs5TE4gAwkYubLS4iVs9OYFTwYKTPj9tgzPQcK6CIQR bmdmrmXCHhMthMzKL3BNltYVQRETqaDK45utKeOTbQcj8NRdzWu2SYV7D4HwXF30zC loGYiEeslFsVQ== 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 v6 4/5] arm64: dts: qcom: msm8916-samsung-e2015: Add touchkey Message-ID: <20220723185927.203801-1-linmengbo0689@protonmail.com> In-Reply-To: <20220723185424.203340-1-linmengbo0689@protonmail.com> References: <20220723185424.203340-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 3677fd81b6c1..3b56892a05d2 100644 --- a/arch/arm64/boot/dts/qcom/msm8916-samsung-e2015-common.dtsi +++ b/arch/arm64/boot/dts/qcom/msm8916-samsung-e2015-common.dtsi @@ -26,6 +26,19 @@ vibrator: vibrator { 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 { @@ -36,6 +49,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"; @@ -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..cbb012d02a35 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 @@ &vibrator { enable-gpios = <&msmgpio 72 GPIO_ACTIVE_HIGH>; }; +®_touch_key { + status = "disabled"; +}; + &msmgpio { gpio_leds_default: gpio-led-default { pins = "gpio60";