diff mbox series

dt-bindings: PCI: qcom: Allow 'vddpe-3v3-supply' again

Message ID 20240723151328.684-1-johan+linaro@kernel.org
State New
Headers show
Series dt-bindings: PCI: qcom: Allow 'vddpe-3v3-supply' again | expand

Commit Message

Johan Hovold July 23, 2024, 3:13 p.m. UTC
Commit 756485bfbb85 ("dt-bindings: PCI: qcom,pcie-sc7280: Move SC7280 to
dedicated schema") incorrectly removed 'vddpe-3v3-supply' from the
bindings, which results in DT checker warnings like:

	arch/arm64/boot/dts/qcom/msm8996-sony-xperia-tone-dora.dtb: pcie@600000: Unevaluated properties are not allowed ('vddpe-3v3-supply' was unexpected)
        from schema $id: http://devicetree.org/schemas/pci/qcom,pcie.yaml#

Note that this property has been part of the Qualcomm PCIe bindings
since 2018 and would need to be deprecated rather than simply removed if
there is a desire to replace it with 'vpcie3v3' which is used for some
non-Qualcomm controllers.

Fixes: 756485bfbb85 ("dt-bindings: PCI: qcom,pcie-sc7280: Move SC7280 to dedicated schema")
Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
---
 Documentation/devicetree/bindings/pci/qcom,pcie-common.yaml   | 3 +++
 Documentation/devicetree/bindings/pci/qcom,pcie-sc7280.yaml   | 3 ---
 Documentation/devicetree/bindings/pci/qcom,pcie-sc8280xp.yaml | 3 ---
 Documentation/devicetree/bindings/pci/qcom,pcie.yaml          | 3 +++
 4 files changed, 6 insertions(+), 6 deletions(-)

Comments

Krzysztof Kozlowski July 24, 2024, 1:22 p.m. UTC | #1
On 23/07/2024 17:13, Johan Hovold wrote:
> Commit 756485bfbb85 ("dt-bindings: PCI: qcom,pcie-sc7280: Move SC7280 to
> dedicated schema") incorrectly removed 'vddpe-3v3-supply' from the
> bindings, which results in DT checker warnings like:
> 
> 	arch/arm64/boot/dts/qcom/msm8996-sony-xperia-tone-dora.dtb: pcie@600000: Unevaluated properties are not allowed ('vddpe-3v3-supply' was unexpected)
>         from schema $id: http://devicetree.org/schemas/pci/qcom,pcie.yaml#
> 
> Note that this property has been part of the Qualcomm PCIe bindings
> since 2018 and would need to be deprecated rather than simply removed if
> there is a desire to replace it with 'vpcie3v3' which is used for some
> non-Qualcomm controllers.
> 
> Fixes: 756485bfbb85 ("dt-bindings: PCI: qcom,pcie-sc7280: Move SC7280 to dedicated schema")
> Signed-off-by: Johan Hovold <johan+linaro@kernel.org>

Thanks. You could also mention in commit msg that Linux drivers for
msm8996, SM8[123456]50 and few others actually requested that supply. In
any case:

Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>

Best regards,
Krzysztof
Dmitry Baryshkov July 24, 2024, 5:22 p.m. UTC | #2
On Tue, Jul 23, 2024 at 05:13:28PM GMT, Johan Hovold wrote:
> Commit 756485bfbb85 ("dt-bindings: PCI: qcom,pcie-sc7280: Move SC7280 to
> dedicated schema") incorrectly removed 'vddpe-3v3-supply' from the
> bindings, which results in DT checker warnings like:
> 
> 	arch/arm64/boot/dts/qcom/msm8996-sony-xperia-tone-dora.dtb: pcie@600000: Unevaluated properties are not allowed ('vddpe-3v3-supply' was unexpected)
>         from schema $id: http://devicetree.org/schemas/pci/qcom,pcie.yaml#
> 
> Note that this property has been part of the Qualcomm PCIe bindings
> since 2018 and would need to be deprecated rather than simply removed if
> there is a desire to replace it with 'vpcie3v3' which is used for some
> non-Qualcomm controllers.

I think Rob Herring suggested [1] adding the property to the root port
node rather than the host. If that suggestion still applies it might be
better to enable the deprecated propertly only for the hosts, which
already used it, and to define a new property at the root port.

[1] https://lore.kernel.org/lkml/20240604235806.GA1903493-robh@kernel.org/

> 
> Fixes: 756485bfbb85 ("dt-bindings: PCI: qcom,pcie-sc7280: Move SC7280 to dedicated schema")
> Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
> ---
>  Documentation/devicetree/bindings/pci/qcom,pcie-common.yaml   | 3 +++
>  Documentation/devicetree/bindings/pci/qcom,pcie-sc7280.yaml   | 3 ---
>  Documentation/devicetree/bindings/pci/qcom,pcie-sc8280xp.yaml | 3 ---
>  Documentation/devicetree/bindings/pci/qcom,pcie.yaml          | 3 +++
>  4 files changed, 6 insertions(+), 6 deletions(-)
Johan Hovold July 25, 2024, 6:17 a.m. UTC | #3
On Wed, Jul 24, 2024 at 08:22:54PM +0300, Dmitry Baryshkov wrote:
> On Tue, Jul 23, 2024 at 05:13:28PM GMT, Johan Hovold wrote:
> > Commit 756485bfbb85 ("dt-bindings: PCI: qcom,pcie-sc7280: Move SC7280 to
> > dedicated schema") incorrectly removed 'vddpe-3v3-supply' from the
> > bindings, which results in DT checker warnings like:
> > 
> > 	arch/arm64/boot/dts/qcom/msm8996-sony-xperia-tone-dora.dtb: pcie@600000: Unevaluated properties are not allowed ('vddpe-3v3-supply' was unexpected)
> >         from schema $id: http://devicetree.org/schemas/pci/qcom,pcie.yaml#
> > 
> > Note that this property has been part of the Qualcomm PCIe bindings
> > since 2018 and would need to be deprecated rather than simply removed if
> > there is a desire to replace it with 'vpcie3v3' which is used for some
> > non-Qualcomm controllers.
> 
> I think Rob Herring suggested [1] adding the property to the root port
> node rather than the host. If that suggestion still applies it might be
> better to enable the deprecated propertly only for the hosts, which
> already used it, and to define a new property at the root port.

You seem to miss the point that this is just restoring status quo (and
that the property has not yet been deprecated).

I assume you've already read my reply to Rob's bot, but here it is for
reference for others:

Link: https://lore.kernel.org/lkml/Zp_LPixNnh-2Fy5N@hovoldconsulting.com/	

Johan
Dmitry Baryshkov July 25, 2024, 7:49 a.m. UTC | #4
On Thu, 25 Jul 2024 at 09:17, Johan Hovold <johan@kernel.org> wrote:
>
> On Wed, Jul 24, 2024 at 08:22:54PM +0300, Dmitry Baryshkov wrote:
> > On Tue, Jul 23, 2024 at 05:13:28PM GMT, Johan Hovold wrote:
> > > Commit 756485bfbb85 ("dt-bindings: PCI: qcom,pcie-sc7280: Move SC7280 to
> > > dedicated schema") incorrectly removed 'vddpe-3v3-supply' from the
> > > bindings, which results in DT checker warnings like:
> > >
> > >     arch/arm64/boot/dts/qcom/msm8996-sony-xperia-tone-dora.dtb: pcie@600000: Unevaluated properties are not allowed ('vddpe-3v3-supply' was unexpected)
> > >         from schema $id: http://devicetree.org/schemas/pci/qcom,pcie.yaml#
> > >
> > > Note that this property has been part of the Qualcomm PCIe bindings
> > > since 2018 and would need to be deprecated rather than simply removed if
> > > there is a desire to replace it with 'vpcie3v3' which is used for some
> > > non-Qualcomm controllers.
> >
> > I think Rob Herring suggested [1] adding the property to the root port
> > node rather than the host. If that suggestion still applies it might be
> > better to enable the deprecated propertly only for the hosts, which
> > already used it, and to define a new property at the root port.
>
> You seem to miss the point that this is just restoring status quo (and
> that the property has not yet been deprecated).

You are restoring it for all platforms. However in my opinion it's
better to follow Rob's suggestion and to add new property to the
device where it actually belongs, rather than hacking up the PCIe host
device. More importantly with the arrival of the power sequencing
subsystem we can handle powering up PCIe devices properly.

> I assume you've already read my reply to Rob's bot, but here it is for
> reference for others:
>
> Link: https://lore.kernel.org/lkml/Zp_LPixNnh-2Fy5N@hovoldconsulting.com/
>
> Johan
Johan Hovold July 25, 2024, 8:13 a.m. UTC | #5
On Thu, Jul 25, 2024 at 10:49:41AM +0300, Dmitry Baryshkov wrote:
> On Thu, 25 Jul 2024 at 09:17, Johan Hovold <johan@kernel.org> wrote:
> > On Wed, Jul 24, 2024 at 08:22:54PM +0300, Dmitry Baryshkov wrote:
> > > On Tue, Jul 23, 2024 at 05:13:28PM GMT, Johan Hovold wrote:

> > > > Note that this property has been part of the Qualcomm PCIe bindings
> > > > since 2018 and would need to be deprecated rather than simply removed if
> > > > there is a desire to replace it with 'vpcie3v3' which is used for some
> > > > non-Qualcomm controllers.
> > >
> > > I think Rob Herring suggested [1] adding the property to the root port
> > > node rather than the host. If that suggestion still applies it might be
> > > better to enable the deprecated propertly only for the hosts, which
> > > already used it, and to define a new property at the root port.
> >
> > You seem to miss the point that this is just restoring status quo (and
> > that the property has not yet been deprecated).
> 
> You are restoring it for all platforms.

It is already part of the bindings for all platforms.

Johan
Dmitry Baryshkov July 25, 2024, 8:57 a.m. UTC | #6
On Thu, Jul 25, 2024 at 10:13:07AM GMT, Johan Hovold wrote:
> On Thu, Jul 25, 2024 at 10:49:41AM +0300, Dmitry Baryshkov wrote:
> > On Thu, 25 Jul 2024 at 09:17, Johan Hovold <johan@kernel.org> wrote:
> > > On Wed, Jul 24, 2024 at 08:22:54PM +0300, Dmitry Baryshkov wrote:
> > > > On Tue, Jul 23, 2024 at 05:13:28PM GMT, Johan Hovold wrote:
> 
> > > > > Note that this property has been part of the Qualcomm PCIe bindings
> > > > > since 2018 and would need to be deprecated rather than simply removed if
> > > > > there is a desire to replace it with 'vpcie3v3' which is used for some
> > > > > non-Qualcomm controllers.
> > > >
> > > > I think Rob Herring suggested [1] adding the property to the root port
> > > > node rather than the host. If that suggestion still applies it might be
> > > > better to enable the deprecated propertly only for the hosts, which
> > > > already used it, and to define a new property at the root port.
> > >
> > > You seem to miss the point that this is just restoring status quo (and
> > > that the property has not yet been deprecated).
> > 
> > You are restoring it for all platforms.
> 
> It is already part of the bindings for all platforms.

It is not, it is enabled only for sc7280 and sc8280xp. It has been,
before the mentioned patch. I propopse to enable the property for the
platforms which are using it now (that is +x1e80100, msm8996 and
sdm845), clearly document it as deprecated and start shifting to the
pwrseq and having the power supplies being a part of the root port or
wcn device, depending on the use case.
Johan Hovold July 25, 2024, 9:05 a.m. UTC | #7
On Thu, Jul 25, 2024 at 11:57:39AM +0300, Dmitry Baryshkov wrote:
> On Thu, Jul 25, 2024 at 10:13:07AM GMT, Johan Hovold wrote:

> > It is already part of the bindings for all platforms.
> 
> It is not, it is enabled only for sc7280 and sc8280xp. 

No, that's both incorrect and irrelevant. It is used by msm8996 and
older platforms by in-kernel DTs as well. But the point is that is has
been part of the bindings an cannot simply be removed as there can be
out-of-tree DTs that are correctly using this property for any of these
platforms.

Johan
Dmitry Baryshkov July 25, 2024, 10:24 a.m. UTC | #8
On Thu, Jul 25, 2024 at 11:05:07AM GMT, Johan Hovold wrote:
> On Thu, Jul 25, 2024 at 11:57:39AM +0300, Dmitry Baryshkov wrote:
> > On Thu, Jul 25, 2024 at 10:13:07AM GMT, Johan Hovold wrote:
> 
> > > It is already part of the bindings for all platforms.
> > 
> > It is not, it is enabled only for sc7280 and sc8280xp. 
> 
> No, that's both incorrect and irrelevant. It is used by msm8996 and
> older platforms by in-kernel DTs as well. But the point is that is has
> been part of the bindings an cannot simply be removed as there can be
> out-of-tree DTs that are correctly using this property for any of these
> platforms.

It can not be removed from the driver, but it definitely can be remove
from bindings.
Johan Hovold July 25, 2024, 11:28 a.m. UTC | #9
On Thu, Jul 25, 2024 at 01:24:27PM +0300, Dmitry Baryshkov wrote:
> On Thu, Jul 25, 2024 at 11:05:07AM GMT, Johan Hovold wrote:
> > On Thu, Jul 25, 2024 at 11:57:39AM +0300, Dmitry Baryshkov wrote:
> > > On Thu, Jul 25, 2024 at 10:13:07AM GMT, Johan Hovold wrote:
> > 
> > > > It is already part of the bindings for all platforms.
> > > 
> > > It is not, it is enabled only for sc7280 and sc8280xp. 
> > 
> > No, that's both incorrect and irrelevant. It is used by msm8996 and
> > older platforms by in-kernel DTs as well. But the point is that is has
> > been part of the bindings an cannot simply be removed as there can be
> > out-of-tree DTs that are correctly using this property for any of these
> > platforms.
> 
> It can not be removed from the driver, but it definitely can be remove
> from bindings.

You apparently ignored the word "simply" in "cannot simply be removed".

Johan
Johan Hovold Aug. 22, 2024, 9:07 a.m. UTC | #10
On Tue, Jul 23, 2024 at 05:13:28PM +0200, Johan Hovold wrote:
> Commit 756485bfbb85 ("dt-bindings: PCI: qcom,pcie-sc7280: Move SC7280 to
> dedicated schema") incorrectly removed 'vddpe-3v3-supply' from the
> bindings, which results in DT checker warnings like:
> 
> 	arch/arm64/boot/dts/qcom/msm8996-sony-xperia-tone-dora.dtb: pcie@600000: Unevaluated properties are not allowed ('vddpe-3v3-supply' was unexpected)
>         from schema $id: http://devicetree.org/schemas/pci/qcom,pcie.yaml#
> 
> Note that this property has been part of the Qualcomm PCIe bindings
> since 2018 and would need to be deprecated rather than simply removed if
> there is a desire to replace it with 'vpcie3v3' which is used for some
> non-Qualcomm controllers.
> 
> Fixes: 756485bfbb85 ("dt-bindings: PCI: qcom,pcie-sc7280: Move SC7280 to dedicated schema")
> Signed-off-by: Johan Hovold <johan+linaro@kernel.org>

Can someone pick this one up for 6.11?

Johan
Manivannan Sadhasivam Aug. 22, 2024, 9:42 a.m. UTC | #11
On Tue, Jul 23, 2024 at 05:13:28PM +0200, Johan Hovold wrote:
> Commit 756485bfbb85 ("dt-bindings: PCI: qcom,pcie-sc7280: Move SC7280 to
> dedicated schema") incorrectly removed 'vddpe-3v3-supply' from the
> bindings, which results in DT checker warnings like:
> 
> 	arch/arm64/boot/dts/qcom/msm8996-sony-xperia-tone-dora.dtb: pcie@600000: Unevaluated properties are not allowed ('vddpe-3v3-supply' was unexpected)
>         from schema $id: http://devicetree.org/schemas/pci/qcom,pcie.yaml#
> 
> Note that this property has been part of the Qualcomm PCIe bindings
> since 2018 and would need to be deprecated rather than simply removed if
> there is a desire to replace it with 'vpcie3v3' which is used for some
> non-Qualcomm controllers.
> 
> Fixes: 756485bfbb85 ("dt-bindings: PCI: qcom,pcie-sc7280: Move SC7280 to dedicated schema")
> Signed-off-by: Johan Hovold <johan+linaro@kernel.org>

Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>

- Mani

> ---
>  Documentation/devicetree/bindings/pci/qcom,pcie-common.yaml   | 3 +++
>  Documentation/devicetree/bindings/pci/qcom,pcie-sc7280.yaml   | 3 ---
>  Documentation/devicetree/bindings/pci/qcom,pcie-sc8280xp.yaml | 3 ---
>  Documentation/devicetree/bindings/pci/qcom,pcie.yaml          | 3 +++
>  4 files changed, 6 insertions(+), 6 deletions(-)
> 
> diff --git a/Documentation/devicetree/bindings/pci/qcom,pcie-common.yaml b/Documentation/devicetree/bindings/pci/qcom,pcie-common.yaml
> index 0a39bbfcb28b..2b6f5a171f20 100644
> --- a/Documentation/devicetree/bindings/pci/qcom,pcie-common.yaml
> +++ b/Documentation/devicetree/bindings/pci/qcom,pcie-common.yaml
> @@ -78,6 +78,9 @@ properties:
>      description: GPIO controlled connection to WAKE# signal
>      maxItems: 1
>  
> +  vddpe-3v3-supply:
> +    description: PCIe endpoint power supply
> +
>  required:
>    - reg
>    - reg-names
> diff --git a/Documentation/devicetree/bindings/pci/qcom,pcie-sc7280.yaml b/Documentation/devicetree/bindings/pci/qcom,pcie-sc7280.yaml
> index 634da24ec3ed..7ed46a929d73 100644
> --- a/Documentation/devicetree/bindings/pci/qcom,pcie-sc7280.yaml
> +++ b/Documentation/devicetree/bindings/pci/qcom,pcie-sc7280.yaml
> @@ -66,9 +66,6 @@ properties:
>      items:
>        - const: pci
>  
> -  vddpe-3v3-supply:
> -    description: PCIe endpoint power supply
> -
>  allOf:
>    - $ref: qcom,pcie-common.yaml#
>  
> diff --git a/Documentation/devicetree/bindings/pci/qcom,pcie-sc8280xp.yaml b/Documentation/devicetree/bindings/pci/qcom,pcie-sc8280xp.yaml
> index 25c9f13ae977..15ba2385eb73 100644
> --- a/Documentation/devicetree/bindings/pci/qcom,pcie-sc8280xp.yaml
> +++ b/Documentation/devicetree/bindings/pci/qcom,pcie-sc8280xp.yaml
> @@ -58,9 +58,6 @@ properties:
>      items:
>        - const: pci
>  
> -  vddpe-3v3-supply:
> -    description: A phandle to the PCIe endpoint power supply
> -
>  required:
>    - interconnects
>    - interconnect-names
> diff --git a/Documentation/devicetree/bindings/pci/qcom,pcie.yaml b/Documentation/devicetree/bindings/pci/qcom,pcie.yaml
> index f867746b1ae5..ffabbac57fc1 100644
> --- a/Documentation/devicetree/bindings/pci/qcom,pcie.yaml
> +++ b/Documentation/devicetree/bindings/pci/qcom,pcie.yaml
> @@ -91,6 +91,9 @@ properties:
>    vdda_refclk-supply:
>      description: A phandle to the core analog power supply for IC which generates reference clock
>  
> +  vddpe-3v3-supply:
> +    description: A phandle to the PCIe endpoint power supply
> +
>    phys:
>      maxItems: 1
>  
> -- 
> 2.44.2
>
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/pci/qcom,pcie-common.yaml b/Documentation/devicetree/bindings/pci/qcom,pcie-common.yaml
index 0a39bbfcb28b..2b6f5a171f20 100644
--- a/Documentation/devicetree/bindings/pci/qcom,pcie-common.yaml
+++ b/Documentation/devicetree/bindings/pci/qcom,pcie-common.yaml
@@ -78,6 +78,9 @@  properties:
     description: GPIO controlled connection to WAKE# signal
     maxItems: 1
 
+  vddpe-3v3-supply:
+    description: PCIe endpoint power supply
+
 required:
   - reg
   - reg-names
diff --git a/Documentation/devicetree/bindings/pci/qcom,pcie-sc7280.yaml b/Documentation/devicetree/bindings/pci/qcom,pcie-sc7280.yaml
index 634da24ec3ed..7ed46a929d73 100644
--- a/Documentation/devicetree/bindings/pci/qcom,pcie-sc7280.yaml
+++ b/Documentation/devicetree/bindings/pci/qcom,pcie-sc7280.yaml
@@ -66,9 +66,6 @@  properties:
     items:
       - const: pci
 
-  vddpe-3v3-supply:
-    description: PCIe endpoint power supply
-
 allOf:
   - $ref: qcom,pcie-common.yaml#
 
diff --git a/Documentation/devicetree/bindings/pci/qcom,pcie-sc8280xp.yaml b/Documentation/devicetree/bindings/pci/qcom,pcie-sc8280xp.yaml
index 25c9f13ae977..15ba2385eb73 100644
--- a/Documentation/devicetree/bindings/pci/qcom,pcie-sc8280xp.yaml
+++ b/Documentation/devicetree/bindings/pci/qcom,pcie-sc8280xp.yaml
@@ -58,9 +58,6 @@  properties:
     items:
       - const: pci
 
-  vddpe-3v3-supply:
-    description: A phandle to the PCIe endpoint power supply
-
 required:
   - interconnects
   - interconnect-names
diff --git a/Documentation/devicetree/bindings/pci/qcom,pcie.yaml b/Documentation/devicetree/bindings/pci/qcom,pcie.yaml
index f867746b1ae5..ffabbac57fc1 100644
--- a/Documentation/devicetree/bindings/pci/qcom,pcie.yaml
+++ b/Documentation/devicetree/bindings/pci/qcom,pcie.yaml
@@ -91,6 +91,9 @@  properties:
   vdda_refclk-supply:
     description: A phandle to the core analog power supply for IC which generates reference clock
 
+  vddpe-3v3-supply:
+    description: A phandle to the PCIe endpoint power supply
+
   phys:
     maxItems: 1