From patchwork Sat Nov 19 19:48:04 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Lin, Meng-Bo" X-Patchwork-Id: 626928 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 D19F0C43217 for ; Sat, 19 Nov 2022 19:48:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234404AbiKSTsL (ORCPT ); Sat, 19 Nov 2022 14:48:11 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59734 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234152AbiKSTsK (ORCPT ); Sat, 19 Nov 2022 14:48:10 -0500 Received: from mail-40137.protonmail.ch (mail-40137.protonmail.ch [185.70.40.137]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 618031409B for ; Sat, 19 Nov 2022 11:48:09 -0800 (PST) Date: Sat, 19 Nov 2022 19:48:04 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail3; t=1668887287; x=1669146487; bh=RZgjb9/5OQctpPzuTFDZDZE4FEfMwb4kqi0lsraby84=; 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=bmjXCh6r4dYxxZyWdbMlYrDOJ9FCxeTzDr8SoarfS1ALYHHP1BCEYF7NbMOrz5ipM 6G4n6+d52N/gRuz7aLalCrtIwHOaEsa+20EPdZosQGYsZq7478ekYKWTu/FrxWux4k vQR+HU5zwtuZl+JAavxXffNsGbtEWVH7/zrGMr43FFah2Prh/29ot2JfIniOuiN98V ip+HPV7DvrB1/FcEXk43pW3FY2r1M47o/bXNPXM2T7s9gLfjxaXr7Ip796/U1pNMWy R6SVPXWiGqbMdbNMmaotlkYqznbdaasbGlAGxwrKW5Gnwk9u9odeoq9Pafz13aKrwr Y9rDY9XvvaASw== To: linux-kernel@vger.kernel.org From: "Lin, Meng-Bo" Cc: Andy Gross , Bjorn Andersson , Konrad Dybcio , Rob Herring , Krzysztof Kozlowski , Stephan Gerhold , Nikita Travkin , devicetree@vger.kernel.org, linux-arm-msm@vger.kernel.org, ~postmarketos/upstreaming@lists.sr.ht Subject: [PATCH 3/3] arm64: dts: qcom: msm8916-acer-a1-724: Add accelerometer/magnetometer Message-ID: <20221119194727.92107-1-linmengbo0689@protonmail.com> In-Reply-To: <20221119194340.91789-1-linmengbo0689@protonmail.com> References: <20221119194340.91789-1-linmengbo0689@protonmail.com> Feedback-ID: 40467236:user:proton MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Iconia Talk S 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 Reviewed-by: Konrad Dybcio --- .../boot/dts/qcom/msm8916-acer-a1-724.dts | 38 +++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/msm8916-acer-a1-724.dts b/arch/arm64/boot/dts/qcom/msm8916-acer-a1-724.dts index acd909551a75..3461a39ee866 100644 --- a/arch/arm64/boot/dts/qcom/msm8916-acer-a1-724.dts +++ b/arch/arm64/boot/dts/qcom/msm8916-acer-a1-724.dts @@ -6,6 +6,7 @@ #include #include +#include /* * NOTE: The original firmware from Acer can only boot 32-bit kernels. @@ -51,6 +52,35 @@ usb_id: usb-id { }; }; +&blsp_i2c2 { + status = "okay"; + + accelerometer@10 { + compatible = "bosch,bmc150_accel"; + reg = <0x10>; + interrupt-parent = <&msmgpio>; + interrupts = <115 IRQ_TYPE_EDGE_RISING>; + + vdd-supply = <&pm8916_l17>; + vddio-supply = <&pm8916_l6>; + + pinctrl-names = "default"; + pinctrl-0 = <&accel_int_default>; + + mount-matrix = "0", "-1", "0", + "-1", "0", "0", + "0", "0", "1"; + }; + + magnetometer@12 { + compatible = "bosch,bmc150_magn"; + reg = <0x12>; + + vdd-supply = <&pm8916_l17>; + vddio-supply = <&pm8916_l6>; + }; +}; + &blsp1_uart2 { status = "okay"; }; @@ -199,6 +229,14 @@ l18 { }; &msmgpio { + accel_int_default: accel-int-default-state { + pins = "gpio115"; + function = "gpio"; + + drive-strength = <2>; + bias-disable; + }; + gpio_keys_default: gpio-keys-default-state { pins = "gpio107"; function = "gpio";