From patchwork Mon Nov 21 00:46:39 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: 23499 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp1329180wrr; Sun, 20 Nov 2022 16:55:11 -0800 (PST) X-Google-Smtp-Source: AA0mqf5tUkiOt0qB6+nEtNlGkDBifVzr5rXlzSSF2g3yS6Oat9kvEHcDHhE6fzfbbrnSgWsyytaN X-Received: by 2002:a17:902:7d93:b0:186:9cf4:e53b with SMTP id a19-20020a1709027d9300b001869cf4e53bmr855296plm.50.1668992111128; Sun, 20 Nov 2022 16:55:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668992111; cv=none; d=google.com; s=arc-20160816; b=gh7ekJ6F+yb7FrmtrTq5JBxj4y5ue+TuK0N+SG8WPgkD+LTCC45ojj6noYvs9TsF8T pct3Z1lgGnXJgIcjJljkI/VGHTIUzEkkVaUucxN5bpnFmixiY6a9ZDCnEfwMzi2n8xTg 6dgV0C65R39/LIaTACJIecx5Me9oYKtrGoqskoU+d8HQBcM0+4EBvanFhr9azPFL36G3 nbBNHruXMJrq7rAarzwQ4VrcNWU9dWAT0xbHYlw7RuYKsCK1Yhpe1zVy0g4WM/RMZhkg f5S0rR7qtbDH8qb9+i5ryXOOa+Wo46abTtm4sD1HXUlvSItiy+mgQu401D12Lq6o5EGZ C3rA== 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=jfqqTP5BWjnX4gaBhfE4ZQlDKqyMGBo+E5+/v+guTYs=; b=c9TuihdG6QWWvfSERvhloK9jdS1t+ULLhBnSdDn7BVYXnhDXPLC/qtAr2wrEFNtFK1 OP+4i/018InGZpvYZln9DkJjzb1kyouRSDuTQT2BSX06eC/GfNjgylzOxZMFtYoKCO4x aMRN1teGjavv7WV61vCzGMn5bex5zCf0bISgUommihTe+ya6pW6qaTFrCUOPFSqHk24T S/S8ahlGLKUL+TgNTUuPwKjkkB/PIYpAEJww0zTWL6V5VJ0YaiYpyk6BUHcK3+Gq8NJR g3tovCapu8aynHxbkAMVF/0Fi8F7pMlWOvXf53fqdlZM2iAuXYvgIZmS+Zas8k640/PR filA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@protonmail.com header.s=protonmail3 header.b="UU/wmmb5"; 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 x15-20020a170902ec8f00b0018890a7e9b5si11109687plg.287.2022.11.20.16.54.58; Sun, 20 Nov 2022 16:55:11 -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="UU/wmmb5"; 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 S229875AbiKUAq6 (ORCPT + 99 others); Sun, 20 Nov 2022 19:46:58 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41914 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229798AbiKUAqs (ORCPT ); Sun, 20 Nov 2022 19:46:48 -0500 Received: from mail-40132.protonmail.ch (mail-40132.protonmail.ch [185.70.40.132]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CC106D105 for ; Sun, 20 Nov 2022 16:46:47 -0800 (PST) Date: Mon, 21 Nov 2022 00:46:39 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail3; t=1668991606; x=1669250806; bh=jfqqTP5BWjnX4gaBhfE4ZQlDKqyMGBo+E5+/v+guTYs=; 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=UU/wmmb5IV9S1hqFyI1b7kbP0tPIEaT+7I9PLm2U1kvjxH+lGbyWMGXJEJ6ijYHi1 L8VsHGQHvUL/RbhtAH1lDGuMWAgohCj9YT9CAtgeRIeV0Quriw0rRHME3uDvZwDzSw 22YRr2RB3d3UCSliHbeAtlId1Oywy0SU5ytPgaMdG4IgEnd4SkLUdCAX7/A57ervg3 4fBoUl4SvaZC9YfnN4TMGQw+xiVGVZ/1DZUv6FjSt8ltO07f5lIfxVMAYkemLBrg6f WazVkPI1H4Q8nAzpI1X6amXWOjea4hjEdJhQpDVO4ko2003IVwSce35UuUjfRFpbvW wIRhkXtP9Abfg== 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, Krzysztof Kozlowski Subject: [PATCH v3 1/3] dt-bindings: qcom: Document msm8916-acer-a1-724 Message-ID: <20221121004539.3670-1-linmengbo0689@protonmail.com> In-Reply-To: <20221121004116.3458-1-linmengbo0689@protonmail.com> References: <20221121004116.3458-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=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?1750065071968110526?= X-GMAIL-MSGID: =?utf-8?q?1750065071968110526?= Document the new acer,a1-724 device tree bindings used in its device tree. Signed-off-by: Lin, Meng-Bo Acked-by: Krzysztof Kozlowski --- Documentation/devicetree/bindings/arm/qcom.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/arm/qcom.yaml b/Documentation/devicetree/bindings/arm/qcom.yaml index 463509f0f23a..83f6748979a9 100644 --- a/Documentation/devicetree/bindings/arm/qcom.yaml +++ b/Documentation/devicetree/bindings/arm/qcom.yaml @@ -180,6 +180,7 @@ properties: - items: - enum: + - acer,a1-724 - alcatel,idol347 - asus,z00l - huawei,g7 From patchwork Mon Nov 21 00:47:01 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: 23500 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp1329226wrr; Sun, 20 Nov 2022 16:55:23 -0800 (PST) X-Google-Smtp-Source: AA0mqf50XNogce0KivVM/+jNKRN2ahHeeeXvQCB/7Yu5OjHLSHEMrNZQ2Z5jldfju7D/VB0p+lDa X-Received: by 2002:a17:90a:f0c2:b0:218:ac70:fdd5 with SMTP id fa2-20020a17090af0c200b00218ac70fdd5mr3558283pjb.123.1668992123562; Sun, 20 Nov 2022 16:55:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668992123; cv=none; d=google.com; s=arc-20160816; b=x1Nd0ANMcG+b7OPDLF3yUHitVteXIaLfz2wgAykcLU7QAk84rxKJU5r3hWeXy7Aere hiVzJtCakMVKjGkp9IM0x4E5XJGgAIi6/MBSR3YcaFKyzhSfC5R6KqFxLuV+l87iylux Stkq49V0uzBZYPgI9gooCwbvfS3x3o/CLppmt/q/eOXdORoZqWlWjtLJksi0boHqElcJ QnGx1LVzTo9u47U94FLicOo6yTHYeP4emGuH9APGDLj3cPtBWxI+WBqBscedsk9PcuN2 fN20YO80Pc7vs2yOck5ToGZsHcRswuaFXeC+gN9lXDx89oQQ8pqhSOTfHwZq9cDP6ahY o37A== 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=VA3MZ+xQ+HOmyjXHTdb+S54PNSI1wccCU5PVxEXv28w=; b=gf1fYALEkWeWoRg2R/X2IYBItUzpy+ggA/3YXToJyVBnhhkf/4DB1J5M/AklFODnwt BS7p9RrPEUBuZGH5xXKHPm2Rl4Csb+Ws2HQ0TeGpYBknKdtIkAA85LIo3uOeTtLXKKE8 FBPNh4HR17JGDaplrPgMp9hjGJ601Z64e7Te53pGhjbIuY4XORW0aPO4J07567n1Nq4m 86Tb0y/6bufjmvYRMXlUAY/uxN15OpHSqjsmgGs3g8Z/FDE8ZOFbHehL/7L/1t/kMQzT OX9NSsHNmK1AQ2F5fmIr+xRq5ZVmjoMR2puB9BsxMzLOH8sVLcA5Q7+uUbcoML/vDMqq 14uQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@protonmail.com header.s=protonmail3 header.b="eM569J7/"; 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 me18-20020a17090b17d200b00213cb58e47bsi6201784pjb.8.2022.11.20.16.55.11; Sun, 20 Nov 2022 16:55:23 -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="eM569J7/"; 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 S229798AbiKUArV (ORCPT + 99 others); Sun, 20 Nov 2022 19:47:21 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42038 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229866AbiKUArL (ORCPT ); Sun, 20 Nov 2022 19:47:11 -0500 Received: from mail-4318.protonmail.ch (mail-4318.protonmail.ch [185.70.43.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D035A1F9C4 for ; Sun, 20 Nov 2022 16:47:09 -0800 (PST) Date: Mon, 21 Nov 2022 00:47:01 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail3; t=1668991628; x=1669250828; bh=VA3MZ+xQ+HOmyjXHTdb+S54PNSI1wccCU5PVxEXv28w=; 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=eM569J7/LB1VmQYLW7bPEPEZ2Abe8uPxkIuz8+9xQh0ADADnh06wMHIdHmnebMm0m NNUbXsToytEQfH3HSdolXIfyU1hOzFUsd/bPkH/1nijuWBk4L/qK7jQkg3E8YUEkPz rcLIF+eYB+HE1deQa1D05ZP/JxQyOvzb6RyWw3M0Upin1kGEpqoMNz0umNk4hw4bd8 v/6n3vjCY/sfasPCEmYMXrmG1GFT4BqOqGgxB4RonjxjsnDf0PGFOV2JYsELVlTEMC LQQp6ZflddXKNXR1klR7XmRcthgehZ48/glzFCKpDYse+dRyrImf0TZq+RWVeXLc69 G/Ga+aEAubFiA== 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 v3 2/3] arm64: dts: qcom: msm8916-acer-a1-724: Add initial device tree Message-ID: <20221121004549.3724-1-linmengbo0689@protonmail.com> In-Reply-To: <20221121004116.3458-1-linmengbo0689@protonmail.com> References: <20221121004116.3458-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?1750064615365177169?= X-GMAIL-MSGID: =?utf-8?q?1750065085067991233?= Acer Iconia Talk S A1-724 is a tablet using the MSM8916 SoC released in 2014. Note: The original firmware from Acer can only boot 32-bit kernels. To boot arm64 kernels it is necessary to flash 64-bit TZ/HYP firmware with EDL, e.g. taken from the DragonBoard 410c. This works because Acer didn't set up (firmware) secure boot. Add a device tree for with initial support for: - GPIO keys - pm8916-vibrator - SDHCI (internal and external storage) - USB Device Mode - UART - WCNSS (WiFi/BT) - Regulators Signed-off-by: Lin, Meng-Bo Reviewed-by: Konrad Dybcio --- arch/arm64/boot/dts/qcom/Makefile | 1 + .../boot/dts/qcom/msm8916-acer-a1-724.dts | 217 ++++++++++++++++++ 2 files changed, 218 insertions(+) create mode 100644 arch/arm64/boot/dts/qcom/msm8916-acer-a1-724.dts diff --git a/arch/arm64/boot/dts/qcom/Makefile b/arch/arm64/boot/dts/qcom/Makefile index afe496a93f94..f38a20074013 100644 --- a/arch/arm64/boot/dts/qcom/Makefile +++ b/arch/arm64/boot/dts/qcom/Makefile @@ -7,6 +7,7 @@ dtb-$(CONFIG_ARCH_QCOM) += ipq6018-cp01-c1.dtb dtb-$(CONFIG_ARCH_QCOM) += ipq8074-hk01.dtb dtb-$(CONFIG_ARCH_QCOM) += ipq8074-hk10-c1.dtb dtb-$(CONFIG_ARCH_QCOM) += ipq8074-hk10-c2.dtb +dtb-$(CONFIG_ARCH_QCOM) += msm8916-acer-a1-724.dtb dtb-$(CONFIG_ARCH_QCOM) += msm8916-alcatel-idol347.dtb dtb-$(CONFIG_ARCH_QCOM) += msm8916-asus-z00l.dtb dtb-$(CONFIG_ARCH_QCOM) += msm8916-huawei-g7.dtb diff --git a/arch/arm64/boot/dts/qcom/msm8916-acer-a1-724.dts b/arch/arm64/boot/dts/qcom/msm8916-acer-a1-724.dts new file mode 100644 index 000000000000..67187673364c --- /dev/null +++ b/arch/arm64/boot/dts/qcom/msm8916-acer-a1-724.dts @@ -0,0 +1,217 @@ +// SPDX-License-Identifier: GPL-2.0-only + +/dts-v1/; + +#include "msm8916-pm8916.dtsi" + +#include +#include + +/* + * NOTE: The original firmware from Acer can only boot 32-bit kernels. + * To boot this device tree using arm64 it is necessary to flash 64-bit + * TZ/HYP firmware (e.g. taken from the DragonBoard 410c). + * See https://wiki.postmarketos.org/wiki/Acer_Iconia_Talk_S_(acer-a1-724) + * for suggested installation instructions. + */ + +/ { + model = "Acer Iconia Talk S A1-724"; + compatible = "acer,a1-724", "qcom,msm8916"; + chassis-type = "tablet"; + + aliases { + serial0 = &blsp1_uart2; + }; + + chosen { + stdout-path = "serial0"; + }; + + gpio-keys { + compatible = "gpio-keys"; + + pinctrl-names = "default"; + pinctrl-0 = <&gpio_keys_default>; + + label = "GPIO Buttons"; + + button-volume-up { + label = "Volume Up"; + gpios = <&msmgpio 107 GPIO_ACTIVE_LOW>; + linux,code = ; + }; + }; + + usb_id: usb-id { + compatible = "linux,extcon-usb-gpio"; + id-gpio = <&msmgpio 110 GPIO_ACTIVE_HIGH>; + pinctrl-names = "default"; + pinctrl-0 = <&usb_id_default>; + }; +}; + +&blsp1_uart2 { + status = "okay"; +}; + +&pm8916_resin { + linux,code = ; + status = "okay"; +}; + +&pm8916_vib { + status = "okay"; +}; + +&pronto { + status = "okay"; +}; + +&sdhc_1 { + pinctrl-names = "default", "sleep"; + pinctrl-0 = <&sdc1_clk_on &sdc1_cmd_on &sdc1_data_on>; + pinctrl-1 = <&sdc1_clk_off &sdc1_cmd_off &sdc1_data_off>; + + status = "okay"; +}; + +&sdhc_2 { + pinctrl-names = "default", "sleep"; + pinctrl-0 = <&sdc2_clk_on &sdc2_cmd_on &sdc2_data_on>; + pinctrl-1 = <&sdc2_clk_off &sdc2_cmd_off &sdc2_data_off>; + + cd-gpios = <&msmgpio 38 GPIO_ACTIVE_HIGH>; + + status = "okay"; +}; + +&usb { + extcon = <&usb_id>, <&usb_id>; + status = "okay"; +}; + +&usb_hs_phy { + extcon = <&usb_id>; +}; + +&smd_rpm_regulators { + vdd_l1_l2_l3-supply = <&pm8916_s3>; + vdd_l4_l5_l6-supply = <&pm8916_s4>; + vdd_l7-supply = <&pm8916_s4>; + + s3 { + regulator-min-microvolt = <1200000>; + regulator-max-microvolt = <1300000>; + }; + + s4 { + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <2100000>; + }; + + l1 { + regulator-min-microvolt = <1225000>; + regulator-max-microvolt = <1225000>; + }; + + l2 { + regulator-min-microvolt = <1200000>; + regulator-max-microvolt = <1200000>; + }; + + l4 { + regulator-min-microvolt = <2050000>; + regulator-max-microvolt = <2050000>; + }; + + l5 { + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + }; + + l6 { + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + }; + + l7 { + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + }; + + l8 { + regulator-min-microvolt = <2850000>; + regulator-max-microvolt = <2900000>; + }; + + l9 { + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + }; + + l10 { + regulator-min-microvolt = <2700000>; + regulator-max-microvolt = <2800000>; + }; + + l11 { + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <2950000>; + regulator-allow-set-load; + regulator-system-load = <200000>; + }; + + l12 { + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <2950000>; + }; + + l13 { + regulator-min-microvolt = <3075000>; + regulator-max-microvolt = <3075000>; + }; + + l14 { + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <3300000>; + }; + + l15 { + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <3300000>; + }; + + l16 { + regulator-min-microvolt = <2900000>; + regulator-max-microvolt = <2900000>; + }; + + l17 { + regulator-min-microvolt = <2850000>; + regulator-max-microvolt = <2850000>; + }; + + l18 { + regulator-min-microvolt = <2700000>; + regulator-max-microvolt = <2700000>; + }; +}; + +&msmgpio { + gpio_keys_default: gpio-keys-default-state { + pins = "gpio107"; + function = "gpio"; + + drive-strength = <2>; + bias-pull-up; + }; + + usb_id_default: usb-id-default-state { + pins = "gpio110"; + function = "gpio"; + + drive-strength = <8>; + bias-pull-up; + }; +}; From patchwork Mon Nov 21 00:47:14 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: 23501 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp1329247wrr; Sun, 20 Nov 2022 16:55:30 -0800 (PST) X-Google-Smtp-Source: AA0mqf523CppmIzqnYlX8FuDKN5bMuxCH6bRn6v3ugl+rEefSGZmK4oubAAURGWKsyfzjmwHzbnO X-Received: by 2002:a17:902:e392:b0:189:1bb0:f23 with SMTP id g18-20020a170902e39200b001891bb00f23mr1880425ple.136.1668992130549; Sun, 20 Nov 2022 16:55:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668992130; cv=none; d=google.com; s=arc-20160816; b=CAENj3PLec98CQrq1eR6sav9VT/19jK58eLyubSXqFVDx2kUVGc1RjDjabpwyh+PaG m4xkXVUsQWojvySCcwVmCH/eHfj0z72Ab+QJDPyi68CQSPsDXnG9pEJ/O3QiJh7qTdFr cOLM5mrnL5FSj3hS7iQVBImeNugC7983Vw3fhEEvjDhbyW9et5V5fdUnMzSfglKLZJdR 39cikNmDyiDzWsQr1SrIFurPEOUFoFkp/zuaS7N0dMdzJ/c8ZMqY1rgqRQIlZApxcEq/ 2zIGWIXUEzmMXKJgqQ4uK/y+tmeR7U/97iqolqC7AKMYbvd10CVGgY+aawdAqxXkZ9I7 uFRw== 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=t2Bd0v8T+bxMK925HrPsTn0a2Qw4xXwWmY/aKNhN7uw=; b=W1Dex34HmTj0f8A5WC+TWOIAbIAgySY7Ckx0kUxkhxJroO6LoWEThCOCPj/6Na5iFU xI26I1Hs3lWezmiHKiZp+6hdogU/8TUryu76diiwpa03jNEsdmccXd4avhhvWuXwgKa8 f/MrHKnJZ6jGwdE51/cBqznAdxHST4Y/8Zs+thbWT5n2jawflraTZs474alHwvGYZxrs Drrjr3JqvsmxPXNcuacDSLT8pGdYe0XrHMbn0TsLb6yZ3Fn1y+Mp3IsMnhdGilajGI5k BLUKt2vrgEATDK9SKl8pYO5iER5QLSEt4aCoVzx6Jwh/fbo9h0NqLsuscexPD8fgEdxM 6aXQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@protonmail.com header.s=protonmail3 header.b=V9krzvvg; 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 27-20020a630e5b000000b0046ed59f63desi9514363pgo.637.2022.11.20.16.55.17; Sun, 20 Nov 2022 16:55:30 -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=V9krzvvg; 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 S229719AbiKUArd (ORCPT + 99 others); Sun, 20 Nov 2022 19:47:33 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42350 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229890AbiKUArX (ORCPT ); Sun, 20 Nov 2022 19:47:23 -0500 Received: from mail-4324.protonmail.ch (mail-4324.protonmail.ch [185.70.43.24]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BB1CE193D0; Sun, 20 Nov 2022 16:47:22 -0800 (PST) Date: Mon, 21 Nov 2022 00:47:14 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail3; t=1668991641; x=1669250841; bh=t2Bd0v8T+bxMK925HrPsTn0a2Qw4xXwWmY/aKNhN7uw=; 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=V9krzvvgzSkK0+xWKFLPGammHdHKA5U+TLY50V4kqMl1Yn2ERranTYow46bTsV+a2 aqsEWr2f7wC5S7gomVjwR94W7b7lqpBVALfhA6U0D55BcsQ3mYv/N8QO34pAMn8Z3s MWNArBM8Y2W/a/DDucP7kMmM9aB1GE+rtbErKLKXO7XLxTfK+XhCvb6nOiJvuW/8LZ l8zLXZUYz8XhhMyAfNas64siKL+O3kIhEmoxgJCg2avmqibjIJPLFouGk9s9jaX1sq 1A41ejWH/+yOmKli2W7t2AGff8DlOEeB0PYjXQHM0ylkz1gmecvs3Cmyxe4DQfFvs0 NPynRqDa83wqw== 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 v3 3/3] arm64: dts: qcom: msm8916-acer-a1-724: Add accelerometer/magnetometer Message-ID: <20221121004559.3778-1-linmengbo0689@protonmail.com> In-Reply-To: <20221121004116.3458-1-linmengbo0689@protonmail.com> References: <20221121004116.3458-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=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?1750065092088011681?= X-GMAIL-MSGID: =?utf-8?q?1750065092088011681?= 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 67187673364c..a87de8af9f15 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";