Skip to content

Commit

Permalink
arm64: dts: VIM3L: add mpu6050-i2c overlays
Browse files Browse the repository at this point in the history
Signed-off-by: Frank <frank@khadas.com>
  • Loading branch information
yan-wyb committed Sep 29, 2021
1 parent 8ff2e37 commit f25b6d9
Show file tree
Hide file tree
Showing 2 changed files with 52 additions and 1 deletion.
3 changes: 2 additions & 1 deletion arch/arm64/boot/dts/amlogic/overlays/kvim3l/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ dtbo-y += uart3.dtbo \
otg-device.dtbo \
watchdog.dtbo \
i2s.dtbo \
can.dtbo
can.dtbo \
mpu6050-i2c.dtbo

targets += $(dtbo-y)
always := $(dtbo-y)
50 changes: 50 additions & 0 deletions arch/arm64/boot/dts/amlogic/overlays/kvim3l/mpu6050-i2c.dts
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
/dts-v1/;
/plugin/;

#include <dt-bindings/gpio/meson-g12a-gpio.h>
#include <dt-bindings/gpio/gpio.h>

/ {
fragment@0 {
target = <&spicc1>;

__overlay__ {
status = "disabled";
};
};

fragment@1 {
target = <&i2c3>;

__overlay__ {
status = "okay";

mpu6050@68 {
compatible = "invensense,mpu6050";
reg = <0x68>;
int-gpio = <&gpio GPIOH_4 GPIO_ACTIVE_LOW>;
mount-matrix = "-0.984807753012208", /* x0 */
"0", /* y0 */
"-0.173648177666930", /* z0 */
"0", /* x1 */
"-1", /* y1 */
"0", /* z1 */
"-0.173648177666930", /* x2 */
"0", /* y2 */
"0.984807753012208"; /* z2 */
};
};
};

fragment@2 {
target = <&pwm_ef>;

__overlay__ {
// NOTE: This syntax DOES NOT work on device tree overlays
// If you want to use mpu6050, you have to remove pwm_f overlay
/delete-property/ pinctrl-names;
/delete-property/ pinctrl-0;
};
};

};

0 comments on commit f25b6d9

Please sign in to comment.