From patchwork Tue Nov 22 13:32:13 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: 24373 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp2201715wrr; Tue, 22 Nov 2022 05:34:08 -0800 (PST) X-Google-Smtp-Source: AA0mqf5b6Ilm529bD5Y++opGf+Jq7WFA3fNv2Cr2qtXsXKG7hNvsNrA4kILz0iy2T2npMrzVew36 X-Received: by 2002:a17:90a:5c85:b0:20a:92d2:226a with SMTP id r5-20020a17090a5c8500b0020a92d2226amr14284890pji.155.1669124048032; Tue, 22 Nov 2022 05:34:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669124048; cv=none; d=google.com; s=arc-20160816; b=MnRtR88xhq1/3MPmWMMqa2x2NtcWqsetZKAOOxoEd4Y8mLBFtKEVMkbAp8xyFmfZYk xUxXup5NSnJHk+9tk9aRL/WTcMH4Xuf8LwJTl0PHo9zQvlkPxzEcg1GG1lXWe1LivOhq 2DM6CrMTfUC/wDGSIXeh4E7p/Z93eN7c3Ew2ml28J6ZrlWCSLu8Z5id4RaiJg35Gs9eK Bxh1ZjB+Zr+oyJcgW/ffpqW9jxrtmVI/FNDroaHMYJaqN1i7MJyQ6z8qsP+YIwO8BLg1 ijHZcJTg4deehFvg3NSlYM7HfId9U2wo42iStjBZ+kDA5s0qoomKRV1ybbf+NKnyPx8T cubA== 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=AhqCCaLvPKm6+EzCNox2qptaiFM8dp9eaZqm0qf77Bk=; b=ksHbV8wMAeb5fn3K31hHIPvArEtJcP6//68GnLa3mY2Vv3kis7xaBHw/Uw9ABfQALs SYy7+QnnD3Py7v5tpRUou1XWdVO08iumwL2CqQ/dRJxlvKvy+3T+pwyLDRXi3PCIpd2E PSPB8hNdhaPzhtX6wS1fWGt0r5c6fsgOYRVP74ak8kOeDpM9iWw999gm6CIDp9aIxV+v LjwQ7XOzqkeLjgCTqbnZPTRLuPUwqNHqUqVJVPMpRawhy9YGUiFfjEWddEv3AYLF0sFM uhcIOuNsy2nk/5+d8QC7l4c9wupRxEYVQfXV3+bfL/kdbsNcnr0T1v4bLVMK2xIUmxH8 +f9w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@protonmail.com header.s=protonmail3 header.b=g2rNv+tJ; 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 h184-20020a636cc1000000b00476d0c7b644si12878515pgc.290.2022.11.22.05.33.53; Tue, 22 Nov 2022 05:34:08 -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=g2rNv+tJ; 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 S233027AbiKVNcj (ORCPT + 99 others); Tue, 22 Nov 2022 08:32:39 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60242 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233773AbiKVNcc (ORCPT ); Tue, 22 Nov 2022 08:32:32 -0500 Received: from mail-4318.protonmail.ch (mail-4318.protonmail.ch [185.70.43.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F3C8065E58; Tue, 22 Nov 2022 05:32:24 -0800 (PST) Date: Tue, 22 Nov 2022 13:32:13 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail3; t=1669123942; x=1669383142; bh=AhqCCaLvPKm6+EzCNox2qptaiFM8dp9eaZqm0qf77Bk=; 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=g2rNv+tJKdEyOLDJyUjMOa3+5ZPzUD3TPLHn07JiiHLF8fCdfQiOyoec71DvLzitO kZbzh81cKWq9Rn/ts+PCqvTwLUMypWI495iM0FcHl12tF75Mo1IHVgzgQ4MxrqgE4d K4tM1HR6Hu87NcRwiLMcWbVQulCi714O9oTeEYLIGsMEMI4SKz7QZkSE2kjSlM15KA eGN0ecFqUqJ+9XQSF8ZsFYLm2V3xygAX0086Hej5FijiY61H60O9AsFXaMRg6C5zgc nDxEgtnk++sLT++lcNKCU/kp4WZ7dp3GFa7JXX5fu+m50V6ft6ifwLLKu7I/enEeTo XtsjC4rNygt/Q== 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: [RESEND PATCH v5 3/4] arm64: dts: qcom: msm8916-acer-a1-724: Add accelerometer/magnetometer Message-ID: <20221122133132.258303-1-linmengbo0689@protonmail.com> In-Reply-To: <20221122132816.257717-1-linmengbo0689@protonmail.com> References: <20221122132816.257717-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,SPF_HELO_PASS,SPF_PASS autolearn=ham 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?1750203417889118725?= X-GMAIL-MSGID: =?utf-8?q?1750203417889118725?= 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 593051ea92b6..bea0d022dd9a 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";