linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jonathan Albrieux <jonathan.albrieux@gmail.com>
To: linux-kernel@vger.kernel.org
Cc: ~postmarketos/upstreaming@lists.sr.ht, stephan@gerhold.net,
	Jonathan Albrieux <jonathan.albrieux@gmail.com>,
	Andy Gross <agross@kernel.org>,
	Bjorn Andersson <bjorn.andersson@linaro.org>,
	Rob Herring <robh+dt@kernel.org>,
	linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org
Subject: [PATCH 3/3] arm64: dts: qcom: msm8916-longcheer-l8910: Add imu/magnetometer
Date: Sun, 24 Jan 2021 14:54:07 +0100	[thread overview]
Message-ID: <20210124135409.5473-4-jonathan.albrieux@gmail.com> (raw)
In-Reply-To: <20210124135409.5473-1-jonathan.albrieux@gmail.com>

BQ Aquaris X5 (Longcheer L8910) has:
 - BMI160 accelerometer and gyroscope sensor
 - AK09911 magnetometer sensor
Add them to the device tree.

This patch depends on patch "arm64: dts: qcom: msm8916: Add blsp_i2c3".

Signed-off-by: Jonathan Albrieux <jonathan.albrieux@gmail.com>
---
 .../boot/dts/qcom/msm8916-longcheer-l8910.dts | 37 +++++++++++++++++++
 1 file changed, 37 insertions(+)

diff --git a/arch/arm64/boot/dts/qcom/msm8916-longcheer-l8910.dts b/arch/arm64/boot/dts/qcom/msm8916-longcheer-l8910.dts
index 7d5eff922f41..c3933ec0f116 100644
--- a/arch/arm64/boot/dts/qcom/msm8916-longcheer-l8910.dts
+++ b/arch/arm64/boot/dts/qcom/msm8916-longcheer-l8910.dts
@@ -56,6 +56,35 @@
 	};
 };
 
+&blsp_i2c3 {
+	status = "okay";
+
+	imu@68 {
+		compatible = "bosch,bmi160";
+		reg = <0x68>;
+
+		vdd-supply = <&pm8916_l17>;
+		vddio-supply = <&pm8916_l6>;
+
+		mount-matrix = "0", "1", "0",
+			      "-1", "0", "0",
+			       "0", "0", "1";
+	};
+
+	magnetometer@d {
+		compatible = "asahi-kasei,ak09911";
+		reg = <0x0d>;
+
+		vdd-supply = <&pm8916_l17>;
+		vid-supply = <&pm8916_l6>;
+
+		reset-gpios = <&msmgpio 111 GPIO_ACTIVE_LOW>;
+
+		pinctrl-names = "default";
+		pinctrl-0 = <&mag_reset_default>;
+	};
+};
+
 &blsp1_uart2 {
 	status = "okay";
 };
@@ -220,6 +249,14 @@
 		bias-pull-up;
 	};
 
+	mag_reset_default: mag-reset-default {
+		pins = "gpio111";
+		function = "gpio";
+
+		drive-strength = <2>;
+		bias-disable;
+	};
+
 	usb_id_default: usb-id-default {
 		pins = "gpio110";
 		function = "gpio";
-- 
2.17.1


  parent reply	other threads:[~2021-01-24 13:58 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-24 13:54 [PATCH 0/3] Add initial support for BQ Aquaris X5 Jonathan Albrieux
2021-01-24 13:54 ` [PATCH 1/3] arm64: dts: qcom: Add device tree for BQ Aquaris X5 (Longcheer L8910) Jonathan Albrieux
2021-01-24 15:12   ` Konrad Dybcio
2021-01-24 15:45     ` Stephan Gerhold
2021-01-24 13:54 ` [PATCH 2/3] arm64: dts: qcom: msm8916: Add blsp_i2c3 Jonathan Albrieux
2021-01-24 15:09   ` Konrad Dybcio
2021-01-24 15:52   ` Stephan Gerhold
2021-01-24 13:54 ` Jonathan Albrieux [this message]
2021-01-24 15:07   ` [PATCH 3/3] arm64: dts: qcom: msm8916-longcheer-l8910: Add imu/magnetometer Konrad Dybcio
2021-01-24 15:51     ` Stephan Gerhold
2021-01-24 19:49       ` Jonathan Albrieux
2021-01-28  4:22         ` Bjorn Andersson
2021-01-24 21:01 ` [PATCH 0/3] Add initial support for BQ Aquaris X5 Pavel Machek
2021-01-24 21:49   ` Stephan Gerhold
2021-01-27 22:24     ` Pavel Machek
2021-01-28  9:27       ` Stephan Gerhold
2021-02-02 13:13         ` Pavel Machek

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=20210124135409.5473-4-jonathan.albrieux@gmail.com \
    --to=jonathan.albrieux@gmail.com \
    --cc=agross@kernel.org \
    --cc=bjorn.andersson@linaro.org \
    --cc=devicetree@vger.kernel.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --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).