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: 23309 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp851243wrr; Sat, 19 Nov 2022 12:09:01 -0800 (PST) X-Google-Smtp-Source: AA0mqf4jEIKnlwNyM+tU9JQrN5mCjS8talIlCBg5JzVvAnng0zVjAdSks02yMKys51eCNOLUXy69 X-Received: by 2002:a17:90b:2544:b0:20a:f341:4ed9 with SMTP id nw4-20020a17090b254400b0020af3414ed9mr19383494pjb.11.1668888541656; Sat, 19 Nov 2022 12:09:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668888541; cv=none; d=google.com; s=arc-20160816; b=T1QEo6Le0DLQ0UKoMa+KAqevVRJaJcgM9Rkxt0YdhHwYF1ISpPjWvnCR3hpi8yqhjl YV2s5h+ZMDWUFmWf4dp6Ha5/CudgESk1MrBvzOzv+mhYWjxPkYlBnQYL0LP1AbF45cuT lim7t4W+iTQsKII8APllcx4iLKwbMHy9XeN9ndj3g1U6l7J/r4cvygNXGuQsI4o8ObjM uDxtjMmYzMyabN4AepiiwYHA8IfcaU0Nd4gYaoQXHWrPS6VmSAO02jpjiF1WY9HNTfYB dIN/8H/MN4CIWf8XXDJTLqoITkOQGgUj/OEYKtf+R1WcjAIzxrwq8aOA7cohiODYuSem VX3w== 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=RZgjb9/5OQctpPzuTFDZDZE4FEfMwb4kqi0lsraby84=; b=g5n4R6N5WHQA8nwt8Um/fJ9qfxJidFag8C9qs6o4+uYUwLjbMHvSc/t9cUufLzSeLQ GiOp5RLqAEhwsIbx2MotmQBC+HqkFmkEnrLQQUMjRnZJ7ixjjv4ZeIhAz1p1njdYZVXs 2t0H3BFYr+p4DREIKvRaImm/zszcvIP9JCg3+nzRIk29kqYMvn8x/3HxaWJLGRyHGLkt z3VotGiW5AILPE9QALvg2Xqg9so0ZrhCtPzwfKcJdifQdAhJ5Xwr25qYQsImd7ZP6eS0 m0fgrO1v8wlTJ7ra2TsOzK8/kJOJ7q9gc6U7sb8i9BhbqfGnyxRKMmn3A/UBb4iB1152 y++g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@protonmail.com header.s=protonmail3 header.b=bmjXCh6r; 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: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id g11-20020a63520b000000b00473d2c2c082si7540665pgb.361.2022.11.19.12.08.48; Sat, 19 Nov 2022 12:09:01 -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=@protonmail.com header.s=protonmail3 header.b=bmjXCh6r; 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 S234551AbiKSTsQ (ORCPT + 99 others); Sat, 19 Nov 2022 14:48:16 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59738 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234219AbiKSTsK (ORCPT ); Sat, 19 Nov 2022 14:48:10 -0500 Received: from mail-4027.protonmail.ch (mail-4027.protonmail.ch [185.70.40.27]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A4CFC140A2 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 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_H2,SPF_HELO_PASS,SPF_PASS 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1749956471441236672?= X-GMAIL-MSGID: =?utf-8?q?1749956471441236672?= 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";