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: 39516 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4e01:0:0:0:0:0 with SMTP id p1csp285094wrt; Thu, 5 Jan 2023 04:54:43 -0800 (PST) X-Google-Smtp-Source: AMrXdXsdBIOz94BggarV73Eb4SYJ7oiH1TXF8y/yTwdaoer51orcZKNNpwmDJ48fONGM5eTzwLvl X-Received: by 2002:a17:903:1cd:b0:192:b52f:33bb with SMTP id e13-20020a17090301cd00b00192b52f33bbmr31341856plh.45.1672923283279; Thu, 05 Jan 2023 04:54:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1672923283; cv=none; d=google.com; s=arc-20160816; b=rDrYZ+0mzuK5mMaYIjspYF9GRScr96yJbrwOqPShzuSneCxKM/tgy5t5lJ+pY0YBcR CF73ecKBNcdtBgF5mMTPWO3maWUYqMVg4L2UukCVSuhMpTTjRiBwrmJm251Iwp6rlC64 gDYeNhj3c0ITXnjtcpr+MQT/WbPU0mUwmnVDqIdAUIuPvws70IlA+TnceYKSslUFo7CW t5oMnZn4auoSwrE2zseiPwZUKP9dSdQ6H2iTGL4ZrOMTaEMH/x6UPorGrKpA/k8Q30Us MMU83eBPooyt2O2BxdGXza2gkUsVD+UompZ1oPDZF1d1JbDfkuRD8L5f5EEtV6AuKoOv 4MjQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=94/6vwLb7uysNERDnoeeaiFk+pNsqIgAQpSNg4X0xaM=; b=SRCcBsP+aIvV+NwE3s8X/d7sHD/I8InAplhMQ8Dhte6ZtPOwMETofVL9AhumPOwly2 amzoDMqjp6VNV81lfmQRMNmqIGvf7Hyz04dwAxiuzo58Gge4VEU+ud6RjloPmKjOAbIw YcEONc59/wFt9kH9uXLDGlnqcS3EVAHUEwmZW9QEX9Daq7tOTs67EPrN3kySqq3qkEjL H8ljzq872uc3x9h7h7h/X65983lfrOAIlb3WaRNfcId+9ZgjM7D+pIgmoccfnVDJEFIC f8Rr3nSVvxpnMc4DBkwPAzi3JrlC+7XFK0CPcvUeXTT+hJRd41ofzV37Y9il4SUjexLG QD/A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@trvn.ru header.s=mail header.b=pxAl392H; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=trvn.ru Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id p14-20020a170902ebce00b001926cc639ecsi30522046plg.487.2023.01.05.04.54.30; Thu, 05 Jan 2023 04:54:43 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@trvn.ru header.s=mail header.b=pxAl392H; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=trvn.ru Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233398AbjAEMv4 (ORCPT + 99 others); Thu, 5 Jan 2023 07:51:56 -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 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_PASS,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1754187204454415520?= X-GMAIL-MSGID: =?utf-8?q?1754187204454415520?= 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";