diff --git a/arch/arm64/boot/dts/amlogic/overlays/kvim3l/Makefile b/arch/arm64/boot/dts/amlogic/overlays/kvim3l/Makefile index c0171c93976713..5939d2de7b8191 100644 --- a/arch/arm64/boot/dts/amlogic/overlays/kvim3l/Makefile +++ b/arch/arm64/boot/dts/amlogic/overlays/kvim3l/Makefile @@ -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) diff --git a/arch/arm64/boot/dts/amlogic/overlays/kvim3l/mpu6050-i2c.dts b/arch/arm64/boot/dts/amlogic/overlays/kvim3l/mpu6050-i2c.dts new file mode 100644 index 00000000000000..4f7377ed4f4531 --- /dev/null +++ b/arch/arm64/boot/dts/amlogic/overlays/kvim3l/mpu6050-i2c.dts @@ -0,0 +1,50 @@ +/dts-v1/; +/plugin/; + +#include +#include + +/ { + 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; + }; + }; + +};