Skip to content

Commit 3f9f516

Browse files
T0ny0pelwell
authored andcommitted
mpu6050 device tree overlay (#2031)
Add overlay and config options for InvenSense MPU6050 6-axis motion detector.
1 parent 8dad3ff commit 3f9f516

File tree

5 files changed

+37
-4
lines changed

5 files changed

+37
-4
lines changed

arch/arm/boot/dts/overlays/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ dtbo-$(CONFIG_ARCH_BCM2835) += \
5858
mcp3008.dtbo \
5959
midi-uart0.dtbo \
6060
mmc.dtbo \
61+
mpu6050.dtbo \
6162
mz61581.dtbo \
6263
pi3-act-led.dtbo \
6364
pi3-disable-bt.dtbo \

arch/arm/boot/dts/overlays/README

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -891,6 +891,12 @@ Params: overclock_50 Clock (in MHz) to use when the MMC framework
891891
requests 50MHz
892892

893893

894+
Name: mpu6050
895+
Info: Overlay for i2c connected mpu6050 imu
896+
Load: dtoverlay=mpu6050,<param>=<val>
897+
Params: interrupt GPIO pin for interrupt (default 4)
898+
899+
894900
Name: mz61581
895901
Info: MZ61581 display by Tontec
896902
Load: dtoverlay=mz61581,<param>=<val>
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
// Definitions for MPU6050
2+
/dts-v1/;
3+
/plugin/;
4+
5+
/ {
6+
compatible = "brcm,bcm2708";
7+
8+
fragment@0 {
9+
target = <&i2c1>;
10+
__overlay__ {
11+
#address-cells = <1>;
12+
#size-cells = <0>;
13+
status = "okay";
14+
clock-frequency = <400000>;
15+
16+
mpu6050: mpu6050@68 {
17+
compatible = "invensense,mpu6050";
18+
reg = <0x68>;
19+
interrupt-parent = <&gpio>;
20+
interrupts = <4 1>;
21+
};
22+
};
23+
};
24+
25+
__overrides__ {
26+
interrupt = <&mpu6050>,"interrupts:0";
27+
};
28+
};

arch/arm/configs/bcm2709_defconfig

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1173,13 +1173,12 @@ CONFIG_RASPBERRYPI_POWER=y
11731173
CONFIG_EXTCON=m
11741174
CONFIG_EXTCON_ARIZONA=m
11751175
CONFIG_IIO=m
1176-
CONFIG_IIO_BUFFER=y
11771176
CONFIG_IIO_BUFFER_CB=m
1178-
CONFIG_IIO_KFIFO_BUF=m
11791177
CONFIG_MCP320X=m
11801178
CONFIG_MCP3422=m
11811179
CONFIG_DHT11=m
11821180
CONFIG_HTU21=m
1181+
CONFIG_INV_MPU6050_I2C=m
11831182
CONFIG_BMP280=m
11841183
CONFIG_PWM_BCM2835=m
11851184
CONFIG_PWM_PCA9685=m

arch/arm/configs/bcmrpi_defconfig

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1182,13 +1182,12 @@ CONFIG_RASPBERRYPI_POWER=y
11821182
CONFIG_EXTCON=m
11831183
CONFIG_EXTCON_ARIZONA=m
11841184
CONFIG_IIO=m
1185-
CONFIG_IIO_BUFFER=y
11861185
CONFIG_IIO_BUFFER_CB=m
1187-
CONFIG_IIO_KFIFO_BUF=m
11881186
CONFIG_MCP320X=m
11891187
CONFIG_MCP3422=m
11901188
CONFIG_DHT11=m
11911189
CONFIG_HTU21=m
1190+
CONFIG_INV_MPU6050_I2C=m
11921191
CONFIG_BMP280=m
11931192
CONFIG_PWM_BCM2835=m
11941193
CONFIG_PWM_PCA9685=m

0 commit comments

Comments
 (0)