Commit 5da326f4 authored by Konrad Dybcio's avatar Konrad Dybcio Committed by Dmitry Baryshkov

drm/msm/dsi: dsi_cfg: Deduplicate identical structs

Some structs were defined multiple times for no apparent reason.
Deduplicate them.
Reviewed-by: default avatarDmitry Baryshkov <dmitry.baryshkov@linaro.org>
Reviewed-by: default avatarMarijn Suijten <marijn.suijten@somainline.org>
Signed-off-by: default avatarKonrad Dybcio <konrad.dybcio@linaro.org>
Patchwork: https://patchwork.freedesktop.org/patch/527653/
Link: https://lore.kernel.org/r/20230307-topic-dsi_qcm-v6-4-70e13b1214fa@linaro.orgSigned-off-by: default avatarDmitry Baryshkov <dmitry.baryshkov@linaro.org>
parent ff83e76b
...@@ -47,41 +47,32 @@ static const struct msm_dsi_config msm8974_apq8084_dsi_cfg = { ...@@ -47,41 +47,32 @@ static const struct msm_dsi_config msm8974_apq8084_dsi_cfg = {
}, },
}; };
static const char * const dsi_8916_bus_clk_names[] = { static const char * const dsi_v1_3_1_clk_names[] = {
"mdp_core", "iface", "bus", "mdp_core", "iface", "bus",
}; };
static const struct regulator_bulk_data msm8916_dsi_regulators[] = { static const struct regulator_bulk_data dsi_v1_3_1_regulators[] = {
{ .supply = "vdda", .init_load_uA = 100000 }, /* 1.2 V */ { .supply = "vdda", .init_load_uA = 100000 }, /* 1.2 V */
{ .supply = "vddio", .init_load_uA = 100000 }, /* 1.8 V */ { .supply = "vddio", .init_load_uA = 100000 }, /* 1.8 V */
}; };
static const struct msm_dsi_config msm8916_dsi_cfg = { static const struct msm_dsi_config msm8916_dsi_cfg = {
.io_offset = DSI_6G_REG_SHIFT, .io_offset = DSI_6G_REG_SHIFT,
.regulator_data = msm8916_dsi_regulators, .regulator_data = dsi_v1_3_1_regulators,
.num_regulators = ARRAY_SIZE(msm8916_dsi_regulators), .num_regulators = ARRAY_SIZE(dsi_v1_3_1_regulators),
.bus_clk_names = dsi_8916_bus_clk_names, .bus_clk_names = dsi_v1_3_1_clk_names,
.num_bus_clks = ARRAY_SIZE(dsi_8916_bus_clk_names), .num_bus_clks = ARRAY_SIZE(dsi_v1_3_1_clk_names),
.io_start = { .io_start = {
{ 0x1a98000 }, { 0x1a98000 },
}, },
}; };
static const char * const dsi_8976_bus_clk_names[] = {
"mdp_core", "iface", "bus",
};
static const struct regulator_bulk_data msm8976_dsi_regulators[] = {
{ .supply = "vdda", .init_load_uA = 100000 }, /* 1.2 V */
{ .supply = "vddio", .init_load_uA = 100000 }, /* 1.8 V */
};
static const struct msm_dsi_config msm8976_dsi_cfg = { static const struct msm_dsi_config msm8976_dsi_cfg = {
.io_offset = DSI_6G_REG_SHIFT, .io_offset = DSI_6G_REG_SHIFT,
.regulator_data = msm8976_dsi_regulators, .regulator_data = dsi_v1_3_1_regulators,
.num_regulators = ARRAY_SIZE(msm8976_dsi_regulators), .num_regulators = ARRAY_SIZE(dsi_v1_3_1_regulators),
.bus_clk_names = dsi_8976_bus_clk_names, .bus_clk_names = dsi_v1_3_1_clk_names,
.num_bus_clks = ARRAY_SIZE(dsi_8976_bus_clk_names), .num_bus_clks = ARRAY_SIZE(dsi_v1_3_1_clk_names),
.io_start = { .io_start = {
{ 0x1a94000, 0x1a96000 }, { 0x1a94000, 0x1a96000 },
}, },
...@@ -107,10 +98,6 @@ static const struct msm_dsi_config msm8994_dsi_cfg = { ...@@ -107,10 +98,6 @@ static const struct msm_dsi_config msm8994_dsi_cfg = {
}, },
}; };
static const char * const dsi_8996_bus_clk_names[] = {
"mdp_core", "iface", "bus", "core_mmss",
};
static const struct regulator_bulk_data msm8996_dsi_regulators[] = { static const struct regulator_bulk_data msm8996_dsi_regulators[] = {
{ .supply = "vdda", .init_load_uA = 18160 }, /* 1.25 V */ { .supply = "vdda", .init_load_uA = 18160 }, /* 1.25 V */
{ .supply = "vcca", .init_load_uA = 17000 }, /* 0.925 V */ { .supply = "vcca", .init_load_uA = 17000 }, /* 0.925 V */
...@@ -121,8 +108,8 @@ static const struct msm_dsi_config msm8996_dsi_cfg = { ...@@ -121,8 +108,8 @@ static const struct msm_dsi_config msm8996_dsi_cfg = {
.io_offset = DSI_6G_REG_SHIFT, .io_offset = DSI_6G_REG_SHIFT,
.regulator_data = msm8996_dsi_regulators, .regulator_data = msm8996_dsi_regulators,
.num_regulators = ARRAY_SIZE(msm8996_dsi_regulators), .num_regulators = ARRAY_SIZE(msm8996_dsi_regulators),
.bus_clk_names = dsi_8996_bus_clk_names, .bus_clk_names = dsi_6g_bus_clk_names,
.num_bus_clks = ARRAY_SIZE(dsi_8996_bus_clk_names), .num_bus_clks = ARRAY_SIZE(dsi_6g_bus_clk_names),
.io_start = { .io_start = {
{ 0x994000, 0x996000 }, { 0x994000, 0x996000 },
}, },
...@@ -167,24 +154,20 @@ static const struct msm_dsi_config sdm660_dsi_cfg = { ...@@ -167,24 +154,20 @@ static const struct msm_dsi_config sdm660_dsi_cfg = {
}, },
}; };
static const char * const dsi_sdm845_bus_clk_names[] = { static const char * const dsi_v2_4_clk_names[] = {
"iface", "bus", "iface", "bus",
}; };
static const char * const dsi_sc7180_bus_clk_names[] = { static const struct regulator_bulk_data dsi_v2_4_regulators[] = {
"iface", "bus",
};
static const struct regulator_bulk_data sdm845_dsi_regulators[] = {
{ .supply = "vdda", .init_load_uA = 21800 }, /* 1.2 V */ { .supply = "vdda", .init_load_uA = 21800 }, /* 1.2 V */
}; };
static const struct msm_dsi_config sdm845_dsi_cfg = { static const struct msm_dsi_config sdm845_dsi_cfg = {
.io_offset = DSI_6G_REG_SHIFT, .io_offset = DSI_6G_REG_SHIFT,
.regulator_data = sdm845_dsi_regulators, .regulator_data = dsi_v2_4_regulators,
.num_regulators = ARRAY_SIZE(sdm845_dsi_regulators), .num_regulators = ARRAY_SIZE(dsi_v2_4_regulators),
.bus_clk_names = dsi_sdm845_bus_clk_names, .bus_clk_names = dsi_v2_4_clk_names,
.num_bus_clks = ARRAY_SIZE(dsi_sdm845_bus_clk_names), .num_bus_clks = ARRAY_SIZE(dsi_v2_4_clk_names),
.io_start = { .io_start = {
{ 0xae94000, 0xae96000 }, { 0xae94000, 0xae96000 },
}, },
...@@ -198,32 +181,24 @@ static const struct msm_dsi_config sm8550_dsi_cfg = { ...@@ -198,32 +181,24 @@ static const struct msm_dsi_config sm8550_dsi_cfg = {
.io_offset = DSI_6G_REG_SHIFT, .io_offset = DSI_6G_REG_SHIFT,
.regulator_data = sm8550_dsi_regulators, .regulator_data = sm8550_dsi_regulators,
.num_regulators = ARRAY_SIZE(sm8550_dsi_regulators), .num_regulators = ARRAY_SIZE(sm8550_dsi_regulators),
.bus_clk_names = dsi_sdm845_bus_clk_names, .bus_clk_names = dsi_v2_4_clk_names,
.num_bus_clks = ARRAY_SIZE(dsi_sdm845_bus_clk_names), .num_bus_clks = ARRAY_SIZE(dsi_v2_4_clk_names),
.io_start = { .io_start = {
{ 0xae94000, 0xae96000 }, { 0xae94000, 0xae96000 },
}, },
}; };
static const struct regulator_bulk_data sc7180_dsi_regulators[] = {
{ .supply = "vdda", .init_load_uA = 21800 }, /* 1.2 V */
};
static const struct msm_dsi_config sc7180_dsi_cfg = { static const struct msm_dsi_config sc7180_dsi_cfg = {
.io_offset = DSI_6G_REG_SHIFT, .io_offset = DSI_6G_REG_SHIFT,
.regulator_data = sc7180_dsi_regulators, .regulator_data = dsi_v2_4_regulators,
.num_regulators = ARRAY_SIZE(sc7180_dsi_regulators), .num_regulators = ARRAY_SIZE(dsi_v2_4_regulators),
.bus_clk_names = dsi_sc7180_bus_clk_names, .bus_clk_names = dsi_v2_4_clk_names,
.num_bus_clks = ARRAY_SIZE(dsi_sc7180_bus_clk_names), .num_bus_clks = ARRAY_SIZE(dsi_v2_4_clk_names),
.io_start = { .io_start = {
{ 0xae94000 }, { 0xae94000 },
}, },
}; };
static const char * const dsi_sc7280_bus_clk_names[] = {
"iface", "bus",
};
static const struct regulator_bulk_data sc7280_dsi_regulators[] = { static const struct regulator_bulk_data sc7280_dsi_regulators[] = {
{ .supply = "vdda", .init_load_uA = 8350 }, /* 1.2 V */ { .supply = "vdda", .init_load_uA = 8350 }, /* 1.2 V */
}; };
...@@ -232,27 +207,19 @@ static const struct msm_dsi_config sc7280_dsi_cfg = { ...@@ -232,27 +207,19 @@ static const struct msm_dsi_config sc7280_dsi_cfg = {
.io_offset = DSI_6G_REG_SHIFT, .io_offset = DSI_6G_REG_SHIFT,
.regulator_data = sc7280_dsi_regulators, .regulator_data = sc7280_dsi_regulators,
.num_regulators = ARRAY_SIZE(sc7280_dsi_regulators), .num_regulators = ARRAY_SIZE(sc7280_dsi_regulators),
.bus_clk_names = dsi_sc7280_bus_clk_names, .bus_clk_names = dsi_v2_4_clk_names,
.num_bus_clks = ARRAY_SIZE(dsi_sc7280_bus_clk_names), .num_bus_clks = ARRAY_SIZE(dsi_v2_4_clk_names),
.io_start = { .io_start = {
{ 0xae94000, 0xae96000 }, { 0xae94000, 0xae96000 },
}, },
}; };
static const char * const dsi_qcm2290_bus_clk_names[] = {
"iface", "bus",
};
static const struct regulator_bulk_data qcm2290_dsi_cfg_regulators[] = {
{ .supply = "vdda", .init_load_uA = 21800 }, /* 1.2 V */
};
static const struct msm_dsi_config qcm2290_dsi_cfg = { static const struct msm_dsi_config qcm2290_dsi_cfg = {
.io_offset = DSI_6G_REG_SHIFT, .io_offset = DSI_6G_REG_SHIFT,
.regulator_data = qcm2290_dsi_cfg_regulators, .regulator_data = dsi_v2_4_regulators,
.num_regulators = ARRAY_SIZE(qcm2290_dsi_cfg_regulators), .num_regulators = ARRAY_SIZE(dsi_v2_4_regulators),
.bus_clk_names = dsi_qcm2290_bus_clk_names, .bus_clk_names = dsi_v2_4_clk_names,
.num_bus_clks = ARRAY_SIZE(dsi_qcm2290_bus_clk_names), .num_bus_clks = ARRAY_SIZE(dsi_v2_4_clk_names),
.io_start = { .io_start = {
{ 0x5e94000 }, { 0x5e94000 },
}, },
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment