Hi there.
Im currently in a board bring up for a custom CM3 IO board, but I seemingly have issues with the CSI interface.
Im using a HDMI-to-CSI adapter board (TC358743) to connect to CAM1 (4 lanes) to my CM3+. I2C is connected via I2C1 on pins 2 and 3.
Since the default overlay of the TC358743 is connected on i2c_vc (i2c0), I wrote a device tree config to use i2c1:
which i compiled to custom-tc358743.dtbo, put in /boot/firmware/overlays and added dtoverlay=custom-tc358743 in my config.txt
via i2cdetect I can now see that the I2C address of the TC358743 is in use:
but despite that there is no /dev/video0. v4l2-ctl --list-devices shows a message with "Cannot open device /dev/video0, exiting"
dmesg | grep tc35 shows that the i2c communication seems to be working:
The failure point seems to be that the unicam driver can't connect to the TC358743 (dmesg | grep unicam), but I dont know what that means or how that is fixable.
Im unsure on how to continue, does anyone have something to point me at?
Im currently in a board bring up for a custom CM3 IO board, but I seemingly have issues with the CSI interface.
Im using a HDMI-to-CSI adapter board (TC358743) to connect to CAM1 (4 lanes) to my CM3+. I2C is connected via I2C1 on pins 2 and 3.
Since the default overlay of the TC358743 is connected on i2c_vc (i2c0), I wrote a device tree config to use i2c1:
Code:
/dts-v1/;/plugin/;/ {compatible = "brcm,bcm2708";fragment@0 {target = <&i2c_arm>;__overlay__ {#address-cells = <1>;#size-cells = <0>;status = "okay";tc358743@0f {compatible = "toshiba,tc358743";reg = <0x0f>;status = "okay";clocks = <&tc358743_clk>;clock-names = "refclk";tc358743_clk: bridge-clk {compatible = "fixed-clock";#clock-cells = <0>;clock-frequency = <27000000>;};port {tc358743: endpoint {remote-endpoint = <&csi1_ep>;clock-lanes = <0>;clock-noncontinuous;link-frequencies = /bits/ 64 <486000000>;};};};};};fragment@1 {target = <&csi1>;__overlay__ {status = "okay";port {csi1_ep: endpoint {remote-endpoint = <&tc358743>;};};};};fragment@2 {target = <&i2c_arm>;__overlay__ {tc358743@0f {port {endpoint {data-lanes = <1 2>;};};};};};fragment@6 {target = <&i2c_arm>;__overlay__ {status = "okay";};};__overrides__ {4lane = <0>, "-2";link-frequency = <&tc358743>, "link-frequencies#0";};};
via i2cdetect I can now see that the I2C address of the TC358743 is in use:
Code:
pi@raspberrypi:~$ i2cdetect -y 1 0 1 2 3 4 5 6 7 8 9 a b c d e f00: -- -- -- -- -- -- -- UU 10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 70: -- -- -- -- -- -- -- --
Code:
pi@raspberrypi:~$ v4l2-ctl --list-devicesbcm2835-codec-decode (platform:bcm2835-codec): /dev/video10 /dev/video11 /dev/video12 /dev/video18 /dev/video31 /dev/media2bcm2835-isp (platform:bcm2835-isp): /dev/video13 /dev/video14 /dev/video15 /dev/video16 /dev/video20 /dev/video21 /dev/video22 /dev/video23 /dev/media0 /dev/media1Cannot open device /dev/video0, exiting.
dmesg | grep tc35 shows that the i2c communication seems to be working:
Code:
[ 11.720083] tc358743 1-000f: chip found @ 0x1e (bcm2835 (i2c@7e804000))[ 11.730710] tc358743 1-000f: I2C write 0x0002 = 0x0c01[ 11.732607] tc358743 1-000f: I2C write 0x0002 = 0x0f01[ 11.733507] tc358743 1-000f: I2C write 0x0002 = 0x0c01[ 11.735427] tc358743 1-000f: I2C write 0x0002 = 0x0c00[ 11.739241] tc358743 1-000f: I2C write 0x0006 = 0x0176[ 11.742057] tc358743 1-000f: I2C write 0x8540 = 0x8c[ 11.742821] tc358743 1-000f: I2C write 0x8541 = 0x0a[ 11.744437] tc358743 1-000f: I2C write 0x8531 = 0x20[ 11.745155] tc358743 1-000f: I2C write 0x85aa = 0x0e[ 11.745848] tc358743 1-000f: I2C write 0x85ab = 0x01[ 11.746553] tc358743 1-000f: I2C write 0x85ac = 0xf6[ 11.747287] tc358743 1-000f: I2C write 0x85ad = 0x06[ 11.748014] tc358743 1-000f: I2C write 0x8630 = 0xb0[ 11.748737] tc358743 1-000f: I2C write 0x8631 = 0x1e[ 11.749443] tc358743 1-000f: I2C write 0x8632 = 0x04[ 11.753570] tc358743 1-000f: I2C write 0x8670 = 0x01[ 11.754436] tc358743 1-000f: I2C write 0x0028 = 0x01a5[ 11.755327] tc358743 1-000f: I2C write 0x002a = 0x01a5[ 11.756909] tc358743 1-000f: I2C write 0x8543 = 0x32[ 11.758523] tc358743 1-000f: I2C write 0x85c7 = 0x02[ 11.760140] tc358743 1-000f: I2C write 0x8534 = 0x3e[ 11.760851] tc358743 1-000f: I2C write 0x8532 = 0x80[ 11.762429] tc358743 1-000f: I2C write 0x8533 = 0x00[ 11.763207] tc358743 1-000f: I2C write 0x8536 = 0x40[ 11.763925] tc358743 1-000f: I2C write 0x853f = 0x0a[ 11.764628] tc358743 1-000f: I2C write 0x8546 = 0x2d[ 11.774083] tc358743 1-000f: I2C write 0x8552 = 0xc1[ 11.775768] tc358743 1-000f: I2C write 0x85af = 0x06[ 11.777424] tc358743 1-000f: I2C write 0x8534 = 0x3f[ 11.777457] tc358743 1-000f: tc358743_set_hdmi_hdcp: disable[ 11.779045] tc358743 1-000f: I2C write 0x8560 = 0x26[ 11.779759] tc358743 1-000f: I2C write 0x8600 = 0x00[ 11.780465] tc358743 1-000f: I2C write 0x8602 = 0xf3[ 11.781178] tc358743 1-000f: I2C write 0x8603 = 0x02[ 11.781894] tc358743 1-000f: I2C write 0x8604 = 0x0c[ 11.782623] tc358743 1-000f: I2C write 0x8606 = 0x05[ 11.783357] tc358743 1-000f: I2C write 0x8607 = 0x00[ 11.784093] tc358743 1-000f: I2C write 0x8620 = 0x22[ 11.784807] tc358743 1-000f: I2C write 0x8640 = 0x01[ 11.785523] tc358743 1-000f: I2C write 0x8641 = 0x65[ 11.786228] tc358743 1-000f: I2C write 0x8642 = 0x07[ 11.786953] tc358743 1-000f: I2C write 0x8652 = 0x02[ 11.787677] tc358743 1-000f: I2C write 0x8665 = 0x10[ 11.789565] tc358743 1-000f: I2C write 0x0004 = 0x0c14[ 11.790292] tc358743 1-000f: I2C write 0x8709 = 0xff[ 11.791060] tc358743 1-000f: I2C write 0x870b = 0x2c[ 11.791792] tc358743 1-000f: I2C write 0x870c = 0x53[ 11.792502] tc358743 1-000f: I2C write 0x870d = 0x01[ 11.793219] tc358743 1-000f: I2C write 0x870e = 0x30[ 11.793918] tc358743 1-000f: I2C write 0x9007 = 0x10[ 11.795588] tc358743 1-000f: I2C write 0x8570 = 0xe6[ 11.797198] tc358743 1-000f: I2C write 0x8573 = 0x81[ 11.798738] tc358743 1-000f: I2C write 0x8574 = 0x08[ 11.798774] tc358743 1-000f: tc358743_s_dv_timings: 640x480p59.94 (800x525)[ 11.798798] tc358743 1-000f: enable_stream: disable[ 11.806127] tc358743 1-000f: I2C write 0x857f = 0xd0[ 11.810928] tc358743 1-000f: I2C write 0x0004 = 0x0c14[ 11.813072] tc358743 1-000f: tc358743_set_pll:[ 11.813108] tc358743 1-000f: tc358743_set_pll: updating PLL clock[ 11.814976] tc358743 1-000f: I2C write 0x0002 = 0x0c01[ 11.815854] tc358743 1-000f: I2C write 0x0020 = 0x308f[ 11.817744] tc358743 1-000f: I2C write 0x0022 = 0x0203[ 11.819648] tc358743 1-000f: I2C write 0x0022 = 0x0213[ 11.821566] tc358743 1-000f: I2C write 0x0002 = 0x0c00[ 11.821619] tc358743 1-000f: tc358743_set_csi:[ 11.823495] tc358743 1-000f: I2C write 0x0002 = 0x0e00[ 11.824385] tc358743 1-000f: I2C write 0x0002 = 0x0c00[ 11.825546] tc358743 1-000f: I2C write 0x0148 = 0x00000001[ 11.826717] tc358743 1-000f: I2C write 0x014c = 0x00000001[ 11.827922] tc358743 1-000f: I2C write 0x0150 = 0x00000001[ 11.829138] tc358743 1-000f: I2C write 0x0210 = 0x00001b58[ 11.830300] tc358743 1-000f: I2C write 0x0214 = 0x00000007[ 11.831478] tc358743 1-000f: I2C write 0x0218 = 0x00002806[ 11.832629] tc358743 1-000f: I2C write 0x021c = 0x00000000[ 11.833766] tc358743 1-000f: I2C write 0x0220 = 0x00000806[ 11.834937] tc358743 1-000f: I2C write 0x0224 = 0x00004268[ 11.836103] tc358743 1-000f: I2C write 0x0228 = 0x00000008[ 11.837243] tc358743 1-000f: I2C write 0x022c = 0x00000005[ 11.842071] tc358743 1-000f: I2C write 0x0230 = 0x00000000[ 11.843248] tc358743 1-000f: I2C write 0x0234 = 0x00000003[ 11.844392] tc358743 1-000f: I2C write 0x0238 = 0x00000000[ 11.850054] tc358743 1-000f: I2C write 0x0204 = 0x00000001[ 11.851258] tc358743 1-000f: I2C write 0x0518 = 0x00000001[ 11.852467] tc358743 1-000f: I2C write 0x0500 = 0xa3008080[ 11.853639] tc358743 1-000f: I2C write 0x0500 = 0xb4000312[ 11.854819] tc358743 1-000f: I2C write 0x0500 = 0xd5000012[ 11.855994] tc358743 1-000f: I2C write 0x0500 = 0xa6000004[ 11.856030] tc358743 1-000f: tc358743_set_csi_color_space: RGB 888 24-bit[ 11.857596] tc358743 1-000f: I2C write 0x8573 = 0x01[ 11.859727] tc358743 1-000f: I2C write 0x8576 = 0x00[ 11.861588] tc358743 1-000f: I2C write 0x0004 = 0x0c14[ 11.862309] tc358743 1-000f: I2C write 0x8502 = 0xff[ 11.863049] tc358743 1-000f: I2C write 0x8503 = 0xff[ 11.863766] tc358743 1-000f: I2C write 0x8504 = 0xff[ 11.864459] tc358743 1-000f: I2C write 0x8505 = 0xff[ 11.865163] tc358743 1-000f: I2C write 0x8506 = 0xff[ 11.865857] tc358743 1-000f: I2C write 0x8507 = 0xff[ 11.866569] tc358743 1-000f: I2C write 0x8508 = 0xff[ 11.867293] tc358743 1-000f: I2C write 0x8509 = 0xff[ 11.867998] tc358743 1-000f: I2C write 0x850a = 0xff[ 11.868689] tc358743 1-000f: I2C write 0x850b = 0xff[ 11.869378] tc358743 1-000f: I2C write 0x850c = 0xff[ 11.870062] tc358743 1-000f: I2C write 0x850d = 0xff[ 11.870796] tc358743 1-000f: I2C write 0x850e = 0xff[ 11.871511] tc358743 1-000f: I2C write 0x850f = 0xff[ 11.878042] tc358743 1-000f: I2C write 0x0014 = 0xffff[ 11.882033] tc358743 1-000f: tc358743_enable_interrupts: cable connected = 1[ 11.886182] tc358743 1-000f: I2C write 0x8512 = 0xce[ 11.888626] tc358743 1-000f: I2C write 0x8513 = 0xdf[ 11.894030] tc358743 1-000f: I2C write 0x8515 = 0x3d[ 11.894769] tc358743 1-000f: I2C write 0x8516 = 0xfe[ 11.895466] tc358743 1-000f: I2C write 0x851b = 0xfd[ 11.896301] tc358743 1-000f: I2C write 0x0016 = 0xfcff[ 11.896330] tc358743 1-000f: tc358743 found @ 0x1e (bcm2835 (i2c@7e804000))[ 12.895090] tc358743 1-000f: tc358743_isr: IntStatus = 0x0000[ 13.919043] tc358743 1-000f: tc358743_isr: IntStatus = 0x0000[ 14.943047] tc358743 1-000f: tc358743_isr: IntStatus = 0x0000[ 15.974028] tc358743 1-000f: tc358743_isr: IntStatus = 0x0000[ 16.991045] tc358743 1-000f: tc358743_isr: IntStatus = 0x0000[ 18.017478] tc358743 1-000f: tc358743_isr: IntStatus = 0x0000[ 19.038560] tc358743 1-000f: tc358743_isr: IntStatus = 0x0000[ 20.062554] tc358743 1-000f: tc358743_isr: IntStatus = 0x0000[ 21.086546] tc358743 1-000f: tc358743_isr: IntStatus = 0x0000[ 22.110555] tc358743 1-000f: tc358743_isr: IntStatus = 0x0000[ 23.134616] tc358743 1-000f: tc358743_isr: IntStatus = 0x0000[ 24.158950] tc358743 1-000f: tc358743_isr: IntStatus = 0x0000[ 25.182954] tc358743 1-000f: tc358743_isr: IntStatus = 0x0000[ 26.206937] tc358743 1-000f: tc358743_isr: IntStatus = 0x0000[ 27.230961] tc358743 1-000f: tc358743_isr: IntStatus = 0x0000[ 28.254947] tc358743 1-000f: tc358743_isr: IntStatus = 0x0000[ 29.278973] tc358743 1-000f: tc358743_isr: IntStatus = 0x0000[ 30.302985] tc358743 1-000f: tc358743_isr: IntStatus = 0x0000[ 31.326970] tc358743 1-000f: tc358743_isr: IntStatus = 0x0000[ 32.350608] tc358743 1-000f: tc358743_isr: IntStatus = 0x0000[ 33.374583] tc358743 1-000f: tc358743_isr: IntStatus = 0x0000[ 34.398566] tc358743 1-000f: tc358743_isr: IntStatus = 0x0000[ 35.422557] tc358743 1-000f: tc358743_isr: IntStatus = 0x0000
Code:
pi@raspberrypi:~$ dmesg | grep unicam[ 11.572843] unicam 3f801000.csi: ep_node is /soc/csi@7e801000/port/endpoint[ 11.573007] unicam 3f801000.csi: found subdevice /soc/i2c@7e804000/tc358743_0@0f[ 11.573073] unicam 3f801000.csi: parsed local endpoint, bus_type 2[ 11.573096] unicam 3f801000.csi: subdevice /soc/i2c@7e804000/tc358743_0@0f: unsupported bus type 2[ 11.573138] unicam 3f801000.csi: Failed to connect subdevs[ 11.622845] unicam: probe of 3f801000.csi failed with error -22
Statistics: Posted by ValentinBischof — Tue Jan 21, 2025 1:44 pm — Replies 1 — Views 22