From 02b83fb29a17e5d3582cdc8ba488661dd61d9c3f Mon Sep 17 00:00:00 2001 From: Zefa Chen Date: Sat, 22 Mar 2025 17:41:43 +0800 Subject: [PATCH] media: rockchip: vicap support mipi csi2 for rv1126b Change-Id: I6e5a16c450e64c41ade9a6b0ea49915e49038d3c Signed-off-by: Zefa Chen --- .../media/platform/rockchip/cif/mipi-csi2.c | 22 +++++++++++++++++++ .../media/platform/rockchip/cif/mipi-csi2.h | 1 + 2 files changed, 23 insertions(+) diff --git a/drivers/media/platform/rockchip/cif/mipi-csi2.c b/drivers/media/platform/rockchip/cif/mipi-csi2.c index c653e315141b..54980c4b6e77 100644 --- a/drivers/media/platform/rockchip/cif/mipi-csi2.c +++ b/drivers/media/platform/rockchip/cif/mipi-csi2.c @@ -1100,6 +1100,12 @@ static const struct csi2_match_data rv1103b_csi2_match_data = { .num_hw = 2, }; +static const struct csi2_match_data rv1126b_csi2_match_data = { + .chip_id = CHIP_RV1126B_CSI2, + .num_pads = CSI2_NUM_PADS_MAX, + .num_hw = 4, +}; + static const struct of_device_id csi2_dt_ids[] = { #ifdef CONFIG_CPU_RK1808 { @@ -1154,6 +1160,12 @@ static const struct of_device_id csi2_dt_ids[] = { .compatible = "rockchip,rv1103b-mipi-csi2", .data = &rv1103b_csi2_match_data, }, +#endif +#ifdef CONFIG_CPU_RV1126B + { + .compatible = "rockchip,rv1126b-mipi-csi2", + .data = &rv1126b_csi2_match_data, + }, #endif { /* sentinel */ } }; @@ -1316,6 +1328,10 @@ static const struct csi2_hw_match_data rv1103b_csi2_hw_match_data = { .chip_id = CHIP_RV1103B_CSI2, }; +static const struct csi2_hw_match_data rv1126b_csi2_hw_match_data = { + .chip_id = CHIP_RV1126B_CSI2, +}; + static const struct of_device_id csi2_hw_ids[] = { #ifdef CONFIG_CPU_RK1808 { @@ -1370,6 +1386,12 @@ static const struct of_device_id csi2_hw_ids[] = { .compatible = "rockchip,rv1103b-mipi-csi2-hw", .data = &rv1103b_csi2_hw_match_data, }, +#endif +#ifdef CONFIG_CPU_RV1126B + { + .compatible = "rockchip,rv1126b-mipi-csi2-hw", + .data = &rv1126b_csi2_hw_match_data, + }, #endif { /* sentinel */ } }; diff --git a/drivers/media/platform/rockchip/cif/mipi-csi2.h b/drivers/media/platform/rockchip/cif/mipi-csi2.h index 1fbcc88fcbbc..8d0eac8f9db4 100644 --- a/drivers/media/platform/rockchip/cif/mipi-csi2.h +++ b/drivers/media/platform/rockchip/cif/mipi-csi2.h @@ -96,6 +96,7 @@ enum rkcsi2_chip_id { CHIP_RK3562_CSI2, CHIP_RK3576_CSI2, CHIP_RV1103B_CSI2, + CHIP_RV1126B_CSI2, }; enum csi2_pads {