|
| 1 | +# Copyright (c) 2024 Bootlin |
| 2 | +# SPDX-License-Identifier: Apache-2.0 |
| 3 | + |
| 4 | +description: | |
| 5 | + STMicroelectronics LSM9DS1 9-axis IMU (Inertial Measurement Unit) sensor |
| 6 | + accessed through I2C bus. |
| 7 | +
|
| 8 | + This binding describes only the magnetometer. |
| 9 | +
|
| 10 | + When setting the mag-range and mag-odr properties in |
| 11 | + a .dts or .dtsi file you may include lsm9ds1.h and use the macros |
| 12 | + defined here. |
| 13 | +
|
| 14 | + Example: |
| 15 | + #include <zephyr/dt-bindings/sensor/lsm9ds1.h> |
| 16 | +
|
| 17 | + lsm9ds1_mag: lsm9ds1_mag@0 { |
| 18 | + ... |
| 19 | +
|
| 20 | + mag-range = <LSM9DS1_DT_FS_4Ga>; |
| 21 | + mag-odr = <LSM9DS1_MAG_MP_40Hz>; |
| 22 | + }; |
| 23 | +
|
| 24 | +compatible: "st,lsm9ds1_mag" |
| 25 | + |
| 26 | +include: [sensor-device.yaml, i2c-device.yaml] |
| 27 | + |
| 28 | +properties: |
| 29 | + mag-range: |
| 30 | + type: int |
| 31 | + default: 0 |
| 32 | + description: | |
| 33 | + Range of the magnetometer in gauss. Default is power-up configuration. |
| 34 | +
|
| 35 | + - 0 # LSM9DS1_DT_FS_4Ga (0.14 mgauss/LSB) |
| 36 | + - 1 # LSM9DS1_DT_FS_8Ga (0.29 mgauss/LSB) |
| 37 | + - 2 # LSM9DS1_DT_FS_12Ga (0.43 mgauss/LSB) |
| 38 | + - 3 # LSM9DS1_DT_FS_16Ga (0.58 mgauss/LSB) |
| 39 | +
|
| 40 | + enum: [0, 1, 2, 3] |
| 41 | + |
| 42 | + mag-odr: |
| 43 | + type: int |
| 44 | + default: 0 |
| 45 | + description: | |
| 46 | + Specify the default output data rate of the magnetometer (samples/second). |
| 47 | + Default is power-up configuration. |
| 48 | + - 0xC0 # LSM9DS1_MAG_POWER_DOWN |
| 49 | + - 0x00 # LSM9DS1_MAG_LP_0Hz625 |
| 50 | + - 0x01 # LSM9DS1_MAG_LP_1Hz25 |
| 51 | + - 0x02 # LSM9DS1_MAG_LP_2Hz5 |
| 52 | + - 0x03 # LSM9DS1_MAG_LP_5Hz |
| 53 | + - 0x04 # LSM9DS1_MAG_LP_10Hz |
| 54 | + - 0x05 # LSM9DS1_MAG_LP_20Hz |
| 55 | + - 0x06 # LSM9DS1_MAG_LP_40Hz |
| 56 | + - 0x07 # LSM9DS1_MAG_LP_80Hz |
| 57 | + - 0x10 # LSM9DS1_MAG_MP_0Hz625 |
| 58 | + - 0x11 # LSM9DS1_MAG_MP_1Hz25 |
| 59 | + - 0x12 # LSM9DS1_MAG_MP_2Hz5 |
| 60 | + - 0x13 # LSM9DS1_MAG_MP_5Hz |
| 61 | + - 0x14 # LSM9DS1_MAG_MP_10Hz |
| 62 | + - 0x15 # LSM9DS1_MAG_MP_20Hz |
| 63 | + - 0x16 # LSM9DS1_MAG_MP_40Hz |
| 64 | + - 0x17 # LSM9DS1_MAG_MP_80Hz |
| 65 | + - 0x20 # LSM9DS1_MAG_HP_0Hz625 |
| 66 | + - 0x21 # LSM9DS1_MAG_HP_1Hz25 |
| 67 | + - 0x22 # LSM9DS1_MAG_HP_2Hz5 |
| 68 | + - 0x23 # LSM9DS1_MAG_HP_5Hz |
| 69 | + - 0x24 # LSM9DS1_MAG_HP_10Hz |
| 70 | + - 0x25 # LSM9DS1_MAG_HP_20Hz |
| 71 | + - 0x26 # LSM9DS1_MAG_HP_40Hz |
| 72 | + - 0x27 # LSM9DS1_MAG_HP_80Hz |
| 73 | + - 0x30 # LSM9DS1_MAG_UHP_0Hz625 |
| 74 | + - 0x31 # LSM9DS1_MAG_UHP_1Hz25 |
| 75 | + - 0x32 # LSM9DS1_MAG_UHP_2Hz5 |
| 76 | + - 0x33 # LSM9DS1_MAG_UHP_5Hz |
| 77 | + - 0x34 # LSM9DS1_MAG_UHP_10Hz |
| 78 | + - 0x35 # LSM9DS1_MAG_UHP_20Hz |
| 79 | + - 0x36 # LSM9DS1_MAG_UHP_40Hz |
| 80 | + - 0x37 # LSM9DS1_MAG_UHP_80Hz |
| 81 | + - 0x38 # LSM9DS1_MAG_UHP_155Hz |
| 82 | + - 0x28 # LSM9DS1_MAG_HP_300Hz |
| 83 | + - 0x18 # LSM9DS1_MAG_MP_560Hz |
| 84 | + - 0x08 # LSM9DS1_MAG_LP_1000Hz |
| 85 | + - 0x70 # LSM9DS1_MAG_ONE_SHOT |
| 86 | +
|
| 87 | + enum: [0xC0, 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x10, 0x11, 0x12, 0x13, |
| 88 | + 0x14, 0x15, 0x16, 0x17, 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, 0x30, 0x31, |
| 89 | + 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x28, 0x18, 0x08, 0x70] |
0 commit comments