1/* 2 * Copyright (c) 2023 Intel Corporation 3 * 4 * SPDX-License-Identifier: Apache-2.0 5 */ 6 7#include <zephyr/sensing/sensing_sensor_types.h> 8 9&i2c0 { 10 bmi160_i2c: bmi@68 { 11 compatible = "bosch,bmi160"; 12 reg = <0x68>; 13 }; 14}; 15 16&spi0 { 17 bmi160_spi: bmi@3 { 18 compatible = "bosch,bmi160"; 19 spi-max-frequency = <50000000>; 20 reg = <0x3>; 21 }; 22}; 23 24/ { 25 sensing: sensing-node { 26 compatible = "zephyr,sensing"; 27 status = "okay"; 28 29 base_accel_gyro: base-accel-gyro { 30 compatible = "zephyr,sensing-phy-3d-sensor"; 31 status = "okay"; 32 sensor-types = <SENSING_SENSOR_TYPE_MOTION_ACCELEROMETER_3D SENSING_SENSOR_TYPE_MOTION_GYROMETER_3D>; 33 friendly-name = "Base Accel Gyro Sensor"; 34 minimal-interval = <625>; 35 underlying-device = <&bmi160_i2c>; 36 }; 37 38 lid_accel_gyro: lid-accel-gyro { 39 compatible = "zephyr,sensing-phy-3d-sensor"; 40 status = "okay"; 41 sensor-types = <SENSING_SENSOR_TYPE_MOTION_ACCELEROMETER_3D SENSING_SENSOR_TYPE_MOTION_GYROMETER_3D>; 42 friendly-name = "Lid Accel Gyro Sensor"; 43 minimal-interval = <625>; 44 underlying-device = <&bmi160_spi>; 45 }; 46 47 hinge_angle: hinge-angle { 48 compatible = "zephyr,sensing-hinge-angle"; 49 status = "okay"; 50 sensor-types = <SENSING_SENSOR_TYPE_MOTION_HINGE_ANGLE>; 51 friendly-name = "Hinge Angle Sensor"; 52 reporters = <&base_accel_gyro &lid_accel_gyro>; 53 reporters-index = <0 0>; 54 minimal-interval = <100000>; 55 stream-mode; 56 }; 57 }; 58}; 59