Hello JerryChang,
As your recommend, i verified port binding comand “sudo media-ctl -p -d /dev/media0”
device topology information was not appear.
Please review whether there is anything wrong while migrating to the xavier device tree.
Media controller API version 0.1.0
Media device information
------------------------
driver tegra194-vi5
model NVIDIA Tegra Video Input Device
serial
bus info
hw revision 0x3
driver version 0.0.0
Device topology
my custom sensor specification as shown below.
csi-lane : 4 lane
ext-clock : 24MHz
nvidia-csi bus : csi-c/d
data format : bayer-raw10bit
1. device tree file " tegra194-camera-imx686-a00.dtsi" modified to setup port binding as directory below. **
** Kernel_bulid/public_sources/hardware/nvidia/platform/t19x/common/kernel-dts/t19x-common-modules/
host1x {
vi@15700000 {
num-channels = <1>;
ports {
#address-cells = <1>;
#size-cells = <0>;
port@0 {
reg = <0>;
imx686_vi_in0: endpoint {
port-index = <2>;
bus-width = <4>;
remote-endpoint = <&imx686_csi_out0>;
};
};
};
};
nvcsi@150c0000 {
num-channels = <1>;
channel@0 {
reg = <0>;
ports {
#address-cells = <1>;
#size-cells = <0>;
port@0 {
reg = <0>;
imx686_csi_in0: endpoint@0 {
port-index = <2>;
bus-width = <4>;
remote-endpoint = <&imx686_imx686_out0>;
};
};
port@1 {
reg = <1>;
imx686_csi_out0: endpoint@1 {
remote-endpoint = <&imx686_vi_in0>;
};
};
};
};
};
tegra-camera-platform {
compatible = "nvidia, tegra-camera-platform";
num_csi_lanes = <4>;
max_lane_speed = <2500000>;
min_bits_per_pixel = <10>;
vi_peak_byte_per_pixel = <2>;
vi_bw_margin_pct = <25>;
isp_peak_byte_per_pixel = <5>;
isp_bw_margin_pct = <25>;
/**
* The general guideline for naming badge_info contains 3 parts, and is as follows,
* The first part is the camera_board_id for the module; if the module is in a FFD
* platform, then use the platform name for this part.
* The second part contains the position of the module, ex. "rear" or "front".
* The third part contains the last 6 characters of a part number which is found
* in the module's specsheet from the vender.
*/
modules {
module0 {
status = "okay";
badge = "imx686_rear";
position = "rear";
orientation = "1";
drivernode0 {
/* Declare PCL support driver (classically known as guid) */
pcl_id = "v4l2_sensor";
/* Driver v4l2 device name */
devname = "imx686 2-0010";
/* Declare the device-tree hierarchy to driver instance */
proc-device-tree = "/proc/device-tree/i2c@3180000/imx686_c@10";
};
};
};
};
};
2. modified device tree file " tegra194-p2822-0000-camera-imx686-a00.dtsi " to setup gpio define. **
** Kernel_bulid/public_sources/hardware/nvidia/platform/t18x/common/kernel-dts/ common /
#include <t19x-common-modules/tegra194-camera-imx686-a00.dtsi>
#include "dt-bindings/clock/tegra194-clock.h"
#define CAM0_RST_L TEGRA194_MAIN_GPIO(H, 3)
#define CAM0_PWDN TEGRA194_MAIN_GPIO(H, 6)
#define CAM1_RST_L TEGRA194_MAIN_GPIO(T, 6)
#define CAM1_PWDN TEGRA194_MAIN_GPIO(T, 5)
/* camera control gpio definitions */
/ {
gpio@2200000 {
camera-control-output-low {
gpio-hog;
output-low;
gpios = <CAM0_RST_L 0 CAM0_PWDN 0 CAM1_RST_L 0 CAM1_PWDN 0>;
label = "cam0-rst", "cam0-pwdn","cam1-rst", "cam1-pwdn";
};
};
i2c@3180000 {
imx686_c@10 {
/* Define any required hw resources needed by driver */
/* ie. clocks, io pins, power sources */
/* mclk-index indicates the index of the */
/* mclk-name with in the clock-names array */
clocks = <&bpmp_clks TEGRA194_CLK_EXTPERIPH1>,
<&bpmp_clks TEGRA194_CLK_PLLP_OUT0>;
clock-names = "extperiph1", "pllp_grtba";
mclk = "extperiph1";
clock-frequency = <24000000>;
reset-gpios = <&tegra_main_gpio CAM0_RST_L GPIO_ACTIVE_HIGH>;
pwdn-gpios = <&tegra_main_gpio CAM0_PWDN GPIO_ACTIVE_HIGH>;
vana-supply = <&p2822_avdd_cam_2v8>; //<&en_vdd_cam_hv_2v8>;
vif-supply = <&p2822_vdd_1v8_cvb>; //<&en_vdd_cam>;
//vdig-supply = <&en_vdd_cam_1v2>;
};
};
};
3. device tree file "tegra194-p2888-0001-p2822-0000.dtsi " modified to register a device using the main platform device tree as folder directory below.
Kernel_bulid/public_sources/hardware/nvidia/platform/t19x/galen/kernel-dts/
#include "common/tegra194-p2888-0001-p2822-0000-common.dtsi"
//#include "common/tegra194-p2822-camera-modules.dtsi“ // modified remove line
//#include "t19x-common-modules/tegra194-camera-plugin-manager.dtsi“ // modified remove line
#include "common/tegra194-p2822-0000-camera-imx686-a00.dtsi" // include new device dtsi file