Jetson TX2 device tree, i2c nodes and camera driver loading
1
vote
1
answer
2200
views
I am a bit confused with behavior of Jetson TX2 when loading drivers for camera.
Here is definition of IMX274 in device tree:
i2c@3180000 {
reg = ;
dmas = ;
interrupts = ;
compatible = "nvidia,tegra186-i2c";
clock-names = "div-clk", "parent", "slow-clk";
reset-names = "i2c";
clock-frequency = ;
scl-gpio = ;
sda-gpio = ;
clocks = ;
resets = ;
status = "okay";
#address-cells = ;
phandle = ;
#stream-id-cells = ;
#size-cells = ;
dma-names = "rx", "tx";
linux,phandle = ;
imx274_a@1a {
reg = ;
mclk = "extperiph1";
devnode = "video0";
avdd-reg = "vana";
compatible = "nvidia,imx274";
clock-names = "extperiph1", "pllp_grtba";
reset-gpios = ;
physical_h = "2.738";
physical_w = "3.674";
clocks = ;
vana-supply = ;
sensor_model = "imx274";
iovdd-reg = "vif";
delayed_gain = "true";
vif-supply = ;
dvdd-reg = "vdig";
vdig-supply = ;
mode0 {
...
}
ports {
#address-cells = ;
#size-cells = ;
port@0 {
reg = ;
endpoint {
bus-width = ;
remote-endpoint = ;
phandle = ;
csi-port = ;
linux,phandle = ;
};
};
};
};
i2c2 is an alias for i2c@3180000 therefore I expect to see the device on bus 2. An sure I can see it on a bus with address
0x57
.
nvidia@tegra-ubuntu:~/kernel/kernel$ sudo i2cdetect -r -y 2
[sudo] password for nvidia:
0 1 2 3 4 5 6 7 8 9 a b c d e f
00: -- -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- UU -- -- -- -- --
20: -- -- -- -- UU -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- 57 -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- --
Here comes the first question. **How does kernel identifies type of i2c device on a bus?** I thought that field reg
is used, but 0x1a in device tree is clearly different from 0x57 on a bus.
Secondly, as I can see module is compatible with the following drivers: compatible = "nvidia,imx274";
However device driver is different:
nvidia@tegra-ubuntu:~/kernel/kernel$ sudo v4l2-ctl -D -d /dev/video0
Driver Info (not using libv4l2):
Driver name : tegra-video
Card type : vi-output, imx274 2-001a
Bus info : platform:15700000.vi:0
Driver version: 4.4.38
Capabilities : 0x84200001
Video Capture
Streaming
Extended Pix Format
Device Capabilities
Device Caps : 0x04200001
Video Capture
Streaming
Extended Pix Format
**Therefore it seems for me that wrong driver is loaded for some reasons, it it true or I am just missing something?** However it is still possible to capture image with argus.
Asked by Юрий Камнев
(11 rep)
Jul 30, 2019, 10:20 AM
Last activity: Apr 27, 2025, 10:02 AM
Last activity: Apr 27, 2025, 10:02 AM