Commit a204bf3f authored by Joe Mason's avatar Joe Mason Committed by Bjorn Andersson

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: default avatarJoe Mason <buddyjojo06@outlook.com>
[Stephan: Move sensors to common dtsi, disabled by default]
Signed-off-by: default avatarStephan Gerhold <stephan@gerhold.net>
[Raymond: Add it to grandprimelte. Use interrupts-extended]
Signed-off-by: default avatarRaymond Hackley <raymondhackley@protonmail.com>
Link: https://lore.kernel.org/r/20240406111348.14358-2-raymondhackley@protonmail.comSigned-off-by: default avatarBjorn Andersson <andersson@kernel.org>
parent 0ae1bf2e
......@@ -123,6 +123,43 @@ usb_con: connector {
};
};
&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 @@ &wcnss_mem {
};
&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";
......
......@@ -21,6 +21,14 @@ tz-apps@85500000 {
};
};
&bosch_accel {
status = "okay";
};
&bosch_magn {
status = "okay";
};
&mpss_mem {
/* Firmware for gprimeltecan needs more space */
reg = <0x0 0x86800000 0x0 0x5400000>;
......
......@@ -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>;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment