From patchwork Thu Jan 5 12:32:40 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nikita Travkin X-Patchwork-Id: 13089799 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 6416AC3DA7A for ; Thu, 5 Jan 2023 12:51:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233361AbjAEMvd (ORCPT ); Thu, 5 Jan 2023 07:51:33 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40682 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233327AbjAEMv2 (ORCPT ); Thu, 5 Jan 2023 07:51:28 -0500 Received: from box.trvn.ru (box.trvn.ru [194.87.146.52]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 439D8485A6; Thu, 5 Jan 2023 04:51:26 -0800 (PST) Received: from authenticated-user (box.trvn.ru [194.87.146.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by box.trvn.ru (Postfix) with ESMTPSA id F1E90420EA; Thu, 5 Jan 2023 17:34:01 +0500 (+05) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=trvn.ru; s=mail; t=1672922042; bh=AfmbF3JjmXKU9T2jtly2Mo3ig2mVtRaWbIeULclrM7M=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=pxAl392HXkVVnPLj+qaVI87DjLtaphJO4FmU0L84V6CdB/k4zVhciI7XNqB5YpIBD Y56OJ9kQ8PT9s0Bk8voY46XNSRj8yTZta+7eHx39zF00d5KqMbevNpLp1sj3iV9ayg GoI6jWi13kvBtZP+f63LrKKl1YY1WFGQWjGvBa5SdbPpaNhTFJkElkWxIwgH3CP0wV DrtPO4CFP5VWBUx6h0mlVeWtK6MrhrXlxnheQC7Vi4sAco57hwh62sx9NGwWlaQBSo nVcDvescddiD5ARDSOh+F2uxAusOXYxmtQ0dQKE1Y6W7OWQFQwhlW6JZn6fMkyLUnb a8TBFI+AEFaNA== From: Nikita Travkin To: Andy Gross , Bjorn Andersson Cc: Rob Herring , Krzysztof Kozlowski , Konrad Dybcio , Siddharth Manthan , Jasper Korten , linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, ~postmarketos/upstreaming@lists.sr.ht, Nikita Travkin Subject: [PATCH 8/8] arm64: dts: qcom: msm8916-samsung-gt5-common: add sensors Date: Thu, 5 Jan 2023 17:32:40 +0500 Message-Id: <20230105123240.1089375-9-nikita@trvn.ru> In-Reply-To: <20230105123240.1089375-1-nikita@trvn.ru> References: <20230105123240.1089375-1-nikita@trvn.ru> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org From: Siddharth Manthan This device has ST LIS2HH12 accelerometer and Capella CM3323 light sensor. Add support for it. Signed-off-by: Siddharth Manthan Signed-off-by: Nikita Travkin --- .../dts/qcom/msm8916-samsung-gt5-common.dtsi | 37 +++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/msm8916-samsung-gt5-common.dtsi b/arch/arm64/boot/dts/qcom/msm8916-samsung-gt5-common.dtsi index 9f97a8129278..bb1b1e814d8a 100644 --- a/arch/arm64/boot/dts/qcom/msm8916-samsung-gt5-common.dtsi +++ b/arch/arm64/boot/dts/qcom/msm8916-samsung-gt5-common.dtsi @@ -82,6 +82,35 @@ fuelgauge@36 { }; }; +&blsp_i2c2 { + status = "okay"; + + accelerometer@1d { + compatible = "st,lis2hh12"; + reg = <0x1d>; + + vdd-supply = <&pm8916_l17>; + vddio-supply = <&pm8916_l5>; + + interrupt-parent = <&msmgpio>; + interrupts = <115 IRQ_TYPE_LEVEL_HIGH>; + interrupt-names = "INT1"; + + st,drdy-int-pin = <1>; + mount-matrix = "0", "1", "0", + "-1", "0", "0", + "0", "0", "1"; + + pinctrl-0 = <&accel_int_default>; + pinctrl-names = "default"; + }; + + light-sensor@10 { + compatible = "capella,cm3323"; + reg = <0x10>; + }; +}; + &blsp1_uart2 { status = "okay"; }; @@ -237,6 +266,14 @@ l18 { }; &msmgpio { + accel_int_default: accel-int-default-state { + pins = "gpio115"; + function = "gpio"; + + drive-strength = <2>; + bias-disable; + }; + fuelgauge_int_default: fuelgauge-int-default-state { pins = "gpio121"; function = "gpio";