@@ -624,6 +624,9 @@ static int rvin_parallel_parse_v4l2(struct device *dev,
vin->parallel = rvpe;
vin->parallel->mbus_type = vep->bus_type;
+ vin->parallel->ycbcr_8b_g = fwnode_property_present(vep->base.local_fwnode,
+ "renesas-vin-ycbcr-8b-g");
+
switch (vin->parallel->mbus_type) {
case V4L2_MBUS_PARALLEL:
vin_dbg(vin, "Found PARALLEL media bus\n");
@@ -659,7 +662,6 @@ static int rvin_parallel_init(struct rvin_dev *vin)
vin_dbg(vin, "Found parallel subdevice %pOF\n",
to_of_node(vin->parallel->asd.match.fwnode));
-
vin->notifier.ops = &rvin_parallel_notify_ops;
ret = v4l2_async_notifier_register(&vin->v4l2_dev, &vin->notifier);
if (ret < 0) {
@@ -127,6 +127,8 @@
#define VNDMR2_FTEV (1 << 17)
#define VNDMR2_VLV(n) ((n & 0xf) << 12)
+#define VNDMR2_YDS BIT(22)
+
/* Video n CSI2 Interface Mode Register (Gen3) */
#define VNCSI_IFMD_DES1 (1 << 26)
#define VNCSI_IFMD_DES0 (1 << 25)
@@ -698,6 +700,11 @@ static int rvin_setup(struct rvin_dev *vin)
/* Data Enable Polarity Select */
if (vin->parallel->mbus_flags & V4L2_MBUS_DATA_ENABLE_LOW)
dmr2 |= VNDMR2_CES;
+
+ if (vin->parallel->ycbcr_8b_g && vin->mbus_code == MEDIA_BUS_FMT_UYVY8_2X8)
+ dmr2 |= VNDMR2_YDS;
+ else
+ dmr2 &= ~VNDMR2_YDS;
}
/*
@@ -95,6 +95,7 @@ struct rvin_video_format {
* @mbus_flags: media bus configuration flags
* @source_pad: source pad of remote subdevice
* @sink_pad: sink pad of remote subdevice
+ * @ycbcr_8b_g: select data pins for YCbCr422-8bit
*
*/
struct rvin_parallel_entity {
@@ -106,6 +107,7 @@ struct rvin_parallel_entity {
unsigned int source_pad;
unsigned int sink_pad;
+ bool ycbcr_8b_g;
};
/**