From patchwork Sat Nov 19 20:46:32 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: 23330 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp862793wrr; Sat, 19 Nov 2022 12:51:31 -0800 (PST) X-Google-Smtp-Source: AA0mqf7O/EtQqj0amm5dHjQ2VYp/uBzwbt0ARfSS2kDWsWK+EpF3fxFg+rPCwv49NFUCVOBP6T28 X-Received: by 2002:a05:6a02:10c:b0:477:5d14:e2a5 with SMTP id bg12-20020a056a02010c00b004775d14e2a5mr1174579pgb.452.1668891091226; Sat, 19 Nov 2022 12:51:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668891091; cv=none; d=google.com; s=arc-20160816; b=jN2WDmXjYQ+uTIeveUL3n5aAnpDD1t9oGozxSD0flrZiwwUygFm3EelfRjqRaBTWzN zs4znS101JBpga6QMVkq36gOIerkwNE5zn40qHgkbb1d0DKmCX36KCtANd1oOFt1GUiE tRlF9vtk3Y9+caIGw/i4FCJbKEYyzXBvX2zpp6LsPCBPYrb9eQjVIhF0yQopKLmw0TZR CSCcLKYBtZkFoYUtmpKglARAGc4xbAnKHCSdAbteATetEfuGUqauwYqRt3Vo37gl5tcF RZE2nQQKSGSxq2KCMRfe7ZnPObhuE1AgOY+xC2zmpEY1PCSStDYkx21GITOlLUTnslHU ZjJg== 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=JpAdE8EpbAfHOqYrDfb9SmZVMF/N4C1QLKMv6UWTZlIEi0ucofxpj+pAqfQA3gClSo GF4ciMAKY7VOvcjrVuAIdcaGk1qqDWYAXBzDF946exJUljPWYWx3i+DOwwz/yIjwBYQR OSxNK5C30xJFZTUdc1qZpv/AudpcmVi+a937Mt8ojUayS4CA9J5afiHb5mMsNZ3++iXB HzLaEc8cYiEBS4E+YyQUItlkcHWcsNLr+YsdrJzSFJ9Sl6uDSvtXdfm1FcZnX160UWUp ceye8iU1kNtMx5j9ZmDqaS3HW8Xczn7KidFC8I4a2QlkcAnn596f8ut/qDcmDEjHRD06 09+Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@protonmail.com header.s=protonmail3 header.b=ARKQ8VA9; 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 x5-20020a654145000000b00476bfc9e1f5si7089271pgp.610.2022.11.19.12.51.17; Sat, 19 Nov 2022 12:51:31 -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=ARKQ8VA9; 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 S235099AbiKSUqr (ORCPT + 99 others); Sat, 19 Nov 2022 15:46:47 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51548 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235049AbiKSUqo (ORCPT ); Sat, 19 Nov 2022 15:46:44 -0500 Received: from mail-4324.protonmail.ch (mail-4324.protonmail.ch [185.70.43.24]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D1AC313D21; Sat, 19 Nov 2022 12:46:42 -0800 (PST) Date: Sat, 19 Nov 2022 20:46:32 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail3; t=1668890800; x=1669150000; 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=ARKQ8VA9knhvcAfXpsxDnxrvqNwZOf1eeKlNoLCZILlbyINeCmEyiGBmm3yOIzHND rs+0f/vrgcVtTdKQO58lwfH8N9hSjeU1oQtKAyW8vh8oRfAMWuNblgHmBzZjXXrBqD 4eJfFC7RntzQedsBVPZ0CyDPLu4WJr8/6u2uirxeIgod1EuBxKRHq0Qxa152g8GTSd uXLX11E1cMFF9Ddg2BkpB1fRMUi94M2rDMYQek29QPDr1Vlp8Qm4W2OZDLLFP0uVKH Eahkap9GnP3C4uVFZ0L50KQ7qI0sywNMnanQGVuz3a1PdiVdw8i0VdVhJAzLIIKR1O IUMUaw3Fd4GWg== 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 v2 3/3] arm64: dts: qcom: msm8916-acer-a1-724: Add accelerometer/magnetometer Message-ID: <20221119204424.94341-1-linmengbo0689@protonmail.com> In-Reply-To: <20221119204209.94125-1-linmengbo0689@protonmail.com> References: <20221119204209.94125-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?1749959144691030893?= X-GMAIL-MSGID: =?utf-8?q?1749959144691030893?= 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 --- .../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";