59 lines
1.8 KiB
Plaintext
59 lines
1.8 KiB
Plaintext
|
MEMSIC MMC3416x 3-axis magnetic sensor
|
||
|
|
||
|
The MEMSIC 3-axis magnetic sensor is a complete 3-axis magnetic sensor with
|
||
|
on-chip signal processing and intergrated i2c bus. It can be connected to host
|
||
|
processor via i2c. It can measure magnetic fields within the full scale range
|
||
|
from -16 Gauss to +16 Gauss.
|
||
|
|
||
|
Required properties:
|
||
|
|
||
|
- compatible : Should be "memsic,mmc3416x".
|
||
|
- reg : i2c address of the device.
|
||
|
- vdd-supply : Analog power supply needed to power up the device.
|
||
|
- vio-supply : Digital IO power supply needed for IO and I2C.
|
||
|
- memsic,dir : String value of the direction of the ecompass sensor
|
||
|
chip. There are 8 patterns of direction:
|
||
|
|
||
|
|
||
|
x > 0 /___________o
|
||
|
/ /|
|
||
|
/ / |* 1st pin is here
|
||
|
/________/ /|
|
||
|
|_______/|/ |/ z > 0
|
||
|
/
|
||
|
|/ y > 0
|
||
|
|
||
|
|
||
|
The above graph shows the coordinate of the sensor chip. Specify the
|
||
|
following string to memsic,dir to convert it into Android coordinate.
|
||
|
Note the definition of sensor placement on target board is relative to
|
||
|
Android portrait mode.
|
||
|
|
||
|
left right up down
|
||
|
obverse-x-axis-forward Y+ Y- X+ X-
|
||
|
obverse-x-axis-rightward X- X+ Y+ Y-
|
||
|
obverse-x-axis-backward Y- Y+ X- X+
|
||
|
obverse-x-axis-leftward X+ X- Y- Y+
|
||
|
reverse-x-axis-forward Y- Y+ X+ X-
|
||
|
reverse-x-axis-rightward X- X+ Y- Y+
|
||
|
reverse-x-axis-backward Y+ Y- X- X+
|
||
|
reverse-x-axis-leftward X+ X- Y+ Y-
|
||
|
|
||
|
Optional properites:
|
||
|
|
||
|
- memsic,auto-report : Boolean value to indicate if enable auto-report mode.
|
||
|
|
||
|
Example:
|
||
|
A chip on 8916 platform with the pattern as the above graph:
|
||
|
&i2c_0 { /* BLSP1 QUP2 */
|
||
|
memsic@30 {
|
||
|
compatible = "memsic,mmc3416x";
|
||
|
reg = <0x30>;
|
||
|
vdd-supply = <&pm8916_l17>;
|
||
|
vio-supply = <&pm8916_l6>;
|
||
|
memsic,dir = "obverse-x-axis-forward";
|
||
|
memsic,auto-report;
|
||
|
};
|
||
|
};
|
||
|
|