Received: by 2002:ab2:3350:0:b0:1f4:6588:b3a7 with SMTP id o16csp353328lqe; Sat, 6 Apr 2024 04:15:07 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVnF1StM9O9PZY5nbE6UyG+N/CLjFMu2XDUlTGpZAjgkceWyKfOxLOf8qfKIKpYdUd34gp6peXVJKRDqnJy2J1ZhwZ2bXuKVegf/RNBjQ== X-Google-Smtp-Source: AGHT+IENU+rMKC8zDymWsOUlQ4XHR8C9c6wodjyaBV58QRfQudvu6ItUzf98vogVeAckdBHNb2FH X-Received: by 2002:a05:6512:2348:b0:515:9479:a997 with SMTP id p8-20020a056512234800b005159479a997mr3368898lfu.10.1712402107706; Sat, 06 Apr 2024 04:15:07 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712402107; cv=pass; d=google.com; s=arc-20160816; b=thUWckUc8VK2JnWGspHOAc9mjskEuFLxYyvif15jUeFPgJvfz6T2lMitUchpfEZ+od 0DEqgqitXi9s7fPYJXl+rg3pDjm0TyQQHThv86llDwNH7wBY7/Y17RviWRlZdnqcNelG 5QMj6fHDLJdVGG0c7iqeX+FUJsTl2DVdnmCs7XuX2MgIMtRLx/sbyFNa6ObrQl4sOFo8 EHPdJC48GayehAPyDfTMZYg6NkoloqPao4qe3/8vT6Cu+W7nSnvEOZ9yhsXfDu6pvEiA E98cJ8+X/saI0mt5bt0KmNJxZymn3nwoXziJd5q67U3VOt+ONY8XVI2itvBn6srCrvxj gS5A== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:feedback-id:references :in-reply-to:message-id:subject:cc:from:to:date:dkim-signature; bh=LiT0RkSN1jYcw0F40PEh3I31dVargIaYKG8utpP8rWI=; fh=3GVYXf41i6Ekv1B021+oK0E2Bh9aW8M0NnVCRzpsPg8=; b=dUlnrIRjYZ9yWtwYRHMO6ENn6k0VvwgcP+WXFu5hoK2pZNem+jZzrjKRJt6vwA7nRx z3//oKDBQBqBNKuqM9OWPqfXW6wSV8aP3yA8bTbCs2n3/Cf+mEPR0L3T76JpLYc8x6We 0Wbc2XvtAXp+76QJsg5gMEY9nPuKx2UydbhQxnyLMVUrVVqbbxT7XFRDPCXZOPF2IMP9 5ZjQQPO+QGH9JSiE8M7bTs2FztPI9AusrPZNBXq+o6yPzK6kkb9Mheh4DKcu39R/Z2On 3Fe1biXf1XqVzteWhMWoah9wxZyEFWDC6n4k85MhC3wWVNfZ1PpCHT2wwOZJm8iL79U+ ilyQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@protonmail.com header.s=protonmail3 header.b=Bi96cy62; arc=pass (i=1 spf=pass spfdomain=protonmail.com dkim=pass dkdomain=protonmail.com dmarc=pass fromdomain=protonmail.com); spf=pass (google.com: domain of linux-kernel+bounces-133903-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-133903-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=protonmail.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id y20-20020a1709060a9400b00a474ef5ecc7si1632654ejf.428.2024.04.06.04.15.07 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 06 Apr 2024 04:15:07 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-133903-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@protonmail.com header.s=protonmail3 header.b=Bi96cy62; arc=pass (i=1 spf=pass spfdomain=protonmail.com dkim=pass dkdomain=protonmail.com dmarc=pass fromdomain=protonmail.com); spf=pass (google.com: domain of linux-kernel+bounces-133903-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-133903-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=protonmail.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 6250F1F21ECE for ; Sat, 6 Apr 2024 11:15:07 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 50BF02E620; Sat, 6 Apr 2024 11:14:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=protonmail.com header.i=@protonmail.com header.b="Bi96cy62" Received: from mail-40141.protonmail.ch (mail-40141.protonmail.ch [185.70.40.141]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 074CA2C1A6 for ; Sat, 6 Apr 2024 11:14:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.70.40.141 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712402094; cv=none; b=p4KcQWVZUyNY8/7v4hTu418/uMeHm8BLvzXeRZMnVQwX+XvJ1S+bbuMympE+mVmw/KZETn9KqClgqiOBfO1x9IMvGhBxfEreA4sm+ZzYODxGc0Rmp8cgRSzXgNSAxknkTtQ/rNS5UDG0GpkSrzTt19QxfPsqH0enAkQbdFiyFMY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712402094; c=relaxed/simple; bh=QPouy+txxaEadd0avJYA4wF5PBAXuT97/zgLOuEIY4c=; h=Date:To:From:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=q3FmucIlviIJySDMkgt+xuhU1VYJU0+TTa84J+XIe4HsQXL4qhM+g0VxNtAzxr7apueGSQVf8IpVkk1wx6GH71wBtwv0ykKJyln3u4L9K5gzFqTsKg7Fs/PcUZ98YaskG9YENXmcRxUp5IGQTviXnG2ghzhG1jPKhGPSZjzUOgM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=protonmail.com; spf=pass smtp.mailfrom=protonmail.com; dkim=pass (2048-bit key) header.d=protonmail.com header.i=@protonmail.com header.b=Bi96cy62; arc=none smtp.client-ip=185.70.40.141 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=protonmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=protonmail.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail3; t=1712402090; x=1712661290; bh=LiT0RkSN1jYcw0F40PEh3I31dVargIaYKG8utpP8rWI=; h=Date:To:From:Cc:Subject:Message-ID:In-Reply-To:References: Feedback-ID:From:To:Cc:Date:Subject:Reply-To:Feedback-ID: Message-ID:BIMI-Selector; b=Bi96cy62m5/WXXOh2IMomjvLWA64PkESFO25kr95ZW5w5bEuD8S1iN1lVR79h5Gz/ n6Uzffs80bTYz7EAOl3IqsCnGBV1RL6azFWwNjYNIVXR2C17X3oaKgBZYUVz3BEYbw UserCgYKKaQvmb2n57nDb9clXvXLuav6+vS3AXf1I88sFE/CbslbdQ17565Cf8/vE+ vmWY20kuUvcN5VwezBVgU592XrFAuaCK5TGfUGgzyEqt8wApKOHTXB4pqF0KdKj8T4 1Tmp5yVoqY3780Ux1bQMs4dfA7+ByElFCBakY7yJc56vo0NMOKtc7NLked95hkf2v9 2Cf6sq3XzBEJQ== Date: Sat, 06 Apr 2024 11:14:45 +0000 To: linux-kernel@vger.kernel.org From: Raymond Hackley Cc: 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, Siddharth Manthan Subject: [PATCH v2 2/3] arm64: dts: qcom: msm8916-samsung-fortuna: Add LSM303C accelerometer/magnetometer Message-ID: <20240406111348.14358-3-raymondhackley@protonmail.com> In-Reply-To: <20240406111348.14358-1-raymondhackley@protonmail.com> References: <20240406111348.14358-1-raymondhackley@protonmail.com> Feedback-ID: 49437091:user:proton Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable From: Siddharth Manthan Some Grand Prime use a ST LSM303C accelerometer/magnetometer combo. Add support for it. Signed-off-by: Siddharth Manthan [Stephan: Move sensors to common dtsi (disabled by default)] Signed-off-by: Stephan Gerhold [Raymond: Use interrupts-extended] Signed-off-by: Raymond Hackley --- .../dts/qcom/msm8216-samsung-fortuna3g.dts | 8 +++++ .../qcom/msm8916-samsung-fortuna-common.dtsi | 33 +++++++++++++++++++ 2 files changed, 41 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/msm8216-samsung-fortuna3g.dts b/arch/= arm64/boot/dts/qcom/msm8216-samsung-fortuna3g.dts index 366914be7d53..e7f6df229f9a 100644 --- a/arch/arm64/boot/dts/qcom/msm8216-samsung-fortuna3g.dts +++ b/arch/arm64/boot/dts/qcom/msm8216-samsung-fortuna3g.dts @@ -9,3 +9,11 @@ / { =09compatible =3D "samsung,fortuna3g", "qcom,msm8916"; =09chassis-type =3D "handset"; }; + +&st_accel { +=09status =3D "okay"; +}; + +&st_magn { +=09status =3D "okay"; +}; diff --git a/arch/arm64/boot/dts/qcom/msm8916-samsung-fortuna-common.dtsi b= /arch/arm64/boot/dts/qcom/msm8916-samsung-fortuna-common.dtsi index b6e1fe8b0056..17d21949dfec 100644 --- a/arch/arm64/boot/dts/qcom/msm8916-samsung-fortuna-common.dtsi +++ b/arch/arm64/boot/dts/qcom/msm8916-samsung-fortuna-common.dtsi @@ -152,6 +152,39 @@ bosch_magn: magnetometer@12 { =20 =09=09status =3D "disabled"; =09}; + +=09st_accel: accelerometer@1d { +=09=09compatible =3D "st,lsm303c-accel"; +=09=09reg =3D <0x1d>; +=09=09interrupts-extended =3D <&tlmm 115 IRQ_TYPE_LEVEL_HIGH>; + +=09=09vdd-supply =3D <&pm8916_l17>; +=09=09vddio-supply =3D <&pm8916_l5>; + +=09=09pinctrl-0 =3D <&accel_int_default>; +=09=09pinctrl-names =3D "default"; + +=09=09st,drdy-int-pin =3D <1>; +=09=09mount-matrix =3D "0", "-1", "0", +=09=09=09 "1", "0", "0", +=09=09=09 "0", "0", "-1"; + +=09=09status =3D "disabled"; +=09}; + +=09st_magn: magnetometer@1e { +=09=09compatible =3D "st,lsm303c-magn"; +=09=09reg =3D <0x1e>; + +=09=09vdd-supply =3D <&pm8916_l17>; +=09=09vddio-supply =3D <&pm8916_l5>; + +=09=09mount-matrix =3D "0", "-1", "0", +=09=09=09 "1", "0", "0", +=09=09=09 "0", "0", "-1"; + +=09=09status =3D "disabled"; +=09}; }; =20 &blsp_i2c4 { --=20 2.39.2