From: Bryan O'Donoghue <bod@kernel.org>
To: Anusha Arun Nandi <anusha.nandi@oss.qualcomm.com>
Cc: Vinod Koul <vkoul@kernel.org>,
Neil Armstrong <neil.armstrong@linaro.org>,
Manivannan Sadhasivam <mani@kernel.org>,
gjorgji.rosikopulos@oss.qualcomm.com,
hariram.purushothaman@oss.qualcomm.com, akapatra@quicinc.com,
jigarkumar.zala@oss.qualcomm.com, linux-phy@lists.infradead.org,
linux-media@vger.kernel.org, linux-arm-msm@vger.kernel.org,
linux-kernel@vger.kernel.org, devicetree@vger.kernel.org
Subject: Re: [PATCH v4 1/5] dt-bindings: phy: qcom: Add common qcom,csi2-phy
Date: Wed, 2 Dec 2026 04:49:53 +0000 [thread overview]
Message-ID: <ae08e8df-29dd-44e7-8add-ce8684c7cd55@kernel.org> (raw)
In-Reply-To: <20261201210207.1049452-2-anusha.nandi@oss.qualcomm.com>
On 01/12/2026 21:02, Anusha Arun Nandi wrote:
> SA8775P, QCS8300 and SC7280 CSI2 PHYs are bit-for-bit identical in
> devicetree shape (ports, bus-type, data-lanes, operating-points-v2,
> clocks, single "top" power-domain, vdda-hs/vdda-lp supplies).
>
> Describe all three with a single qcom,csi2-phy.yaml and a compatible
> oneOf, rather than one standalone schema per SoC. QCS8300 is further
> required to be paired with a qcom,sa8775p-csi2-phy fallback
> compatible. This lets the driver bind QCS8300 nodes via its
> qcom,sa8775p-csi2-phy match entry rather than carrying a duplicate.
>
> qcom,x1e80100-csi2-phy.yaml is a separate PHY with a different shape
> (3 clocks, 3 power-domains, different supply names, DPHY split-mode
> support) and is left untouched, but port@0's DPHY split-mode
> definition (two endpoints, lane-count constraint) is cloned into this
> schema rather than dropped, since this PHY supports the same split
> mode.
Which is alot of cloning.
> The supply names are vdda-hs/vdda-lp rather than the hardware's own
> power-rail names, since those names aren't guaranteed to stay
> consistent across future platforms using this binding.
Shape appears twice here, I suspect a bit of LLMese needs tidying up.
Leaving that aside you _could_ represent all of the different changes
you want in the existing PHY description.
> Co-developed-by: Jigarkumar Zala <jigarkumar.zala@oss.qualcomm.com>
> Signed-off-by: Jigarkumar Zala <jigarkumar.zala@oss.qualcomm.com>
> Signed-off-by: Anusha Arun Nandi <anusha.nandi@oss.qualcomm.com>
> ---
> .../bindings/phy/qcom,csi2-phy.yaml | 201 ++++++++++++++++++
> 1 file changed, 201 insertions(+)
> create mode 100644 Documentation/devicetree/bindings/phy/qcom,csi2-phy.yaml
Leading me to my second point why is this file now the core file with
the x1e/x2e file being the odd one out. You end up with _alot_ of copy/paste
By my count you're one clock, two power-domains and two different rail
names.
> diff --git a/Documentation/devicetree/bindings/phy/qcom,csi2-phy.yaml b/Documentation/devicetree/bindings/phy/qcom,csi2-phy.yaml
> new file mode 100644
> index 000000000000..44791802a3ed
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/phy/qcom,csi2-phy.yaml
> @@ -0,0 +1,201 @@
> +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
> +# Copyright (c) 2026 Qualcomm Innovation Center, Inc. All rights reserved.
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/phy/qcom,csi2-phy.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Qualcomm CSI2 PHY
> +
> +maintainers:
> + - Anusha Arun Nandi <anusha.nandi@oss.qualcomm.com>
> +
> +description:
> + Qualcomm MIPI CSI2 D-PHY. Connects MIPI CSI2 sensors to Qualcomm's Camera
> + CSI Decoder.
> +
> +properties:
> + compatible:
> + oneOf:
> + - enum:
> + - qcom,sa8775p-csi2-phy
> + - qcom,sc7280-csi2-phy
> + - items:
> + - enum:
> + - qcom,qcs8300-csi2-phy
> + - const: qcom,sa8775p-csi2-phy
> +
> + reg:
> + maxItems: 1
> +
> + clocks:
> + maxItems: 2
> +
> + clock-names:
> + items:
> + - const: core
> + - const: timer
> +
> + interrupts:
> + maxItems: 1
> +
> + operating-points-v2: true
> +
> + opp-table:
> + type: object
> +
> + power-domains:
> + items:
> + - description: Titan Top GDSC - Titan ISP Block, Global Distributed Switch Controller.
> +
> + power-domain-names:
> + items:
> + - const: top
I'm finding this a bit suspect. Up to v3 my submission was one power
domain, then we added MX/MMCX because the camcc lists those rails,
you're saying here your PHYs don't have those rails ?
Odd, to be honest, doesn't sound right.
> +
> + vdda-hs-supply:
> + description: Phandle to PHY supply.
> +
> + vdda-lp-supply:
> + description: Phandle to PLL supply.
But what is the justification for giving these names instead of voltages
? If you name them by voltage what are those voltages.
Ok, checked the inline CAMSS for this - sa8755p and qcs8300 are
vreg_l4a_0p88 and vreg_l1c_1p2, sc7280 is vreg_l10c_0p88 and
vreg_l6b_1p2 so these are two new names.
Documentation/devicetree/bindings/media/qcom,qcs8300-camss.yaml:
vdda-phy-supply = <&vreg_l4a_0p88>;
Documentation/devicetree/bindings/media/qcom,sa8775p-camss.yaml:
vdda-phy-supply = <&vreg_l4a_0p88>;
Documentation/devicetree/bindings/media/qcom,sc7280-camss.yaml:
vdda-pll-supply = <&vreg_l6b_1p2>;
So these are two new names, why ? We've established the PHY binding
names by voltage.
> +
> + ports:
> + $ref: /schemas/graph.yaml#/properties/ports
> +
> + properties:
> + port@0:
> + $ref: /schemas/graph.yaml#/$defs/port-base
> + description:
> + Sensor input. Always present. A single sensor is described by a
> + single endpoint with one to four data lanes, numbered 1-4. The
> + clock lane is position 0.
> +
> + DPHY split mode, where two independent sensors share the PHY, is
> + described by two endpoints. endpoint@0 uses data lanes 1 or 1-2,
> + clock lane position 0; endpoint@1 uses data lane 3, clock lane
> + position 4.
> +
> + unevaluatedProperties: false
> +
> + patternProperties:
> + "^endpoint(@[01])?$":
> + $ref: /schemas/media/video-interfaces.yaml#
> + unevaluatedProperties: false
> + properties:
> + bus-type:
> + enum:
> + - 1 # MEDIA_BUS_TYPE_CSI2_CPHY
> + - 4 # MEDIA_BUS_TYPE_CSI2_DPHY
> + default: 4
> +
> + data-lanes:
> + minItems: 1
> + maxItems: 4
> + items:
> + minimum: 1
> + maximum: 4
> + description:
> + Data lane positions following this endpoint's clock
> + lane. Positions are a per-port logical numbering, not
> + package pad or ball positions.
> +
> + required:
> + - data-lanes
> + - remote-endpoint
> +
> + allOf:
> + - if:
> + required:
> + - endpoint@1
> + then:
> + properties:
> + endpoint@0:
> + properties:
> + data-lanes:
> + maxItems: 2
> + items:
> + maximum: 2
> + endpoint@1:
> + properties:
> + data-lanes:
> + items:
> + - const: 3
> + required:
> + - endpoint@0
> +
> + port@1:
> + $ref: /schemas/graph.yaml#/properties/port
> + description: Output to the CAMSS CSID controller.
> +
> + required:
> + - port@0
> + - port@1
> +
> +required:
> + - compatible
> + - reg
> + - clocks
> + - clock-names
> + - interrupts
> + - operating-points-v2
> + - power-domains
> + - power-domain-names
> + - vdda-hs-supply
> + - vdda-lp-supply
> + - ports
> +
> +additionalProperties: false
> +
> +examples:
> + - |
> + #include <dt-bindings/clock/qcom,sa8775p-camcc.h>
> + #include <dt-bindings/interrupt-controller/arm-gic.h>
> + #include <dt-bindings/media/video-interfaces.h>
> +
> + phy@ac9c000 {
> + compatible = "qcom,sa8775p-csi2-phy";
> + reg = <0x0ac9c000 0x2000>;
> +
> + clocks = <&camcc CAM_CC_CSIPHY0_CLK>,
> + <&camcc CAM_CC_CSI0PHYTIMER_CLK>;
> + clock-names = "core",
> + "timer";
> +
> + interrupts = <GIC_SPI 477 IRQ_TYPE_EDGE_RISING>;
> +
> + operating-points-v2 = <&csiphy_opp_table>;
> +
> + power-domains = <&camcc CAM_CC_TITAN_TOP_GDSC>;
> + power-domain-names = "top";
> +
> + vdda-hs-supply = <&vreg_l4a>;
> + vdda-lp-supply = <&vreg_l1c>;
> +
> + ports {
> + #address-cells = <1>;
> + #size-cells = <0>;
> +
> + port@0 {
> + reg = <0>;
> + csiphy0_in: endpoint {
> + bus-type = <MEDIA_BUS_TYPE_CSI2_DPHY>;
> + data-lanes = <1 2 3 4>;
> + remote-endpoint = <&sensor_out>;
> + };
> + };
> +
> + port@1 {
> + reg = <1>;
> + csiphy0_out: endpoint {
> + remote-endpoint = <&csid_in>;
> + };
> + };
> + };
> +
> + csiphy_opp_table: opp-table {
> + compatible = "operating-points-v2";
> +
> + opp-300000000 {
> + opp-hz = /bits/ 64 <300000000>;
> + };
> + };
> + };
> --
> 2.34.1
WARNING: multiple messages have this Message-ID (diff)
From: Bryan O'Donoghue <bod@kernel.org>
To: Anusha Arun Nandi <anusha.nandi@oss.qualcomm.com>
Cc: Vinod Koul <vkoul@kernel.org>,
Neil Armstrong <neil.armstrong@linaro.org>,
Manivannan Sadhasivam <mani@kernel.org>,
gjorgji.rosikopulos@oss.qualcomm.com,
hariram.purushothaman@oss.qualcomm.com, akapatra@quicinc.com,
jigarkumar.zala@oss.qualcomm.com, linux-phy@lists.infradead.org,
linux-media@vger.kernel.org, linux-arm-msm@vger.kernel.org,
linux-kernel@vger.kernel.org, devicetree@vger.kernel.org
Subject: Re: [PATCH v4 1/5] dt-bindings: phy: qcom: Add common qcom,csi2-phy
Date: Wed, 2 Dec 2026 04:49:53 +0000 [thread overview]
Message-ID: <ae08e8df-29dd-44e7-8add-ce8684c7cd55@kernel.org> (raw)
In-Reply-To: <20261201210207.1049452-2-anusha.nandi@oss.qualcomm.com>
On 01/12/2026 21:02, Anusha Arun Nandi wrote:
> SA8775P, QCS8300 and SC7280 CSI2 PHYs are bit-for-bit identical in
> devicetree shape (ports, bus-type, data-lanes, operating-points-v2,
> clocks, single "top" power-domain, vdda-hs/vdda-lp supplies).
>
> Describe all three with a single qcom,csi2-phy.yaml and a compatible
> oneOf, rather than one standalone schema per SoC. QCS8300 is further
> required to be paired with a qcom,sa8775p-csi2-phy fallback
> compatible. This lets the driver bind QCS8300 nodes via its
> qcom,sa8775p-csi2-phy match entry rather than carrying a duplicate.
>
> qcom,x1e80100-csi2-phy.yaml is a separate PHY with a different shape
> (3 clocks, 3 power-domains, different supply names, DPHY split-mode
> support) and is left untouched, but port@0's DPHY split-mode
> definition (two endpoints, lane-count constraint) is cloned into this
> schema rather than dropped, since this PHY supports the same split
> mode.
Which is alot of cloning.
> The supply names are vdda-hs/vdda-lp rather than the hardware's own
> power-rail names, since those names aren't guaranteed to stay
> consistent across future platforms using this binding.
Shape appears twice here, I suspect a bit of LLMese needs tidying up.
Leaving that aside you _could_ represent all of the different changes
you want in the existing PHY description.
> Co-developed-by: Jigarkumar Zala <jigarkumar.zala@oss.qualcomm.com>
> Signed-off-by: Jigarkumar Zala <jigarkumar.zala@oss.qualcomm.com>
> Signed-off-by: Anusha Arun Nandi <anusha.nandi@oss.qualcomm.com>
> ---
> .../bindings/phy/qcom,csi2-phy.yaml | 201 ++++++++++++++++++
> 1 file changed, 201 insertions(+)
> create mode 100644 Documentation/devicetree/bindings/phy/qcom,csi2-phy.yaml
Leading me to my second point why is this file now the core file with
the x1e/x2e file being the odd one out. You end up with _alot_ of copy/paste
By my count you're one clock, two power-domains and two different rail
names.
> diff --git a/Documentation/devicetree/bindings/phy/qcom,csi2-phy.yaml b/Documentation/devicetree/bindings/phy/qcom,csi2-phy.yaml
> new file mode 100644
> index 000000000000..44791802a3ed
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/phy/qcom,csi2-phy.yaml
> @@ -0,0 +1,201 @@
> +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
> +# Copyright (c) 2026 Qualcomm Innovation Center, Inc. All rights reserved.
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/phy/qcom,csi2-phy.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Qualcomm CSI2 PHY
> +
> +maintainers:
> + - Anusha Arun Nandi <anusha.nandi@oss.qualcomm.com>
> +
> +description:
> + Qualcomm MIPI CSI2 D-PHY. Connects MIPI CSI2 sensors to Qualcomm's Camera
> + CSI Decoder.
> +
> +properties:
> + compatible:
> + oneOf:
> + - enum:
> + - qcom,sa8775p-csi2-phy
> + - qcom,sc7280-csi2-phy
> + - items:
> + - enum:
> + - qcom,qcs8300-csi2-phy
> + - const: qcom,sa8775p-csi2-phy
> +
> + reg:
> + maxItems: 1
> +
> + clocks:
> + maxItems: 2
> +
> + clock-names:
> + items:
> + - const: core
> + - const: timer
> +
> + interrupts:
> + maxItems: 1
> +
> + operating-points-v2: true
> +
> + opp-table:
> + type: object
> +
> + power-domains:
> + items:
> + - description: Titan Top GDSC - Titan ISP Block, Global Distributed Switch Controller.
> +
> + power-domain-names:
> + items:
> + - const: top
I'm finding this a bit suspect. Up to v3 my submission was one power
domain, then we added MX/MMCX because the camcc lists those rails,
you're saying here your PHYs don't have those rails ?
Odd, to be honest, doesn't sound right.
> +
> + vdda-hs-supply:
> + description: Phandle to PHY supply.
> +
> + vdda-lp-supply:
> + description: Phandle to PLL supply.
But what is the justification for giving these names instead of voltages
? If you name them by voltage what are those voltages.
Ok, checked the inline CAMSS for this - sa8755p and qcs8300 are
vreg_l4a_0p88 and vreg_l1c_1p2, sc7280 is vreg_l10c_0p88 and
vreg_l6b_1p2 so these are two new names.
Documentation/devicetree/bindings/media/qcom,qcs8300-camss.yaml:
vdda-phy-supply = <&vreg_l4a_0p88>;
Documentation/devicetree/bindings/media/qcom,sa8775p-camss.yaml:
vdda-phy-supply = <&vreg_l4a_0p88>;
Documentation/devicetree/bindings/media/qcom,sc7280-camss.yaml:
vdda-pll-supply = <&vreg_l6b_1p2>;
So these are two new names, why ? We've established the PHY binding
names by voltage.
> +
> + ports:
> + $ref: /schemas/graph.yaml#/properties/ports
> +
> + properties:
> + port@0:
> + $ref: /schemas/graph.yaml#/$defs/port-base
> + description:
> + Sensor input. Always present. A single sensor is described by a
> + single endpoint with one to four data lanes, numbered 1-4. The
> + clock lane is position 0.
> +
> + DPHY split mode, where two independent sensors share the PHY, is
> + described by two endpoints. endpoint@0 uses data lanes 1 or 1-2,
> + clock lane position 0; endpoint@1 uses data lane 3, clock lane
> + position 4.
> +
> + unevaluatedProperties: false
> +
> + patternProperties:
> + "^endpoint(@[01])?$":
> + $ref: /schemas/media/video-interfaces.yaml#
> + unevaluatedProperties: false
> + properties:
> + bus-type:
> + enum:
> + - 1 # MEDIA_BUS_TYPE_CSI2_CPHY
> + - 4 # MEDIA_BUS_TYPE_CSI2_DPHY
> + default: 4
> +
> + data-lanes:
> + minItems: 1
> + maxItems: 4
> + items:
> + minimum: 1
> + maximum: 4
> + description:
> + Data lane positions following this endpoint's clock
> + lane. Positions are a per-port logical numbering, not
> + package pad or ball positions.
> +
> + required:
> + - data-lanes
> + - remote-endpoint
> +
> + allOf:
> + - if:
> + required:
> + - endpoint@1
> + then:
> + properties:
> + endpoint@0:
> + properties:
> + data-lanes:
> + maxItems: 2
> + items:
> + maximum: 2
> + endpoint@1:
> + properties:
> + data-lanes:
> + items:
> + - const: 3
> + required:
> + - endpoint@0
> +
> + port@1:
> + $ref: /schemas/graph.yaml#/properties/port
> + description: Output to the CAMSS CSID controller.
> +
> + required:
> + - port@0
> + - port@1
> +
> +required:
> + - compatible
> + - reg
> + - clocks
> + - clock-names
> + - interrupts
> + - operating-points-v2
> + - power-domains
> + - power-domain-names
> + - vdda-hs-supply
> + - vdda-lp-supply
> + - ports
> +
> +additionalProperties: false
> +
> +examples:
> + - |
> + #include <dt-bindings/clock/qcom,sa8775p-camcc.h>
> + #include <dt-bindings/interrupt-controller/arm-gic.h>
> + #include <dt-bindings/media/video-interfaces.h>
> +
> + phy@ac9c000 {
> + compatible = "qcom,sa8775p-csi2-phy";
> + reg = <0x0ac9c000 0x2000>;
> +
> + clocks = <&camcc CAM_CC_CSIPHY0_CLK>,
> + <&camcc CAM_CC_CSI0PHYTIMER_CLK>;
> + clock-names = "core",
> + "timer";
> +
> + interrupts = <GIC_SPI 477 IRQ_TYPE_EDGE_RISING>;
> +
> + operating-points-v2 = <&csiphy_opp_table>;
> +
> + power-domains = <&camcc CAM_CC_TITAN_TOP_GDSC>;
> + power-domain-names = "top";
> +
> + vdda-hs-supply = <&vreg_l4a>;
> + vdda-lp-supply = <&vreg_l1c>;
> +
> + ports {
> + #address-cells = <1>;
> + #size-cells = <0>;
> +
> + port@0 {
> + reg = <0>;
> + csiphy0_in: endpoint {
> + bus-type = <MEDIA_BUS_TYPE_CSI2_DPHY>;
> + data-lanes = <1 2 3 4>;
> + remote-endpoint = <&sensor_out>;
> + };
> + };
> +
> + port@1 {
> + reg = <1>;
> + csiphy0_out: endpoint {
> + remote-endpoint = <&csid_in>;
> + };
> + };
> + };
> +
> + csiphy_opp_table: opp-table {
> + compatible = "operating-points-v2";
> +
> + opp-300000000 {
> + opp-hz = /bits/ 64 <300000000>;
> + };
> + };
> + };
> --
> 2.34.1
--
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy
next prev parent reply other threads:[~2026-12-02 4:49 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-12-01 21:02 [PATCH v4 0/5] phy: qcom-mipi-csi2: Add D-PHY support for sa8775p, qcs8300 and sc7280 Anusha Arun Nandi
2026-12-01 21:02 ` Anusha Arun Nandi
2026-12-01 21:02 ` [PATCH v4 1/5] dt-bindings: phy: qcom: Add common qcom,csi2-phy Anusha Arun Nandi
2026-12-01 21:02 ` Anusha Arun Nandi
2026-12-02 4:49 ` Bryan O'Donoghue [this message]
2026-12-02 4:49 ` Bryan O'Donoghue
2026-12-02 8:16 ` Nihal Kumar Gupta
2026-12-02 8:16 ` Nihal Kumar Gupta
2026-12-01 21:02 ` [PATCH v4 2/5] phy: qcom-mipi-csi2: Make OPP table optional Anusha Arun Nandi
2026-12-01 21:02 ` Anusha Arun Nandi
2026-12-02 4:55 ` Bryan O'Donoghue
2026-12-02 4:55 ` Bryan O'Donoghue
2026-12-02 8:12 ` Nihal Kumar Gupta
2026-12-02 8:12 ` Nihal Kumar Gupta
2026-12-01 21:02 ` [PATCH v4 3/5] phy: qcom-mipi-csi2: restructure D-PHY into core.c and dphy-regs.h Anusha Arun Nandi
2026-12-01 21:02 ` Anusha Arun Nandi
2026-12-02 5:20 ` Bryan O'Donoghue
2026-12-02 5:20 ` Bryan O'Donoghue
2026-12-01 21:02 ` [PATCH v4 4/5] phy: qcom-mipi-csi2: Add sa8775p D-PHY support Anusha Arun Nandi
2026-12-01 21:02 ` Anusha Arun Nandi
2026-12-01 21:02 ` [PATCH v4 5/5] phy: qcom-mipi-csi2: Add sc7280 D-PHY provider Anusha Arun Nandi
2026-12-01 21:02 ` Anusha Arun Nandi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ae08e8df-29dd-44e7-8add-ce8684c7cd55@kernel.org \
--to=bod@kernel.org \
--cc=akapatra@quicinc.com \
--cc=anusha.nandi@oss.qualcomm.com \
--cc=devicetree@vger.kernel.org \
--cc=gjorgji.rosikopulos@oss.qualcomm.com \
--cc=hariram.purushothaman@oss.qualcomm.com \
--cc=jigarkumar.zala@oss.qualcomm.com \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=linux-phy@lists.infradead.org \
--cc=mani@kernel.org \
--cc=neil.armstrong@linaro.org \
--cc=vkoul@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.