arch: arm: tegra: ardbeg: Add imx135 DT support
Amit Arora [Fri, 17 May 2013 15:14:00 +0000 (20:14 +0530)]
Add imx135 and ad5816 to ardbeg device tree.

Bug 1256437

Change-Id: If622f3440050ad642ba4583a0ea7996452f2001d
Signed-off-by: Amit Arora <amita@nvidia.com>
Reviewed-on: http://git-master/r/229814
Reviewed-by: Chao Xu <cxu@nvidia.com>

Documentation/devicetree/bindings/nvidia,imx135.txt [new file with mode: 0644]
arch/arm/boot/dts/tegra114-ardbeg.dts
arch/arm/boot/dts/tegra124-ardbeg.dts
arch/arm/mach-tegra/board-ardbeg-power.c

diff --git a/Documentation/devicetree/bindings/nvidia,imx135.txt b/Documentation/devicetree/bindings/nvidia,imx135.txt
new file mode 100644 (file)
index 0000000..bde0316
--- /dev/null
@@ -0,0 +1,29 @@
+NVIDIA Camera sensor imx135 driver interface.
+
+Required properties:
+- compatible : The driver is compatible with
+       "nvidia,imx135".
+
+- cam1_gpios : Camera GPIO.
+
+- reset_gpios : Reset GPIO.
+
+- af_gpios : AF1 GPIO.
+
+- reg: Should contain I2C slave address of the driver.
+
+- nvidia,ext_reg : For few platforms this driver needs extra power regulators
+to be enabled. This bool property indicates the same. It must be programmed
+only when imx135 driver needs extra power rails for particular platform.
+
+Example:
+
+       imx135@10 {
+               compatible = "nvidia,imx135";
+               cam1-gpios = <&gpio 221 0>; /* gpio PBB5 */
+               reset-gpios = <&gpio 219 0>; /* gpio PBB3 */
+               af-gpios = <&gpio 225 0>; /* gpio PCC1 */
+               nvidia,ext_reg; /* Extra power-regulators needed */
+               reg = <0x10>;
+               status = "okay";
+       };
index 2ac4211..8213a59 100644 (file)
        i2c@7000c500 {
                status = "okay";
                clock-frequency = <400000>;
+
+               imx135@10 {
+                       compatible = "nvidia,imx135";
+                       cam1-gpios = <&gpio 221 0>; /* gpio PBB5 */
+                       reset-gpios = <&gpio 219 0>; /* gpio PBB3 */
+                       af-gpios = <&gpio 225 0>; /* gpio PCC1 */
+                       nvidia,ext_reg; /* Extra power-regulators needed */
+                       reg = <0x10>;
+                       status = "okay";
+               };
+
+               ad5816@0E {
+                       compatible = "nvidia,ad5816";
+                       reg = <0x0E>;
+                       nvidia,cfg = <0>;
+                       nvidia,num = <0>;
+                       nvidia,sync = <0>;
+                       nvidia,dev_name = "focuser";
+                       status = "okay";
+               };
        };
 
        i2c@7000c700 {
index 95b812e..09df6aa 100644 (file)
                linux,initrd-end = <0x851bc400>;
        };
 
+       gpio: gpio@6000d000 {
+               status = "okay";
+       };
+
        memory@0x80000000 {
                device_type = "memory";
                reg = <0x00000000 0x80000000 0x20000000>;
        };
+
+       i2c@7000c500 {
+               status = "okay";
+               clock-frequency = <400000>;
+
+               imx135@10 {
+                       compatible = "nvidia,imx135";
+                       cam1-gpios = <&gpio 221 0>; /* gpio PBB5 */
+                       reset-gpios = <&gpio 219 0>; /* gpio PBB3 */
+                       af-gpios = <&gpio 225 0>; /* gpio PCC1 */
+                       nvidia,ext_reg; /* Extra power-regulators needed */
+                       reg = <0x10>;
+                       status = "okay";
+               };
+
+               ad5816@0E {
+                       compatible = "nvidia,ad5816";
+                       reg = <0x0E>;
+                       nvidia,cfg = <0>;
+                       nvidia,num = <0>;
+                       nvidia,sync = <0>;
+                       nvidia,dev_name = "focuser";
+                       status = "okay";
+               };
+       };
 };
index 18b6959..120666f 100644 (file)
@@ -121,10 +121,13 @@ static struct regulator_consumer_supply palmas_ldo2_supply[] = {
 static struct regulator_consumer_supply palmas_ldo3_supply[] = {
        REGULATOR_SUPPLY("vddio_cam_mb", NULL),
        REGULATOR_SUPPLY("vdd_cam_1v8_cam", NULL),
+       REGULATOR_SUPPLY("vif", "2-0010"),
+       REGULATOR_SUPPLY("vdd_i2c", "2-000e"),
 };
 
 static struct regulator_consumer_supply palmas_ldo4_supply[] = {
        REGULATOR_SUPPLY("vdd_1v2_cam", NULL),
+       REGULATOR_SUPPLY("vdig", "2-0010"),
 };
 
 static struct regulator_consumer_supply palmas_ldo5_supply[] = {
@@ -133,6 +136,7 @@ static struct regulator_consumer_supply palmas_ldo5_supply[] = {
 
 static struct regulator_consumer_supply palmas_ldo6_supply[] = {
        REGULATOR_SUPPLY("avdd_cam1_cam", NULL),
+       REGULATOR_SUPPLY("vana", "2-0010"),
 };
 
 static struct regulator_consumer_supply palmas_ldo7_supply[] = {
@@ -182,6 +186,8 @@ static struct regulator_consumer_supply palmas_ldo13_supply[] = {
 
 static struct regulator_consumer_supply palmas_ldo14_supply[] = {
        REGULATOR_SUPPLY("avdd_af1_cam", NULL),
+       REGULATOR_SUPPLY("imx135_reg1", NULL),
+       REGULATOR_SUPPLY("vdd", "2-000e"),
 };
 
 static struct regulator_consumer_supply palmas_ldoln_supply[] = {