From patchwork Sat Jul 15 21:05:31 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: 703278 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 EFE29C001DE for ; Sat, 15 Jul 2023 21:05:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229751AbjGOVFl (ORCPT ); Sat, 15 Jul 2023 17:05:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47850 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229530AbjGOVFk (ORCPT ); Sat, 15 Jul 2023 17:05:40 -0400 Received: from mail-4318.protonmail.ch (mail-4318.protonmail.ch [185.70.43.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D1A5A2738; Sat, 15 Jul 2023 14:05:39 -0700 (PDT) Date: Sat, 15 Jul 2023 21:05:31 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail3; t=1689455137; x=1689714337; bh=p4IaxbwpaHv+xOOMu8SedVmfPdSj/FMf57pnmMhXBrA=; h=Date:To:From:Cc:Subject:Message-ID:Feedback-ID:From:To:Cc:Date: Subject:Reply-To:Feedback-ID:Message-ID:BIMI-Selector; b=oZPOyal7jiELXgpPFrXV4x0bXBjCM3MRG5a0sj+aF9n/iidZ+kzWf+KxNEdB97+eu cbE//hMFM96tzR2gii+/01V3p3ZKn5l61opRtARNe6unExvHnyh3d8xpFV95UNO1+J I/4CyiSSEw685i2AI6oVf3Y00yNFLQyKycFK65Iv4KjUgCr/bybpczD8ezQNQxkqYz BUvnEGRvH6csy4xhnawLQ61qhTPDTJCFMexnO66lR51xkiyLWhhwDwEXbo42lppHnd RAqTPXwcR4lOIXSKSpiPKl7ydEy4ynhNHKH6MDWGlrOoB5KNZTRMnclEqmOI2CLden S5kaPwopdJVLw== 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 v2] arm64: dts: qcom: msm8916-samsung-e2015: Add accelerometer (v2) Message-ID: <20230715210515.13783-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 v2: fix interrupt-parent = <&msmgpio>; 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..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 {