[PATCH v8 05/18] media: qcom: camss: Add legacy_phy flag to SoC definition structures

Bryan O'Donoghue posted 18 patches 1 month, 1 week ago
There is a newer version of this series
[PATCH v8 05/18] media: qcom: camss: Add legacy_phy flag to SoC definition structures
Posted by Bryan O'Donoghue 1 month, 1 week ago
Flag which SoCs have legacy - builtin PHY code. This will be useful in
subsequent patches to inform PHY bringup logic if legacy bindings are
available.

Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
---
 drivers/media/platform/qcom/camss/camss.c | 17 +++++++++++++++++
 drivers/media/platform/qcom/camss/camss.h |  1 +
 2 files changed, 18 insertions(+)

diff --git a/drivers/media/platform/qcom/camss/camss.c b/drivers/media/platform/qcom/camss/camss.c
index 00b87fd9afbd8..5fb5ad87e1671 100644
--- a/drivers/media/platform/qcom/camss/camss.c
+++ b/drivers/media/platform/qcom/camss/camss.c
@@ -5104,6 +5104,7 @@ static void camss_remove(struct platform_device *pdev)
 
 static const struct camss_resources msm8916_resources = {
 	.version = CAMSS_8x16,
+	.legacy_phy = true,
 	.csiphy_res = csiphy_res_8x16,
 	.csid_res = csid_res_8x16,
 	.ispif_res = &ispif_res_8x16,
@@ -5115,6 +5116,7 @@ static const struct camss_resources msm8916_resources = {
 
 static const struct camss_resources msm8939_resources = {
 	.version = CAMSS_8x39,
+	.legacy_phy = true,
 	.csiphy_res = csiphy_res_8x39,
 	.csid_res = csid_res_8x39,
 	.ispif_res = &ispif_res_8x39,
@@ -5126,6 +5128,7 @@ static const struct camss_resources msm8939_resources = {
 
 static const struct camss_resources msm8953_resources = {
 	.version = CAMSS_8x53,
+	.legacy_phy = true,
 	.icc_res = icc_res_8x53,
 	.icc_path_num = ARRAY_SIZE(icc_res_8x53),
 	.csiphy_res = csiphy_res_8x96,
@@ -5139,6 +5142,7 @@ static const struct camss_resources msm8953_resources = {
 
 static const struct camss_resources msm8996_resources = {
 	.version = CAMSS_8x96,
+	.legacy_phy = true,
 	.csiphy_res = csiphy_res_8x96,
 	.csid_res = csid_res_8x96,
 	.ispif_res = &ispif_res_8x96,
@@ -5150,6 +5154,7 @@ static const struct camss_resources msm8996_resources = {
 
 static const struct camss_resources qcm2290_resources = {
 	.version = CAMSS_2290,
+	.legacy_phy = true,
 	.csiphy_res = csiphy_res_2290,
 	.csid_res = csid_res_2290,
 	.vfe_res = vfe_res_2290,
@@ -5163,6 +5168,7 @@ static const struct camss_resources qcm2290_resources = {
 static const struct camss_resources qcs8300_resources = {
 	.version = CAMSS_8300,
 	.pd_name = "top",
+	.legacy_phy = true,
 	.csiphy_res = csiphy_res_8300,
 	.csid_res = csid_res_8775p,
 	.csid_wrapper_res = &csid_wrapper_res_sm8550,
@@ -5177,6 +5183,7 @@ static const struct camss_resources qcs8300_resources = {
 static const struct camss_resources sa8775p_resources = {
 	.version = CAMSS_8775P,
 	.pd_name = "top",
+	.legacy_phy = true,
 	.csiphy_res = csiphy_res_8775p,
 	.csid_res = csid_res_8775p,
 	.csid_wrapper_res = &csid_wrapper_res_sm8550,
@@ -5190,6 +5197,7 @@ static const struct camss_resources sa8775p_resources = {
 
 static const struct camss_resources sdm660_resources = {
 	.version = CAMSS_660,
+	.legacy_phy = true,
 	.csiphy_res = csiphy_res_660,
 	.csid_res = csid_res_660,
 	.ispif_res = &ispif_res_660,
@@ -5201,6 +5209,7 @@ static const struct camss_resources sdm660_resources = {
 
 static const struct camss_resources sdm670_resources = {
 	.version = CAMSS_845,
+	.legacy_phy = true,
 	.csiphy_res = csiphy_res_670,
 	.csid_res = csid_res_670,
 	.vfe_res = vfe_res_670,
@@ -5212,6 +5221,7 @@ static const struct camss_resources sdm670_resources = {
 static const struct camss_resources sdm845_resources = {
 	.version = CAMSS_845,
 	.pd_name = "top",
+	.legacy_phy = true,
 	.csiphy_res = csiphy_res_845,
 	.csid_res = csid_res_845,
 	.vfe_res = vfe_res_845,
@@ -5223,6 +5233,7 @@ static const struct camss_resources sdm845_resources = {
 static const struct camss_resources sm6150_resources = {
 	.version = CAMSS_6150,
 	.pd_name = "top",
+	.legacy_phy = true,
 	.csiphy_res = csiphy_res_sm6150,
 	.csid_res = csid_res_sm6150,
 	.vfe_res = vfe_res_sm6150,
@@ -5236,6 +5247,7 @@ static const struct camss_resources sm6150_resources = {
 static const struct camss_resources sm8250_resources = {
 	.version = CAMSS_8250,
 	.pd_name = "top",
+	.legacy_phy = true,
 	.csiphy_res = csiphy_res_8250,
 	.csid_res = csid_res_8250,
 	.vfe_res = vfe_res_8250,
@@ -5249,6 +5261,7 @@ static const struct camss_resources sm8250_resources = {
 static const struct camss_resources sc8280xp_resources = {
 	.version = CAMSS_8280XP,
 	.pd_name = "top",
+	.legacy_phy = true,
 	.csiphy_res = csiphy_res_sc8280xp,
 	.csid_res = csid_res_sc8280xp,
 	.ispif_res = NULL,
@@ -5263,6 +5276,7 @@ static const struct camss_resources sc8280xp_resources = {
 static const struct camss_resources sc7280_resources = {
 	.version = CAMSS_7280,
 	.pd_name = "top",
+	.legacy_phy = true,
 	.csiphy_res = csiphy_res_7280,
 	.csid_res = csid_res_7280,
 	.vfe_res = vfe_res_7280,
@@ -5276,6 +5290,7 @@ static const struct camss_resources sc7280_resources = {
 static const struct camss_resources sm8550_resources = {
 	.version = CAMSS_8550,
 	.pd_name = "top",
+	.legacy_phy = true,
 	.csiphy_res = csiphy_res_8550,
 	.csid_res = csid_res_8550,
 	.vfe_res = vfe_res_8550,
@@ -5290,6 +5305,7 @@ static const struct camss_resources sm8550_resources = {
 static const struct camss_resources sm8650_resources = {
 	.version = CAMSS_8650,
 	.pd_name = "top",
+	.legacy_phy = true,
 	.csiphy_res = csiphy_res_sm8650,
 	.csid_res = csid_res_sm8650,
 	.csid_wrapper_res = &csid_wrapper_res_sm8550,
@@ -5304,6 +5320,7 @@ static const struct camss_resources sm8650_resources = {
 static const struct camss_resources x1e80100_resources = {
 	.version = CAMSS_X1E80100,
 	.pd_name = "top",
+	.legacy_phy = true,
 	.csiphy_res = csiphy_res_x1e80100,
 	.csid_res = csid_res_x1e80100,
 	.vfe_res = vfe_res_x1e80100,
diff --git a/drivers/media/platform/qcom/camss/camss.h b/drivers/media/platform/qcom/camss/camss.h
index 6d048414c919e..24ec3ad7990e7 100644
--- a/drivers/media/platform/qcom/camss/camss.h
+++ b/drivers/media/platform/qcom/camss/camss.h
@@ -104,6 +104,7 @@ enum icc_count {
 struct camss_resources {
 	enum camss_version version;
 	const char *pd_name;
+	const bool legacy_phy;
 	const struct camss_subdev_resources *csiphy_res;
 	const struct camss_subdev_resources *csid_res;
 	const struct camss_subdev_resources *ispif_res;

-- 
2.52.0
Re: [PATCH v8 05/18] media: qcom: camss: Add legacy_phy flag to SoC definition structures
Posted by Christopher Obbard 1 month, 1 week ago
Hi Bryan,

On Wed, 2026-02-25 at 15:11 +0000, Bryan O'Donoghue wrote:
> Flag which SoCs have legacy - builtin PHY code. This will be useful in
> subsequent patches to inform PHY bringup logic if legacy bindings are
> available.
> 
> Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>

Reviewed-by: Christopher Obbard <christopher.obbard@linaro.org>
Tested-by: Christopher Obbard <christopher.obbard@linaro.org>

> ---
>  drivers/media/platform/qcom/camss/camss.c | 17 +++++++++++++++++
>  drivers/media/platform/qcom/camss/camss.h |  1 +
>  2 files changed, 18 insertions(+)
> 
> diff --git a/drivers/media/platform/qcom/camss/camss.c b/drivers/media/platform/qcom/camss/camss.c
> index 00b87fd9afbd8..5fb5ad87e1671 100644
> --- a/drivers/media/platform/qcom/camss/camss.c
> +++ b/drivers/media/platform/qcom/camss/camss.c
> @@ -5104,6 +5104,7 @@ static void camss_remove(struct platform_device *pdev)
>  
>  static const struct camss_resources msm8916_resources = {
>  	.version = CAMSS_8x16,
> +	.legacy_phy = true,
>  	.csiphy_res = csiphy_res_8x16,
>  	.csid_res = csid_res_8x16,
>  	.ispif_res = &ispif_res_8x16,
> @@ -5115,6 +5116,7 @@ static const struct camss_resources msm8916_resources = {
>  
>  static const struct camss_resources msm8939_resources = {
>  	.version = CAMSS_8x39,
> +	.legacy_phy = true,
>  	.csiphy_res = csiphy_res_8x39,
>  	.csid_res = csid_res_8x39,
>  	.ispif_res = &ispif_res_8x39,
> @@ -5126,6 +5128,7 @@ static const struct camss_resources msm8939_resources = {
>  
>  static const struct camss_resources msm8953_resources = {
>  	.version = CAMSS_8x53,
> +	.legacy_phy = true,
>  	.icc_res = icc_res_8x53,
>  	.icc_path_num = ARRAY_SIZE(icc_res_8x53),
>  	.csiphy_res = csiphy_res_8x96,
> @@ -5139,6 +5142,7 @@ static const struct camss_resources msm8953_resources = {
>  
>  static const struct camss_resources msm8996_resources = {
>  	.version = CAMSS_8x96,
> +	.legacy_phy = true,
>  	.csiphy_res = csiphy_res_8x96,
>  	.csid_res = csid_res_8x96,
>  	.ispif_res = &ispif_res_8x96,
> @@ -5150,6 +5154,7 @@ static const struct camss_resources msm8996_resources = {
>  
>  static const struct camss_resources qcm2290_resources = {
>  	.version = CAMSS_2290,
> +	.legacy_phy = true,
>  	.csiphy_res = csiphy_res_2290,
>  	.csid_res = csid_res_2290,
>  	.vfe_res = vfe_res_2290,
> @@ -5163,6 +5168,7 @@ static const struct camss_resources qcm2290_resources = {
>  static const struct camss_resources qcs8300_resources = {
>  	.version = CAMSS_8300,
>  	.pd_name = "top",
> +	.legacy_phy = true,
>  	.csiphy_res = csiphy_res_8300,
>  	.csid_res = csid_res_8775p,
>  	.csid_wrapper_res = &csid_wrapper_res_sm8550,
> @@ -5177,6 +5183,7 @@ static const struct camss_resources qcs8300_resources = {
>  static const struct camss_resources sa8775p_resources = {
>  	.version = CAMSS_8775P,
>  	.pd_name = "top",
> +	.legacy_phy = true,
>  	.csiphy_res = csiphy_res_8775p,
>  	.csid_res = csid_res_8775p,
>  	.csid_wrapper_res = &csid_wrapper_res_sm8550,
> @@ -5190,6 +5197,7 @@ static const struct camss_resources sa8775p_resources = {
>  
>  static const struct camss_resources sdm660_resources = {
>  	.version = CAMSS_660,
> +	.legacy_phy = true,
>  	.csiphy_res = csiphy_res_660,
>  	.csid_res = csid_res_660,
>  	.ispif_res = &ispif_res_660,
> @@ -5201,6 +5209,7 @@ static const struct camss_resources sdm660_resources = {
>  
>  static const struct camss_resources sdm670_resources = {
>  	.version = CAMSS_845,
> +	.legacy_phy = true,
>  	.csiphy_res = csiphy_res_670,
>  	.csid_res = csid_res_670,
>  	.vfe_res = vfe_res_670,
> @@ -5212,6 +5221,7 @@ static const struct camss_resources sdm670_resources = {
>  static const struct camss_resources sdm845_resources = {
>  	.version = CAMSS_845,
>  	.pd_name = "top",
> +	.legacy_phy = true,
>  	.csiphy_res = csiphy_res_845,
>  	.csid_res = csid_res_845,
>  	.vfe_res = vfe_res_845,
> @@ -5223,6 +5233,7 @@ static const struct camss_resources sdm845_resources = {
>  static const struct camss_resources sm6150_resources = {
>  	.version = CAMSS_6150,
>  	.pd_name = "top",
> +	.legacy_phy = true,
>  	.csiphy_res = csiphy_res_sm6150,
>  	.csid_res = csid_res_sm6150,
>  	.vfe_res = vfe_res_sm6150,
> @@ -5236,6 +5247,7 @@ static const struct camss_resources sm6150_resources = {
>  static const struct camss_resources sm8250_resources = {
>  	.version = CAMSS_8250,
>  	.pd_name = "top",
> +	.legacy_phy = true,
>  	.csiphy_res = csiphy_res_8250,
>  	.csid_res = csid_res_8250,
>  	.vfe_res = vfe_res_8250,
> @@ -5249,6 +5261,7 @@ static const struct camss_resources sm8250_resources = {
>  static const struct camss_resources sc8280xp_resources = {
>  	.version = CAMSS_8280XP,
>  	.pd_name = "top",
> +	.legacy_phy = true,
>  	.csiphy_res = csiphy_res_sc8280xp,
>  	.csid_res = csid_res_sc8280xp,
>  	.ispif_res = NULL,
> @@ -5263,6 +5276,7 @@ static const struct camss_resources sc8280xp_resources = {
>  static const struct camss_resources sc7280_resources = {
>  	.version = CAMSS_7280,
>  	.pd_name = "top",
> +	.legacy_phy = true,
>  	.csiphy_res = csiphy_res_7280,
>  	.csid_res = csid_res_7280,
>  	.vfe_res = vfe_res_7280,
> @@ -5276,6 +5290,7 @@ static const struct camss_resources sc7280_resources = {
>  static const struct camss_resources sm8550_resources = {
>  	.version = CAMSS_8550,
>  	.pd_name = "top",
> +	.legacy_phy = true,
>  	.csiphy_res = csiphy_res_8550,
>  	.csid_res = csid_res_8550,
>  	.vfe_res = vfe_res_8550,
> @@ -5290,6 +5305,7 @@ static const struct camss_resources sm8550_resources = {
>  static const struct camss_resources sm8650_resources = {
>  	.version = CAMSS_8650,
>  	.pd_name = "top",
> +	.legacy_phy = true,
>  	.csiphy_res = csiphy_res_sm8650,
>  	.csid_res = csid_res_sm8650,
>  	.csid_wrapper_res = &csid_wrapper_res_sm8550,
> @@ -5304,6 +5320,7 @@ static const struct camss_resources sm8650_resources = {
>  static const struct camss_resources x1e80100_resources = {
>  	.version = CAMSS_X1E80100,
>  	.pd_name = "top",
> +	.legacy_phy = true,
>  	.csiphy_res = csiphy_res_x1e80100,
>  	.csid_res = csid_res_x1e80100,
>  	.vfe_res = vfe_res_x1e80100,
> diff --git a/drivers/media/platform/qcom/camss/camss.h b/drivers/media/platform/qcom/camss/camss.h
> index 6d048414c919e..24ec3ad7990e7 100644
> --- a/drivers/media/platform/qcom/camss/camss.h
> +++ b/drivers/media/platform/qcom/camss/camss.h
> @@ -104,6 +104,7 @@ enum icc_count {
>  struct camss_resources {
>  	enum camss_version version;
>  	const char *pd_name;
> +	const bool legacy_phy;
>  	const struct camss_subdev_resources *csiphy_res;
>  	const struct camss_subdev_resources *csid_res;
>  	const struct camss_subdev_resources *ispif_res;