Does anyone have the driver source code of TC358749?

Hello all,
I am trying to make TC358749 work on tx2,has anyone do it before? Is there any reference resources to me.

Looking forward to receiving reply.

Thanks.

Don’t you mean TC358743?

Hello euskadi,

It’s TC358749XBG,Not TC358743…

It seems that few people use TC358749XBG for HDMI2MIPI-csi.

Maybe I can refer to the code of TC358743?

That driver isn’t built in the linux kernel, so if you did not get it when you purchased it, you should build it yourself (it will probably be very similar to the TC358743.c driver (https://github.com/torvalds/linux/blob/master/drivers/media/i2c/tc358743.c))

Thank you euskadi,

I choose the CONFIG_VIDEO_TC358743 to y in kernel config(Jetpack4.2 kernel R32.1), rebuild kernel and update Image, but I cant see any tc358743 probe message when tx2 boot.

That’s because it is not the same IC. Those two IC have different pinouts, although they are really similar. You should build a TC358749.c driver and add an entry to the device tree. Anyway, you could ask for the driver to your supplier, maybe they have it available.

Thank you euskadi,

I know what you mean, but even if I don’t have this TC358743 chip on board,there still be probe process when kernel is booting. I can’t see any probe fail massage.

That’s because there is no entry on the device tree for the TC358743. You can read the documentation for it (located in /kernel/kernel-4.9/Documentation/devicetree/bindings/media/i2c/tc358743.txt). It specifies that a compatible property “toshiba,tc358743” must be included in the DT, and there is no entry. Check it yourself in the kernel sources, hardware directory, by running the following command

grep -rn . -e "toshiba,tc358743"

The probe function will only be called when a device matches the driver with its compatible id in the device tree.
The documentation for that IC provides an example which you can include in the device tree, and assure the probe function is called.

Example:

	tc358743@0f {
		compatible = "toshiba,tc358743";
		reg = <0x0f>;
		clocks = <&hdmi_osc>;
		clock-names = "refclk";
		reset-gpios = <&gpio6 9 GPIO_ACTIVE_LOW>;
		interrupt-parent = <&gpio2>;
		interrupts = <5 IRQ_TYPE_LEVEL_HIGH>;

		port {
			tc358743_out: endpoint {
				remote-endpoint = <&mipi_csi2_in>;
				data-lanes = <1 2 3 4>;
				clock-lanes = <0>;
				clock-noncontinuous;
				link-frequencies = /bits/ 64 <297000000>;
			};
		};
	};