phy: rockchip: csi2_dphy: add hw_idx to distinguish dev

Change-Id: I072cedcba316cf5d26335cbead272457bee2f61c
Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com>
This commit is contained in:
Zefa Chen
2025-09-08 17:51:50 +08:00
committed by Tao Huang
parent d5e575bdf7
commit 0caa02b632
3 changed files with 3 additions and 1 deletions

View File

@@ -128,6 +128,7 @@ struct csi2_dphy_hw {
int dphy_dev_num;
enum csi2_dphy_lane_mode lane_mode;
struct resource *res;
int hw_idx;
int (*stream_on)(struct csi2_dphy *dphy, struct v4l2_subdev *sd);
int (*stream_off)(struct csi2_dphy *dphy, struct v4l2_subdev *sd);

View File

@@ -712,7 +712,7 @@ static void csi2_dphy_config_dual_mode(struct csi2_dphy *dphy,
if (hw->lane_mode == LANE_MODE_FULL) {
val = !GRF_CSI2PHY_LANE_SEL_SPLIT;
if (dphy->phy_index < 3) {
if (hw->hw_idx == 0) {
write_grf_reg(hw, GRF_DPHY_CSI2PHY_DATALANE_EN,
GENMASK(sensor->lanes - 1, 0));
write_grf_reg(hw, GRF_DPHY_CSI2PHY_CLKLANE_EN, 0x1);

View File

@@ -1161,6 +1161,7 @@ static int rockchip_csi2_dphy_get_inno_phy_hw(struct csi2_dphy *dphy)
dphy->phy_index);
return -EINVAL;
}
dphy_hw->hw_idx = i;
dphy->dphy_hw_group[i] = dphy_hw;
}
return 0;