/* * Copyright (c) 2025, RtRobotics Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms and conditions of the GNU General Public License, * version 2, as published by the Free Software Foundation. * * This program is distributed in the hope 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. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ #include "tegra234-orin-nano-custom-base.dtsi" //#include "dt-bindings/gpio/tegra234-gpio.h" //#include "dt-bindings/clock/tegra234-clock.h" /{ nvidia,dtsfilename = "tegra234-orin-nano-CUSTOM.dts"; model = "Custom Development Kit + Orin Nano"; tegra-capture-vi { status = "okay"; num-channels = <1>; ports { #address-cells = <1>; #size-cells = <0>; status = "okay"; vi_port0: port@0 { reg = <0>; custom_vi_in0: endpoint { status = "okay"; port-index = <0>; bus-width = <4>; remote-endpoint = <&custom_csi_out0>; }; }; }; }; bus@0{ host1x@13e00000 { nvcsi@15a00000 { num-channels = <1>; #address-cells = <1>; #size-cells = <0>; status = "okay"; csi_chan0: channel@0 { status = "okay"; reg = <0x0>; ports { #address-cells = <1>; #size-cells = <0>; csi_chan0_port0: port@0 { status = "okay"; reg = <0>; custom_csi_in0: endpoint@0 { port-index = <0>; bus-width = <4>; remote-endpoint = <&custom_cam_out0>; }; }; csi_chan0_port1: port@1 { status = "okay"; reg = <1>; custom_csi_out0: endpoint@1 { remote-endpoint = <&custom_vi_in0>; }; }; }; }; }; }; i2c@c250000 { status = "okay"; #address-cells = <1>; #size-cells = <0>; mcp23008_27: gpio@27 { compatible = "microchip,mcp23008"; gpio-controller; #gpio-cells = <2>; reg = <0x27>; status = "okay"; interrupt-parent = <&gpio_aon>; // gpiochip1: registered GPIOs 316 to 347 on tegra234-gpio-aon interrupts = ; // GPIO6/GPIO06/PCC.03/331 irq-gpios = <&gpio_aon TEGRA234_AON_GPIO(CC, 3) GPIO_ACTIVE_HIGH>; // GPIO6/GPIO06/PCC.03/331 reset-gpios = <&gpio TEGRA234_MAIN_GPIO(P, 6) GPIO_ACTIVE_LOW>; // GPIO2/GPIO02/PP.06/446 interrupt-controller; #interrupt-cells=<2>; microchip,irq-mirror; microchip,irq-active-high; mcp23008_27_output_low { status = "disabled"; }; mcp23008_27_output_high { gpio-hog; output-high; gpios = <1 0 2 0 3 0>; }; }; toto_a@10 { status = "okay"; compatible = "sony,toto"; /* I2C device address */ reg = <0x10>; /* V4L2 device node location */ devnode = "video0"; /* Physical dimensions of sensor */ physical_w = "1.944"; physical_h = "1.097"; sensor_model = "toto"; use_sensor_mode_id = "false"; /* 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 */ avdd-reg = "vana"; iovdd-reg = "vif"; dvdd-reg = "vdig"; //vana-supply = <&p3509_avdd_cam_2v8>; //vif-supply = <&p3509_vdd_1v8_cvb>; //vana-supply = <&p3509_vdd_3v3_cvb>; //vdig-supply = <&p3509_vdd_sys_en>; clocks = <&bpmp TEGRA234_CLK_EXTPERIPH1>, <&bpmp TEGRA234_CLK_EXTPERIPH1>; clock-names = "extperiph1", "pllp_grtba"; mclk = "extperiph1"; clock-frequency = <24000000>; reset-gpios = <&mcp23008_27 3 GPIO_ACTIVE_LOW>; mode0 { //1920x1080_60Fps mclk_khz = "24000"; set_mode_delay_ms = "5000"; num_lanes = "4"; tegra_sinterface = "serial_a"; phy_mode = "DPHY"; discontinuous_clk = "yes"; dpcm_enable = "false"; cil_settletime = "0"; active_w = "1920"; active_h = "1080"; mode_type = "yuv"; pixel_phase = "uyvy"; pixel_t = "yuv_uyvy16"; dynamic_pixel_bit_depth = "16"; csi_pixel_bit_depth = "16"; readout_orientation = "0"; line_length = "2000"; inherent_gain = "1"; mclk_multiplier = "18"; pix_clk_hz = "371250000"; gain_factor = "16"; framerate_factor = "1000000"; exposure_factor = "1000000"; min_gain_val = "16"; /* 1.00x */ max_gain_val = "170"; /* 10.66x */ 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 = "16667"; /* us */ embedded_metadata_height = "0"; }; ports { #address-cells = <1>; #size-cells = <0>; port@0 { reg = <0>; custom_cam_out0: endpoint { status = "okay"; port-index = <0>; /* CSI A */ bus-width = <4>; remote-endpoint = <&custom_csi_in0>; }; }; }; }; }; }; tegra-camera-platform { compatible = "nvidia, tegra-camera-platform"; status = "okay"; /** * Physical settings to calculate max ISO BW * * num_csi_lanes = <>; * Total number of CSI lanes when all cameras are active * * max_lane_speed = <>; * Max lane speed in Kbit/s * * min_bits_per_pixel = <>; * Min bits per pixel * * vi_peak_byte_per_pixel = <>; * Max byte per pixel for the VI ISO case * * vi_bw_margin_pct = <>; * Vi bandwidth margin in percentage * * max_pixel_rate = <>; * Max pixel rate in Kpixel/s for the ISP ISO case * * isp_peak_byte_per_pixel = <>; * Max byte per pixel for the ISP ISO case * * isp_bw_margin_pct = <>; * Isp bandwidth margin in percentage */ num_csi_lanes = <4>; max_lane_speed = <1500000>; min_bits_per_pixel = <10>; vi_peak_byte_per_pixel = <2>; vi_bw_margin_pct = <25>; max_pixel_rate = <7500000>; 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 vendor. */ modules { cam_module0: module0 { status = "okay"; badge = "cam_front"; position = "front"; orientation = "1"; cam_module0_drivernode0: drivernode0 { status = "okay"; pcl_id = "v4l2_sensor"; devname = "ev9500m 7-0010"; sysfs-device-tree = "/sys/firmware/devicetree/base/bus@0/i2c@c250000/toto_a@10"; }; }; }; }; };