Linux Media Controller development
 help / color / mirror / Atom feed
* [PATCH v3 0/2] media: qcom: camss: Fix Glymur CSIPHY topology
@ 2026-11-19 15:04 Nihal Kumar Gupta
  2026-11-19 15:04 ` [PATCH v3 1/2] dt-bindings: media: qcom,glymur-camss: Use linear CSI ports Nihal Kumar Gupta
  2026-11-19 15:04 ` [PATCH v3 2/2] media: qcom: camss: Add Glymur-specific resources Nihal Kumar Gupta
  0 siblings, 2 replies; 5+ messages in thread
From: Nihal Kumar Gupta @ 2026-11-19 15:04 UTC (permalink / raw)
  To: Bryan O'Donoghue, Vladimir Zapolskiy, Loic Poulain,
	Mauro Carvalho Chehab, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Bryan O'Donoghue
  Cc: linux-arm-msm, linux-media, devicetree, linux-kernel,
	Suresh Vankadara, Vikram Sharma, Nihal Kumar Gupta

Glymur reuses the X1E80100 CAMSS block resources, but has only three
CSI2 PHYs instead of four.

Update the binding to describe three logical CAMSS input ports, and add
Glymur-specific CSIPHY resources for the PHYs present on Glymur while
continuing to reuse the common X1E80100 CAMSS resources.

The Glymur DTS is still under review, so this updates the schema and
example before the old port@3 example is used.

Signed-off-by: Nihal Kumar Gupta <nihal.gupta@oss.qualcomm.com>
---
Changes in v3:
- Clarify the binding ABI change and why the old port@3 ABI worked - Krzysztof
- Explain in commit dropping port@3 does not affect in-tree users because
  Glymur DTS support is still under review - Loic
- Link to v2: https://lore.kernel.org/r/20261113-glymur_camss-v2-0-b1b76509c744@oss.qualcomm.com

Changes in v2:
- Rebase on next-20261112
- Use logical CAMSS ports 0-2 in the Glymur binding example - Krzysztof
- Add Glymur-specific CSIPHY resources for the three available PHYs.
- Link to v1: https://lore.kernel.org/r/20261102-glymur_camss-v1-0-fcb619fc7319@oss.qualcomm.com

---
Nihal Kumar Gupta (2):
      dt-bindings: media: qcom,glymur-camss: Use linear CSI ports
      media: qcom: camss: Add Glymur-specific resources

 .../bindings/media/qcom,glymur-camss.yaml          |  6 ++--
 drivers/media/platform/qcom/camss/camss.c          | 42 +++++++++++++++++++++-
 2 files changed, 44 insertions(+), 4 deletions(-)
---
base-commit: 6d582d78fad9d828e575ca0cdcff8ea47a77220b
change-id: 20261102-glymur_camss-1cf83f4a447f

Best regards,
-- 
Nihal Kumar Gupta <nihal.gupta@oss.qualcomm.com>


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH v3 1/2] dt-bindings: media: qcom,glymur-camss: Use linear CSI ports
  2026-11-19 15:04 [PATCH v3 0/2] media: qcom: camss: Fix Glymur CSIPHY topology Nihal Kumar Gupta
@ 2026-11-19 15:04 ` Nihal Kumar Gupta
  2026-11-19 15:04 ` [PATCH v3 2/2] media: qcom: camss: Add Glymur-specific resources Nihal Kumar Gupta
  1 sibling, 0 replies; 5+ messages in thread
From: Nihal Kumar Gupta @ 2026-11-19 15:04 UTC (permalink / raw)
  To: Bryan O'Donoghue, Vladimir Zapolskiy, Loic Poulain,
	Mauro Carvalho Chehab, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Bryan O'Donoghue
  Cc: linux-arm-msm, linux-media, devicetree, linux-kernel,
	Suresh Vankadara, Vikram Sharma, Nihal Kumar Gupta

Glymur has three CSI2 PHY connections: CSIPHY0, CSIPHY1 and CSIPHY4.
The existing ABI used port@3 for CSIPHY4 because the driver reused the
X1E80100 CSIPHY table, where entry 3 maps to hardware PHY id 4.

Use linear graph ports 0-2 by replacing port@3 with port@2 for the third
CSI2 PHY connection. The matching Glymur driver data maps port@2 to
hardware PHY id 4, and there are no in-tree users of the old port@3 ABI
yet.

Signed-off-by: Nihal Kumar Gupta <nihal.gupta@oss.qualcomm.com>
---
 Documentation/devicetree/bindings/media/qcom,glymur-camss.yaml | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/Documentation/devicetree/bindings/media/qcom,glymur-camss.yaml b/Documentation/devicetree/bindings/media/qcom,glymur-camss.yaml
index a0b77edc212319fad69113f3d55ca24f184d4b23..18a38fc4f9025f6b927780f55ed4fab194091c02 100644
--- a/Documentation/devicetree/bindings/media/qcom,glymur-camss.yaml
+++ b/Documentation/devicetree/bindings/media/qcom,glymur-camss.yaml
@@ -109,7 +109,7 @@ properties:
       CSI input ports.
 
     patternProperties:
-      "^port@[0-3]$":
+      "^port@[0-2]$":
         $ref: /schemas/graph.yaml#/$defs/port-base
         unevaluatedProperties: false
 
@@ -288,8 +288,8 @@ examples:
                     };
                 };
 
-                port@3 {
-                    reg = <3>;
+                port@2 {
+                    reg = <2>;
                     camss_csiphy4_ep: endpoint {
                         data-lanes = <1 2 3 4>;
                         remote-endpoint = <&csiphy4_out>;

-- 
2.34.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH v3 2/2] media: qcom: camss: Add Glymur-specific resources
  2026-11-19 15:04 [PATCH v3 0/2] media: qcom: camss: Fix Glymur CSIPHY topology Nihal Kumar Gupta
  2026-11-19 15:04 ` [PATCH v3 1/2] dt-bindings: media: qcom,glymur-camss: Use linear CSI ports Nihal Kumar Gupta
@ 2026-11-19 15:04 ` Nihal Kumar Gupta
  2026-11-20  8:30   ` Loic Poulain
  2026-11-20 17:41   ` Jesse Casco
  1 sibling, 2 replies; 5+ messages in thread
From: Nihal Kumar Gupta @ 2026-11-19 15:04 UTC (permalink / raw)
  To: Bryan O'Donoghue, Vladimir Zapolskiy, Loic Poulain,
	Mauro Carvalho Chehab, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Bryan O'Donoghue
  Cc: linux-arm-msm, linux-media, devicetree, linux-kernel,
	Suresh Vankadara, Vikram Sharma, Nihal Kumar Gupta

Glymur previously reused the X1E80100 CAMSS resources, where port@3
selected CSIPHY4 through x1e80100 csiphy_res[3].csiphy.id.

Add Glymur-specific CSIPHY resources so ports 0, 1 and 2 map to hardware
PHY ids 0, 1 and 4. The remaining CAMSS resources continue to reuse the
X1E80100 CAMSS resources.

Signed-off-by: Nihal Kumar Gupta <nihal.gupta@oss.qualcomm.com>
---
 drivers/media/platform/qcom/camss/camss.c | 42 ++++++++++++++++++++++++++++++-
 1 file changed, 41 insertions(+), 1 deletion(-)

diff --git a/drivers/media/platform/qcom/camss/camss.c b/drivers/media/platform/qcom/camss/camss.c
index f8e5cf9f3ff09e96d3b48cd5628489715385cc5c..f3cab9ecef04273e09b81ee0cd4e31ca45d1c915 100644
--- a/drivers/media/platform/qcom/camss/camss.c
+++ b/drivers/media/platform/qcom/camss/camss.c
@@ -4103,6 +4103,30 @@ static const struct resources_icc icc_res_sa8775p[] = {
 	},
 };
 
+static const struct camss_subdev_resources csiphy_res_glymur[] = {
+	/* CSIPHY0 */
+	{
+		.csiphy = {
+			.id = 0,
+			.formats = &csiphy_formats_sdm845
+		},
+	},
+	/* CSIPHY1 */
+	{
+		.csiphy = {
+			.id = 1,
+			.formats = &csiphy_formats_sdm845
+		},
+	},
+	/* CSIPHY4 */
+	{
+		.csiphy = {
+			.id = 4,
+			.formats = &csiphy_formats_sdm845
+		},
+	},
+};
+
 static const struct camss_subdev_resources csiphy_res_x1e80100[] = {
 	/* CSIPHY0 */
 	{
@@ -5572,6 +5596,22 @@ static void camss_remove(struct platform_device *pdev)
 	camss_genpd_cleanup(camss);
 }
 
+static const struct camss_resources glymur_resources = {
+	.version = CAMSS_X1E80100,
+	.pd_name = "top",
+	.csiphy_res = csiphy_res_glymur,
+	.tpg_res = tpg_res_x1e80100,
+	.csid_res = csid_res_x1e80100,
+	.vfe_res = vfe_res_x1e80100,
+	.csid_wrapper_res = &csid_wrapper_res_x1e80100,
+	.icc_res = icc_res_x1e80100,
+	.icc_path_num = ARRAY_SIZE(icc_res_x1e80100),
+	.csiphy_num = ARRAY_SIZE(csiphy_res_glymur),
+	.tpg_num = ARRAY_SIZE(tpg_res_x1e80100),
+	.csid_num = ARRAY_SIZE(csid_res_x1e80100),
+	.vfe_num = ARRAY_SIZE(vfe_res_x1e80100),
+};
+
 static const struct camss_resources msm8916_resources = {
 	.version = CAMSS_8x16,
 	.csiphy_res = csiphy_res_8x16,
@@ -5806,6 +5846,7 @@ static const struct camss_resources x1e80100_resources = {
 };
 
 static const struct of_device_id camss_dt_match[] = {
+	{ .compatible = "qcom,glymur-camss", .data = &glymur_resources },
 	{ .compatible = "qcom,msm8916-camss", .data = &msm8916_resources },
 	{ .compatible = "qcom,msm8939-camss", .data = &msm8939_resources },
 	{ .compatible = "qcom,msm8953-camss", .data = &msm8953_resources },
@@ -5824,7 +5865,6 @@ static const struct of_device_id camss_dt_match[] = {
 	{ .compatible = "qcom,sm8550-camss", .data = &sm8550_resources },
 	{ .compatible = "qcom,sm8650-camss", .data = &sm8650_resources },
 	{ .compatible = "qcom,x1e80100-camss", .data = &x1e80100_resources },
-	{ .compatible = "qcom,glymur-camss", .data = &x1e80100_resources },
 	{ }
 };
 

-- 
2.34.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH v3 2/2] media: qcom: camss: Add Glymur-specific resources
  2026-11-19 15:04 ` [PATCH v3 2/2] media: qcom: camss: Add Glymur-specific resources Nihal Kumar Gupta
@ 2026-11-20  8:30   ` Loic Poulain
  2026-11-20 17:41   ` Jesse Casco
  1 sibling, 0 replies; 5+ messages in thread
From: Loic Poulain @ 2026-11-20  8:30 UTC (permalink / raw)
  To: Nihal Kumar Gupta
  Cc: Bryan O'Donoghue, Vladimir Zapolskiy, Mauro Carvalho Chehab,
	Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Bryan O'Donoghue, linux-arm-msm, linux-media, devicetree,
	linux-kernel, Suresh Vankadara, Vikram Sharma

On Thu, Nov 19, 2026 at 4:04 PM Nihal Kumar Gupta
<nihal.gupta@oss.qualcomm.com> wrote:
>
> Glymur previously reused the X1E80100 CAMSS resources, where port@3
> selected CSIPHY4 through x1e80100 csiphy_res[3].csiphy.id.
>
> Add Glymur-specific CSIPHY resources so ports 0, 1 and 2 map to hardware
> PHY ids 0, 1 and 4. The remaining CAMSS resources continue to reuse the
> X1E80100 CAMSS resources.
>
> Signed-off-by: Nihal Kumar Gupta <nihal.gupta@oss.qualcomm.com>

Reviewed-by: Loic Poulain <loic.poulain@oss.qualcomm.com>

> ---
>  drivers/media/platform/qcom/camss/camss.c | 42 ++++++++++++++++++++++++++++++-
>  1 file changed, 41 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/media/platform/qcom/camss/camss.c b/drivers/media/platform/qcom/camss/camss.c
> index f8e5cf9f3ff09e96d3b48cd5628489715385cc5c..f3cab9ecef04273e09b81ee0cd4e31ca45d1c915 100644
> --- a/drivers/media/platform/qcom/camss/camss.c
> +++ b/drivers/media/platform/qcom/camss/camss.c
> @@ -4103,6 +4103,30 @@ static const struct resources_icc icc_res_sa8775p[] = {
>         },
>  };
>
> +static const struct camss_subdev_resources csiphy_res_glymur[] = {
> +       /* CSIPHY0 */
> +       {
> +               .csiphy = {
> +                       .id = 0,
> +                       .formats = &csiphy_formats_sdm845
> +               },
> +       },
> +       /* CSIPHY1 */
> +       {
> +               .csiphy = {
> +                       .id = 1,
> +                       .formats = &csiphy_formats_sdm845
> +               },
> +       },
> +       /* CSIPHY4 */
> +       {
> +               .csiphy = {
> +                       .id = 4,
> +                       .formats = &csiphy_formats_sdm845
> +               },
> +       },
> +};
> +
>  static const struct camss_subdev_resources csiphy_res_x1e80100[] = {
>         /* CSIPHY0 */
>         {
> @@ -5572,6 +5596,22 @@ static void camss_remove(struct platform_device *pdev)
>         camss_genpd_cleanup(camss);
>  }
>
> +static const struct camss_resources glymur_resources = {
> +       .version = CAMSS_X1E80100,
> +       .pd_name = "top",
> +       .csiphy_res = csiphy_res_glymur,
> +       .tpg_res = tpg_res_x1e80100,
> +       .csid_res = csid_res_x1e80100,
> +       .vfe_res = vfe_res_x1e80100,
> +       .csid_wrapper_res = &csid_wrapper_res_x1e80100,
> +       .icc_res = icc_res_x1e80100,
> +       .icc_path_num = ARRAY_SIZE(icc_res_x1e80100),
> +       .csiphy_num = ARRAY_SIZE(csiphy_res_glymur),
> +       .tpg_num = ARRAY_SIZE(tpg_res_x1e80100),
> +       .csid_num = ARRAY_SIZE(csid_res_x1e80100),
> +       .vfe_num = ARRAY_SIZE(vfe_res_x1e80100),
> +};
> +
>  static const struct camss_resources msm8916_resources = {
>         .version = CAMSS_8x16,
>         .csiphy_res = csiphy_res_8x16,
> @@ -5806,6 +5846,7 @@ static const struct camss_resources x1e80100_resources = {
>  };
>
>  static const struct of_device_id camss_dt_match[] = {
> +       { .compatible = "qcom,glymur-camss", .data = &glymur_resources },
>         { .compatible = "qcom,msm8916-camss", .data = &msm8916_resources },
>         { .compatible = "qcom,msm8939-camss", .data = &msm8939_resources },
>         { .compatible = "qcom,msm8953-camss", .data = &msm8953_resources },
> @@ -5824,7 +5865,6 @@ static const struct of_device_id camss_dt_match[] = {
>         { .compatible = "qcom,sm8550-camss", .data = &sm8550_resources },
>         { .compatible = "qcom,sm8650-camss", .data = &sm8650_resources },
>         { .compatible = "qcom,x1e80100-camss", .data = &x1e80100_resources },
> -       { .compatible = "qcom,glymur-camss", .data = &x1e80100_resources },
>         { }
>  };
>
>
> --
> 2.34.1
>

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH v3 2/2] media: qcom: camss: Add Glymur-specific resources
  2026-11-19 15:04 ` [PATCH v3 2/2] media: qcom: camss: Add Glymur-specific resources Nihal Kumar Gupta
  2026-11-20  8:30   ` Loic Poulain
@ 2026-11-20 17:41   ` Jesse Casco
  1 sibling, 0 replies; 5+ messages in thread
From: Jesse Casco @ 2026-11-20 17:41 UTC (permalink / raw)
  To: Nihal Kumar Gupta
  Cc: Bryan O'Donoghue, Vladimir Zapolskiy, Loic Poulain,
	linux-media, linux-arm-msm

On Thu, Nov 19, 2026, Nihal Kumar Gupta wrote:
> Add Glymur-specific CSIPHY resources so ports 0, 1 and 2 map to hardware
> PHY ids 0, 1 and 4. The remaining CAMSS resources continue to reuse the
> X1E80100 CAMSS resources.

Hi Nihal,

I tested this on an Asus Zenbook A16, with the series backported to 7.3
and the board's CSIPHY4 link moved to port@2. The OV02C10 on CSIPHY4 and
the HM1092 on CSIPHY0 both stream, through media-ctl and libcamera.

Tested-by: Jesse Casco <jesse.casco@gmail.com> # Asus Zenbook A16

One thing to be aware of with the reused CSID/VFE tables: on their own,
only CSID0 -> VFE0 and CSID1 -> VFE1 stream on Glymur. The lite CSIDs
get the full CSID clocks, and CAMSS assumes CSID n feeds VFE n, which
doesn't hold with three full CSIDs and two full VFEs. Both come from the
X1E80100 tables, so they're not something for this patch; I've sent
fixes here:

  https://lore.kernel.org/r/cover.1795196107.git.jesse.casco@gmail.com

I tested this patch together with those, and with them all four
CSID/VFE pairs stream as well.

Jesse

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2026-11-20 17:41 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-19 15:04 [PATCH v3 0/2] media: qcom: camss: Fix Glymur CSIPHY topology Nihal Kumar Gupta
2026-11-19 15:04 ` [PATCH v3 1/2] dt-bindings: media: qcom,glymur-camss: Use linear CSI ports Nihal Kumar Gupta
2026-11-19 15:04 ` [PATCH v3 2/2] media: qcom: camss: Add Glymur-specific resources Nihal Kumar Gupta
2026-11-20  8:30   ` Loic Poulain
2026-11-20 17:41   ` Jesse Casco

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox