From 0aa4389b319cf59e9000598e34d099d344536360 Mon Sep 17 00:00:00 2001 From: Ankur Pawar Date: Fri, 8 Mar 2024 11:05:24 +0000 Subject: [PATCH] t23x: overlay: enable IMX219 autodetection 1 Enable dual IMX219 by default for autodetection. 2 Rename the overlay configs. 3 Fix the IMX477 4 lane overlay. Bug 4547993 Change-Id: Iaeb1b1d2be6bbda589d5fd6fedb410ce310f09cb Signed-off-by: Ankur Pawar Reviewed-on: https://git-master.nvidia.com/r/c/device/hardware/nvidia/t23x-public-dts/+/3092357 Reviewed-by: svcacv Reviewed-by: Bitan Biswas Reviewed-by: Shubham Chandra GVS: Gerrit_Virtual_Submit --- overlay/Makefile | 8 +- overlay/tegra234-camera-rbpcv2-imx219.dtsi | 3 +- ... tegra234-p3767-camera-p3768-imx219-A.dts} | 11 +- ... tegra234-p3767-camera-p3768-imx219-C.dts} | 15 +- ...ra234-p3767-camera-p3768-imx219-imx477.dts | 10 +- ... tegra234-p3767-camera-p3768-imx477-A.dts} | 11 +- ... tegra234-p3767-camera-p3768-imx477-C.dts} | 19 +- ...4-p3767-camera-p3768-imx477-dual-4lane.dts | 245 +++++++++--------- ...egra234-p3767-camera-p3768-imx477-dual.dts | 12 +- ...ra234-p3767-camera-p3768-imx477-imx219.dts | 4 + ...tegra234-p3768-0000+p3767-0000-dynamic.dts | 4 +- .../tegra234-p3768-camera-rbpcv2-imx219.dtsi | 54 ++++ 12 files changed, 251 insertions(+), 145 deletions(-) rename overlay/{tegra234-p3767-camera-p3768-imx219-cam1.dts => tegra234-p3767-camera-p3768-imx219-A.dts} (98%) rename overlay/{tegra234-p3767-camera-p3768-imx219-cam0.dts => tegra234-p3767-camera-p3768-imx219-C.dts} (97%) rename overlay/{tegra234-p3767-camera-p3768-imx477-cam1.dts => tegra234-p3767-camera-p3768-imx477-A.dts} (98%) rename overlay/{tegra234-p3767-camera-p3768-imx477-cam0.dts => tegra234-p3767-camera-p3768-imx477-C.dts} (96%) create mode 100644 overlay/tegra234-p3768-camera-rbpcv2-imx219.dtsi diff --git a/overlay/Makefile b/overlay/Makefile index 5672601..c88bbe2 100644 --- a/overlay/Makefile +++ b/overlay/Makefile @@ -55,11 +55,11 @@ dtbo-y += tegra234-p3737-camera-dual-hawk-ar0234-e3653-overlay.dtbo dtbo-y += tegra234-p3737-camera-imx390-overlay.dtbo dtbo-y += tegra234-p3737-camera-p3762-a00-overlay.dtbo dtbo-y += tegra234-p3740-camera-p3783-a00-overlay.dtbo -dtbo-y += tegra234-p3767-camera-p3768-imx219-cam0.dtbo -dtbo-y += tegra234-p3767-camera-p3768-imx219-cam1.dtbo +dtbo-y += tegra234-p3767-camera-p3768-imx219-C.dtbo +dtbo-y += tegra234-p3767-camera-p3768-imx219-A.dtbo dtbo-y += tegra234-p3767-camera-p3768-imx219-imx477.dtbo -dtbo-y += tegra234-p3767-camera-p3768-imx477-cam0.dtbo -dtbo-y += tegra234-p3767-camera-p3768-imx477-cam1.dtbo +dtbo-y += tegra234-p3767-camera-p3768-imx477-C.dtbo +dtbo-y += tegra234-p3767-camera-p3768-imx477-A.dtbo ifneq ($(dtb-y),) dtb-y := $(addprefix $(makefile-path)/,$(dtb-y)) diff --git a/overlay/tegra234-camera-rbpcv2-imx219.dtsi b/overlay/tegra234-camera-rbpcv2-imx219.dtsi index 913e711..71059ef 100644 --- a/overlay/tegra234-camera-rbpcv2-imx219.dtsi +++ b/overlay/tegra234-camera-rbpcv2-imx219.dtsi @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-2.0-only -// SPDX-FileCopyrightText: Copyright (c) 2023, NVIDIA CORPORATION & AFFILIATES. All rights reserved. +// SPDX-FileCopyrightText: Copyright (c) 2023-2024, NVIDIA CORPORATION & AFFILIATES. All rights reserved. #include #include @@ -664,7 +664,6 @@ port@0 { reg = <0>; rbpcv2_imx219_out1: endpoint { - status = "okay"; port-index = <2>; bus-width = <2>; remote-endpoint = <&rbpcv2_imx219_csi_in1>; diff --git a/overlay/tegra234-p3767-camera-p3768-imx219-cam1.dts b/overlay/tegra234-p3767-camera-p3768-imx219-A.dts similarity index 98% rename from overlay/tegra234-p3767-camera-p3768-imx219-cam1.dts rename to overlay/tegra234-p3767-camera-p3768-imx219-A.dts index 260b944..e78532c 100644 --- a/overlay/tegra234-p3767-camera-p3768-imx219-cam1.dts +++ b/overlay/tegra234-p3767-camera-p3768-imx219-A.dts @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-2.0-only -// SPDX-FileCopyrightText: Copyright (c) 2023 NVIDIA CORPORATION. All rights reserved. +// SPDX-FileCopyrightText: Copyright (c) 2023-2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved. /dts-v1/; /plugin/; @@ -12,11 +12,11 @@ #include / { - overlay-name = "Camera IMX219-cam1"; + overlay-name = "Camera IMX219-A"; jetson-header-name = "Jetson 24pin CSI Connector"; compatible = JETSON_COMPATIBLE_P3768; - /* IMX219 sensor module on CSI PORT A */ + /* IMX219 sensor module on CSI PORT A / cam1 */ fragment@0 { target-path = "/"; __overlay__ { @@ -435,6 +435,11 @@ }; }; }; + i2c@1 { + rbpcv2_imx219_c@10 { + status = "disabled"; + }; + }; }; lens_imx219@RBPCV2 { min_focus_distance = "0.0"; diff --git a/overlay/tegra234-p3767-camera-p3768-imx219-cam0.dts b/overlay/tegra234-p3767-camera-p3768-imx219-C.dts similarity index 97% rename from overlay/tegra234-p3767-camera-p3768-imx219-cam0.dts rename to overlay/tegra234-p3767-camera-p3768-imx219-C.dts index 0ce823c..d1cb3ab 100644 --- a/overlay/tegra234-p3767-camera-p3768-imx219-cam0.dts +++ b/overlay/tegra234-p3767-camera-p3768-imx219-C.dts @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-2.0-only -// SPDX-FileCopyrightText: Copyright (c) 2023 NVIDIA CORPORATION. All rights reserved. +// SPDX-FileCopyrightText: Copyright (c) 2023-2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved. /dts-v1/; /plugin/; @@ -12,11 +12,11 @@ #include / { - overlay-name = "Camera IMX219-cam0"; + overlay-name = "Camera IMX219-C"; jetson-header-name = "Jetson 24pin CSI Connector"; compatible = JETSON_COMPATIBLE_P3768; - /* IMX219 sensor module on CSI PORT B */ + /* IMX219 sensor module on CSI PORT B / cam0 */ fragment@0 { target-path = "/"; __overlay__ { @@ -109,7 +109,7 @@ #size-cells = <0>; csi_chan1_port0: port@0 { reg = <0>; - rbpcv2_imx219_csi_in1: endpoint@0 { + rbpcv2_imx219_csi_in1: endpoint@2 { port-index = <2>; bus-width = <2>; remote-endpoint = <&rbpcv2_imx219_out1>; @@ -117,7 +117,7 @@ }; csi_chan1_port1: port@1 { reg = <1>; - rbpcv2_imx219_csi_out1: endpoint@1 { + rbpcv2_imx219_csi_out1: endpoint@3 { remote-endpoint = <&rbpcv2_imx219_vi_in1>; }; }; @@ -132,6 +132,11 @@ #size-cells = <0>; mux-gpios = <&gpio_aon CAM_I2C_MUX GPIO_ACTIVE_HIGH>; i2c-parent = <&cam_i2c>; + i2c@0 { + rbpcv2_imx219_a@10 { + status = "disabled"; + }; + }; i2c@1 { status = "okay"; reg = <1>; diff --git a/overlay/tegra234-p3767-camera-p3768-imx219-imx477.dts b/overlay/tegra234-p3767-camera-p3768-imx219-imx477.dts index a0502a0..fd6d2ba 100644 --- a/overlay/tegra234-p3767-camera-p3768-imx219-imx477.dts +++ b/overlay/tegra234-p3767-camera-p3768-imx219-imx477.dts @@ -12,9 +12,10 @@ #include / { - overlay-name = "Camera IMX219-cam1 and IMX477-cam0"; + overlay-name = "Camera IMX219-A and IMX477-C"; jetson-header-name = "Jetson 24pin CSI Connector"; compatible = JETSON_COMPATIBLE_P3768; + /* IMX477 connected on cam0 and IMX219 connected on cam1 port */ fragment@0 { target-path = "/"; @@ -145,7 +146,7 @@ ports { #address-cells = <1>; #size-cells = <0>; - port@2 { + port@0 { reg = <0>; rbpcv3_imx477_csi_in1: endpoint@2 { port-index = <2>; @@ -153,7 +154,7 @@ remote-endpoint = <&rbpcv3_imx477_out1>; }; }; - port@3 { + port@1 { reg = <1>; rbpcv3_imx477_csi_out1: endpoint@3 { remote-endpoint = <&rbpcv3_imx477_vi_in1>; @@ -477,6 +478,9 @@ reg = <1>; #address-cells = <1>; #size-cells = <0>; + rbpcv2_imx219_c@10 { + status = "disabled"; + }; rbpcv3_imx477_c@1a { reset-gpios = <&gpio CAM1_PWDN GPIO_ACTIVE_HIGH>; compatible = "ridgerun,imx477"; diff --git a/overlay/tegra234-p3767-camera-p3768-imx477-cam1.dts b/overlay/tegra234-p3767-camera-p3768-imx477-A.dts similarity index 98% rename from overlay/tegra234-p3767-camera-p3768-imx477-cam1.dts rename to overlay/tegra234-p3767-camera-p3768-imx477-A.dts index 35412c5..6bddd7c 100644 --- a/overlay/tegra234-p3767-camera-p3768-imx477-cam1.dts +++ b/overlay/tegra234-p3767-camera-p3768-imx477-A.dts @@ -11,9 +11,10 @@ #include / { - overlay-name = "Camera IMX477-cam1"; + overlay-name = "Camera IMX477-A"; jetson-header-name = "Jetson 24pin CSI Connector"; compatible = JETSON_COMPATIBLE_P3768; + /* IMX477 connected to cam1 port */ fragment@0 { target-path = "/"; @@ -131,6 +132,9 @@ reg = <0>; #address-cells = <1>; #size-cells = <0>; + rbpcv2_imx219_a@10 { + status = "disabled"; + }; rbpcv3_imx477_a@1a { reset-gpios = <&gpio CAM0_PWDN GPIO_ACTIVE_HIGH>; compatible = "ridgerun,imx477"; @@ -323,6 +327,11 @@ }; }; }; + i2c@1 { + rbpcv2_imx219_c@10 { + status = "disabled"; + }; + }; }; gpio@6000d000 { camera-control-output-low { diff --git a/overlay/tegra234-p3767-camera-p3768-imx477-cam0.dts b/overlay/tegra234-p3767-camera-p3768-imx477-C.dts similarity index 96% rename from overlay/tegra234-p3767-camera-p3768-imx477-cam0.dts rename to overlay/tegra234-p3767-camera-p3768-imx477-C.dts index ecd9975..23c8416 100644 --- a/overlay/tegra234-p3767-camera-p3768-imx477-cam0.dts +++ b/overlay/tegra234-p3767-camera-p3768-imx477-C.dts @@ -11,9 +11,10 @@ #include / { - overlay-name = "Camera IMX477-cam0"; + overlay-name = "Camera IMX477-C"; jetson-header-name = "Jetson 24pin CSI Connector"; compatible = JETSON_COMPATIBLE_P3768; + /*IMX477 connected on cam0 port */ fragment@0 { target-path = "/"; @@ -23,7 +24,7 @@ ports { #address-cells = <1>; #size-cells = <0>; - port@1 { + port@0 { reg = <0>; rbpcv3_imx477_vi_in1: endpoint { port-index = <2>; @@ -96,12 +97,12 @@ num-channels = <1>; #address-cells = <1>; #size-cells = <0>; - channel@1 { + channel@0 { reg = <0>; ports { #address-cells = <1>; #size-cells = <0>; - port@2 { + port@0 { reg = <0>; rbpcv3_imx477_csi_in1: endpoint@0 { port-index = <2>; @@ -109,7 +110,7 @@ remote-endpoint = <&rbpcv3_imx477_out1>; }; }; - port@3 { + port@1 { reg = <1>; rbpcv3_imx477_csi_out1: endpoint@1 { remote-endpoint = <&rbpcv3_imx477_vi_in1>; @@ -126,11 +127,19 @@ #size-cells = <0>; mux-gpios = <&gpio_aon CAM_I2C_MUX GPIO_ACTIVE_HIGH>; i2c-parent = <&cam_i2c>; + i2c@0 { + rbpcv2_imx219_a@10 { + status = "disabled"; + }; + }; i2c@1 { status = "okay"; reg = <1>; #address-cells = <1>; #size-cells = <0>; + rbpcv2_imx219_c@10 { + status = "disabled"; + }; rbpcv3_imx477_c@1a { reset-gpios = <&gpio CAM1_PWDN GPIO_ACTIVE_HIGH>; compatible = "ridgerun,imx477"; diff --git a/overlay/tegra234-p3767-camera-p3768-imx477-dual-4lane.dts b/overlay/tegra234-p3767-camera-p3768-imx477-dual-4lane.dts index be4f876..626c0aa 100644 --- a/overlay/tegra234-p3767-camera-p3768-imx477-dual-4lane.dts +++ b/overlay/tegra234-p3767-camera-p3768-imx477-dual-4lane.dts @@ -27,7 +27,7 @@ reg = <0>; rbpcv3_imx477_vi_in0: endpoint { port-index = <1>; - bus-width = <2>; + bus-width = <4>; remote-endpoint = <&rbpcv3_imx477_csi_out0>; }; }; @@ -35,7 +35,7 @@ reg = <1>; rbpcv3_imx477_vi_in1: endpoint { port-index = <2>; - bus-width = <4>; + bus-width = <2>; remote-endpoint = <&rbpcv3_imx477_csi_out1>; }; }; @@ -122,7 +122,7 @@ reg = <0>; rbpcv3_imx477_csi_in0: endpoint@0 { port-index = <1>; - bus-width = <2>; + bus-width = <4>; remote-endpoint = <&rbpcv3_imx477_out0>; }; }; @@ -139,15 +139,15 @@ ports { #address-cells = <1>; #size-cells = <0>; - port@2 { + port@0 { reg = <0>; rbpcv3_imx477_csi_in1: endpoint@2 { port-index = <2>; - bus-width = <4>; + bus-width = <2>; remote-endpoint = <&rbpcv3_imx477_out1>; }; }; - port@3 { + port@1 { reg = <1>; rbpcv3_imx477_csi_out1: endpoint@3 { remote-endpoint = <&rbpcv3_imx477_vi_in1>; @@ -169,6 +169,9 @@ reg = <0>; #address-cells = <1>; #size-cells = <0>; + rbpcv2_imx219_a@10 { + status = "disabled"; + }; rbpcv3_imx477_a@1a { reset-gpios = <&gpio CAM0_PWDN GPIO_ACTIVE_HIGH>; compatible = "ridgerun,imx477"; @@ -271,122 +274,15 @@ * Sensor embedded metadata height in units of rows. * If sensor does not support embedded metadata value should be 0. */ - mode0 { /* IMX477_MODE_3840x2160 */ - mclk_khz = "24000"; - num_lanes = "2"; - tegra_sinterface = "serial_b"; - phy_mode = "DPHY"; - discontinuous_clk = "no"; - dpcm_enable = "false"; - cil_settletime = "0"; - lane_polarity = "6"; - active_w = "3840"; - active_h = "2160"; - mode_type = "bayer"; - pixel_phase = "rggb"; - csi_pixel_bit_depth = "10"; - readout_orientation = "90"; - line_length = "112000"; - inherent_gain = "1"; - mclk_multiplier = "80"; - pix_clk_hz = "300000000"; - gain_factor = "16"; - framerate_factor = "1000000"; - exposure_factor = "1000000"; - min_gain_val = "16"; /* 1.00x */ - max_gain_val = "356"; /* 22x */ - step_gain_val = "1"; - default_gain = "16"; /* 1.00x */ - min_hdr_ratio = "1"; - max_hdr_ratio = "1"; - min_framerate = "2000000"; /* 2.0 fps */ - max_framerate = "30000000"; /* 30.0 fps */ - step_framerate = "1"; - default_framerate = "30000000"; /* 30.0 fps */ - min_exp_time = "13"; /* us */ - max_exp_time = "683709"; /* us */ - step_exp_time = "1"; - default_exp_time = "2495"; /* us */ - embedded_metadata_height = "2"; - }; - mode1 { /* IMX477_MODE_1920X1080 */ - mclk_khz = "24000"; - num_lanes = "2"; - tegra_sinterface = "serial_b"; - phy_mode = "DPHY"; - discontinuous_clk = "no"; - dpcm_enable = "false"; - cil_settletime = "0"; - lane_polarity = "6"; - active_w = "1920"; - active_h = "1080"; - mode_type = "bayer"; - pixel_phase = "rggb"; - csi_pixel_bit_depth = "10"; - readout_orientation = "90"; - line_length = "7000"; - inherent_gain = "1"; - mclk_multiplier = "80"; - pix_clk_hz = "300000000"; - gain_factor = "16"; - framerate_factor = "1000000"; - exposure_factor = "1000000"; - min_gain_val = "16"; /* 1.00x */ - max_gain_val = "356"; /* 22x */ - step_gain_val = "1"; - default_gain = "16"; /* 1.00x */ - min_hdr_ratio = "1"; - max_hdr_ratio = "1"; - min_framerate = "2000000"; /* 2.0 fps */ - max_framerate = "60000000"; /* 60.0 fps */ - step_framerate = "1"; - default_framerate = "60000000"; /* 60.0 fps */ - min_exp_time = "13"; /* us */ - max_exp_time = "683709"; /* us */ - step_exp_time = "1"; - default_exp_time = "2495"; /* us */ - embedded_metadata_height = "2"; - }; - ports { - #address-cells = <1>; - #size-cells = <0>; - port@0 { - reg = <0>; - rbpcv3_imx477_out0: endpoint { - port-index = <1>; - bus-width = <2>; - remote-endpoint = <&rbpcv3_imx477_csi_in0>; - }; - }; - }; - }; - }; - i2c@1 { - status = "okay"; - reg = <1>; - #address-cells = <1>; - #size-cells = <0>; - rbpcv3_imx477_c@1a { - reset-gpios = <&gpio CAM1_PWDN GPIO_ACTIVE_HIGH>; - compatible = "ridgerun,imx477"; - /* I2C device address */ - reg = <0x1a>; - /* V4L2 device node location */ - devnode = "video1"; - /* Physical dimensions of sensor */ - physical_w = "3.680"; - physical_h = "2.760"; - sensor_model = "imx477"; - use_sensor_mode_id = "true"; mode0 { /* IMX477_MODE_3840x2160 */ mclk_khz = "24000"; num_lanes = "4"; - tegra_sinterface = "serial_c"; + tegra_sinterface = "serial_b"; phy_mode = "DPHY"; discontinuous_clk = "no"; dpcm_enable = "false"; cil_settletime = "0"; - lane_polarity = "0"; + lane_polarity = "6"; active_w = "3840"; active_h = "2160"; mode_type = "bayer"; @@ -419,12 +315,12 @@ mode1 { /* IMX477_MODE_1920X1080 */ mclk_khz = "24000"; num_lanes = "4"; - tegra_sinterface = "serial_c"; + tegra_sinterface = "serial_b"; phy_mode = "DPHY"; discontinuous_clk = "no"; dpcm_enable = "false"; cil_settletime = "0"; - lane_polarity = "0"; + lane_polarity = "6"; active_w = "1920"; active_h = "1080"; mode_type = "bayer"; @@ -459,9 +355,120 @@ #size-cells = <0>; port@0 { reg = <0>; - rbpcv3_imx477_out1: endpoint { - port-index = <2>; + rbpcv3_imx477_out0: endpoint { + port-index = <1>; bus-width = <4>; + remote-endpoint = <&rbpcv3_imx477_csi_in0>; + }; + }; + }; + }; + }; + i2c@1 { + status = "okay"; + reg = <1>; + #address-cells = <1>; + #size-cells = <0>; + rbpcv2_imx219_c@10 { + status = "disabled"; + }; + rbpcv3_imx477_c@1a { + reset-gpios = <&gpio CAM1_PWDN GPIO_ACTIVE_HIGH>; + compatible = "ridgerun,imx477"; + /* I2C device address */ + reg = <0x1a>; + /* V4L2 device node location */ + devnode = "video1"; + /* Physical dimensions of sensor */ + physical_w = "3.680"; + physical_h = "2.760"; + sensor_model = "imx477"; + use_sensor_mode_id = "true"; + mode0 { /* IMX477_MODE_3840x2160 */ + mclk_khz = "24000"; + num_lanes = "2"; + tegra_sinterface = "serial_c"; + phy_mode = "DPHY"; + discontinuous_clk = "no"; + dpcm_enable = "false"; + cil_settletime = "0"; + lane_polarity = "0"; + active_w = "3840"; + active_h = "2160"; + mode_type = "bayer"; + pixel_phase = "rggb"; + csi_pixel_bit_depth = "10"; + readout_orientation = "90"; + line_length = "11200"; + inherent_gain = "1"; + mclk_multiplier = "80"; + pix_clk_hz = "300000000"; + gain_factor = "16"; + framerate_factor = "1000000"; + exposure_factor = "1000000"; + min_gain_val = "16"; /* 1.00x */ + max_gain_val = "356"; /* 22x */ + step_gain_val = "1"; + default_gain = "16"; /* 1.00x */ + min_hdr_ratio = "1"; + max_hdr_ratio = "1"; + min_framerate = "2000000"; /* 2.0 fps */ + max_framerate = "30000000"; /* 30.0 fps */ + step_framerate = "1"; + default_framerate = "30000000"; /* 30.0 fps */ + min_exp_time = "13"; /* us */ + max_exp_time = "683709"; /* us */ + step_exp_time = "1"; + default_exp_time = "2495"; /* us */ + embedded_metadata_height = "2"; + }; + mode1 { /* IMX477_MODE_1920X1080 */ + mclk_khz = "24000"; + num_lanes = "2"; + tegra_sinterface = "serial_c"; + phy_mode = "DPHY"; + discontinuous_clk = "no"; + dpcm_enable = "false"; + cil_settletime = "0"; + lane_polarity = "0"; + active_w = "1920"; + active_h = "1080"; + mode_type = "bayer"; + pixel_phase = "rggb"; + csi_pixel_bit_depth = "10"; + readout_orientation = "90"; + line_length = "7000"; + inherent_gain = "1"; + mclk_multiplier = "80"; + pix_clk_hz = "300000000"; + gain_factor = "16"; + framerate_factor = "1000000"; + exposure_factor = "1000000"; + min_gain_val = "16"; /* 1.00x */ + max_gain_val = "356"; /* 22x */ + step_gain_val = "1"; + default_gain = "16"; /* 1.00x */ + min_hdr_ratio = "1"; + max_hdr_ratio = "1"; + min_framerate = "2000000"; /* 2.0 fps */ + max_framerate = "60000000"; /* 60.0 fps */ + step_framerate = "1"; + default_framerate = "60000000"; /* 60.0 fps */ + min_exp_time = "13"; /* us */ + max_exp_time = "683709"; /* us */ + step_exp_time = "1"; + default_exp_time = "2495"; /* us */ + embedded_metadata_height = "2"; + }; + ports { + #address-cells = <1>; + #size-cells = <0>; + port@0 { + reg = <0>; + rbpcv3_imx477_out1: endpoint { + status = "okay"; + port-index = <2>; + bus-width = <2>; remote-endpoint = <&rbpcv3_imx477_csi_in1>; }; }; diff --git a/overlay/tegra234-p3767-camera-p3768-imx477-dual.dts b/overlay/tegra234-p3767-camera-p3768-imx477-dual.dts index d00040d..a4e59b5 100644 --- a/overlay/tegra234-p3767-camera-p3768-imx477-dual.dts +++ b/overlay/tegra234-p3767-camera-p3768-imx477-dual.dts @@ -139,7 +139,7 @@ ports { #address-cells = <1>; #size-cells = <0>; - port@2 { + port@0 { reg = <0>; rbpcv3_imx477_csi_in1: endpoint@2 { port-index = <2>; @@ -147,7 +147,7 @@ remote-endpoint = <&rbpcv3_imx477_out1>; }; }; - port@3 { + port@1 { reg = <1>; rbpcv3_imx477_csi_out1: endpoint@3 { remote-endpoint = <&rbpcv3_imx477_vi_in1>; @@ -169,6 +169,9 @@ reg = <0>; #address-cells = <1>; #size-cells = <0>; + rbpcv2_imx219_a@10 { + status = "disabled"; + }; rbpcv3_imx477_a@1a { reset-gpios = <&gpio CAM0_PWDN GPIO_ACTIVE_HIGH>; compatible = "ridgerun,imx477"; @@ -353,6 +356,7 @@ port@0 { reg = <0>; rbpcv3_imx477_out0: endpoint { + status = "okay"; port-index = <1>; bus-width = <2>; remote-endpoint = <&rbpcv3_imx477_csi_in0>; @@ -366,6 +370,9 @@ reg = <1>; #address-cells = <1>; #size-cells = <0>; + rbpcv2_imx219_c@10 { + status = "disabled"; + }; rbpcv3_imx477_c@1a { reset-gpios = <&gpio CAM1_PWDN GPIO_ACTIVE_HIGH>; compatible = "ridgerun,imx477"; @@ -460,6 +467,7 @@ port@0 { reg = <0>; rbpcv3_imx477_out1: endpoint { + status = "okay"; port-index = <2>; bus-width = <2>; remote-endpoint = <&rbpcv3_imx477_csi_in1>; diff --git a/overlay/tegra234-p3767-camera-p3768-imx477-imx219.dts b/overlay/tegra234-p3767-camera-p3768-imx477-imx219.dts index c4a2a6e..b26de7e 100644 --- a/overlay/tegra234-p3767-camera-p3768-imx477-imx219.dts +++ b/overlay/tegra234-p3767-camera-p3768-imx477-imx219.dts @@ -180,6 +180,9 @@ reg = <0>; #address-cells = <1>; #size-cells = <0>; + rbpcv2_imx219_a@10 { + status = "disabled"; + }; rbpcv3_imx477_a@1a { reset-gpios = <&gpio CAM0_PWDN GPIO_ACTIVE_HIGH>; compatible = "ridgerun,imx477"; @@ -364,6 +367,7 @@ port@0 { reg = <0>; rbpcv3_imx477_out0: endpoint { + status = "okay"; port-index = <1>; bus-width = <2>; remote-endpoint = <&rbpcv3_imx477_csi_in0>; diff --git a/overlay/tegra234-p3768-0000+p3767-0000-dynamic.dts b/overlay/tegra234-p3768-0000+p3767-0000-dynamic.dts index c8949b0..b9fed39 100644 --- a/overlay/tegra234-p3768-0000+p3767-0000-dynamic.dts +++ b/overlay/tegra234-p3768-0000+p3767-0000-dynamic.dts @@ -1,9 +1,11 @@ // SPDX-License-Identifier: GPL-2.0-only -// SPDX-FileCopyrightText: Copyright (c) 2023, NVIDIA CORPORATION & AFFILIATES. All rights reserved. +// SPDX-FileCopyrightText: Copyright (c) 2023-2024, NVIDIA CORPORATION & AFFILIATES. All rights reserved. /dts-v1/; /plugin/; +#include "tegra234-p3768-camera-rbpcv2-imx219.dtsi" + / { overlay-name = "Tegra234 p3768-0000+p3767-xxxx Dynamic Overlay"; }; diff --git a/overlay/tegra234-p3768-camera-rbpcv2-imx219.dtsi b/overlay/tegra234-p3768-camera-rbpcv2-imx219.dtsi new file mode 100644 index 0000000..b1fd62a --- /dev/null +++ b/overlay/tegra234-p3768-camera-rbpcv2-imx219.dtsi @@ -0,0 +1,54 @@ +// SPDX-License-Identifier: GPL-2.0-only +// SPDX-FileCopyrightText: Copyright (c) 2023-2024, NVIDIA CORPORATION & AFFILIATES. All rights reserved. + +#define CAM0_RST TEGRA234_MAIN_GPIO(H, 3) +#define CAM0_PWDN TEGRA234_MAIN_GPIO(H, 6) +#define CAM1_PWDN TEGRA234_MAIN_GPIO(AC, 0) +#define CAM_I2C_MUX TEGRA234_AON_GPIO(CC, 3) + +#include +#include "tegra234-camera-rbpcv2-imx219.dtsi" + +/ { + fragment-camera-imx219@0 { + target-path = "/"; + __overlay__ { + bus@0 { + cam_i2cmux{ + status = "okay"; + compatible = "i2c-mux-gpio"; + #address-cells = <1>; + #size-cells = <0>; + i2c-parent = <&cam_i2c>; + mux-gpios = <&gpio_aon CAM_I2C_MUX GPIO_ACTIVE_HIGH>; + i2c@0 { + status = "okay"; + reg = <0>; + #address-cells = <1>; + #size-cells = <0>; + rbpcv2_imx219_a@10 { + reset-gpios = <&gpio CAM0_PWDN GPIO_ACTIVE_HIGH>; + }; + }; + i2c@1 { + status = "okay"; + reg = <1>; + #address-cells = <1>; + #size-cells = <0>; + rbpcv2_imx219_c@10 { + reset-gpios = <&gpio CAM1_PWDN GPIO_ACTIVE_HIGH>; + }; + }; + }; + gpio@2200000 { + camera-control-output-low { + gpio-hog; + output-low; + gpios = ; + label = "cam0-rst"; + }; + }; + }; + }; + }; +};