Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp10237856rwd; Wed, 21 Jun 2023 19:14:24 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7sd5EZE7Us8TZYNT1mfSQTZVC3bCevXRG3+WYCbnniix7mNCNXfnaf22Cg4DwuwlGiKogZ X-Received: by 2002:a05:6358:7018:b0:12b:cdd2:8b33 with SMTP id 24-20020a056358701800b0012bcdd28b33mr7195281rwo.7.1687400064215; Wed, 21 Jun 2023 19:14:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687400064; cv=none; d=google.com; s=arc-20160816; b=g8GUnSptjR5FEtP31ptDVf/zuru+MJ26dKZo6YSBMP+Q+/KcvYuy9htPn2Xwn1LiY+ GMz/gm9ql98e1X+Bym0JQWd/7FG2MeeTxCWNDhUdPXfJHcxckIobMwZ/0jWH2A4FQukj MOJwJOkG23KEwgOgvLvtCth8B71gjIyG0s9cTu7vQlEU3p6YSWrlRzbPl/k9GLSEO/5T BRxgNEGc4Vp/OcfOkhEELPKyU9NNAVWFFMbjp3Hv3R8zCD+Z2pwin8NrBigIGR83bqEO clXusqtU2XxSS0OzAGOsHpGxY4PKQboTYehyQG3K0tfG0uJX9NEY7rBvW+7EnezjXUTz 2jHA== 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 :feedback-id:references:in-reply-to:message-id:subject:cc:from:to :dkim-signature:date; bh=lk0OOcZZqXjPubb5cVQElXeFQG9G1YLjPnDEfHulQPo=; b=s/SbSfM7Ri2lJIYmM5Z7NPn5hJzYTiCam0Fq1JQ0EQy0Deh0wXYZVU4mhN6TuZCSk6 MWiwzYPRrgi55esMrat8pPyJtjYJ7fqDnCaOzyxzBSO6f0yXiWVjdAVNcSU7RZDPmC9a gJLtcuill5HZGAoV1l0o0RhFEISvFHMFITPGnJAiC8xd/ai6voSYA2qBE8rFVsmAa4ax V78q3COXrvFbJNzuFr9G2GL0B490lkeVKNOVd3NOlFUr0TDv9IuWR53o2Nb+BPYeJlxN rKeXfNSbGU/y7q2jCQSzS4sUq/NtU4jh5Apbtj4NRk9lMX/mTZAEITsbrRqO6GWMpdSa QyEA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@protonmail.com header.s=protonmail3 header.b=NBwraWtl; 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=protonmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 66-20020a621845000000b0064388918719si5123211pfy.85.2023.06.21.19.14.12; Wed, 21 Jun 2023 19:14:24 -0700 (PDT) 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=@protonmail.com header.s=protonmail3 header.b=NBwraWtl; 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=protonmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229948AbjFVCFe (ORCPT + 99 others); Wed, 21 Jun 2023 22:05:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34808 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229865AbjFVCFa (ORCPT ); Wed, 21 Jun 2023 22:05:30 -0400 Received: from mail-4318.protonmail.ch (mail-4318.protonmail.ch [185.70.43.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F2A991FC0; Wed, 21 Jun 2023 19:05:25 -0700 (PDT) Date: Thu, 22 Jun 2023 02:05:12 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail3; t=1687399524; x=1687658724; bh=lk0OOcZZqXjPubb5cVQElXeFQG9G1YLjPnDEfHulQPo=; 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=NBwraWtlAcl8HCfMSnJN779/bad9wq4IRTd3gSC+wQi/T1LFJiRLPV2ZZwE7VDPOa 5YkeZ1VbFU/zW2Qbm/1GLvODJvl3/c70VDPhhErr5RX5DV5r8TUmLm3O4bCiyRVeye +dnlrD9+b5+MMkVrFUKXv24uYDrWvlU8wvjF3ZIasvYZhT9H9xXErA70FaUpX5xlOd c2UYgfxoiIgGDd8e3DgvPS7sPxYv8xx0GTNAhCE59XI89ePGrp8nNAlkoWSLbPUlk4 zcvJ2+H/i0m8183jFkcLEEFYrkHW+TtnbuNKZPWCQVDJLJCTliS9xNDoacK0955MBj YDeJB4NeQMf3Q== 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 4/8] arm64: dts: qcom: msm8939-samsung-a7: Add accelerometer/magnetometer Message-ID: <20230622020500.65806-1-linmengbo0689@protonmail.com> In-Reply-To: <20230622020344.65745-1-linmengbo0689@protonmail.com> References: <20230622020344.65745-1-linmengbo0689@protonmail.com> Feedback-ID: 40467236:user:proton MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM,RCVD_IN_MSPIKE_H5,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable 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 A7 uses a Bosch BMC150 accelerometer/magnetometer combo. The chip provides two separate I2C devices for the accelerometer and magnetometer that are already supported by the bmc150-accel and bmc150-magn driver. Signed-off-by: Lin, Meng-Bo --- .../boot/dts/qcom/msm8939-samsung-a7.dts | 51 +++++++++++++++++++ 1 file changed, 51 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/msm8939-samsung-a7.dts b/arch/arm64/b= oot/dts/qcom/msm8939-samsung-a7.dts index 98a2738eb8ea..6a817038a3b9 100644 --- a/arch/arm64/boot/dts/qcom/msm8939-samsung-a7.dts +++ b/arch/arm64/boot/dts/qcom/msm8939-samsung-a7.dts @@ -69,6 +69,43 @@ button-home { =09=09}; =09}; =20 +=09i2c-sensor { +=09=09compatible =3D "i2c-gpio"; +=09=09sda-gpios =3D <&tlmm 84 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>; +=09=09scl-gpios =3D <&tlmm 85 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>; + +=09=09pinctrl-0 =3D <&sensor_i2c_default>; +=09=09pinctrl-names =3D "default"; + +=09=09#address-cells =3D <1>; +=09=09#size-cells =3D <0>; + +=09=09accelerometer: accelerometer@10 { +=09=09=09compatible =3D "bosch,bmc150_accel"; +=09=09=09reg =3D <0x10>; +=09=09=09interrupt-parent =3D <&tlmm>; +=09=09=09interrupts =3D <115 IRQ_TYPE_EDGE_RISING>; + +=09=09=09vdd-supply =3D <&pm8916_l17>; +=09=09=09vddio-supply =3D <&pm8916_l5>; + +=09=09=09pinctrl-0 =3D <&accel_int_default>; +=09=09=09pinctrl-names =3D "default"; + +=09=09=09mount-matrix =3D "-1", "0", "0", +=09=09=09=09=09"0", "-1", "0", +=09=09=09=09=09"0", "0", "1"; +=09=09}; + +=09=09magnetometer@12 { +=09=09=09compatible =3D "bosch,bmc150_magn"; +=09=09=09reg =3D <0x12>; + +=09=09=09vdd-supply =3D <&pm8916_l17>; +=09=09=09vddio-supply =3D <&pm8916_l5>; +=09=09}; +=09}; + =09i2c-tkey { =09=09compatible =3D "i2c-gpio"; =09=09sda-gpios =3D <&tlmm 16 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>; @@ -190,6 +227,13 @@ &wcnss_iris { }; =20 &tlmm { +=09accel_int_default: accel-int-default-state { +=09=09pins =3D "gpio115"; +=09=09function =3D "gpio"; +=09=09drive-strength =3D <2>; +=09=09bias-disable; +=09}; + =09gpio_hall_sensor_default: gpio-hall-sensor-default-state { =09=09pins =3D "gpio52"; =09=09function =3D "gpio"; @@ -218,6 +262,13 @@ sdc2_cd_default: sdc2-cd-default-state { =09=09bias-pull-up; =09}; =20 +=09sensor_i2c_default: sensor-i2c-default-state { +=09=09pins =3D "gpio84", "gpio85"; +=09=09function =3D "gpio"; +=09=09drive-strength =3D <2>; +=09=09bias-disable; +=09}; + =09tkey_default: tkey-default-state { =09=09pins =3D "gpio20"; =09=09function =3D "gpio"; --=20 2.39.2