arm64: dts: qcom: msm8916-samsung-fortuna: Add BMC150 accelerometer/magnetometer

Some Grand Prime use 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: Joe Mason <buddyjojo06@outlook.com>
[Stephan: Move sensors to common dtsi, disabled by default]
Signed-off-by: Stephan Gerhold <stephan@gerhold.net>
[Raymond: Add it to grandprimelte. Use interrupts-extended]
Signed-off-by: Raymond Hackley <raymondhackley@protonmail.com>
Link: https://lore.kernel.org/r/20240406111348.14358-2-raymondhackley@protonmail.com
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
This commit is contained in:
Joe Mason
2024-04-06 11:14:28 +00:00
committed by Bjorn Andersson
parent 0ae1bf2e09
commit a204bf3fb7
3 changed files with 60 additions and 0 deletions

View File

@@ -123,6 +123,43 @@
};
};
&blsp_i2c2 {
/* Available sensors vary depending on model variant */
status = "okay";
bosch_accel: accelerometer@10 {
compatible = "bosch,bmc150_accel";
reg = <0x10>;
interrupts-extended = <&tlmm 115 IRQ_TYPE_EDGE_RISING>;
vdd-supply = <&pm8916_l5>;
vddio-supply = <&pm8916_l5>;
pinctrl-0 = <&accel_int_default>;
pinctrl-names = "default";
mount-matrix = "0", "-1", "0",
"-1", "0", "0",
"0", "0", "1";
status = "disabled";
};
bosch_magn: magnetometer@12 {
compatible = "bosch,bmc150_magn";
reg = <0x12>;
vdd-supply = <&pm8916_l5>;
vddio-supply = <&pm8916_l5>;
mount-matrix = "0", "-1", "0",
"-1", "0", "0",
"0", "0", "1";
status = "disabled";
};
};
&blsp_i2c4 {
status = "okay";
@@ -229,6 +266,13 @@
};
&tlmm {
accel_int_default: accel-int-default-state {
pins = "gpio115";
function = "gpio";
drive-strength = <2>;
bias-disable;
};
backlight_en_default: backlight-en-default-state {
pins = "gpio98";
function = "gpio";

View File

@@ -21,6 +21,14 @@
};
};
&bosch_accel {
status = "okay";
};
&bosch_magn {
status = "okay";
};
&mpss_mem {
/* Firmware for gprimeltecan needs more space */
reg = <0x0 0x86800000 0x0 0x5400000>;

View File

@@ -10,6 +10,14 @@
chassis-type = "handset";
};
&bosch_accel {
status = "okay";
};
&bosch_magn {
status = "okay";
};
&mpss_mem {
/* Firmware for grandprimelte needs more space */
reg = <0x0 0x86800000 0x0 0x5400000>;