#include #include #include "dt-bindings/clock/tegra186-clock.h" #define CAM0_RST_L TEGRA_MAIN_GPIO(R, 5) / { nvidia,dtsfilename = "tegra186-tx2-ADV7604-2CAM.dts"; gpio@2200000 { camera-control-output-low { gpio-hog; output-low; gpios = ; label = "cam0-rst"; }; }; /**********************SENSORS******************************************************************/ i2c@3180000 { //set this to correct i2c bus tca9546@70 { i2c@2 { #address-cells = <1>; #size-cells = <0>; adv7604_c@20 { compatible = "adi,adv7604", "adi,adv7611", "adi,adv7612"; reg = <0x20>; devnode = "video1"; default-input = <4>; ports { #address-cells = <1>; #size-cells = <0>; port@0 { reg = <0>; adv7604_in0: endpoint { status = "disabled"; }; }; port@1 { reg = <1>; adv7604_in1: endpoint { status = "disabled"; }; }; port@2 { reg = <2>; adv7604_in2: endpoint { status = "disabled"; }; }; port@3 { reg = <3>; adv7604_in3: endpoint { status = "disabled"; }; }; port@4 { reg = <4>; adv7604_in4: endpoint { status = "disabled"; }; }; port@5 { reg = <5>; adv7604_in5: endpoint { status = "disabled"; }; }; port@6 { reg = <6>; adv7604_out2: endpoint { status = "okay"; port-index = <0>; bus-width = <4>; remote-endpoint = <&adv7604_csi_in1>; }; }; }; }; }; i2c@0{ #address-cells = <1>; #size-cells = <0>; adv7604_a@20 { compatible = "adi,adv7604", "adi,adv7611", "adi,adv7612"; reg = <0x20>; devnode = "video0"; default-input = <4>; ports { #address-cells = <1>; #size-cells = <0>; port@0 { reg = <0>; adv7604_in6: endpoint { status = "disabled"; }; }; port@1 { reg = <1>; adv7604_in7: endpoint { status = "disabled"; }; }; port@2 { reg = <2>; adv7604_in8: endpoint { status = "disabled"; }; }; port@3 { reg = <3>; adv7604_in9: endpoint { status = "disabled"; }; }; port@4 { reg = <4>; adv7604_in10: endpoint { status = "disabled"; }; }; port@5 { reg = <5>; adv7604_in11: endpoint { status = "disabled"; }; }; port@6 { reg = <6>; adv7604_out0: endpoint { status = "okay"; port-index = <0>; bus-width = <4>; remote-endpoint = <&adv7604_csi_in0>; }; }; }; }; }; }; }; /**********************VI******************************************************************/ host1x { vi@15700000 { num-channels = <2>; //set number of channels status = "okay"; ports { #address-cells = <1>; #size-cells = <0>; port@1 { reg = <1>; status = "okay"; adv7604_vi_in1: endpoint { status = "okay"; port-index = <2>; bus-width = <4>; remote-endpoint = <&adv7604_csi_out1>; }; }; port@0 { reg = <0>; status = "okay"; adv7604_vi_in0: endpoint { status = "okay"; port-index = <0>; bus-width = <4>; remote-endpoint = <&adv7604_csi_out0>; }; }; }; }; /**********************CSI******************************************************************/ nvcsi@150c0000 { num-channels = <2>; #address-cells = <1>; #size-cells = <0>; channel@1 { reg = <1>; status = "okay"; ports { #address-cells = <1>; #size-cells = <0>; port@0 { reg = <0>; status = "okay"; adv7604_csi_in1: endpoint@2 { port-index = <2>; bus-width = <4>; remote-endpoint = <&adv7604_out2>; //should be sensor port under i2c endpoint status = "okay"; }; }; port@1 { reg = <1>; status = "okay"; adv7604_csi_out1: endpoint@3 { status = "okay"; remote-endpoint = <&adv7604_vi_in1>; }; }; }; }; channel@0 { reg = <0>; status = "okay"; ports { #address-cells = <1>; #size-cells = <0>; port@0 { reg = <0>; status = "okay"; adv7604_csi_in0: endpoint@0 { port-index = <0>; bus-width = <4>; remote-endpoint = <&adv7604_out0>; //should be sensor port under i2c endpoint status = "okay"; }; }; port@1 { reg = <1>; status = "okay"; adv7604_csi_out0: endpoint@1 { status = "okay"; remote-endpoint = <&adv7604_vi_in0>; }; }; }; }; }; }; /**********************CAMERA PLATFORM*************************************************************/ tegra-camera-platform { compatible = "nvidia, tegra-camera-platform"; num_csi_lanes = <8>; max_lane_speed = <1500000>; min_bits_per_pixel = <8>; /* VD: ?*/ vi_peak_byte_per_pixel = <2>; vi_bw_margin_pct = <25>; max_pixel_rate = <750000>; /* VD: ?*/ isp_peak_byte_per_pixel = <5>; isp_bw_margin_pct = <25>; modules { module1 { badge = "adv7604_top_c"; position = "top"; orientation = "0"; status = "okay"; drivernode0 { status = "okay"; pcl_id = "v4l2_sensor"; devname = "adv7604 32-0020"; proc-device-tree = "/proc/device-tree/i2c@3180000/tca9546@70/i2c@2/adv7604_c@20"; }; }; module0 { badge = "adv7604_bottom_a"; position = "bottom"; orientation = "0"; status = "okay"; drivernode0 { status = "okay"; pcl_id = "v4l2_sensor"; devname = "adv7604 30-0020"; proc-device-tree = "/proc/device-tree/i2c@3180000/tca9546@70/i2c@0/adv7604_a@20"; }; }; }; }; };