Hello
In our custom board we have a ADV7280m (https://www.analog.com/en/products/adv7280.html) conected to a TX2 CSI 1-lane (See attached schematic).
I want to configure the device tree and compile the driver, so I’ll can see the /dev/videoX and use it with gstreamer to capture imagens from a camera attached to this chip.
I’m using the “NVIDIA Tegra Linux Driver Package (32.2)” on section “Sensor Software Driver Programming Guide”.
I’v created the device tree on the end of the file tegra186-quill-p3310-1000-c03-00-base.dts:
/* cameras */
plugin-manager {
/* To not modify file tegra186-quill-p3310-1000-a00-00-base.dts
remove all camera plugin manager fragment from included file
tegra186-quill-camera-plugin-manager.dtsi */
/delete-node/ fragment-imx390@0;
/delete-node/ fragment-e3326@0;
/delete-node/ fragment-e3323@0;
/delete-node/ fragment-p3310-c00-camera;
/delete-node/ fragment-e3333@0;
/delete-node/ fragment-e3322@0;
/delete-node/ fragment-imx185@0;
/delete-node/ fragment-imx274@0;
/delete-node/ fragment-imx274-dual@0;
/delete-node/ fragment-e3331@0;
};
/* ADV7280m */
host1x {
vi@15700000 {
num-channels = <1>;
status = "okay";
ports {
#address-cells = <0x1>;
#size-cells = <0x0>;
status = "okay";
port@0 {
status = "okay";
reg = <0x0>;
adv7280m_vi_in0: endpoint {
status = "okay";
csi-port = <0>;
bus-width = <2>;
remote-endpoint = <&adv7280m_csi_out0>;
};
};
};
};
};
nvcsi@150c0000 {
num-channels = <1>;
#address-cells = <1>;
#size-cells = <0>;
status = "okay";
channel@0 {
reg = <0x0>;
status = "okay";
ports {
#address-cells = <0x1>;
#size-cells = <0x0>;
status = "okay";
port@0 {
status = "okay";
reg = <0x0>;
adv7280m_csi_in0: endpoint@0 {
status = "okay";
csi-port = <0>;
bus-width = <2>;
remote-endpoint = <&adv7280m_out0>;
};
};
port@1 {
status = "okay";
reg = <0x1>;
adv7280m_csi_out0: endpoint@1 {
status = "okay";
remote-endpoint = <&adv7280m_vi_in0>;
};
};
};
};
};
i2c@31c0000 {
adv7280m@21 {
compatible = "adi,adv7280-m";
reg = <0x21>;
devnode = "video0";
clocks = <&tegra_car TEGRA186_CLK_EXTPERIPH1>,
<&tegra_car TEGRA186_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 = <&en_vdd_cam_hv_2v8>;
vif-supply = <&en_vdd_cam>;
avdd-reg = "vana";
iovdd-reg = "vif";
status = "okay";
ports {
#address-cells = <0x1>;
#size-cells = <0x0>;
status = "okay";
port@0 {
status = "okay";
reg = <0>;
adv7280m_out0: endpoint {
status = "okay";
csi-port = <0>;
bus-width = <2>;
remote-endpoint = <&adv7280m_csi_in0>;
};
};
};
};
};
tegra-camera-platform {
status = "okay";
compatible = "nvidia, tegra-camera-platform";
modules {
module0 {
badge = "adv7280m_top_adv7280m";
position = "bottom";
orientation = "0";
drivernode0 {
status = "okay";
pcl_id = "v4l2_sensor";
devname = "adv7280m 6-0021";
proc-device-tree = "/proc/device-tree/i2c@31c0000/adv7280m@21";
};
};
};
};
Also I’ve enabled the driver ADV7180 at menuconfig from L4T sources and compiled everything.
After the system boot I can’t see /dev/videoX (X is 0, 1, 2, etc)
I’m sending attached the system boot log.
The dmesg message for adv is:
nvidia@nvidia-desktop:~$ dmesg | grep -i adv
[ 0.615499] Advanced Linux Sound Architecture Driver Initialized.
[ 8.109943] systemd[1]: System time before build time, advancing clock.
[ 10.090101] adv7180 6-0021: chip found @ 0x21 (31c0000.i2c)
[ 10.122911] tegra-vi4 15700000.vi: subdev adv7180 6-0021 bound
[ 10.122917] tegra-vi4 15700000.vi: Entity type for entity adv7180 6-0021 was not initialized!
And the driver is loaded:
nvidia@nvidia-desktop:~$ lsmod
Module Size Used by
bnep 19270 2
fuse 120203 3
zram 30209 4
overlay 54926 0
bcmdhd 985053 0
cfg80211 727800 1 bcmdhd
adv7180 15652 1
nvgpu 1724375 18
bluedroid_pm 16187 0
ip_tables 21421 0
x_tables 38144 1 ip_tables
If I use the media-ctl on /dev/media0 we can see something loaded for adv7180 but I believe something is missing:
nvidia@nvidia-desktop:~$ sudo media-ctl -p -d /dev/media0
[sudo] password for nvidia:
Media controller API version 0.1.0
Media device information
------------------------
driver tegra-vi4
model NVIDIA Tegra Video Input Device
serial
bus info
hw revision 0x3
driver version 0.0.0
Device topology
- entity 1: adv7180 6-0021 (1 pad, 0 link)
type V4L2 subdev subtype Unknown flags 20004
pad0: Source
Can, someone help-me to configure this?
I believe that the first thing I must do solve is the message: “tegra-vi4 15700000.vi: Entity type for entity adv7180 6-0021 was not initialized!”
Thanks!
boot_adv.txt (163 KB)