1*130476acSAndrea Merello.. SPDX-License-Identifier: GPL-2.0 2*130476acSAndrea Merello 3*130476acSAndrea Merello============================== 4*130476acSAndrea MerelloBNO055 driver 5*130476acSAndrea Merello============================== 6*130476acSAndrea Merello 7*130476acSAndrea Merello1. Overview 8*130476acSAndrea Merello=========== 9*130476acSAndrea Merello 10*130476acSAndrea MerelloThis driver supports Bosch BNO055 IMUs (on both serial and I2C busses). 11*130476acSAndrea Merello 12*130476acSAndrea MerelloAccelerometer, magnetometer and gyroscope measures are always provided. 13*130476acSAndrea MerelloWhen "fusion_enable" sysfs attribute is set to 1, orientation (both Euler 14*130476acSAndrea Merelloangles and quaternion), linear velocity and gravity vector are also 15*130476acSAndrea Merelloprovided, but some sensor settings (e.g. low pass filtering and range) 16*130476acSAndrea Merellobecame locked (the IMU firmware controls them). 17*130476acSAndrea Merello 18*130476acSAndrea MerelloThis driver supports also IIO buffers. 19*130476acSAndrea Merello 20*130476acSAndrea Merello2. Calibration 21*130476acSAndrea Merello============== 22*130476acSAndrea Merello 23*130476acSAndrea MerelloThe IMU continuously performs an autocalibration procedure if (and only if) 24*130476acSAndrea Merellooperating in fusion mode. The magnetometer autocalibration can however be 25*130476acSAndrea Merellodisabled writing 0 in the sysfs in_magn_calibration_fast_enable attribute. 26*130476acSAndrea Merello 27*130476acSAndrea MerelloThe driver provides access to autocalibration flags (i.e. you can known if 28*130476acSAndrea Merellothe IMU has successfully autocalibrated) and to the calibration data blob. 29*130476acSAndrea Merello 30*130476acSAndrea MerelloThe user can save this blob in a firmware file (i.e. in /lib/firmware) that 31*130476acSAndrea Merellothe driver looks for at probe time. If found, then the IMU is initialized 32*130476acSAndrea Merellowith this calibration data. This saves the user from performing the 33*130476acSAndrea Merellocalibration procedure every time (which consist of moving the IMU in 34*130476acSAndrea Merellovarious way). 35*130476acSAndrea Merello 36*130476acSAndrea MerelloThe driver looks for calibration data file using two different names: first 37*130476acSAndrea Merelloa file whose name is suffixed with the IMU unique ID (exposed in sysfs as 38*130476acSAndrea Merelloserial_number) is searched for; this is useful when there is more than one 39*130476acSAndrea MerelloIMU instance. If this file is not found, then a "generic" calibration file 40*130476acSAndrea Merellois searched for (which can be used when only one IMU is present, without 41*130476acSAndrea Merellostruggling with fancy names, that change on each device). 42*130476acSAndrea Merello 43*130476acSAndrea MerelloValid calibration file names would be e.g. 44*130476acSAndrea Merello bno055-caldata-0e7c26a33541515120204a35342b04ff.dat 45*130476acSAndrea Merello bno055-caldata.dat 46*130476acSAndrea Merello 47*130476acSAndrea MerelloIn non-fusion mode the IIO 'offset' attributes provide access to the 48*130476acSAndrea Merellooffsets from calibration data (if any), so that the user can apply them to 49*130476acSAndrea Merellothe accel, angvel and magn IIO attributes. In fusion mode they are not 50*130476acSAndrea Merelloneeded (the IMU firmware internally applies those corrections) and they 51*130476acSAndrea Merelloread as zero. 52