From patchwork Sun Jul 16 19:08:24 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: 703576 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 6896DC001E0 for ; Sun, 16 Jul 2023 19:08:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230172AbjGPTIk (ORCPT ); Sun, 16 Jul 2023 15:08:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44768 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230160AbjGPTIk (ORCPT ); Sun, 16 Jul 2023 15:08:40 -0400 Received: from mail-40140.protonmail.ch (mail-40140.protonmail.ch [185.70.40.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 38FD6E4B for ; Sun, 16 Jul 2023 12:08:39 -0700 (PDT) Date: Sun, 16 Jul 2023 19:08:24 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail3; t=1689534516; x=1689793716; bh=NHCzzPytfSVKjaTxkJEdeQTvd4IhORtsH1WAjlQdHQk=; h=Date:To:From:Cc:Subject:Message-ID:Feedback-ID:From:To:Cc:Date: Subject:Reply-To:Feedback-ID:Message-ID:BIMI-Selector; b=sikBKvFvTk0awAJkzIkjJjP71sfIcYpmEMkVNUu7dIe9q+5G2oObEEnpt60Ul49WS SiFrLfCn0CqBoT0N4UacouocDUVjxH50uAUvHZZn9rj2+0qQMDXqdRyGRdez1In80w kVmfVkwtMcFAtHs8Qd+XYDRnKa7vI1VTSqFDEQX4CwqlVcW6jIZ8k1EVrfEEm5OkfU UT5eboQjPwhbb5IknvNiGzIPWvAwrCsAEIY17D1E5ljsD4fxm5uI1VgLNFZ9dcl2I3 lSk7eo5ysG5JIyiCz6Ud30qDLFNCAfOY+SXtZPdc6nvy4JdIGmv1ogXaTBtlN9j7nj 8tdPjwZ+zHV4Q== 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 v3] arm64: dts: qcom: msm8916-samsung-e2015: Add accelerometer Message-ID: <20230716190807.7056-1-linmengbo0689@protonmail.com> Feedback-ID: 40467236:user:proton MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@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 --- v3: fix subject and changelog v2: fix interrupt-parent = <&msmgpio>; .../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..6f65fd4b3ed3 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 = <&tlmm>; + 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 {