ARM: dts: add cm36651 light/proximity sensor node for exynos4412-trats2
authorBeomho Seo <beomho.seo@samsung.com>
Wed, 21 May 2014 22:56:53 +0000 (07:56 +0900)
committerKukjin Kim <kgene.kim@samsung.com>
Thu, 22 May 2014 17:31:56 +0000 (02:31 +0900)
Exynos4412-trats2 board have light/proximity sensor.
This patch add cm36651 light/ proximity sensor node for exynos4412.
cm36651 is required properties as below.
- Use i2c-gpio for cm36651 sensor.
- Use fixed regulator for the IR LED.
  It is a part of the cm36651 for proximity detection.
- cm36651 is i2c device driver so need to use i2c-gpio driver.

Signed-off-by: Beomho Seo <beomho.seo@samsung.com>
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
Reviewed-by: Tomasz Figa <t.figa@samsung.com>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
arch/arm/boot/dts/exynos4412-trats2.dts

index f621fd976815cfcd93bd0d636a16ba34c1e1a0de..c89f10c1efc7f9def73e2c15ae459c209a92b830 100644 (file)
@@ -21,6 +21,7 @@
 
        aliases {
                i2c9 = &i2c_ak8975;
+               i2c10 = &i2c_cm36651;
        };
 
        memory {
                        enable-active-high;
                        regulator-always-on;
                };
+
+               ps_als_reg: voltage-regulator-5 {
+                       compatible = "regulator-fixed";
+                       regulator-name = "LED_A_3.0V";
+                       regulator-min-microvolt = <3000000>;
+                       regulator-max-microvolt = <3000000>;
+                       gpio = <&gpj0 5 0>;
+                       enable-active-high;
+               };
        };
 
        gpio-keys {
                };
        };
 
+       i2c_cm36651: i2c-gpio-2 {
+               compatible = "i2c-gpio";
+               gpios = <&gpf0 0 1>, <&gpf0 1 1>;
+               i2c-gpio,delay-us = <2>;
+               #address-cells = <1>;
+               #size-cells = <0>;
+
+               cm36651@18 {
+                       compatible = "capella,cm36651";
+                       reg = <0x18>;
+                       interrupt-parent = <&gpx0>;
+                       interrupts = <2 2>;
+                       vled-supply = <&ps_als_reg>;
+               };
+       };
+
        spi_1: spi@13930000 {
                pinctrl-names = "default";
                pinctrl-0 = <&spi1_bus>;