Skip to content

mpu6050 device tree overlay #2031

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
May 23, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions arch/arm/boot/dts/overlays/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ dtbo-$(CONFIG_ARCH_BCM2835) += \
mcp3008.dtbo \
midi-uart0.dtbo \
mmc.dtbo \
mpu6050.dtbo \
mz61581.dtbo \
pi3-act-led.dtbo \
pi3-disable-bt.dtbo \
Expand Down
6 changes: 6 additions & 0 deletions arch/arm/boot/dts/overlays/README
Original file line number Diff line number Diff line change
Expand Up @@ -883,6 +883,12 @@ Params: overclock_50 Clock (in MHz) to use when the MMC framework
requests 50MHz


Name: mpu6050
Info: Overlay for i2c connected mpu6050 imu
Load: dtoverlay=mpu6050,<param>=<val>
Params: interrupt GPIO pin for interrupt (default 4)


Name: mz61581
Info: MZ61581 display by Tontec
Load: dtoverlay=mz61581,<param>=<val>
Expand Down
28 changes: 28 additions & 0 deletions arch/arm/boot/dts/overlays/mpu6050-overlay.dts
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
// Definitions for MPU6050
/dts-v1/;
/plugin/;

/ {
compatible = "brcm,bcm2708";

fragment@0 {
target = <&i2c1>;
__overlay__ {
#address-cells = <1>;
#size-cells = <0>;
status = "okay";
clock-frequency = <400000>;

mpu6050: mpu6050@68 {
compatible = "invensense,mpu6050";
reg = <0x68>;
interrupt-parent = <&gpio>;
interrupts = <4 1>;
};
};
};

__overrides__ {
interrupt = <&mpu6050>,"interrupts:0";
};
};
3 changes: 1 addition & 2 deletions arch/arm/configs/bcm2709_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -1168,13 +1168,12 @@ CONFIG_RASPBERRYPI_POWER=y
CONFIG_EXTCON=m
CONFIG_EXTCON_ARIZONA=m
CONFIG_IIO=m
CONFIG_IIO_BUFFER=y
CONFIG_IIO_BUFFER_CB=m
CONFIG_IIO_KFIFO_BUF=m
CONFIG_MCP320X=m
CONFIG_MCP3422=m
CONFIG_DHT11=m
CONFIG_HTU21=m
CONFIG_INV_MPU6050_I2C=m
CONFIG_BMP280=m
CONFIG_PWM_BCM2835=m
CONFIG_PWM_PCA9685=m
Expand Down
3 changes: 1 addition & 2 deletions arch/arm/configs/bcmrpi_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -1176,13 +1176,12 @@ CONFIG_RASPBERRYPI_POWER=y
CONFIG_EXTCON=m
CONFIG_EXTCON_ARIZONA=m
CONFIG_IIO=m
CONFIG_IIO_BUFFER=y
CONFIG_IIO_BUFFER_CB=m
CONFIG_IIO_KFIFO_BUF=m
CONFIG_MCP320X=m
CONFIG_MCP3422=m
CONFIG_DHT11=m
CONFIG_HTU21=m
CONFIG_INV_MPU6050_I2C=m
CONFIG_BMP280=m
CONFIG_PWM_BCM2835=m
CONFIG_PWM_PCA9685=m
Expand Down