* [PATCH v3 0/2] media: qcom: camss: x1e80100: Add support for individual CSIPHY supplies
@ 2025-04-26 22:52 Bryan O'Donoghue
2025-04-26 22:52 ` [PATCH v3 1/2] dt-bindings: media: qcom,x1e80100-camss: Fixup csiphy supply names Bryan O'Donoghue
2025-04-26 22:52 ` [PATCH v3 2/2] media: qcom: camss: x1e80100: Fixup x1e " Bryan O'Donoghue
0 siblings, 2 replies; 5+ messages in thread
From: Bryan O'Donoghue @ 2025-04-26 22:52 UTC (permalink / raw)
To: Robert Foss, Todor Tomov, Mauro Carvalho Chehab, Rob Herring,
Krzysztof Kozlowski, Conor Dooley
Cc: dmitry.baryshkov, loic.poulain, vladimir.zapolskiy, krzk,
linux-arm-msm, linux-media, devicetree, linux-kernel,
Bryan O'Donoghue
v3:
- Changes commit log of patch #2 to reflect no ABI breakage - Dmitry
- Link to v2: https://lore.kernel.org/r/20250425-b4-media-committers-25-04-25-camss-supplies-v2-0-8c12450b2934@linaro.org
v2:
- Fixes an indentation error I missed in v1 - Rob's robot
- Link to v1: https://lore.kernel.org/r/20250425-b4-media-committers-25-04-25-camss-supplies-v1-0-2a3dd3a47a6a@linaro.org
v1:
In x1e each CSIPHY has its own 0p8 and 1p2 voltage rail. These voltage
rails in previous SoCs were shared between PHYs, over time the hardware
differentiated out the rails per PHY but CAMSS didn't keep-up with or know
about that change.
We have two options to support individual rails per PHY.
- Logical naming of the supply lines
In this case supply names describe the PHY and its expected voltage input
For example vdd-csiphy0-0p8-supply for the 0v8 voltage rail to CSIPHY 0.
- Pin naming of the supply lines
In this case supply names will align to the name of the SoC pin.
For example on x1e the supply name would be vdd vdd-a-csi-0-1-1p2.
This series chooses the first approach for the following reasons:
- Naming coherency across SoCs and PCBs.
Virtually every CSIPHY has 0p8 and 1p2 voltage rails and these are akin
to an architectural feature of these PHYs or at the very least a common
pattern across SoCs.
This means that the pin name on x1e might be VDD_A_CSI_0_1_1P2 and on
qcm2290 VDD_A_CSI_0_1P2 but the yaml standard will be for the regulator
name to be vdd-csiphy0-1p2-supply.
- Accounting for upstreamers who don't have schematic or qcom IP access
Not everybody making upstream submissions has access to schematics or to
Qualcomm's SoC-level pin definitions instead working from
vendor/downstream DT information.
It should still be possible to construct a valid upstream definition from
that downstream DT.
- The counter arugment.
The counter argument is that aligning the pin-names to the regulator
names is less error prone and I agree with that statement.
What I'd say here is - the requirement for CAMSS regulator defintions
in DT at least from my perspective is a putative upstreamer should
be able to show how they have tested a given DT submission.
If that submission isn't tested, it isn't working and should be rejected.
That should then address the concern of having as another example:
vdd-csiphy0-0p8-supply = <&vreg_oops_wrong_regulator>;
I'm promulgating this series in the context of x1e but it should also
unblock qcm2290 and sm8650.
Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
---
Bryan O'Donoghue (2):
dt-bindings: media: qcom,x1e80100-camss: Fixup csiphy supply names
media: qcom: camss: x1e80100: Fixup x1e csiphy supply names
.../bindings/media/qcom,x1e80100-camss.yaml | 52 +++++++++++++++++-----
drivers/media/platform/qcom/camss/camss.c | 16 +++----
2 files changed, 48 insertions(+), 20 deletions(-)
---
base-commit: 1d1e564fce1bc361af1a1980a7f915a0475a008a
change-id: 20250425-b4-media-committers-25-04-25-camss-supplies-6285c5006da2
Best regards,
--
Bryan O'Donoghue <bryan.odonoghue@linaro.org>
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH v3 1/2] dt-bindings: media: qcom,x1e80100-camss: Fixup csiphy supply names
2025-04-26 22:52 [PATCH v3 0/2] media: qcom: camss: x1e80100: Add support for individual CSIPHY supplies Bryan O'Donoghue
@ 2025-04-26 22:52 ` Bryan O'Donoghue
2025-04-28 7:14 ` Krzysztof Kozlowski
2025-04-26 22:52 ` [PATCH v3 2/2] media: qcom: camss: x1e80100: Fixup x1e " Bryan O'Donoghue
1 sibling, 1 reply; 5+ messages in thread
From: Bryan O'Donoghue @ 2025-04-26 22:52 UTC (permalink / raw)
To: Robert Foss, Todor Tomov, Mauro Carvalho Chehab, Rob Herring,
Krzysztof Kozlowski, Conor Dooley
Cc: dmitry.baryshkov, loic.poulain, vladimir.zapolskiy, krzk,
linux-arm-msm, linux-media, devicetree, linux-kernel,
Bryan O'Donoghue
Declare a CSIPHY regulator pair 0p8 and 1p2 for each CSIPHY.
Name the inputs based on the voltage so as to have a consistent naming of
these rails across SoCs and PCBs.
There are no upstream users of this yaml definition yet so this change is
safe to make.
Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
---
.../bindings/media/qcom,x1e80100-camss.yaml | 52 +++++++++++++++++-----
1 file changed, 40 insertions(+), 12 deletions(-)
diff --git a/Documentation/devicetree/bindings/media/qcom,x1e80100-camss.yaml b/Documentation/devicetree/bindings/media/qcom,x1e80100-camss.yaml
index 113565cf2a991a8dcbc20889090e177e8bcadaac..dc7c1a9394c3b547f5e0885bf501ed42dfbeba88 100644
--- a/Documentation/devicetree/bindings/media/qcom,x1e80100-camss.yaml
+++ b/Documentation/devicetree/bindings/media/qcom,x1e80100-camss.yaml
@@ -118,14 +118,6 @@ properties:
- const: ife1
- const: top
- vdd-csiphy-0p8-supply:
- description:
- Phandle to a 0.8V regulator supply to a PHY.
-
- vdd-csiphy-1p2-supply:
- description:
- Phandle to 1.8V regulator supply to a PHY.
-
ports:
$ref: /schemas/graph.yaml#/properties/ports
@@ -157,6 +149,30 @@ properties:
- clock-lanes
- data-lanes
+ vdd-csiphy0-0p8-supply:
+ description: Phandle to a 0.8V regulator supply to csiphy0.
+
+ vdd-csiphy0-1p2-supply:
+ description: Phandle to a 1.2V regulator supply to csiphy0.
+
+ vdd-csiphy1-0p8-supply:
+ description: Phandle to a 0.8V regulator supply to csiphy1.
+
+ vdd-csiphy1-1p2-supply:
+ description: Phandle to a 1.2V regulator supply to csiphy1.
+
+ vdd-csiphy2-0p8-supply:
+ description: Phandle to a 0.8V regulator supply to csiphy2.
+
+ vdd-csiphy2-1p2-supply:
+ description: Phandle to a 1.2V regulator supply to csiphy2.
+
+ vdd-csiphy4-0p8-supply:
+ description: Phandle to a 0.8V regulator supply to csiphy4.
+
+ vdd-csiphy4-1p2-supply:
+ description: Phandle to a 1.2V regulator supply to csiphy4.
+
required:
- compatible
- reg
@@ -170,10 +186,22 @@ required:
- iommus
- power-domains
- power-domain-names
- - vdd-csiphy-0p8-supply
- - vdd-csiphy-1p2-supply
- ports
+anyOf:
+ - required:
+ - vdd-csiphy0-0p8-supply
+ - vdd-csiphy0-1p2-supply
+ - required:
+ - vdd-csiphy1-0p8-supply
+ - vdd-csiphy1-1p2-supply
+ - required:
+ - vdd-csiphy2-0p8-supply
+ - vdd-csiphy2-1p2-supply
+ - required:
+ - vdd-csiphy4-0p8-supply
+ - vdd-csiphy4-1p2-supply
+
additionalProperties: false
examples:
@@ -347,8 +375,8 @@ examples:
"ife1",
"top";
- vdd-csiphy-0p8-supply = <&csiphy_0p8_supply>;
- vdd-csiphy-1p2-supply = <&csiphy_1p2_supply>;
+ vdd-csiphy0-0p8-supply = <&csiphy_0p8_supply>;
+ vdd-csiphy0-1p2-supply = <&csiphy_1p2_supply>;
ports {
#address-cells = <1>;
--
2.49.0
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH v3 2/2] media: qcom: camss: x1e80100: Fixup x1e csiphy supply names
2025-04-26 22:52 [PATCH v3 0/2] media: qcom: camss: x1e80100: Add support for individual CSIPHY supplies Bryan O'Donoghue
2025-04-26 22:52 ` [PATCH v3 1/2] dt-bindings: media: qcom,x1e80100-camss: Fixup csiphy supply names Bryan O'Donoghue
@ 2025-04-26 22:52 ` Bryan O'Donoghue
1 sibling, 0 replies; 5+ messages in thread
From: Bryan O'Donoghue @ 2025-04-26 22:52 UTC (permalink / raw)
To: Robert Foss, Todor Tomov, Mauro Carvalho Chehab, Rob Herring,
Krzysztof Kozlowski, Conor Dooley
Cc: dmitry.baryshkov, loic.poulain, vladimir.zapolskiy, krzk,
linux-arm-msm, linux-media, devicetree, linux-kernel,
Bryan O'Donoghue
Amend the names of the csiphy supplies to be specific to each CSIPHY thus
allowing for the case where PHYs have individual or shared rails.
Dropping the extraneous "-supply" postfix is not an ABI break as there is
no upstream dependency on this.
Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
---
drivers/media/platform/qcom/camss/camss.c | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/drivers/media/platform/qcom/camss/camss.c b/drivers/media/platform/qcom/camss/camss.c
index 06f42875702f02f9d8d83d06ddaa972eacb593f8..d63bc7dc951690132e07ee0fb8df7cef9b66927d 100644
--- a/drivers/media/platform/qcom/camss/camss.c
+++ b/drivers/media/platform/qcom/camss/camss.c
@@ -2486,8 +2486,8 @@ static const struct resources_icc icc_res_sm8550[] = {
static const struct camss_subdev_resources csiphy_res_x1e80100[] = {
/* CSIPHY0 */
{
- .regulators = { "vdd-csiphy-0p8-supply",
- "vdd-csiphy-1p2-supply" },
+ .regulators = { "vdd-csiphy0-0p8",
+ "vdd-csiphy0-1p2" },
.clock = { "csiphy0", "csiphy0_timer" },
.clock_rate = { { 300000000, 400000000, 480000000 },
{ 266666667, 400000000 } },
@@ -2501,8 +2501,8 @@ static const struct camss_subdev_resources csiphy_res_x1e80100[] = {
},
/* CSIPHY1 */
{
- .regulators = { "vdd-csiphy-0p8-supply",
- "vdd-csiphy-1p2-supply" },
+ .regulators = { "vdd-csiphy1-0p8",
+ "vdd-csiphy1-1p2" },
.clock = { "csiphy1", "csiphy1_timer" },
.clock_rate = { { 300000000, 400000000, 480000000 },
{ 266666667, 400000000 } },
@@ -2516,8 +2516,8 @@ static const struct camss_subdev_resources csiphy_res_x1e80100[] = {
},
/* CSIPHY2 */
{
- .regulators = { "vdd-csiphy-0p8-supply",
- "vdd-csiphy-1p2-supply" },
+ .regulators = { "vdd-csiphy2-0p8",
+ "vdd-csiphy2-1p2" },
.clock = { "csiphy2", "csiphy2_timer" },
.clock_rate = { { 300000000, 400000000, 480000000 },
{ 266666667, 400000000 } },
@@ -2531,8 +2531,8 @@ static const struct camss_subdev_resources csiphy_res_x1e80100[] = {
},
/* CSIPHY4 */
{
- .regulators = { "vdd-csiphy-0p8-supply",
- "vdd-csiphy-1p2-supply" },
+ .regulators = { "vdd-csiphy4-0p8",
+ "vdd-csiphy4-1p2" },
.clock = { "csiphy4", "csiphy4_timer" },
.clock_rate = { { 300000000, 400000000, 480000000 },
{ 266666667, 400000000 } },
--
2.49.0
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v3 1/2] dt-bindings: media: qcom,x1e80100-camss: Fixup csiphy supply names
2025-04-26 22:52 ` [PATCH v3 1/2] dt-bindings: media: qcom,x1e80100-camss: Fixup csiphy supply names Bryan O'Donoghue
@ 2025-04-28 7:14 ` Krzysztof Kozlowski
2025-04-28 12:26 ` Bryan O'Donoghue
0 siblings, 1 reply; 5+ messages in thread
From: Krzysztof Kozlowski @ 2025-04-28 7:14 UTC (permalink / raw)
To: Bryan O'Donoghue
Cc: Robert Foss, Todor Tomov, Mauro Carvalho Chehab, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, dmitry.baryshkov,
loic.poulain, vladimir.zapolskiy, linux-arm-msm, linux-media,
devicetree, linux-kernel
On Sat, Apr 26, 2025 at 11:52:48PM GMT, Bryan O'Donoghue wrote:
> Declare a CSIPHY regulator pair 0p8 and 1p2 for each CSIPHY.
>
> Name the inputs based on the voltage so as to have a consistent naming of
> these rails across SoCs and PCBs.
>
> There are no upstream users of this yaml definition yet so this change is
> safe to make.
>
> Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
> ---
> .../bindings/media/qcom,x1e80100-camss.yaml | 52 +++++++++++++++++-----
> 1 file changed, 40 insertions(+), 12 deletions(-)
>
> diff --git a/Documentation/devicetree/bindings/media/qcom,x1e80100-camss.yaml b/Documentation/devicetree/bindings/media/qcom,x1e80100-camss.yaml
> index 113565cf2a991a8dcbc20889090e177e8bcadaac..dc7c1a9394c3b547f5e0885bf501ed42dfbeba88 100644
> --- a/Documentation/devicetree/bindings/media/qcom,x1e80100-camss.yaml
> +++ b/Documentation/devicetree/bindings/media/qcom,x1e80100-camss.yaml
> @@ -118,14 +118,6 @@ properties:
> - const: ife1
> - const: top
>
> - vdd-csiphy-0p8-supply:
> - description:
> - Phandle to a 0.8V regulator supply to a PHY.
> -
> - vdd-csiphy-1p2-supply:
> - description:
> - Phandle to 1.8V regulator supply to a PHY.
> -
> ports:
> $ref: /schemas/graph.yaml#/properties/ports
>
> @@ -157,6 +149,30 @@ properties:
> - clock-lanes
> - data-lanes
>
> + vdd-csiphy0-0p8-supply:
> + description: Phandle to a 0.8V regulator supply to csiphy0.
> +
> + vdd-csiphy0-1p2-supply:
> + description: Phandle to a 1.2V regulator supply to csiphy0.
Block has VDD_A_CSI_0_1_1P2 input, not separate one for CSI0 and CS1.
I don't get what is the benefit of this and commit msg does not help me
to understand such choice.
On IRC I clarified you could have less supplies in the binding than
number of actual pins, to make things simpler and more consistent, but
you did here reverse: more supplies which do not exist.
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v3 1/2] dt-bindings: media: qcom,x1e80100-camss: Fixup csiphy supply names
2025-04-28 7:14 ` Krzysztof Kozlowski
@ 2025-04-28 12:26 ` Bryan O'Donoghue
0 siblings, 0 replies; 5+ messages in thread
From: Bryan O'Donoghue @ 2025-04-28 12:26 UTC (permalink / raw)
To: Krzysztof Kozlowski
Cc: Robert Foss, Todor Tomov, Mauro Carvalho Chehab, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, dmitry.baryshkov,
loic.poulain, vladimir.zapolskiy, linux-arm-msm, linux-media,
devicetree, linux-kernel
On 28/04/2025 08:14, Krzysztof Kozlowski wrote:
> Block has VDD_A_CSI_0_1_1P2 input, not separate one for CSI0 and CS1.
> I don't get what is the benefit of this and commit msg does not help me
> to understand such choice.
>
> On IRC I clarified you could have less supplies in the binding than
> number of actual pins, to make things simpler and more consistent, but
> you did here reverse: more supplies which do not exist.
So the idea here is to make a consistent
- csiphy#-voltage-XpY
Which means that each PHY will have voltage rail names like
vdd-csiphy0-0p8
vdd-csiphy0-1p2
vdd-csiphy0-1p8
Irrespective of the SoC pin name.
The motivation for that is to have the names be consistent across SoCs
which is I believe what we have discussed should be the case.
That means that each phy will have its own named set of voltage rails,
consistently named across SoCs even if the pin-name is shared by the
PHYs on the SoC pinout.
Is that not the namespace consistency you've been looking for ?
---
bod
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2025-04-28 12:26 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-04-26 22:52 [PATCH v3 0/2] media: qcom: camss: x1e80100: Add support for individual CSIPHY supplies Bryan O'Donoghue
2025-04-26 22:52 ` [PATCH v3 1/2] dt-bindings: media: qcom,x1e80100-camss: Fixup csiphy supply names Bryan O'Donoghue
2025-04-28 7:14 ` Krzysztof Kozlowski
2025-04-28 12:26 ` Bryan O'Donoghue
2025-04-26 22:52 ` [PATCH v3 2/2] media: qcom: camss: x1e80100: Fixup x1e " Bryan O'Donoghue
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®