Skip to content

Instantly share code, notes, and snippets.

@kevmo314
Created April 4, 2022 05:22
Show Gist options
  • Save kevmo314/343f998a068bc677995a16ee69b6af54 to your computer and use it in GitHub Desktop.
Save kevmo314/343f998a068bc677995a16ee69b6af54 to your computer and use it in GitHub Desktop.
#include <dt-bindings/media/camera.h>
#include <dt-bindings/platform/t210/t210.h>
#include <dt-bindings/gpio/gpio.h>
/ {
host1x {
vi {
num-channels = <1>;
ports {
#address-cells = <1>;
#size-cells = <0>;
vi_port0: port@0 {
status = "okay";
reg = <0>;
lt6911uxc_vi_in0: endpoint {
status = "okay";
port-index = <0>;
bus-width = <4>;
remote-endpoint = <&lt6911uxc_csi_out0>;
};
};
};
};
nvcsi {
num-channels = <1>;
#address-cells = <1>;
#size-cells = <0>;
channel@0 {
reg = <0>;
discontinuous_clk = "no";
ports {
#address-cells = <1>;
#size-cells = <0>;
port@0 {
status = "okay";
reg = <0>;
lt6911uxc_csi_in0: endpoint@0 {
status = "okay";
port-index = <0>;
bus-width = <4>;
remote-endpoint = <&lt6911uxc_out0>;
};
};
port@1 {
reg = <1>;
status = "okay";
lt6911uxc_csi_out0: endpoint@1 {
status = "okay";
remote-endpoint = <&lt6911uxc_vi_in0>;
};
};
};
};
};
i2c@546c0000 { /* I2C_PM, "adapter" 6 */
clock-frequency = <100000>;
lt6911uxc@2b {
status = "okay";
compatible = "lontium,lt6911uxc";
reg = <0x2b>;
devnode = "video0";
reset-gpios = <&gpio TEGRA_GPIO(H, 3) GPIO_ACTIVE_LOW>;
interrupt-parent = <&gpio>;
interrupts = <TEGRA_GPIO(P, 0) IRQ_TYPE_LEVEL_HIGH>;
ports {
#address-cells = <1>;
#size-cells = <0>;
port@0 {
reg = <0>;
lt6911uxc_out0: endpoint {
port-index = <0>; /* CSI A */
bus-width = <4>;
remote-endpoint = <&lt6911uxc_csi_in0>;
};
};
};
};
};
};
tegra-camera-platform {
status = "okay";
compatible = "nvidia, tegra-camera-platform";
num_csi_lanes = <4>; // Changed 2 -> 4
max_lane_speed = <2500000>;
min_bits_per_pixel = <16>;
vi_peak_byte_per_pixel = <3>;
vi_bw_margin_pct = <25>;
isp_peak_byte_per_pixel = <3>;
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 {
module1 {
status = "okay";
badge = "lt6911uxc_top_i2c6_b";
position = "front";
orientation = "1";
drivernode0 {
status = "okay";
/* Declare PCL support driver (classically known as guid) */
pcl_id = "v4l2_sensor";
/* Driver's v4l2 device name */
devname = "lt6911uxc 2-002b";
/* Declare the device-tree hierarchy to driver instance */
proc-device-tree = "/proc/device-tree/host1x/i2c@546c0000/lt6911uxc@2b";
};
};
};
};
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment