Hi igor,
Thanks for the helpful response.
The statement that base address switch should only be used in conjunction with interlaced data concerns me because this does not seem to be the case in NXP BSP (5.4.24 or 5.4.47 are the same in this respect). mx6s_capture.c enables base address switching by default on i.mx8mq when the bridge is reset.
static const struct mx6s_csi_soc mx8mq_soc = {
.rx_fifo_rst = true,
.baseaddr_switch = 0x80030,
};
and in csisw_reset():
cr18 |= csi_dev->soc->baseaddr_switch;
Immediately after csisw_reset() is called, the interlaced check is performed but this base address switching default is never disabled even in non-interlaced mode:
if (pix->field == V4L2_FIELD_INTERLACED)
csi_tvdec_enable(csi_dev, true);
If base address switching should not be used then it appears the supplied driver is incorrect and should actually be:
if (pix->field == V4L2_FIELD_INTERLACED)
csi_tvdec_enable(csi_dev, true);
else
csi_tvdec_enable(csi_dev, false);
or just disable base address switching in the defaults for i.mx8mq as follows:
static const struct mx6s_csi_soc mx8mq_soc = {
.rx_fifo_rst = true,
.baseaddr_switch = 0,
};
It seems odd that the struct mx8mq_soc struct explicitly turns on base address switching by default (while older socs have it off by default) if it only should be used for interlaced video. If you could confirm that the mx6s_capture.c driver incorrectly handles base address switching enable/disable that would help.