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

Commit c48c5466 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "Documentation: DT: Add IAM20680 & ASM330 IMU DT Bindings"

parents 8996dd05 398a783e
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.
+4 −4
Original line number Diff line number Diff line
/* Copyright (c) 2017, The Linux Foundation. All rights reserved.
/* Copyright (c) 2017, 2019, The Linux Foundation. All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 and
@@ -128,7 +128,7 @@
		status = "disabled";
	};

	i2c_5: i2c@835000 { /* BLSP1 QUP1: GPIO: 74,75 */
	i2c_5: i2cb@835000 { /* BLSP1 QUP1: GPIO: 74,75 */
		compatible = "qcom,i2c-msm-v2";
		#address-cells = <1>;
		#size-cells = <0>;
@@ -151,7 +151,7 @@
		status = "disabled";
	};

	i2c_6: i2c@836000 { /* BLSP1 QUP2: GPIO: 65,66 */
	i2c_6: i2cb@836000 { /* BLSP1 QUP2: GPIO: 65,66 */
		compatible = "qcom,i2c-msm-v2";
		#address-cells = <1>;
		#size-cells = <0>;
@@ -174,7 +174,7 @@
		status = "disabled";
	};

	i2c_7: i2c@838000 { /* BLSP1 QUP4: GPIO: 18,19 */
	i2c_7: i2cb@838000 { /* BLSP1 QUP4: GPIO: 18,19 */
		compatible = "qcom,i2c-msm-v2";
		#address-cells = <1>;
		#size-cells = <0>;