Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ae1afbe1 authored by qctecmdr Service's avatar qctecmdr Service Committed by Gerrit - the friendly Code Review server
Browse files

Merge "ARM: dts: msm: Enable asm330 sensor"

parents 12205b33 dd2140d8
Loading
Loading
Loading
Loading
+46 −0
Original line number Diff line number Diff line
The ASM330 is a highly integrated, low power inertial measurement unit (IMU)
that provides precise acceleration and angular rate (gyroscopic) measurement.

To enable driver probing, add the asm330lhh node to the platform device tree as described below.

Required properties:

- compatible: "st,asm330lhh"
- reg: the I2C address or SPI chip select the device will respond to
- vio-supply: 1.8V regulator supply
- vdd-supply: 3V regulator supply
- interrupt-parent: phandle to the parent interrupt controller as documented in [interrupts][4]
- interrupts: interrupt mapping for IRQ as documented in [interrupts][4]

Recommended properties for SPI bus usage:
- spi-max-frequency: maximum SPI bus frequency as documented in [SPI][3]

Optional properties:
- st,drdy-int-pin: MEMS sensor interrupt line to use (default 1)

I2C example (based on Raspberry PI 3):

	&i2c0 {
		status = "ok";
		#address-cells = <0x1>;
		#size-cells = <0x0>;
		asm330lhh@6b {
			compatible = "st,asm330lhh";
			reg = <0x6b>;
			interrupt-parent = <&gpio>;
			interrupts = <26 IRQ_TYPE_EDGE_RISING>;
		};

SPI example (based on Raspberry PI 3):

	&spi0 {
		status = "ok";
		#address-cells = <0x1>;
		#size-cells = <0x0>;
		asm330lhh@0 {
			spi-max-frequency = <500000>;
			compatible = "st,asm330lhh";
			reg = <0>;
			interrupt-parent = <&gpio>;
			interrupts = <26 IRQ_TYPE_EDGE_RISING>;
		};
+27 −0
Original line number Diff line number Diff line
@@ -45,6 +45,33 @@
&qupv3_se4_i2c {
	status = "ok";
};

&qupv3_se10_i2c {
	status = "ok";
	asm330@6a {
		compatible = "st,asm330lhh";
		reg = <0x6a>;
		vio-supply = <&pm8150_2_l7>;
		vdd-supply = <&pm8150_2_l16>;
		interrupt-parent = <&tlmm>;
		interrupts = <41 IRQ_TYPE_EDGE_RISING>,
				<42 IRQ_TYPE_EDGE_RISING>;
		pinctrl-names = "default";
		pinctrl-0 = <&sensor_int1_default
			&sensor_int2_default>;
		sensor_int1_default: sensor_int1_default {
			pins = "gpio41";
			drive-strength = <16>;
			bias-pull-up;
		};
		sensor_int2_default: sensor_int2_default {
			pins = "gpio42";
			drive-strength = <16>;
			bias-pull-up;
		};
	};
};

&pil_modem {
	status = "disabled";
};