Skip to content

Commit ed510db

Browse files
T0ny0popcornmix
authored andcommitted
mpu6050 device tree overlay (#2031)
Add overlay and config options for InvenSense MPU6050 6-axis motion detector.
1 parent adb68ce commit ed510db

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
@@ -59,6 +59,7 @@ dtbo-$(CONFIG_ARCH_BCM2835) += \
5959
midi-uart0.dtbo \
6060
midi-uart1.dtbo \
6161
mmc.dtbo \
62+
mpu6050.dtbo \
6263
mz61581.dtbo \
6364
pi3-act-led.dtbo \
6465
pi3-disable-bt.dtbo \

arch/arm/boot/dts/overlays/README

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

900900

901+
Name: mpu6050
902+
Info: Overlay for i2c connected mpu6050 imu
903+
Load: dtoverlay=mpu6050,<param>=<val>
904+
Params: interrupt GPIO pin for interrupt (default 4)
905+
906+
901907
Name: mz61581
902908
Info: MZ61581 display by Tontec
903909
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
@@ -1164,13 +1164,12 @@ CONFIG_RASPBERRYPI_POWER=y
11641164
CONFIG_EXTCON=m
11651165
CONFIG_EXTCON_ARIZONA=m
11661166
CONFIG_IIO=m
1167-
CONFIG_IIO_BUFFER=y
11681167
CONFIG_IIO_BUFFER_CB=m
1169-
CONFIG_IIO_KFIFO_BUF=m
11701168
CONFIG_MCP320X=m
11711169
CONFIG_MCP3422=m
11721170
CONFIG_DHT11=m
11731171
CONFIG_HTU21=m
1172+
CONFIG_INV_MPU6050_I2C=m
11741173
CONFIG_BMP280=m
11751174
CONFIG_PWM_BCM2835=m
11761175
CONFIG_PWM_PCA9685=m

arch/arm/configs/bcmrpi_defconfig

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1170,13 +1170,12 @@ CONFIG_RASPBERRYPI_POWER=y
11701170
CONFIG_EXTCON=m
11711171
CONFIG_EXTCON_ARIZONA=m
11721172
CONFIG_IIO=m
1173-
CONFIG_IIO_BUFFER=y
11741173
CONFIG_IIO_BUFFER_CB=m
1175-
CONFIG_IIO_KFIFO_BUF=m
11761174
CONFIG_MCP320X=m
11771175
CONFIG_MCP3422=m
11781176
CONFIG_DHT11=m
11791177
CONFIG_HTU21=m
1178+
CONFIG_INV_MPU6050_I2C=m
11801179
CONFIG_BMP280=m
11811180
CONFIG_PWM_BCM2835=m
11821181
CONFIG_PWM_PCA9685=m

0 commit comments

Comments
 (0)