arm64: dts: rockchip: add sensors config for rk3399 mid board
authorZorro Liu <lyx@rock-chips.com>
Mon, 11 Jul 2016 11:09:13 +0000 (19:09 +0800)
committerHuang, Tao <huangtao@rock-chips.com>
Tue, 12 Jul 2016 07:20:59 +0000 (15:20 +0800)
Change-Id: Ib97f1802ea14fb0d5fcb043325733f4d58e1188a
Signed-off-by: Zorro Liu <lyx@rock-chips.com>
arch/arm64/boot/dts/rockchip/rk3399-mid-818-android.dts

index bd873a093ce1d972d4682528ae1ce67bba83ad13..01902ec1f5acd7c5609e2e36e2f07e7882677334 100644 (file)
@@ -44,6 +44,7 @@
 
 #include "rk3399.dtsi"
 #include "rk3399-android.dtsi"
+#include <dt-bindings/sensor-dev.h>
 
 / {
        compatible = "rockchip,rk3399-mid", "rockchip,rk3399";
                orientation-z= <0>;
                mpu-debug = <1>;
        };
+
+       sensor@0d {
+               status = "okay";
+               compatible = "ak8963";
+               pinctrl-names = "default";
+               pinctrl-0 = <&ak8963_irq_gpio>;
+               reg = <0x0d>;
+               type = <SENSOR_TYPE_COMPASS>;
+               irq-gpio = <&gpio2 28 IRQ_TYPE_EDGE_RISING>;
+               irq_enable = <0>;
+               poll_delay_ms = <30>;
+               layout = <3>;
+       };
+
+       sensor@20 {
+               status = "disabled";
+               compatible = "capella,light_cm3218";
+               pinctrl-names = "default";
+               pinctrl-0 = <&cm3218_irq_gpio>;
+               reg = <0x20>;
+               type = <SENSOR_TYPE_LIGHT>;
+               irq-gpio = <&gpio4 24 IRQ_TYPE_EDGE_RISING>;
+               irq_enable = <1>;
+               poll_delay_ms = <30>;
+       };
 };
 
 &i2c5 {
                        rockchip,pins = <2 27 RK_FUNC_GPIO &pcfg_pull_none>;
                };
        };
+
+       ak8963 {
+               ak8963_irq_gpio: ak8963-irq-gpio {
+                       rockchip,pins = <2 28 RK_FUNC_GPIO &pcfg_pull_none>;
+               };
+       };
+
+       cm3218 {
+               cm3218_irq_gpio: cm3218-irq-gpio {
+                       rockchip,pins = <4 24 RK_FUNC_GPIO &pcfg_pull_none>;
+               };
+       };
 };
 
 &rk_screen {