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

Commit 398a783e authored by Puneet Yatnal's avatar Puneet Yatnal Committed by Gustavo Solaira
Browse files

Documentation: DT: Add IAM20680 & ASM330 IMU DT Bindings



Added IAM20680 and ASM330 DT bindings in the documentation.

Change-Id: Id7e38d01f9e4215701f612d4568b78b32b1fa295
Signed-off-by: default avatarPuneet Yatnal <puneet@codeaurora.org>
parent 11442fbb
Loading
Loading
Loading
Loading
+83 −0
Original line number Diff line number Diff line
The IAM20680 sensor is 6-axis gyroscope+accelerometer combo
device which is made by InvenSense Inc.

Required properties:

 - compatible   : Should be "invn,iam20680".
 - reg          : the I2C address which depends on the AD0 pin.
 - gpios        : INVENSENSE GPIO in the format described by ../gpio/gpio.txt

Optional properties:
 - inven,vdd_ana-supply :
 - inven,vcc_i2c-supply :
 - inven,gpio_int1 :
 - axis_map_x :
 - axis_map_y :
 - axis_map_z :
 - negate_x   :
 - negate_y   :
 - negate_z   :
 - fs_range :
 - poll_interval :
 - min_interval :
 - inven,secondary_reg :
 - inven,secondary_type :
 - inven,secondary_name :
 - inven,secondary_axis_map_x :
 - inven,secondary_axis_map_y :
 - inven,secondary_axis_map_z :
 - inven,secondary_negate_x :
 - inven,secondary_negate_y :
 - inven,secondary_negate_z :
 - inven,aux_type :
 - inven,aux_name :
 - inven,aux_reg :
 - inven,read_only_slave_type :
 - inven,read_only_slave_name :
 - inven,read_only_slave_reg :

Example:
	iam20680@69 {
		compatible = "inven,iam20680";
		reg = <0x69>;
		pinctrl-names = "default";
		pinctrl-0 = <&int1_default>;
		interrupt-parent = <&tlmm_pinmux>;
		interrupts = <78 IRQ_TYPE_EDGE_RISING>;
		inven,vdd_ana-supply = <&pm8941_l17>;
		inven,vcc_i2c-supply = <&pm8941_lvs1>;
		inven,gpio_int1 = <&msmgpio 73 0x00>;
		axis_map_x = <1>;
		axis_map_y = <0>;
		axis_map_z = <2>;
		negate_x = <1>;
		negate_y = <0>;
		negate_z = <0>;
		fs_range = <0x00>;
		poll_interval = <200>;
		min_interval = <5>;
		inven,secondary_reg = <0x0c>;
		/* If no compass sensor,
		 * replace "compass" with "none"
		 */
		inven,secondary_type = "compass";
		inven,secondary_name = "ak09911";
		inven,secondary_axis_map_x = <1>;
		inven,secondary_axis_map_y = <0>;
		inven,secondary_axis_map_z = <2>;
		inven,secondary_negate_x = <1>;
		inven,secondary_negate_y = <1>;
		inven,secondary_negate_z = <1>;
		/* If no pressure sensor,
		 * replace "pressure" with "none"
		 */
		inven,aux_type = "pressure";
		inven,aux_name = "bmp280";
		inven,aux_reg = <0x76>;
		/* If no ALS sensor
		 * replace "als" with "none"
		 */
		inven,read_only_slave_type = "als";
		inven,read_only_slave_name = "apds9930";
		inven,read_only_slave_reg = <0x39>;
	};
+44 −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
- 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>;
		};
+1 −0
Original line number Diff line number Diff line
@@ -319,3 +319,4 @@ zarlink Zarlink Semiconductor
zii	Zodiac Inflight Innovations
zte	ZTE Corp.
zyxel	ZyXEL Communications Corp.
inven   InvenSense, Inc.