From: "Lin, Meng-Bo" <linmengbo0689@protonmail.com>
To: linux-kernel@vger.kernel.org
Cc: Andy Gross <agross@kernel.org>,
Bjorn Andersson <andersson@kernel.org>,
Konrad Dybcio <konrad.dybcio@linaro.org>,
Rob Herring <robh+dt@kernel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
Stephan Gerhold <stephan@gerhold.net>,
Nikita Travkin <nikita@trvn.ru>,
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
Date: Sat, 19 Nov 2022 19:48:04 +0000 [thread overview]
Message-ID: <20221119194727.92107-1-linmengbo0689@protonmail.com> (raw)
In-Reply-To: <20221119194340.91789-1-linmengbo0689@protonmail.com>
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 <linmengbo0689@protonmail.com>
---
.../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 <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
+#include <dt-bindings/interrupt-controller/irq.h>
/*
* 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";
--
2.30.2
next prev parent reply other threads:[~2022-11-19 19:48 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-19 19:44 [PATCH 0/3] arm64: dts: qcom: msm8916-acer-a1-724: Add initial device tree Lin, Meng-Bo
2022-11-19 19:48 ` [PATCH 1/3] dt-bindings: qcom: Document bindings for new msm8916-acer-a7-724 device Lin, Meng-Bo
2022-11-21 9:17 ` Krzysztof Kozlowski
2022-11-19 19:48 ` Lin, Meng-Bo [this message]
2022-11-21 11:24 ` [PATCH 3/3] arm64: dts: qcom: msm8916-acer-a1-724: Add accelerometer/magnetometer Konrad Dybcio
2022-11-19 19:48 ` [PATCH 2/3] arm64: dts: qcom: msm8916-acer-a1-724: Add initial device tree Lin, Meng-Bo
2022-11-21 11:25 ` Konrad Dybcio
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20221119194727.92107-1-linmengbo0689@protonmail.com \
--to=linmengbo0689@protonmail.com \
--cc=agross@kernel.org \
--cc=andersson@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=konrad.dybcio@linaro.org \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=nikita@trvn.ru \
--cc=robh+dt@kernel.org \
--cc=stephan@gerhold.net \
--cc=~postmarketos/upstreaming@lists.sr.ht \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).