Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
st-mems-linux: Imported STM MEMS IIO drivers
- Loading branch information
1 parent
ad490d0
commit 29df723
Showing
283 changed files
with
94,019 additions
and
0 deletions.
There are no files selected for viewing
46 changes: 46 additions & 0 deletions
46
Documentation/devicetree/bindings/iio/stm/accel/st_acc33.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
* st_acc33 driver for accel MEMS sensors | ||
|
||
Required properties for all bus drivers: | ||
- compatible: must be one of: | ||
"st,lis2dh_accel" | ||
"st,lis2dh12_accel" | ||
"st,lis3dh_accel" | ||
"st,lsm303agr_accel" | ||
"st,iis2dh_accel" | ||
|
||
Required properties for the i2c bindings: | ||
- reg: i2c slave address | ||
|
||
Required properties for the spi bindings: | ||
- reg: the chipselect index | ||
- spi-max-frequency: maximal bus speed, should be set to 1000000 unless | ||
constrained by external circuitry | ||
|
||
Optional properties for the spi bindings: | ||
- spi-3wire: use sensor spi interface with 3 wires. | ||
|
||
Optional properties for all bus drivers: | ||
- interrupts: interrupt mapping for IRQ. It should be configured with | ||
flags IRQ_TYPE_LEVEL_HIGH. | ||
|
||
Refer to interrupt-controller/interrupts.txt for generic | ||
interrupt client node bindings. | ||
|
||
- st,module_id: module identifier. | ||
If a sensor is supported by two different drivers (for example | ||
accel by this driver and magn by mag40 driver), module_id | ||
should be used by both drivers and should have the same id. | ||
This is used by user-space to identify which devices | ||
are part of the same module (particularly important for | ||
supporting multiple sensors of the same type). | ||
|
||
Example for an spi device node: | ||
|
||
lis2dh-accel@0 { | ||
compatible = "st,lis2dh_accel"; | ||
reg = <0x0>; | ||
spi-max-frequency = <1000000>; | ||
interrupt-parent = <&gpio0>; | ||
interrupts = <0 IRQ_TYPE_LEVEL_HIGH>; | ||
st,module_id = <1>; | ||
}; |
37 changes: 37 additions & 0 deletions
37
Documentation/devicetree/bindings/iio/stm/accel/st_ism303dac.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
* ism303dac driver for accel MEMS sensors | ||
|
||
Required properties for all bus drivers: | ||
- compatible: must be one of: | ||
"st,ism303dac_accel" | ||
|
||
Required properties for the i2c bindings: | ||
- reg: i2c slave address | ||
|
||
Required properties for the spi bindings: | ||
- reg: the chipselect index | ||
- spi-max-frequency: maximal bus speed, should be set to 1000000 unless | ||
constrained by external circuitry | ||
|
||
Optional properties for the spi bindings: | ||
- spi-3wire: use sensor spi interface with 3 wires. | ||
|
||
Optional properties for all bus drivers: | ||
- st,drdy-int-pin: the pin on the package that will be used to signal | ||
"data ready" (valid values: 1 or 2, default: 1). | ||
|
||
- interrupts: interrupt mapping for IRQ. It should be configured with | ||
flags IRQ_TYPE_LEVEL_HIGH. | ||
|
||
Refer to interrupt-controller/interrupts.txt for generic | ||
interrupt client node bindings. | ||
|
||
Example for an spi device node: | ||
|
||
ism303dac-accel@0 { | ||
compatible = "st,ism303dac_accel"; | ||
reg = <0x0>; | ||
spi-max-frequency = <1000000>; | ||
interrupt-parent = <&gpio0>; | ||
interrupts = <0 IRQ_TYPE_LEVEL_HIGH>; | ||
st,drdy-int-pin = <1>; | ||
}; |
39 changes: 39 additions & 0 deletions
39
Documentation/devicetree/bindings/iio/stm/accel/st_lis2ds12.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
* lis2ds12 driver for accel MEMS sensors | ||
|
||
Required properties for all bus drivers: | ||
- compatible: must be one of: | ||
"st,lis2ds12" | ||
"st,lsm303ah" | ||
"st,lis2dg" | ||
|
||
Required properties for the i2c bindings: | ||
- reg: i2c slave address | ||
|
||
Required properties for the spi bindings: | ||
- reg: the chipselect index | ||
- spi-max-frequency: maximal bus speed, should be set to 1000000 unless | ||
constrained by external circuitry | ||
|
||
Optional properties for the spi bindings: | ||
- spi-3wire: use sensor spi interface with 3 wires. | ||
|
||
Optional properties for all bus drivers: | ||
- st,drdy-int-pin: the pin on the package that will be used to signal | ||
"data ready" (valid values: 1 or 2, default: 1). | ||
|
||
- interrupts: interrupt mapping for IRQ. It should be configured with | ||
flags IRQ_TYPE_LEVEL_HIGH. | ||
|
||
Refer to interrupt-controller/interrupts.txt for generic | ||
interrupt client node bindings. | ||
|
||
Example for an spi device node: | ||
|
||
lis2ds12-accel@0 { | ||
compatible = "st,lis2ds12"; | ||
reg = <0x0>; | ||
spi-max-frequency = <1000000>; | ||
interrupt-parent = <&gpio0>; | ||
interrupts = <0 IRQ_TYPE_LEVEL_HIGH>; | ||
st,drdy-int-pin = <1>; | ||
}; |
49 changes: 49 additions & 0 deletions
49
Documentation/devicetree/bindings/iio/stm/accel/st_lis2duxs12.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
* lis2duxs12 driver for accel MEMS sensors | ||
|
||
Required properties for all bus drivers: | ||
- compatible: must be one of: | ||
"st,lis2dux12" | ||
"st,lis2duxs12" | ||
|
||
Required properties for the i2c bindings: | ||
- reg: i2c slave address | ||
|
||
Required properties for the spi bindings: | ||
- reg: the chipselect index | ||
- spi-max-frequency: maximal bus speed, should be set to 1000000 unless | ||
constrained by external circuitry | ||
|
||
Optional properties for all bus drivers: | ||
- st,int-pin: the pin on the package that will be used to signal when | ||
sensor data are available (valid values: 1 or 2, default: 1). | ||
|
||
- interrupts: interrupt mapping for IRQ. It should be configured with | ||
flags IRQ_TYPE_LEVEL_HIGH. | ||
|
||
Refer to interrupt-controller/interrupts.txt for generic | ||
interrupt client node bindings. | ||
|
||
- pd_dis_int1: disable pull down on int1 pin. | ||
- pd_dis_int2: disable pull down on int2 pin. | ||
- drive-open-drain: set interrupt pin in open drain (disable push-pull) | ||
|
||
Example for an spi device node: | ||
|
||
lis2duxs12-accel@0 { | ||
compatible = "st,lis2duxs12"; | ||
reg = <0x0>; | ||
spi-max-frequency = <1000000>; | ||
interrupt-parent = <&gpio0>; | ||
interrupts = <0 IRQ_TYPE_LEVEL_HIGH>; | ||
st,int-pin = <1>; | ||
}; | ||
|
||
Example for an i2c device node (I2C slave address 0x19): | ||
|
||
lis2duxs12-accel@19 { | ||
compatible = "st,lis2duxs12"; | ||
reg = <0x19>; | ||
interrupt-parent = <&gpio0>; | ||
interrupts = <0 IRQ_TYPE_LEVEL_HIGH>; | ||
st,int-pin = <1>; | ||
}; |
36 changes: 36 additions & 0 deletions
36
Documentation/devicetree/bindings/iio/stm/accel/st_lis2dw12.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
* lis2dw12 driver for accel MEMS sensors | ||
|
||
Required properties for all bus drivers: | ||
- compatible: must be one of: | ||
"st,lis2dw12" | ||
"st,iis2dlpc" | ||
"st,ais2ih" | ||
|
||
Required properties for the i2c bindings: | ||
- reg: i2c slave address | ||
|
||
Required properties for the spi bindings: | ||
- reg: the chipselect index | ||
- spi-max-frequency: maximal bus speed, should be set to 1000000 unless | ||
constrained by external circuitry | ||
|
||
Optional properties for all bus drivers: | ||
- st,drdy-int-pin: the pin on the package that will be used to signal | ||
"data ready" (valid values: 1 or 2, default: 1). | ||
|
||
- interrupts: interrupt mapping for IRQ. It should be configured with | ||
flags IRQ_TYPE_LEVEL_HIGH. | ||
|
||
Refer to interrupt-controller/interrupts.txt for generic | ||
interrupt client node bindings. | ||
|
||
Example for an spi device node: | ||
|
||
lis2dw12-accel@0 { | ||
compatible = "st,lis2dw12"; | ||
reg = <0x0>; | ||
spi-max-frequency = <1000000>; | ||
interrupt-parent = <&gpio0>; | ||
interrupts = <0 IRQ_TYPE_LEVEL_HIGH>; | ||
st,drdy-int-pin = <1>; | ||
}; |
34 changes: 34 additions & 0 deletions
34
Documentation/devicetree/bindings/iio/stm/accel/st_lis2hh12.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
* lis2hh12 driver for accel MEMS sensors | ||
|
||
Required properties for all bus drivers: | ||
- compatible: must be one of: | ||
"st,lis2hh12" | ||
|
||
Required properties for the i2c bindings: | ||
- reg: i2c slave address | ||
|
||
Required properties for the spi bindings: | ||
- reg: the chipselect index | ||
- spi-max-frequency: maximal bus speed, should be set to 1000000 unless | ||
constrained by external circuitry | ||
|
||
Optional properties for all bus drivers: | ||
- st,drdy-int-pin: the pin on the package that will be used to signal | ||
"data ready" (valid values: 1 or 2, default: 1). | ||
|
||
- interrupts: interrupt mapping for IRQ. It should be configured with | ||
flags IRQ_TYPE_LEVEL_HIGH. | ||
|
||
Refer to interrupt-controller/interrupts.txt for generic | ||
interrupt client node bindings. | ||
|
||
Example for an spi device node: | ||
|
||
lis2hh12-accel@0 { | ||
compatible = "st,lis2hh12"; | ||
reg = <0x0>; | ||
spi-max-frequency = <1000000>; | ||
interrupt-parent = <&gpio0>; | ||
interrupts = <0 IRQ_TYPE_LEVEL_HIGH>; | ||
st,drdy-int-pin = <1>; | ||
}; |
30 changes: 30 additions & 0 deletions
30
Documentation/devicetree/bindings/iio/stm/accel/st_lis3dhh.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
* lis3dhh driver for accel MEMS sensors | ||
|
||
Required properties for the spi bindings: | ||
- compatible: must be one of: | ||
"st,lis3dhh" | ||
"st,iis3dhhc" | ||
- reg: the chipselect index | ||
- spi-max-frequency: maximal bus speed, should be set to 1000000 unless | ||
constrained by external circuitry | ||
|
||
Optional properties: | ||
- st,drdy-int-pin: the pin on the package that will be used to signal | ||
"data ready" (valid values: 1 or 2, default: 1). | ||
|
||
- interrupts: interrupt mapping for IRQ. It should be configured with | ||
flags IRQ_TYPE_LEVEL_HIGH. | ||
|
||
Refer to interrupt-controller/interrupts.txt for generic | ||
interrupt client node bindings. | ||
|
||
Example for an spi device node: | ||
|
||
lis3dhh-accel@0 { | ||
compatible = "st,lis3dhh"; | ||
reg = <0x0>; | ||
spi-max-frequency = <1000000>; | ||
interrupt-parent = <&gpio0>; | ||
interrupts = <0 IRQ_TYPE_LEVEL_HIGH>; | ||
st,drdy-int-pin = <1>; | ||
}; |
79 changes: 79 additions & 0 deletions
79
Documentation/devicetree/bindings/iio/stm/imu/st_asm330lhhx.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
* st_asm330lhhx driver for imu MEMS sensors | ||
|
||
Required properties for all bus drivers: | ||
- compatible: must be one of: | ||
"st,asm330lhh" | ||
"st,asm330lhhx" | ||
|
||
Required properties for the i2c bindings: | ||
- reg: i2c slave address | ||
|
||
Required properties for the spi bindings: | ||
- reg: the chipselect index | ||
- spi-max-frequency: maximal bus speed, should be set to 1000000 unless | ||
constrained by external circuitry | ||
|
||
Optional properties for all bus drivers: | ||
- vdd-supply: an optional regulator that needs to be on to provide | ||
VDD power to the sensor. | ||
|
||
- vddio-supply: an optional regulator that needs to be on to provide | ||
the VDD IO power to the sensor. | ||
|
||
- st,int-pin: the pin on the package that will be used to signal | ||
"data ready" (valid values: 1 or 2, default: 1). | ||
|
||
- st,mlc-int-pin: the pin on the package that will be used to signal | ||
MLC/FSM event (valid values: 1 for int pin 1, 2 for | ||
int pin 2 or 3 for both int pin, default: st,int-pin). | ||
|
||
- mount-matrix: mount rotation matrix. | ||
|
||
Refer to iio/mount-matrix.txt for details. | ||
|
||
- interrupts: interrupt mapping for IRQ. It should be configured | ||
with flags IRQ_TYPE_LEVEL_HIGH or IRQ_TYPE_LEVEL_LOW. | ||
|
||
Refer to interrupt-controller/interrupts.txt for | ||
generic interrupt client node bindings. | ||
|
||
- st,module_id: module identifier. | ||
This is used by user-space to identify which devices | ||
are part of the same module (particularly important for | ||
supporting multiple sensors of the same type). | ||
|
||
- wakeup-source: https://www.kernel.org/doc/Documentation/devicetree/bindings/power/wakeup-source.txt | ||
|
||
Example for an spi asm330lhh device node: | ||
|
||
asm330lhh-imu@0 { | ||
compatible = "st,asm330lhh"; | ||
reg = <0x0>; | ||
spi-max-frequency = <1000000>; | ||
interrupt-parent = <&gpio0>; | ||
interrupts = <0 IRQ_TYPE_LEVEL_HIGH>; | ||
vddio-supply = <&sensors_vddio>; | ||
vdd-supply = <&sensors_vdd>; | ||
st,int-pin = <1>; | ||
st,mlc-int-pin = <2>; | ||
st,module_id = <1>; | ||
mount-matrix = "1", "0", "0", | ||
"0", "1", "0", | ||
"0", "0", "1"; | ||
}; | ||
|
||
Example for an i2c asm330lhhx device node (SA0 pulled down): | ||
|
||
asm330lhhx-imu@0x6a { | ||
compatible = "st,asm330lhhx"; | ||
reg = <0x6a>; | ||
interrupt-parent = <&gpio0>; | ||
interrupts = <0 IRQ_TYPE_LEVEL_HIGH>; | ||
vddio-supply = <&sensors_vddio>; | ||
vdd-supply = <&sensors_vdd>; | ||
st,int-pin = <1>; | ||
st,mlc-int-pin = <2>; | ||
mount-matrix = "1", "0", "0", | ||
"0", "1", "0", | ||
"0", "0", "1"; | ||
}; |
37 changes: 37 additions & 0 deletions
37
Documentation/devicetree/bindings/iio/stm/imu/st_imu68.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
* st_imu68 driver for imu MEMS sensors | ||
|
||
Required properties for all bus drivers: | ||
- compatible: must be one of: | ||
"st,lsm6ds0" | ||
"st,lsm9ds1" | ||
|
||
Required properties for the i2c bindings: | ||
- reg: i2c slave address | ||
|
||
Required properties for the spi bindings: | ||
- reg: the chipselect index | ||
- spi-max-frequency: maximal bus speed, should be set to 1000000 unless | ||
constrained by external circuitry | ||
|
||
Optional properties for all bus drivers: | ||
- interrupts: interrupt mapping for IRQ. It should be configured with | ||
flags IRQ_TYPE_LEVEL_HIGH. | ||
|
||
Refer to interrupt-controller/interrupts.txt for generic interrupt | ||
client node bindings. | ||
|
||
- st,module_id: module identifier. | ||
This is used by user-space to identify which devices | ||
are part of the same module (particularly important for | ||
supporting multiple sensors of the same type). | ||
|
||
Example for an spi device node: | ||
|
||
lsm6ds0-imu@0 { | ||
compatible = "st,lsm6ds0"; | ||
reg = <0x0>; | ||
spi-max-frequency = <1000000>; | ||
interrupt-parent = <&gpio0>; | ||
interrupts = <0 IRQ_TYPE_LEVEL_HIGH>; | ||
st,module_id = <1>; | ||
}; |
Oops, something went wrong.