ARM64: dts: rk3399: vr: add support compass ak8963
authorZorro Liu <lyx@rock-chips.com>
Wed, 27 Jul 2016 09:43:44 +0000 (17:43 +0800)
committerGerrit Code Review <gerrit@rock-chips.com>
Wed, 27 Jul 2016 11:56:57 +0000 (19:56 +0800)
Change-Id: I095e9af7e2e007e042ff35a6a92425707465bc08
Signed-off-by: Zorro Liu <lyx@rock-chips.com>
arch/arm64/boot/dts/rockchip/rk3399-vr-android.dts

index b4da36f74cdbadf71986bf75b4e336abc17b9725..52b69b73bab4d74e1f5218bd3d0eef96747ff2f0 100644 (file)
@@ -42,6 +42,7 @@
 
 /dts-v1/;
 #include <dt-bindings/pwm/pwm.h>
+#include <dt-bindings/sensor-dev.h>
 #include "rk3399.dtsi"
 #include "rk3399-android.dtsi"
 
 };
 
 &i2c4 {
-       status = "disabled";
-       i2c-scl-rising-time-ns = <600>;
-       i2c-scl-falling-time-ns = <20>;
+       status = "okay";
+       i2c-scl-rising-time-ns = <345>;
+       i2c-scl-falling-time-ns = <11>;
+       clock-frequency = <400000>;
+
+       sensor@0f {
+               status = "okay";
+               compatible = "ak8963";
+               pinctrl-names = "default";
+               pinctrl-0 = <&ak8963_irq_gpio>;
+               reg = <0x0f>;
+               type = <SENSOR_TYPE_COMPASS>;
+               irq-gpio = <&gpio1 0 IRQ_TYPE_EDGE_RISING>;
+               irq_enable = <1>;
+               poll_delay_ms = <30>;
+               layout = <1>;
+       };
 };
 
 &i2c5 {
                                <4 25 RK_FUNC_GPIO &pcfg_pull_none>;
                };
        };
+
+       ak8963 {
+               ak8963_irq_gpio: ak8963-irq-gpio {
+                       rockchip,pins = <1 0 RK_FUNC_GPIO &pcfg_pull_none>;
+               };
+       };
 };