Hello,
We have developed a dual channel video capture card by help of ADV7604 video decoder. This ADV7604 device out is connected with FPGA and FPGA is connected with Jetson Tx-2 CSI Interface as you can see in device tree below. (Note: Our FPGA is not having any control interface) According to device driver we have 7 pads: 6 sink pad and 1 source pad. Out of 6 sink pad 4 sink pads for HDMI and 2 sink pads for Analog input(VGA and component). One source pad is for output.
state->source_pad = state->info->num_dv_ports
+ (state->info->has_afe ? 2 : 0);
for (i = 0; i < state->source_pad; ++i)
state->pads[i].flags = MEDIA_PAD_FL_SINK;
state->pads[state->source_pad].flags = MEDIA_PAD_FL_SOURCE;
err = media_entity_pads_init(&sd->entity, state->source_pad + 1,
state->
The driver I am referring from ADV7604_Linux_Driver
Accordingly I have written the device tree for 6 sink pad and 1 source pad. Please see the sample device tree for ADV7604 below:
i2c@2 {
#address-cells = <1>;
#size-cells = <0>;
adv7604_c@20 {
compatible = "adi,adv7604", "adi,adv7611", "adi,adv7612";
reg = <0x20>;
devnode = "video1";
default-input = <4>;
ports {
#address-cells = <1>;
#size-cells = <0>;
port@0 {
reg = <0>;
adv7604_in0: endpoint {
status = "disabled";
};
};
port@1 {
reg = <1>;
adv7604_in1: endpoint {
status = "disabled";
};
};
port@2 {
reg = <2>;
adv7604_in2: endpoint {
status = "disabled";
};
};
port@3 {
reg = <3>;
adv7604_in3: endpoint {
status = "disabled";
};
};
port@4 {
reg = <4>;
adv7604_in4: endpoint {
status = "disabled";
};
};
port@5 {
reg = <5>;
adv7604_in5: endpoint {
status = "disabled";
};
};
port@6 {
reg = <6>;
adv7604_out2: endpoint {
status = "okay";
port-index = <0>;
bus-width = <4>;
remote-endpoint = <&adv7604_csi_in1>;
};
};
};
};
};
Our device node is getting created when disable property is disabled(default). But when we are changing it to Okay, device node is not getting created. In the disabled case we are not able to parse the endpoint in the device tree and not able to read device tree property. Snippet is attached below:
/* Parse the endpoint. */
endpoint = of_graph_get_next_endpoint(np, NULL);
if (!endpoint)
return -EINVAL;
ret = v4l2_of_parse_endpoint(endpoint, &bus_cfg);
if (ret) {
of_node_put(endpoint);
return ret;
}
if (!of_property_read_u32(endpoint, "default-input", &v))
state->pdata.default_input = v;
else
state->pdata.default_input = -1;
of_node_put(endpoint);
Please help me to solve this issue as input in our case is UXGA(1600x1200 P60) and output is RGB888 (ADV76XX_OP_MODE_SEL_SDR_444) . I think the way I have written the device tree is incorrect.
Please help me out to resolve this issue.
Thanks and Regards,
Vikas Dwivedi