diff --git a/Documentation/devicetree/bindings/iio/imu/invn-iam20680.txt b/Documentation/devicetree/bindings/iio/imu/invn-iam20680.txt new file mode 100644 index 000000000000..f5227841b5d9 --- /dev/null +++ b/Documentation/devicetree/bindings/iio/imu/invn-iam20680.txt @@ -0,0 +1,83 @@ +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>; + }; diff --git a/Documentation/devicetree/bindings/input/sensors/bmi160.txt b/Documentation/devicetree/bindings/input/sensors/bmi160.txt new file mode 100644 index 000000000000..8fd43cd6e52b --- /dev/null +++ b/Documentation/devicetree/bindings/input/sensors/bmi160.txt @@ -0,0 +1,27 @@ + +The BMI160 is a highly integrated, low power inertial measurement unit (IMU) +that provides precise acceleration and angular rate (gyroscopic) measurement. + +Required properties: + + - compatible : Should be "bosch-sensortec,bmi160". + - reg : the Chip select ID. + - gpios : BMI GPIO in the format described by ../gpio/gpio.txt + +Optional properties: + - bmi,init-interval: + - bmi,place : + + +Example: + bmi160@68{ + compatible = "bosch-sensortec,bmi160"; + reg = <0x68>; + pinctrl-names = "default"; + pinctrl-0 = <&bmi160_int1_default &bmi160_int2_default>; + interrupt-parent = <&tlmm_pinmux>; + interrupts = <78 0x2002>; + bmi,init-interval = <200>; + bmi,place = <1>; + bmi,gpio_irq = <&tlmm_pinmux 78 0x2002>; + }; diff --git a/Documentation/devicetree/bindings/vendor-prefixes.txt b/Documentation/devicetree/bindings/vendor-prefixes.txt index f9097941c192..7354ff18e919 100644 --- a/Documentation/devicetree/bindings/vendor-prefixes.txt +++ b/Documentation/devicetree/bindings/vendor-prefixes.txt @@ -259,6 +259,8 @@ xes Extreme Engineering Solutions (X-ES) xillybus Xillybus Ltd. xlnx Xilinx zyxel ZyXEL Communications Corp. +bosch-sensortec» Bosch Sensortec GmbH +inven InvenSense, Inc. zarlink Zarlink Semiconductor zii Zodiac Inflight Innovations zte ZTE Corp. diff --git a/arch/arm/boot/dts/qcom/msm8996-agave-adp.dtsi b/arch/arm/boot/dts/qcom/msm8996-agave-adp.dtsi index e6598fa2d0c5..ee42fe68f430 100644 --- a/arch/arm/boot/dts/qcom/msm8996-agave-adp.dtsi +++ b/arch/arm/boot/dts/qcom/msm8996-agave-adp.dtsi @@ -1488,6 +1488,41 @@ }; }; +&i2c_10 { + bmi160@68 { + compatible = "bosch-sensortec,bmi160"; + reg = <0x68>; + vdd-supply = <&pm8994_lvs2>; + vio-supply = <&pm8994_lvs2>; + pinctrl-names = "default"; + pinctrl-0 = <&sensor_int1_default &sensor_int2_default>; + interrupt-parent = <&tlmm>; + interrupts = <117 0x2002>; + bmi,init-interval = <200>; + bmi,place = <1>; + bmi,gpio_irq = <&tlmm 117 0x2002>; + }; + iam20680@69 { + compatible = "inven,iam20680"; + reg = <0x69>; + vdd-supply = <&pm8994_lvs2>; + vio-supply = <&pm8994_lvs2>; + pinctrl-names = "default"; + pinctrl-0 = <&sensor_int1_default &sensor_int2_default>; + interrupt-parent = <&tlmm>; + interrupts = <118 IRQ_TYPE_EDGE_RISING>; + axis_map_x = <1>; + axis_map_y = <0>; + axis_map_z = <2>; + negate_x = <1>; + negate_y = <0>; + negate_z = <0>; + inven,secondary_type = "none"; + inven,aux_type = "none"; + inven,read_only_slave_type = "none"; + }; +}; + &dsi_dual_jdi_video { /delete-property/ pwms; /delete-property/ qcom,5v-boost-gpio; diff --git a/arch/arm/boot/dts/qcom/msm8996-pinctrl.dtsi b/arch/arm/boot/dts/qcom/msm8996-pinctrl.dtsi index 3e2e7bbf56f6..50b435547982 100644 --- a/arch/arm/boot/dts/qcom/msm8996-pinctrl.dtsi +++ b/arch/arm/boot/dts/qcom/msm8996-pinctrl.dtsi @@ -850,6 +850,58 @@ }; }; }; + i2c_10 { + i2c_10_active: i2c_10_active { + mux { + pins = "gpio10", "gpio11"; + function = "blsp_i2c10"; + }; + + config { + pins = "gpio10", "gpio11"; + drive-strength = <16>; + bias-pull-up; + }; + }; + + i2c_10_sleep: i2c_10_sleep { + mux { + pins = "gpio10", "gpio11"; + function = "blsp_i2c10"; + }; + + config { + pins = "gpio10", "gpio11"; + drive-strength = <16>; + bias-pull-up; + }; + }; + }; + + sensor_int1_default: sensor_int1_default { + mux { + pins = "gpio117"; + function = "gpio"; + }; + + config { + pins = "gpio117"; + drive-strength = <16>; /* 16 mA */ + bias-pull-down; /* pull down */ + }; + }; + sensor_int2_default: sensor_int2_default { + mux { + pins = "gpio118"; + function = "gpio"; + }; + + config { + pins = "gpio118"; + drive-strength = <16>; /* 16 mA */ + bias-pull-down; /* pull down */ + }; + }; pmx_fm_int { fm_int_active: fm_int_active { diff --git a/arch/arm/boot/dts/qcom/msm8996.dtsi b/arch/arm/boot/dts/qcom/msm8996.dtsi index e41105c2727d..ed88cfeac053 100644 --- a/arch/arm/boot/dts/qcom/msm8996.dtsi +++ b/arch/arm/boot/dts/qcom/msm8996.dtsi @@ -39,6 +39,7 @@ i2c6 = &i2c_6; i2c7 = &i2c_7; i2c8 = &i2c_8; + i2c10 = &i2c_10; i2c12 = &i2c_12; spi0 = &spi_0; serial0 = &uartblsp2dm1; @@ -387,6 +388,28 @@ clock-names = "core_clk", "iface_clk"; }; + i2c_10: i2c@75b8000 { /* BLSP2 QUP4 */ + compatible = "qcom,i2c-msm-v2"; + #address-cells = <1>; + #size-cells = <0>; + reg-names = "qup_phys_addr"; + reg = <0x75b8000 0x600>; + interrupt-names = "qup_irq"; + interrupts = <0 104 0>; + dmas = <&dma_blsp2 18 32 0x20000020 0x20>, + <&dma_blsp2 19 32 0x20000020 0x20>; + dma-names = "tx", "rx"; + qcom,master-id = <84>; + qcom,clk-freq-out = <400000>; + qcom,clk-freq-in = <19200000>; + clock-names = "iface_clk", "core_clk"; + clocks = <&clock_gcc clk_gcc_blsp2_ahb_clk>, + <&clock_gcc clk_gcc_blsp2_qup4_i2c_apps_clk>; + pinctrl-names = "i2c_active", "i2c_sleep"; + pinctrl-0 = <&i2c_10_active>; + pinctrl-1 = <&i2c_10_sleep>; + }; + i2c_12: i2c@75ba000 { compatible = "qcom,i2c-msm-v2"; #address-cells = <1>;