ARM64: DT: plugin-manager support for camera board
Frank Chen [Sat, 9 Jan 2016 02:03:28 +0000 (18:03 -0800)]
Add plugin-manager support for camera board. This will
be used to detect the camera board in the system

Bug 1705808

Change-Id: I83e3658e49aa3464d9f7b692bbbad7f4e32429bc
Signed-off-by: Frank Chen <frankc@nvidia.com>
Reviewed-on: http://git-master/r/933398
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Hayden Du <haydend@nvidia.com>

arch/arm64/boot/dts/tegra210-jetson-cv-base-p2597-2180-a00.dts
arch/arm64/boot/dts/tegra210-p4573-2180.dts
arch/arm64/boot/dts/tegra210-platforms/tegra210-camera-e3323-a00.dtsi
arch/arm64/boot/dts/tegra210-platforms/tegra210-camera-e3326-a00.dtsi
arch/arm64/boot/dts/tegra210-platforms/tegra210-jetson-cv-camera-e3323-a00.dtsi
arch/arm64/boot/dts/tegra210-platforms/tegra210-jetson-cv-camera-modules.dtsi [new file with mode: 0644]
arch/arm64/boot/dts/tegra210-plugin-manager/tegra210-jetson-cv-camera-plugin-manager.dtsi [new file with mode: 0644]
arch/arm64/boot/dts/tegra210-plugin-manager/tegra210-jetson-cv-eeprom-manager.dtsi
arch/arm64/boot/dts/tegra210-plugin-manager/tegra210-jetson-cv-plugin-manager.dtsi

index d492e28..c1b6442 100644 (file)
@@ -23,7 +23,7 @@
 #include "tegra210-platforms/tegra210-pinmux-drive-sdmmc-common.dtsi"
 #include "tegra210-platforms/tegra210-jetson-cv-prods.dtsi"
 #include "tegra210-platforms/tegra210-comms-p2530-0930.dtsi"
-#include "tegra210-platforms/tegra210-jetson-cv-camera-e3326-a00.dtsi"
+#include "tegra210-platforms/tegra210-jetson-cv-camera-modules.dtsi"
 #include "tegra210-platforms/tegra210-pwm-fan-p2530-0930.dtsi"
 #include "panel-a-wuxga-8-0.dtsi"
 #include "panel-s-edp-uhdtv-15-6.dtsi"
                };
        };
 
-       camera-pcl {
-               profiles {
-                       ov5693-pcl@2_0036 {
-                               use_of_node = "yes";
-                               dev_name = "ov5693";
-                               num = <1>;
-                               vana-supply = <&en_vdd_cam_hv_2v8>;
-                               vif-supply = <&en_vdd_cam>;
-                               cam2-gpios = <&gpio CAM0_PWDN GPIO_ACTIVE_HIGH>;
-                               reset-gpios = <&gpio CAM0_RST_L GPIO_ACTIVE_HIGH>;
-                       };
-               };
-       };
-
        serial@70006300 {
                dma-names = "tx";
        };
index bdb1231..def2c0d 100644 (file)
                };
 
                profiles {
-                       /delete-node/ ov5693-pcl@2_0036;
-
                        ov10823_A: ov10823-pcl@6_0020 {
                                index = <1>;
                                chipname = "pcl_OV10823_A";
                                        CAMERA_END
                                        >;
                        };
+               };
+       };
 
+       camera-pcl {
+               profiles {
                        ov10823-pcl@6_0020 {
                                use_of_node = "yes";
                                dev_name = "ov10823";
                        };
                };
        };
+
+       plugin-manager {
+               /delete-node/ fragment-e3323@0;
+       };
+
+       host1x {
+               vi {
+                       /delete-node/ ports;
+
+                       csia@54080838 {
+                               /delete-node/ ports;
+                       };
+                       csic@54081038 {
+                               /delete-node/ ports;
+                       };
+                       csie@54081838 {
+                               /delete-node/ ports;
+                       };
+               };
+               i2c@546c0000 {
+                       /delete-node/ ov5693_c@36;
+                       /delete-node/ ov23850_a@10;
+                       /delete-node/ lc898212@72;
+               };
+       };
+
+       i2c@7000c000 {
+               /delete-node/ ov23850_c@36;
+               /delete-node/ lc898212@72;
+       };
 };
index 3cae3f3..a102dac 100644 (file)
                        ports {
                                port@6 {
                                        reg = <6>;
-
                                        vi_in6: endpoint {
                                                remote-endpoint = <&lc898212_out0>;
                                        };
                                };
                                port@7 {
                                        reg = <7>;
-
                                        vi_in7: endpoint {
                                                remote-endpoint = <&lc898212_out1>;
                                        };
                                };
                        };
+
                        csia@54080838 {
                                ports {
                                        #address-cells = <1>;
@@ -44,7 +43,7 @@
 
                                        port@0 {
                                                reg = <0>;
-                                               csi_in0: endpoint@0 {
+                                               e3323_cam0_csia_in0: endpoint@0 {
                                                        bus-width = <4>;
                                                        remote-endpoint = <&ov23850_out0>;
                                                };
@@ -59,7 +58,7 @@
 
                                        port@0 {
                                                reg = <0>;
-                                               csi_in2: endpoint@2 {
+                                               e3323_cam1_csic_in0: endpoint@0 {
                                                        bus-width = <4>;
                                                        remote-endpoint = <&ov23850_out2>;
                                                };
                                                reg = <0>;
                                                ov23850_out0: endpoint {
                                                        bus-width = <4>;
-                                                       remote-endpoint = <&csi_in0>;
+                                                       remote-endpoint = <&e3323_cam0_csia_in0>;
                                                };
                                        };
                                };
                        };
-                       lc898212@6_0072 {
+                       lc898212@72 {
                                compatible = "nvidia,lc898212";
                                reg = <0x72>;
 
                                        reg = <0>;
                                        ov23850_out2: endpoint {
                                                bus-width = <4>;
-                                               remote-endpoint = <&csi_in2>;
+                                               remote-endpoint = <&e3323_cam1_csic_in0>;
                                        };
                                };
                        };
                };
-
-               lc898212@0_0072 {
+               lc898212@72 {
                        compatible = "nvidia,lc898212";
                        reg = <0x72>;
 
index af2e215..4e2f77e 100644 (file)
@@ -28,7 +28,7 @@
 
                                        port@0 {
                                                reg = <0>;
-                                               csi_in0: endpoint@0 {
+                                               ov5693_c_csic_in0: endpoint@0 {
                                                        bus-width = <2>;
                                                        remote-endpoint = <&ov5693_out0>;
                                                };
                                                reg = <0>;
                                                ov5693_out0: endpoint {
                                                        bus-width = <2>;
-                                                       remote-endpoint = <&csi_in0>;
+                                                       remote-endpoint = <&ov5693_c_csic_in0>;
                                                };
                                        };
                                };
index a6482d9..822e224 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, NVIDIA CORPORATION.  All rights reserved.
+ * Copyright (c) 2015-2016, NVIDIA CORPORATION.  All rights reserved.
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -41,7 +41,7 @@
                                vif-supply = <&en_vdd_cam>;
                                vvcm-suply = <&en_vdd_vcm_2v8>;
                        };
-                       lc898212_1: lc898212@6_0072 {
+                       lc898212_1: lc898212@72 {
                                vvcm-supply = <&en_vdd_vcm_2v8>;
                        };
                };
@@ -59,7 +59,7 @@
                        vif-supply = <&en_vdd_cam>;
                        vvcm-suply = <&en_vdd_vcm_2v8>;
                };
-               lc898212_2: lc898212@0_0072 {
+               lc898212_2: lc898212@72 {
                        vvcm-supply = <&en_vdd_vcm_2v8>;
                };
        };
diff --git a/arch/arm64/boot/dts/tegra210-platforms/tegra210-jetson-cv-camera-modules.dtsi b/arch/arm64/boot/dts/tegra210-platforms/tegra210-jetson-cv-camera-modules.dtsi
new file mode 100644 (file)
index 0000000..1b80054
--- /dev/null
@@ -0,0 +1,102 @@
+/*
+ * Copyright (c) 2016, NVIDIA CORPORATION.  All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
+ * more details.
+ *
+ */
+
+#include "tegra210-platforms/tegra210-jetson-cv-camera-e3323-a00.dtsi"
+#include "tegra210-platforms/tegra210-jetson-cv-camera-e3326-a00.dtsi"
+
+#define CAM0_RST_L     TEGRA_GPIO(S, 4)
+#define CAM0_PWDN      TEGRA_GPIO(S, 7)
+#define CAM1_RST_L     TEGRA_GPIO(S, 5)
+#define CAM1_PWDN      TEGRA_GPIO(T, 0)
+
+/ {
+       /* set camera gpio direction to output */
+       gpio: gpio@6000d000 {
+               camera-control {
+                       gpio-output-low = <
+                               CAM0_RST_L
+                               CAM0_PWDN
+                               CAM1_RST_L
+                               CAM1_PWDN
+                               >;
+               };
+       };
+
+       /* all cameras are disabled by default */
+       host1x {
+               vi {
+                       ports {
+                               vi_port6: port@6 {
+                                       status = "disabled";
+                                       vi_in6: endpoint {
+                                               status = "disabled";
+                                       };
+                               };
+                               vi_port7: port@7 {
+                                       status = "disabled";
+                                       vi_in7: endpoint {
+                                               status = "disabled";
+                                       };
+                               };
+                       };
+               };
+               i2c@546c0000 {
+                       e3326_cam0: ov5693_c@36 {
+                               status = "okay";
+                       };
+                       e3323_cam0: ov23850_a@10 {
+                               status = "disabled";
+                       };
+                       e3323_vcm0: lc898212@72 {
+                               status = "disabled";
+                       };
+               };
+       };
+       i2c@7000c000 {
+               e3323_cam1: ov23850_c@36 {
+                       status = "disabled";
+               };
+               e3323_vcm1: lc898212@72 {
+                       status = "disabled";
+               };
+       };
+
+       tegra-camera-platform {
+               compatible = "nvidia, tegra-camera-platform";
+               modules {
+                       cam_module0: module0 {
+                               status = "okay";
+                               cam_module0_drivernode0: drivernode0 {
+                                       status = "okay";
+                               };
+                               cam_module0_drivernode1: drivernode1 {
+                                       status = "okay";
+                                       pcl_id = "v4l2_focuser_stub";
+                                       proc-device-tree = "";
+                               };
+                       };
+                       cam_module1: module1 {
+                               status = "disabled";
+                               cam_module1_drivernode0: drivernode0 {
+                                       status = "disabled";
+                               };
+                               cam_module1_drivernode1: drivernode1 {
+                                       status = "disabled";
+                                       pcl_id = "v4l2_focuser_stub";
+                                       proc-device-tree = "";
+                               };
+                       };
+               };
+       };
+};
diff --git a/arch/arm64/boot/dts/tegra210-plugin-manager/tegra210-jetson-cv-camera-plugin-manager.dtsi b/arch/arm64/boot/dts/tegra210-plugin-manager/tegra210-jetson-cv-camera-plugin-manager.dtsi
new file mode 100644 (file)
index 0000000..845349e
--- /dev/null
@@ -0,0 +1,144 @@
+/*
+ * Copyright (c) 2016, NVIDIA CORPORATION.  All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
+ * more details.
+ *
+ */
+/ {
+       /* camera plugin-manager */
+       plugin-manager {
+               /* E3326 camera board is enabled by default */
+
+               /* E3323 camera board */
+               fragment-e3323@0 {
+                       ids = "3323-1000-A00", "3323-1000-A01", "3323-1000-100";
+                       override@0 {
+                               target = <&e3323_cam0>;
+                               _overlay_ {
+                                       status = "okay";
+                               };
+                       };
+                       override@1 {
+                               target = <&cam_module0>;
+                               _overlay_ {
+                                       status = "okay";
+                                       badge = "e3323_bottom_CH06P1";
+                                       position = "bottom";
+                                       orientation = "3";
+                               };
+                       };
+                       override@2 {
+                               target = <&cam_module0_drivernode0>;
+                               _overlay_ {
+                                       status = "okay";
+                                       pcl_id = "v4l2_soc_sensor";
+                                       proc-device-tree = "/proc/device-tree/host1x/i2c@546c0000/ov23850_a@10";
+                               };
+                       };
+                       override@3 {
+                               target = <&e3323_cam0_csia_in0>;
+                               _overlay_ {
+                                       status = "okay";
+                                       bus-width = <4>;
+                                       remote-endpoint = <&ov23850_out0>;
+                               };
+                       };
+                       override@4 {
+                               target = <&e3323_cam1>;
+                               _overlay_ {
+                                       status = "okay";
+                               };
+                       };
+                       override@5 {
+                               target = <&cam_module1>;
+                               _overlay_ {
+                                       status = "okay";
+                                       badge = "e3323_top_CH06P1";
+                                       position = "top";
+                                       orientation = "3";
+                               };
+                       };
+                       override@6 {
+                               target = <&cam_module1_drivernode0>;
+                               _overlay_ {
+                                       status = "okay";
+                                       pcl_id = "v4l2_soc_sensor";
+                                       proc-device-tree = "/proc/device-tree/i2c@7000c000/ov23850_c@36";
+                               };
+                       };
+                       override@7 {
+                               target = <&e3323_cam1_csic_in0>;
+                               _overlay_ {
+                                       status = "okay";
+                                       bus-width = <4>;
+                                       remote-endpoint = <&ov23850_out2>;
+                               };
+                       };
+                       override@8 {
+                               target = <&vi_port6>;
+                               _overlay_ {
+                                       status = "okay";
+                               };
+                       };
+                       override@9 {
+                               target = <&vi_in6>;
+                               _overlay_ {
+                                       status = "okay";
+                               };
+                       };
+                       override@10 {
+                               target = <&e3323_vcm0>;
+                               _overlay_ {
+                                       status = "okay";
+                               };
+                       };
+                       override@11 {
+                               target = <&cam_module0_drivernode1>;
+                               _overlay_ {
+                                       status = "okay";
+                                       pcl_id = "v4l2_focuser";
+                                       proc-device-tree = "/proc/device-tree/host1x/i2c@546c0000/lc898212@72";
+                               };
+                       };
+                       override@12 {
+                               target = <&vi_port7>;
+                               _overlay_ {
+                                       status = "okay";
+                               };
+                       };
+                       override@13 {
+                               target = <&vi_in7>;
+                               _overlay_ {
+                                       status = "okay";
+                               };
+                       };
+                       override@14 {
+                               target = <&e3323_vcm1>;
+                               _overlay_ {
+                                       status = "okay";
+                               };
+                       };
+                       override@15 {
+                               target = <&cam_module1_drivernode1>;
+                               _overlay_ {
+                                       status = "okay";
+                                       pcl_id = "v4l2_focuser";
+                                       proc-device-tree = "/proc/device-tree/i2c@7000c000/lc898212@72";
+                               };
+                       };
+                       override@16 {
+                               target = <&e3326_cam0>;
+                               _overlay_ {
+                                       status = "disabled";
+                               };
+                       };
+               };
+       };
+};
index e9acb45..58e2e5f 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, NVIDIA CORPORATION.  All rights reserved.
+ * Copyright (c) 2015-2016, NVIDIA CORPORATION.  All rights reserved.
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
                        i2c-bus = <&i2c3>;
                        word-address-1-byte-slave-addresses = <0x50 0x57>;
                };
+               bus@3 {
+                       i2c-bus = <&i2c7>;
+                       word-address-1-byte-slave-addresses = <0x54>;
+                       gpio-node = "/i2c@7000c400/tca9539@77";
+                       gpio-pin = <0x9>;
+                       bus-type = "i2cvi";
+               };
        };
 };