Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
torvalds
GitHub Repository: torvalds/linux
Path: blob/master/Documentation/devicetree/bindings/iio/imu/bosch,smi330.yaml
38303 views
1
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
2
%YAML 1.2
3
---
4
$id: http://devicetree.org/schemas/iio/imu/bosch,smi330.yaml#
5
$schema: http://devicetree.org/meta-schemas/core.yaml#
6
7
title: Bosch SMI330 6-Axis IMU
8
9
maintainers:
10
- Stefan Gutmann <stefam.gutmann@de.bosch.com>
11
12
description:
13
SMI330 is a 6-axis inertial measurement unit that supports acceleration and
14
gyroscopic measurements with hardware fifo buffering. Sensor also provides
15
events information such as motion, no-motion and tilt detection.
16
17
properties:
18
compatible:
19
const: bosch,smi330
20
21
reg:
22
maxItems: 1
23
24
vdd-supply:
25
description: provide VDD power to the sensor.
26
27
vddio-supply:
28
description: provide VDD IO power to the sensor.
29
30
interrupts:
31
minItems: 1
32
maxItems: 2
33
34
interrupt-names:
35
minItems: 1
36
maxItems: 2
37
items:
38
enum:
39
- INT1
40
- INT2
41
42
drive-open-drain:
43
type: boolean
44
description:
45
set if the interrupt pin(s) should be configured as
46
open drain. If not set, defaults to push-pull.
47
48
required:
49
- compatible
50
- reg
51
52
allOf:
53
- $ref: /schemas/spi/spi-peripheral-props.yaml#
54
55
unevaluatedProperties: false
56
57
examples:
58
- |
59
// Example for I2C
60
#include <dt-bindings/interrupt-controller/irq.h>
61
i2c {
62
#address-cells = <1>;
63
#size-cells = <0>;
64
65
imu@68 {
66
compatible = "bosch,smi330";
67
reg = <0x68>;
68
vddio-supply = <&vddio>;
69
vdd-supply = <&vdd>;
70
interrupt-parent = <&gpio>;
71
interrupts = <26 IRQ_TYPE_EDGE_RISING>;
72
interrupt-names = "INT1";
73
};
74
};
75
76
// Example for SPI
77
#include <dt-bindings/interrupt-controller/irq.h>
78
spi {
79
#address-cells = <1>;
80
#size-cells = <0>;
81
82
imu@0 {
83
compatible = "bosch,smi330";
84
reg = <0>;
85
spi-max-frequency = <10000000>;
86
interrupt-parent = <&gpio>;
87
interrupts = <26 IRQ_TYPE_EDGE_RISING>;
88
interrupt-names = "INT1";
89
};
90
};
91
92