From patchwork Sat Jul 15 20:41:45 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: 703560 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 21CE8C0015E for ; Sat, 15 Jul 2023 20:42:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229968AbjGOUmC (ORCPT ); Sat, 15 Jul 2023 16:42:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45910 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229595AbjGOUmB (ORCPT ); Sat, 15 Jul 2023 16:42:01 -0400 Received: from mail-40137.protonmail.ch (mail-40137.protonmail.ch [185.70.40.137]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C7FF01A5 for ; Sat, 15 Jul 2023 13:42:00 -0700 (PDT) Date: Sat, 15 Jul 2023 20:41:45 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail3; t=1689453718; x=1689712918; bh=nfq894edfLj7KJhL0ovu2fYW+vNvVLWaaCXHQzABep4=; h=Date:To:From:Cc:Subject:Message-ID:Feedback-ID:From:To:Cc:Date: Subject:Reply-To:Feedback-ID:Message-ID:BIMI-Selector; b=vM9WFj3pCl919CeJU2Yds05u/oO4rBXT2D4TgG9upfKRf7EmrDYVfv6K8VeTo5nOX pQEkqNJd5UYhGOZd+2p/t8D5ifDa2g8aGfTBLlIzdgQauGCMucsiFf8EmId0E75v/a N38NjQzWTkEV04a0Wb/gbzpI1Q4dhilVqTH2yPW1m7bJ0t4GtqnK5t59mghaU8xJ5X QIxU/1W05c2SrDLKl/IGLOqFEs+90sRsSzbqkNHMYPfHWv4qTr9MZMzqoUxZjHdeFy K9PAVwRr0k3dZKXHr8feRXBuMxi60dv5mmGMM10LgtiN85Wbu+yB2I2wS7k4nTVv7y +SOcoIVo4ngug== To: linux-kernel@vger.kernel.org From: "Lin, Meng-Bo" Cc: Andy Gross , Bjorn Andersson , Konrad Dybcio , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Stephan Gerhold , Nikita Travkin , linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, ~postmarketos/upstreaming@lists.sr.ht Subject: [PATCH] arm64: dts: qcom: msm8916-samsung-e2015: Add accelerometer Message-ID: <20230715204128.12612-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 E5, E7 and Grand Max have ST LIS2HH12 accelerometer. Add support for it. Signed-off-by: Stephan Gerhold Signed-off-by: Lin, Meng-Bo --- .../qcom/msm8916-samsung-e2015-common.dtsi | 21 +++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) 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 0cdd6af7817f..ef7c7ac40e05 100644 --- a/arch/arm64/boot/dts/qcom/msm8916-samsung-e2015-common.dtsi +++ b/arch/arm64/boot/dts/qcom/msm8916-samsung-e2015-common.dtsi @@ -42,10 +42,27 @@ reg_touch_key: regulator-touch-key { &blsp_i2c2 { /* lis2hh12 accelerometer instead of BMC150 */ - status = "disabled"; - /delete-node/ accelerometer@10; /delete-node/ magnetometer@12; + + accelerometer@1d { + compatible = "st,lis2hh12"; + reg = <0x1d>; + + interrupt-parent = <&msmgpio>; + interrupts = <115 IRQ_TYPE_LEVEL_HIGH>; + + vdd-supply = <&pm8916_l5>; + vddio-supply = <&pm8916_l5>; + + st,drdy-int-pin = <1>; + mount-matrix = "1", "0", "0", + "0", "-1", "0", + "0", "0", "1"; + + pinctrl-0 = <&accel_int_default>; + pinctrl-names = "default"; + }; }; ®_motor_vdd {