16259551cSLinus Walleij# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) 26259551cSLinus Walleij%YAML 1.2 36259551cSLinus Walleij--- 46259551cSLinus Walleij$id: http://devicetree.org/schemas/iio/accel/bosch,bma255.yaml# 56259551cSLinus Walleij$schema: http://devicetree.org/meta-schemas/core.yaml# 66259551cSLinus Walleij 76259551cSLinus Walleijtitle: Bosch BMA255 and Similar Accelerometers 86259551cSLinus Walleij 96259551cSLinus Walleijmaintainers: 106259551cSLinus Walleij - Linus Walleij <linus.walleij@linaro.org> 117e6b7866SStephan Gerhold - Stephan Gerhold <stephan@gerhold.net> 126259551cSLinus Walleij 136259551cSLinus Walleijdescription: 146259551cSLinus Walleij 3 axis accelerometers with varying range and I2C or SPI 156259551cSLinus Walleij 4-wire interface. 166259551cSLinus Walleij 176259551cSLinus Walleijproperties: 186259551cSLinus Walleij compatible: 196259551cSLinus Walleij enum: 207e6b7866SStephan Gerhold # bmc150-accel driver in Linux 21562442d5SStephan Gerhold - bosch,bma222 22562442d5SStephan Gerhold - bosch,bma222e 23562442d5SStephan Gerhold - bosch,bma250e 24c3a16200SStephan Gerhold - bosch,bma253 255640fed3SStephan Gerhold - bosch,bma254 266259551cSLinus Walleij - bosch,bma255 276259551cSLinus Walleij - bosch,bma280 28562442d5SStephan Gerhold - bosch,bmc150_accel 2902104141SStephan Gerhold - bosch,bmc156_accel 30562442d5SStephan Gerhold - bosch,bmi055_accel 316259551cSLinus Walleij 327e6b7866SStephan Gerhold # bma180 driver in Linux 337e6b7866SStephan Gerhold - bosch,bma023 347e6b7866SStephan Gerhold - bosch,bma150 357e6b7866SStephan Gerhold - bosch,bma180 367e6b7866SStephan Gerhold - bosch,bma250 377e6b7866SStephan Gerhold - bosch,smb380 387e6b7866SStephan Gerhold 396259551cSLinus Walleij reg: 406259551cSLinus Walleij maxItems: 1 416259551cSLinus Walleij 426259551cSLinus Walleij vdd-supply: true 436259551cSLinus Walleij vddio-supply: true 446259551cSLinus Walleij 456259551cSLinus Walleij interrupts: 46d1e7ff89SStephan Gerhold minItems: 1 47d1e7ff89SStephan Gerhold maxItems: 2 48d1e7ff89SStephan Gerhold description: | 4984c31a04SStephan Gerhold Without interrupt-names, the first interrupt listed must be the one 5084c31a04SStephan Gerhold connected to the INT1 pin, the second (optional) interrupt listed must be 5184c31a04SStephan Gerhold the one connected to the INT2 pin (if available). The type should be 5284c31a04SStephan Gerhold IRQ_TYPE_EDGE_RISING. 5384c31a04SStephan Gerhold 5402104141SStephan Gerhold BMC156 does not have an INT1 pin, therefore the first interrupt pin is 5502104141SStephan Gerhold always treated as INT2. 5602104141SStephan Gerhold 5784c31a04SStephan Gerhold interrupt-names: 5884c31a04SStephan Gerhold minItems: 1 5984c31a04SStephan Gerhold maxItems: 2 6084c31a04SStephan Gerhold items: 6184c31a04SStephan Gerhold enum: 6284c31a04SStephan Gerhold - INT1 6384c31a04SStephan Gerhold - INT2 646259551cSLinus Walleij 656259551cSLinus Walleij mount-matrix: 666259551cSLinus Walleij description: an optional 3x3 mounting rotation matrix. 676259551cSLinus Walleij 686259551cSLinus Walleij spi-max-frequency: 696259551cSLinus Walleij maximum: 10000000 706259551cSLinus Walleij 716259551cSLinus Walleijrequired: 726259551cSLinus Walleij - compatible 736259551cSLinus Walleij - reg 746259551cSLinus Walleij 75*5f729300SKrzysztof KozlowskiallOf: 76*5f729300SKrzysztof Kozlowski - $ref: /schemas/spi/spi-peripheral-props.yaml# 77*5f729300SKrzysztof Kozlowski 78*5f729300SKrzysztof KozlowskiunevaluatedProperties: false 796259551cSLinus Walleij 806259551cSLinus Walleijexamples: 816259551cSLinus Walleij - | 826259551cSLinus Walleij #include <dt-bindings/interrupt-controller/irq.h> 836259551cSLinus Walleij i2c { 846259551cSLinus Walleij #address-cells = <1>; 856259551cSLinus Walleij #size-cells = <0>; 866259551cSLinus Walleij accelerometer@8 { 876259551cSLinus Walleij compatible = "bosch,bma222"; 886259551cSLinus Walleij reg = <0x08>; 896259551cSLinus Walleij vddio-supply = <&vddio>; 906259551cSLinus Walleij vdd-supply = <&vdd>; 9139361c99SStephan Gerhold interrupts = <57 IRQ_TYPE_EDGE_RISING>; 9284c31a04SStephan Gerhold interrupt-names = "INT1"; 936259551cSLinus Walleij }; 946259551cSLinus Walleij }; 956259551cSLinus Walleij - | 966259551cSLinus Walleij #include <dt-bindings/interrupt-controller/irq.h> 9702104141SStephan Gerhold i2c { 9802104141SStephan Gerhold #address-cells = <1>; 9902104141SStephan Gerhold #size-cells = <0>; 10002104141SStephan Gerhold accelerometer@10 { 10102104141SStephan Gerhold compatible = "bosch,bmc156_accel"; 10202104141SStephan Gerhold reg = <0x10>; 10302104141SStephan Gerhold vddio-supply = <&vddio>; 10402104141SStephan Gerhold vdd-supply = <&vdd>; 10502104141SStephan Gerhold interrupts = <116 IRQ_TYPE_EDGE_RISING>; 10602104141SStephan Gerhold interrupt-names = "INT2"; 10702104141SStephan Gerhold }; 10802104141SStephan Gerhold }; 10902104141SStephan Gerhold - | 11002104141SStephan Gerhold # include <dt-bindings/interrupt-controller/irq.h> 1116259551cSLinus Walleij spi { 1126259551cSLinus Walleij #address-cells = <1>; 1136259551cSLinus Walleij #size-cells = <0>; 1146259551cSLinus Walleij accel@0 { 1156259551cSLinus Walleij compatible = "bosch,bma222"; 1166259551cSLinus Walleij reg = <0>; 1176259551cSLinus Walleij spi-max-frequency = <10000000>; 1186259551cSLinus Walleij }; 1196259551cSLinus Walleij }; 1206259551cSLinus Walleij... 121