From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796186998; b=13B2XTvd9ldr551ZKoCjnDPe37HpwG1ORuSTarBdQx5XWW75zCdQ3+X/19/HLZ+X3xZ2 ZAhsHhPy5tRMkjOHJmTRD0iQTp0VWMT+UfZFccwmX5kgdAyYf/75km756X/z/FX6igSNw hc9nFvkL/K60ktbfeq6cDhzoVC7nUupHE+iy1gGubEmiylGZMEXa7qBPEWdMGAI+NV9Hj 5tTZHr+8ycLSzms/zB3aT+WUoH0gZyLY91yVrkV+bDqdQ0aqNHR+S8uqdz+KzsoRTi71p Vzbqutih1ofOpFVRwK89LBVUuUUZDp3gXpuxi4pFqaV68Kf/BHJ7MzsKwB24FuXimmg== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796186998; h=Received:DKIM-Signature:Message-ID:Date:MIME-Version:User-Agent: Subject:To:Cc:References:From:Content-Language:Autocrypt:In-Reply-To: Content-Type:Content-Transfer-Encoding; bh=gnKTMMZt+gGM0w+JCJaziPIY+QLY64J0OvJPAScqT5U=; b=2kR0EZYUXUwIGE6eGmps4EldMoZfZVHSF+LysqPvHvrFpSlVLhgQVkNYbgT+opg2iHbw eYquVJZMmEIZJuVqQquQbL441VRi5AIORHvAmbdoqCpwYqdQRwpvV8Vy6Gyd77q9kFrLX BD60090PiXFHHKct6hBDvz1yvwAFuetilzFmmnsCWYmDL9UCeoh9WhYcAXnmUnYs9GwLh t5mYdshtFtEa5QsqCfn4obo2vpml2w+k/3/VfoWH5VOt+ujWkCeGayr0OPm6+kHmz2+nl Eia4xWwWsPKWmA+aouSBYTwVj5JrmT4HVRFN2fqO3QEhoPJw7ethIGIFjZWXvVGMRcg== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=NR1F0bU8; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D0D8D606A31A; Wed, 2 Dec 2026 04:49:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=NR1F0bU8 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 439161F00896; Wed, 2 Dec 2026 04:49:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796186998; bh=gnKTMMZt+gGM0w+JCJaziPIY+QLY64J0OvJPAScqT5U=; h=Date:Subject:To:Cc:References:From:In-Reply-To; b=NR1F0bU80JFWYrua2VHRveqhKfIDZoGWc3F8BCKOo+BVfbt2wWv7KZYzM2+sHwpEM TN8nwLLiWYV9qaCGE+mkpY3dymvEPbkV19GbtkO4JBA30wcHF4tIf1NbCyKScJ3M85 S8hp/+fPiV9XjhdcVUZi+dR22H934YzVTiO8G8YCS/iX9ZglGag4Pk3mBC+e/0ef/D 10PCr89WxGyW7FrVhf6wW16GHwwQccToWYvlftGALkYiuw4kZSkQdfNNvtlRmdiEJJ nYqbQPt9ChWYx9TfS1H73wws//hq+BPykPX1/CMkNNQ/q2XbEG9LNCOE2nxI9Std1A iTzW6yaAYgarQ== Message-ID: Date: Wed, 2 Dec 2026 04:49:53 +0000 X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v4 1/5] dt-bindings: phy: qcom: Add common qcom,csi2-phy To: Anusha Arun Nandi Cc: Vinod Koul , Neil Armstrong , Manivannan Sadhasivam , 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 References: <20261201210207.1049452-1-anusha.nandi@oss.qualcomm.com> <20261201210207.1049452-2-anusha.nandi@oss.qualcomm.com> From: Bryan O'Donoghue Content-Language: en-GB Autocrypt: addr=bod@kernel.org; keydata= xsFNBGRJNSgBEADD7Vm2ZFa+v+JGJ2QYTJqQAkqis/uOHkhdFNXqpBarVBd47QU/DMNU5Rxg jedMQEmHoeDbJ6UOpjbrUQ63c5sgG1JbroHJJctwsEI75OOlekMuebEbjIJBLfgENGwPBMHv piv5TgCWr0VgYaXfp2eh2LINFywzqj823HiDPibQAXDrjzvF1ogksi/6cQZs8d4if8YQkLOr YISFouG+eR0nN1I7mUfIddXOWu6lJeTyqbWVurv58k2ekIXKaOC9ixLHFbcfYV0hOgRaTwQC B8CYF9nfqZla19iItfsN9QxN+ZdQjcRoYipp6HPCMfJlKH7GfaFcW93LKc4DKJ2lVL+pg/OQ lythZbjRPY492NG9kZ65aYstCs90uhMUEVVPuGUw7wBEku+6IEwZfrbMVKeWzLlPyM4Hv9hM 8ktxSmxWsPTPqpBC8eyeAQLalMELAyVcZlkaCtEcbj7w4l/JkYz+4l37obG8ZD+B34udBUUz MsAJ8foDFrBh2MOFA3hxD6G90D23mmWsri7pnKA2tZs92aQX7Ee+FbCyg6g5ln62Sq83ZDbf 53DdBs55EVpBadeInWmXhzCHPQx06H+CwTEjShTYIaMmBfrewvYUDKvFTC5iKQhAEUgt6i94 JsbG7NoeqcxkUMcBOEUQ3uCQG1D70ugspgXc0wd3Rimiq6535wARAQABzSFCcnlhbiBPJ0Rv bm9naHVlIDxib2RAa2VybmVsLm9yZz7C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50T8STpnxayBQvWbCvu+6NOEjXCbyaOJig+5l0zlGN9XHjdANXC5HnwmyaGRL9YDq Jh2nVXVJDincOdQRdKcJjYLqaOAoWrYWSDi1iZGspHBTDrnOvfMQzzHY In-Reply-To: <20261201210207.1049452-2-anusha.nandi@oss.qualcomm.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit 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 > Signed-off-by: Jigarkumar Zala > Signed-off-by: Anusha Arun Nandi > --- > .../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 > + > +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 > + #include > + #include > + > + 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 = ; > + > + 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 = ; > + 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