All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 00/43] phy: qcom,qmp: fix dt-bindings and deprecate lane suffix
@ 2022-07-05  9:41 ` Johan Hovold
  0 siblings, 0 replies; 178+ messages in thread
From: Johan Hovold @ 2022-07-05  9:41 UTC (permalink / raw)
  To: Vinod Koul, Rob Herring, Krzysztof Kozlowski
  Cc: Andy Gross, Bjorn Andersson, Kishon Vijay Abraham I,
	linux-arm-msm, linux-phy, devicetree, linux-kernel, Johan Hovold

When adding support for SC8280XP to the QMP PHY driver I noticed that
the PHY provider child node was not described by the current DT schema.

The SC8280XP PHYs also need a second fixed-divider PIPE clock
("pipediv2") and I didn't want to have to add a bogus "lane" suffix to
the clock name just to match the current "pipe0" name so I decided to
deprecate the unnecessary suffix in the current binding instead.

To be able to add the missing child-node schema and handle device
specifics like additional PIPE clocks, it quickly became obvious that
the binding needs to be split up.

This series fixes some issue with the current schema before splitting
it up in separate schemas for PCIe, UFS and USB, which are then cleaned
up further before adding missing parts like the child PHY provider
nodes and examples.

The MSM8996 PCIe PHY gets its own schema as this is the only non-combo
PHY that actually provides more than one PHY per IP block. Note that the
"lane" suffix is still unnecessary and misleading.

The final patches adds support for the new resource names to the
(recently split up) PHY drivers. Included is also a related combo PHY
cleanup.

I'll post a separate series with related DTS fixes caught while
developing this series.

Johan


Johan Hovold (43):
  dt-bindings: phy: qcom,qmp: fix bogus clock-cells property
  dt-bindings: phy: qcom,qmp: sort compatible strings
  dt-bindings: phy: qcom,qmp: clean up descriptions
  dt-bindings: phy: qcom,qmp: clean up example
  dt-bindings: phy: qcom,qmp: drop child-node comment
  dt-bindings: phy: qcom,qmp: split out msm8996-qmp-pcie-phy
  dt-bindings: phy: qcom,msm8996-qmp-pcie: clean up constraints
  dt-bindings: phy: qcom,msm8996-qmp-pcie: add missing child node schema
  dt-bindings: phy: qcom,msm8996-qmp-pcie: add example node
  dt-bindings: phy: qcom,msm8996-qmp-pcie: deprecate PIPE clock names
  dt-bindings: phy: qcom,msm8996-qmp-pcie: deprecate reset names
  dt-bindings: phy: qcom,qmp: split out PCIe PHY binding
  dt-bindings: phy: qcom,qmp-pcie: clean up register constraints
  dt-bindings: phy: qcom,qmp-pcie: clean up clock constraints
  dt-bindings: phy: qcom,qmp-pcie: clean up reset constraints
  dt-bindings: phy: qcom,qmp-pcie: drop unused vddp-ref-clk supply
  dt-bindings: phy: qcom,qmp-pcie: add missing child node schema
  dt-bindings: phy: qcom,qmp-pcie: add example node
  dt-bindings: phy: qcom,qmp-pcie: deprecate PIPE clock name
  dt-bindings: phy: qcom,qmp: split out UFS PHY binding
  dt-bindings: phy: qcom,qmp-ufs: clean up supplies
  dt-bindings: phy: qcom,qmp-ufs: clean up reset providers
  dt-bindings: phy: qcom,qmp-ufs: clean up clock constraints
  dt-bindings: phy: qcom,qmp-ufs: clean up register constraints
  dt-bindings: phy: qcom,qmp-ufs: add missing SM8450 clock
  dt-bindings: phy: qcom,qmp-ufs: add missing SM8150 power domain
  dt-bindings: phy: qcom,qmp-ufs: add missing child node schema
  dt-bindings: phy: qcom,qmp-ufs: add example node
  dt-bindings: phy: qcom,qmp: split out USB binding
  dt-bindings: phy: qcom,qmp-usb: clean up clock constraints
  dt-bindings: phy: qcom,qmp-usb: clean up supplies
  dt-bindings: phy: qcom,qmp-usb: drop unused vddp-ref-clk supply
  dt-bindings: phy: qcom,qmp-usb: clean up reset providers
  dt-bindings: phy: qcom,qmp-usb: add missing child node schema
  dt-bindings: phy: qcom,qmp-usb: deprecate PIPE clock name
  dt-bindings: phy: qcom,qmp-usb3-dp: fix bogus clock-cells property
  dt-bindings: phy: qcom,qmp-usb3-dp: deprecate USB PIPE clock name
  phy: qcom-qmp-pcie: drop pipe clock lane suffix
  phy: qcom-qmp-combo: drop unused lane reset
  phy: qcom-qmp-combo: drop pipe clock lane suffix
  phy: qcom-qmp-pcie-msm8996: drop pipe clock lane suffix
  phy: qcom-qmp-pcie-msm8996: drop reset lane suffix
  phy: qcom-qmp-usb: drop pipe clock lane suffix

 .../phy/qcom,msm8996-qmp-pcie-phy.yaml        | 212 ++++++++
 .../bindings/phy/qcom,qmp-pcie-phy.yaml       | 309 +++++++++++
 .../devicetree/bindings/phy/qcom,qmp-phy.yaml | 500 ------------------
 .../bindings/phy/qcom,qmp-ufs-phy.yaml        | 249 +++++++++
 .../bindings/phy/qcom,qmp-usb-phy.yaml        | 417 +++++++++++++++
 .../bindings/phy/qcom,qmp-usb3-dp-phy.yaml    |  15 +-
 drivers/phy/qualcomm/phy-qcom-qmp-combo.c     |  10 +-
 .../phy/qualcomm/phy-qcom-qmp-pcie-msm8996.c  |  17 +-
 drivers/phy/qualcomm/phy-qcom-qmp-pcie.c      |   8 +-
 drivers/phy/qualcomm/phy-qcom-qmp-usb.c       |   8 +-
 10 files changed, 1224 insertions(+), 521 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/phy/qcom,msm8996-qmp-pcie-phy.yaml
 create mode 100644 Documentation/devicetree/bindings/phy/qcom,qmp-pcie-phy.yaml
 delete mode 100644 Documentation/devicetree/bindings/phy/qcom,qmp-phy.yaml
 create mode 100644 Documentation/devicetree/bindings/phy/qcom,qmp-ufs-phy.yaml
 create mode 100644 Documentation/devicetree/bindings/phy/qcom,qmp-usb-phy.yaml

-- 
2.35.1


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

* [PATCH 00/43] phy: qcom,qmp: fix dt-bindings and deprecate lane suffix
@ 2022-07-05  9:41 ` Johan Hovold
  0 siblings, 0 replies; 178+ messages in thread
From: Johan Hovold @ 2022-07-05  9:41 UTC (permalink / raw)
  To: Vinod Koul, Rob Herring, Krzysztof Kozlowski
  Cc: Andy Gross, Bjorn Andersson, Kishon Vijay Abraham I,
	linux-arm-msm, linux-phy, devicetree, linux-kernel, Johan Hovold

When adding support for SC8280XP to the QMP PHY driver I noticed that
the PHY provider child node was not described by the current DT schema.

The SC8280XP PHYs also need a second fixed-divider PIPE clock
("pipediv2") and I didn't want to have to add a bogus "lane" suffix to
the clock name just to match the current "pipe0" name so I decided to
deprecate the unnecessary suffix in the current binding instead.

To be able to add the missing child-node schema and handle device
specifics like additional PIPE clocks, it quickly became obvious that
the binding needs to be split up.

This series fixes some issue with the current schema before splitting
it up in separate schemas for PCIe, UFS and USB, which are then cleaned
up further before adding missing parts like the child PHY provider
nodes and examples.

The MSM8996 PCIe PHY gets its own schema as this is the only non-combo
PHY that actually provides more than one PHY per IP block. Note that the
"lane" suffix is still unnecessary and misleading.

The final patches adds support for the new resource names to the
(recently split up) PHY drivers. Included is also a related combo PHY
cleanup.

I'll post a separate series with related DTS fixes caught while
developing this series.

Johan


Johan Hovold (43):
  dt-bindings: phy: qcom,qmp: fix bogus clock-cells property
  dt-bindings: phy: qcom,qmp: sort compatible strings
  dt-bindings: phy: qcom,qmp: clean up descriptions
  dt-bindings: phy: qcom,qmp: clean up example
  dt-bindings: phy: qcom,qmp: drop child-node comment
  dt-bindings: phy: qcom,qmp: split out msm8996-qmp-pcie-phy
  dt-bindings: phy: qcom,msm8996-qmp-pcie: clean up constraints
  dt-bindings: phy: qcom,msm8996-qmp-pcie: add missing child node schema
  dt-bindings: phy: qcom,msm8996-qmp-pcie: add example node
  dt-bindings: phy: qcom,msm8996-qmp-pcie: deprecate PIPE clock names
  dt-bindings: phy: qcom,msm8996-qmp-pcie: deprecate reset names
  dt-bindings: phy: qcom,qmp: split out PCIe PHY binding
  dt-bindings: phy: qcom,qmp-pcie: clean up register constraints
  dt-bindings: phy: qcom,qmp-pcie: clean up clock constraints
  dt-bindings: phy: qcom,qmp-pcie: clean up reset constraints
  dt-bindings: phy: qcom,qmp-pcie: drop unused vddp-ref-clk supply
  dt-bindings: phy: qcom,qmp-pcie: add missing child node schema
  dt-bindings: phy: qcom,qmp-pcie: add example node
  dt-bindings: phy: qcom,qmp-pcie: deprecate PIPE clock name
  dt-bindings: phy: qcom,qmp: split out UFS PHY binding
  dt-bindings: phy: qcom,qmp-ufs: clean up supplies
  dt-bindings: phy: qcom,qmp-ufs: clean up reset providers
  dt-bindings: phy: qcom,qmp-ufs: clean up clock constraints
  dt-bindings: phy: qcom,qmp-ufs: clean up register constraints
  dt-bindings: phy: qcom,qmp-ufs: add missing SM8450 clock
  dt-bindings: phy: qcom,qmp-ufs: add missing SM8150 power domain
  dt-bindings: phy: qcom,qmp-ufs: add missing child node schema
  dt-bindings: phy: qcom,qmp-ufs: add example node
  dt-bindings: phy: qcom,qmp: split out USB binding
  dt-bindings: phy: qcom,qmp-usb: clean up clock constraints
  dt-bindings: phy: qcom,qmp-usb: clean up supplies
  dt-bindings: phy: qcom,qmp-usb: drop unused vddp-ref-clk supply
  dt-bindings: phy: qcom,qmp-usb: clean up reset providers
  dt-bindings: phy: qcom,qmp-usb: add missing child node schema
  dt-bindings: phy: qcom,qmp-usb: deprecate PIPE clock name
  dt-bindings: phy: qcom,qmp-usb3-dp: fix bogus clock-cells property
  dt-bindings: phy: qcom,qmp-usb3-dp: deprecate USB PIPE clock name
  phy: qcom-qmp-pcie: drop pipe clock lane suffix
  phy: qcom-qmp-combo: drop unused lane reset
  phy: qcom-qmp-combo: drop pipe clock lane suffix
  phy: qcom-qmp-pcie-msm8996: drop pipe clock lane suffix
  phy: qcom-qmp-pcie-msm8996: drop reset lane suffix
  phy: qcom-qmp-usb: drop pipe clock lane suffix

 .../phy/qcom,msm8996-qmp-pcie-phy.yaml        | 212 ++++++++
 .../bindings/phy/qcom,qmp-pcie-phy.yaml       | 309 +++++++++++
 .../devicetree/bindings/phy/qcom,qmp-phy.yaml | 500 ------------------
 .../bindings/phy/qcom,qmp-ufs-phy.yaml        | 249 +++++++++
 .../bindings/phy/qcom,qmp-usb-phy.yaml        | 417 +++++++++++++++
 .../bindings/phy/qcom,qmp-usb3-dp-phy.yaml    |  15 +-
 drivers/phy/qualcomm/phy-qcom-qmp-combo.c     |  10 +-
 .../phy/qualcomm/phy-qcom-qmp-pcie-msm8996.c  |  17 +-
 drivers/phy/qualcomm/phy-qcom-qmp-pcie.c      |   8 +-
 drivers/phy/qualcomm/phy-qcom-qmp-usb.c       |   8 +-
 10 files changed, 1224 insertions(+), 521 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/phy/qcom,msm8996-qmp-pcie-phy.yaml
 create mode 100644 Documentation/devicetree/bindings/phy/qcom,qmp-pcie-phy.yaml
 delete mode 100644 Documentation/devicetree/bindings/phy/qcom,qmp-phy.yaml
 create mode 100644 Documentation/devicetree/bindings/phy/qcom,qmp-ufs-phy.yaml
 create mode 100644 Documentation/devicetree/bindings/phy/qcom,qmp-usb-phy.yaml

-- 
2.35.1


-- 
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy

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

* [PATCH 01/43] dt-bindings: phy: qcom,qmp: fix bogus clock-cells property
  2022-07-05  9:41 ` Johan Hovold
@ 2022-07-05  9:41   ` Johan Hovold
  -1 siblings, 0 replies; 178+ messages in thread
From: Johan Hovold @ 2022-07-05  9:41 UTC (permalink / raw)
  To: Vinod Koul, Rob Herring, Krzysztof Kozlowski
  Cc: Andy Gross, Bjorn Andersson, Kishon Vijay Abraham I,
	linux-arm-msm, linux-phy, devicetree, linux-kernel, Johan Hovold

The QMP PHY wrapper node is not a clock provider so drop the bogus
'#clock-cells' property that was added when converting to DT schema.

Fixes: ccf51c1cedfd ("dt-bindings: phy: qcom,qmp: Convert QMP PHY bindings to yaml")
Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
---
 Documentation/devicetree/bindings/phy/qcom,qmp-phy.yaml | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/Documentation/devicetree/bindings/phy/qcom,qmp-phy.yaml b/Documentation/devicetree/bindings/phy/qcom,qmp-phy.yaml
index 8b850c5ab116..f74b3bf34a23 100644
--- a/Documentation/devicetree/bindings/phy/qcom,qmp-phy.yaml
+++ b/Documentation/devicetree/bindings/phy/qcom,qmp-phy.yaml
@@ -66,9 +66,6 @@ properties:
       - description: Address and length of PHY's common serdes block.
       - description: Address and length of PHY's DP_COM control block.
 
-  "#clock-cells":
-    enum: [ 1, 2 ]
-
   "#address-cells":
     enum: [ 1, 2 ]
 
@@ -116,7 +113,6 @@ patternProperties:
 required:
   - compatible
   - reg
-  - "#clock-cells"
   - "#address-cells"
   - "#size-cells"
   - ranges
@@ -468,7 +464,6 @@ examples:
     usb_2_qmpphy: phy-wrapper@88eb000 {
         compatible = "qcom,sdm845-qmp-usb3-uni-phy";
         reg = <0x088eb000 0x18c>;
-        #clock-cells = <1>;
         #address-cells = <1>;
         #size-cells = <1>;
         ranges = <0x0 0x088eb000 0x2000>;
-- 
2.35.1


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

* [PATCH 01/43] dt-bindings: phy: qcom,qmp: fix bogus clock-cells property
@ 2022-07-05  9:41   ` Johan Hovold
  0 siblings, 0 replies; 178+ messages in thread
From: Johan Hovold @ 2022-07-05  9:41 UTC (permalink / raw)
  To: Vinod Koul, Rob Herring, Krzysztof Kozlowski
  Cc: Andy Gross, Bjorn Andersson, Kishon Vijay Abraham I,
	linux-arm-msm, linux-phy, devicetree, linux-kernel, Johan Hovold

The QMP PHY wrapper node is not a clock provider so drop the bogus
'#clock-cells' property that was added when converting to DT schema.

Fixes: ccf51c1cedfd ("dt-bindings: phy: qcom,qmp: Convert QMP PHY bindings to yaml")
Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
---
 Documentation/devicetree/bindings/phy/qcom,qmp-phy.yaml | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/Documentation/devicetree/bindings/phy/qcom,qmp-phy.yaml b/Documentation/devicetree/bindings/phy/qcom,qmp-phy.yaml
index 8b850c5ab116..f74b3bf34a23 100644
--- a/Documentation/devicetree/bindings/phy/qcom,qmp-phy.yaml
+++ b/Documentation/devicetree/bindings/phy/qcom,qmp-phy.yaml
@@ -66,9 +66,6 @@ properties:
       - description: Address and length of PHY's common serdes block.
       - description: Address and length of PHY's DP_COM control block.
 
-  "#clock-cells":
-    enum: [ 1, 2 ]
-
   "#address-cells":
     enum: [ 1, 2 ]
 
@@ -116,7 +113,6 @@ patternProperties:
 required:
   - compatible
   - reg
-  - "#clock-cells"
   - "#address-cells"
   - "#size-cells"
   - ranges
@@ -468,7 +464,6 @@ examples:
     usb_2_qmpphy: phy-wrapper@88eb000 {
         compatible = "qcom,sdm845-qmp-usb3-uni-phy";
         reg = <0x088eb000 0x18c>;
-        #clock-cells = <1>;
         #address-cells = <1>;
         #size-cells = <1>;
         ranges = <0x0 0x088eb000 0x2000>;
-- 
2.35.1


-- 
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy

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

* [PATCH 02/43] dt-bindings: phy: qcom,qmp: sort compatible strings
  2022-07-05  9:41 ` Johan Hovold
@ 2022-07-05  9:41   ` Johan Hovold
  -1 siblings, 0 replies; 178+ messages in thread
From: Johan Hovold @ 2022-07-05  9:41 UTC (permalink / raw)
  To: Vinod Koul, Rob Herring, Krzysztof Kozlowski
  Cc: Andy Gross, Bjorn Andersson, Kishon Vijay Abraham I,
	linux-arm-msm, linux-phy, devicetree, linux-kernel, Johan Hovold

Sort the compatible strings alphabetically to make it easier to look up
entries and add new ones.

Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
---
 .../devicetree/bindings/phy/qcom,qmp-phy.yaml        | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/Documentation/devicetree/bindings/phy/qcom,qmp-phy.yaml b/Documentation/devicetree/bindings/phy/qcom,qmp-phy.yaml
index f74b3bf34a23..38e0ade01687 100644
--- a/Documentation/devicetree/bindings/phy/qcom,qmp-phy.yaml
+++ b/Documentation/devicetree/bindings/phy/qcom,qmp-phy.yaml
@@ -38,15 +38,18 @@ properties:
       - qcom,sdm845-qmp-ufs-phy
       - qcom,sdm845-qmp-usb3-phy
       - qcom,sdm845-qmp-usb3-uni-phy
+      - qcom,sdx55-qmp-pcie-phy
+      - qcom,sdx55-qmp-usb3-uni-phy
+      - qcom,sdx65-qmp-usb3-uni-phy
       - qcom,sm6115-qmp-ufs-phy
       - qcom,sm6350-qmp-ufs-phy
       - qcom,sm8150-qmp-ufs-phy
       - qcom,sm8150-qmp-usb3-phy
       - qcom,sm8150-qmp-usb3-uni-phy
-      - qcom,sm8250-qmp-ufs-phy
       - qcom,sm8250-qmp-gen3x1-pcie-phy
       - qcom,sm8250-qmp-gen3x2-pcie-phy
       - qcom,sm8250-qmp-modem-pcie-phy
+      - qcom,sm8250-qmp-ufs-phy
       - qcom,sm8250-qmp-usb3-phy
       - qcom,sm8250-qmp-usb3-uni-phy
       - qcom,sm8350-qmp-ufs-phy
@@ -56,9 +59,6 @@ properties:
       - qcom,sm8450-qmp-gen4x2-pcie-phy
       - qcom,sm8450-qmp-ufs-phy
       - qcom,sm8450-qmp-usb3-phy
-      - qcom,sdx55-qmp-pcie-phy
-      - qcom,sdx55-qmp-usb3-uni-phy
-      - qcom,sdx65-qmp-usb3-uni-phy
 
   reg:
     minItems: 1
@@ -277,12 +277,12 @@ allOf:
           contains:
             enum:
               - qcom,msm8998-qmp-ufs-phy
+              - qcom,sc8180x-qmp-ufs-phy
+              - qcom,sc8280xp-qmp-ufs-phy
               - qcom,sdm845-qmp-ufs-phy
               - qcom,sm6350-qmp-ufs-phy
               - qcom,sm8150-qmp-ufs-phy
               - qcom,sm8250-qmp-ufs-phy
-              - qcom,sc8180x-qmp-ufs-phy
-              - qcom,sc8280xp-qmp-ufs-phy
     then:
       properties:
         clocks:
-- 
2.35.1


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

* [PATCH 02/43] dt-bindings: phy: qcom,qmp: sort compatible strings
@ 2022-07-05  9:41   ` Johan Hovold
  0 siblings, 0 replies; 178+ messages in thread
From: Johan Hovold @ 2022-07-05  9:41 UTC (permalink / raw)
  To: Vinod Koul, Rob Herring, Krzysztof Kozlowski
  Cc: Andy Gross, Bjorn Andersson, Kishon Vijay Abraham I,
	linux-arm-msm, linux-phy, devicetree, linux-kernel, Johan Hovold

Sort the compatible strings alphabetically to make it easier to look up
entries and add new ones.

Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
---
 .../devicetree/bindings/phy/qcom,qmp-phy.yaml        | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/Documentation/devicetree/bindings/phy/qcom,qmp-phy.yaml b/Documentation/devicetree/bindings/phy/qcom,qmp-phy.yaml
index f74b3bf34a23..38e0ade01687 100644
--- a/Documentation/devicetree/bindings/phy/qcom,qmp-phy.yaml
+++ b/Documentation/devicetree/bindings/phy/qcom,qmp-phy.yaml
@@ -38,15 +38,18 @@ properties:
       - qcom,sdm845-qmp-ufs-phy
       - qcom,sdm845-qmp-usb3-phy
       - qcom,sdm845-qmp-usb3-uni-phy
+      - qcom,sdx55-qmp-pcie-phy
+      - qcom,sdx55-qmp-usb3-uni-phy
+      - qcom,sdx65-qmp-usb3-uni-phy
       - qcom,sm6115-qmp-ufs-phy
       - qcom,sm6350-qmp-ufs-phy
       - qcom,sm8150-qmp-ufs-phy
       - qcom,sm8150-qmp-usb3-phy
       - qcom,sm8150-qmp-usb3-uni-phy
-      - qcom,sm8250-qmp-ufs-phy
       - qcom,sm8250-qmp-gen3x1-pcie-phy
       - qcom,sm8250-qmp-gen3x2-pcie-phy
       - qcom,sm8250-qmp-modem-pcie-phy
+      - qcom,sm8250-qmp-ufs-phy
       - qcom,sm8250-qmp-usb3-phy
       - qcom,sm8250-qmp-usb3-uni-phy
       - qcom,sm8350-qmp-ufs-phy
@@ -56,9 +59,6 @@ properties:
       - qcom,sm8450-qmp-gen4x2-pcie-phy
       - qcom,sm8450-qmp-ufs-phy
       - qcom,sm8450-qmp-usb3-phy
-      - qcom,sdx55-qmp-pcie-phy
-      - qcom,sdx55-qmp-usb3-uni-phy
-      - qcom,sdx65-qmp-usb3-uni-phy
 
   reg:
     minItems: 1
@@ -277,12 +277,12 @@ allOf:
           contains:
             enum:
               - qcom,msm8998-qmp-ufs-phy
+              - qcom,sc8180x-qmp-ufs-phy
+              - qcom,sc8280xp-qmp-ufs-phy
               - qcom,sdm845-qmp-ufs-phy
               - qcom,sm6350-qmp-ufs-phy
               - qcom,sm8150-qmp-ufs-phy
               - qcom,sm8250-qmp-ufs-phy
-              - qcom,sc8180x-qmp-ufs-phy
-              - qcom,sc8280xp-qmp-ufs-phy
     then:
       properties:
         clocks:
-- 
2.35.1


-- 
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy

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

* [PATCH 03/43] dt-bindings: phy: qcom,qmp: clean up descriptions
  2022-07-05  9:41 ` Johan Hovold
@ 2022-07-05  9:41   ` Johan Hovold
  -1 siblings, 0 replies; 178+ messages in thread
From: Johan Hovold @ 2022-07-05  9:41 UTC (permalink / raw)
  To: Vinod Koul, Rob Herring, Krzysztof Kozlowski
  Cc: Andy Gross, Bjorn Andersson, Kishon Vijay Abraham I,
	linux-arm-msm, linux-phy, devicetree, linux-kernel, Johan Hovold

Clean up the descriptions somewhat by using uppercase "PHY" consistently
and spelling out "clock".

Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
---
 .../devicetree/bindings/phy/qcom,qmp-phy.yaml | 102 +++++++++---------
 1 file changed, 51 insertions(+), 51 deletions(-)

diff --git a/Documentation/devicetree/bindings/phy/qcom,qmp-phy.yaml b/Documentation/devicetree/bindings/phy/qcom,qmp-phy.yaml
index 38e0ade01687..83f777b4636f 100644
--- a/Documentation/devicetree/bindings/phy/qcom,qmp-phy.yaml
+++ b/Documentation/devicetree/bindings/phy/qcom,qmp-phy.yaml
@@ -11,7 +11,7 @@ maintainers:
   - Vinod Koul <vkoul@kernel.org>
 
 description:
-  QMP phy controller supports physical layer functionality for a number of
+  QMP PHY controller supports physical layer functionality for a number of
   controllers on Qualcomm chipsets, such as, PCIe, UFS, and USB.
 
 properties:
@@ -107,7 +107,7 @@ patternProperties:
   "^phy@[0-9a-f]+$":
     type: object
     description:
-      Each device node of QMP phy is required to have as many child nodes as
+      Each device node of QMP PHY is required to have as many child nodes as
       the number of lanes the PHY has.
 
 required:
@@ -134,10 +134,10 @@ allOf:
       properties:
         clocks:
           items:
-            - description: Phy aux clock.
-            - description: Phy config clock.
-            - description: 19.2 MHz ref clk.
-            - description: Phy common block aux clock.
+            - description: PHY aux clock.
+            - description: PHY config clock.
+            - description: 19.2 MHz ref clock.
+            - description: PHY common block aux clock.
         clock-names:
           items:
             - const: aux
@@ -146,8 +146,8 @@ allOf:
             - const: com_aux
         resets:
           items:
-            - description: reset of phy block.
-            - description: phy common block reset.
+            - description: Reset of PHY block.
+            - description: PHY common block reset.
         reset-names:
           items:
             - const: phy
@@ -166,9 +166,9 @@ allOf:
       properties:
         clocks:
           items:
-            - description: Phy aux clock.
-            - description: Phy config clock.
-            - description: 19.2 MHz ref clk.
+            - description: PHY aux clock.
+            - description: PHY config clock.
+            - description: 19.2 MHz ref clock.
         clock-names:
           items:
             - const: aux
@@ -176,8 +176,8 @@ allOf:
             - const: ref
         resets:
           items:
-            - description: reset of phy block.
-            - description: phy common block reset.
+            - description: Reset of PHY block.
+            - description: PHY common block reset.
         reset-names:
           items:
             - const: phy
@@ -195,9 +195,9 @@ allOf:
       properties:
         clocks:
           items:
-            - description: Phy aux clock.
-            - description: Phy config clock.
-            - description: 19.2 MHz ref clk.
+            - description: PHY aux clock.
+            - description: PHY config clock.
+            - description: 19.2 MHz ref clock.
         clock-names:
           items:
             - const: aux
@@ -205,9 +205,9 @@ allOf:
             - const: ref
         resets:
           items:
-            - description: reset of phy block.
-            - description: phy common block reset.
-            - description: phy's ahb cfg block reset.
+            - description: Reset of PHY block.
+            - description: PHY common block reset.
+            - description: PHY's ahb cfg block reset.
         reset-names:
           items:
             - const: phy
@@ -229,9 +229,9 @@ allOf:
       properties:
         clocks:
           items:
-            - description: Phy aux clock.
-            - description: Phy config clock.
-            - description: 19.2 MHz ref clk.
+            - description: PHY aux clock.
+            - description: PHY config clock.
+            - description: 19.2 MHz ref clock.
         clock-names:
           items:
             - const: aux
@@ -239,8 +239,8 @@ allOf:
             - const: ref
         resets:
           items:
-            - description: reset of phy block.
-            - description: phy common block reset.
+            - description: Reset of PHY block.
+            - description: PHY common block reset.
         reset-names:
           items:
             - const: phy
@@ -258,7 +258,7 @@ allOf:
       properties:
         clocks:
           items:
-            - description: 19.2 MHz ref clk.
+            - description: 19.2 MHz ref clock.
         clock-names:
           items:
             - const: ref
@@ -287,8 +287,8 @@ allOf:
       properties:
         clocks:
           items:
-            - description: 19.2 MHz ref clk.
-            - description: Phy reference aux clock.
+            - description: 19.2 MHz ref clock.
+            - description: PHY reference aux clock.
         clock-names:
           items:
             - const: ref
@@ -313,16 +313,16 @@ allOf:
       properties:
         clocks:
           items:
-            - description: Phy aux clock.
-            - description: Phy config clock.
+            - description: PHY aux clock.
+            - description: PHY config clock.
         clock-names:
           items:
             - const: aux
             - const: cfg_ahb
         resets:
           items:
-            - description: reset of phy block.
-            - description: phy common block reset.
+            - description: Reset of PHY block.
+            - description: PHY common block reset.
         reset-names:
           items:
             - const: phy
@@ -345,10 +345,10 @@ allOf:
       properties:
         clocks:
           items:
-            - description: Phy aux clock.
-            - description: Phy config clock.
-            - description: 19.2 MHz ref clk.
-            - description: Phy refgen clk.
+            - description: PHY aux clock.
+            - description: PHY config clock.
+            - description: 19.2 MHz ref clock.
+            - description: PHY refgen clock.
         clock-names:
           items:
             - const: aux
@@ -357,7 +357,7 @@ allOf:
             - const: refgen
         resets:
           items:
-            - description: reset of phy block.
+            - description: Reset of PHY block.
         reset-names:
           items:
             - const: phy
@@ -377,10 +377,10 @@ allOf:
       properties:
         clocks:
           items:
-            - description: Phy aux clock.
-            - description: 19.2 MHz ref clk source.
-            - description: 19.2 MHz ref clk.
-            - description: Phy common block aux clock.
+            - description: PHY aux clock.
+            - description: 19.2 MHz ref clock source.
+            - description: 19.2 MHz ref clock.
+            - description: PHY common block aux clock.
         clock-names:
           items:
             - const: aux
@@ -389,8 +389,8 @@ allOf:
             - const: com_aux
         resets:
           items:
-            - description: reset of phy block.
-            - description: phy common block reset.
+            - description: Reset of PHY block.
+            - description: PHY common block reset.
         reset-names:
           items:
             - const: phy
@@ -409,9 +409,9 @@ allOf:
       properties:
         clocks:
           items:
-            - description: Phy aux clock.
-            - description: 19.2 MHz ref clk.
-            - description: Phy common block aux clock.
+            - description: PHY aux clock.
+            - description: 19.2 MHz ref clock.
+            - description: PHY common block aux clock.
         clock-names:
           items:
             - const: aux
@@ -419,8 +419,8 @@ allOf:
             - const: com_aux
         resets:
           items:
-            - description: reset of phy block.
-            - description: phy common block reset.
+            - description: Reset of PHY block.
+            - description: PHY common block reset.
         reset-names:
           items:
             - const: phy
@@ -438,9 +438,9 @@ allOf:
       properties:
         clocks:
           items:
-            - description: Phy config clock.
-            - description: 19.2 MHz ref clk.
-            - description: Phy common block aux clock.
+            - description: PHY config clock.
+            - description: 19.2 MHz ref clock.
+            - description: PHY common block aux clock.
         clock-names:
           items:
             - const: cfg_ahb
@@ -449,7 +449,7 @@ allOf:
         resets:
           items:
             - description: phy_phy reset.
-            - description: reset of phy block.
+            - description: reset of PHY block.
         reset-names:
           items:
             - const: phy_phy
-- 
2.35.1


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

* [PATCH 03/43] dt-bindings: phy: qcom,qmp: clean up descriptions
@ 2022-07-05  9:41   ` Johan Hovold
  0 siblings, 0 replies; 178+ messages in thread
From: Johan Hovold @ 2022-07-05  9:41 UTC (permalink / raw)
  To: Vinod Koul, Rob Herring, Krzysztof Kozlowski
  Cc: Andy Gross, Bjorn Andersson, Kishon Vijay Abraham I,
	linux-arm-msm, linux-phy, devicetree, linux-kernel, Johan Hovold

Clean up the descriptions somewhat by using uppercase "PHY" consistently
and spelling out "clock".

Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
---
 .../devicetree/bindings/phy/qcom,qmp-phy.yaml | 102 +++++++++---------
 1 file changed, 51 insertions(+), 51 deletions(-)

diff --git a/Documentation/devicetree/bindings/phy/qcom,qmp-phy.yaml b/Documentation/devicetree/bindings/phy/qcom,qmp-phy.yaml
index 38e0ade01687..83f777b4636f 100644
--- a/Documentation/devicetree/bindings/phy/qcom,qmp-phy.yaml
+++ b/Documentation/devicetree/bindings/phy/qcom,qmp-phy.yaml
@@ -11,7 +11,7 @@ maintainers:
   - Vinod Koul <vkoul@kernel.org>
 
 description:
-  QMP phy controller supports physical layer functionality for a number of
+  QMP PHY controller supports physical layer functionality for a number of
   controllers on Qualcomm chipsets, such as, PCIe, UFS, and USB.
 
 properties:
@@ -107,7 +107,7 @@ patternProperties:
   "^phy@[0-9a-f]+$":
     type: object
     description:
-      Each device node of QMP phy is required to have as many child nodes as
+      Each device node of QMP PHY is required to have as many child nodes as
       the number of lanes the PHY has.
 
 required:
@@ -134,10 +134,10 @@ allOf:
       properties:
         clocks:
           items:
-            - description: Phy aux clock.
-            - description: Phy config clock.
-            - description: 19.2 MHz ref clk.
-            - description: Phy common block aux clock.
+            - description: PHY aux clock.
+            - description: PHY config clock.
+            - description: 19.2 MHz ref clock.
+            - description: PHY common block aux clock.
         clock-names:
           items:
             - const: aux
@@ -146,8 +146,8 @@ allOf:
             - const: com_aux
         resets:
           items:
-            - description: reset of phy block.
-            - description: phy common block reset.
+            - description: Reset of PHY block.
+            - description: PHY common block reset.
         reset-names:
           items:
             - const: phy
@@ -166,9 +166,9 @@ allOf:
       properties:
         clocks:
           items:
-            - description: Phy aux clock.
-            - description: Phy config clock.
-            - description: 19.2 MHz ref clk.
+            - description: PHY aux clock.
+            - description: PHY config clock.
+            - description: 19.2 MHz ref clock.
         clock-names:
           items:
             - const: aux
@@ -176,8 +176,8 @@ allOf:
             - const: ref
         resets:
           items:
-            - description: reset of phy block.
-            - description: phy common block reset.
+            - description: Reset of PHY block.
+            - description: PHY common block reset.
         reset-names:
           items:
             - const: phy
@@ -195,9 +195,9 @@ allOf:
       properties:
         clocks:
           items:
-            - description: Phy aux clock.
-            - description: Phy config clock.
-            - description: 19.2 MHz ref clk.
+            - description: PHY aux clock.
+            - description: PHY config clock.
+            - description: 19.2 MHz ref clock.
         clock-names:
           items:
             - const: aux
@@ -205,9 +205,9 @@ allOf:
             - const: ref
         resets:
           items:
-            - description: reset of phy block.
-            - description: phy common block reset.
-            - description: phy's ahb cfg block reset.
+            - description: Reset of PHY block.
+            - description: PHY common block reset.
+            - description: PHY's ahb cfg block reset.
         reset-names:
           items:
             - const: phy
@@ -229,9 +229,9 @@ allOf:
       properties:
         clocks:
           items:
-            - description: Phy aux clock.
-            - description: Phy config clock.
-            - description: 19.2 MHz ref clk.
+            - description: PHY aux clock.
+            - description: PHY config clock.
+            - description: 19.2 MHz ref clock.
         clock-names:
           items:
             - const: aux
@@ -239,8 +239,8 @@ allOf:
             - const: ref
         resets:
           items:
-            - description: reset of phy block.
-            - description: phy common block reset.
+            - description: Reset of PHY block.
+            - description: PHY common block reset.
         reset-names:
           items:
             - const: phy
@@ -258,7 +258,7 @@ allOf:
       properties:
         clocks:
           items:
-            - description: 19.2 MHz ref clk.
+            - description: 19.2 MHz ref clock.
         clock-names:
           items:
             - const: ref
@@ -287,8 +287,8 @@ allOf:
       properties:
         clocks:
           items:
-            - description: 19.2 MHz ref clk.
-            - description: Phy reference aux clock.
+            - description: 19.2 MHz ref clock.
+            - description: PHY reference aux clock.
         clock-names:
           items:
             - const: ref
@@ -313,16 +313,16 @@ allOf:
       properties:
         clocks:
           items:
-            - description: Phy aux clock.
-            - description: Phy config clock.
+            - description: PHY aux clock.
+            - description: PHY config clock.
         clock-names:
           items:
             - const: aux
             - const: cfg_ahb
         resets:
           items:
-            - description: reset of phy block.
-            - description: phy common block reset.
+            - description: Reset of PHY block.
+            - description: PHY common block reset.
         reset-names:
           items:
             - const: phy
@@ -345,10 +345,10 @@ allOf:
       properties:
         clocks:
           items:
-            - description: Phy aux clock.
-            - description: Phy config clock.
-            - description: 19.2 MHz ref clk.
-            - description: Phy refgen clk.
+            - description: PHY aux clock.
+            - description: PHY config clock.
+            - description: 19.2 MHz ref clock.
+            - description: PHY refgen clock.
         clock-names:
           items:
             - const: aux
@@ -357,7 +357,7 @@ allOf:
             - const: refgen
         resets:
           items:
-            - description: reset of phy block.
+            - description: Reset of PHY block.
         reset-names:
           items:
             - const: phy
@@ -377,10 +377,10 @@ allOf:
       properties:
         clocks:
           items:
-            - description: Phy aux clock.
-            - description: 19.2 MHz ref clk source.
-            - description: 19.2 MHz ref clk.
-            - description: Phy common block aux clock.
+            - description: PHY aux clock.
+            - description: 19.2 MHz ref clock source.
+            - description: 19.2 MHz ref clock.
+            - description: PHY common block aux clock.
         clock-names:
           items:
             - const: aux
@@ -389,8 +389,8 @@ allOf:
             - const: com_aux
         resets:
           items:
-            - description: reset of phy block.
-            - description: phy common block reset.
+            - description: Reset of PHY block.
+            - description: PHY common block reset.
         reset-names:
           items:
             - const: phy
@@ -409,9 +409,9 @@ allOf:
       properties:
         clocks:
           items:
-            - description: Phy aux clock.
-            - description: 19.2 MHz ref clk.
-            - description: Phy common block aux clock.
+            - description: PHY aux clock.
+            - description: 19.2 MHz ref clock.
+            - description: PHY common block aux clock.
         clock-names:
           items:
             - const: aux
@@ -419,8 +419,8 @@ allOf:
             - const: com_aux
         resets:
           items:
-            - description: reset of phy block.
-            - description: phy common block reset.
+            - description: Reset of PHY block.
+            - description: PHY common block reset.
         reset-names:
           items:
             - const: phy
@@ -438,9 +438,9 @@ allOf:
       properties:
         clocks:
           items:
-            - description: Phy config clock.
-            - description: 19.2 MHz ref clk.
-            - description: Phy common block aux clock.
+            - description: PHY config clock.
+            - description: 19.2 MHz ref clock.
+            - description: PHY common block aux clock.
         clock-names:
           items:
             - const: cfg_ahb
@@ -449,7 +449,7 @@ allOf:
         resets:
           items:
             - description: phy_phy reset.
-            - description: reset of phy block.
+            - description: reset of PHY block.
         reset-names:
           items:
             - const: phy_phy
-- 
2.35.1


-- 
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy

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

* [PATCH 04/43] dt-bindings: phy: qcom,qmp: clean up example
  2022-07-05  9:41 ` Johan Hovold
@ 2022-07-05  9:42   ` Johan Hovold
  -1 siblings, 0 replies; 178+ messages in thread
From: Johan Hovold @ 2022-07-05  9:42 UTC (permalink / raw)
  To: Vinod Koul, Rob Herring, Krzysztof Kozlowski
  Cc: Andy Gross, Bjorn Andersson, Kishon Vijay Abraham I,
	linux-arm-msm, linux-phy, devicetree, linux-kernel, Johan Hovold

Clean up the example node somewhat by grouping consumer and provider
properties in the child node.

Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
---
 Documentation/devicetree/bindings/phy/qcom,qmp-phy.yaml | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/Documentation/devicetree/bindings/phy/qcom,qmp-phy.yaml b/Documentation/devicetree/bindings/phy/qcom,qmp-phy.yaml
index 83f777b4636f..e678d7d5f675 100644
--- a/Documentation/devicetree/bindings/phy/qcom,qmp-phy.yaml
+++ b/Documentation/devicetree/bindings/phy/qcom,qmp-phy.yaml
@@ -486,10 +486,13 @@ examples:
                       <0x400 0x1fc>,
                       <0x800 0x218>,
                       <0x600 0x70>;
-                #clock-cells = <0>;
-                #phy-cells = <0>;
+
                 clocks = <&gcc GCC_USB3_SEC_PHY_PIPE_CLK>;
                 clock-names = "pipe0";
+
+                #clock-cells = <0>;
                 clock-output-names = "usb3_uni_phy_pipe_clk_src";
+
+                #phy-cells = <0>;
             };
         };
-- 
2.35.1


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

* [PATCH 04/43] dt-bindings: phy: qcom,qmp: clean up example
@ 2022-07-05  9:42   ` Johan Hovold
  0 siblings, 0 replies; 178+ messages in thread
From: Johan Hovold @ 2022-07-05  9:42 UTC (permalink / raw)
  To: Vinod Koul, Rob Herring, Krzysztof Kozlowski
  Cc: Andy Gross, Bjorn Andersson, Kishon Vijay Abraham I,
	linux-arm-msm, linux-phy, devicetree, linux-kernel, Johan Hovold

Clean up the example node somewhat by grouping consumer and provider
properties in the child node.

Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
---
 Documentation/devicetree/bindings/phy/qcom,qmp-phy.yaml | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/Documentation/devicetree/bindings/phy/qcom,qmp-phy.yaml b/Documentation/devicetree/bindings/phy/qcom,qmp-phy.yaml
index 83f777b4636f..e678d7d5f675 100644
--- a/Documentation/devicetree/bindings/phy/qcom,qmp-phy.yaml
+++ b/Documentation/devicetree/bindings/phy/qcom,qmp-phy.yaml
@@ -486,10 +486,13 @@ examples:
                       <0x400 0x1fc>,
                       <0x800 0x218>,
                       <0x600 0x70>;
-                #clock-cells = <0>;
-                #phy-cells = <0>;
+
                 clocks = <&gcc GCC_USB3_SEC_PHY_PIPE_CLK>;
                 clock-names = "pipe0";
+
+                #clock-cells = <0>;
                 clock-output-names = "usb3_uni_phy_pipe_clk_src";
+
+                #phy-cells = <0>;
             };
         };
-- 
2.35.1


-- 
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy

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

* [PATCH 05/43] dt-bindings: phy: qcom,qmp: drop child-node comment
  2022-07-05  9:41 ` Johan Hovold
@ 2022-07-05  9:42   ` Johan Hovold
  -1 siblings, 0 replies; 178+ messages in thread
From: Johan Hovold @ 2022-07-05  9:42 UTC (permalink / raw)
  To: Vinod Koul, Rob Herring, Krzysztof Kozlowski
  Cc: Andy Gross, Bjorn Andersson, Kishon Vijay Abraham I,
	linux-arm-msm, linux-phy, devicetree, linux-kernel, Johan Hovold

Drop the redundant comment about child nodes being required that was
copied from the old binding documentation.

Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
---
 Documentation/devicetree/bindings/phy/qcom,qmp-phy.yaml | 1 -
 1 file changed, 1 deletion(-)

diff --git a/Documentation/devicetree/bindings/phy/qcom,qmp-phy.yaml b/Documentation/devicetree/bindings/phy/qcom,qmp-phy.yaml
index e678d7d5f675..bca006e41821 100644
--- a/Documentation/devicetree/bindings/phy/qcom,qmp-phy.yaml
+++ b/Documentation/devicetree/bindings/phy/qcom,qmp-phy.yaml
@@ -102,7 +102,6 @@ properties:
     description:
       Phandle to a regulator supply to any specific refclk pll block.
 
-#Required nodes:
 patternProperties:
   "^phy@[0-9a-f]+$":
     type: object
-- 
2.35.1


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

* [PATCH 05/43] dt-bindings: phy: qcom,qmp: drop child-node comment
@ 2022-07-05  9:42   ` Johan Hovold
  0 siblings, 0 replies; 178+ messages in thread
From: Johan Hovold @ 2022-07-05  9:42 UTC (permalink / raw)
  To: Vinod Koul, Rob Herring, Krzysztof Kozlowski
  Cc: Andy Gross, Bjorn Andersson, Kishon Vijay Abraham I,
	linux-arm-msm, linux-phy, devicetree, linux-kernel, Johan Hovold

Drop the redundant comment about child nodes being required that was
copied from the old binding documentation.

Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
---
 Documentation/devicetree/bindings/phy/qcom,qmp-phy.yaml | 1 -
 1 file changed, 1 deletion(-)

diff --git a/Documentation/devicetree/bindings/phy/qcom,qmp-phy.yaml b/Documentation/devicetree/bindings/phy/qcom,qmp-phy.yaml
index e678d7d5f675..bca006e41821 100644
--- a/Documentation/devicetree/bindings/phy/qcom,qmp-phy.yaml
+++ b/Documentation/devicetree/bindings/phy/qcom,qmp-phy.yaml
@@ -102,7 +102,6 @@ properties:
     description:
       Phandle to a regulator supply to any specific refclk pll block.
 
-#Required nodes:
 patternProperties:
   "^phy@[0-9a-f]+$":
     type: object
-- 
2.35.1


-- 
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy

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

* [PATCH 06/43] dt-bindings: phy: qcom,qmp: split out msm8996-qmp-pcie-phy
  2022-07-05  9:41 ` Johan Hovold
@ 2022-07-05  9:42   ` Johan Hovold
  -1 siblings, 0 replies; 178+ messages in thread
From: Johan Hovold @ 2022-07-05  9:42 UTC (permalink / raw)
  To: Vinod Koul, Rob Herring, Krzysztof Kozlowski
  Cc: Andy Gross, Bjorn Andersson, Kishon Vijay Abraham I,
	linux-arm-msm, linux-phy, devicetree, linux-kernel, Johan Hovold

The QMP PHY DT schema is getting unwieldy. Break out the odd-bird
msm8996-qmp-pcie-phy which is the only QMP PHY that uses separate
"per-lane" nodes.

Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
---
 .../phy/qcom,msm8996-qmp-pcie-phy.yaml        | 114 ++++++++++++++++++
 .../devicetree/bindings/phy/qcom,qmp-phy.yaml |  32 -----
 2 files changed, 114 insertions(+), 32 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/phy/qcom,msm8996-qmp-pcie-phy.yaml

diff --git a/Documentation/devicetree/bindings/phy/qcom,msm8996-qmp-pcie-phy.yaml b/Documentation/devicetree/bindings/phy/qcom,msm8996-qmp-pcie-phy.yaml
new file mode 100644
index 000000000000..14fd86fd91ec
--- /dev/null
+++ b/Documentation/devicetree/bindings/phy/qcom,msm8996-qmp-pcie-phy.yaml
@@ -0,0 +1,114 @@
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+
+%YAML 1.2
+---
+$id: "http://devicetree.org/schemas/phy/qcom,msm8996-qmp-pcie-phy.yaml#"
+$schema: "http://devicetree.org/meta-schemas/core.yaml#"
+
+title: Qualcomm QMP PHY controller (MSM8996 PCIe)
+
+maintainers:
+  - Vinod Koul <vkoul@kernel.org>
+
+description:
+  QMP PHY controller supports physical layer functionality for a number of
+  controllers on Qualcomm chipsets, such as, PCIe, UFS, and USB.
+
+properties:
+  compatible:
+    const: qcom,msm8996-qmp-pcie-phy
+
+  reg:
+    minItems: 1
+    items:
+      - description: Address and length of PHY's common serdes block.
+      - description: Address and length of PHY's DP_COM control block.
+
+  "#address-cells":
+    enum: [ 1, 2 ]
+
+  "#size-cells":
+    enum: [ 1, 2 ]
+
+  ranges: true
+
+  clocks:
+    minItems: 1
+    maxItems: 4
+
+  clock-names:
+    minItems: 1
+    maxItems: 4
+
+  resets:
+    minItems: 1
+    maxItems: 3
+
+  reset-names:
+    minItems: 1
+    maxItems: 3
+
+  vdda-phy-supply:
+    description:
+      Phandle to a regulator supply to PHY core block.
+
+  vdda-pll-supply:
+    description:
+      Phandle to 1.8V regulator supply to PHY refclk pll block.
+
+  vddp-ref-clk-supply:
+    description:
+      Phandle to a regulator supply to any specific refclk pll block.
+
+patternProperties:
+  "^phy@[0-9a-f]+$":
+    type: object
+    description:
+      Each device node of QMP PHY is required to have as many child nodes as
+      the number of lanes the PHY has.
+
+required:
+  - compatible
+  - reg
+  - "#address-cells"
+  - "#size-cells"
+  - ranges
+  - clocks
+  - clock-names
+  - resets
+  - reset-names
+
+additionalProperties: false
+
+allOf:
+  - if:
+      properties:
+        compatible:
+          contains:
+            enum:
+              - qcom,msm8996-qmp-pcie-phy
+    then:
+      properties:
+        clocks:
+          items:
+            - description: PHY aux clock.
+            - description: PHY config clock.
+            - description: 19.2 MHz ref clock.
+        clock-names:
+          items:
+            - const: aux
+            - const: cfg_ahb
+            - const: ref
+        resets:
+          items:
+            - description: Reset of PHY block.
+            - description: PHY common block reset.
+            - description: PHY's ahb cfg block reset.
+        reset-names:
+          items:
+            - const: phy
+            - const: common
+            - const: cfg
+      required:
+        - vdda-phy-supply
+        - vdda-pll-supply
diff --git a/Documentation/devicetree/bindings/phy/qcom,qmp-phy.yaml b/Documentation/devicetree/bindings/phy/qcom,qmp-phy.yaml
index bca006e41821..7a76fd286cee 100644
--- a/Documentation/devicetree/bindings/phy/qcom,qmp-phy.yaml
+++ b/Documentation/devicetree/bindings/phy/qcom,qmp-phy.yaml
@@ -21,7 +21,6 @@ properties:
       - qcom,ipq6018-qmp-usb3-phy
       - qcom,ipq8074-qmp-pcie-phy
       - qcom,ipq8074-qmp-usb3-phy
-      - qcom,msm8996-qmp-pcie-phy
       - qcom,msm8996-qmp-ufs-phy
       - qcom,msm8996-qmp-usb3-phy
       - qcom,msm8998-qmp-pcie-phy
@@ -184,37 +183,6 @@ allOf:
       required:
         - vdda-phy-supply
         - vdda-pll-supply
-  - if:
-      properties:
-        compatible:
-          contains:
-            enum:
-              - qcom,msm8996-qmp-pcie-phy
-    then:
-      properties:
-        clocks:
-          items:
-            - description: PHY aux clock.
-            - description: PHY config clock.
-            - description: 19.2 MHz ref clock.
-        clock-names:
-          items:
-            - const: aux
-            - const: cfg_ahb
-            - const: ref
-        resets:
-          items:
-            - description: Reset of PHY block.
-            - description: PHY common block reset.
-            - description: PHY's ahb cfg block reset.
-        reset-names:
-          items:
-            - const: phy
-            - const: common
-            - const: cfg
-      required:
-        - vdda-phy-supply
-        - vdda-pll-supply
   - if:
       properties:
         compatible:
-- 
2.35.1


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

* [PATCH 06/43] dt-bindings: phy: qcom,qmp: split out msm8996-qmp-pcie-phy
@ 2022-07-05  9:42   ` Johan Hovold
  0 siblings, 0 replies; 178+ messages in thread
From: Johan Hovold @ 2022-07-05  9:42 UTC (permalink / raw)
  To: Vinod Koul, Rob Herring, Krzysztof Kozlowski
  Cc: Andy Gross, Bjorn Andersson, Kishon Vijay Abraham I,
	linux-arm-msm, linux-phy, devicetree, linux-kernel, Johan Hovold

The QMP PHY DT schema is getting unwieldy. Break out the odd-bird
msm8996-qmp-pcie-phy which is the only QMP PHY that uses separate
"per-lane" nodes.

Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
---
 .../phy/qcom,msm8996-qmp-pcie-phy.yaml        | 114 ++++++++++++++++++
 .../devicetree/bindings/phy/qcom,qmp-phy.yaml |  32 -----
 2 files changed, 114 insertions(+), 32 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/phy/qcom,msm8996-qmp-pcie-phy.yaml

diff --git a/Documentation/devicetree/bindings/phy/qcom,msm8996-qmp-pcie-phy.yaml b/Documentation/devicetree/bindings/phy/qcom,msm8996-qmp-pcie-phy.yaml
new file mode 100644
index 000000000000..14fd86fd91ec
--- /dev/null
+++ b/Documentation/devicetree/bindings/phy/qcom,msm8996-qmp-pcie-phy.yaml
@@ -0,0 +1,114 @@
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+
+%YAML 1.2
+---
+$id: "http://devicetree.org/schemas/phy/qcom,msm8996-qmp-pcie-phy.yaml#"
+$schema: "http://devicetree.org/meta-schemas/core.yaml#"
+
+title: Qualcomm QMP PHY controller (MSM8996 PCIe)
+
+maintainers:
+  - Vinod Koul <vkoul@kernel.org>
+
+description:
+  QMP PHY controller supports physical layer functionality for a number of
+  controllers on Qualcomm chipsets, such as, PCIe, UFS, and USB.
+
+properties:
+  compatible:
+    const: qcom,msm8996-qmp-pcie-phy
+
+  reg:
+    minItems: 1
+    items:
+      - description: Address and length of PHY's common serdes block.
+      - description: Address and length of PHY's DP_COM control block.
+
+  "#address-cells":
+    enum: [ 1, 2 ]
+
+  "#size-cells":
+    enum: [ 1, 2 ]
+
+  ranges: true
+
+  clocks:
+    minItems: 1
+    maxItems: 4
+
+  clock-names:
+    minItems: 1
+    maxItems: 4
+
+  resets:
+    minItems: 1
+    maxItems: 3
+
+  reset-names:
+    minItems: 1
+    maxItems: 3
+
+  vdda-phy-supply:
+    description:
+      Phandle to a regulator supply to PHY core block.
+
+  vdda-pll-supply:
+    description:
+      Phandle to 1.8V regulator supply to PHY refclk pll block.
+
+  vddp-ref-clk-supply:
+    description:
+      Phandle to a regulator supply to any specific refclk pll block.
+
+patternProperties:
+  "^phy@[0-9a-f]+$":
+    type: object
+    description:
+      Each device node of QMP PHY is required to have as many child nodes as
+      the number of lanes the PHY has.
+
+required:
+  - compatible
+  - reg
+  - "#address-cells"
+  - "#size-cells"
+  - ranges
+  - clocks
+  - clock-names
+  - resets
+  - reset-names
+
+additionalProperties: false
+
+allOf:
+  - if:
+      properties:
+        compatible:
+          contains:
+            enum:
+              - qcom,msm8996-qmp-pcie-phy
+    then:
+      properties:
+        clocks:
+          items:
+            - description: PHY aux clock.
+            - description: PHY config clock.
+            - description: 19.2 MHz ref clock.
+        clock-names:
+          items:
+            - const: aux
+            - const: cfg_ahb
+            - const: ref
+        resets:
+          items:
+            - description: Reset of PHY block.
+            - description: PHY common block reset.
+            - description: PHY's ahb cfg block reset.
+        reset-names:
+          items:
+            - const: phy
+            - const: common
+            - const: cfg
+      required:
+        - vdda-phy-supply
+        - vdda-pll-supply
diff --git a/Documentation/devicetree/bindings/phy/qcom,qmp-phy.yaml b/Documentation/devicetree/bindings/phy/qcom,qmp-phy.yaml
index bca006e41821..7a76fd286cee 100644
--- a/Documentation/devicetree/bindings/phy/qcom,qmp-phy.yaml
+++ b/Documentation/devicetree/bindings/phy/qcom,qmp-phy.yaml
@@ -21,7 +21,6 @@ properties:
       - qcom,ipq6018-qmp-usb3-phy
       - qcom,ipq8074-qmp-pcie-phy
       - qcom,ipq8074-qmp-usb3-phy
-      - qcom,msm8996-qmp-pcie-phy
       - qcom,msm8996-qmp-ufs-phy
       - qcom,msm8996-qmp-usb3-phy
       - qcom,msm8998-qmp-pcie-phy
@@ -184,37 +183,6 @@ allOf:
       required:
         - vdda-phy-supply
         - vdda-pll-supply
-  - if:
-      properties:
-        compatible:
-          contains:
-            enum:
-              - qcom,msm8996-qmp-pcie-phy
-    then:
-      properties:
-        clocks:
-          items:
-            - description: PHY aux clock.
-            - description: PHY config clock.
-            - description: 19.2 MHz ref clock.
-        clock-names:
-          items:
-            - const: aux
-            - const: cfg_ahb
-            - const: ref
-        resets:
-          items:
-            - description: Reset of PHY block.
-            - description: PHY common block reset.
-            - description: PHY's ahb cfg block reset.
-        reset-names:
-          items:
-            - const: phy
-            - const: common
-            - const: cfg
-      required:
-        - vdda-phy-supply
-        - vdda-pll-supply
   - if:
       properties:
         compatible:
-- 
2.35.1


-- 
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy

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

* [PATCH 07/43] dt-bindings: phy: qcom,msm8996-qmp-pcie: clean up constraints
  2022-07-05  9:41 ` Johan Hovold
@ 2022-07-05  9:42   ` Johan Hovold
  -1 siblings, 0 replies; 178+ messages in thread
From: Johan Hovold @ 2022-07-05  9:42 UTC (permalink / raw)
  To: Vinod Koul, Rob Herring, Krzysztof Kozlowski
  Cc: Andy Gross, Bjorn Andersson, Kishon Vijay Abraham I,
	linux-arm-msm, linux-phy, devicetree, linux-kernel, Johan Hovold

Drop the compatible conditional and tighten the property constraints.

Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
---
 .../phy/qcom,msm8996-qmp-pcie-phy.yaml        | 65 +++++--------------
 1 file changed, 18 insertions(+), 47 deletions(-)

diff --git a/Documentation/devicetree/bindings/phy/qcom,msm8996-qmp-pcie-phy.yaml b/Documentation/devicetree/bindings/phy/qcom,msm8996-qmp-pcie-phy.yaml
index 14fd86fd91ec..b73bf5c06358 100644
--- a/Documentation/devicetree/bindings/phy/qcom,msm8996-qmp-pcie-phy.yaml
+++ b/Documentation/devicetree/bindings/phy/qcom,msm8996-qmp-pcie-phy.yaml
@@ -19,10 +19,8 @@ properties:
     const: qcom,msm8996-qmp-pcie-phy
 
   reg:
-    minItems: 1
     items:
       - description: Address and length of PHY's common serdes block.
-      - description: Address and length of PHY's DP_COM control block.
 
   "#address-cells":
     enum: [ 1, 2 ]
@@ -33,20 +31,28 @@ properties:
   ranges: true
 
   clocks:
-    minItems: 1
-    maxItems: 4
+    items:
+      - description: PHY aux clock.
+      - description: PHY config clock.
+      - description: 19.2 MHz ref clock.
 
   clock-names:
-    minItems: 1
-    maxItems: 4
+    items:
+      - const: aux
+      - const: cfg_ahb
+      - const: ref
 
   resets:
-    minItems: 1
-    maxItems: 3
+    items:
+      - description: Reset of PHY block.
+      - description: PHY common block reset.
+      - description: PHY's ahb cfg block reset.
 
   reset-names:
-    minItems: 1
-    maxItems: 3
+    items:
+      - const: phy
+      - const: common
+      - const: cfg
 
   vdda-phy-supply:
     description:
@@ -56,10 +62,6 @@ properties:
     description:
       Phandle to 1.8V regulator supply to PHY refclk pll block.
 
-  vddp-ref-clk-supply:
-    description:
-      Phandle to a regulator supply to any specific refclk pll block.
-
 patternProperties:
   "^phy@[0-9a-f]+$":
     type: object
@@ -77,38 +79,7 @@ required:
   - clock-names
   - resets
   - reset-names
+  - vdda-phy-supply
+  - vdda-pll-supply
 
 additionalProperties: false
-
-allOf:
-  - if:
-      properties:
-        compatible:
-          contains:
-            enum:
-              - qcom,msm8996-qmp-pcie-phy
-    then:
-      properties:
-        clocks:
-          items:
-            - description: PHY aux clock.
-            - description: PHY config clock.
-            - description: 19.2 MHz ref clock.
-        clock-names:
-          items:
-            - const: aux
-            - const: cfg_ahb
-            - const: ref
-        resets:
-          items:
-            - description: Reset of PHY block.
-            - description: PHY common block reset.
-            - description: PHY's ahb cfg block reset.
-        reset-names:
-          items:
-            - const: phy
-            - const: common
-            - const: cfg
-      required:
-        - vdda-phy-supply
-        - vdda-pll-supply
-- 
2.35.1


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

* [PATCH 07/43] dt-bindings: phy: qcom,msm8996-qmp-pcie: clean up constraints
@ 2022-07-05  9:42   ` Johan Hovold
  0 siblings, 0 replies; 178+ messages in thread
From: Johan Hovold @ 2022-07-05  9:42 UTC (permalink / raw)
  To: Vinod Koul, Rob Herring, Krzysztof Kozlowski
  Cc: Andy Gross, Bjorn Andersson, Kishon Vijay Abraham I,
	linux-arm-msm, linux-phy, devicetree, linux-kernel, Johan Hovold

Drop the compatible conditional and tighten the property constraints.

Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
---
 .../phy/qcom,msm8996-qmp-pcie-phy.yaml        | 65 +++++--------------
 1 file changed, 18 insertions(+), 47 deletions(-)

diff --git a/Documentation/devicetree/bindings/phy/qcom,msm8996-qmp-pcie-phy.yaml b/Documentation/devicetree/bindings/phy/qcom,msm8996-qmp-pcie-phy.yaml
index 14fd86fd91ec..b73bf5c06358 100644
--- a/Documentation/devicetree/bindings/phy/qcom,msm8996-qmp-pcie-phy.yaml
+++ b/Documentation/devicetree/bindings/phy/qcom,msm8996-qmp-pcie-phy.yaml
@@ -19,10 +19,8 @@ properties:
     const: qcom,msm8996-qmp-pcie-phy
 
   reg:
-    minItems: 1
     items:
       - description: Address and length of PHY's common serdes block.
-      - description: Address and length of PHY's DP_COM control block.
 
   "#address-cells":
     enum: [ 1, 2 ]
@@ -33,20 +31,28 @@ properties:
   ranges: true
 
   clocks:
-    minItems: 1
-    maxItems: 4
+    items:
+      - description: PHY aux clock.
+      - description: PHY config clock.
+      - description: 19.2 MHz ref clock.
 
   clock-names:
-    minItems: 1
-    maxItems: 4
+    items:
+      - const: aux
+      - const: cfg_ahb
+      - const: ref
 
   resets:
-    minItems: 1
-    maxItems: 3
+    items:
+      - description: Reset of PHY block.
+      - description: PHY common block reset.
+      - description: PHY's ahb cfg block reset.
 
   reset-names:
-    minItems: 1
-    maxItems: 3
+    items:
+      - const: phy
+      - const: common
+      - const: cfg
 
   vdda-phy-supply:
     description:
@@ -56,10 +62,6 @@ properties:
     description:
       Phandle to 1.8V regulator supply to PHY refclk pll block.
 
-  vddp-ref-clk-supply:
-    description:
-      Phandle to a regulator supply to any specific refclk pll block.
-
 patternProperties:
   "^phy@[0-9a-f]+$":
     type: object
@@ -77,38 +79,7 @@ required:
   - clock-names
   - resets
   - reset-names
+  - vdda-phy-supply
+  - vdda-pll-supply
 
 additionalProperties: false
-
-allOf:
-  - if:
-      properties:
-        compatible:
-          contains:
-            enum:
-              - qcom,msm8996-qmp-pcie-phy
-    then:
-      properties:
-        clocks:
-          items:
-            - description: PHY aux clock.
-            - description: PHY config clock.
-            - description: 19.2 MHz ref clock.
-        clock-names:
-          items:
-            - const: aux
-            - const: cfg_ahb
-            - const: ref
-        resets:
-          items:
-            - description: Reset of PHY block.
-            - description: PHY common block reset.
-            - description: PHY's ahb cfg block reset.
-        reset-names:
-          items:
-            - const: phy
-            - const: common
-            - const: cfg
-      required:
-        - vdda-phy-supply
-        - vdda-pll-supply
-- 
2.35.1


-- 
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy

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

* [PATCH 08/43] dt-bindings: phy: qcom,msm8996-qmp-pcie: add missing child node schema
  2022-07-05  9:41 ` Johan Hovold
@ 2022-07-05  9:42   ` Johan Hovold
  -1 siblings, 0 replies; 178+ messages in thread
From: Johan Hovold @ 2022-07-05  9:42 UTC (permalink / raw)
  To: Vinod Koul, Rob Herring, Krzysztof Kozlowski
  Cc: Andy Gross, Bjorn Andersson, Kishon Vijay Abraham I,
	linux-arm-msm, linux-phy, devicetree, linux-kernel, Johan Hovold

Add the missing the description of the PHY-provider child nodes which
were ignored when converting to DT schema.

Also fix up the description that claimed that one child node per lane
(rather than PHY) was required.

Fixes: ccf51c1cedfd ("dt-bindings: phy: qcom,qmp: Convert QMP PHY bindings to yaml")
Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
---
 .../phy/qcom,msm8996-qmp-pcie-phy.yaml        | 51 ++++++++++++++++++-
 1 file changed, 49 insertions(+), 2 deletions(-)

diff --git a/Documentation/devicetree/bindings/phy/qcom,msm8996-qmp-pcie-phy.yaml b/Documentation/devicetree/bindings/phy/qcom,msm8996-qmp-pcie-phy.yaml
index b73bf5c06358..8aadb25686b2 100644
--- a/Documentation/devicetree/bindings/phy/qcom,msm8996-qmp-pcie-phy.yaml
+++ b/Documentation/devicetree/bindings/phy/qcom,msm8996-qmp-pcie-phy.yaml
@@ -66,8 +66,55 @@ patternProperties:
   "^phy@[0-9a-f]+$":
     type: object
     description:
-      Each device node of QMP PHY is required to have as many child nodes as
-      the number of lanes the PHY has.
+      One child node per PHY provided by this block.
+    properties:
+      reg:
+        items:
+          - description: TX
+          - description: RX
+          - description: PCS
+
+      clocks:
+        items:
+          - description: PIPE clock
+
+      clock-names:
+        items:
+          - enum:
+              - pipe0
+              - pipe1
+              - pipe2
+
+      resets:
+        items:
+          - description: PHY (lane) reset
+
+      reset-names:
+        items:
+          - enum:
+              - lane0
+              - lane1
+              - lane2
+
+      "#clock-cells":
+        const: 0
+
+      clock-output-names: true
+
+      "#phy-cells":
+        const: 0
+
+    required:
+      - reg
+      - clocks
+      - clock-names
+      - resets
+      - reset-names
+      - "#clock-cells"
+      - clock-output-names
+      - "#phy-cells"
+
+    additionalProperties: false
 
 required:
   - compatible
-- 
2.35.1


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

* [PATCH 08/43] dt-bindings: phy: qcom,msm8996-qmp-pcie: add missing child node schema
@ 2022-07-05  9:42   ` Johan Hovold
  0 siblings, 0 replies; 178+ messages in thread
From: Johan Hovold @ 2022-07-05  9:42 UTC (permalink / raw)
  To: Vinod Koul, Rob Herring, Krzysztof Kozlowski
  Cc: Andy Gross, Bjorn Andersson, Kishon Vijay Abraham I,
	linux-arm-msm, linux-phy, devicetree, linux-kernel, Johan Hovold

Add the missing the description of the PHY-provider child nodes which
were ignored when converting to DT schema.

Also fix up the description that claimed that one child node per lane
(rather than PHY) was required.

Fixes: ccf51c1cedfd ("dt-bindings: phy: qcom,qmp: Convert QMP PHY bindings to yaml")
Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
---
 .../phy/qcom,msm8996-qmp-pcie-phy.yaml        | 51 ++++++++++++++++++-
 1 file changed, 49 insertions(+), 2 deletions(-)

diff --git a/Documentation/devicetree/bindings/phy/qcom,msm8996-qmp-pcie-phy.yaml b/Documentation/devicetree/bindings/phy/qcom,msm8996-qmp-pcie-phy.yaml
index b73bf5c06358..8aadb25686b2 100644
--- a/Documentation/devicetree/bindings/phy/qcom,msm8996-qmp-pcie-phy.yaml
+++ b/Documentation/devicetree/bindings/phy/qcom,msm8996-qmp-pcie-phy.yaml
@@ -66,8 +66,55 @@ patternProperties:
   "^phy@[0-9a-f]+$":
     type: object
     description:
-      Each device node of QMP PHY is required to have as many child nodes as
-      the number of lanes the PHY has.
+      One child node per PHY provided by this block.
+    properties:
+      reg:
+        items:
+          - description: TX
+          - description: RX
+          - description: PCS
+
+      clocks:
+        items:
+          - description: PIPE clock
+
+      clock-names:
+        items:
+          - enum:
+              - pipe0
+              - pipe1
+              - pipe2
+
+      resets:
+        items:
+          - description: PHY (lane) reset
+
+      reset-names:
+        items:
+          - enum:
+              - lane0
+              - lane1
+              - lane2
+
+      "#clock-cells":
+        const: 0
+
+      clock-output-names: true
+
+      "#phy-cells":
+        const: 0
+
+    required:
+      - reg
+      - clocks
+      - clock-names
+      - resets
+      - reset-names
+      - "#clock-cells"
+      - clock-output-names
+      - "#phy-cells"
+
+    additionalProperties: false
 
 required:
   - compatible
-- 
2.35.1


-- 
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy

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

* [PATCH 09/43] dt-bindings: phy: qcom,msm8996-qmp-pcie: add example node
  2022-07-05  9:41 ` Johan Hovold
@ 2022-07-05  9:42   ` Johan Hovold
  -1 siblings, 0 replies; 178+ messages in thread
From: Johan Hovold @ 2022-07-05  9:42 UTC (permalink / raw)
  To: Vinod Koul, Rob Herring, Krzysztof Kozlowski
  Cc: Andy Gross, Bjorn Andersson, Kishon Vijay Abraham I,
	linux-arm-msm, linux-phy, devicetree, linux-kernel, Johan Hovold

Add an example node based on a cleaned up version of msm8996.dtsi.

Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
---
 .../phy/qcom,msm8996-qmp-pcie-phy.yaml        | 72 +++++++++++++++++++
 1 file changed, 72 insertions(+)

diff --git a/Documentation/devicetree/bindings/phy/qcom,msm8996-qmp-pcie-phy.yaml b/Documentation/devicetree/bindings/phy/qcom,msm8996-qmp-pcie-phy.yaml
index 8aadb25686b2..45f7bb7a632a 100644
--- a/Documentation/devicetree/bindings/phy/qcom,msm8996-qmp-pcie-phy.yaml
+++ b/Documentation/devicetree/bindings/phy/qcom,msm8996-qmp-pcie-phy.yaml
@@ -130,3 +130,75 @@ required:
   - vdda-pll-supply
 
 additionalProperties: false
+
+examples:
+  - |
+    #include <dt-bindings/clock/qcom,gcc-msm8996.h>
+    pcie_phy: phy-wrapper@34000 {
+        compatible = "qcom,msm8996-qmp-pcie-phy";
+        reg = <0x34000 0x488>;
+        #address-cells = <1>;
+        #size-cells = <1>;
+        ranges = <0x0 0x34000 0x4000>;
+
+        clocks = <&gcc GCC_PCIE_PHY_AUX_CLK>,
+                 <&gcc GCC_PCIE_PHY_CFG_AHB_CLK>,
+                 <&gcc GCC_PCIE_CLKREF_CLK>;
+        clock-names = "aux", "cfg_ahb", "ref";
+
+        resets = <&gcc GCC_PCIE_PHY_BCR>,
+                 <&gcc GCC_PCIE_PHY_COM_BCR>,
+                 <&gcc GCC_PCIE_PHY_COM_NOCSR_BCR>;
+        reset-names = "phy", "common", "cfg";
+
+        vdda-phy-supply = <&vreg_l28a_0p925>;
+        vdda-pll-supply = <&vreg_l12a_1p8>;
+
+        pciephy_0: phy@1000 {
+            reg = <0x1000 0x130>,
+                  <0x1200 0x200>,
+                  <0x1400 0x1dc>;
+
+            clocks = <&gcc GCC_PCIE_0_PIPE_CLK>;
+            clock-names = "pipe0";
+            resets = <&gcc GCC_PCIE_0_PHY_BCR>;
+            reset-names = "lane0";
+
+            #clock-cells = <0>;
+            clock-output-names = "pcie_0_pipe_clk_src";
+
+            #phy-cells = <0>;
+        };
+
+        pciephy_1: phy@2000 {
+            reg = <0x2000 0x130>,
+                  <0x2200 0x200>,
+                  <0x2400 0x1dc>;
+
+            clocks = <&gcc GCC_PCIE_1_PIPE_CLK>;
+            clock-names = "pipe1";
+            resets = <&gcc GCC_PCIE_1_PHY_BCR>;
+            reset-names = "lane1";
+
+            #clock-cells = <0>;
+            clock-output-names = "pcie_1_pipe_clk_src";
+
+            #phy-cells = <0>;
+        };
+
+        pciephy_2: phy@3000 {
+            reg = <0x3000 0x130>,
+                  <0x3200 0x200>,
+                  <0x3400 0x1dc>;
+
+            clocks = <&gcc GCC_PCIE_2_PIPE_CLK>;
+            clock-names = "pipe2";
+            resets = <&gcc GCC_PCIE_2_PHY_BCR>;
+            reset-names = "lane2";
+
+            #clock-cells = <0>;
+            clock-output-names = "pcie_2_pipe_clk_src";
+
+            #phy-cells = <0>;
+        };
+    };
-- 
2.35.1


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

* [PATCH 09/43] dt-bindings: phy: qcom,msm8996-qmp-pcie: add example node
@ 2022-07-05  9:42   ` Johan Hovold
  0 siblings, 0 replies; 178+ messages in thread
From: Johan Hovold @ 2022-07-05  9:42 UTC (permalink / raw)
  To: Vinod Koul, Rob Herring, Krzysztof Kozlowski
  Cc: Andy Gross, Bjorn Andersson, Kishon Vijay Abraham I,
	linux-arm-msm, linux-phy, devicetree, linux-kernel, Johan Hovold

Add an example node based on a cleaned up version of msm8996.dtsi.

Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
---
 .../phy/qcom,msm8996-qmp-pcie-phy.yaml        | 72 +++++++++++++++++++
 1 file changed, 72 insertions(+)

diff --git a/Documentation/devicetree/bindings/phy/qcom,msm8996-qmp-pcie-phy.yaml b/Documentation/devicetree/bindings/phy/qcom,msm8996-qmp-pcie-phy.yaml
index 8aadb25686b2..45f7bb7a632a 100644
--- a/Documentation/devicetree/bindings/phy/qcom,msm8996-qmp-pcie-phy.yaml
+++ b/Documentation/devicetree/bindings/phy/qcom,msm8996-qmp-pcie-phy.yaml
@@ -130,3 +130,75 @@ required:
   - vdda-pll-supply
 
 additionalProperties: false
+
+examples:
+  - |
+    #include <dt-bindings/clock/qcom,gcc-msm8996.h>
+    pcie_phy: phy-wrapper@34000 {
+        compatible = "qcom,msm8996-qmp-pcie-phy";
+        reg = <0x34000 0x488>;
+        #address-cells = <1>;
+        #size-cells = <1>;
+        ranges = <0x0 0x34000 0x4000>;
+
+        clocks = <&gcc GCC_PCIE_PHY_AUX_CLK>,
+                 <&gcc GCC_PCIE_PHY_CFG_AHB_CLK>,
+                 <&gcc GCC_PCIE_CLKREF_CLK>;
+        clock-names = "aux", "cfg_ahb", "ref";
+
+        resets = <&gcc GCC_PCIE_PHY_BCR>,
+                 <&gcc GCC_PCIE_PHY_COM_BCR>,
+                 <&gcc GCC_PCIE_PHY_COM_NOCSR_BCR>;
+        reset-names = "phy", "common", "cfg";
+
+        vdda-phy-supply = <&vreg_l28a_0p925>;
+        vdda-pll-supply = <&vreg_l12a_1p8>;
+
+        pciephy_0: phy@1000 {
+            reg = <0x1000 0x130>,
+                  <0x1200 0x200>,
+                  <0x1400 0x1dc>;
+
+            clocks = <&gcc GCC_PCIE_0_PIPE_CLK>;
+            clock-names = "pipe0";
+            resets = <&gcc GCC_PCIE_0_PHY_BCR>;
+            reset-names = "lane0";
+
+            #clock-cells = <0>;
+            clock-output-names = "pcie_0_pipe_clk_src";
+
+            #phy-cells = <0>;
+        };
+
+        pciephy_1: phy@2000 {
+            reg = <0x2000 0x130>,
+                  <0x2200 0x200>,
+                  <0x2400 0x1dc>;
+
+            clocks = <&gcc GCC_PCIE_1_PIPE_CLK>;
+            clock-names = "pipe1";
+            resets = <&gcc GCC_PCIE_1_PHY_BCR>;
+            reset-names = "lane1";
+
+            #clock-cells = <0>;
+            clock-output-names = "pcie_1_pipe_clk_src";
+
+            #phy-cells = <0>;
+        };
+
+        pciephy_2: phy@3000 {
+            reg = <0x3000 0x130>,
+                  <0x3200 0x200>,
+                  <0x3400 0x1dc>;
+
+            clocks = <&gcc GCC_PCIE_2_PIPE_CLK>;
+            clock-names = "pipe2";
+            resets = <&gcc GCC_PCIE_2_PHY_BCR>;
+            reset-names = "lane2";
+
+            #clock-cells = <0>;
+            clock-output-names = "pcie_2_pipe_clk_src";
+
+            #phy-cells = <0>;
+        };
+    };
-- 
2.35.1


-- 
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy

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

* [PATCH 10/43] dt-bindings: phy: qcom,msm8996-qmp-pcie: deprecate PIPE clock names
  2022-07-05  9:41 ` Johan Hovold
@ 2022-07-05  9:42   ` Johan Hovold
  -1 siblings, 0 replies; 178+ messages in thread
From: Johan Hovold @ 2022-07-05  9:42 UTC (permalink / raw)
  To: Vinod Koul, Rob Herring, Krzysztof Kozlowski
  Cc: Andy Gross, Bjorn Andersson, Kishon Vijay Abraham I,
	linux-arm-msm, linux-phy, devicetree, linux-kernel, Johan Hovold

Drop the unnecessary "lane" suffix from the PHY PIPE clock names and
mark the old names as deprecated.

Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
---
 .../phy/qcom,msm8996-qmp-pcie-phy.yaml        | 20 +++++++++++--------
 1 file changed, 12 insertions(+), 8 deletions(-)

diff --git a/Documentation/devicetree/bindings/phy/qcom,msm8996-qmp-pcie-phy.yaml b/Documentation/devicetree/bindings/phy/qcom,msm8996-qmp-pcie-phy.yaml
index 45f7bb7a632a..7931b1fd1476 100644
--- a/Documentation/devicetree/bindings/phy/qcom,msm8996-qmp-pcie-phy.yaml
+++ b/Documentation/devicetree/bindings/phy/qcom,msm8996-qmp-pcie-phy.yaml
@@ -79,11 +79,15 @@ patternProperties:
           - description: PIPE clock
 
       clock-names:
-        items:
-          - enum:
-              - pipe0
-              - pipe1
-              - pipe2
+        oneOf:
+          - items:
+              - const: pipe
+          - items:
+              - enum:
+                  - pipe0
+                  - pipe1
+                  - pipe2
+            deprecated: true
 
       resets:
         items:
@@ -160,7 +164,7 @@ examples:
                   <0x1400 0x1dc>;
 
             clocks = <&gcc GCC_PCIE_0_PIPE_CLK>;
-            clock-names = "pipe0";
+            clock-names = "pipe";
             resets = <&gcc GCC_PCIE_0_PHY_BCR>;
             reset-names = "lane0";
 
@@ -176,7 +180,7 @@ examples:
                   <0x2400 0x1dc>;
 
             clocks = <&gcc GCC_PCIE_1_PIPE_CLK>;
-            clock-names = "pipe1";
+            clock-names = "pipe";
             resets = <&gcc GCC_PCIE_1_PHY_BCR>;
             reset-names = "lane1";
 
@@ -192,7 +196,7 @@ examples:
                   <0x3400 0x1dc>;
 
             clocks = <&gcc GCC_PCIE_2_PIPE_CLK>;
-            clock-names = "pipe2";
+            clock-names = "pipe";
             resets = <&gcc GCC_PCIE_2_PHY_BCR>;
             reset-names = "lane2";
 
-- 
2.35.1


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

* [PATCH 10/43] dt-bindings: phy: qcom,msm8996-qmp-pcie: deprecate PIPE clock names
@ 2022-07-05  9:42   ` Johan Hovold
  0 siblings, 0 replies; 178+ messages in thread
From: Johan Hovold @ 2022-07-05  9:42 UTC (permalink / raw)
  To: Vinod Koul, Rob Herring, Krzysztof Kozlowski
  Cc: Andy Gross, Bjorn Andersson, Kishon Vijay Abraham I,
	linux-arm-msm, linux-phy, devicetree, linux-kernel, Johan Hovold

Drop the unnecessary "lane" suffix from the PHY PIPE clock names and
mark the old names as deprecated.

Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
---
 .../phy/qcom,msm8996-qmp-pcie-phy.yaml        | 20 +++++++++++--------
 1 file changed, 12 insertions(+), 8 deletions(-)

diff --git a/Documentation/devicetree/bindings/phy/qcom,msm8996-qmp-pcie-phy.yaml b/Documentation/devicetree/bindings/phy/qcom,msm8996-qmp-pcie-phy.yaml
index 45f7bb7a632a..7931b1fd1476 100644
--- a/Documentation/devicetree/bindings/phy/qcom,msm8996-qmp-pcie-phy.yaml
+++ b/Documentation/devicetree/bindings/phy/qcom,msm8996-qmp-pcie-phy.yaml
@@ -79,11 +79,15 @@ patternProperties:
           - description: PIPE clock
 
       clock-names:
-        items:
-          - enum:
-              - pipe0
-              - pipe1
-              - pipe2
+        oneOf:
+          - items:
+              - const: pipe
+          - items:
+              - enum:
+                  - pipe0
+                  - pipe1
+                  - pipe2
+            deprecated: true
 
       resets:
         items:
@@ -160,7 +164,7 @@ examples:
                   <0x1400 0x1dc>;
 
             clocks = <&gcc GCC_PCIE_0_PIPE_CLK>;
-            clock-names = "pipe0";
+            clock-names = "pipe";
             resets = <&gcc GCC_PCIE_0_PHY_BCR>;
             reset-names = "lane0";
 
@@ -176,7 +180,7 @@ examples:
                   <0x2400 0x1dc>;
 
             clocks = <&gcc GCC_PCIE_1_PIPE_CLK>;
-            clock-names = "pipe1";
+            clock-names = "pipe";
             resets = <&gcc GCC_PCIE_1_PHY_BCR>;
             reset-names = "lane1";
 
@@ -192,7 +196,7 @@ examples:
                   <0x3400 0x1dc>;
 
             clocks = <&gcc GCC_PCIE_2_PIPE_CLK>;
-            clock-names = "pipe2";
+            clock-names = "pipe";
             resets = <&gcc GCC_PCIE_2_PHY_BCR>;
             reset-names = "lane2";
 
-- 
2.35.1


-- 
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy

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

* [PATCH 11/43] dt-bindings: phy: qcom,msm8996-qmp-pcie: deprecate reset names
  2022-07-05  9:41 ` Johan Hovold
@ 2022-07-05  9:42   ` Johan Hovold
  -1 siblings, 0 replies; 178+ messages in thread
From: Johan Hovold @ 2022-07-05  9:42 UTC (permalink / raw)
  To: Vinod Koul, Rob Herring, Krzysztof Kozlowski
  Cc: Andy Gross, Bjorn Andersson, Kishon Vijay Abraham I,
	linux-arm-msm, linux-phy, devicetree, linux-kernel, Johan Hovold

Drop the unnecessary "lane" suffix from the PHY reset names and mark the
old names as deprecated.

Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
---
 .../phy/qcom,msm8996-qmp-pcie-phy.yaml        | 20 +++++++++++--------
 1 file changed, 12 insertions(+), 8 deletions(-)

diff --git a/Documentation/devicetree/bindings/phy/qcom,msm8996-qmp-pcie-phy.yaml b/Documentation/devicetree/bindings/phy/qcom,msm8996-qmp-pcie-phy.yaml
index 7931b1fd1476..0bea8270b37e 100644
--- a/Documentation/devicetree/bindings/phy/qcom,msm8996-qmp-pcie-phy.yaml
+++ b/Documentation/devicetree/bindings/phy/qcom,msm8996-qmp-pcie-phy.yaml
@@ -94,11 +94,15 @@ patternProperties:
           - description: PHY (lane) reset
 
       reset-names:
-        items:
-          - enum:
-              - lane0
-              - lane1
-              - lane2
+        oneOf:
+          - items:
+              - const: lane
+          - items:
+              - enum:
+                  - lane0
+                  - lane1
+                  - lane2
+            deprecated: true
 
       "#clock-cells":
         const: 0
@@ -166,7 +170,7 @@ examples:
             clocks = <&gcc GCC_PCIE_0_PIPE_CLK>;
             clock-names = "pipe";
             resets = <&gcc GCC_PCIE_0_PHY_BCR>;
-            reset-names = "lane0";
+            reset-names = "lane";
 
             #clock-cells = <0>;
             clock-output-names = "pcie_0_pipe_clk_src";
@@ -182,7 +186,7 @@ examples:
             clocks = <&gcc GCC_PCIE_1_PIPE_CLK>;
             clock-names = "pipe";
             resets = <&gcc GCC_PCIE_1_PHY_BCR>;
-            reset-names = "lane1";
+            reset-names = "lane";
 
             #clock-cells = <0>;
             clock-output-names = "pcie_1_pipe_clk_src";
@@ -198,7 +202,7 @@ examples:
             clocks = <&gcc GCC_PCIE_2_PIPE_CLK>;
             clock-names = "pipe";
             resets = <&gcc GCC_PCIE_2_PHY_BCR>;
-            reset-names = "lane2";
+            reset-names = "lane";
 
             #clock-cells = <0>;
             clock-output-names = "pcie_2_pipe_clk_src";
-- 
2.35.1


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

* [PATCH 11/43] dt-bindings: phy: qcom,msm8996-qmp-pcie: deprecate reset names
@ 2022-07-05  9:42   ` Johan Hovold
  0 siblings, 0 replies; 178+ messages in thread
From: Johan Hovold @ 2022-07-05  9:42 UTC (permalink / raw)
  To: Vinod Koul, Rob Herring, Krzysztof Kozlowski
  Cc: Andy Gross, Bjorn Andersson, Kishon Vijay Abraham I,
	linux-arm-msm, linux-phy, devicetree, linux-kernel, Johan Hovold

Drop the unnecessary "lane" suffix from the PHY reset names and mark the
old names as deprecated.

Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
---
 .../phy/qcom,msm8996-qmp-pcie-phy.yaml        | 20 +++++++++++--------
 1 file changed, 12 insertions(+), 8 deletions(-)

diff --git a/Documentation/devicetree/bindings/phy/qcom,msm8996-qmp-pcie-phy.yaml b/Documentation/devicetree/bindings/phy/qcom,msm8996-qmp-pcie-phy.yaml
index 7931b1fd1476..0bea8270b37e 100644
--- a/Documentation/devicetree/bindings/phy/qcom,msm8996-qmp-pcie-phy.yaml
+++ b/Documentation/devicetree/bindings/phy/qcom,msm8996-qmp-pcie-phy.yaml
@@ -94,11 +94,15 @@ patternProperties:
           - description: PHY (lane) reset
 
       reset-names:
-        items:
-          - enum:
-              - lane0
-              - lane1
-              - lane2
+        oneOf:
+          - items:
+              - const: lane
+          - items:
+              - enum:
+                  - lane0
+                  - lane1
+                  - lane2
+            deprecated: true
 
       "#clock-cells":
         const: 0
@@ -166,7 +170,7 @@ examples:
             clocks = <&gcc GCC_PCIE_0_PIPE_CLK>;
             clock-names = "pipe";
             resets = <&gcc GCC_PCIE_0_PHY_BCR>;
-            reset-names = "lane0";
+            reset-names = "lane";
 
             #clock-cells = <0>;
             clock-output-names = "pcie_0_pipe_clk_src";
@@ -182,7 +186,7 @@ examples:
             clocks = <&gcc GCC_PCIE_1_PIPE_CLK>;
             clock-names = "pipe";
             resets = <&gcc GCC_PCIE_1_PHY_BCR>;
-            reset-names = "lane1";
+            reset-names = "lane";
 
             #clock-cells = <0>;
             clock-output-names = "pcie_1_pipe_clk_src";
@@ -198,7 +202,7 @@ examples:
             clocks = <&gcc GCC_PCIE_2_PIPE_CLK>;
             clock-names = "pipe";
             resets = <&gcc GCC_PCIE_2_PHY_BCR>;
-            reset-names = "lane2";
+            reset-names = "lane";
 
             #clock-cells = <0>;
             clock-output-names = "pcie_2_pipe_clk_src";
-- 
2.35.1


-- 
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy

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

* [PATCH 12/43] dt-bindings: phy: qcom,qmp: split out PCIe PHY binding
  2022-07-05  9:41 ` Johan Hovold
@ 2022-07-05  9:42   ` Johan Hovold
  -1 siblings, 0 replies; 178+ messages in thread
From: Johan Hovold @ 2022-07-05  9:42 UTC (permalink / raw)
  To: Vinod Koul, Rob Herring, Krzysztof Kozlowski
  Cc: Andy Gross, Bjorn Andersson, Kishon Vijay Abraham I,
	linux-arm-msm, linux-phy, devicetree, linux-kernel, Johan Hovold

The QMP PHY DT schema is getting unwieldy. Break out the PCIe PHY
binding in a separate file.

Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
---
 .../bindings/phy/qcom,qmp-pcie-phy.yaml       | 188 ++++++++++++++++++
 .../devicetree/bindings/phy/qcom,qmp-phy.yaml |  75 -------
 2 files changed, 188 insertions(+), 75 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/phy/qcom,qmp-pcie-phy.yaml

diff --git a/Documentation/devicetree/bindings/phy/qcom,qmp-pcie-phy.yaml b/Documentation/devicetree/bindings/phy/qcom,qmp-pcie-phy.yaml
new file mode 100644
index 000000000000..d1d4a468acc3
--- /dev/null
+++ b/Documentation/devicetree/bindings/phy/qcom,qmp-pcie-phy.yaml
@@ -0,0 +1,188 @@
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+
+%YAML 1.2
+---
+$id: "http://devicetree.org/schemas/phy/qcom,qmp-pcie-phy.yaml#"
+$schema: "http://devicetree.org/meta-schemas/core.yaml#"
+
+title: Qualcomm QMP PHY controller (PCIe)
+
+maintainers:
+  - Vinod Koul <vkoul@kernel.org>
+
+description:
+  QMP PHY controller supports physical layer functionality for a number of
+  controllers on Qualcomm chipsets, such as, PCIe, UFS, and USB.
+
+properties:
+  compatible:
+    enum:
+      - qcom,ipq6018-qmp-pcie-phy
+      - qcom,ipq8074-qmp-pcie-phy
+      - qcom,msm8998-qmp-pcie-phy
+      - qcom,sc8180x-qmp-pcie-phy
+      - qcom,sdm845-qhp-pcie-phy
+      - qcom,sdm845-qmp-pcie-phy
+      - qcom,sdx55-qmp-pcie-phy
+      - qcom,sm8250-qmp-gen3x1-pcie-phy
+      - qcom,sm8250-qmp-gen3x2-pcie-phy
+      - qcom,sm8250-qmp-modem-pcie-phy
+      - qcom,sm8450-qmp-gen3x1-pcie-phy
+      - qcom,sm8450-qmp-gen4x2-pcie-phy
+
+  reg:
+    minItems: 1
+    items:
+      - description: Address and length of PHY's common serdes block.
+      - description: Address and length of PHY's DP_COM control block.
+
+  "#address-cells":
+    enum: [ 1, 2 ]
+
+  "#size-cells":
+    enum: [ 1, 2 ]
+
+  ranges: true
+
+  clocks:
+    minItems: 1
+    maxItems: 4
+
+  clock-names:
+    minItems: 1
+    maxItems: 4
+
+  resets:
+    minItems: 1
+    maxItems: 3
+
+  reset-names:
+    minItems: 1
+    maxItems: 3
+
+  vdda-phy-supply:
+    description:
+      Phandle to a regulator supply to PHY core block.
+
+  vdda-pll-supply:
+    description:
+      Phandle to 1.8V regulator supply to PHY refclk pll block.
+
+  vddp-ref-clk-supply:
+    description:
+      Phandle to a regulator supply to any specific refclk pll block.
+
+patternProperties:
+  "^phy@[0-9a-f]+$":
+    type: object
+    description:
+      Each device node of QMP PHY is required to have as many child nodes as
+      the number of lanes the PHY has.
+
+required:
+  - compatible
+  - reg
+  - "#address-cells"
+  - "#size-cells"
+  - ranges
+  - clocks
+  - clock-names
+  - resets
+  - reset-names
+
+additionalProperties: false
+
+allOf:
+  - if:
+      properties:
+        compatible:
+          contains:
+            enum:
+              - qcom,msm8998-qmp-pcie-phy
+    then:
+      properties:
+        clocks:
+          items:
+            - description: PHY aux clock.
+            - description: PHY config clock.
+            - description: 19.2 MHz ref clock.
+        clock-names:
+          items:
+            - const: aux
+            - const: cfg_ahb
+            - const: ref
+        resets:
+          items:
+            - description: Reset of PHY block.
+            - description: PHY common block reset.
+        reset-names:
+          items:
+            - const: phy
+            - const: common
+      required:
+        - vdda-phy-supply
+        - vdda-pll-supply
+
+  - if:
+      properties:
+        compatible:
+          contains:
+            enum:
+              - qcom,ipq6018-qmp-pcie-phy
+              - qcom,ipq8074-qmp-pcie-phy
+    then:
+      properties:
+        clocks:
+          items:
+            - description: PHY aux clock.
+            - description: PHY config clock.
+        clock-names:
+          items:
+            - const: aux
+            - const: cfg_ahb
+        resets:
+          items:
+            - description: Reset of PHY block.
+            - description: PHY common block reset.
+        reset-names:
+          items:
+            - const: phy
+            - const: common
+
+  - if:
+      properties:
+        compatible:
+          contains:
+            enum:
+              - qcom,sc8180x-qmp-pcie-phy
+              - qcom,sdm845-qhp-pcie-phy
+              - qcom,sdm845-qmp-pcie-phy
+              - qcom,sdx55-qmp-pcie-phy
+              - qcom,sm8250-qmp-gen3x1-pcie-phy
+              - qcom,sm8250-qmp-gen3x2-pcie-phy
+              - qcom,sm8250-qmp-modem-pcie-phy
+              - qcom,sm8450-qmp-gen3x1-pcie-phy
+              - qcom,sm8450-qmp-gen4x2-pcie-phy
+    then:
+      properties:
+        clocks:
+          items:
+            - description: PHY aux clock.
+            - description: PHY config clock.
+            - description: 19.2 MHz ref clock.
+            - description: PHY refgen clock.
+        clock-names:
+          items:
+            - const: aux
+            - const: cfg_ahb
+            - const: ref
+            - const: refgen
+        resets:
+          items:
+            - description: Reset of PHY block.
+        reset-names:
+          items:
+            - const: phy
+      required:
+        - vdda-phy-supply
+        - vdda-pll-supply
diff --git a/Documentation/devicetree/bindings/phy/qcom,qmp-phy.yaml b/Documentation/devicetree/bindings/phy/qcom,qmp-phy.yaml
index 7a76fd286cee..f416a1a53a3f 100644
--- a/Documentation/devicetree/bindings/phy/qcom,qmp-phy.yaml
+++ b/Documentation/devicetree/bindings/phy/qcom,qmp-phy.yaml
@@ -17,27 +17,20 @@ description:
 properties:
   compatible:
     enum:
-      - qcom,ipq6018-qmp-pcie-phy
       - qcom,ipq6018-qmp-usb3-phy
-      - qcom,ipq8074-qmp-pcie-phy
       - qcom,ipq8074-qmp-usb3-phy
       - qcom,msm8996-qmp-ufs-phy
       - qcom,msm8996-qmp-usb3-phy
-      - qcom,msm8998-qmp-pcie-phy
       - qcom,msm8998-qmp-ufs-phy
       - qcom,msm8998-qmp-usb3-phy
       - qcom,qcm2290-qmp-usb3-phy
       - qcom,sc7180-qmp-usb3-phy
-      - qcom,sc8180x-qmp-pcie-phy
       - qcom,sc8180x-qmp-ufs-phy
       - qcom,sc8180x-qmp-usb3-phy
       - qcom,sc8280xp-qmp-ufs-phy
-      - qcom,sdm845-qhp-pcie-phy
-      - qcom,sdm845-qmp-pcie-phy
       - qcom,sdm845-qmp-ufs-phy
       - qcom,sdm845-qmp-usb3-phy
       - qcom,sdm845-qmp-usb3-uni-phy
-      - qcom,sdx55-qmp-pcie-phy
       - qcom,sdx55-qmp-usb3-uni-phy
       - qcom,sdx65-qmp-usb3-uni-phy
       - qcom,sm6115-qmp-ufs-phy
@@ -45,17 +38,12 @@ properties:
       - qcom,sm8150-qmp-ufs-phy
       - qcom,sm8150-qmp-usb3-phy
       - qcom,sm8150-qmp-usb3-uni-phy
-      - qcom,sm8250-qmp-gen3x1-pcie-phy
-      - qcom,sm8250-qmp-gen3x2-pcie-phy
-      - qcom,sm8250-qmp-modem-pcie-phy
       - qcom,sm8250-qmp-ufs-phy
       - qcom,sm8250-qmp-usb3-phy
       - qcom,sm8250-qmp-usb3-uni-phy
       - qcom,sm8350-qmp-ufs-phy
       - qcom,sm8350-qmp-usb3-phy
       - qcom,sm8350-qmp-usb3-uni-phy
-      - qcom,sm8450-qmp-gen3x1-pcie-phy
-      - qcom,sm8450-qmp-gen4x2-pcie-phy
       - qcom,sm8450-qmp-ufs-phy
       - qcom,sm8450-qmp-usb3-phy
 
@@ -190,7 +178,6 @@ allOf:
             enum:
               - qcom,ipq8074-qmp-usb3-phy
               - qcom,msm8996-qmp-usb3-phy
-              - qcom,msm8998-qmp-pcie-phy
               - qcom,msm8998-qmp-usb3-phy
     then:
       properties:
@@ -269,68 +256,6 @@ allOf:
       required:
         - vdda-phy-supply
         - vdda-pll-supply
-  - if:
-      properties:
-        compatible:
-          contains:
-            enum:
-              - qcom,ipq6018-qmp-pcie-phy
-              - qcom,ipq8074-qmp-pcie-phy
-    then:
-      properties:
-        clocks:
-          items:
-            - description: PHY aux clock.
-            - description: PHY config clock.
-        clock-names:
-          items:
-            - const: aux
-            - const: cfg_ahb
-        resets:
-          items:
-            - description: Reset of PHY block.
-            - description: PHY common block reset.
-        reset-names:
-          items:
-            - const: phy
-            - const: common
-  - if:
-      properties:
-        compatible:
-          contains:
-            enum:
-              - qcom,sc8180x-qmp-pcie-phy
-              - qcom,sdm845-qhp-pcie-phy
-              - qcom,sdm845-qmp-pcie-phy
-              - qcom,sdx55-qmp-pcie-phy
-              - qcom,sm8250-qmp-gen3x1-pcie-phy
-              - qcom,sm8250-qmp-gen3x2-pcie-phy
-              - qcom,sm8250-qmp-modem-pcie-phy
-              - qcom,sm8450-qmp-gen3x1-pcie-phy
-              - qcom,sm8450-qmp-gen4x2-pcie-phy
-    then:
-      properties:
-        clocks:
-          items:
-            - description: PHY aux clock.
-            - description: PHY config clock.
-            - description: 19.2 MHz ref clock.
-            - description: PHY refgen clock.
-        clock-names:
-          items:
-            - const: aux
-            - const: cfg_ahb
-            - const: ref
-            - const: refgen
-        resets:
-          items:
-            - description: Reset of PHY block.
-        reset-names:
-          items:
-            - const: phy
-      required:
-        - vdda-phy-supply
-        - vdda-pll-supply
   - if:
       properties:
         compatible:
-- 
2.35.1


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

* [PATCH 12/43] dt-bindings: phy: qcom,qmp: split out PCIe PHY binding
@ 2022-07-05  9:42   ` Johan Hovold
  0 siblings, 0 replies; 178+ messages in thread
From: Johan Hovold @ 2022-07-05  9:42 UTC (permalink / raw)
  To: Vinod Koul, Rob Herring, Krzysztof Kozlowski
  Cc: Andy Gross, Bjorn Andersson, Kishon Vijay Abraham I,
	linux-arm-msm, linux-phy, devicetree, linux-kernel, Johan Hovold

The QMP PHY DT schema is getting unwieldy. Break out the PCIe PHY
binding in a separate file.

Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
---
 .../bindings/phy/qcom,qmp-pcie-phy.yaml       | 188 ++++++++++++++++++
 .../devicetree/bindings/phy/qcom,qmp-phy.yaml |  75 -------
 2 files changed, 188 insertions(+), 75 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/phy/qcom,qmp-pcie-phy.yaml

diff --git a/Documentation/devicetree/bindings/phy/qcom,qmp-pcie-phy.yaml b/Documentation/devicetree/bindings/phy/qcom,qmp-pcie-phy.yaml
new file mode 100644
index 000000000000..d1d4a468acc3
--- /dev/null
+++ b/Documentation/devicetree/bindings/phy/qcom,qmp-pcie-phy.yaml
@@ -0,0 +1,188 @@
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+
+%YAML 1.2
+---
+$id: "http://devicetree.org/schemas/phy/qcom,qmp-pcie-phy.yaml#"
+$schema: "http://devicetree.org/meta-schemas/core.yaml#"
+
+title: Qualcomm QMP PHY controller (PCIe)
+
+maintainers:
+  - Vinod Koul <vkoul@kernel.org>
+
+description:
+  QMP PHY controller supports physical layer functionality for a number of
+  controllers on Qualcomm chipsets, such as, PCIe, UFS, and USB.
+
+properties:
+  compatible:
+    enum:
+      - qcom,ipq6018-qmp-pcie-phy
+      - qcom,ipq8074-qmp-pcie-phy
+      - qcom,msm8998-qmp-pcie-phy
+      - qcom,sc8180x-qmp-pcie-phy
+      - qcom,sdm845-qhp-pcie-phy
+      - qcom,sdm845-qmp-pcie-phy
+      - qcom,sdx55-qmp-pcie-phy
+      - qcom,sm8250-qmp-gen3x1-pcie-phy
+      - qcom,sm8250-qmp-gen3x2-pcie-phy
+      - qcom,sm8250-qmp-modem-pcie-phy
+      - qcom,sm8450-qmp-gen3x1-pcie-phy
+      - qcom,sm8450-qmp-gen4x2-pcie-phy
+
+  reg:
+    minItems: 1
+    items:
+      - description: Address and length of PHY's common serdes block.
+      - description: Address and length of PHY's DP_COM control block.
+
+  "#address-cells":
+    enum: [ 1, 2 ]
+
+  "#size-cells":
+    enum: [ 1, 2 ]
+
+  ranges: true
+
+  clocks:
+    minItems: 1
+    maxItems: 4
+
+  clock-names:
+    minItems: 1
+    maxItems: 4
+
+  resets:
+    minItems: 1
+    maxItems: 3
+
+  reset-names:
+    minItems: 1
+    maxItems: 3
+
+  vdda-phy-supply:
+    description:
+      Phandle to a regulator supply to PHY core block.
+
+  vdda-pll-supply:
+    description:
+      Phandle to 1.8V regulator supply to PHY refclk pll block.
+
+  vddp-ref-clk-supply:
+    description:
+      Phandle to a regulator supply to any specific refclk pll block.
+
+patternProperties:
+  "^phy@[0-9a-f]+$":
+    type: object
+    description:
+      Each device node of QMP PHY is required to have as many child nodes as
+      the number of lanes the PHY has.
+
+required:
+  - compatible
+  - reg
+  - "#address-cells"
+  - "#size-cells"
+  - ranges
+  - clocks
+  - clock-names
+  - resets
+  - reset-names
+
+additionalProperties: false
+
+allOf:
+  - if:
+      properties:
+        compatible:
+          contains:
+            enum:
+              - qcom,msm8998-qmp-pcie-phy
+    then:
+      properties:
+        clocks:
+          items:
+            - description: PHY aux clock.
+            - description: PHY config clock.
+            - description: 19.2 MHz ref clock.
+        clock-names:
+          items:
+            - const: aux
+            - const: cfg_ahb
+            - const: ref
+        resets:
+          items:
+            - description: Reset of PHY block.
+            - description: PHY common block reset.
+        reset-names:
+          items:
+            - const: phy
+            - const: common
+      required:
+        - vdda-phy-supply
+        - vdda-pll-supply
+
+  - if:
+      properties:
+        compatible:
+          contains:
+            enum:
+              - qcom,ipq6018-qmp-pcie-phy
+              - qcom,ipq8074-qmp-pcie-phy
+    then:
+      properties:
+        clocks:
+          items:
+            - description: PHY aux clock.
+            - description: PHY config clock.
+        clock-names:
+          items:
+            - const: aux
+            - const: cfg_ahb
+        resets:
+          items:
+            - description: Reset of PHY block.
+            - description: PHY common block reset.
+        reset-names:
+          items:
+            - const: phy
+            - const: common
+
+  - if:
+      properties:
+        compatible:
+          contains:
+            enum:
+              - qcom,sc8180x-qmp-pcie-phy
+              - qcom,sdm845-qhp-pcie-phy
+              - qcom,sdm845-qmp-pcie-phy
+              - qcom,sdx55-qmp-pcie-phy
+              - qcom,sm8250-qmp-gen3x1-pcie-phy
+              - qcom,sm8250-qmp-gen3x2-pcie-phy
+              - qcom,sm8250-qmp-modem-pcie-phy
+              - qcom,sm8450-qmp-gen3x1-pcie-phy
+              - qcom,sm8450-qmp-gen4x2-pcie-phy
+    then:
+      properties:
+        clocks:
+          items:
+            - description: PHY aux clock.
+            - description: PHY config clock.
+            - description: 19.2 MHz ref clock.
+            - description: PHY refgen clock.
+        clock-names:
+          items:
+            - const: aux
+            - const: cfg_ahb
+            - const: ref
+            - const: refgen
+        resets:
+          items:
+            - description: Reset of PHY block.
+        reset-names:
+          items:
+            - const: phy
+      required:
+        - vdda-phy-supply
+        - vdda-pll-supply
diff --git a/Documentation/devicetree/bindings/phy/qcom,qmp-phy.yaml b/Documentation/devicetree/bindings/phy/qcom,qmp-phy.yaml
index 7a76fd286cee..f416a1a53a3f 100644
--- a/Documentation/devicetree/bindings/phy/qcom,qmp-phy.yaml
+++ b/Documentation/devicetree/bindings/phy/qcom,qmp-phy.yaml
@@ -17,27 +17,20 @@ description:
 properties:
   compatible:
     enum:
-      - qcom,ipq6018-qmp-pcie-phy
       - qcom,ipq6018-qmp-usb3-phy
-      - qcom,ipq8074-qmp-pcie-phy
       - qcom,ipq8074-qmp-usb3-phy
       - qcom,msm8996-qmp-ufs-phy
       - qcom,msm8996-qmp-usb3-phy
-      - qcom,msm8998-qmp-pcie-phy
       - qcom,msm8998-qmp-ufs-phy
       - qcom,msm8998-qmp-usb3-phy
       - qcom,qcm2290-qmp-usb3-phy
       - qcom,sc7180-qmp-usb3-phy
-      - qcom,sc8180x-qmp-pcie-phy
       - qcom,sc8180x-qmp-ufs-phy
       - qcom,sc8180x-qmp-usb3-phy
       - qcom,sc8280xp-qmp-ufs-phy
-      - qcom,sdm845-qhp-pcie-phy
-      - qcom,sdm845-qmp-pcie-phy
       - qcom,sdm845-qmp-ufs-phy
       - qcom,sdm845-qmp-usb3-phy
       - qcom,sdm845-qmp-usb3-uni-phy
-      - qcom,sdx55-qmp-pcie-phy
       - qcom,sdx55-qmp-usb3-uni-phy
       - qcom,sdx65-qmp-usb3-uni-phy
       - qcom,sm6115-qmp-ufs-phy
@@ -45,17 +38,12 @@ properties:
       - qcom,sm8150-qmp-ufs-phy
       - qcom,sm8150-qmp-usb3-phy
       - qcom,sm8150-qmp-usb3-uni-phy
-      - qcom,sm8250-qmp-gen3x1-pcie-phy
-      - qcom,sm8250-qmp-gen3x2-pcie-phy
-      - qcom,sm8250-qmp-modem-pcie-phy
       - qcom,sm8250-qmp-ufs-phy
       - qcom,sm8250-qmp-usb3-phy
       - qcom,sm8250-qmp-usb3-uni-phy
       - qcom,sm8350-qmp-ufs-phy
       - qcom,sm8350-qmp-usb3-phy
       - qcom,sm8350-qmp-usb3-uni-phy
-      - qcom,sm8450-qmp-gen3x1-pcie-phy
-      - qcom,sm8450-qmp-gen4x2-pcie-phy
       - qcom,sm8450-qmp-ufs-phy
       - qcom,sm8450-qmp-usb3-phy
 
@@ -190,7 +178,6 @@ allOf:
             enum:
               - qcom,ipq8074-qmp-usb3-phy
               - qcom,msm8996-qmp-usb3-phy
-              - qcom,msm8998-qmp-pcie-phy
               - qcom,msm8998-qmp-usb3-phy
     then:
       properties:
@@ -269,68 +256,6 @@ allOf:
       required:
         - vdda-phy-supply
         - vdda-pll-supply
-  - if:
-      properties:
-        compatible:
-          contains:
-            enum:
-              - qcom,ipq6018-qmp-pcie-phy
-              - qcom,ipq8074-qmp-pcie-phy
-    then:
-      properties:
-        clocks:
-          items:
-            - description: PHY aux clock.
-            - description: PHY config clock.
-        clock-names:
-          items:
-            - const: aux
-            - const: cfg_ahb
-        resets:
-          items:
-            - description: Reset of PHY block.
-            - description: PHY common block reset.
-        reset-names:
-          items:
-            - const: phy
-            - const: common
-  - if:
-      properties:
-        compatible:
-          contains:
-            enum:
-              - qcom,sc8180x-qmp-pcie-phy
-              - qcom,sdm845-qhp-pcie-phy
-              - qcom,sdm845-qmp-pcie-phy
-              - qcom,sdx55-qmp-pcie-phy
-              - qcom,sm8250-qmp-gen3x1-pcie-phy
-              - qcom,sm8250-qmp-gen3x2-pcie-phy
-              - qcom,sm8250-qmp-modem-pcie-phy
-              - qcom,sm8450-qmp-gen3x1-pcie-phy
-              - qcom,sm8450-qmp-gen4x2-pcie-phy
-    then:
-      properties:
-        clocks:
-          items:
-            - description: PHY aux clock.
-            - description: PHY config clock.
-            - description: 19.2 MHz ref clock.
-            - description: PHY refgen clock.
-        clock-names:
-          items:
-            - const: aux
-            - const: cfg_ahb
-            - const: ref
-            - const: refgen
-        resets:
-          items:
-            - description: Reset of PHY block.
-        reset-names:
-          items:
-            - const: phy
-      required:
-        - vdda-phy-supply
-        - vdda-pll-supply
   - if:
       properties:
         compatible:
-- 
2.35.1


-- 
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy

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

* [PATCH 13/43] dt-bindings: phy: qcom,qmp-pcie: clean up register constraints
  2022-07-05  9:41 ` Johan Hovold
@ 2022-07-05  9:42   ` Johan Hovold
  -1 siblings, 0 replies; 178+ messages in thread
From: Johan Hovold @ 2022-07-05  9:42 UTC (permalink / raw)
  To: Vinod Koul, Rob Herring, Krzysztof Kozlowski
  Cc: Andy Gross, Bjorn Andersson, Kishon Vijay Abraham I,
	linux-arm-msm, linux-phy, devicetree, linux-kernel, Johan Hovold

Only some USB and combo PHYs have a second dp_com control block.

Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
---
 Documentation/devicetree/bindings/phy/qcom,qmp-pcie-phy.yaml | 2 --
 1 file changed, 2 deletions(-)

diff --git a/Documentation/devicetree/bindings/phy/qcom,qmp-pcie-phy.yaml b/Documentation/devicetree/bindings/phy/qcom,qmp-pcie-phy.yaml
index d1d4a468acc3..7cdc1cce06cf 100644
--- a/Documentation/devicetree/bindings/phy/qcom,qmp-pcie-phy.yaml
+++ b/Documentation/devicetree/bindings/phy/qcom,qmp-pcie-phy.yaml
@@ -31,10 +31,8 @@ properties:
       - qcom,sm8450-qmp-gen4x2-pcie-phy
 
   reg:
-    minItems: 1
     items:
       - description: Address and length of PHY's common serdes block.
-      - description: Address and length of PHY's DP_COM control block.
 
   "#address-cells":
     enum: [ 1, 2 ]
-- 
2.35.1


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

* [PATCH 13/43] dt-bindings: phy: qcom,qmp-pcie: clean up register constraints
@ 2022-07-05  9:42   ` Johan Hovold
  0 siblings, 0 replies; 178+ messages in thread
From: Johan Hovold @ 2022-07-05  9:42 UTC (permalink / raw)
  To: Vinod Koul, Rob Herring, Krzysztof Kozlowski
  Cc: Andy Gross, Bjorn Andersson, Kishon Vijay Abraham I,
	linux-arm-msm, linux-phy, devicetree, linux-kernel, Johan Hovold

Only some USB and combo PHYs have a second dp_com control block.

Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
---
 Documentation/devicetree/bindings/phy/qcom,qmp-pcie-phy.yaml | 2 --
 1 file changed, 2 deletions(-)

diff --git a/Documentation/devicetree/bindings/phy/qcom,qmp-pcie-phy.yaml b/Documentation/devicetree/bindings/phy/qcom,qmp-pcie-phy.yaml
index d1d4a468acc3..7cdc1cce06cf 100644
--- a/Documentation/devicetree/bindings/phy/qcom,qmp-pcie-phy.yaml
+++ b/Documentation/devicetree/bindings/phy/qcom,qmp-pcie-phy.yaml
@@ -31,10 +31,8 @@ properties:
       - qcom,sm8450-qmp-gen4x2-pcie-phy
 
   reg:
-    minItems: 1
     items:
       - description: Address and length of PHY's common serdes block.
-      - description: Address and length of PHY's DP_COM control block.
 
   "#address-cells":
     enum: [ 1, 2 ]
-- 
2.35.1


-- 
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy

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

* [PATCH 14/43] dt-bindings: phy: qcom,qmp-pcie: clean up clock constraints
  2022-07-05  9:41 ` Johan Hovold
@ 2022-07-05  9:42   ` Johan Hovold
  -1 siblings, 0 replies; 178+ messages in thread
From: Johan Hovold @ 2022-07-05  9:42 UTC (permalink / raw)
  To: Vinod Koul, Rob Herring, Krzysztof Kozlowski
  Cc: Andy Gross, Bjorn Andersson, Kishon Vijay Abraham I,
	linux-arm-msm, linux-phy, devicetree, linux-kernel, Johan Hovold

The PCIe PHY binding requires two, three or four clocks.

Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
---
 Documentation/devicetree/bindings/phy/qcom,qmp-pcie-phy.yaml | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/Documentation/devicetree/bindings/phy/qcom,qmp-pcie-phy.yaml b/Documentation/devicetree/bindings/phy/qcom,qmp-pcie-phy.yaml
index 7cdc1cce06cf..0486b2b48d72 100644
--- a/Documentation/devicetree/bindings/phy/qcom,qmp-pcie-phy.yaml
+++ b/Documentation/devicetree/bindings/phy/qcom,qmp-pcie-phy.yaml
@@ -43,11 +43,11 @@ properties:
   ranges: true
 
   clocks:
-    minItems: 1
+    minItems: 2
     maxItems: 4
 
   clock-names:
-    minItems: 1
+    minItems: 2
     maxItems: 4
 
   resets:
-- 
2.35.1


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

* [PATCH 14/43] dt-bindings: phy: qcom,qmp-pcie: clean up clock constraints
@ 2022-07-05  9:42   ` Johan Hovold
  0 siblings, 0 replies; 178+ messages in thread
From: Johan Hovold @ 2022-07-05  9:42 UTC (permalink / raw)
  To: Vinod Koul, Rob Herring, Krzysztof Kozlowski
  Cc: Andy Gross, Bjorn Andersson, Kishon Vijay Abraham I,
	linux-arm-msm, linux-phy, devicetree, linux-kernel, Johan Hovold

The PCIe PHY binding requires two, three or four clocks.

Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
---
 Documentation/devicetree/bindings/phy/qcom,qmp-pcie-phy.yaml | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/Documentation/devicetree/bindings/phy/qcom,qmp-pcie-phy.yaml b/Documentation/devicetree/bindings/phy/qcom,qmp-pcie-phy.yaml
index 7cdc1cce06cf..0486b2b48d72 100644
--- a/Documentation/devicetree/bindings/phy/qcom,qmp-pcie-phy.yaml
+++ b/Documentation/devicetree/bindings/phy/qcom,qmp-pcie-phy.yaml
@@ -43,11 +43,11 @@ properties:
   ranges: true
 
   clocks:
-    minItems: 1
+    minItems: 2
     maxItems: 4
 
   clock-names:
-    minItems: 1
+    minItems: 2
     maxItems: 4
 
   resets:
-- 
2.35.1


-- 
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy

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

* [PATCH 15/43] dt-bindings: phy: qcom,qmp-pcie: clean up reset constraints
  2022-07-05  9:41 ` Johan Hovold
@ 2022-07-05  9:42   ` Johan Hovold
  -1 siblings, 0 replies; 178+ messages in thread
From: Johan Hovold @ 2022-07-05  9:42 UTC (permalink / raw)
  To: Vinod Koul, Rob Herring, Krzysztof Kozlowski
  Cc: Andy Gross, Bjorn Andersson, Kishon Vijay Abraham I,
	linux-arm-msm, linux-phy, devicetree, linux-kernel, Johan Hovold

The PCIe PHY binding requires one or two resets.

Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
---
 Documentation/devicetree/bindings/phy/qcom,qmp-pcie-phy.yaml | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/Documentation/devicetree/bindings/phy/qcom,qmp-pcie-phy.yaml b/Documentation/devicetree/bindings/phy/qcom,qmp-pcie-phy.yaml
index 0486b2b48d72..557cccc8f4dd 100644
--- a/Documentation/devicetree/bindings/phy/qcom,qmp-pcie-phy.yaml
+++ b/Documentation/devicetree/bindings/phy/qcom,qmp-pcie-phy.yaml
@@ -52,11 +52,11 @@ properties:
 
   resets:
     minItems: 1
-    maxItems: 3
+    maxItems: 2
 
   reset-names:
     minItems: 1
-    maxItems: 3
+    maxItems: 2
 
   vdda-phy-supply:
     description:
-- 
2.35.1


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

* [PATCH 15/43] dt-bindings: phy: qcom,qmp-pcie: clean up reset constraints
@ 2022-07-05  9:42   ` Johan Hovold
  0 siblings, 0 replies; 178+ messages in thread
From: Johan Hovold @ 2022-07-05  9:42 UTC (permalink / raw)
  To: Vinod Koul, Rob Herring, Krzysztof Kozlowski
  Cc: Andy Gross, Bjorn Andersson, Kishon Vijay Abraham I,
	linux-arm-msm, linux-phy, devicetree, linux-kernel, Johan Hovold

The PCIe PHY binding requires one or two resets.

Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
---
 Documentation/devicetree/bindings/phy/qcom,qmp-pcie-phy.yaml | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/Documentation/devicetree/bindings/phy/qcom,qmp-pcie-phy.yaml b/Documentation/devicetree/bindings/phy/qcom,qmp-pcie-phy.yaml
index 0486b2b48d72..557cccc8f4dd 100644
--- a/Documentation/devicetree/bindings/phy/qcom,qmp-pcie-phy.yaml
+++ b/Documentation/devicetree/bindings/phy/qcom,qmp-pcie-phy.yaml
@@ -52,11 +52,11 @@ properties:
 
   resets:
     minItems: 1
-    maxItems: 3
+    maxItems: 2
 
   reset-names:
     minItems: 1
-    maxItems: 3
+    maxItems: 2
 
   vdda-phy-supply:
     description:
-- 
2.35.1


-- 
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy

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

* [PATCH 16/43] dt-bindings: phy: qcom,qmp-pcie: drop unused vddp-ref-clk supply
  2022-07-05  9:41 ` Johan Hovold
@ 2022-07-05  9:42   ` Johan Hovold
  -1 siblings, 0 replies; 178+ messages in thread
From: Johan Hovold @ 2022-07-05  9:42 UTC (permalink / raw)
  To: Vinod Koul, Rob Herring, Krzysztof Kozlowski
  Cc: Andy Gross, Bjorn Andersson, Kishon Vijay Abraham I,
	linux-arm-msm, linux-phy, devicetree, linux-kernel, Johan Hovold

Only UFS PHY nodes in mainline have a vddp-ref-clk supply. Drop it from
the PCIe PHY binding.

Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
---
 Documentation/devicetree/bindings/phy/qcom,qmp-pcie-phy.yaml | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/Documentation/devicetree/bindings/phy/qcom,qmp-pcie-phy.yaml b/Documentation/devicetree/bindings/phy/qcom,qmp-pcie-phy.yaml
index 557cccc8f4dd..ff1577f68a00 100644
--- a/Documentation/devicetree/bindings/phy/qcom,qmp-pcie-phy.yaml
+++ b/Documentation/devicetree/bindings/phy/qcom,qmp-pcie-phy.yaml
@@ -66,10 +66,6 @@ properties:
     description:
       Phandle to 1.8V regulator supply to PHY refclk pll block.
 
-  vddp-ref-clk-supply:
-    description:
-      Phandle to a regulator supply to any specific refclk pll block.
-
 patternProperties:
   "^phy@[0-9a-f]+$":
     type: object
-- 
2.35.1


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

* [PATCH 16/43] dt-bindings: phy: qcom,qmp-pcie: drop unused vddp-ref-clk supply
@ 2022-07-05  9:42   ` Johan Hovold
  0 siblings, 0 replies; 178+ messages in thread
From: Johan Hovold @ 2022-07-05  9:42 UTC (permalink / raw)
  To: Vinod Koul, Rob Herring, Krzysztof Kozlowski
  Cc: Andy Gross, Bjorn Andersson, Kishon Vijay Abraham I,
	linux-arm-msm, linux-phy, devicetree, linux-kernel, Johan Hovold

Only UFS PHY nodes in mainline have a vddp-ref-clk supply. Drop it from
the PCIe PHY binding.

Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
---
 Documentation/devicetree/bindings/phy/qcom,qmp-pcie-phy.yaml | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/Documentation/devicetree/bindings/phy/qcom,qmp-pcie-phy.yaml b/Documentation/devicetree/bindings/phy/qcom,qmp-pcie-phy.yaml
index 557cccc8f4dd..ff1577f68a00 100644
--- a/Documentation/devicetree/bindings/phy/qcom,qmp-pcie-phy.yaml
+++ b/Documentation/devicetree/bindings/phy/qcom,qmp-pcie-phy.yaml
@@ -66,10 +66,6 @@ properties:
     description:
       Phandle to 1.8V regulator supply to PHY refclk pll block.
 
-  vddp-ref-clk-supply:
-    description:
-      Phandle to a regulator supply to any specific refclk pll block.
-
 patternProperties:
   "^phy@[0-9a-f]+$":
     type: object
-- 
2.35.1


-- 
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy

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

* [PATCH 17/43] dt-bindings: phy: qcom,qmp-pcie: add missing child node schema
  2022-07-05  9:41 ` Johan Hovold
@ 2022-07-05  9:42   ` Johan Hovold
  -1 siblings, 0 replies; 178+ messages in thread
From: Johan Hovold @ 2022-07-05  9:42 UTC (permalink / raw)
  To: Vinod Koul, Rob Herring, Krzysztof Kozlowski
  Cc: Andy Gross, Bjorn Andersson, Kishon Vijay Abraham I,
	linux-arm-msm, linux-phy, devicetree, linux-kernel, Johan Hovold

Add the missing the description of the PHY-provider child node which was
ignored when converting to DT schema.

Also fix up the incorrect description that claimed that one child node
per lane was required.

Fixes: ccf51c1cedfd ("dt-bindings: phy: qcom,qmp: Convert QMP PHY bindings to yaml")
Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
---
 .../bindings/phy/qcom,qmp-pcie-phy.yaml       | 88 ++++++++++++++++++-
 1 file changed, 85 insertions(+), 3 deletions(-)

diff --git a/Documentation/devicetree/bindings/phy/qcom,qmp-pcie-phy.yaml b/Documentation/devicetree/bindings/phy/qcom,qmp-pcie-phy.yaml
index ff1577f68a00..5a1ebf874559 100644
--- a/Documentation/devicetree/bindings/phy/qcom,qmp-pcie-phy.yaml
+++ b/Documentation/devicetree/bindings/phy/qcom,qmp-pcie-phy.yaml
@@ -69,9 +69,37 @@ properties:
 patternProperties:
   "^phy@[0-9a-f]+$":
     type: object
-    description:
-      Each device node of QMP PHY is required to have as many child nodes as
-      the number of lanes the PHY has.
+    description: Single PHY-provider child node.
+    properties:
+      reg:
+        minItems: 3
+        maxItems: 6
+
+      clocks:
+        items:
+          - description: PIPE clock
+
+      clock-names:
+        items:
+          - const: pipe0
+
+      "#clock-cells":
+        const: 0
+
+      clock-output-names: true
+
+      "#phy-cells":
+        const: 0
+
+    required:
+      - reg
+      - clocks
+      - clock-names
+      - "#clock-cells"
+      - clock-output-names
+      - "#phy-cells"
+
+    additionalProperties: false
 
 required:
   - compatible
@@ -180,3 +208,57 @@ allOf:
       required:
         - vdda-phy-supply
         - vdda-pll-supply
+
+  - if:
+      properties:
+        compatible:
+          contains:
+            enum:
+              - qcom,sm8250-qmp-gen3x2-pcie-phy
+              - qcom,sm8250-qmp-modem-pcie-phy
+              - qcom,sm8450-qmp-gen4x2-pcie-phy
+    then:
+      patternProperties:
+        "^phy@[0-9a-f]+$":
+          properties:
+            reg:
+              items:
+                - description: TX lane 1
+                - description: RX lane 1
+                - description: PCS
+                - description: TX lane 2
+                - description: RX lane 2
+                - description: PCS_MISC
+    else:
+      patternProperties:
+        "^phy@[0-9a-f]+$":
+          properties:
+            reg:
+              minItems: 3
+              maxItems: 4
+              items:
+                - description: TX
+                - description: RX
+                - description: PCS
+                - description: PCS_MISC
+      if:
+        properties:
+          compatible:
+            contains:
+              enum:
+                - qcom,ipq6018-qmp-pcie-phy
+                - qcom,ipq8074-qmp-pcie-phy
+                - qcom,msm8998-qmp-pcie-phy
+                - qcom,sdm845-qhp-pcie-phy
+      then:
+        patternProperties:
+          "^phy@[0-9a-f]+$":
+            properties:
+              reg:
+                maxItems: 3
+      else:
+        patternProperties:
+          "^phy@[0-9a-f]+$":
+            properties:
+              reg:
+                minItems: 4
-- 
2.35.1


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

* [PATCH 17/43] dt-bindings: phy: qcom,qmp-pcie: add missing child node schema
@ 2022-07-05  9:42   ` Johan Hovold
  0 siblings, 0 replies; 178+ messages in thread
From: Johan Hovold @ 2022-07-05  9:42 UTC (permalink / raw)
  To: Vinod Koul, Rob Herring, Krzysztof Kozlowski
  Cc: Andy Gross, Bjorn Andersson, Kishon Vijay Abraham I,
	linux-arm-msm, linux-phy, devicetree, linux-kernel, Johan Hovold

Add the missing the description of the PHY-provider child node which was
ignored when converting to DT schema.

Also fix up the incorrect description that claimed that one child node
per lane was required.

Fixes: ccf51c1cedfd ("dt-bindings: phy: qcom,qmp: Convert QMP PHY bindings to yaml")
Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
---
 .../bindings/phy/qcom,qmp-pcie-phy.yaml       | 88 ++++++++++++++++++-
 1 file changed, 85 insertions(+), 3 deletions(-)

diff --git a/Documentation/devicetree/bindings/phy/qcom,qmp-pcie-phy.yaml b/Documentation/devicetree/bindings/phy/qcom,qmp-pcie-phy.yaml
index ff1577f68a00..5a1ebf874559 100644
--- a/Documentation/devicetree/bindings/phy/qcom,qmp-pcie-phy.yaml
+++ b/Documentation/devicetree/bindings/phy/qcom,qmp-pcie-phy.yaml
@@ -69,9 +69,37 @@ properties:
 patternProperties:
   "^phy@[0-9a-f]+$":
     type: object
-    description:
-      Each device node of QMP PHY is required to have as many child nodes as
-      the number of lanes the PHY has.
+    description: Single PHY-provider child node.
+    properties:
+      reg:
+        minItems: 3
+        maxItems: 6
+
+      clocks:
+        items:
+          - description: PIPE clock
+
+      clock-names:
+        items:
+          - const: pipe0
+
+      "#clock-cells":
+        const: 0
+
+      clock-output-names: true
+
+      "#phy-cells":
+        const: 0
+
+    required:
+      - reg
+      - clocks
+      - clock-names
+      - "#clock-cells"
+      - clock-output-names
+      - "#phy-cells"
+
+    additionalProperties: false
 
 required:
   - compatible
@@ -180,3 +208,57 @@ allOf:
       required:
         - vdda-phy-supply
         - vdda-pll-supply
+
+  - if:
+      properties:
+        compatible:
+          contains:
+            enum:
+              - qcom,sm8250-qmp-gen3x2-pcie-phy
+              - qcom,sm8250-qmp-modem-pcie-phy
+              - qcom,sm8450-qmp-gen4x2-pcie-phy
+    then:
+      patternProperties:
+        "^phy@[0-9a-f]+$":
+          properties:
+            reg:
+              items:
+                - description: TX lane 1
+                - description: RX lane 1
+                - description: PCS
+                - description: TX lane 2
+                - description: RX lane 2
+                - description: PCS_MISC
+    else:
+      patternProperties:
+        "^phy@[0-9a-f]+$":
+          properties:
+            reg:
+              minItems: 3
+              maxItems: 4
+              items:
+                - description: TX
+                - description: RX
+                - description: PCS
+                - description: PCS_MISC
+      if:
+        properties:
+          compatible:
+            contains:
+              enum:
+                - qcom,ipq6018-qmp-pcie-phy
+                - qcom,ipq8074-qmp-pcie-phy
+                - qcom,msm8998-qmp-pcie-phy
+                - qcom,sdm845-qhp-pcie-phy
+      then:
+        patternProperties:
+          "^phy@[0-9a-f]+$":
+            properties:
+              reg:
+                maxItems: 3
+      else:
+        patternProperties:
+          "^phy@[0-9a-f]+$":
+            properties:
+              reg:
+                minItems: 4
-- 
2.35.1


-- 
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy

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

* [PATCH 18/43] dt-bindings: phy: qcom,qmp-pcie: add example node
  2022-07-05  9:41 ` Johan Hovold
@ 2022-07-05  9:42   ` Johan Hovold
  -1 siblings, 0 replies; 178+ messages in thread
From: Johan Hovold @ 2022-07-05  9:42 UTC (permalink / raw)
  To: Vinod Koul, Rob Herring, Krzysztof Kozlowski
  Cc: Andy Gross, Bjorn Andersson, Kishon Vijay Abraham I,
	linux-arm-msm, linux-phy, devicetree, linux-kernel, Johan Hovold

Add an example node based on a cleaned up version of sm8250.dtsi.

Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
---
 .../bindings/phy/qcom,qmp-pcie-phy.yaml       | 41 +++++++++++++++++++
 1 file changed, 41 insertions(+)

diff --git a/Documentation/devicetree/bindings/phy/qcom,qmp-pcie-phy.yaml b/Documentation/devicetree/bindings/phy/qcom,qmp-pcie-phy.yaml
index 5a1ebf874559..3fc08af41144 100644
--- a/Documentation/devicetree/bindings/phy/qcom,qmp-pcie-phy.yaml
+++ b/Documentation/devicetree/bindings/phy/qcom,qmp-pcie-phy.yaml
@@ -262,3 +262,44 @@ allOf:
             properties:
               reg:
                 minItems: 4
+
+examples:
+  - |
+    #include <dt-bindings/clock/qcom,gcc-sm8250.h>
+    phy-wrapper@1c0e000 {
+        compatible = "qcom,sm8250-qmp-gen3x2-pcie-phy";
+        reg = <0x01c0e000 0x1c0>;
+        #address-cells = <1>;
+        #size-cells = <1>;
+        ranges = <0x0 0x01c0e000 0x1000>;
+
+        clocks = <&gcc GCC_PCIE_PHY_AUX_CLK>,
+                 <&gcc GCC_PCIE_1_CFG_AHB_CLK>,
+                 <&gcc GCC_PCIE_WIGIG_CLKREF_EN>,
+                 <&gcc GCC_PCIE1_PHY_REFGEN_CLK>;
+
+        clock-names = "aux", "cfg_ahb", "ref", "refgen";
+
+        resets = <&gcc GCC_PCIE_1_PHY_BCR>;
+        reset-names = "phy";
+
+        vdda-phy-supply = <&vreg_l10c_0p88>;
+        vdda-pll-supply = <&vreg_l6b_1p2>;
+
+        phy@200 {
+            reg = <0x200 0x170>,
+                  <0x400 0x200>,
+                  <0xa00 0x1f0>,
+                  <0x600 0x170>,
+                  <0x800 0x200>,
+                  <0xe00 0xf4>;
+
+            clocks = <&gcc GCC_PCIE_1_PIPE_CLK>;
+            clock-names = "pipe0";
+
+            #clock-cells = <0>;
+            clock-output-names = "pcie_1_pipe_clk";
+
+            #phy-cells = <0>;
+        };
+    };
-- 
2.35.1


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

* [PATCH 18/43] dt-bindings: phy: qcom,qmp-pcie: add example node
@ 2022-07-05  9:42   ` Johan Hovold
  0 siblings, 0 replies; 178+ messages in thread
From: Johan Hovold @ 2022-07-05  9:42 UTC (permalink / raw)
  To: Vinod Koul, Rob Herring, Krzysztof Kozlowski
  Cc: Andy Gross, Bjorn Andersson, Kishon Vijay Abraham I,
	linux-arm-msm, linux-phy, devicetree, linux-kernel, Johan Hovold

Add an example node based on a cleaned up version of sm8250.dtsi.

Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
---
 .../bindings/phy/qcom,qmp-pcie-phy.yaml       | 41 +++++++++++++++++++
 1 file changed, 41 insertions(+)

diff --git a/Documentation/devicetree/bindings/phy/qcom,qmp-pcie-phy.yaml b/Documentation/devicetree/bindings/phy/qcom,qmp-pcie-phy.yaml
index 5a1ebf874559..3fc08af41144 100644
--- a/Documentation/devicetree/bindings/phy/qcom,qmp-pcie-phy.yaml
+++ b/Documentation/devicetree/bindings/phy/qcom,qmp-pcie-phy.yaml
@@ -262,3 +262,44 @@ allOf:
             properties:
               reg:
                 minItems: 4
+
+examples:
+  - |
+    #include <dt-bindings/clock/qcom,gcc-sm8250.h>
+    phy-wrapper@1c0e000 {
+        compatible = "qcom,sm8250-qmp-gen3x2-pcie-phy";
+        reg = <0x01c0e000 0x1c0>;
+        #address-cells = <1>;
+        #size-cells = <1>;
+        ranges = <0x0 0x01c0e000 0x1000>;
+
+        clocks = <&gcc GCC_PCIE_PHY_AUX_CLK>,
+                 <&gcc GCC_PCIE_1_CFG_AHB_CLK>,
+                 <&gcc GCC_PCIE_WIGIG_CLKREF_EN>,
+                 <&gcc GCC_PCIE1_PHY_REFGEN_CLK>;
+
+        clock-names = "aux", "cfg_ahb", "ref", "refgen";
+
+        resets = <&gcc GCC_PCIE_1_PHY_BCR>;
+        reset-names = "phy";
+
+        vdda-phy-supply = <&vreg_l10c_0p88>;
+        vdda-pll-supply = <&vreg_l6b_1p2>;
+
+        phy@200 {
+            reg = <0x200 0x170>,
+                  <0x400 0x200>,
+                  <0xa00 0x1f0>,
+                  <0x600 0x170>,
+                  <0x800 0x200>,
+                  <0xe00 0xf4>;
+
+            clocks = <&gcc GCC_PCIE_1_PIPE_CLK>;
+            clock-names = "pipe0";
+
+            #clock-cells = <0>;
+            clock-output-names = "pcie_1_pipe_clk";
+
+            #phy-cells = <0>;
+        };
+    };
-- 
2.35.1


-- 
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy

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

* [PATCH 19/43] dt-bindings: phy: qcom,qmp-pcie: deprecate PIPE clock name
  2022-07-05  9:41 ` Johan Hovold
@ 2022-07-05  9:42   ` Johan Hovold
  -1 siblings, 0 replies; 178+ messages in thread
From: Johan Hovold @ 2022-07-05  9:42 UTC (permalink / raw)
  To: Vinod Koul, Rob Herring, Krzysztof Kozlowski
  Cc: Andy Gross, Bjorn Andersson, Kishon Vijay Abraham I,
	linux-arm-msm, linux-phy, devicetree, linux-kernel, Johan Hovold

Drop the bogus "lane" suffix from the PHY PIPE clock name and mark the
old name as deprecated.

Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
---
 .../devicetree/bindings/phy/qcom,qmp-pcie-phy.yaml     | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/Documentation/devicetree/bindings/phy/qcom,qmp-pcie-phy.yaml b/Documentation/devicetree/bindings/phy/qcom,qmp-pcie-phy.yaml
index 3fc08af41144..32f872de8f4b 100644
--- a/Documentation/devicetree/bindings/phy/qcom,qmp-pcie-phy.yaml
+++ b/Documentation/devicetree/bindings/phy/qcom,qmp-pcie-phy.yaml
@@ -80,8 +80,12 @@ patternProperties:
           - description: PIPE clock
 
       clock-names:
-        items:
-          - const: pipe0
+        oneOf:
+          - items:
+              - const: pipe
+          - items:
+              - const: pipe0
+            deprecated: true
 
       "#clock-cells":
         const: 0
@@ -295,7 +299,7 @@ examples:
                   <0xe00 0xf4>;
 
             clocks = <&gcc GCC_PCIE_1_PIPE_CLK>;
-            clock-names = "pipe0";
+            clock-names = "pipe";
 
             #clock-cells = <0>;
             clock-output-names = "pcie_1_pipe_clk";
-- 
2.35.1


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

* [PATCH 19/43] dt-bindings: phy: qcom,qmp-pcie: deprecate PIPE clock name
@ 2022-07-05  9:42   ` Johan Hovold
  0 siblings, 0 replies; 178+ messages in thread
From: Johan Hovold @ 2022-07-05  9:42 UTC (permalink / raw)
  To: Vinod Koul, Rob Herring, Krzysztof Kozlowski
  Cc: Andy Gross, Bjorn Andersson, Kishon Vijay Abraham I,
	linux-arm-msm, linux-phy, devicetree, linux-kernel, Johan Hovold

Drop the bogus "lane" suffix from the PHY PIPE clock name and mark the
old name as deprecated.

Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
---
 .../devicetree/bindings/phy/qcom,qmp-pcie-phy.yaml     | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/Documentation/devicetree/bindings/phy/qcom,qmp-pcie-phy.yaml b/Documentation/devicetree/bindings/phy/qcom,qmp-pcie-phy.yaml
index 3fc08af41144..32f872de8f4b 100644
--- a/Documentation/devicetree/bindings/phy/qcom,qmp-pcie-phy.yaml
+++ b/Documentation/devicetree/bindings/phy/qcom,qmp-pcie-phy.yaml
@@ -80,8 +80,12 @@ patternProperties:
           - description: PIPE clock
 
       clock-names:
-        items:
-          - const: pipe0
+        oneOf:
+          - items:
+              - const: pipe
+          - items:
+              - const: pipe0
+            deprecated: true
 
       "#clock-cells":
         const: 0
@@ -295,7 +299,7 @@ examples:
                   <0xe00 0xf4>;
 
             clocks = <&gcc GCC_PCIE_1_PIPE_CLK>;
-            clock-names = "pipe0";
+            clock-names = "pipe";
 
             #clock-cells = <0>;
             clock-output-names = "pcie_1_pipe_clk";
-- 
2.35.1


-- 
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy

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

* [PATCH 20/43] dt-bindings: phy: qcom,qmp: split out UFS PHY binding
  2022-07-05  9:41 ` Johan Hovold
@ 2022-07-05  9:42   ` Johan Hovold
  -1 siblings, 0 replies; 178+ messages in thread
From: Johan Hovold @ 2022-07-05  9:42 UTC (permalink / raw)
  To: Vinod Koul, Rob Herring, Krzysztof Kozlowski
  Cc: Andy Gross, Bjorn Andersson, Kishon Vijay Abraham I,
	linux-arm-msm, linux-phy, devicetree, linux-kernel, Johan Hovold

The QMP PHY DT schema is getting unwieldy. Break out the UFS PHY
binding in a separate file.

Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
---
 .../devicetree/bindings/phy/qcom,qmp-phy.yaml |  65 --------
 .../bindings/phy/qcom,qmp-ufs-phy.yaml        | 149 ++++++++++++++++++
 2 files changed, 149 insertions(+), 65 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/phy/qcom,qmp-ufs-phy.yaml

diff --git a/Documentation/devicetree/bindings/phy/qcom,qmp-phy.yaml b/Documentation/devicetree/bindings/phy/qcom,qmp-phy.yaml
index f416a1a53a3f..04c24f8e4526 100644
--- a/Documentation/devicetree/bindings/phy/qcom,qmp-phy.yaml
+++ b/Documentation/devicetree/bindings/phy/qcom,qmp-phy.yaml
@@ -19,32 +19,21 @@ properties:
     enum:
       - qcom,ipq6018-qmp-usb3-phy
       - qcom,ipq8074-qmp-usb3-phy
-      - qcom,msm8996-qmp-ufs-phy
       - qcom,msm8996-qmp-usb3-phy
-      - qcom,msm8998-qmp-ufs-phy
       - qcom,msm8998-qmp-usb3-phy
       - qcom,qcm2290-qmp-usb3-phy
       - qcom,sc7180-qmp-usb3-phy
-      - qcom,sc8180x-qmp-ufs-phy
       - qcom,sc8180x-qmp-usb3-phy
-      - qcom,sc8280xp-qmp-ufs-phy
-      - qcom,sdm845-qmp-ufs-phy
       - qcom,sdm845-qmp-usb3-phy
       - qcom,sdm845-qmp-usb3-uni-phy
       - qcom,sdx55-qmp-usb3-uni-phy
       - qcom,sdx65-qmp-usb3-uni-phy
-      - qcom,sm6115-qmp-ufs-phy
-      - qcom,sm6350-qmp-ufs-phy
-      - qcom,sm8150-qmp-ufs-phy
       - qcom,sm8150-qmp-usb3-phy
       - qcom,sm8150-qmp-usb3-uni-phy
-      - qcom,sm8250-qmp-ufs-phy
       - qcom,sm8250-qmp-usb3-phy
       - qcom,sm8250-qmp-usb3-uni-phy
-      - qcom,sm8350-qmp-ufs-phy
       - qcom,sm8350-qmp-usb3-phy
       - qcom,sm8350-qmp-usb3-uni-phy
-      - qcom,sm8450-qmp-ufs-phy
       - qcom,sm8450-qmp-usb3-phy
 
   reg:
@@ -202,60 +191,6 @@ allOf:
       required:
         - vdda-phy-supply
         - vdda-pll-supply
-  - if:
-      properties:
-        compatible:
-          contains:
-            enum:
-              - qcom,msm8996-qmp-ufs-phy
-    then:
-      properties:
-        clocks:
-          items:
-            - description: 19.2 MHz ref clock.
-        clock-names:
-          items:
-            - const: ref
-        resets:
-          items:
-            - description: PHY reset in the UFS controller.
-        reset-names:
-          items:
-            - const: ufsphy
-      required:
-        - vdda-phy-supply
-        - vdda-pll-supply
-  - if:
-      properties:
-        compatible:
-          contains:
-            enum:
-              - qcom,msm8998-qmp-ufs-phy
-              - qcom,sc8180x-qmp-ufs-phy
-              - qcom,sc8280xp-qmp-ufs-phy
-              - qcom,sdm845-qmp-ufs-phy
-              - qcom,sm6350-qmp-ufs-phy
-              - qcom,sm8150-qmp-ufs-phy
-              - qcom,sm8250-qmp-ufs-phy
-    then:
-      properties:
-        clocks:
-          items:
-            - description: 19.2 MHz ref clock.
-            - description: PHY reference aux clock.
-        clock-names:
-          items:
-            - const: ref
-            - const: ref_aux
-        resets:
-          items:
-            - description: PHY reset in the UFS controller.
-        reset-names:
-          items:
-            - const: ufsphy
-      required:
-        - vdda-phy-supply
-        - vdda-pll-supply
   - if:
       properties:
         compatible:
diff --git a/Documentation/devicetree/bindings/phy/qcom,qmp-ufs-phy.yaml b/Documentation/devicetree/bindings/phy/qcom,qmp-ufs-phy.yaml
new file mode 100644
index 000000000000..4471f1b4fb7a
--- /dev/null
+++ b/Documentation/devicetree/bindings/phy/qcom,qmp-ufs-phy.yaml
@@ -0,0 +1,149 @@
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+
+%YAML 1.2
+---
+$id: "http://devicetree.org/schemas/phy/qcom,qmp-ufs-phy.yaml#"
+$schema: "http://devicetree.org/meta-schemas/core.yaml#"
+
+title: Qualcomm QMP PHY controller (UFS)
+
+maintainers:
+  - Vinod Koul <vkoul@kernel.org>
+
+description:
+  QMP PHY controller supports physical layer functionality for a number of
+  controllers on Qualcomm chipsets, such as, PCIe, UFS, and USB.
+
+properties:
+  compatible:
+    enum:
+      - qcom,msm8996-qmp-ufs-phy
+      - qcom,msm8998-qmp-ufs-phy
+      - qcom,sc8180x-qmp-ufs-phy
+      - qcom,sc8280xp-qmp-ufs-phy
+      - qcom,sdm845-qmp-ufs-phy
+      - qcom,sm6115-qmp-ufs-phy
+      - qcom,sm6350-qmp-ufs-phy
+      - qcom,sm8150-qmp-ufs-phy
+      - qcom,sm8250-qmp-ufs-phy
+      - qcom,sm8350-qmp-ufs-phy
+      - qcom,sm8450-qmp-ufs-phy
+
+  reg:
+    minItems: 1
+    items:
+      - description: Address and length of PHY's common serdes block.
+      - description: Address and length of PHY's DP_COM control block.
+
+  "#address-cells":
+    enum: [ 1, 2 ]
+
+  "#size-cells":
+    enum: [ 1, 2 ]
+
+  ranges: true
+
+  clocks:
+    minItems: 1
+    maxItems: 4
+
+  clock-names:
+    minItems: 1
+    maxItems: 4
+
+  resets:
+    minItems: 1
+    maxItems: 3
+
+  reset-names:
+    minItems: 1
+    maxItems: 3
+
+  vdda-phy-supply:
+    description:
+      Phandle to a regulator supply to PHY core block.
+
+  vdda-pll-supply:
+    description:
+      Phandle to 1.8V regulator supply to PHY refclk pll block.
+
+  vddp-ref-clk-supply:
+    description:
+      Phandle to a regulator supply to any specific refclk pll block.
+
+patternProperties:
+  "^phy@[0-9a-f]+$":
+    type: object
+    description:
+      Each device node of QMP PHY is required to have as many child nodes as
+      the number of lanes the PHY has.
+
+required:
+  - compatible
+  - reg
+  - "#address-cells"
+  - "#size-cells"
+  - ranges
+  - clocks
+  - clock-names
+  - resets
+  - reset-names
+
+additionalProperties: false
+
+allOf:
+  - if:
+      properties:
+        compatible:
+          contains:
+            enum:
+              - qcom,msm8996-qmp-ufs-phy
+    then:
+      properties:
+        clocks:
+          items:
+            - description: 19.2 MHz ref clock.
+        clock-names:
+          items:
+            - const: ref
+        resets:
+          items:
+            - description: PHY reset in the UFS controller.
+        reset-names:
+          items:
+            - const: ufsphy
+      required:
+        - vdda-phy-supply
+        - vdda-pll-supply
+
+  - if:
+      properties:
+        compatible:
+          contains:
+            enum:
+              - qcom,msm8998-qmp-ufs-phy
+              - qcom,sc8180x-qmp-ufs-phy
+              - qcom,sc8280xp-qmp-ufs-phy
+              - qcom,sdm845-qmp-ufs-phy
+              - qcom,sm6350-qmp-ufs-phy
+              - qcom,sm8150-qmp-ufs-phy
+              - qcom,sm8250-qmp-ufs-phy
+    then:
+      properties:
+        clocks:
+          items:
+            - description: 19.2 MHz ref clock.
+            - description: PHY reference aux clock.
+        clock-names:
+          items:
+            - const: ref
+            - const: ref_aux
+        resets:
+          items:
+            - description: PHY reset in the UFS controller.
+        reset-names:
+          items:
+            - const: ufsphy
+      required:
+        - vdda-phy-supply
+        - vdda-pll-supply
-- 
2.35.1


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

* [PATCH 20/43] dt-bindings: phy: qcom,qmp: split out UFS PHY binding
@ 2022-07-05  9:42   ` Johan Hovold
  0 siblings, 0 replies; 178+ messages in thread
From: Johan Hovold @ 2022-07-05  9:42 UTC (permalink / raw)
  To: Vinod Koul, Rob Herring, Krzysztof Kozlowski
  Cc: Andy Gross, Bjorn Andersson, Kishon Vijay Abraham I,
	linux-arm-msm, linux-phy, devicetree, linux-kernel, Johan Hovold

The QMP PHY DT schema is getting unwieldy. Break out the UFS PHY
binding in a separate file.

Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
---
 .../devicetree/bindings/phy/qcom,qmp-phy.yaml |  65 --------
 .../bindings/phy/qcom,qmp-ufs-phy.yaml        | 149 ++++++++++++++++++
 2 files changed, 149 insertions(+), 65 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/phy/qcom,qmp-ufs-phy.yaml

diff --git a/Documentation/devicetree/bindings/phy/qcom,qmp-phy.yaml b/Documentation/devicetree/bindings/phy/qcom,qmp-phy.yaml
index f416a1a53a3f..04c24f8e4526 100644
--- a/Documentation/devicetree/bindings/phy/qcom,qmp-phy.yaml
+++ b/Documentation/devicetree/bindings/phy/qcom,qmp-phy.yaml
@@ -19,32 +19,21 @@ properties:
     enum:
       - qcom,ipq6018-qmp-usb3-phy
       - qcom,ipq8074-qmp-usb3-phy
-      - qcom,msm8996-qmp-ufs-phy
       - qcom,msm8996-qmp-usb3-phy
-      - qcom,msm8998-qmp-ufs-phy
       - qcom,msm8998-qmp-usb3-phy
       - qcom,qcm2290-qmp-usb3-phy
       - qcom,sc7180-qmp-usb3-phy
-      - qcom,sc8180x-qmp-ufs-phy
       - qcom,sc8180x-qmp-usb3-phy
-      - qcom,sc8280xp-qmp-ufs-phy
-      - qcom,sdm845-qmp-ufs-phy
       - qcom,sdm845-qmp-usb3-phy
       - qcom,sdm845-qmp-usb3-uni-phy
       - qcom,sdx55-qmp-usb3-uni-phy
       - qcom,sdx65-qmp-usb3-uni-phy
-      - qcom,sm6115-qmp-ufs-phy
-      - qcom,sm6350-qmp-ufs-phy
-      - qcom,sm8150-qmp-ufs-phy
       - qcom,sm8150-qmp-usb3-phy
       - qcom,sm8150-qmp-usb3-uni-phy
-      - qcom,sm8250-qmp-ufs-phy
       - qcom,sm8250-qmp-usb3-phy
       - qcom,sm8250-qmp-usb3-uni-phy
-      - qcom,sm8350-qmp-ufs-phy
       - qcom,sm8350-qmp-usb3-phy
       - qcom,sm8350-qmp-usb3-uni-phy
-      - qcom,sm8450-qmp-ufs-phy
       - qcom,sm8450-qmp-usb3-phy
 
   reg:
@@ -202,60 +191,6 @@ allOf:
       required:
         - vdda-phy-supply
         - vdda-pll-supply
-  - if:
-      properties:
-        compatible:
-          contains:
-            enum:
-              - qcom,msm8996-qmp-ufs-phy
-    then:
-      properties:
-        clocks:
-          items:
-            - description: 19.2 MHz ref clock.
-        clock-names:
-          items:
-            - const: ref
-        resets:
-          items:
-            - description: PHY reset in the UFS controller.
-        reset-names:
-          items:
-            - const: ufsphy
-      required:
-        - vdda-phy-supply
-        - vdda-pll-supply
-  - if:
-      properties:
-        compatible:
-          contains:
-            enum:
-              - qcom,msm8998-qmp-ufs-phy
-              - qcom,sc8180x-qmp-ufs-phy
-              - qcom,sc8280xp-qmp-ufs-phy
-              - qcom,sdm845-qmp-ufs-phy
-              - qcom,sm6350-qmp-ufs-phy
-              - qcom,sm8150-qmp-ufs-phy
-              - qcom,sm8250-qmp-ufs-phy
-    then:
-      properties:
-        clocks:
-          items:
-            - description: 19.2 MHz ref clock.
-            - description: PHY reference aux clock.
-        clock-names:
-          items:
-            - const: ref
-            - const: ref_aux
-        resets:
-          items:
-            - description: PHY reset in the UFS controller.
-        reset-names:
-          items:
-            - const: ufsphy
-      required:
-        - vdda-phy-supply
-        - vdda-pll-supply
   - if:
       properties:
         compatible:
diff --git a/Documentation/devicetree/bindings/phy/qcom,qmp-ufs-phy.yaml b/Documentation/devicetree/bindings/phy/qcom,qmp-ufs-phy.yaml
new file mode 100644
index 000000000000..4471f1b4fb7a
--- /dev/null
+++ b/Documentation/devicetree/bindings/phy/qcom,qmp-ufs-phy.yaml
@@ -0,0 +1,149 @@
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+
+%YAML 1.2
+---
+$id: "http://devicetree.org/schemas/phy/qcom,qmp-ufs-phy.yaml#"
+$schema: "http://devicetree.org/meta-schemas/core.yaml#"
+
+title: Qualcomm QMP PHY controller (UFS)
+
+maintainers:
+  - Vinod Koul <vkoul@kernel.org>
+
+description:
+  QMP PHY controller supports physical layer functionality for a number of
+  controllers on Qualcomm chipsets, such as, PCIe, UFS, and USB.
+
+properties:
+  compatible:
+    enum:
+      - qcom,msm8996-qmp-ufs-phy
+      - qcom,msm8998-qmp-ufs-phy
+      - qcom,sc8180x-qmp-ufs-phy
+      - qcom,sc8280xp-qmp-ufs-phy
+      - qcom,sdm845-qmp-ufs-phy
+      - qcom,sm6115-qmp-ufs-phy
+      - qcom,sm6350-qmp-ufs-phy
+      - qcom,sm8150-qmp-ufs-phy
+      - qcom,sm8250-qmp-ufs-phy
+      - qcom,sm8350-qmp-ufs-phy
+      - qcom,sm8450-qmp-ufs-phy
+
+  reg:
+    minItems: 1
+    items:
+      - description: Address and length of PHY's common serdes block.
+      - description: Address and length of PHY's DP_COM control block.
+
+  "#address-cells":
+    enum: [ 1, 2 ]
+
+  "#size-cells":
+    enum: [ 1, 2 ]
+
+  ranges: true
+
+  clocks:
+    minItems: 1
+    maxItems: 4
+
+  clock-names:
+    minItems: 1
+    maxItems: 4
+
+  resets:
+    minItems: 1
+    maxItems: 3
+
+  reset-names:
+    minItems: 1
+    maxItems: 3
+
+  vdda-phy-supply:
+    description:
+      Phandle to a regulator supply to PHY core block.
+
+  vdda-pll-supply:
+    description:
+      Phandle to 1.8V regulator supply to PHY refclk pll block.
+
+  vddp-ref-clk-supply:
+    description:
+      Phandle to a regulator supply to any specific refclk pll block.
+
+patternProperties:
+  "^phy@[0-9a-f]+$":
+    type: object
+    description:
+      Each device node of QMP PHY is required to have as many child nodes as
+      the number of lanes the PHY has.
+
+required:
+  - compatible
+  - reg
+  - "#address-cells"
+  - "#size-cells"
+  - ranges
+  - clocks
+  - clock-names
+  - resets
+  - reset-names
+
+additionalProperties: false
+
+allOf:
+  - if:
+      properties:
+        compatible:
+          contains:
+            enum:
+              - qcom,msm8996-qmp-ufs-phy
+    then:
+      properties:
+        clocks:
+          items:
+            - description: 19.2 MHz ref clock.
+        clock-names:
+          items:
+            - const: ref
+        resets:
+          items:
+            - description: PHY reset in the UFS controller.
+        reset-names:
+          items:
+            - const: ufsphy
+      required:
+        - vdda-phy-supply
+        - vdda-pll-supply
+
+  - if:
+      properties:
+        compatible:
+          contains:
+            enum:
+              - qcom,msm8998-qmp-ufs-phy
+              - qcom,sc8180x-qmp-ufs-phy
+              - qcom,sc8280xp-qmp-ufs-phy
+              - qcom,sdm845-qmp-ufs-phy
+              - qcom,sm6350-qmp-ufs-phy
+              - qcom,sm8150-qmp-ufs-phy
+              - qcom,sm8250-qmp-ufs-phy
+    then:
+      properties:
+        clocks:
+          items:
+            - description: 19.2 MHz ref clock.
+            - description: PHY reference aux clock.
+        clock-names:
+          items:
+            - const: ref
+            - const: ref_aux
+        resets:
+          items:
+            - description: PHY reset in the UFS controller.
+        reset-names:
+          items:
+            - const: ufsphy
+      required:
+        - vdda-phy-supply
+        - vdda-pll-supply
-- 
2.35.1


-- 
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy

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

* [PATCH 21/43] dt-bindings: phy: qcom,qmp-ufs: clean up supplies
  2022-07-05  9:41 ` Johan Hovold
@ 2022-07-05  9:42   ` Johan Hovold
  -1 siblings, 0 replies; 178+ messages in thread
From: Johan Hovold @ 2022-07-05  9:42 UTC (permalink / raw)
  To: Vinod Koul, Rob Herring, Krzysztof Kozlowski
  Cc: Andy Gross, Bjorn Andersson, Kishon Vijay Abraham I,
	linux-arm-msm, linux-phy, devicetree, linux-kernel, Johan Hovold

The UFS PHY binding requires the vdda-phy and vdd-pll supplies.

Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
---
 .../devicetree/bindings/phy/qcom,qmp-ufs-phy.yaml         | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/Documentation/devicetree/bindings/phy/qcom,qmp-ufs-phy.yaml b/Documentation/devicetree/bindings/phy/qcom,qmp-ufs-phy.yaml
index 4471f1b4fb7a..c4458d90d8b7 100644
--- a/Documentation/devicetree/bindings/phy/qcom,qmp-ufs-phy.yaml
+++ b/Documentation/devicetree/bindings/phy/qcom,qmp-ufs-phy.yaml
@@ -88,6 +88,8 @@ required:
   - clock-names
   - resets
   - reset-names
+  - vdda-phy-supply
+  - vdda-pll-supply
 
 additionalProperties: false
 
@@ -112,9 +114,6 @@ allOf:
         reset-names:
           items:
             - const: ufsphy
-      required:
-        - vdda-phy-supply
-        - vdda-pll-supply
 
   - if:
       properties:
@@ -144,6 +143,3 @@ allOf:
         reset-names:
           items:
             - const: ufsphy
-      required:
-        - vdda-phy-supply
-        - vdda-pll-supply
-- 
2.35.1


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

* [PATCH 21/43] dt-bindings: phy: qcom,qmp-ufs: clean up supplies
@ 2022-07-05  9:42   ` Johan Hovold
  0 siblings, 0 replies; 178+ messages in thread
From: Johan Hovold @ 2022-07-05  9:42 UTC (permalink / raw)
  To: Vinod Koul, Rob Herring, Krzysztof Kozlowski
  Cc: Andy Gross, Bjorn Andersson, Kishon Vijay Abraham I,
	linux-arm-msm, linux-phy, devicetree, linux-kernel, Johan Hovold

The UFS PHY binding requires the vdda-phy and vdd-pll supplies.

Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
---
 .../devicetree/bindings/phy/qcom,qmp-ufs-phy.yaml         | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/Documentation/devicetree/bindings/phy/qcom,qmp-ufs-phy.yaml b/Documentation/devicetree/bindings/phy/qcom,qmp-ufs-phy.yaml
index 4471f1b4fb7a..c4458d90d8b7 100644
--- a/Documentation/devicetree/bindings/phy/qcom,qmp-ufs-phy.yaml
+++ b/Documentation/devicetree/bindings/phy/qcom,qmp-ufs-phy.yaml
@@ -88,6 +88,8 @@ required:
   - clock-names
   - resets
   - reset-names
+  - vdda-phy-supply
+  - vdda-pll-supply
 
 additionalProperties: false
 
@@ -112,9 +114,6 @@ allOf:
         reset-names:
           items:
             - const: ufsphy
-      required:
-        - vdda-phy-supply
-        - vdda-pll-supply
 
   - if:
       properties:
@@ -144,6 +143,3 @@ allOf:
         reset-names:
           items:
             - const: ufsphy
-      required:
-        - vdda-phy-supply
-        - vdda-pll-supply
-- 
2.35.1


-- 
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy

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

* [PATCH 22/43] dt-bindings: phy: qcom,qmp-ufs: clean up reset providers
  2022-07-05  9:41 ` Johan Hovold
@ 2022-07-05  9:42   ` Johan Hovold
  -1 siblings, 0 replies; 178+ messages in thread
From: Johan Hovold @ 2022-07-05  9:42 UTC (permalink / raw)
  To: Vinod Koul, Rob Herring, Krzysztof Kozlowski
  Cc: Andy Gross, Bjorn Andersson, Kishon Vijay Abraham I,
	linux-arm-msm, linux-phy, devicetree, linux-kernel, Johan Hovold

The UFS binding requires a single PHY reset.

Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
---
 .../bindings/phy/qcom,qmp-ufs-phy.yaml        | 20 ++++---------------
 1 file changed, 4 insertions(+), 16 deletions(-)

diff --git a/Documentation/devicetree/bindings/phy/qcom,qmp-ufs-phy.yaml b/Documentation/devicetree/bindings/phy/qcom,qmp-ufs-phy.yaml
index c4458d90d8b7..b84511f02221 100644
--- a/Documentation/devicetree/bindings/phy/qcom,qmp-ufs-phy.yaml
+++ b/Documentation/devicetree/bindings/phy/qcom,qmp-ufs-phy.yaml
@@ -52,12 +52,12 @@ properties:
     maxItems: 4
 
   resets:
-    minItems: 1
-    maxItems: 3
+    items:
+      - description: PHY reset in the UFS controller.
 
   reset-names:
-    minItems: 1
-    maxItems: 3
+    items:
+      - const: ufsphy
 
   vdda-phy-supply:
     description:
@@ -108,12 +108,6 @@ allOf:
         clock-names:
           items:
             - const: ref
-        resets:
-          items:
-            - description: PHY reset in the UFS controller.
-        reset-names:
-          items:
-            - const: ufsphy
 
   - if:
       properties:
@@ -137,9 +131,3 @@ allOf:
           items:
             - const: ref
             - const: ref_aux
-        resets:
-          items:
-            - description: PHY reset in the UFS controller.
-        reset-names:
-          items:
-            - const: ufsphy
-- 
2.35.1


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

* [PATCH 22/43] dt-bindings: phy: qcom,qmp-ufs: clean up reset providers
@ 2022-07-05  9:42   ` Johan Hovold
  0 siblings, 0 replies; 178+ messages in thread
From: Johan Hovold @ 2022-07-05  9:42 UTC (permalink / raw)
  To: Vinod Koul, Rob Herring, Krzysztof Kozlowski
  Cc: Andy Gross, Bjorn Andersson, Kishon Vijay Abraham I,
	linux-arm-msm, linux-phy, devicetree, linux-kernel, Johan Hovold

The UFS binding requires a single PHY reset.

Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
---
 .../bindings/phy/qcom,qmp-ufs-phy.yaml        | 20 ++++---------------
 1 file changed, 4 insertions(+), 16 deletions(-)

diff --git a/Documentation/devicetree/bindings/phy/qcom,qmp-ufs-phy.yaml b/Documentation/devicetree/bindings/phy/qcom,qmp-ufs-phy.yaml
index c4458d90d8b7..b84511f02221 100644
--- a/Documentation/devicetree/bindings/phy/qcom,qmp-ufs-phy.yaml
+++ b/Documentation/devicetree/bindings/phy/qcom,qmp-ufs-phy.yaml
@@ -52,12 +52,12 @@ properties:
     maxItems: 4
 
   resets:
-    minItems: 1
-    maxItems: 3
+    items:
+      - description: PHY reset in the UFS controller.
 
   reset-names:
-    minItems: 1
-    maxItems: 3
+    items:
+      - const: ufsphy
 
   vdda-phy-supply:
     description:
@@ -108,12 +108,6 @@ allOf:
         clock-names:
           items:
             - const: ref
-        resets:
-          items:
-            - description: PHY reset in the UFS controller.
-        reset-names:
-          items:
-            - const: ufsphy
 
   - if:
       properties:
@@ -137,9 +131,3 @@ allOf:
           items:
             - const: ref
             - const: ref_aux
-        resets:
-          items:
-            - description: PHY reset in the UFS controller.
-        reset-names:
-          items:
-            - const: ufsphy
-- 
2.35.1


-- 
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy

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

* [PATCH 23/43] dt-bindings: phy: qcom,qmp-ufs: clean up clock constraints
  2022-07-05  9:41 ` Johan Hovold
@ 2022-07-05  9:42   ` Johan Hovold
  -1 siblings, 0 replies; 178+ messages in thread
From: Johan Hovold @ 2022-07-05  9:42 UTC (permalink / raw)
  To: Vinod Koul, Rob Herring, Krzysztof Kozlowski
  Cc: Andy Gross, Bjorn Andersson, Kishon Vijay Abraham I,
	linux-arm-msm, linux-phy, devicetree, linux-kernel, Johan Hovold

The UFS PHY binding requires one or two clocks.

Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
---
 Documentation/devicetree/bindings/phy/qcom,qmp-ufs-phy.yaml | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/Documentation/devicetree/bindings/phy/qcom,qmp-ufs-phy.yaml b/Documentation/devicetree/bindings/phy/qcom,qmp-ufs-phy.yaml
index b84511f02221..732518d0427c 100644
--- a/Documentation/devicetree/bindings/phy/qcom,qmp-ufs-phy.yaml
+++ b/Documentation/devicetree/bindings/phy/qcom,qmp-ufs-phy.yaml
@@ -45,11 +45,11 @@ properties:
 
   clocks:
     minItems: 1
-    maxItems: 4
+    maxItems: 2
 
   clock-names:
     minItems: 1
-    maxItems: 4
+    maxItems: 2
 
   resets:
     items:
-- 
2.35.1


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

* [PATCH 23/43] dt-bindings: phy: qcom,qmp-ufs: clean up clock constraints
@ 2022-07-05  9:42   ` Johan Hovold
  0 siblings, 0 replies; 178+ messages in thread
From: Johan Hovold @ 2022-07-05  9:42 UTC (permalink / raw)
  To: Vinod Koul, Rob Herring, Krzysztof Kozlowski
  Cc: Andy Gross, Bjorn Andersson, Kishon Vijay Abraham I,
	linux-arm-msm, linux-phy, devicetree, linux-kernel, Johan Hovold

The UFS PHY binding requires one or two clocks.

Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
---
 Documentation/devicetree/bindings/phy/qcom,qmp-ufs-phy.yaml | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/Documentation/devicetree/bindings/phy/qcom,qmp-ufs-phy.yaml b/Documentation/devicetree/bindings/phy/qcom,qmp-ufs-phy.yaml
index b84511f02221..732518d0427c 100644
--- a/Documentation/devicetree/bindings/phy/qcom,qmp-ufs-phy.yaml
+++ b/Documentation/devicetree/bindings/phy/qcom,qmp-ufs-phy.yaml
@@ -45,11 +45,11 @@ properties:
 
   clocks:
     minItems: 1
-    maxItems: 4
+    maxItems: 2
 
   clock-names:
     minItems: 1
-    maxItems: 4
+    maxItems: 2
 
   resets:
     items:
-- 
2.35.1


-- 
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy

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

* [PATCH 24/43] dt-bindings: phy: qcom,qmp-ufs: clean up register constraints
  2022-07-05  9:41 ` Johan Hovold
@ 2022-07-05  9:42   ` Johan Hovold
  -1 siblings, 0 replies; 178+ messages in thread
From: Johan Hovold @ 2022-07-05  9:42 UTC (permalink / raw)
  To: Vinod Koul, Rob Herring, Krzysztof Kozlowski
  Cc: Andy Gross, Bjorn Andersson, Kishon Vijay Abraham I,
	linux-arm-msm, linux-phy, devicetree, linux-kernel, Johan Hovold

Only some USB and combo PHYs have a second dp_com control block.

Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
---
 Documentation/devicetree/bindings/phy/qcom,qmp-ufs-phy.yaml | 2 --
 1 file changed, 2 deletions(-)

diff --git a/Documentation/devicetree/bindings/phy/qcom,qmp-ufs-phy.yaml b/Documentation/devicetree/bindings/phy/qcom,qmp-ufs-phy.yaml
index 732518d0427c..af3ed5601d21 100644
--- a/Documentation/devicetree/bindings/phy/qcom,qmp-ufs-phy.yaml
+++ b/Documentation/devicetree/bindings/phy/qcom,qmp-ufs-phy.yaml
@@ -30,10 +30,8 @@ properties:
       - qcom,sm8450-qmp-ufs-phy
 
   reg:
-    minItems: 1
     items:
       - description: Address and length of PHY's common serdes block.
-      - description: Address and length of PHY's DP_COM control block.
 
   "#address-cells":
     enum: [ 1, 2 ]
-- 
2.35.1


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

* [PATCH 24/43] dt-bindings: phy: qcom,qmp-ufs: clean up register constraints
@ 2022-07-05  9:42   ` Johan Hovold
  0 siblings, 0 replies; 178+ messages in thread
From: Johan Hovold @ 2022-07-05  9:42 UTC (permalink / raw)
  To: Vinod Koul, Rob Herring, Krzysztof Kozlowski
  Cc: Andy Gross, Bjorn Andersson, Kishon Vijay Abraham I,
	linux-arm-msm, linux-phy, devicetree, linux-kernel, Johan Hovold

Only some USB and combo PHYs have a second dp_com control block.

Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
---
 Documentation/devicetree/bindings/phy/qcom,qmp-ufs-phy.yaml | 2 --
 1 file changed, 2 deletions(-)

diff --git a/Documentation/devicetree/bindings/phy/qcom,qmp-ufs-phy.yaml b/Documentation/devicetree/bindings/phy/qcom,qmp-ufs-phy.yaml
index 732518d0427c..af3ed5601d21 100644
--- a/Documentation/devicetree/bindings/phy/qcom,qmp-ufs-phy.yaml
+++ b/Documentation/devicetree/bindings/phy/qcom,qmp-ufs-phy.yaml
@@ -30,10 +30,8 @@ properties:
       - qcom,sm8450-qmp-ufs-phy
 
   reg:
-    minItems: 1
     items:
       - description: Address and length of PHY's common serdes block.
-      - description: Address and length of PHY's DP_COM control block.
 
   "#address-cells":
     enum: [ 1, 2 ]
-- 
2.35.1


-- 
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy

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

* [PATCH 25/43] dt-bindings: phy: qcom,qmp-ufs: add missing SM8450 clock
  2022-07-05  9:41 ` Johan Hovold
@ 2022-07-05  9:42   ` Johan Hovold
  -1 siblings, 0 replies; 178+ messages in thread
From: Johan Hovold @ 2022-07-05  9:42 UTC (permalink / raw)
  To: Vinod Koul, Rob Herring, Krzysztof Kozlowski
  Cc: Andy Gross, Bjorn Andersson, Kishon Vijay Abraham I,
	linux-arm-msm, linux-phy, devicetree, linux-kernel, Johan Hovold

Add the missing "qref" clock used by the SM8450 UFS QMP PHY to the
binding.

Fixes: e04121ba1b08 ("dt-bindings: phy: qcom,qmp: Add SM8450 UFS phy compatible")
Fixes: 07fa917a335e ("arm64: dts: qcom: sm8450: add ufs nodes")
Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
---
 .../bindings/phy/qcom,qmp-ufs-phy.yaml        | 23 +++++++++++++++++--
 1 file changed, 21 insertions(+), 2 deletions(-)

diff --git a/Documentation/devicetree/bindings/phy/qcom,qmp-ufs-phy.yaml b/Documentation/devicetree/bindings/phy/qcom,qmp-ufs-phy.yaml
index af3ed5601d21..d04cdb85f005 100644
--- a/Documentation/devicetree/bindings/phy/qcom,qmp-ufs-phy.yaml
+++ b/Documentation/devicetree/bindings/phy/qcom,qmp-ufs-phy.yaml
@@ -43,11 +43,11 @@ properties:
 
   clocks:
     minItems: 1
-    maxItems: 2
+    maxItems: 3
 
   clock-names:
     minItems: 1
-    maxItems: 2
+    maxItems: 3
 
   resets:
     items:
@@ -129,3 +129,22 @@ allOf:
           items:
             - const: ref
             - const: ref_aux
+
+  - if:
+      properties:
+        compatible:
+          contains:
+            enum:
+              - qcom,sm8450-qmp-ufs-phy
+    then:
+      properties:
+        clocks:
+          items:
+            - description: 19.2 MHz ref clock.
+            - description: PHY reference aux clock.
+            - description: qref clock.
+        clock-names:
+          items:
+            - const: ref
+            - const: ref_aux
+            - const: qref
-- 
2.35.1


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

* [PATCH 25/43] dt-bindings: phy: qcom,qmp-ufs: add missing SM8450 clock
@ 2022-07-05  9:42   ` Johan Hovold
  0 siblings, 0 replies; 178+ messages in thread
From: Johan Hovold @ 2022-07-05  9:42 UTC (permalink / raw)
  To: Vinod Koul, Rob Herring, Krzysztof Kozlowski
  Cc: Andy Gross, Bjorn Andersson, Kishon Vijay Abraham I,
	linux-arm-msm, linux-phy, devicetree, linux-kernel, Johan Hovold

Add the missing "qref" clock used by the SM8450 UFS QMP PHY to the
binding.

Fixes: e04121ba1b08 ("dt-bindings: phy: qcom,qmp: Add SM8450 UFS phy compatible")
Fixes: 07fa917a335e ("arm64: dts: qcom: sm8450: add ufs nodes")
Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
---
 .../bindings/phy/qcom,qmp-ufs-phy.yaml        | 23 +++++++++++++++++--
 1 file changed, 21 insertions(+), 2 deletions(-)

diff --git a/Documentation/devicetree/bindings/phy/qcom,qmp-ufs-phy.yaml b/Documentation/devicetree/bindings/phy/qcom,qmp-ufs-phy.yaml
index af3ed5601d21..d04cdb85f005 100644
--- a/Documentation/devicetree/bindings/phy/qcom,qmp-ufs-phy.yaml
+++ b/Documentation/devicetree/bindings/phy/qcom,qmp-ufs-phy.yaml
@@ -43,11 +43,11 @@ properties:
 
   clocks:
     minItems: 1
-    maxItems: 2
+    maxItems: 3
 
   clock-names:
     minItems: 1
-    maxItems: 2
+    maxItems: 3
 
   resets:
     items:
@@ -129,3 +129,22 @@ allOf:
           items:
             - const: ref
             - const: ref_aux
+
+  - if:
+      properties:
+        compatible:
+          contains:
+            enum:
+              - qcom,sm8450-qmp-ufs-phy
+    then:
+      properties:
+        clocks:
+          items:
+            - description: 19.2 MHz ref clock.
+            - description: PHY reference aux clock.
+            - description: qref clock.
+        clock-names:
+          items:
+            - const: ref
+            - const: ref_aux
+            - const: qref
-- 
2.35.1


-- 
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy

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

* [PATCH 26/43] dt-bindings: phy: qcom,qmp-ufs: add missing SM8150 power domain
  2022-07-05  9:41 ` Johan Hovold
@ 2022-07-05  9:42   ` Johan Hovold
  -1 siblings, 0 replies; 178+ messages in thread
From: Johan Hovold @ 2022-07-05  9:42 UTC (permalink / raw)
  To: Vinod Koul, Rob Herring, Krzysztof Kozlowski
  Cc: Andy Gross, Bjorn Andersson, Kishon Vijay Abraham I,
	linux-arm-msm, linux-phy, devicetree, linux-kernel, Johan Hovold

Add the missing optional power-domains property used by the SM8150 UFS
QMP PHY to the binding.

Fixes: fe75b0c4a691 ("arm64: dts: qcom: sm8150: Add ufs power-domain entries")
Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
---
 Documentation/devicetree/bindings/phy/qcom,qmp-ufs-phy.yaml | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/Documentation/devicetree/bindings/phy/qcom,qmp-ufs-phy.yaml b/Documentation/devicetree/bindings/phy/qcom,qmp-ufs-phy.yaml
index d04cdb85f005..f1e3d70eb73d 100644
--- a/Documentation/devicetree/bindings/phy/qcom,qmp-ufs-phy.yaml
+++ b/Documentation/devicetree/bindings/phy/qcom,qmp-ufs-phy.yaml
@@ -49,6 +49,9 @@ properties:
     minItems: 1
     maxItems: 3
 
+  power-domains:
+    maxItems: 1
+
   resets:
     items:
       - description: PHY reset in the UFS controller.
-- 
2.35.1


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

* [PATCH 26/43] dt-bindings: phy: qcom,qmp-ufs: add missing SM8150 power domain
@ 2022-07-05  9:42   ` Johan Hovold
  0 siblings, 0 replies; 178+ messages in thread
From: Johan Hovold @ 2022-07-05  9:42 UTC (permalink / raw)
  To: Vinod Koul, Rob Herring, Krzysztof Kozlowski
  Cc: Andy Gross, Bjorn Andersson, Kishon Vijay Abraham I,
	linux-arm-msm, linux-phy, devicetree, linux-kernel, Johan Hovold

Add the missing optional power-domains property used by the SM8150 UFS
QMP PHY to the binding.

Fixes: fe75b0c4a691 ("arm64: dts: qcom: sm8150: Add ufs power-domain entries")
Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
---
 Documentation/devicetree/bindings/phy/qcom,qmp-ufs-phy.yaml | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/Documentation/devicetree/bindings/phy/qcom,qmp-ufs-phy.yaml b/Documentation/devicetree/bindings/phy/qcom,qmp-ufs-phy.yaml
index d04cdb85f005..f1e3d70eb73d 100644
--- a/Documentation/devicetree/bindings/phy/qcom,qmp-ufs-phy.yaml
+++ b/Documentation/devicetree/bindings/phy/qcom,qmp-ufs-phy.yaml
@@ -49,6 +49,9 @@ properties:
     minItems: 1
     maxItems: 3
 
+  power-domains:
+    maxItems: 1
+
   resets:
     items:
       - description: PHY reset in the UFS controller.
-- 
2.35.1


-- 
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy

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

* [PATCH 27/43] dt-bindings: phy: qcom,qmp-ufs: add missing child node schema
  2022-07-05  9:41 ` Johan Hovold
@ 2022-07-05  9:42   ` Johan Hovold
  -1 siblings, 0 replies; 178+ messages in thread
From: Johan Hovold @ 2022-07-05  9:42 UTC (permalink / raw)
  To: Vinod Koul, Rob Herring, Krzysztof Kozlowski
  Cc: Andy Gross, Bjorn Andersson, Kishon Vijay Abraham I,
	linux-arm-msm, linux-phy, devicetree, linux-kernel, Johan Hovold

Add the missing the description of the PHY-provider child node which was
ignored when converting to DT schema.

Also fix up the incorrect description that claimed that one child node
per lane was required.

Fixes: ccf51c1cedfd ("dt-bindings: phy: qcom,qmp: Convert QMP PHY bindings to yaml")
Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
---
 .../bindings/phy/qcom,qmp-ufs-phy.yaml        | 72 ++++++++++++++++++-
 1 file changed, 69 insertions(+), 3 deletions(-)

diff --git a/Documentation/devicetree/bindings/phy/qcom,qmp-ufs-phy.yaml b/Documentation/devicetree/bindings/phy/qcom,qmp-ufs-phy.yaml
index f1e3d70eb73d..9124b60eb9a7 100644
--- a/Documentation/devicetree/bindings/phy/qcom,qmp-ufs-phy.yaml
+++ b/Documentation/devicetree/bindings/phy/qcom,qmp-ufs-phy.yaml
@@ -75,9 +75,20 @@ properties:
 patternProperties:
   "^phy@[0-9a-f]+$":
     type: object
-    description:
-      Each device node of QMP PHY is required to have as many child nodes as
-      the number of lanes the PHY has.
+    description: Single PHY-provider child node.
+    properties:
+      reg:
+        minItems: 3
+        maxItems: 6
+
+      "#phy-cells":
+        const: 0
+
+    required:
+      - reg
+      - "#phy-cells"
+
+    additionalProperties: false
 
 required:
   - compatible
@@ -151,3 +162,58 @@ allOf:
             - const: ref
             - const: ref_aux
             - const: qref
+
+  - if:
+      properties:
+        compatible:
+          contains:
+            enum:
+              - qcom,msm8998-qmp-ufs-phy
+              - qcom,sc8280xp-qmp-ufs-phy
+              - qcom,sdm845-qmp-ufs-phy
+              - qcom,sm6350-qmp-ufs-phy
+              - qcom,sm8150-qmp-ufs-phy
+              - qcom,sm8250-qmp-ufs-phy
+              - qcom,sm8350-qmp-ufs-phy
+              - qcom,sm8450-qmp-ufs-phy
+    then:
+      patternProperties:
+        "^phy@[0-9a-f]+$":
+          properties:
+            reg:
+              items:
+                - description: TX lane 1
+                - description: RX lane 1
+                - description: PCS
+                - description: TX lane 2
+                - description: RX lane 2
+    else:
+      patternProperties:
+        "^phy@[0-9a-f]+$":
+          properties:
+            reg:
+              minItems: 3
+              maxItems: 4
+              items:
+                - description: TX
+                - description: RX
+                - description: PCS
+                - description: PCS_MISC
+      if:
+        properties:
+          compatible:
+            contains:
+              enum:
+                - qcom,msm8996-qmp-ufs-phy
+      then:
+        patternProperties:
+          "^phy@[0-9a-f]+$":
+            properties:
+              reg:
+                maxItems: 3
+      else:
+        patternProperties:
+          "^phy@[0-9a-f]+$":
+            properties:
+              reg:
+                minItems: 4
-- 
2.35.1


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

* [PATCH 27/43] dt-bindings: phy: qcom,qmp-ufs: add missing child node schema
@ 2022-07-05  9:42   ` Johan Hovold
  0 siblings, 0 replies; 178+ messages in thread
From: Johan Hovold @ 2022-07-05  9:42 UTC (permalink / raw)
  To: Vinod Koul, Rob Herring, Krzysztof Kozlowski
  Cc: Andy Gross, Bjorn Andersson, Kishon Vijay Abraham I,
	linux-arm-msm, linux-phy, devicetree, linux-kernel, Johan Hovold

Add the missing the description of the PHY-provider child node which was
ignored when converting to DT schema.

Also fix up the incorrect description that claimed that one child node
per lane was required.

Fixes: ccf51c1cedfd ("dt-bindings: phy: qcom,qmp: Convert QMP PHY bindings to yaml")
Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
---
 .../bindings/phy/qcom,qmp-ufs-phy.yaml        | 72 ++++++++++++++++++-
 1 file changed, 69 insertions(+), 3 deletions(-)

diff --git a/Documentation/devicetree/bindings/phy/qcom,qmp-ufs-phy.yaml b/Documentation/devicetree/bindings/phy/qcom,qmp-ufs-phy.yaml
index f1e3d70eb73d..9124b60eb9a7 100644
--- a/Documentation/devicetree/bindings/phy/qcom,qmp-ufs-phy.yaml
+++ b/Documentation/devicetree/bindings/phy/qcom,qmp-ufs-phy.yaml
@@ -75,9 +75,20 @@ properties:
 patternProperties:
   "^phy@[0-9a-f]+$":
     type: object
-    description:
-      Each device node of QMP PHY is required to have as many child nodes as
-      the number of lanes the PHY has.
+    description: Single PHY-provider child node.
+    properties:
+      reg:
+        minItems: 3
+        maxItems: 6
+
+      "#phy-cells":
+        const: 0
+
+    required:
+      - reg
+      - "#phy-cells"
+
+    additionalProperties: false
 
 required:
   - compatible
@@ -151,3 +162,58 @@ allOf:
             - const: ref
             - const: ref_aux
             - const: qref
+
+  - if:
+      properties:
+        compatible:
+          contains:
+            enum:
+              - qcom,msm8998-qmp-ufs-phy
+              - qcom,sc8280xp-qmp-ufs-phy
+              - qcom,sdm845-qmp-ufs-phy
+              - qcom,sm6350-qmp-ufs-phy
+              - qcom,sm8150-qmp-ufs-phy
+              - qcom,sm8250-qmp-ufs-phy
+              - qcom,sm8350-qmp-ufs-phy
+              - qcom,sm8450-qmp-ufs-phy
+    then:
+      patternProperties:
+        "^phy@[0-9a-f]+$":
+          properties:
+            reg:
+              items:
+                - description: TX lane 1
+                - description: RX lane 1
+                - description: PCS
+                - description: TX lane 2
+                - description: RX lane 2
+    else:
+      patternProperties:
+        "^phy@[0-9a-f]+$":
+          properties:
+            reg:
+              minItems: 3
+              maxItems: 4
+              items:
+                - description: TX
+                - description: RX
+                - description: PCS
+                - description: PCS_MISC
+      if:
+        properties:
+          compatible:
+            contains:
+              enum:
+                - qcom,msm8996-qmp-ufs-phy
+      then:
+        patternProperties:
+          "^phy@[0-9a-f]+$":
+            properties:
+              reg:
+                maxItems: 3
+      else:
+        patternProperties:
+          "^phy@[0-9a-f]+$":
+            properties:
+              reg:
+                minItems: 4
-- 
2.35.1


-- 
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy

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

* [PATCH 28/43] dt-bindings: phy: qcom,qmp-ufs: add example node
  2022-07-05  9:41 ` Johan Hovold
@ 2022-07-05  9:42   ` Johan Hovold
  -1 siblings, 0 replies; 178+ messages in thread
From: Johan Hovold @ 2022-07-05  9:42 UTC (permalink / raw)
  To: Vinod Koul, Rob Herring, Krzysztof Kozlowski
  Cc: Andy Gross, Bjorn Andersson, Kishon Vijay Abraham I,
	linux-arm-msm, linux-phy, devicetree, linux-kernel, Johan Hovold

Add an example node based on a cleaned up version of sc8280xp.dtsi.

Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
---
 .../bindings/phy/qcom,qmp-ufs-phy.yaml        | 30 +++++++++++++++++++
 1 file changed, 30 insertions(+)

diff --git a/Documentation/devicetree/bindings/phy/qcom,qmp-ufs-phy.yaml b/Documentation/devicetree/bindings/phy/qcom,qmp-ufs-phy.yaml
index 9124b60eb9a7..24272cdde9a1 100644
--- a/Documentation/devicetree/bindings/phy/qcom,qmp-ufs-phy.yaml
+++ b/Documentation/devicetree/bindings/phy/qcom,qmp-ufs-phy.yaml
@@ -217,3 +217,33 @@ allOf:
             properties:
               reg:
                 minItems: 4
+
+examples:
+  - |
+    #include <dt-bindings/clock/qcom,gcc-sc8280xp.h>
+    #include <dt-bindings/clock/qcom,rpmh.h>
+    phy-wrapper@1d87000 {
+        compatible = "qcom,sc8280xp-qmp-ufs-phy";
+        reg = <0x01d87000 0xe10>;
+        #address-cells = <1>;
+        #size-cells = <1>;
+        ranges = <0x0 0x01d87000 0x1000>;
+
+        clocks = <&rpmhcc RPMH_CXO_CLK>, <&gcc GCC_UFS_PHY_PHY_AUX_CLK>;
+        clock-names = "ref", "ref_aux";
+
+        resets = <&ufs_mem_hc 0>;
+        reset-names = "ufsphy";
+
+        vdda-phy-supply = <&vreg_l6b>;
+        vdda-pll-supply = <&vreg_l3b>;
+
+        phy@400 {
+            reg = <0x400 0x108>,
+                  <0x600 0x1e0>,
+                  <0xc00 0x1dc>,
+                  <0x800 0x108>,
+                  <0xa00 0x1e0>;
+            #phy-cells = <0>;
+        };
+    };
-- 
2.35.1


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

* [PATCH 28/43] dt-bindings: phy: qcom,qmp-ufs: add example node
@ 2022-07-05  9:42   ` Johan Hovold
  0 siblings, 0 replies; 178+ messages in thread
From: Johan Hovold @ 2022-07-05  9:42 UTC (permalink / raw)
  To: Vinod Koul, Rob Herring, Krzysztof Kozlowski
  Cc: Andy Gross, Bjorn Andersson, Kishon Vijay Abraham I,
	linux-arm-msm, linux-phy, devicetree, linux-kernel, Johan Hovold

Add an example node based on a cleaned up version of sc8280xp.dtsi.

Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
---
 .../bindings/phy/qcom,qmp-ufs-phy.yaml        | 30 +++++++++++++++++++
 1 file changed, 30 insertions(+)

diff --git a/Documentation/devicetree/bindings/phy/qcom,qmp-ufs-phy.yaml b/Documentation/devicetree/bindings/phy/qcom,qmp-ufs-phy.yaml
index 9124b60eb9a7..24272cdde9a1 100644
--- a/Documentation/devicetree/bindings/phy/qcom,qmp-ufs-phy.yaml
+++ b/Documentation/devicetree/bindings/phy/qcom,qmp-ufs-phy.yaml
@@ -217,3 +217,33 @@ allOf:
             properties:
               reg:
                 minItems: 4
+
+examples:
+  - |
+    #include <dt-bindings/clock/qcom,gcc-sc8280xp.h>
+    #include <dt-bindings/clock/qcom,rpmh.h>
+    phy-wrapper@1d87000 {
+        compatible = "qcom,sc8280xp-qmp-ufs-phy";
+        reg = <0x01d87000 0xe10>;
+        #address-cells = <1>;
+        #size-cells = <1>;
+        ranges = <0x0 0x01d87000 0x1000>;
+
+        clocks = <&rpmhcc RPMH_CXO_CLK>, <&gcc GCC_UFS_PHY_PHY_AUX_CLK>;
+        clock-names = "ref", "ref_aux";
+
+        resets = <&ufs_mem_hc 0>;
+        reset-names = "ufsphy";
+
+        vdda-phy-supply = <&vreg_l6b>;
+        vdda-pll-supply = <&vreg_l3b>;
+
+        phy@400 {
+            reg = <0x400 0x108>,
+                  <0x600 0x1e0>,
+                  <0xc00 0x1dc>,
+                  <0x800 0x108>,
+                  <0xa00 0x1e0>;
+            #phy-cells = <0>;
+        };
+    };
-- 
2.35.1


-- 
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy

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

* [PATCH 29/43] dt-bindings: phy: qcom,qmp: split out USB binding
  2022-07-05  9:41 ` Johan Hovold
@ 2022-07-05  9:42   ` Johan Hovold
  -1 siblings, 0 replies; 178+ messages in thread
From: Johan Hovold @ 2022-07-05  9:42 UTC (permalink / raw)
  To: Vinod Koul, Rob Herring, Krzysztof Kozlowski
  Cc: Andy Gross, Bjorn Andersson, Kishon Vijay Abraham I,
	linux-arm-msm, linux-phy, devicetree, linux-kernel, Johan Hovold

The QMP PHY DT schema is getting unwieldy. Break out the USB PHY
binding in a separate file.

Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
---
 .../phy/{qcom,qmp-phy.yaml => qcom,qmp-usb-phy.yaml}     | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)
 rename Documentation/devicetree/bindings/phy/{qcom,qmp-phy.yaml => qcom,qmp-usb-phy.yaml} (98%)

diff --git a/Documentation/devicetree/bindings/phy/qcom,qmp-phy.yaml b/Documentation/devicetree/bindings/phy/qcom,qmp-usb-phy.yaml
similarity index 98%
rename from Documentation/devicetree/bindings/phy/qcom,qmp-phy.yaml
rename to Documentation/devicetree/bindings/phy/qcom,qmp-usb-phy.yaml
index 04c24f8e4526..8343e24b669a 100644
--- a/Documentation/devicetree/bindings/phy/qcom,qmp-phy.yaml
+++ b/Documentation/devicetree/bindings/phy/qcom,qmp-usb-phy.yaml
@@ -2,10 +2,10 @@
 
 %YAML 1.2
 ---
-$id: "http://devicetree.org/schemas/phy/qcom,qmp-phy.yaml#"
+$id: "http://devicetree.org/schemas/phy/qcom,qmp-usb-phy.yaml#"
 $schema: "http://devicetree.org/meta-schemas/core.yaml#"
 
-title: Qualcomm QMP PHY controller
+title: Qualcomm QMP PHY controller (USB)
 
 maintainers:
   - Vinod Koul <vkoul@kernel.org>
@@ -130,6 +130,7 @@ allOf:
       required:
         - vdda-phy-supply
         - vdda-pll-supply
+
   - if:
       properties:
         compatible:
@@ -160,6 +161,7 @@ allOf:
       required:
         - vdda-phy-supply
         - vdda-pll-supply
+
   - if:
       properties:
         compatible:
@@ -191,6 +193,7 @@ allOf:
       required:
         - vdda-phy-supply
         - vdda-pll-supply
+
   - if:
       properties:
         compatible:
@@ -225,6 +228,7 @@ allOf:
       required:
         - vdda-phy-supply
         - vdda-pll-supply
+
   - if:
       properties:
         compatible:
@@ -255,6 +259,7 @@ allOf:
       required:
         - vdda-phy-supply
         - vdda-pll-supply
+
   - if:
       properties:
         compatible:
-- 
2.35.1


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

* [PATCH 29/43] dt-bindings: phy: qcom,qmp: split out USB binding
@ 2022-07-05  9:42   ` Johan Hovold
  0 siblings, 0 replies; 178+ messages in thread
From: Johan Hovold @ 2022-07-05  9:42 UTC (permalink / raw)
  To: Vinod Koul, Rob Herring, Krzysztof Kozlowski
  Cc: Andy Gross, Bjorn Andersson, Kishon Vijay Abraham I,
	linux-arm-msm, linux-phy, devicetree, linux-kernel, Johan Hovold

The QMP PHY DT schema is getting unwieldy. Break out the USB PHY
binding in a separate file.

Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
---
 .../phy/{qcom,qmp-phy.yaml => qcom,qmp-usb-phy.yaml}     | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)
 rename Documentation/devicetree/bindings/phy/{qcom,qmp-phy.yaml => qcom,qmp-usb-phy.yaml} (98%)

diff --git a/Documentation/devicetree/bindings/phy/qcom,qmp-phy.yaml b/Documentation/devicetree/bindings/phy/qcom,qmp-usb-phy.yaml
similarity index 98%
rename from Documentation/devicetree/bindings/phy/qcom,qmp-phy.yaml
rename to Documentation/devicetree/bindings/phy/qcom,qmp-usb-phy.yaml
index 04c24f8e4526..8343e24b669a 100644
--- a/Documentation/devicetree/bindings/phy/qcom,qmp-phy.yaml
+++ b/Documentation/devicetree/bindings/phy/qcom,qmp-usb-phy.yaml
@@ -2,10 +2,10 @@
 
 %YAML 1.2
 ---
-$id: "http://devicetree.org/schemas/phy/qcom,qmp-phy.yaml#"
+$id: "http://devicetree.org/schemas/phy/qcom,qmp-usb-phy.yaml#"
 $schema: "http://devicetree.org/meta-schemas/core.yaml#"
 
-title: Qualcomm QMP PHY controller
+title: Qualcomm QMP PHY controller (USB)
 
 maintainers:
   - Vinod Koul <vkoul@kernel.org>
@@ -130,6 +130,7 @@ allOf:
       required:
         - vdda-phy-supply
         - vdda-pll-supply
+
   - if:
       properties:
         compatible:
@@ -160,6 +161,7 @@ allOf:
       required:
         - vdda-phy-supply
         - vdda-pll-supply
+
   - if:
       properties:
         compatible:
@@ -191,6 +193,7 @@ allOf:
       required:
         - vdda-phy-supply
         - vdda-pll-supply
+
   - if:
       properties:
         compatible:
@@ -225,6 +228,7 @@ allOf:
       required:
         - vdda-phy-supply
         - vdda-pll-supply
+
   - if:
       properties:
         compatible:
@@ -255,6 +259,7 @@ allOf:
       required:
         - vdda-phy-supply
         - vdda-pll-supply
+
   - if:
       properties:
         compatible:
-- 
2.35.1


-- 
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy

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

* [PATCH 30/43] dt-bindings: phy: qcom,qmp-usb: clean up clock constraints
  2022-07-05  9:41 ` Johan Hovold
@ 2022-07-05  9:42   ` Johan Hovold
  -1 siblings, 0 replies; 178+ messages in thread
From: Johan Hovold @ 2022-07-05  9:42 UTC (permalink / raw)
  To: Vinod Koul, Rob Herring, Krzysztof Kozlowski
  Cc: Andy Gross, Bjorn Andersson, Kishon Vijay Abraham I,
	linux-arm-msm, linux-phy, devicetree, linux-kernel, Johan Hovold

The USB PHY binding uses three or four clocks.

Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
---
 Documentation/devicetree/bindings/phy/qcom,qmp-usb-phy.yaml | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/Documentation/devicetree/bindings/phy/qcom,qmp-usb-phy.yaml b/Documentation/devicetree/bindings/phy/qcom,qmp-usb-phy.yaml
index 8343e24b669a..2f7043503ca0 100644
--- a/Documentation/devicetree/bindings/phy/qcom,qmp-usb-phy.yaml
+++ b/Documentation/devicetree/bindings/phy/qcom,qmp-usb-phy.yaml
@@ -51,11 +51,11 @@ properties:
   ranges: true
 
   clocks:
-    minItems: 1
+    minItems: 3
     maxItems: 4
 
   clock-names:
-    minItems: 1
+    minItems: 3
     maxItems: 4
 
   resets:
-- 
2.35.1


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

* [PATCH 30/43] dt-bindings: phy: qcom,qmp-usb: clean up clock constraints
@ 2022-07-05  9:42   ` Johan Hovold
  0 siblings, 0 replies; 178+ messages in thread
From: Johan Hovold @ 2022-07-05  9:42 UTC (permalink / raw)
  To: Vinod Koul, Rob Herring, Krzysztof Kozlowski
  Cc: Andy Gross, Bjorn Andersson, Kishon Vijay Abraham I,
	linux-arm-msm, linux-phy, devicetree, linux-kernel, Johan Hovold

The USB PHY binding uses three or four clocks.

Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
---
 Documentation/devicetree/bindings/phy/qcom,qmp-usb-phy.yaml | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/Documentation/devicetree/bindings/phy/qcom,qmp-usb-phy.yaml b/Documentation/devicetree/bindings/phy/qcom,qmp-usb-phy.yaml
index 8343e24b669a..2f7043503ca0 100644
--- a/Documentation/devicetree/bindings/phy/qcom,qmp-usb-phy.yaml
+++ b/Documentation/devicetree/bindings/phy/qcom,qmp-usb-phy.yaml
@@ -51,11 +51,11 @@ properties:
   ranges: true
 
   clocks:
-    minItems: 1
+    minItems: 3
     maxItems: 4
 
   clock-names:
-    minItems: 1
+    minItems: 3
     maxItems: 4
 
   resets:
-- 
2.35.1


-- 
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy

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

* [PATCH 31/43] dt-bindings: phy: qcom,qmp-usb: clean up supplies
  2022-07-05  9:41 ` Johan Hovold
@ 2022-07-05  9:42   ` Johan Hovold
  -1 siblings, 0 replies; 178+ messages in thread
From: Johan Hovold @ 2022-07-05  9:42 UTC (permalink / raw)
  To: Vinod Koul, Rob Herring, Krzysztof Kozlowski
  Cc: Andy Gross, Bjorn Andersson, Kishon Vijay Abraham I,
	linux-arm-msm, linux-phy, devicetree, linux-kernel, Johan Hovold

The USB PHY binding requires the vdda-phy and vdd-pll supplies.

Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
---
 .../bindings/phy/qcom,qmp-usb-phy.yaml        | 20 ++-----------------
 1 file changed, 2 insertions(+), 18 deletions(-)

diff --git a/Documentation/devicetree/bindings/phy/qcom,qmp-usb-phy.yaml b/Documentation/devicetree/bindings/phy/qcom,qmp-usb-phy.yaml
index 2f7043503ca0..3404ad7fc6db 100644
--- a/Documentation/devicetree/bindings/phy/qcom,qmp-usb-phy.yaml
+++ b/Documentation/devicetree/bindings/phy/qcom,qmp-usb-phy.yaml
@@ -95,6 +95,8 @@ required:
   - clock-names
   - resets
   - reset-names
+  - vdda-phy-supply
+  - vdda-pll-supply
 
 additionalProperties: false
 
@@ -127,9 +129,6 @@ allOf:
           items:
             - const: phy
             - const: common
-      required:
-        - vdda-phy-supply
-        - vdda-pll-supply
 
   - if:
       properties:
@@ -158,9 +157,6 @@ allOf:
           items:
             - const: phy
             - const: common
-      required:
-        - vdda-phy-supply
-        - vdda-pll-supply
 
   - if:
       properties:
@@ -190,9 +186,6 @@ allOf:
           items:
             - const: phy
             - const: common
-      required:
-        - vdda-phy-supply
-        - vdda-pll-supply
 
   - if:
       properties:
@@ -225,9 +218,6 @@ allOf:
           items:
             - const: phy
             - const: common
-      required:
-        - vdda-phy-supply
-        - vdda-pll-supply
 
   - if:
       properties:
@@ -256,9 +246,6 @@ allOf:
           items:
             - const: phy
             - const: common
-      required:
-        - vdda-phy-supply
-        - vdda-pll-supply
 
   - if:
       properties:
@@ -286,9 +273,6 @@ allOf:
           items:
             - const: phy_phy
             - const: phy
-      required:
-        - vdda-phy-supply
-        - vdda-pll-supply
 
 examples:
   - |
-- 
2.35.1


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

* [PATCH 31/43] dt-bindings: phy: qcom,qmp-usb: clean up supplies
@ 2022-07-05  9:42   ` Johan Hovold
  0 siblings, 0 replies; 178+ messages in thread
From: Johan Hovold @ 2022-07-05  9:42 UTC (permalink / raw)
  To: Vinod Koul, Rob Herring, Krzysztof Kozlowski
  Cc: Andy Gross, Bjorn Andersson, Kishon Vijay Abraham I,
	linux-arm-msm, linux-phy, devicetree, linux-kernel, Johan Hovold

The USB PHY binding requires the vdda-phy and vdd-pll supplies.

Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
---
 .../bindings/phy/qcom,qmp-usb-phy.yaml        | 20 ++-----------------
 1 file changed, 2 insertions(+), 18 deletions(-)

diff --git a/Documentation/devicetree/bindings/phy/qcom,qmp-usb-phy.yaml b/Documentation/devicetree/bindings/phy/qcom,qmp-usb-phy.yaml
index 2f7043503ca0..3404ad7fc6db 100644
--- a/Documentation/devicetree/bindings/phy/qcom,qmp-usb-phy.yaml
+++ b/Documentation/devicetree/bindings/phy/qcom,qmp-usb-phy.yaml
@@ -95,6 +95,8 @@ required:
   - clock-names
   - resets
   - reset-names
+  - vdda-phy-supply
+  - vdda-pll-supply
 
 additionalProperties: false
 
@@ -127,9 +129,6 @@ allOf:
           items:
             - const: phy
             - const: common
-      required:
-        - vdda-phy-supply
-        - vdda-pll-supply
 
   - if:
       properties:
@@ -158,9 +157,6 @@ allOf:
           items:
             - const: phy
             - const: common
-      required:
-        - vdda-phy-supply
-        - vdda-pll-supply
 
   - if:
       properties:
@@ -190,9 +186,6 @@ allOf:
           items:
             - const: phy
             - const: common
-      required:
-        - vdda-phy-supply
-        - vdda-pll-supply
 
   - if:
       properties:
@@ -225,9 +218,6 @@ allOf:
           items:
             - const: phy
             - const: common
-      required:
-        - vdda-phy-supply
-        - vdda-pll-supply
 
   - if:
       properties:
@@ -256,9 +246,6 @@ allOf:
           items:
             - const: phy
             - const: common
-      required:
-        - vdda-phy-supply
-        - vdda-pll-supply
 
   - if:
       properties:
@@ -286,9 +273,6 @@ allOf:
           items:
             - const: phy_phy
             - const: phy
-      required:
-        - vdda-phy-supply
-        - vdda-pll-supply
 
 examples:
   - |
-- 
2.35.1


-- 
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy

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

* [PATCH 32/43] dt-bindings: phy: qcom,qmp-usb: drop unused vddp-ref-clk supply
  2022-07-05  9:41 ` Johan Hovold
@ 2022-07-05  9:42   ` Johan Hovold
  -1 siblings, 0 replies; 178+ messages in thread
From: Johan Hovold @ 2022-07-05  9:42 UTC (permalink / raw)
  To: Vinod Koul, Rob Herring, Krzysztof Kozlowski
  Cc: Andy Gross, Bjorn Andersson, Kishon Vijay Abraham I,
	linux-arm-msm, linux-phy, devicetree, linux-kernel, Johan Hovold

Only UFS PHY nodes in mainline have a vddp-ref-clk supply. Drop it from
the USB PHY binding.

Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
---
 Documentation/devicetree/bindings/phy/qcom,qmp-usb-phy.yaml | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/Documentation/devicetree/bindings/phy/qcom,qmp-usb-phy.yaml b/Documentation/devicetree/bindings/phy/qcom,qmp-usb-phy.yaml
index 3404ad7fc6db..76979aff086f 100644
--- a/Documentation/devicetree/bindings/phy/qcom,qmp-usb-phy.yaml
+++ b/Documentation/devicetree/bindings/phy/qcom,qmp-usb-phy.yaml
@@ -74,10 +74,6 @@ properties:
     description:
       Phandle to 1.8V regulator supply to PHY refclk pll block.
 
-  vddp-ref-clk-supply:
-    description:
-      Phandle to a regulator supply to any specific refclk pll block.
-
 patternProperties:
   "^phy@[0-9a-f]+$":
     type: object
-- 
2.35.1


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

* [PATCH 32/43] dt-bindings: phy: qcom,qmp-usb: drop unused vddp-ref-clk supply
@ 2022-07-05  9:42   ` Johan Hovold
  0 siblings, 0 replies; 178+ messages in thread
From: Johan Hovold @ 2022-07-05  9:42 UTC (permalink / raw)
  To: Vinod Koul, Rob Herring, Krzysztof Kozlowski
  Cc: Andy Gross, Bjorn Andersson, Kishon Vijay Abraham I,
	linux-arm-msm, linux-phy, devicetree, linux-kernel, Johan Hovold

Only UFS PHY nodes in mainline have a vddp-ref-clk supply. Drop it from
the USB PHY binding.

Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
---
 Documentation/devicetree/bindings/phy/qcom,qmp-usb-phy.yaml | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/Documentation/devicetree/bindings/phy/qcom,qmp-usb-phy.yaml b/Documentation/devicetree/bindings/phy/qcom,qmp-usb-phy.yaml
index 3404ad7fc6db..76979aff086f 100644
--- a/Documentation/devicetree/bindings/phy/qcom,qmp-usb-phy.yaml
+++ b/Documentation/devicetree/bindings/phy/qcom,qmp-usb-phy.yaml
@@ -74,10 +74,6 @@ properties:
     description:
       Phandle to 1.8V regulator supply to PHY refclk pll block.
 
-  vddp-ref-clk-supply:
-    description:
-      Phandle to a regulator supply to any specific refclk pll block.
-
 patternProperties:
   "^phy@[0-9a-f]+$":
     type: object
-- 
2.35.1


-- 
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy

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

* [PATCH 33/43] dt-bindings: phy: qcom,qmp-usb: clean up reset providers
  2022-07-05  9:41 ` Johan Hovold
@ 2022-07-05  9:42   ` Johan Hovold
  -1 siblings, 0 replies; 178+ messages in thread
From: Johan Hovold @ 2022-07-05  9:42 UTC (permalink / raw)
  To: Vinod Koul, Rob Herring, Krzysztof Kozlowski
  Cc: Andy Gross, Bjorn Andersson, Kishon Vijay Abraham I,
	linux-arm-msm, linux-phy, devicetree, linux-kernel, Johan Hovold

The USB PHY binding requires two resets.

Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
---
 .../devicetree/bindings/phy/qcom,qmp-usb-phy.yaml         | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/Documentation/devicetree/bindings/phy/qcom,qmp-usb-phy.yaml b/Documentation/devicetree/bindings/phy/qcom,qmp-usb-phy.yaml
index 76979aff086f..21744bbe1764 100644
--- a/Documentation/devicetree/bindings/phy/qcom,qmp-usb-phy.yaml
+++ b/Documentation/devicetree/bindings/phy/qcom,qmp-usb-phy.yaml
@@ -59,12 +59,12 @@ properties:
     maxItems: 4
 
   resets:
-    minItems: 1
-    maxItems: 3
+    minItems: 2
+    maxItems: 2
 
   reset-names:
-    minItems: 1
-    maxItems: 3
+    minItems: 2
+    maxItems: 2
 
   vdda-phy-supply:
     description:
-- 
2.35.1


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

* [PATCH 33/43] dt-bindings: phy: qcom,qmp-usb: clean up reset providers
@ 2022-07-05  9:42   ` Johan Hovold
  0 siblings, 0 replies; 178+ messages in thread
From: Johan Hovold @ 2022-07-05  9:42 UTC (permalink / raw)
  To: Vinod Koul, Rob Herring, Krzysztof Kozlowski
  Cc: Andy Gross, Bjorn Andersson, Kishon Vijay Abraham I,
	linux-arm-msm, linux-phy, devicetree, linux-kernel, Johan Hovold

The USB PHY binding requires two resets.

Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
---
 .../devicetree/bindings/phy/qcom,qmp-usb-phy.yaml         | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/Documentation/devicetree/bindings/phy/qcom,qmp-usb-phy.yaml b/Documentation/devicetree/bindings/phy/qcom,qmp-usb-phy.yaml
index 76979aff086f..21744bbe1764 100644
--- a/Documentation/devicetree/bindings/phy/qcom,qmp-usb-phy.yaml
+++ b/Documentation/devicetree/bindings/phy/qcom,qmp-usb-phy.yaml
@@ -59,12 +59,12 @@ properties:
     maxItems: 4
 
   resets:
-    minItems: 1
-    maxItems: 3
+    minItems: 2
+    maxItems: 2
 
   reset-names:
-    minItems: 1
-    maxItems: 3
+    minItems: 2
+    maxItems: 2
 
   vdda-phy-supply:
     description:
-- 
2.35.1


-- 
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy

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

* [PATCH 34/43] dt-bindings: phy: qcom,qmp-usb: add missing child node schema
  2022-07-05  9:41 ` Johan Hovold
@ 2022-07-05  9:42   ` Johan Hovold
  -1 siblings, 0 replies; 178+ messages in thread
From: Johan Hovold @ 2022-07-05  9:42 UTC (permalink / raw)
  To: Vinod Koul, Rob Herring, Krzysztof Kozlowski
  Cc: Andy Gross, Bjorn Andersson, Kishon Vijay Abraham I,
	linux-arm-msm, linux-phy, devicetree, linux-kernel, Johan Hovold

Add the missing the description of the PHY-provider child node which was
ignored when converting to DT schema.

Also fix up the incorrect description that claimed that one child node
per lane was required.

Fixes: ccf51c1cedfd ("dt-bindings: phy: qcom,qmp: Convert QMP PHY bindings to yaml")
Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
---
 .../bindings/phy/qcom,qmp-usb-phy.yaml        | 109 +++++++++++++++++-
 1 file changed, 106 insertions(+), 3 deletions(-)

diff --git a/Documentation/devicetree/bindings/phy/qcom,qmp-usb-phy.yaml b/Documentation/devicetree/bindings/phy/qcom,qmp-usb-phy.yaml
index 21744bbe1764..c9a6765708cc 100644
--- a/Documentation/devicetree/bindings/phy/qcom,qmp-usb-phy.yaml
+++ b/Documentation/devicetree/bindings/phy/qcom,qmp-usb-phy.yaml
@@ -77,9 +77,37 @@ properties:
 patternProperties:
   "^phy@[0-9a-f]+$":
     type: object
-    description:
-      Each device node of QMP PHY is required to have as many child nodes as
-      the number of lanes the PHY has.
+    description: Single PHY-provider child node.
+    properties:
+      reg:
+        minItems: 3
+        maxItems: 6
+
+      clocks:
+        items:
+          - description: PIPE clock
+
+      clock-names:
+        items:
+          - const: pipe0
+
+      "#clock-cells":
+        const: 0
+
+      clock-output-names: true
+
+      "#phy-cells":
+        const: 0
+
+    required:
+      - reg
+      - clocks
+      - clock-names
+      - "#clock-cells"
+      - clock-output-names
+      - "#phy-cells"
+
+    additionalProperties: false
 
 required:
   - compatible
@@ -270,6 +298,81 @@ allOf:
             - const: phy_phy
             - const: phy
 
+  - if:
+      properties:
+        compatible:
+          contains:
+            enum:
+              - qcom,msm8998-qmp-usb3-phy
+              - qcom,sdm845-qmp-usb3-phy
+              - qcom,sm8150-qmp-usb3-phy
+              - qcom,sm8350-qmp-usb3-phy
+              - qcom,sm8450-qmp-usb3-phy
+    then:
+      patternProperties:
+        "^phy@[0-9a-f]+$":
+          properties:
+            reg:
+              minItems: 5
+              maxItems: 6
+              items:
+                - description: TX lane 1
+                - description: RX lane 1
+                - description: PCS
+                - description: TX lane 2
+                - description: RX lane 2
+                - description: PCS_MISC
+      if:
+        properties:
+          compatible:
+            contains:
+              enum:
+                - qcom,msm8998-qmp-usb3-phy
+      then:
+        patternProperties:
+          "^phy@[0-9a-f]+$":
+            properties:
+              reg:
+                maxItems: 5
+      else:
+        patternProperties:
+          "^phy@[0-9a-f]+$":
+            properties:
+              reg:
+                minItems: 6
+    else:
+      patternProperties:
+        "^phy@[0-9a-f]+$":
+          properties:
+            reg:
+              minItems: 3
+              maxItems: 4
+              items:
+                - description: TX
+                - description: RX
+                - description: PCS
+                - description: PCS_MISC
+      if:
+        properties:
+          compatible:
+            contains:
+              enum:
+                - qcom,msm8996-qmp-usb3-phy
+                - qcom,sm8250-qmp-usb3-uni-phy
+                - qcom,sm8350-qmp-usb3-uni-phy
+      then:
+        patternProperties:
+          "^phy@[0-9a-f]+$":
+            properties:
+              reg:
+                maxItems: 3
+      else:
+        patternProperties:
+          "^phy@[0-9a-f]+$":
+            properties:
+              reg:
+                minItems: 4
+
 examples:
   - |
     #include <dt-bindings/clock/qcom,gcc-sdm845.h>
-- 
2.35.1


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

* [PATCH 34/43] dt-bindings: phy: qcom,qmp-usb: add missing child node schema
@ 2022-07-05  9:42   ` Johan Hovold
  0 siblings, 0 replies; 178+ messages in thread
From: Johan Hovold @ 2022-07-05  9:42 UTC (permalink / raw)
  To: Vinod Koul, Rob Herring, Krzysztof Kozlowski
  Cc: Andy Gross, Bjorn Andersson, Kishon Vijay Abraham I,
	linux-arm-msm, linux-phy, devicetree, linux-kernel, Johan Hovold

Add the missing the description of the PHY-provider child node which was
ignored when converting to DT schema.

Also fix up the incorrect description that claimed that one child node
per lane was required.

Fixes: ccf51c1cedfd ("dt-bindings: phy: qcom,qmp: Convert QMP PHY bindings to yaml")
Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
---
 .../bindings/phy/qcom,qmp-usb-phy.yaml        | 109 +++++++++++++++++-
 1 file changed, 106 insertions(+), 3 deletions(-)

diff --git a/Documentation/devicetree/bindings/phy/qcom,qmp-usb-phy.yaml b/Documentation/devicetree/bindings/phy/qcom,qmp-usb-phy.yaml
index 21744bbe1764..c9a6765708cc 100644
--- a/Documentation/devicetree/bindings/phy/qcom,qmp-usb-phy.yaml
+++ b/Documentation/devicetree/bindings/phy/qcom,qmp-usb-phy.yaml
@@ -77,9 +77,37 @@ properties:
 patternProperties:
   "^phy@[0-9a-f]+$":
     type: object
-    description:
-      Each device node of QMP PHY is required to have as many child nodes as
-      the number of lanes the PHY has.
+    description: Single PHY-provider child node.
+    properties:
+      reg:
+        minItems: 3
+        maxItems: 6
+
+      clocks:
+        items:
+          - description: PIPE clock
+
+      clock-names:
+        items:
+          - const: pipe0
+
+      "#clock-cells":
+        const: 0
+
+      clock-output-names: true
+
+      "#phy-cells":
+        const: 0
+
+    required:
+      - reg
+      - clocks
+      - clock-names
+      - "#clock-cells"
+      - clock-output-names
+      - "#phy-cells"
+
+    additionalProperties: false
 
 required:
   - compatible
@@ -270,6 +298,81 @@ allOf:
             - const: phy_phy
             - const: phy
 
+  - if:
+      properties:
+        compatible:
+          contains:
+            enum:
+              - qcom,msm8998-qmp-usb3-phy
+              - qcom,sdm845-qmp-usb3-phy
+              - qcom,sm8150-qmp-usb3-phy
+              - qcom,sm8350-qmp-usb3-phy
+              - qcom,sm8450-qmp-usb3-phy
+    then:
+      patternProperties:
+        "^phy@[0-9a-f]+$":
+          properties:
+            reg:
+              minItems: 5
+              maxItems: 6
+              items:
+                - description: TX lane 1
+                - description: RX lane 1
+                - description: PCS
+                - description: TX lane 2
+                - description: RX lane 2
+                - description: PCS_MISC
+      if:
+        properties:
+          compatible:
+            contains:
+              enum:
+                - qcom,msm8998-qmp-usb3-phy
+      then:
+        patternProperties:
+          "^phy@[0-9a-f]+$":
+            properties:
+              reg:
+                maxItems: 5
+      else:
+        patternProperties:
+          "^phy@[0-9a-f]+$":
+            properties:
+              reg:
+                minItems: 6
+    else:
+      patternProperties:
+        "^phy@[0-9a-f]+$":
+          properties:
+            reg:
+              minItems: 3
+              maxItems: 4
+              items:
+                - description: TX
+                - description: RX
+                - description: PCS
+                - description: PCS_MISC
+      if:
+        properties:
+          compatible:
+            contains:
+              enum:
+                - qcom,msm8996-qmp-usb3-phy
+                - qcom,sm8250-qmp-usb3-uni-phy
+                - qcom,sm8350-qmp-usb3-uni-phy
+      then:
+        patternProperties:
+          "^phy@[0-9a-f]+$":
+            properties:
+              reg:
+                maxItems: 3
+      else:
+        patternProperties:
+          "^phy@[0-9a-f]+$":
+            properties:
+              reg:
+                minItems: 4
+
 examples:
   - |
     #include <dt-bindings/clock/qcom,gcc-sdm845.h>
-- 
2.35.1


-- 
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy

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

* [PATCH 35/43] dt-bindings: phy: qcom,qmp-usb: deprecate PIPE clock name
  2022-07-05  9:41 ` Johan Hovold
@ 2022-07-05  9:42   ` Johan Hovold
  -1 siblings, 0 replies; 178+ messages in thread
From: Johan Hovold @ 2022-07-05  9:42 UTC (permalink / raw)
  To: Vinod Koul, Rob Herring, Krzysztof Kozlowski
  Cc: Andy Gross, Bjorn Andersson, Kishon Vijay Abraham I,
	linux-arm-msm, linux-phy, devicetree, linux-kernel, Johan Hovold

Drop the bogus "lane" suffix from the PHY PIPE clock name and mark the
old name as deprecated.

Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
---
 .../devicetree/bindings/phy/qcom,qmp-usb-phy.yaml      | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/Documentation/devicetree/bindings/phy/qcom,qmp-usb-phy.yaml b/Documentation/devicetree/bindings/phy/qcom,qmp-usb-phy.yaml
index c9a6765708cc..279b8823bc17 100644
--- a/Documentation/devicetree/bindings/phy/qcom,qmp-usb-phy.yaml
+++ b/Documentation/devicetree/bindings/phy/qcom,qmp-usb-phy.yaml
@@ -88,8 +88,12 @@ patternProperties:
           - description: PIPE clock
 
       clock-names:
-        items:
-          - const: pipe0
+        oneOf:
+          - items:
+              - const: pipe
+          - items:
+              - const: pipe0
+            deprecated: true
 
       "#clock-cells":
         const: 0
@@ -403,7 +407,7 @@ examples:
                       <0x600 0x70>;
 
                 clocks = <&gcc GCC_USB3_SEC_PHY_PIPE_CLK>;
-                clock-names = "pipe0";
+                clock-names = "pipe";
 
                 #clock-cells = <0>;
                 clock-output-names = "usb3_uni_phy_pipe_clk_src";
-- 
2.35.1


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

* [PATCH 35/43] dt-bindings: phy: qcom,qmp-usb: deprecate PIPE clock name
@ 2022-07-05  9:42   ` Johan Hovold
  0 siblings, 0 replies; 178+ messages in thread
From: Johan Hovold @ 2022-07-05  9:42 UTC (permalink / raw)
  To: Vinod Koul, Rob Herring, Krzysztof Kozlowski
  Cc: Andy Gross, Bjorn Andersson, Kishon Vijay Abraham I,
	linux-arm-msm, linux-phy, devicetree, linux-kernel, Johan Hovold

Drop the bogus "lane" suffix from the PHY PIPE clock name and mark the
old name as deprecated.

Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
---
 .../devicetree/bindings/phy/qcom,qmp-usb-phy.yaml      | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/Documentation/devicetree/bindings/phy/qcom,qmp-usb-phy.yaml b/Documentation/devicetree/bindings/phy/qcom,qmp-usb-phy.yaml
index c9a6765708cc..279b8823bc17 100644
--- a/Documentation/devicetree/bindings/phy/qcom,qmp-usb-phy.yaml
+++ b/Documentation/devicetree/bindings/phy/qcom,qmp-usb-phy.yaml
@@ -88,8 +88,12 @@ patternProperties:
           - description: PIPE clock
 
       clock-names:
-        items:
-          - const: pipe0
+        oneOf:
+          - items:
+              - const: pipe
+          - items:
+              - const: pipe0
+            deprecated: true
 
       "#clock-cells":
         const: 0
@@ -403,7 +407,7 @@ examples:
                       <0x600 0x70>;
 
                 clocks = <&gcc GCC_USB3_SEC_PHY_PIPE_CLK>;
-                clock-names = "pipe0";
+                clock-names = "pipe";
 
                 #clock-cells = <0>;
                 clock-output-names = "usb3_uni_phy_pipe_clk_src";
-- 
2.35.1


-- 
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy

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

* [PATCH 36/43] dt-bindings: phy: qcom,qmp-usb3-dp: fix bogus clock-cells property
  2022-07-05  9:41 ` Johan Hovold
@ 2022-07-05  9:42   ` Johan Hovold
  -1 siblings, 0 replies; 178+ messages in thread
From: Johan Hovold @ 2022-07-05  9:42 UTC (permalink / raw)
  To: Vinod Koul, Rob Herring, Krzysztof Kozlowski
  Cc: Andy Gross, Bjorn Andersson, Kishon Vijay Abraham I,
	linux-arm-msm, linux-phy, devicetree, linux-kernel, Johan Hovold

The QMP PHY wrapper node is not a clock provider so drop the bogus
'#clock-cells' property that was added when converting to DT schema.

Fixes: 59351049ad15 ("dt-bindings: phy: qcom,qmp-usb3-dp: Add dt bindings for USB3 DP PHY")
Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
---
 .../devicetree/bindings/phy/qcom,qmp-usb3-dp-phy.yaml        | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/Documentation/devicetree/bindings/phy/qcom,qmp-usb3-dp-phy.yaml b/Documentation/devicetree/bindings/phy/qcom,qmp-usb3-dp-phy.yaml
index 60dc27834e1d..86d64c61bca3 100644
--- a/Documentation/devicetree/bindings/phy/qcom,qmp-usb3-dp-phy.yaml
+++ b/Documentation/devicetree/bindings/phy/qcom,qmp-usb3-dp-phy.yaml
@@ -30,9 +30,6 @@ properties:
       - const: dp_com
       - const: dp
 
-  "#clock-cells":
-    enum: [ 1, 2 ]
-
   "#address-cells":
     enum: [ 1, 2 ]
 
@@ -147,7 +144,6 @@ patternProperties:
 required:
   - compatible
   - reg
-  - "#clock-cells"
   - "#address-cells"
   - "#size-cells"
   - ranges
@@ -169,7 +165,6 @@ examples:
               <0x088e8000 0x10>,
               <0x088ea000 0x40>;
         reg-names = "usb", "dp_com", "dp";
-        #clock-cells = <1>;
         #address-cells = <1>;
         #size-cells = <1>;
         ranges = <0x0 0x088e9000 0x2000>;
-- 
2.35.1


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

* [PATCH 36/43] dt-bindings: phy: qcom,qmp-usb3-dp: fix bogus clock-cells property
@ 2022-07-05  9:42   ` Johan Hovold
  0 siblings, 0 replies; 178+ messages in thread
From: Johan Hovold @ 2022-07-05  9:42 UTC (permalink / raw)
  To: Vinod Koul, Rob Herring, Krzysztof Kozlowski
  Cc: Andy Gross, Bjorn Andersson, Kishon Vijay Abraham I,
	linux-arm-msm, linux-phy, devicetree, linux-kernel, Johan Hovold

The QMP PHY wrapper node is not a clock provider so drop the bogus
'#clock-cells' property that was added when converting to DT schema.

Fixes: 59351049ad15 ("dt-bindings: phy: qcom,qmp-usb3-dp: Add dt bindings for USB3 DP PHY")
Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
---
 .../devicetree/bindings/phy/qcom,qmp-usb3-dp-phy.yaml        | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/Documentation/devicetree/bindings/phy/qcom,qmp-usb3-dp-phy.yaml b/Documentation/devicetree/bindings/phy/qcom,qmp-usb3-dp-phy.yaml
index 60dc27834e1d..86d64c61bca3 100644
--- a/Documentation/devicetree/bindings/phy/qcom,qmp-usb3-dp-phy.yaml
+++ b/Documentation/devicetree/bindings/phy/qcom,qmp-usb3-dp-phy.yaml
@@ -30,9 +30,6 @@ properties:
       - const: dp_com
       - const: dp
 
-  "#clock-cells":
-    enum: [ 1, 2 ]
-
   "#address-cells":
     enum: [ 1, 2 ]
 
@@ -147,7 +144,6 @@ patternProperties:
 required:
   - compatible
   - reg
-  - "#clock-cells"
   - "#address-cells"
   - "#size-cells"
   - ranges
@@ -169,7 +165,6 @@ examples:
               <0x088e8000 0x10>,
               <0x088ea000 0x40>;
         reg-names = "usb", "dp_com", "dp";
-        #clock-cells = <1>;
         #address-cells = <1>;
         #size-cells = <1>;
         ranges = <0x0 0x088e9000 0x2000>;
-- 
2.35.1


-- 
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy

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

* [PATCH 37/43] dt-bindings: phy: qcom,qmp-usb3-dp: deprecate USB PIPE clock name
  2022-07-05  9:41 ` Johan Hovold
@ 2022-07-05  9:42   ` Johan Hovold
  -1 siblings, 0 replies; 178+ messages in thread
From: Johan Hovold @ 2022-07-05  9:42 UTC (permalink / raw)
  To: Vinod Koul, Rob Herring, Krzysztof Kozlowski
  Cc: Andy Gross, Bjorn Andersson, Kishon Vijay Abraham I,
	linux-arm-msm, linux-phy, devicetree, linux-kernel, Johan Hovold

Drop the bogus "lane" suffix from the USB PHY PIPE clock name and mark
the old name as deprecated.

Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
---
 .../devicetree/bindings/phy/qcom,qmp-usb3-dp-phy.yaml  | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/Documentation/devicetree/bindings/phy/qcom,qmp-usb3-dp-phy.yaml b/Documentation/devicetree/bindings/phy/qcom,qmp-usb3-dp-phy.yaml
index 86d64c61bca3..09d7708158bb 100644
--- a/Documentation/devicetree/bindings/phy/qcom,qmp-usb3-dp-phy.yaml
+++ b/Documentation/devicetree/bindings/phy/qcom,qmp-usb3-dp-phy.yaml
@@ -96,8 +96,12 @@ patternProperties:
           - description: pipe clock
 
       clock-names:
-        items:
-          - const: pipe0
+        oneOf:
+          - items:
+              - const: pipe
+          - items:
+              - const: pipe0
+            deprecated: true
 
       clock-output-names:
         items:
@@ -192,7 +196,7 @@ examples:
             #clock-cells = <0>;
             #phy-cells = <0>;
             clocks = <&gcc GCC_USB3_PRIM_PHY_PIPE_CLK>;
-            clock-names = "pipe0";
+            clock-names = "pipe";
             clock-output-names = "usb3_phy_pipe_clk_src";
         };
 
-- 
2.35.1


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

* [PATCH 37/43] dt-bindings: phy: qcom,qmp-usb3-dp: deprecate USB PIPE clock name
@ 2022-07-05  9:42   ` Johan Hovold
  0 siblings, 0 replies; 178+ messages in thread
From: Johan Hovold @ 2022-07-05  9:42 UTC (permalink / raw)
  To: Vinod Koul, Rob Herring, Krzysztof Kozlowski
  Cc: Andy Gross, Bjorn Andersson, Kishon Vijay Abraham I,
	linux-arm-msm, linux-phy, devicetree, linux-kernel, Johan Hovold

Drop the bogus "lane" suffix from the USB PHY PIPE clock name and mark
the old name as deprecated.

Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
---
 .../devicetree/bindings/phy/qcom,qmp-usb3-dp-phy.yaml  | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/Documentation/devicetree/bindings/phy/qcom,qmp-usb3-dp-phy.yaml b/Documentation/devicetree/bindings/phy/qcom,qmp-usb3-dp-phy.yaml
index 86d64c61bca3..09d7708158bb 100644
--- a/Documentation/devicetree/bindings/phy/qcom,qmp-usb3-dp-phy.yaml
+++ b/Documentation/devicetree/bindings/phy/qcom,qmp-usb3-dp-phy.yaml
@@ -96,8 +96,12 @@ patternProperties:
           - description: pipe clock
 
       clock-names:
-        items:
-          - const: pipe0
+        oneOf:
+          - items:
+              - const: pipe
+          - items:
+              - const: pipe0
+            deprecated: true
 
       clock-output-names:
         items:
@@ -192,7 +196,7 @@ examples:
             #clock-cells = <0>;
             #phy-cells = <0>;
             clocks = <&gcc GCC_USB3_PRIM_PHY_PIPE_CLK>;
-            clock-names = "pipe0";
+            clock-names = "pipe";
             clock-output-names = "usb3_phy_pipe_clk_src";
         };
 
-- 
2.35.1


-- 
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy

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

* [PATCH 38/43] phy: qcom-qmp-pcie: drop pipe clock lane suffix
  2022-07-05  9:41 ` Johan Hovold
@ 2022-07-05  9:42   ` Johan Hovold
  -1 siblings, 0 replies; 178+ messages in thread
From: Johan Hovold @ 2022-07-05  9:42 UTC (permalink / raw)
  To: Vinod Koul, Rob Herring, Krzysztof Kozlowski
  Cc: Andy Gross, Bjorn Andersson, Kishon Vijay Abraham I,
	linux-arm-msm, linux-phy, devicetree, linux-kernel, Johan Hovold

The pipe clock is defined in the "lane" node so there's no need to keep
adding a redundant lane-number suffix to the clock name.

Drop the lane suffix from the pipe clock name, but continue supporting
the legacy name as a fall back.

Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
---
 drivers/phy/qualcomm/phy-qcom-qmp-pcie.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/drivers/phy/qualcomm/phy-qcom-qmp-pcie.c b/drivers/phy/qualcomm/phy-qcom-qmp-pcie.c
index 385ea3d8de08..254ad25591b9 100644
--- a/drivers/phy/qualcomm/phy-qcom-qmp-pcie.c
+++ b/drivers/phy/qualcomm/phy-qcom-qmp-pcie.c
@@ -2210,8 +2210,12 @@ int qcom_qmp_phy_pcie_create(struct device *dev, struct device_node *np, int id,
 	if (!qphy->pcs_misc)
 		dev_vdbg(dev, "PHY pcs_misc-reg not used\n");
 
-	snprintf(prop_name, sizeof(prop_name), "pipe%d", id);
-	qphy->pipe_clk = devm_get_clk_from_child(dev, np, prop_name);
+	qphy->pipe_clk = devm_get_clk_from_child(dev, np, "pipe");
+	if (IS_ERR(qphy->pipe_clk) && PTR_ERR(qphy->pipe_clk) != -EPROBE_DEFER) {
+		/* Fall back to the legacy pipe clock name. */
+		snprintf(prop_name, sizeof(prop_name), "pipe%d", id);
+		qphy->pipe_clk = devm_get_clk_from_child(dev, np, prop_name);
+	}
 	if (IS_ERR(qphy->pipe_clk)) {
 		return dev_err_probe(dev, PTR_ERR(qphy->pipe_clk),
 				     "failed to get lane%d pipe clock\n", id);
-- 
2.35.1


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

* [PATCH 38/43] phy: qcom-qmp-pcie: drop pipe clock lane suffix
@ 2022-07-05  9:42   ` Johan Hovold
  0 siblings, 0 replies; 178+ messages in thread
From: Johan Hovold @ 2022-07-05  9:42 UTC (permalink / raw)
  To: Vinod Koul, Rob Herring, Krzysztof Kozlowski
  Cc: Andy Gross, Bjorn Andersson, Kishon Vijay Abraham I,
	linux-arm-msm, linux-phy, devicetree, linux-kernel, Johan Hovold

The pipe clock is defined in the "lane" node so there's no need to keep
adding a redundant lane-number suffix to the clock name.

Drop the lane suffix from the pipe clock name, but continue supporting
the legacy name as a fall back.

Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
---
 drivers/phy/qualcomm/phy-qcom-qmp-pcie.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/drivers/phy/qualcomm/phy-qcom-qmp-pcie.c b/drivers/phy/qualcomm/phy-qcom-qmp-pcie.c
index 385ea3d8de08..254ad25591b9 100644
--- a/drivers/phy/qualcomm/phy-qcom-qmp-pcie.c
+++ b/drivers/phy/qualcomm/phy-qcom-qmp-pcie.c
@@ -2210,8 +2210,12 @@ int qcom_qmp_phy_pcie_create(struct device *dev, struct device_node *np, int id,
 	if (!qphy->pcs_misc)
 		dev_vdbg(dev, "PHY pcs_misc-reg not used\n");
 
-	snprintf(prop_name, sizeof(prop_name), "pipe%d", id);
-	qphy->pipe_clk = devm_get_clk_from_child(dev, np, prop_name);
+	qphy->pipe_clk = devm_get_clk_from_child(dev, np, "pipe");
+	if (IS_ERR(qphy->pipe_clk) && PTR_ERR(qphy->pipe_clk) != -EPROBE_DEFER) {
+		/* Fall back to the legacy pipe clock name. */
+		snprintf(prop_name, sizeof(prop_name), "pipe%d", id);
+		qphy->pipe_clk = devm_get_clk_from_child(dev, np, prop_name);
+	}
 	if (IS_ERR(qphy->pipe_clk)) {
 		return dev_err_probe(dev, PTR_ERR(qphy->pipe_clk),
 				     "failed to get lane%d pipe clock\n", id);
-- 
2.35.1


-- 
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy

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

* [PATCH 39/43] phy: qcom-qmp-combo: drop unused lane reset
  2022-07-05  9:41 ` Johan Hovold
@ 2022-07-05  9:42   ` Johan Hovold
  -1 siblings, 0 replies; 178+ messages in thread
From: Johan Hovold @ 2022-07-05  9:42 UTC (permalink / raw)
  To: Vinod Koul, Rob Herring, Krzysztof Kozlowski
  Cc: Andy Gross, Bjorn Andersson, Kishon Vijay Abraham I,
	linux-arm-msm, linux-phy, devicetree, linux-kernel, Johan Hovold

Drop the unused lane reset pointer which isn't used by any combo PHY.

Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
---
 drivers/phy/qualcomm/phy-qcom-qmp-combo.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/phy/qualcomm/phy-qcom-qmp-combo.c b/drivers/phy/qualcomm/phy-qcom-qmp-combo.c
index c18cd3b93c30..b266514ae9ee 100644
--- a/drivers/phy/qualcomm/phy-qcom-qmp-combo.c
+++ b/drivers/phy/qualcomm/phy-qcom-qmp-combo.c
@@ -818,7 +818,6 @@ struct qmp_phy_combo_cfg {
  * @pipe_clk: pipe clock
  * @index: lane index
  * @qmp: QMP phy to which this lane belongs
- * @lane_rst: lane's reset controller
  * @mode: current PHY mode
  * @dp_aux_cfg: Display port aux config
  * @dp_opts: Display port optional config
@@ -837,7 +836,6 @@ struct qmp_phy {
 	struct clk *pipe_clk;
 	unsigned int index;
 	struct qcom_qmp *qmp;
-	struct reset_control *lane_rst;
 	enum phy_mode mode;
 	unsigned int dp_aux_cfg;
 	struct phy_configure_opts_dp dp_opts;
-- 
2.35.1


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

* [PATCH 39/43] phy: qcom-qmp-combo: drop unused lane reset
@ 2022-07-05  9:42   ` Johan Hovold
  0 siblings, 0 replies; 178+ messages in thread
From: Johan Hovold @ 2022-07-05  9:42 UTC (permalink / raw)
  To: Vinod Koul, Rob Herring, Krzysztof Kozlowski
  Cc: Andy Gross, Bjorn Andersson, Kishon Vijay Abraham I,
	linux-arm-msm, linux-phy, devicetree, linux-kernel, Johan Hovold

Drop the unused lane reset pointer which isn't used by any combo PHY.

Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
---
 drivers/phy/qualcomm/phy-qcom-qmp-combo.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/phy/qualcomm/phy-qcom-qmp-combo.c b/drivers/phy/qualcomm/phy-qcom-qmp-combo.c
index c18cd3b93c30..b266514ae9ee 100644
--- a/drivers/phy/qualcomm/phy-qcom-qmp-combo.c
+++ b/drivers/phy/qualcomm/phy-qcom-qmp-combo.c
@@ -818,7 +818,6 @@ struct qmp_phy_combo_cfg {
  * @pipe_clk: pipe clock
  * @index: lane index
  * @qmp: QMP phy to which this lane belongs
- * @lane_rst: lane's reset controller
  * @mode: current PHY mode
  * @dp_aux_cfg: Display port aux config
  * @dp_opts: Display port optional config
@@ -837,7 +836,6 @@ struct qmp_phy {
 	struct clk *pipe_clk;
 	unsigned int index;
 	struct qcom_qmp *qmp;
-	struct reset_control *lane_rst;
 	enum phy_mode mode;
 	unsigned int dp_aux_cfg;
 	struct phy_configure_opts_dp dp_opts;
-- 
2.35.1


-- 
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy

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

* [PATCH 40/43] phy: qcom-qmp-combo: drop pipe clock lane suffix
  2022-07-05  9:41 ` Johan Hovold
@ 2022-07-05  9:42   ` Johan Hovold
  -1 siblings, 0 replies; 178+ messages in thread
From: Johan Hovold @ 2022-07-05  9:42 UTC (permalink / raw)
  To: Vinod Koul, Rob Herring, Krzysztof Kozlowski
  Cc: Andy Gross, Bjorn Andersson, Kishon Vijay Abraham I,
	linux-arm-msm, linux-phy, devicetree, linux-kernel, Johan Hovold

The pipe clock is defined in the "lane" node so there's no need to keep
adding a redundant lane-number suffix to the clock name.

Drop the lane suffix from the pipe clock name, but continue supporting
the legacy name as a fall back.

Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
---
 drivers/phy/qualcomm/phy-qcom-qmp-combo.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/drivers/phy/qualcomm/phy-qcom-qmp-combo.c b/drivers/phy/qualcomm/phy-qcom-qmp-combo.c
index b266514ae9ee..7b2eb234cfc2 100644
--- a/drivers/phy/qualcomm/phy-qcom-qmp-combo.c
+++ b/drivers/phy/qualcomm/phy-qcom-qmp-combo.c
@@ -2558,8 +2558,12 @@ int qcom_qmp_phy_combo_create(struct device *dev, struct device_node *np, int id
 	 * Otherwise, we initialize pipe clock to NULL for
 	 * all phys that don't need this.
 	 */
-	snprintf(prop_name, sizeof(prop_name), "pipe%d", id);
-	qphy->pipe_clk = devm_get_clk_from_child(dev, np, prop_name);
+	qphy->pipe_clk = devm_get_clk_from_child(dev, np, "pipe");
+	if (IS_ERR(qphy->pipe_clk) && PTR_ERR(qphy->pipe_clk) != -EPROBE_DEFER) {
+		/* Fall back to the legacy pipe clock name. */
+		snprintf(prop_name, sizeof(prop_name), "pipe%d", id);
+		qphy->pipe_clk = devm_get_clk_from_child(dev, np, prop_name);
+	}
 	if (IS_ERR(qphy->pipe_clk)) {
 		if (cfg->type == PHY_TYPE_USB3) {
 			ret = PTR_ERR(qphy->pipe_clk);
-- 
2.35.1


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

* [PATCH 40/43] phy: qcom-qmp-combo: drop pipe clock lane suffix
@ 2022-07-05  9:42   ` Johan Hovold
  0 siblings, 0 replies; 178+ messages in thread
From: Johan Hovold @ 2022-07-05  9:42 UTC (permalink / raw)
  To: Vinod Koul, Rob Herring, Krzysztof Kozlowski
  Cc: Andy Gross, Bjorn Andersson, Kishon Vijay Abraham I,
	linux-arm-msm, linux-phy, devicetree, linux-kernel, Johan Hovold

The pipe clock is defined in the "lane" node so there's no need to keep
adding a redundant lane-number suffix to the clock name.

Drop the lane suffix from the pipe clock name, but continue supporting
the legacy name as a fall back.

Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
---
 drivers/phy/qualcomm/phy-qcom-qmp-combo.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/drivers/phy/qualcomm/phy-qcom-qmp-combo.c b/drivers/phy/qualcomm/phy-qcom-qmp-combo.c
index b266514ae9ee..7b2eb234cfc2 100644
--- a/drivers/phy/qualcomm/phy-qcom-qmp-combo.c
+++ b/drivers/phy/qualcomm/phy-qcom-qmp-combo.c
@@ -2558,8 +2558,12 @@ int qcom_qmp_phy_combo_create(struct device *dev, struct device_node *np, int id
 	 * Otherwise, we initialize pipe clock to NULL for
 	 * all phys that don't need this.
 	 */
-	snprintf(prop_name, sizeof(prop_name), "pipe%d", id);
-	qphy->pipe_clk = devm_get_clk_from_child(dev, np, prop_name);
+	qphy->pipe_clk = devm_get_clk_from_child(dev, np, "pipe");
+	if (IS_ERR(qphy->pipe_clk) && PTR_ERR(qphy->pipe_clk) != -EPROBE_DEFER) {
+		/* Fall back to the legacy pipe clock name. */
+		snprintf(prop_name, sizeof(prop_name), "pipe%d", id);
+		qphy->pipe_clk = devm_get_clk_from_child(dev, np, prop_name);
+	}
 	if (IS_ERR(qphy->pipe_clk)) {
 		if (cfg->type == PHY_TYPE_USB3) {
 			ret = PTR_ERR(qphy->pipe_clk);
-- 
2.35.1


-- 
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy

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

* [PATCH 41/43] phy: qcom-qmp-pcie-msm8996: drop pipe clock lane suffix
  2022-07-05  9:41 ` Johan Hovold
@ 2022-07-05  9:42   ` Johan Hovold
  -1 siblings, 0 replies; 178+ messages in thread
From: Johan Hovold @ 2022-07-05  9:42 UTC (permalink / raw)
  To: Vinod Koul, Rob Herring, Krzysztof Kozlowski
  Cc: Andy Gross, Bjorn Andersson, Kishon Vijay Abraham I,
	linux-arm-msm, linux-phy, devicetree, linux-kernel, Johan Hovold

The pipe clock is defined in the "lane" node so there's no need to keep
adding a redundant lane-number suffix to the clock name.

Drop the lane suffix from the pipe clock name, but continue supporting
the legacy name as a fall back.

Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
---
 drivers/phy/qualcomm/phy-qcom-qmp-pcie-msm8996.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/drivers/phy/qualcomm/phy-qcom-qmp-pcie-msm8996.c b/drivers/phy/qualcomm/phy-qcom-qmp-pcie-msm8996.c
index 812d14afb5ec..b8481dab54db 100644
--- a/drivers/phy/qualcomm/phy-qcom-qmp-pcie-msm8996.c
+++ b/drivers/phy/qualcomm/phy-qcom-qmp-pcie-msm8996.c
@@ -904,8 +904,12 @@ int qcom_qmp_phy_pcie_msm8996_create(struct device *dev, struct device_node *np,
 	if (!qphy->pcs_misc)
 		dev_vdbg(dev, "PHY pcs_misc-reg not used\n");
 
-	snprintf(prop_name, sizeof(prop_name), "pipe%d", id);
-	qphy->pipe_clk = devm_get_clk_from_child(dev, np, prop_name);
+	qphy->pipe_clk = devm_get_clk_from_child(dev, np, "pipe");
+	if (IS_ERR(qphy->pipe_clk) && PTR_ERR(qphy->pipe_clk) != -EPROBE_DEFER) {
+		/* Fall back to the legacy pipe clock name. */
+		snprintf(prop_name, sizeof(prop_name), "pipe%d", id);
+		qphy->pipe_clk = devm_get_clk_from_child(dev, np, prop_name);
+	}
 	if (IS_ERR(qphy->pipe_clk)) {
 		return dev_err_probe(dev, PTR_ERR(qphy->pipe_clk),
 				     "failed to get lane%d pipe clock\n", id);
-- 
2.35.1


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

* [PATCH 41/43] phy: qcom-qmp-pcie-msm8996: drop pipe clock lane suffix
@ 2022-07-05  9:42   ` Johan Hovold
  0 siblings, 0 replies; 178+ messages in thread
From: Johan Hovold @ 2022-07-05  9:42 UTC (permalink / raw)
  To: Vinod Koul, Rob Herring, Krzysztof Kozlowski
  Cc: Andy Gross, Bjorn Andersson, Kishon Vijay Abraham I,
	linux-arm-msm, linux-phy, devicetree, linux-kernel, Johan Hovold

The pipe clock is defined in the "lane" node so there's no need to keep
adding a redundant lane-number suffix to the clock name.

Drop the lane suffix from the pipe clock name, but continue supporting
the legacy name as a fall back.

Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
---
 drivers/phy/qualcomm/phy-qcom-qmp-pcie-msm8996.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/drivers/phy/qualcomm/phy-qcom-qmp-pcie-msm8996.c b/drivers/phy/qualcomm/phy-qcom-qmp-pcie-msm8996.c
index 812d14afb5ec..b8481dab54db 100644
--- a/drivers/phy/qualcomm/phy-qcom-qmp-pcie-msm8996.c
+++ b/drivers/phy/qualcomm/phy-qcom-qmp-pcie-msm8996.c
@@ -904,8 +904,12 @@ int qcom_qmp_phy_pcie_msm8996_create(struct device *dev, struct device_node *np,
 	if (!qphy->pcs_misc)
 		dev_vdbg(dev, "PHY pcs_misc-reg not used\n");
 
-	snprintf(prop_name, sizeof(prop_name), "pipe%d", id);
-	qphy->pipe_clk = devm_get_clk_from_child(dev, np, prop_name);
+	qphy->pipe_clk = devm_get_clk_from_child(dev, np, "pipe");
+	if (IS_ERR(qphy->pipe_clk) && PTR_ERR(qphy->pipe_clk) != -EPROBE_DEFER) {
+		/* Fall back to the legacy pipe clock name. */
+		snprintf(prop_name, sizeof(prop_name), "pipe%d", id);
+		qphy->pipe_clk = devm_get_clk_from_child(dev, np, prop_name);
+	}
 	if (IS_ERR(qphy->pipe_clk)) {
 		return dev_err_probe(dev, PTR_ERR(qphy->pipe_clk),
 				     "failed to get lane%d pipe clock\n", id);
-- 
2.35.1


-- 
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy

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

* [PATCH 42/43] phy: qcom-qmp-pcie-msm8996: drop reset lane suffix
  2022-07-05  9:41 ` Johan Hovold
@ 2022-07-05  9:42   ` Johan Hovold
  -1 siblings, 0 replies; 178+ messages in thread
From: Johan Hovold @ 2022-07-05  9:42 UTC (permalink / raw)
  To: Vinod Koul, Rob Herring, Krzysztof Kozlowski
  Cc: Andy Gross, Bjorn Andersson, Kishon Vijay Abraham I,
	linux-arm-msm, linux-phy, devicetree, linux-kernel, Johan Hovold

The lane reset is defined in the "lane" node so there's no need to keep
adding a redundant lane-number suffix to the reset name.

Drop the lane-number suffix from the lane reset name, but continue
supporting the legacy name as a fall back.

Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
---
 drivers/phy/qualcomm/phy-qcom-qmp-pcie-msm8996.c | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/drivers/phy/qualcomm/phy-qcom-qmp-pcie-msm8996.c b/drivers/phy/qualcomm/phy-qcom-qmp-pcie-msm8996.c
index b8481dab54db..9ddb42fa5f7a 100644
--- a/drivers/phy/qualcomm/phy-qcom-qmp-pcie-msm8996.c
+++ b/drivers/phy/qualcomm/phy-qcom-qmp-pcie-msm8996.c
@@ -915,9 +915,12 @@ int qcom_qmp_phy_pcie_msm8996_create(struct device *dev, struct device_node *np,
 				     "failed to get lane%d pipe clock\n", id);
 	}
 
-	/* Get lane reset, if any */
-	snprintf(prop_name, sizeof(prop_name), "lane%d", id);
-	qphy->lane_rst = of_reset_control_get_exclusive(np, prop_name);
+	qphy->lane_rst = of_reset_control_get_exclusive(np, "lane");
+	if (IS_ERR(qphy->lane_rst) && PTR_ERR(qphy->lane_rst) != -EPROBE_DEFER) {
+		/* Fall back to the legacy lane reset name. */
+		snprintf(prop_name, sizeof(prop_name), "lane%d", id);
+		qphy->lane_rst = of_reset_control_get_exclusive(np, prop_name);
+	}
 	if (IS_ERR(qphy->lane_rst)) {
 		dev_err(dev, "failed to get lane%d reset\n", id);
 		return PTR_ERR(qphy->lane_rst);
-- 
2.35.1


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

* [PATCH 42/43] phy: qcom-qmp-pcie-msm8996: drop reset lane suffix
@ 2022-07-05  9:42   ` Johan Hovold
  0 siblings, 0 replies; 178+ messages in thread
From: Johan Hovold @ 2022-07-05  9:42 UTC (permalink / raw)
  To: Vinod Koul, Rob Herring, Krzysztof Kozlowski
  Cc: Andy Gross, Bjorn Andersson, Kishon Vijay Abraham I,
	linux-arm-msm, linux-phy, devicetree, linux-kernel, Johan Hovold

The lane reset is defined in the "lane" node so there's no need to keep
adding a redundant lane-number suffix to the reset name.

Drop the lane-number suffix from the lane reset name, but continue
supporting the legacy name as a fall back.

Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
---
 drivers/phy/qualcomm/phy-qcom-qmp-pcie-msm8996.c | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/drivers/phy/qualcomm/phy-qcom-qmp-pcie-msm8996.c b/drivers/phy/qualcomm/phy-qcom-qmp-pcie-msm8996.c
index b8481dab54db..9ddb42fa5f7a 100644
--- a/drivers/phy/qualcomm/phy-qcom-qmp-pcie-msm8996.c
+++ b/drivers/phy/qualcomm/phy-qcom-qmp-pcie-msm8996.c
@@ -915,9 +915,12 @@ int qcom_qmp_phy_pcie_msm8996_create(struct device *dev, struct device_node *np,
 				     "failed to get lane%d pipe clock\n", id);
 	}
 
-	/* Get lane reset, if any */
-	snprintf(prop_name, sizeof(prop_name), "lane%d", id);
-	qphy->lane_rst = of_reset_control_get_exclusive(np, prop_name);
+	qphy->lane_rst = of_reset_control_get_exclusive(np, "lane");
+	if (IS_ERR(qphy->lane_rst) && PTR_ERR(qphy->lane_rst) != -EPROBE_DEFER) {
+		/* Fall back to the legacy lane reset name. */
+		snprintf(prop_name, sizeof(prop_name), "lane%d", id);
+		qphy->lane_rst = of_reset_control_get_exclusive(np, prop_name);
+	}
 	if (IS_ERR(qphy->lane_rst)) {
 		dev_err(dev, "failed to get lane%d reset\n", id);
 		return PTR_ERR(qphy->lane_rst);
-- 
2.35.1


-- 
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy

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

* [PATCH 43/43] phy: qcom-qmp-usb: drop pipe clock lane suffix
  2022-07-05  9:41 ` Johan Hovold
@ 2022-07-05  9:42   ` Johan Hovold
  -1 siblings, 0 replies; 178+ messages in thread
From: Johan Hovold @ 2022-07-05  9:42 UTC (permalink / raw)
  To: Vinod Koul, Rob Herring, Krzysztof Kozlowski
  Cc: Andy Gross, Bjorn Andersson, Kishon Vijay Abraham I,
	linux-arm-msm, linux-phy, devicetree, linux-kernel, Johan Hovold

The pipe clock is defined in the "lane" node so there's no need to keep
adding a redundant lane-number suffix to the clock name.

Drop the lane suffix from the pipe clock name, but continue supporting
the legacy name as a fall back.

Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
---
 drivers/phy/qualcomm/phy-qcom-qmp-usb.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/drivers/phy/qualcomm/phy-qcom-qmp-usb.c b/drivers/phy/qualcomm/phy-qcom-qmp-usb.c
index 994a8232be7b..dfe7294a589f 100644
--- a/drivers/phy/qualcomm/phy-qcom-qmp-usb.c
+++ b/drivers/phy/qualcomm/phy-qcom-qmp-usb.c
@@ -2665,8 +2665,12 @@ int qcom_qmp_phy_usb_create(struct device *dev, struct device_node *np, int id,
 	if (!qphy->pcs_misc)
 		dev_vdbg(dev, "PHY pcs_misc-reg not used\n");
 
-	snprintf(prop_name, sizeof(prop_name), "pipe%d", id);
-	qphy->pipe_clk = devm_get_clk_from_child(dev, np, prop_name);
+	qphy->pipe_clk = devm_get_clk_from_child(dev, np, "pipe");
+	if (IS_ERR(qphy->pipe_clk) && PTR_ERR(qphy->pipe_clk) != -EPROBE_DEFER) {
+		/* Fall back to the legacy pipe clock name. */
+		snprintf(prop_name, sizeof(prop_name), "pipe%d", id);
+		qphy->pipe_clk = devm_get_clk_from_child(dev, np, prop_name);
+	}
 	if (IS_ERR(qphy->pipe_clk)) {
 		return dev_err_probe(dev, PTR_ERR(qphy->pipe_clk),
 				     "failed to get lane%d pipe clock\n", id);
-- 
2.35.1


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

* [PATCH 43/43] phy: qcom-qmp-usb: drop pipe clock lane suffix
@ 2022-07-05  9:42   ` Johan Hovold
  0 siblings, 0 replies; 178+ messages in thread
From: Johan Hovold @ 2022-07-05  9:42 UTC (permalink / raw)
  To: Vinod Koul, Rob Herring, Krzysztof Kozlowski
  Cc: Andy Gross, Bjorn Andersson, Kishon Vijay Abraham I,
	linux-arm-msm, linux-phy, devicetree, linux-kernel, Johan Hovold

The pipe clock is defined in the "lane" node so there's no need to keep
adding a redundant lane-number suffix to the clock name.

Drop the lane suffix from the pipe clock name, but continue supporting
the legacy name as a fall back.

Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
---
 drivers/phy/qualcomm/phy-qcom-qmp-usb.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/drivers/phy/qualcomm/phy-qcom-qmp-usb.c b/drivers/phy/qualcomm/phy-qcom-qmp-usb.c
index 994a8232be7b..dfe7294a589f 100644
--- a/drivers/phy/qualcomm/phy-qcom-qmp-usb.c
+++ b/drivers/phy/qualcomm/phy-qcom-qmp-usb.c
@@ -2665,8 +2665,12 @@ int qcom_qmp_phy_usb_create(struct device *dev, struct device_node *np, int id,
 	if (!qphy->pcs_misc)
 		dev_vdbg(dev, "PHY pcs_misc-reg not used\n");
 
-	snprintf(prop_name, sizeof(prop_name), "pipe%d", id);
-	qphy->pipe_clk = devm_get_clk_from_child(dev, np, prop_name);
+	qphy->pipe_clk = devm_get_clk_from_child(dev, np, "pipe");
+	if (IS_ERR(qphy->pipe_clk) && PTR_ERR(qphy->pipe_clk) != -EPROBE_DEFER) {
+		/* Fall back to the legacy pipe clock name. */
+		snprintf(prop_name, sizeof(prop_name), "pipe%d", id);
+		qphy->pipe_clk = devm_get_clk_from_child(dev, np, prop_name);
+	}
 	if (IS_ERR(qphy->pipe_clk)) {
 		return dev_err_probe(dev, PTR_ERR(qphy->pipe_clk),
 				     "failed to get lane%d pipe clock\n", id);
-- 
2.35.1


-- 
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy

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

* Re: [PATCH 01/43] dt-bindings: phy: qcom,qmp: fix bogus clock-cells property
  2022-07-05  9:41   ` Johan Hovold
@ 2022-07-05 10:01     ` Krzysztof Kozlowski
  -1 siblings, 0 replies; 178+ messages in thread
From: Krzysztof Kozlowski @ 2022-07-05 10:01 UTC (permalink / raw)
  To: Johan Hovold, Vinod Koul, Rob Herring, Krzysztof Kozlowski
  Cc: Andy Gross, Bjorn Andersson, Kishon Vijay Abraham I,
	linux-arm-msm, linux-phy, devicetree, linux-kernel

On 05/07/2022 11:41, Johan Hovold wrote:
> The QMP PHY wrapper node is not a clock provider so drop the bogus
> '#clock-cells' property that was added when converting to DT schema.
> 
> Fixes: ccf51c1cedfd ("dt-bindings: phy: qcom,qmp: Convert QMP PHY bindings to yaml")
> Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
> ---
>  Documentation/devicetree/bindings/phy/qcom,qmp-phy.yaml | 5 -----
>  1 file changed, 5 deletions(-)


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


Best regards,
Krzysztof

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

* Re: [PATCH 01/43] dt-bindings: phy: qcom,qmp: fix bogus clock-cells property
@ 2022-07-05 10:01     ` Krzysztof Kozlowski
  0 siblings, 0 replies; 178+ messages in thread
From: Krzysztof Kozlowski @ 2022-07-05 10:01 UTC (permalink / raw)
  To: Johan Hovold, Vinod Koul, Rob Herring, Krzysztof Kozlowski
  Cc: Andy Gross, Bjorn Andersson, Kishon Vijay Abraham I,
	linux-arm-msm, linux-phy, devicetree, linux-kernel

On 05/07/2022 11:41, Johan Hovold wrote:
> The QMP PHY wrapper node is not a clock provider so drop the bogus
> '#clock-cells' property that was added when converting to DT schema.
> 
> Fixes: ccf51c1cedfd ("dt-bindings: phy: qcom,qmp: Convert QMP PHY bindings to yaml")
> Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
> ---
>  Documentation/devicetree/bindings/phy/qcom,qmp-phy.yaml | 5 -----
>  1 file changed, 5 deletions(-)


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


Best regards,
Krzysztof

-- 
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy

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

* Re: [PATCH 02/43] dt-bindings: phy: qcom,qmp: sort compatible strings
  2022-07-05  9:41   ` Johan Hovold
@ 2022-07-05 10:02     ` Krzysztof Kozlowski
  -1 siblings, 0 replies; 178+ messages in thread
From: Krzysztof Kozlowski @ 2022-07-05 10:02 UTC (permalink / raw)
  To: Johan Hovold, Vinod Koul, Rob Herring, Krzysztof Kozlowski
  Cc: Andy Gross, Bjorn Andersson, Kishon Vijay Abraham I,
	linux-arm-msm, linux-phy, devicetree, linux-kernel

On 05/07/2022 11:41, Johan Hovold wrote:
> Sort the compatible strings alphabetically to make it easier to look up
> entries and add new ones.
> 
> Signed-off-by: Johan Hovold <johan+linaro@kernel.org>


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


Best regards,
Krzysztof

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

* Re: [PATCH 02/43] dt-bindings: phy: qcom,qmp: sort compatible strings
@ 2022-07-05 10:02     ` Krzysztof Kozlowski
  0 siblings, 0 replies; 178+ messages in thread
From: Krzysztof Kozlowski @ 2022-07-05 10:02 UTC (permalink / raw)
  To: Johan Hovold, Vinod Koul, Rob Herring, Krzysztof Kozlowski
  Cc: Andy Gross, Bjorn Andersson, Kishon Vijay Abraham I,
	linux-arm-msm, linux-phy, devicetree, linux-kernel

On 05/07/2022 11:41, Johan Hovold wrote:
> Sort the compatible strings alphabetically to make it easier to look up
> entries and add new ones.
> 
> Signed-off-by: Johan Hovold <johan+linaro@kernel.org>


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


Best regards,
Krzysztof

-- 
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy

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

* Re: [PATCH 03/43] dt-bindings: phy: qcom,qmp: clean up descriptions
  2022-07-05  9:41   ` Johan Hovold
@ 2022-07-05 10:02     ` Krzysztof Kozlowski
  -1 siblings, 0 replies; 178+ messages in thread
From: Krzysztof Kozlowski @ 2022-07-05 10:02 UTC (permalink / raw)
  To: Johan Hovold, Vinod Koul, Rob Herring, Krzysztof Kozlowski
  Cc: Andy Gross, Bjorn Andersson, Kishon Vijay Abraham I,
	linux-arm-msm, linux-phy, devicetree, linux-kernel

On 05/07/2022 11:41, Johan Hovold wrote:
> Clean up the descriptions somewhat by using uppercase "PHY" consistently
> and spelling out "clock".
> 

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


Best regards,
Krzysztof

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

* Re: [PATCH 03/43] dt-bindings: phy: qcom,qmp: clean up descriptions
@ 2022-07-05 10:02     ` Krzysztof Kozlowski
  0 siblings, 0 replies; 178+ messages in thread
From: Krzysztof Kozlowski @ 2022-07-05 10:02 UTC (permalink / raw)
  To: Johan Hovold, Vinod Koul, Rob Herring, Krzysztof Kozlowski
  Cc: Andy Gross, Bjorn Andersson, Kishon Vijay Abraham I,
	linux-arm-msm, linux-phy, devicetree, linux-kernel

On 05/07/2022 11:41, Johan Hovold wrote:
> Clean up the descriptions somewhat by using uppercase "PHY" consistently
> and spelling out "clock".
> 

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


Best regards,
Krzysztof

-- 
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy

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

* Re: [PATCH 04/43] dt-bindings: phy: qcom,qmp: clean up example
  2022-07-05  9:42   ` Johan Hovold
@ 2022-07-05 10:03     ` Krzysztof Kozlowski
  -1 siblings, 0 replies; 178+ messages in thread
From: Krzysztof Kozlowski @ 2022-07-05 10:03 UTC (permalink / raw)
  To: Johan Hovold, Vinod Koul, Rob Herring, Krzysztof Kozlowski
  Cc: Andy Gross, Bjorn Andersson, Kishon Vijay Abraham I,
	linux-arm-msm, linux-phy, devicetree, linux-kernel

On 05/07/2022 11:42, Johan Hovold wrote:
> Clean up the example node somewhat by grouping consumer and provider
> properties in the child node.
> 
> Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
> ---


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


Best regards,
Krzysztof

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

* Re: [PATCH 04/43] dt-bindings: phy: qcom,qmp: clean up example
@ 2022-07-05 10:03     ` Krzysztof Kozlowski
  0 siblings, 0 replies; 178+ messages in thread
From: Krzysztof Kozlowski @ 2022-07-05 10:03 UTC (permalink / raw)
  To: Johan Hovold, Vinod Koul, Rob Herring, Krzysztof Kozlowski
  Cc: Andy Gross, Bjorn Andersson, Kishon Vijay Abraham I,
	linux-arm-msm, linux-phy, devicetree, linux-kernel

On 05/07/2022 11:42, Johan Hovold wrote:
> Clean up the example node somewhat by grouping consumer and provider
> properties in the child node.
> 
> Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
> ---


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


Best regards,
Krzysztof

-- 
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy

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

* Re: [PATCH 05/43] dt-bindings: phy: qcom,qmp: drop child-node comment
  2022-07-05  9:42   ` Johan Hovold
@ 2022-07-05 10:03     ` Krzysztof Kozlowski
  -1 siblings, 0 replies; 178+ messages in thread
From: Krzysztof Kozlowski @ 2022-07-05 10:03 UTC (permalink / raw)
  To: Johan Hovold, Vinod Koul, Rob Herring, Krzysztof Kozlowski
  Cc: Andy Gross, Bjorn Andersson, Kishon Vijay Abraham I,
	linux-arm-msm, linux-phy, devicetree, linux-kernel

On 05/07/2022 11:42, Johan Hovold wrote:
> Drop the redundant comment about child nodes being required that was
> copied from the old binding documentation.
> 
> Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
> ---

Could be squashed with #8, but it's also fine.

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

Best regards,
Krzysztof

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

* Re: [PATCH 05/43] dt-bindings: phy: qcom,qmp: drop child-node comment
@ 2022-07-05 10:03     ` Krzysztof Kozlowski
  0 siblings, 0 replies; 178+ messages in thread
From: Krzysztof Kozlowski @ 2022-07-05 10:03 UTC (permalink / raw)
  To: Johan Hovold, Vinod Koul, Rob Herring, Krzysztof Kozlowski
  Cc: Andy Gross, Bjorn Andersson, Kishon Vijay Abraham I,
	linux-arm-msm, linux-phy, devicetree, linux-kernel

On 05/07/2022 11:42, Johan Hovold wrote:
> Drop the redundant comment about child nodes being required that was
> copied from the old binding documentation.
> 
> Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
> ---

Could be squashed with #8, but it's also fine.

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

Best regards,
Krzysztof

-- 
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy

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

* Re: [PATCH 06/43] dt-bindings: phy: qcom,qmp: split out msm8996-qmp-pcie-phy
  2022-07-05  9:42   ` Johan Hovold
@ 2022-07-05 10:08     ` Krzysztof Kozlowski
  -1 siblings, 0 replies; 178+ messages in thread
From: Krzysztof Kozlowski @ 2022-07-05 10:08 UTC (permalink / raw)
  To: Johan Hovold, Vinod Koul, Rob Herring, Krzysztof Kozlowski
  Cc: Andy Gross, Bjorn Andersson, Kishon Vijay Abraham I,
	linux-arm-msm, linux-phy, devicetree, linux-kernel

On 05/07/2022 11:42, Johan Hovold wrote:
> The QMP PHY DT schema is getting unwieldy. Break out the odd-bird
> msm8996-qmp-pcie-phy which is the only QMP PHY that uses separate
> "per-lane" nodes.
> 
> Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
> ---
>  .../phy/qcom,msm8996-qmp-pcie-phy.yaml        | 114 ++++++++++++++++++
>  .../devicetree/bindings/phy/qcom,qmp-phy.yaml |  32 -----
>  2 files changed, 114 insertions(+), 32 deletions(-)
>  create mode 100644 Documentation/devicetree/bindings/phy/qcom,msm8996-qmp-pcie-phy.yaml
> 
> diff --git a/Documentation/devicetree/bindings/phy/qcom,msm8996-qmp-pcie-phy.yaml b/Documentation/devicetree/bindings/phy/qcom,msm8996-qmp-pcie-phy.yaml
> new file mode 100644
> index 000000000000..14fd86fd91ec
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/phy/qcom,msm8996-qmp-pcie-phy.yaml
> @@ -0,0 +1,114 @@
> +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
> +

No line break

> +%YAML 1.2
> +---
> +$id: "http://devicetree.org/schemas/phy/qcom,msm8996-qmp-pcie-phy.yaml#"
> +$schema: "http://devicetree.org/meta-schemas/core.yaml#"

Drop the quotes from two above.

> +
> +title: Qualcomm QMP PHY controller (MSM8996 PCIe)
> +
> +maintainers:
> +  - Vinod Koul <vkoul@kernel.org>
> +
> +description:
> +  QMP PHY controller supports physical layer functionality for a number of
> +  controllers on Qualcomm chipsets, such as, PCIe, UFS, and USB.
> +
> +properties:
> +  compatible:
> +    const: qcom,msm8996-qmp-pcie-phy
> +
> +  reg:
> +    minItems: 1
> +    items:
> +      - description: Address and length of PHY's common serdes block.
> +      - description: Address and length of PHY's DP_COM control block.

Are two reg items applicable here?

> +
> +  "#address-cells":
> +    enum: [ 1, 2 ]
> +
> +  "#size-cells":
> +    enum: [ 1, 2 ]
> +
> +  ranges: true
> +
> +  clocks:
> +    minItems: 1
> +    maxItems: 4

Define clocks here, not in allOf:if:then.

> +
> +  clock-names:
> +    minItems: 1
> +    maxItems: 4

Ditto

> +
> +  resets:
> +    minItems: 1
> +    maxItems: 3

Ditto

> +
> +  reset-names:
> +    minItems: 1
> +    maxItems: 3

Ditto

> +
> +  vdda-phy-supply:
> +    description:
> +      Phandle to a regulator supply to PHY core block.
> +
> +  vdda-pll-supply:
> +    description:
> +      Phandle to 1.8V regulator supply to PHY refclk pll block.
> +
> +  vddp-ref-clk-supply:
> +    description:
> +      Phandle to a regulator supply to any specific refclk pll block.
> +
> +patternProperties:
> +  "^phy@[0-9a-f]+$":
> +    type: object
> +    description:
> +      Each device node of QMP PHY is required to have as many child nodes as
> +      the number of lanes the PHY has.
> +
> +required:
> +  - compatible
> +  - reg
> +  - "#address-cells"
> +  - "#size-cells"
> +  - ranges
> +  - clocks
> +  - clock-names
> +  - resets
> +  - reset-names
> +
> +additionalProperties: false
> +
> +allOf:
> +  - if:
> +      properties:
> +        compatible:
> +          contains:
> +            enum:
> +              - qcom,msm8996-qmp-pcie-phy
> +    then:
> +      properties:
> +        clocks:
> +          items:
> +            - description: PHY aux clock.
> +            - description: PHY config clock.
> +            - description: 19.2 MHz ref clock.
> +        clock-names:
> +          items:
> +            - const: aux
> +            - const: cfg_ahb
> +            - const: ref
> +        resets:
> +          items:
> +            - description: Reset of PHY block.
> +            - description: PHY common block reset.
> +            - description: PHY's ahb cfg block reset.
> +        reset-names:
> +          items:
> +            - const: phy
> +            - const: common
> +            - const: cfg
> +      required:
> +        - vdda-phy-supply
> +        - vdda-pll-supply

How about an example?


Best regards,
Krzysztof

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

* Re: [PATCH 06/43] dt-bindings: phy: qcom,qmp: split out msm8996-qmp-pcie-phy
@ 2022-07-05 10:08     ` Krzysztof Kozlowski
  0 siblings, 0 replies; 178+ messages in thread
From: Krzysztof Kozlowski @ 2022-07-05 10:08 UTC (permalink / raw)
  To: Johan Hovold, Vinod Koul, Rob Herring, Krzysztof Kozlowski
  Cc: Andy Gross, Bjorn Andersson, Kishon Vijay Abraham I,
	linux-arm-msm, linux-phy, devicetree, linux-kernel

On 05/07/2022 11:42, Johan Hovold wrote:
> The QMP PHY DT schema is getting unwieldy. Break out the odd-bird
> msm8996-qmp-pcie-phy which is the only QMP PHY that uses separate
> "per-lane" nodes.
> 
> Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
> ---
>  .../phy/qcom,msm8996-qmp-pcie-phy.yaml        | 114 ++++++++++++++++++
>  .../devicetree/bindings/phy/qcom,qmp-phy.yaml |  32 -----
>  2 files changed, 114 insertions(+), 32 deletions(-)
>  create mode 100644 Documentation/devicetree/bindings/phy/qcom,msm8996-qmp-pcie-phy.yaml
> 
> diff --git a/Documentation/devicetree/bindings/phy/qcom,msm8996-qmp-pcie-phy.yaml b/Documentation/devicetree/bindings/phy/qcom,msm8996-qmp-pcie-phy.yaml
> new file mode 100644
> index 000000000000..14fd86fd91ec
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/phy/qcom,msm8996-qmp-pcie-phy.yaml
> @@ -0,0 +1,114 @@
> +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
> +

No line break

> +%YAML 1.2
> +---
> +$id: "http://devicetree.org/schemas/phy/qcom,msm8996-qmp-pcie-phy.yaml#"
> +$schema: "http://devicetree.org/meta-schemas/core.yaml#"

Drop the quotes from two above.

> +
> +title: Qualcomm QMP PHY controller (MSM8996 PCIe)
> +
> +maintainers:
> +  - Vinod Koul <vkoul@kernel.org>
> +
> +description:
> +  QMP PHY controller supports physical layer functionality for a number of
> +  controllers on Qualcomm chipsets, such as, PCIe, UFS, and USB.
> +
> +properties:
> +  compatible:
> +    const: qcom,msm8996-qmp-pcie-phy
> +
> +  reg:
> +    minItems: 1
> +    items:
> +      - description: Address and length of PHY's common serdes block.
> +      - description: Address and length of PHY's DP_COM control block.

Are two reg items applicable here?

> +
> +  "#address-cells":
> +    enum: [ 1, 2 ]
> +
> +  "#size-cells":
> +    enum: [ 1, 2 ]
> +
> +  ranges: true
> +
> +  clocks:
> +    minItems: 1
> +    maxItems: 4

Define clocks here, not in allOf:if:then.

> +
> +  clock-names:
> +    minItems: 1
> +    maxItems: 4

Ditto

> +
> +  resets:
> +    minItems: 1
> +    maxItems: 3

Ditto

> +
> +  reset-names:
> +    minItems: 1
> +    maxItems: 3

Ditto

> +
> +  vdda-phy-supply:
> +    description:
> +      Phandle to a regulator supply to PHY core block.
> +
> +  vdda-pll-supply:
> +    description:
> +      Phandle to 1.8V regulator supply to PHY refclk pll block.
> +
> +  vddp-ref-clk-supply:
> +    description:
> +      Phandle to a regulator supply to any specific refclk pll block.
> +
> +patternProperties:
> +  "^phy@[0-9a-f]+$":
> +    type: object
> +    description:
> +      Each device node of QMP PHY is required to have as many child nodes as
> +      the number of lanes the PHY has.
> +
> +required:
> +  - compatible
> +  - reg
> +  - "#address-cells"
> +  - "#size-cells"
> +  - ranges
> +  - clocks
> +  - clock-names
> +  - resets
> +  - reset-names
> +
> +additionalProperties: false
> +
> +allOf:
> +  - if:
> +      properties:
> +        compatible:
> +          contains:
> +            enum:
> +              - qcom,msm8996-qmp-pcie-phy
> +    then:
> +      properties:
> +        clocks:
> +          items:
> +            - description: PHY aux clock.
> +            - description: PHY config clock.
> +            - description: 19.2 MHz ref clock.
> +        clock-names:
> +          items:
> +            - const: aux
> +            - const: cfg_ahb
> +            - const: ref
> +        resets:
> +          items:
> +            - description: Reset of PHY block.
> +            - description: PHY common block reset.
> +            - description: PHY's ahb cfg block reset.
> +        reset-names:
> +          items:
> +            - const: phy
> +            - const: common
> +            - const: cfg
> +      required:
> +        - vdda-phy-supply
> +        - vdda-pll-supply

How about an example?


Best regards,
Krzysztof

-- 
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy

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

* Re: [PATCH 07/43] dt-bindings: phy: qcom,msm8996-qmp-pcie: clean up constraints
  2022-07-05  9:42   ` Johan Hovold
@ 2022-07-05 10:09     ` Krzysztof Kozlowski
  -1 siblings, 0 replies; 178+ messages in thread
From: Krzysztof Kozlowski @ 2022-07-05 10:09 UTC (permalink / raw)
  To: Johan Hovold, Vinod Koul, Rob Herring, Krzysztof Kozlowski
  Cc: Andy Gross, Bjorn Andersson, Kishon Vijay Abraham I,
	linux-arm-msm, linux-phy, devicetree, linux-kernel

On 05/07/2022 11:42, Johan Hovold wrote:
> Drop the compatible conditional and tighten the property constraints.
> 
> Signed-off-by: Johan Hovold <johan+linaro@kernel.org>

Squash it with previous patch. Does not make sense to add new file and a
patch later change it.

Best regards,
Krzysztof

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

* Re: [PATCH 07/43] dt-bindings: phy: qcom,msm8996-qmp-pcie: clean up constraints
@ 2022-07-05 10:09     ` Krzysztof Kozlowski
  0 siblings, 0 replies; 178+ messages in thread
From: Krzysztof Kozlowski @ 2022-07-05 10:09 UTC (permalink / raw)
  To: Johan Hovold, Vinod Koul, Rob Herring, Krzysztof Kozlowski
  Cc: Andy Gross, Bjorn Andersson, Kishon Vijay Abraham I,
	linux-arm-msm, linux-phy, devicetree, linux-kernel

On 05/07/2022 11:42, Johan Hovold wrote:
> Drop the compatible conditional and tighten the property constraints.
> 
> Signed-off-by: Johan Hovold <johan+linaro@kernel.org>

Squash it with previous patch. Does not make sense to add new file and a
patch later change it.

Best regards,
Krzysztof

-- 
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy

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

* Re: [PATCH 08/43] dt-bindings: phy: qcom,msm8996-qmp-pcie: add missing child node schema
  2022-07-05  9:42   ` Johan Hovold
@ 2022-07-05 10:10     ` Krzysztof Kozlowski
  -1 siblings, 0 replies; 178+ messages in thread
From: Krzysztof Kozlowski @ 2022-07-05 10:10 UTC (permalink / raw)
  To: Johan Hovold, Vinod Koul, Rob Herring, Krzysztof Kozlowski
  Cc: Andy Gross, Bjorn Andersson, Kishon Vijay Abraham I,
	linux-arm-msm, linux-phy, devicetree, linux-kernel

On 05/07/2022 11:42, Johan Hovold wrote:
> Add the missing the description of the PHY-provider child nodes which
> were ignored when converting to DT schema.
> 
> Also fix up the description that claimed that one child node per lane
> (rather than PHY) was required.
> 
> Fixes: ccf51c1cedfd ("dt-bindings: phy: qcom,qmp: Convert QMP PHY bindings to yaml")
> Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
> ---


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


Best regards,
Krzysztof

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

* Re: [PATCH 08/43] dt-bindings: phy: qcom,msm8996-qmp-pcie: add missing child node schema
@ 2022-07-05 10:10     ` Krzysztof Kozlowski
  0 siblings, 0 replies; 178+ messages in thread
From: Krzysztof Kozlowski @ 2022-07-05 10:10 UTC (permalink / raw)
  To: Johan Hovold, Vinod Koul, Rob Herring, Krzysztof Kozlowski
  Cc: Andy Gross, Bjorn Andersson, Kishon Vijay Abraham I,
	linux-arm-msm, linux-phy, devicetree, linux-kernel

On 05/07/2022 11:42, Johan Hovold wrote:
> Add the missing the description of the PHY-provider child nodes which
> were ignored when converting to DT schema.
> 
> Also fix up the description that claimed that one child node per lane
> (rather than PHY) was required.
> 
> Fixes: ccf51c1cedfd ("dt-bindings: phy: qcom,qmp: Convert QMP PHY bindings to yaml")
> Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
> ---


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


Best regards,
Krzysztof

-- 
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy

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

* Re: [PATCH 09/43] dt-bindings: phy: qcom,msm8996-qmp-pcie: add example node
  2022-07-05  9:42   ` Johan Hovold
@ 2022-07-05 10:10     ` Krzysztof Kozlowski
  -1 siblings, 0 replies; 178+ messages in thread
From: Krzysztof Kozlowski @ 2022-07-05 10:10 UTC (permalink / raw)
  To: Johan Hovold, Vinod Koul, Rob Herring, Krzysztof Kozlowski
  Cc: Andy Gross, Bjorn Andersson, Kishon Vijay Abraham I,
	linux-arm-msm, linux-phy, devicetree, linux-kernel

On 05/07/2022 11:42, Johan Hovold wrote:
> Add an example node based on a cleaned up version of msm8996.dtsi.
> 
> Signed-off-by: Johan Hovold <johan+linaro@kernel.org>

Squash it, please.

Best regards,
Krzysztof

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

* Re: [PATCH 09/43] dt-bindings: phy: qcom,msm8996-qmp-pcie: add example node
@ 2022-07-05 10:10     ` Krzysztof Kozlowski
  0 siblings, 0 replies; 178+ messages in thread
From: Krzysztof Kozlowski @ 2022-07-05 10:10 UTC (permalink / raw)
  To: Johan Hovold, Vinod Koul, Rob Herring, Krzysztof Kozlowski
  Cc: Andy Gross, Bjorn Andersson, Kishon Vijay Abraham I,
	linux-arm-msm, linux-phy, devicetree, linux-kernel

On 05/07/2022 11:42, Johan Hovold wrote:
> Add an example node based on a cleaned up version of msm8996.dtsi.
> 
> Signed-off-by: Johan Hovold <johan+linaro@kernel.org>

Squash it, please.

Best regards,
Krzysztof

-- 
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy

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

* Re: [PATCH 10/43] dt-bindings: phy: qcom,msm8996-qmp-pcie: deprecate PIPE clock names
  2022-07-05  9:42   ` Johan Hovold
@ 2022-07-05 10:10     ` Krzysztof Kozlowski
  -1 siblings, 0 replies; 178+ messages in thread
From: Krzysztof Kozlowski @ 2022-07-05 10:10 UTC (permalink / raw)
  To: Johan Hovold, Vinod Koul, Rob Herring, Krzysztof Kozlowski
  Cc: Andy Gross, Bjorn Andersson, Kishon Vijay Abraham I,
	linux-arm-msm, linux-phy, devicetree, linux-kernel

On 05/07/2022 11:42, Johan Hovold wrote:
> Drop the unnecessary "lane" suffix from the PHY PIPE clock names and
> mark the old names as deprecated.
> 
> Signed-off-by: Johan Hovold <johan+linaro@kernel.org>


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


Best regards,
Krzysztof

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

* Re: [PATCH 10/43] dt-bindings: phy: qcom,msm8996-qmp-pcie: deprecate PIPE clock names
@ 2022-07-05 10:10     ` Krzysztof Kozlowski
  0 siblings, 0 replies; 178+ messages in thread
From: Krzysztof Kozlowski @ 2022-07-05 10:10 UTC (permalink / raw)
  To: Johan Hovold, Vinod Koul, Rob Herring, Krzysztof Kozlowski
  Cc: Andy Gross, Bjorn Andersson, Kishon Vijay Abraham I,
	linux-arm-msm, linux-phy, devicetree, linux-kernel

On 05/07/2022 11:42, Johan Hovold wrote:
> Drop the unnecessary "lane" suffix from the PHY PIPE clock names and
> mark the old names as deprecated.
> 
> Signed-off-by: Johan Hovold <johan+linaro@kernel.org>


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


Best regards,
Krzysztof

-- 
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy

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

* Re: [PATCH 11/43] dt-bindings: phy: qcom,msm8996-qmp-pcie: deprecate reset names
  2022-07-05  9:42   ` Johan Hovold
@ 2022-07-05 10:12     ` Krzysztof Kozlowski
  -1 siblings, 0 replies; 178+ messages in thread
From: Krzysztof Kozlowski @ 2022-07-05 10:12 UTC (permalink / raw)
  To: Johan Hovold, Vinod Koul, Rob Herring, Krzysztof Kozlowski
  Cc: Andy Gross, Bjorn Andersson, Kishon Vijay Abraham I,
	linux-arm-msm, linux-phy, devicetree, linux-kernel

On 05/07/2022 11:42, Johan Hovold wrote:
> Drop the unnecessary "lane" suffix from the PHY reset names and mark the
> old names as deprecated.
> 
> Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
> ---
>  .../phy/qcom,msm8996-qmp-pcie-phy.yaml        | 20 +++++++++++--------
>  1 file changed, 12 insertions(+), 8 deletions(-)
> 
> diff --git a/Documentation/devicetree/bindings/phy/qcom,msm8996-qmp-pcie-phy.yaml b/Documentation/devicetree/bindings/phy/qcom,msm8996-qmp-pcie-phy.yaml
> index 7931b1fd1476..0bea8270b37e 100644
> --- a/Documentation/devicetree/bindings/phy/qcom,msm8996-qmp-pcie-phy.yaml
> +++ b/Documentation/devicetree/bindings/phy/qcom,msm8996-qmp-pcie-phy.yaml
> @@ -94,11 +94,15 @@ patternProperties:
>            - description: PHY (lane) reset
>  
>        reset-names:
> -        items:
> -          - enum:
> -              - lane0
> -              - lane1
> -              - lane2
> +        oneOf:
> +          - items:
> +              - const: lane
> +          - items:
> +              - enum:
> +                  - lane0
> +                  - lane1
> +                  - lane2
> +            deprecated: true
>  

How about just dropping reset-names entirely? Marking entire field
deprecated and removing from DTS? The same in the previous patch.

Usually one-item xxx-names do not bring any useful information.

Best regards,
Krzysztof

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

* Re: [PATCH 11/43] dt-bindings: phy: qcom,msm8996-qmp-pcie: deprecate reset names
@ 2022-07-05 10:12     ` Krzysztof Kozlowski
  0 siblings, 0 replies; 178+ messages in thread
From: Krzysztof Kozlowski @ 2022-07-05 10:12 UTC (permalink / raw)
  To: Johan Hovold, Vinod Koul, Rob Herring, Krzysztof Kozlowski
  Cc: Andy Gross, Bjorn Andersson, Kishon Vijay Abraham I,
	linux-arm-msm, linux-phy, devicetree, linux-kernel

On 05/07/2022 11:42, Johan Hovold wrote:
> Drop the unnecessary "lane" suffix from the PHY reset names and mark the
> old names as deprecated.
> 
> Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
> ---
>  .../phy/qcom,msm8996-qmp-pcie-phy.yaml        | 20 +++++++++++--------
>  1 file changed, 12 insertions(+), 8 deletions(-)
> 
> diff --git a/Documentation/devicetree/bindings/phy/qcom,msm8996-qmp-pcie-phy.yaml b/Documentation/devicetree/bindings/phy/qcom,msm8996-qmp-pcie-phy.yaml
> index 7931b1fd1476..0bea8270b37e 100644
> --- a/Documentation/devicetree/bindings/phy/qcom,msm8996-qmp-pcie-phy.yaml
> +++ b/Documentation/devicetree/bindings/phy/qcom,msm8996-qmp-pcie-phy.yaml
> @@ -94,11 +94,15 @@ patternProperties:
>            - description: PHY (lane) reset
>  
>        reset-names:
> -        items:
> -          - enum:
> -              - lane0
> -              - lane1
> -              - lane2
> +        oneOf:
> +          - items:
> +              - const: lane
> +          - items:
> +              - enum:
> +                  - lane0
> +                  - lane1
> +                  - lane2
> +            deprecated: true
>  

How about just dropping reset-names entirely? Marking entire field
deprecated and removing from DTS? The same in the previous patch.

Usually one-item xxx-names do not bring any useful information.

Best regards,
Krzysztof

-- 
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy

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

* Re: [PATCH 12/43] dt-bindings: phy: qcom,qmp: split out PCIe PHY binding
  2022-07-05  9:42   ` Johan Hovold
@ 2022-07-05 10:13     ` Krzysztof Kozlowski
  -1 siblings, 0 replies; 178+ messages in thread
From: Krzysztof Kozlowski @ 2022-07-05 10:13 UTC (permalink / raw)
  To: Johan Hovold, Vinod Koul, Rob Herring, Krzysztof Kozlowski
  Cc: Andy Gross, Bjorn Andersson, Kishon Vijay Abraham I,
	linux-arm-msm, linux-phy, devicetree, linux-kernel

On 05/07/2022 11:42, Johan Hovold wrote:
> The QMP PHY DT schema is getting unwieldy. Break out the PCIe PHY
> binding in a separate file.
> 
> Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
> ---
>  .../bindings/phy/qcom,qmp-pcie-phy.yaml       | 188 ++++++++++++++++++
>  .../devicetree/bindings/phy/qcom,qmp-phy.yaml |  75 -------
>  2 files changed, 188 insertions(+), 75 deletions(-)
>  create mode 100644 Documentation/devicetree/bindings/phy/qcom,qmp-pcie-phy.yaml
> 
> diff --git a/Documentation/devicetree/bindings/phy/qcom,qmp-pcie-phy.yaml b/Documentation/devicetree/bindings/phy/qcom,qmp-pcie-phy.yaml
> new file mode 100644
> index 000000000000..d1d4a468acc3
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/phy/qcom,qmp-pcie-phy.yaml
> @@ -0,0 +1,188 @@
> +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
> +

No new line.

> +%YAML 1.2
> +---
> +$id: "http://devicetree.org/schemas/phy/qcom,qmp-pcie-phy.yaml#"
> +$schema: "http://devicetree.org/meta-schemas/core.yaml#"

Drop quotes.

> +
> +title: Qualcomm QMP PHY controller (PCIe)
> +
> +maintainers:
> +  - Vinod Koul <vkoul@kernel.org>
> +
> +description:
> +  QMP PHY controller supports physical layer functionality for a number of
> +  controllers on Qualcomm chipsets, such as, PCIe, UFS, and USB.
> +
> +properties:
> +  compatible:
> +    enum:
> +      - qcom,ipq6018-qmp-pcie-phy
> +      - qcom,ipq8074-qmp-pcie-phy
> +      - qcom,msm8998-qmp-pcie-phy
> +      - qcom,sc8180x-qmp-pcie-phy
> +      - qcom,sdm845-qhp-pcie-phy
> +      - qcom,sdm845-qmp-pcie-phy
> +      - qcom,sdx55-qmp-pcie-phy
> +      - qcom,sm8250-qmp-gen3x1-pcie-phy
> +      - qcom,sm8250-qmp-gen3x2-pcie-phy
> +      - qcom,sm8250-qmp-modem-pcie-phy
> +      - qcom,sm8450-qmp-gen3x1-pcie-phy
> +      - qcom,sm8450-qmp-gen4x2-pcie-phy
> +
> +  reg:
> +    minItems: 1
> +    items:
> +      - description: Address and length of PHY's common serdes block.
> +      - description: Address and length of PHY's DP_COM control block.

All my msm8996-qmp-pcie comments apply.


Best regards,
Krzysztof

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

* Re: [PATCH 12/43] dt-bindings: phy: qcom,qmp: split out PCIe PHY binding
@ 2022-07-05 10:13     ` Krzysztof Kozlowski
  0 siblings, 0 replies; 178+ messages in thread
From: Krzysztof Kozlowski @ 2022-07-05 10:13 UTC (permalink / raw)
  To: Johan Hovold, Vinod Koul, Rob Herring, Krzysztof Kozlowski
  Cc: Andy Gross, Bjorn Andersson, Kishon Vijay Abraham I,
	linux-arm-msm, linux-phy, devicetree, linux-kernel

On 05/07/2022 11:42, Johan Hovold wrote:
> The QMP PHY DT schema is getting unwieldy. Break out the PCIe PHY
> binding in a separate file.
> 
> Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
> ---
>  .../bindings/phy/qcom,qmp-pcie-phy.yaml       | 188 ++++++++++++++++++
>  .../devicetree/bindings/phy/qcom,qmp-phy.yaml |  75 -------
>  2 files changed, 188 insertions(+), 75 deletions(-)
>  create mode 100644 Documentation/devicetree/bindings/phy/qcom,qmp-pcie-phy.yaml
> 
> diff --git a/Documentation/devicetree/bindings/phy/qcom,qmp-pcie-phy.yaml b/Documentation/devicetree/bindings/phy/qcom,qmp-pcie-phy.yaml
> new file mode 100644
> index 000000000000..d1d4a468acc3
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/phy/qcom,qmp-pcie-phy.yaml
> @@ -0,0 +1,188 @@
> +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
> +

No new line.

> +%YAML 1.2
> +---
> +$id: "http://devicetree.org/schemas/phy/qcom,qmp-pcie-phy.yaml#"
> +$schema: "http://devicetree.org/meta-schemas/core.yaml#"

Drop quotes.

> +
> +title: Qualcomm QMP PHY controller (PCIe)
> +
> +maintainers:
> +  - Vinod Koul <vkoul@kernel.org>
> +
> +description:
> +  QMP PHY controller supports physical layer functionality for a number of
> +  controllers on Qualcomm chipsets, such as, PCIe, UFS, and USB.
> +
> +properties:
> +  compatible:
> +    enum:
> +      - qcom,ipq6018-qmp-pcie-phy
> +      - qcom,ipq8074-qmp-pcie-phy
> +      - qcom,msm8998-qmp-pcie-phy
> +      - qcom,sc8180x-qmp-pcie-phy
> +      - qcom,sdm845-qhp-pcie-phy
> +      - qcom,sdm845-qmp-pcie-phy
> +      - qcom,sdx55-qmp-pcie-phy
> +      - qcom,sm8250-qmp-gen3x1-pcie-phy
> +      - qcom,sm8250-qmp-gen3x2-pcie-phy
> +      - qcom,sm8250-qmp-modem-pcie-phy
> +      - qcom,sm8450-qmp-gen3x1-pcie-phy
> +      - qcom,sm8450-qmp-gen4x2-pcie-phy
> +
> +  reg:
> +    minItems: 1
> +    items:
> +      - description: Address and length of PHY's common serdes block.
> +      - description: Address and length of PHY's DP_COM control block.

All my msm8996-qmp-pcie comments apply.


Best regards,
Krzysztof

-- 
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy

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

* Re: [PATCH 13/43] dt-bindings: phy: qcom,qmp-pcie: clean up register constraints
  2022-07-05  9:42   ` Johan Hovold
@ 2022-07-05 10:13     ` Krzysztof Kozlowski
  -1 siblings, 0 replies; 178+ messages in thread
From: Krzysztof Kozlowski @ 2022-07-05 10:13 UTC (permalink / raw)
  To: Johan Hovold, Vinod Koul, Rob Herring, Krzysztof Kozlowski
  Cc: Andy Gross, Bjorn Andersson, Kishon Vijay Abraham I,
	linux-arm-msm, linux-phy, devicetree, linux-kernel

On 05/07/2022 11:42, Johan Hovold wrote:
> Only some USB and combo PHYs have a second dp_com control block.
> 
> Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
> ---
>  Documentation/devicetree/bindings/phy/qcom,qmp-pcie-phy.yaml | 2 --
>  1 file changed, 2 deletions(-)

Squash it. This patch does not make any sense on its own.

Best regards,
Krzysztof

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

* Re: [PATCH 13/43] dt-bindings: phy: qcom,qmp-pcie: clean up register constraints
@ 2022-07-05 10:13     ` Krzysztof Kozlowski
  0 siblings, 0 replies; 178+ messages in thread
From: Krzysztof Kozlowski @ 2022-07-05 10:13 UTC (permalink / raw)
  To: Johan Hovold, Vinod Koul, Rob Herring, Krzysztof Kozlowski
  Cc: Andy Gross, Bjorn Andersson, Kishon Vijay Abraham I,
	linux-arm-msm, linux-phy, devicetree, linux-kernel

On 05/07/2022 11:42, Johan Hovold wrote:
> Only some USB and combo PHYs have a second dp_com control block.
> 
> Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
> ---
>  Documentation/devicetree/bindings/phy/qcom,qmp-pcie-phy.yaml | 2 --
>  1 file changed, 2 deletions(-)

Squash it. This patch does not make any sense on its own.

Best regards,
Krzysztof

-- 
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy

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

* Re: [PATCH 14/43] dt-bindings: phy: qcom,qmp-pcie: clean up clock constraints
  2022-07-05  9:42   ` Johan Hovold
@ 2022-07-05 10:14     ` Krzysztof Kozlowski
  -1 siblings, 0 replies; 178+ messages in thread
From: Krzysztof Kozlowski @ 2022-07-05 10:14 UTC (permalink / raw)
  To: Johan Hovold, Vinod Koul, Rob Herring, Krzysztof Kozlowski
  Cc: Andy Gross, Bjorn Andersson, Kishon Vijay Abraham I,
	linux-arm-msm, linux-phy, devicetree, linux-kernel

On 05/07/2022 11:42, Johan Hovold wrote:
> The PCIe PHY binding requires two, three or four clocks.
> 
> Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
> ---
>  Documentation/devicetree/bindings/phy/qcom,qmp-pcie-phy.yaml | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 

Squash it.

Best regards,
Krzysztof

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

* Re: [PATCH 14/43] dt-bindings: phy: qcom,qmp-pcie: clean up clock constraints
@ 2022-07-05 10:14     ` Krzysztof Kozlowski
  0 siblings, 0 replies; 178+ messages in thread
From: Krzysztof Kozlowski @ 2022-07-05 10:14 UTC (permalink / raw)
  To: Johan Hovold, Vinod Koul, Rob Herring, Krzysztof Kozlowski
  Cc: Andy Gross, Bjorn Andersson, Kishon Vijay Abraham I,
	linux-arm-msm, linux-phy, devicetree, linux-kernel

On 05/07/2022 11:42, Johan Hovold wrote:
> The PCIe PHY binding requires two, three or four clocks.
> 
> Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
> ---
>  Documentation/devicetree/bindings/phy/qcom,qmp-pcie-phy.yaml | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 

Squash it.

Best regards,
Krzysztof

-- 
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy

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

* Re: [PATCH 15/43] dt-bindings: phy: qcom,qmp-pcie: clean up reset constraints
  2022-07-05  9:42   ` Johan Hovold
@ 2022-07-05 10:14     ` Krzysztof Kozlowski
  -1 siblings, 0 replies; 178+ messages in thread
From: Krzysztof Kozlowski @ 2022-07-05 10:14 UTC (permalink / raw)
  To: Johan Hovold, Vinod Koul, Rob Herring, Krzysztof Kozlowski
  Cc: Andy Gross, Bjorn Andersson, Kishon Vijay Abraham I,
	linux-arm-msm, linux-phy, devicetree, linux-kernel

On 05/07/2022 11:42, Johan Hovold wrote:
> The PCIe PHY binding requires one or two resets.
> 
> Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
> ---
>  Documentation/devicetree/bindings/phy/qcom,qmp-pcie-phy.yaml | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/Documentation/devicetree/bindings/phy/qcom,qmp-pcie-phy.yaml b/Documentation/devicetree/bindings/phy/qcom,qmp-pcie-phy.yaml
> index 0486b2b48d72..557cccc8f4dd 100644
> --- a/Documentation/devicetree/bindings/phy/qcom,qmp-pcie-phy.yaml
> +++ b/Documentation/devicetree/bindings/phy/qcom,qmp-pcie-phy.yaml
> @@ -52,11 +52,11 @@ properties:
>  
>    resets:
>      minItems: 1
> -    maxItems: 3
> +    maxItems: 2

Squash it.

Best regards,
Krzysztof

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

* Re: [PATCH 15/43] dt-bindings: phy: qcom,qmp-pcie: clean up reset constraints
@ 2022-07-05 10:14     ` Krzysztof Kozlowski
  0 siblings, 0 replies; 178+ messages in thread
From: Krzysztof Kozlowski @ 2022-07-05 10:14 UTC (permalink / raw)
  To: Johan Hovold, Vinod Koul, Rob Herring, Krzysztof Kozlowski
  Cc: Andy Gross, Bjorn Andersson, Kishon Vijay Abraham I,
	linux-arm-msm, linux-phy, devicetree, linux-kernel

On 05/07/2022 11:42, Johan Hovold wrote:
> The PCIe PHY binding requires one or two resets.
> 
> Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
> ---
>  Documentation/devicetree/bindings/phy/qcom,qmp-pcie-phy.yaml | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/Documentation/devicetree/bindings/phy/qcom,qmp-pcie-phy.yaml b/Documentation/devicetree/bindings/phy/qcom,qmp-pcie-phy.yaml
> index 0486b2b48d72..557cccc8f4dd 100644
> --- a/Documentation/devicetree/bindings/phy/qcom,qmp-pcie-phy.yaml
> +++ b/Documentation/devicetree/bindings/phy/qcom,qmp-pcie-phy.yaml
> @@ -52,11 +52,11 @@ properties:
>  
>    resets:
>      minItems: 1
> -    maxItems: 3
> +    maxItems: 2

Squash it.

Best regards,
Krzysztof

-- 
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy

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

* Re: [PATCH 16/43] dt-bindings: phy: qcom,qmp-pcie: drop unused vddp-ref-clk supply
  2022-07-05  9:42   ` Johan Hovold
@ 2022-07-05 10:16     ` Krzysztof Kozlowski
  -1 siblings, 0 replies; 178+ messages in thread
From: Krzysztof Kozlowski @ 2022-07-05 10:16 UTC (permalink / raw)
  To: Johan Hovold, Vinod Koul, Rob Herring, Krzysztof Kozlowski
  Cc: Andy Gross, Bjorn Andersson, Kishon Vijay Abraham I,
	linux-arm-msm, linux-phy, devicetree, linux-kernel

On 05/07/2022 11:42, Johan Hovold wrote:
> Only UFS PHY nodes in mainline have a vddp-ref-clk supply. Drop it from
> the PCIe PHY binding.
> 

That's not really good reason. Either the hardware uses ref-clk supply
or not. Now it looks like you copied everything from common schema and
clean things up. That's not how it should be organize.

It's okay to copy existing bindings which are applicable and then in
separate patch deprecate things or remove pieces which are not correct.
But all this in assumption that the first copy already selected only
applicable parts.


Best regards,
Krzysztof

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

* Re: [PATCH 16/43] dt-bindings: phy: qcom,qmp-pcie: drop unused vddp-ref-clk supply
@ 2022-07-05 10:16     ` Krzysztof Kozlowski
  0 siblings, 0 replies; 178+ messages in thread
From: Krzysztof Kozlowski @ 2022-07-05 10:16 UTC (permalink / raw)
  To: Johan Hovold, Vinod Koul, Rob Herring, Krzysztof Kozlowski
  Cc: Andy Gross, Bjorn Andersson, Kishon Vijay Abraham I,
	linux-arm-msm, linux-phy, devicetree, linux-kernel

On 05/07/2022 11:42, Johan Hovold wrote:
> Only UFS PHY nodes in mainline have a vddp-ref-clk supply. Drop it from
> the PCIe PHY binding.
> 

That's not really good reason. Either the hardware uses ref-clk supply
or not. Now it looks like you copied everything from common schema and
clean things up. That's not how it should be organize.

It's okay to copy existing bindings which are applicable and then in
separate patch deprecate things or remove pieces which are not correct.
But all this in assumption that the first copy already selected only
applicable parts.


Best regards,
Krzysztof

-- 
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy

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

* Re: [PATCH 17/43] dt-bindings: phy: qcom,qmp-pcie: add missing child node schema
  2022-07-05  9:42   ` Johan Hovold
@ 2022-07-05 10:18     ` Krzysztof Kozlowski
  -1 siblings, 0 replies; 178+ messages in thread
From: Krzysztof Kozlowski @ 2022-07-05 10:18 UTC (permalink / raw)
  To: Johan Hovold, Vinod Koul, Rob Herring, Krzysztof Kozlowski
  Cc: Andy Gross, Bjorn Andersson, Kishon Vijay Abraham I,
	linux-arm-msm, linux-phy, devicetree, linux-kernel

On 05/07/2022 11:42, Johan Hovold wrote:
> Add the missing the description of the PHY-provider child node which was
> ignored when converting to DT schema.
> 
> Also fix up the incorrect description that claimed that one child node
> per lane was required.
> 
> Fixes: ccf51c1cedfd ("dt-bindings: phy: qcom,qmp: Convert QMP PHY bindings to yaml")
> Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
> ---
>  .../bindings/phy/qcom,qmp-pcie-phy.yaml       | 88 ++++++++++++++++++-
>  1 file changed, 85 insertions(+), 3 deletions(-)
> 
> diff --git a/Documentation/devicetree/bindings/phy/qcom,qmp-pcie-phy.yaml b/Documentation/devicetree/bindings/phy/qcom,qmp-pcie-phy.yaml
> index ff1577f68a00..5a1ebf874559 100644
> --- a/Documentation/devicetree/bindings/phy/qcom,qmp-pcie-phy.yaml
> +++ b/Documentation/devicetree/bindings/phy/qcom,qmp-pcie-phy.yaml
> @@ -69,9 +69,37 @@ properties:
>  patternProperties:
>    "^phy@[0-9a-f]+$":
>      type: object
> -    description:
> -      Each device node of QMP PHY is required to have as many child nodes as
> -      the number of lanes the PHY has.
> +    description: Single PHY-provider child node.
> +    properties:
> +      reg:
> +        minItems: 3
> +        maxItems: 6
> +
> +      clocks:
> +        items:
> +          - description: PIPE clock
> +
> +      clock-names:
> +        items:
> +          - const: pipe0
> +
> +      "#clock-cells":
> +        const: 0
> +
> +      clock-output-names: true
> +
> +      "#phy-cells":
> +        const: 0
> +
> +    required:
> +      - reg
> +      - clocks
> +      - clock-names
> +      - "#clock-cells"
> +      - clock-output-names
> +      - "#phy-cells"
> +
> +    additionalProperties: false
>  
>  required:
>    - compatible
> @@ -180,3 +208,57 @@ allOf:
>        required:
>          - vdda-phy-supply
>          - vdda-pll-supply
> +
> +  - if:
> +      properties:
> +        compatible:
> +          contains:
> +            enum:
> +              - qcom,sm8250-qmp-gen3x2-pcie-phy
> +              - qcom,sm8250-qmp-modem-pcie-phy
> +              - qcom,sm8450-qmp-gen4x2-pcie-phy
> +    then:
> +      patternProperties:
> +        "^phy@[0-9a-f]+$":
> +          properties:
> +            reg:
> +              items:
> +                - description: TX lane 1
> +                - description: RX lane 1
> +                - description: PCS
> +                - description: TX lane 2
> +                - description: RX lane 2
> +                - description: PCS_MISC
> +    else:
> +      patternProperties:
> +        "^phy@[0-9a-f]+$":
> +          properties:
> +            reg:
> +              minItems: 3
> +              maxItems: 4
> +              items:
> +                - description: TX
> +                - description: RX
> +                - description: PCS
> +                - description: PCS_MISC
> +      if:

Do not include if within other if. Just split the entire section to its
own if:.


> +        properties:
> +          compatible:
> +            contains:
> +              enum:
> +                - qcom,ipq6018-qmp-pcie-phy
> +                - qcom,ipq8074-qmp-pcie-phy
> +                - qcom,msm8998-qmp-pcie-phy
> +                - qcom,sdm845-qhp-pcie-phy
> +      then:
> +        patternProperties:
> +          "^phy@[0-9a-f]+$":
> +            properties:
> +              reg:
> +                maxItems: 3
> +      else:
> +        patternProperties:
> +          "^phy@[0-9a-f]+$":
> +            properties:
> +              reg:
> +                minItems: 4


Best regards,
Krzysztof

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

* Re: [PATCH 17/43] dt-bindings: phy: qcom,qmp-pcie: add missing child node schema
@ 2022-07-05 10:18     ` Krzysztof Kozlowski
  0 siblings, 0 replies; 178+ messages in thread
From: Krzysztof Kozlowski @ 2022-07-05 10:18 UTC (permalink / raw)
  To: Johan Hovold, Vinod Koul, Rob Herring, Krzysztof Kozlowski
  Cc: Andy Gross, Bjorn Andersson, Kishon Vijay Abraham I,
	linux-arm-msm, linux-phy, devicetree, linux-kernel

On 05/07/2022 11:42, Johan Hovold wrote:
> Add the missing the description of the PHY-provider child node which was
> ignored when converting to DT schema.
> 
> Also fix up the incorrect description that claimed that one child node
> per lane was required.
> 
> Fixes: ccf51c1cedfd ("dt-bindings: phy: qcom,qmp: Convert QMP PHY bindings to yaml")
> Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
> ---
>  .../bindings/phy/qcom,qmp-pcie-phy.yaml       | 88 ++++++++++++++++++-
>  1 file changed, 85 insertions(+), 3 deletions(-)
> 
> diff --git a/Documentation/devicetree/bindings/phy/qcom,qmp-pcie-phy.yaml b/Documentation/devicetree/bindings/phy/qcom,qmp-pcie-phy.yaml
> index ff1577f68a00..5a1ebf874559 100644
> --- a/Documentation/devicetree/bindings/phy/qcom,qmp-pcie-phy.yaml
> +++ b/Documentation/devicetree/bindings/phy/qcom,qmp-pcie-phy.yaml
> @@ -69,9 +69,37 @@ properties:
>  patternProperties:
>    "^phy@[0-9a-f]+$":
>      type: object
> -    description:
> -      Each device node of QMP PHY is required to have as many child nodes as
> -      the number of lanes the PHY has.
> +    description: Single PHY-provider child node.
> +    properties:
> +      reg:
> +        minItems: 3
> +        maxItems: 6
> +
> +      clocks:
> +        items:
> +          - description: PIPE clock
> +
> +      clock-names:
> +        items:
> +          - const: pipe0
> +
> +      "#clock-cells":
> +        const: 0
> +
> +      clock-output-names: true
> +
> +      "#phy-cells":
> +        const: 0
> +
> +    required:
> +      - reg
> +      - clocks
> +      - clock-names
> +      - "#clock-cells"
> +      - clock-output-names
> +      - "#phy-cells"
> +
> +    additionalProperties: false
>  
>  required:
>    - compatible
> @@ -180,3 +208,57 @@ allOf:
>        required:
>          - vdda-phy-supply
>          - vdda-pll-supply
> +
> +  - if:
> +      properties:
> +        compatible:
> +          contains:
> +            enum:
> +              - qcom,sm8250-qmp-gen3x2-pcie-phy
> +              - qcom,sm8250-qmp-modem-pcie-phy
> +              - qcom,sm8450-qmp-gen4x2-pcie-phy
> +    then:
> +      patternProperties:
> +        "^phy@[0-9a-f]+$":
> +          properties:
> +            reg:
> +              items:
> +                - description: TX lane 1
> +                - description: RX lane 1
> +                - description: PCS
> +                - description: TX lane 2
> +                - description: RX lane 2
> +                - description: PCS_MISC
> +    else:
> +      patternProperties:
> +        "^phy@[0-9a-f]+$":
> +          properties:
> +            reg:
> +              minItems: 3
> +              maxItems: 4
> +              items:
> +                - description: TX
> +                - description: RX
> +                - description: PCS
> +                - description: PCS_MISC
> +      if:

Do not include if within other if. Just split the entire section to its
own if:.


> +        properties:
> +          compatible:
> +            contains:
> +              enum:
> +                - qcom,ipq6018-qmp-pcie-phy
> +                - qcom,ipq8074-qmp-pcie-phy
> +                - qcom,msm8998-qmp-pcie-phy
> +                - qcom,sdm845-qhp-pcie-phy
> +      then:
> +        patternProperties:
> +          "^phy@[0-9a-f]+$":
> +            properties:
> +              reg:
> +                maxItems: 3
> +      else:
> +        patternProperties:
> +          "^phy@[0-9a-f]+$":
> +            properties:
> +              reg:
> +                minItems: 4


Best regards,
Krzysztof

-- 
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy

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

* Re: [PATCH 18/43] dt-bindings: phy: qcom,qmp-pcie: add example node
  2022-07-05  9:42   ` Johan Hovold
@ 2022-07-05 10:18     ` Krzysztof Kozlowski
  -1 siblings, 0 replies; 178+ messages in thread
From: Krzysztof Kozlowski @ 2022-07-05 10:18 UTC (permalink / raw)
  To: Johan Hovold, Vinod Koul, Rob Herring, Krzysztof Kozlowski
  Cc: Andy Gross, Bjorn Andersson, Kishon Vijay Abraham I,
	linux-arm-msm, linux-phy, devicetree, linux-kernel

On 05/07/2022 11:42, Johan Hovold wrote:
> Add an example node based on a cleaned up version of sm8250.dtsi.
> 
> Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
> ---
>  .../bindings/phy/qcom,qmp-pcie-phy.yaml       | 41 +++++++++++++++++++
>  1 file changed, 41 insertions(+)
> 

Should be squashed.


Best regards,
Krzysztof

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

* Re: [PATCH 18/43] dt-bindings: phy: qcom,qmp-pcie: add example node
@ 2022-07-05 10:18     ` Krzysztof Kozlowski
  0 siblings, 0 replies; 178+ messages in thread
From: Krzysztof Kozlowski @ 2022-07-05 10:18 UTC (permalink / raw)
  To: Johan Hovold, Vinod Koul, Rob Herring, Krzysztof Kozlowski
  Cc: Andy Gross, Bjorn Andersson, Kishon Vijay Abraham I,
	linux-arm-msm, linux-phy, devicetree, linux-kernel

On 05/07/2022 11:42, Johan Hovold wrote:
> Add an example node based on a cleaned up version of sm8250.dtsi.
> 
> Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
> ---
>  .../bindings/phy/qcom,qmp-pcie-phy.yaml       | 41 +++++++++++++++++++
>  1 file changed, 41 insertions(+)
> 

Should be squashed.


Best regards,
Krzysztof

-- 
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy

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

* Re: [PATCH 20/43] dt-bindings: phy: qcom,qmp: split out UFS PHY binding
  2022-07-05  9:42   ` Johan Hovold
@ 2022-07-05 10:19     ` Krzysztof Kozlowski
  -1 siblings, 0 replies; 178+ messages in thread
From: Krzysztof Kozlowski @ 2022-07-05 10:19 UTC (permalink / raw)
  To: Johan Hovold, Vinod Koul, Rob Herring, Krzysztof Kozlowski
  Cc: Andy Gross, Bjorn Andersson, Kishon Vijay Abraham I,
	linux-arm-msm, linux-phy, devicetree, linux-kernel

On 05/07/2022 11:42, Johan Hovold wrote:
> The QMP PHY DT schema is getting unwieldy. Break out the UFS PHY
> binding in a separate file.
> 
> Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
> ---
>  .../devicetree/bindings/phy/qcom,qmp-phy.yaml |  65 --------
>  .../bindings/phy/qcom,qmp-ufs-phy.yaml        | 149 ++++++++++++++++++
>  2 files changed, 149 insertions(+), 65 deletions(-)
>  create mode 100644 Documentation/devicetree/bindings/phy/qcom,qmp-ufs-phy.yaml
> 
> diff --git a/Documentation/devicetree/bindings/phy/qcom,qmp-phy.yaml b/Documentation/devicetree/bindings/phy/qcom,qmp-phy.yaml
> index f416a1a53a3f..04c24f8e4526 100644
> --- a/Documentation/devicetree/bindings/phy/qcom,qmp-phy.yaml
> +++ b/Documentation/devicetree/bindings/phy/qcom,qmp-phy.yaml
> @@ -19,32 +19,21 @@ properties:
>      enum:
>        - qcom,ipq6018-qmp-usb3-phy
>        - qcom,ipq8074-qmp-usb3-phy
> -      - qcom,msm8996-qmp-ufs-phy
>        - qcom,msm8996-qmp-usb3-phy
> -      - qcom,msm8998-qmp-ufs-phy
>        - qcom,msm8998-qmp-usb3-phy
>        - qcom,qcm2290-qmp-usb3-phy
>        - qcom,sc7180-qmp-usb3-phy
> -      - qcom,sc8180x-qmp-ufs-phy
>        - qcom,sc8180x-qmp-usb3-phy
> -      - qcom,sc8280xp-qmp-ufs-phy
> -      - qcom,sdm845-qmp-ufs-phy
>        - qcom,sdm845-qmp-usb3-phy
>        - qcom,sdm845-qmp-usb3-uni-phy
>        - qcom,sdx55-qmp-usb3-uni-phy
>        - qcom,sdx65-qmp-usb3-uni-phy
> -      - qcom,sm6115-qmp-ufs-phy
> -      - qcom,sm6350-qmp-ufs-phy
> -      - qcom,sm8150-qmp-ufs-phy
>        - qcom,sm8150-qmp-usb3-phy
>        - qcom,sm8150-qmp-usb3-uni-phy
> -      - qcom,sm8250-qmp-ufs-phy
>        - qcom,sm8250-qmp-usb3-phy
>        - qcom,sm8250-qmp-usb3-uni-phy
> -      - qcom,sm8350-qmp-ufs-phy
>        - qcom,sm8350-qmp-usb3-phy
>        - qcom,sm8350-qmp-usb3-uni-phy
> -      - qcom,sm8450-qmp-ufs-phy
>        - qcom,sm8450-qmp-usb3-phy
>  
>    reg:
> @@ -202,60 +191,6 @@ allOf:
>        required:
>          - vdda-phy-supply
>          - vdda-pll-supply
> -  - if:
> -      properties:
> -        compatible:
> -          contains:
> -            enum:
> -              - qcom,msm8996-qmp-ufs-phy
> -    then:
> -      properties:
> -        clocks:
> -          items:
> -            - description: 19.2 MHz ref clock.
> -        clock-names:
> -          items:
> -            - const: ref
> -        resets:
> -          items:
> -            - description: PHY reset in the UFS controller.
> -        reset-names:
> -          items:
> -            - const: ufsphy
> -      required:
> -        - vdda-phy-supply
> -        - vdda-pll-supply
> -  - if:
> -      properties:
> -        compatible:
> -          contains:
> -            enum:
> -              - qcom,msm8998-qmp-ufs-phy
> -              - qcom,sc8180x-qmp-ufs-phy
> -              - qcom,sc8280xp-qmp-ufs-phy
> -              - qcom,sdm845-qmp-ufs-phy
> -              - qcom,sm6350-qmp-ufs-phy
> -              - qcom,sm8150-qmp-ufs-phy
> -              - qcom,sm8250-qmp-ufs-phy
> -    then:
> -      properties:
> -        clocks:
> -          items:
> -            - description: 19.2 MHz ref clock.
> -            - description: PHY reference aux clock.
> -        clock-names:
> -          items:
> -            - const: ref
> -            - const: ref_aux
> -        resets:
> -          items:
> -            - description: PHY reset in the UFS controller.
> -        reset-names:
> -          items:
> -            - const: ufsphy
> -      required:
> -        - vdda-phy-supply
> -        - vdda-pll-supply
>    - if:
>        properties:
>          compatible:
> diff --git a/Documentation/devicetree/bindings/phy/qcom,qmp-ufs-phy.yaml b/Documentation/devicetree/bindings/phy/qcom,qmp-ufs-phy.yaml
> new file mode 100644
> index 000000000000..4471f1b4fb7a
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/phy/qcom,qmp-ufs-phy.yaml
> @@ -0,0 +1,149 @@
> +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
> +
> +%YAML 1.2
> +---
> +$id: "http://devicetree.org/schemas/phy/qcom,qmp-ufs-phy.yaml#"
> +$schema: "http://devicetree.org/meta-schemas/core.yaml#"
> +

All previous comments apply.


Best regards,
Krzysztof

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

* Re: [PATCH 20/43] dt-bindings: phy: qcom,qmp: split out UFS PHY binding
@ 2022-07-05 10:19     ` Krzysztof Kozlowski
  0 siblings, 0 replies; 178+ messages in thread
From: Krzysztof Kozlowski @ 2022-07-05 10:19 UTC (permalink / raw)
  To: Johan Hovold, Vinod Koul, Rob Herring, Krzysztof Kozlowski
  Cc: Andy Gross, Bjorn Andersson, Kishon Vijay Abraham I,
	linux-arm-msm, linux-phy, devicetree, linux-kernel

On 05/07/2022 11:42, Johan Hovold wrote:
> The QMP PHY DT schema is getting unwieldy. Break out the UFS PHY
> binding in a separate file.
> 
> Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
> ---
>  .../devicetree/bindings/phy/qcom,qmp-phy.yaml |  65 --------
>  .../bindings/phy/qcom,qmp-ufs-phy.yaml        | 149 ++++++++++++++++++
>  2 files changed, 149 insertions(+), 65 deletions(-)
>  create mode 100644 Documentation/devicetree/bindings/phy/qcom,qmp-ufs-phy.yaml
> 
> diff --git a/Documentation/devicetree/bindings/phy/qcom,qmp-phy.yaml b/Documentation/devicetree/bindings/phy/qcom,qmp-phy.yaml
> index f416a1a53a3f..04c24f8e4526 100644
> --- a/Documentation/devicetree/bindings/phy/qcom,qmp-phy.yaml
> +++ b/Documentation/devicetree/bindings/phy/qcom,qmp-phy.yaml
> @@ -19,32 +19,21 @@ properties:
>      enum:
>        - qcom,ipq6018-qmp-usb3-phy
>        - qcom,ipq8074-qmp-usb3-phy
> -      - qcom,msm8996-qmp-ufs-phy
>        - qcom,msm8996-qmp-usb3-phy
> -      - qcom,msm8998-qmp-ufs-phy
>        - qcom,msm8998-qmp-usb3-phy
>        - qcom,qcm2290-qmp-usb3-phy
>        - qcom,sc7180-qmp-usb3-phy
> -      - qcom,sc8180x-qmp-ufs-phy
>        - qcom,sc8180x-qmp-usb3-phy
> -      - qcom,sc8280xp-qmp-ufs-phy
> -      - qcom,sdm845-qmp-ufs-phy
>        - qcom,sdm845-qmp-usb3-phy
>        - qcom,sdm845-qmp-usb3-uni-phy
>        - qcom,sdx55-qmp-usb3-uni-phy
>        - qcom,sdx65-qmp-usb3-uni-phy
> -      - qcom,sm6115-qmp-ufs-phy
> -      - qcom,sm6350-qmp-ufs-phy
> -      - qcom,sm8150-qmp-ufs-phy
>        - qcom,sm8150-qmp-usb3-phy
>        - qcom,sm8150-qmp-usb3-uni-phy
> -      - qcom,sm8250-qmp-ufs-phy
>        - qcom,sm8250-qmp-usb3-phy
>        - qcom,sm8250-qmp-usb3-uni-phy
> -      - qcom,sm8350-qmp-ufs-phy
>        - qcom,sm8350-qmp-usb3-phy
>        - qcom,sm8350-qmp-usb3-uni-phy
> -      - qcom,sm8450-qmp-ufs-phy
>        - qcom,sm8450-qmp-usb3-phy
>  
>    reg:
> @@ -202,60 +191,6 @@ allOf:
>        required:
>          - vdda-phy-supply
>          - vdda-pll-supply
> -  - if:
> -      properties:
> -        compatible:
> -          contains:
> -            enum:
> -              - qcom,msm8996-qmp-ufs-phy
> -    then:
> -      properties:
> -        clocks:
> -          items:
> -            - description: 19.2 MHz ref clock.
> -        clock-names:
> -          items:
> -            - const: ref
> -        resets:
> -          items:
> -            - description: PHY reset in the UFS controller.
> -        reset-names:
> -          items:
> -            - const: ufsphy
> -      required:
> -        - vdda-phy-supply
> -        - vdda-pll-supply
> -  - if:
> -      properties:
> -        compatible:
> -          contains:
> -            enum:
> -              - qcom,msm8998-qmp-ufs-phy
> -              - qcom,sc8180x-qmp-ufs-phy
> -              - qcom,sc8280xp-qmp-ufs-phy
> -              - qcom,sdm845-qmp-ufs-phy
> -              - qcom,sm6350-qmp-ufs-phy
> -              - qcom,sm8150-qmp-ufs-phy
> -              - qcom,sm8250-qmp-ufs-phy
> -    then:
> -      properties:
> -        clocks:
> -          items:
> -            - description: 19.2 MHz ref clock.
> -            - description: PHY reference aux clock.
> -        clock-names:
> -          items:
> -            - const: ref
> -            - const: ref_aux
> -        resets:
> -          items:
> -            - description: PHY reset in the UFS controller.
> -        reset-names:
> -          items:
> -            - const: ufsphy
> -      required:
> -        - vdda-phy-supply
> -        - vdda-pll-supply
>    - if:
>        properties:
>          compatible:
> diff --git a/Documentation/devicetree/bindings/phy/qcom,qmp-ufs-phy.yaml b/Documentation/devicetree/bindings/phy/qcom,qmp-ufs-phy.yaml
> new file mode 100644
> index 000000000000..4471f1b4fb7a
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/phy/qcom,qmp-ufs-phy.yaml
> @@ -0,0 +1,149 @@
> +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
> +
> +%YAML 1.2
> +---
> +$id: "http://devicetree.org/schemas/phy/qcom,qmp-ufs-phy.yaml#"
> +$schema: "http://devicetree.org/meta-schemas/core.yaml#"
> +

All previous comments apply.


Best regards,
Krzysztof

-- 
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy

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

* Re: [PATCH 38/43] phy: qcom-qmp-pcie: drop pipe clock lane suffix
  2022-07-05  9:42   ` Johan Hovold
@ 2022-07-05 10:20     ` Krzysztof Kozlowski
  -1 siblings, 0 replies; 178+ messages in thread
From: Krzysztof Kozlowski @ 2022-07-05 10:20 UTC (permalink / raw)
  To: Johan Hovold, Vinod Koul, Rob Herring, Krzysztof Kozlowski
  Cc: Andy Gross, Bjorn Andersson, Kishon Vijay Abraham I,
	linux-arm-msm, linux-phy, devicetree, linux-kernel

On 05/07/2022 11:42, Johan Hovold wrote:
> The pipe clock is defined in the "lane" node so there's no need to keep
> adding a redundant lane-number suffix to the clock name.
> 
> Drop the lane suffix from the pipe clock name, but continue supporting
> the legacy name as a fall back.
> 
> Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
> ---
>  drivers/phy/qualcomm/phy-qcom-qmp-pcie.c | 8 ++++++--
>  1 file changed, 6 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/phy/qualcomm/phy-qcom-qmp-pcie.c b/drivers/phy/qualcomm/phy-qcom-qmp-pcie.c
> index 385ea3d8de08..254ad25591b9 100644
> --- a/drivers/phy/qualcomm/phy-qcom-qmp-pcie.c
> +++ b/drivers/phy/qualcomm/phy-qcom-qmp-pcie.c
> @@ -2210,8 +2210,12 @@ int qcom_qmp_phy_pcie_create(struct device *dev, struct device_node *np, int id,
>  	if (!qphy->pcs_misc)
>  		dev_vdbg(dev, "PHY pcs_misc-reg not used\n");
>  
> -	snprintf(prop_name, sizeof(prop_name), "pipe%d", id);
> -	qphy->pipe_clk = devm_get_clk_from_child(dev, np, prop_name);
> +	qphy->pipe_clk = devm_get_clk_from_child(dev, np, "pipe");

Just get first clock and no need for handling any deprecation.

Best regards,
Krzysztof

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

* Re: [PATCH 38/43] phy: qcom-qmp-pcie: drop pipe clock lane suffix
@ 2022-07-05 10:20     ` Krzysztof Kozlowski
  0 siblings, 0 replies; 178+ messages in thread
From: Krzysztof Kozlowski @ 2022-07-05 10:20 UTC (permalink / raw)
  To: Johan Hovold, Vinod Koul, Rob Herring, Krzysztof Kozlowski
  Cc: Andy Gross, Bjorn Andersson, Kishon Vijay Abraham I,
	linux-arm-msm, linux-phy, devicetree, linux-kernel

On 05/07/2022 11:42, Johan Hovold wrote:
> The pipe clock is defined in the "lane" node so there's no need to keep
> adding a redundant lane-number suffix to the clock name.
> 
> Drop the lane suffix from the pipe clock name, but continue supporting
> the legacy name as a fall back.
> 
> Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
> ---
>  drivers/phy/qualcomm/phy-qcom-qmp-pcie.c | 8 ++++++--
>  1 file changed, 6 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/phy/qualcomm/phy-qcom-qmp-pcie.c b/drivers/phy/qualcomm/phy-qcom-qmp-pcie.c
> index 385ea3d8de08..254ad25591b9 100644
> --- a/drivers/phy/qualcomm/phy-qcom-qmp-pcie.c
> +++ b/drivers/phy/qualcomm/phy-qcom-qmp-pcie.c
> @@ -2210,8 +2210,12 @@ int qcom_qmp_phy_pcie_create(struct device *dev, struct device_node *np, int id,
>  	if (!qphy->pcs_misc)
>  		dev_vdbg(dev, "PHY pcs_misc-reg not used\n");
>  
> -	snprintf(prop_name, sizeof(prop_name), "pipe%d", id);
> -	qphy->pipe_clk = devm_get_clk_from_child(dev, np, prop_name);
> +	qphy->pipe_clk = devm_get_clk_from_child(dev, np, "pipe");

Just get first clock and no need for handling any deprecation.

Best regards,
Krzysztof

-- 
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy

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

* Re: [PATCH 06/43] dt-bindings: phy: qcom,qmp: split out msm8996-qmp-pcie-phy
  2022-07-05 10:08     ` Krzysztof Kozlowski
@ 2022-07-05 10:20       ` Johan Hovold
  -1 siblings, 0 replies; 178+ messages in thread
From: Johan Hovold @ 2022-07-05 10:20 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: Johan Hovold, Vinod Koul, Rob Herring, Krzysztof Kozlowski,
	Andy Gross, Bjorn Andersson, Kishon Vijay Abraham I,
	linux-arm-msm, linux-phy, devicetree, linux-kernel

On Tue, Jul 05, 2022 at 12:08:36PM +0200, Krzysztof Kozlowski wrote:
> On 05/07/2022 11:42, Johan Hovold wrote:
> > The QMP PHY DT schema is getting unwieldy. Break out the odd-bird
> > msm8996-qmp-pcie-phy which is the only QMP PHY that uses separate
> > "per-lane" nodes.
> > 
> > Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
> > ---
> >  .../phy/qcom,msm8996-qmp-pcie-phy.yaml        | 114 ++++++++++++++++++
> >  .../devicetree/bindings/phy/qcom,qmp-phy.yaml |  32 -----
> >  2 files changed, 114 insertions(+), 32 deletions(-)
> >  create mode 100644 Documentation/devicetree/bindings/phy/qcom,msm8996-qmp-pcie-phy.yaml
> > 
> > diff --git a/Documentation/devicetree/bindings/phy/qcom,msm8996-qmp-pcie-phy.yaml b/Documentation/devicetree/bindings/phy/qcom,msm8996-qmp-pcie-phy.yaml
> > new file mode 100644
> > index 000000000000..14fd86fd91ec
> > --- /dev/null
> > +++ b/Documentation/devicetree/bindings/phy/qcom,msm8996-qmp-pcie-phy.yaml
> > @@ -0,0 +1,114 @@
> > +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
> > +
> 
> No line break
> 
> > +%YAML 1.2
> > +---
> > +$id: "http://devicetree.org/schemas/phy/qcom,msm8996-qmp-pcie-phy.yaml#"
> > +$schema: "http://devicetree.org/meta-schemas/core.yaml#"
> 
> Drop the quotes from two above.

This comes from the current binding. I can clean that one up first.

> > +
> > +title: Qualcomm QMP PHY controller (MSM8996 PCIe)
> > +
> > +maintainers:
> > +  - Vinod Koul <vkoul@kernel.org>
> > +
> > +description:
> > +  QMP PHY controller supports physical layer functionality for a number of
> > +  controllers on Qualcomm chipsets, such as, PCIe, UFS, and USB.
> > +
> > +properties:
> > +  compatible:
> > +    const: qcom,msm8996-qmp-pcie-phy
> > +
> > +  reg:
> > +    minItems: 1
> > +    items:
> > +      - description: Address and length of PHY's common serdes block.
> > +      - description: Address and length of PHY's DP_COM control block.
> 
> Are two reg items applicable here?

No, but see below.

> > +
> > +  "#address-cells":
> > +    enum: [ 1, 2 ]
> > +
> > +  "#size-cells":
> > +    enum: [ 1, 2 ]
> > +
> > +  ranges: true
> > +
> > +  clocks:
> > +    minItems: 1
> > +    maxItems: 4
> 
> Define clocks here, not in allOf:if:then.

To remain sane, and to help reviewers, I decided not to do changes to
the binding while splitting it up which would only make them harder
to review.

Hence the split followed by cleanup/tightening of constraints.

> How about an example?

That's also a new addition to the binding and goes in a later separate
patch.

Johan

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

* Re: [PATCH 06/43] dt-bindings: phy: qcom,qmp: split out msm8996-qmp-pcie-phy
@ 2022-07-05 10:20       ` Johan Hovold
  0 siblings, 0 replies; 178+ messages in thread
From: Johan Hovold @ 2022-07-05 10:20 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: Johan Hovold, Vinod Koul, Rob Herring, Krzysztof Kozlowski,
	Andy Gross, Bjorn Andersson, Kishon Vijay Abraham I,
	linux-arm-msm, linux-phy, devicetree, linux-kernel

On Tue, Jul 05, 2022 at 12:08:36PM +0200, Krzysztof Kozlowski wrote:
> On 05/07/2022 11:42, Johan Hovold wrote:
> > The QMP PHY DT schema is getting unwieldy. Break out the odd-bird
> > msm8996-qmp-pcie-phy which is the only QMP PHY that uses separate
> > "per-lane" nodes.
> > 
> > Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
> > ---
> >  .../phy/qcom,msm8996-qmp-pcie-phy.yaml        | 114 ++++++++++++++++++
> >  .../devicetree/bindings/phy/qcom,qmp-phy.yaml |  32 -----
> >  2 files changed, 114 insertions(+), 32 deletions(-)
> >  create mode 100644 Documentation/devicetree/bindings/phy/qcom,msm8996-qmp-pcie-phy.yaml
> > 
> > diff --git a/Documentation/devicetree/bindings/phy/qcom,msm8996-qmp-pcie-phy.yaml b/Documentation/devicetree/bindings/phy/qcom,msm8996-qmp-pcie-phy.yaml
> > new file mode 100644
> > index 000000000000..14fd86fd91ec
> > --- /dev/null
> > +++ b/Documentation/devicetree/bindings/phy/qcom,msm8996-qmp-pcie-phy.yaml
> > @@ -0,0 +1,114 @@
> > +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
> > +
> 
> No line break
> 
> > +%YAML 1.2
> > +---
> > +$id: "http://devicetree.org/schemas/phy/qcom,msm8996-qmp-pcie-phy.yaml#"
> > +$schema: "http://devicetree.org/meta-schemas/core.yaml#"
> 
> Drop the quotes from two above.

This comes from the current binding. I can clean that one up first.

> > +
> > +title: Qualcomm QMP PHY controller (MSM8996 PCIe)
> > +
> > +maintainers:
> > +  - Vinod Koul <vkoul@kernel.org>
> > +
> > +description:
> > +  QMP PHY controller supports physical layer functionality for a number of
> > +  controllers on Qualcomm chipsets, such as, PCIe, UFS, and USB.
> > +
> > +properties:
> > +  compatible:
> > +    const: qcom,msm8996-qmp-pcie-phy
> > +
> > +  reg:
> > +    minItems: 1
> > +    items:
> > +      - description: Address and length of PHY's common serdes block.
> > +      - description: Address and length of PHY's DP_COM control block.
> 
> Are two reg items applicable here?

No, but see below.

> > +
> > +  "#address-cells":
> > +    enum: [ 1, 2 ]
> > +
> > +  "#size-cells":
> > +    enum: [ 1, 2 ]
> > +
> > +  ranges: true
> > +
> > +  clocks:
> > +    minItems: 1
> > +    maxItems: 4
> 
> Define clocks here, not in allOf:if:then.

To remain sane, and to help reviewers, I decided not to do changes to
the binding while splitting it up which would only make them harder
to review.

Hence the split followed by cleanup/tightening of constraints.

> How about an example?

That's also a new addition to the binding and goes in a later separate
patch.

Johan

-- 
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy

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

* Re: [PATCH 40/43] phy: qcom-qmp-combo: drop pipe clock lane suffix
  2022-07-05  9:42   ` Johan Hovold
@ 2022-07-05 10:20     ` Krzysztof Kozlowski
  -1 siblings, 0 replies; 178+ messages in thread
From: Krzysztof Kozlowski @ 2022-07-05 10:20 UTC (permalink / raw)
  To: Johan Hovold, Vinod Koul, Rob Herring, Krzysztof Kozlowski
  Cc: Andy Gross, Bjorn Andersson, Kishon Vijay Abraham I,
	linux-arm-msm, linux-phy, devicetree, linux-kernel

On 05/07/2022 11:42, Johan Hovold wrote:
> The pipe clock is defined in the "lane" node so there's no need to keep
> adding a redundant lane-number suffix to the clock name.
> 
> Drop the lane suffix from the pipe clock name, but continue supporting
> the legacy name as a fall back.
> 
> Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
> ---
>  drivers/phy/qualcomm/phy-qcom-qmp-combo.c | 8 ++++++--
>  1 file changed, 6 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/phy/qualcomm/phy-qcom-qmp-combo.c b/drivers/phy/qualcomm/phy-qcom-qmp-combo.c
> index b266514ae9ee..7b2eb234cfc2 100644
> --- a/drivers/phy/qualcomm/phy-qcom-qmp-combo.c
> +++ b/drivers/phy/qualcomm/phy-qcom-qmp-combo.c
> @@ -2558,8 +2558,12 @@ int qcom_qmp_phy_combo_create(struct device *dev, struct device_node *np, int id
>  	 * Otherwise, we initialize pipe clock to NULL for
>  	 * all phys that don't need this.
>  	 */
> -	snprintf(prop_name, sizeof(prop_name), "pipe%d", id);
> -	qphy->pipe_clk = devm_get_clk_from_child(dev, np, prop_name);
> +	qphy->pipe_clk = devm_get_clk_from_child(dev, np, "pipe");

Just grab first clock.

Best regards,
Krzysztof

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

* Re: [PATCH 40/43] phy: qcom-qmp-combo: drop pipe clock lane suffix
@ 2022-07-05 10:20     ` Krzysztof Kozlowski
  0 siblings, 0 replies; 178+ messages in thread
From: Krzysztof Kozlowski @ 2022-07-05 10:20 UTC (permalink / raw)
  To: Johan Hovold, Vinod Koul, Rob Herring, Krzysztof Kozlowski
  Cc: Andy Gross, Bjorn Andersson, Kishon Vijay Abraham I,
	linux-arm-msm, linux-phy, devicetree, linux-kernel

On 05/07/2022 11:42, Johan Hovold wrote:
> The pipe clock is defined in the "lane" node so there's no need to keep
> adding a redundant lane-number suffix to the clock name.
> 
> Drop the lane suffix from the pipe clock name, but continue supporting
> the legacy name as a fall back.
> 
> Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
> ---
>  drivers/phy/qualcomm/phy-qcom-qmp-combo.c | 8 ++++++--
>  1 file changed, 6 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/phy/qualcomm/phy-qcom-qmp-combo.c b/drivers/phy/qualcomm/phy-qcom-qmp-combo.c
> index b266514ae9ee..7b2eb234cfc2 100644
> --- a/drivers/phy/qualcomm/phy-qcom-qmp-combo.c
> +++ b/drivers/phy/qualcomm/phy-qcom-qmp-combo.c
> @@ -2558,8 +2558,12 @@ int qcom_qmp_phy_combo_create(struct device *dev, struct device_node *np, int id
>  	 * Otherwise, we initialize pipe clock to NULL for
>  	 * all phys that don't need this.
>  	 */
> -	snprintf(prop_name, sizeof(prop_name), "pipe%d", id);
> -	qphy->pipe_clk = devm_get_clk_from_child(dev, np, prop_name);
> +	qphy->pipe_clk = devm_get_clk_from_child(dev, np, "pipe");

Just grab first clock.

Best regards,
Krzysztof

-- 
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy

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

* Re: [PATCH 07/43] dt-bindings: phy: qcom,msm8996-qmp-pcie: clean up constraints
  2022-07-05 10:09     ` Krzysztof Kozlowski
@ 2022-07-05 10:21       ` Johan Hovold
  -1 siblings, 0 replies; 178+ messages in thread
From: Johan Hovold @ 2022-07-05 10:21 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: Johan Hovold, Vinod Koul, Rob Herring, Krzysztof Kozlowski,
	Andy Gross, Bjorn Andersson, Kishon Vijay Abraham I,
	linux-arm-msm, linux-phy, devicetree, linux-kernel

On Tue, Jul 05, 2022 at 12:09:19PM +0200, Krzysztof Kozlowski wrote:
> On 05/07/2022 11:42, Johan Hovold wrote:
> > Drop the compatible conditional and tighten the property constraints.
> > 
> > Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
> 
> Squash it with previous patch. Does not make sense to add new file and a
> patch later change it.

I beg to differ, for the reasons I just spelled out in my previous
reply.

Johan

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

* Re: [PATCH 07/43] dt-bindings: phy: qcom,msm8996-qmp-pcie: clean up constraints
@ 2022-07-05 10:21       ` Johan Hovold
  0 siblings, 0 replies; 178+ messages in thread
From: Johan Hovold @ 2022-07-05 10:21 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: Johan Hovold, Vinod Koul, Rob Herring, Krzysztof Kozlowski,
	Andy Gross, Bjorn Andersson, Kishon Vijay Abraham I,
	linux-arm-msm, linux-phy, devicetree, linux-kernel

On Tue, Jul 05, 2022 at 12:09:19PM +0200, Krzysztof Kozlowski wrote:
> On 05/07/2022 11:42, Johan Hovold wrote:
> > Drop the compatible conditional and tighten the property constraints.
> > 
> > Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
> 
> Squash it with previous patch. Does not make sense to add new file and a
> patch later change it.

I beg to differ, for the reasons I just spelled out in my previous
reply.

Johan

-- 
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy

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

* Re: [PATCH 42/43] phy: qcom-qmp-pcie-msm8996: drop reset lane suffix
  2022-07-05  9:42   ` Johan Hovold
@ 2022-07-05 10:21     ` Krzysztof Kozlowski
  -1 siblings, 0 replies; 178+ messages in thread
From: Krzysztof Kozlowski @ 2022-07-05 10:21 UTC (permalink / raw)
  To: Johan Hovold, Vinod Koul, Rob Herring, Krzysztof Kozlowski
  Cc: Andy Gross, Bjorn Andersson, Kishon Vijay Abraham I,
	linux-arm-msm, linux-phy, devicetree, linux-kernel

On 05/07/2022 11:42, Johan Hovold wrote:
> The lane reset is defined in the "lane" node so there's no need to keep
> adding a redundant lane-number suffix to the reset name.
> 
> Drop the lane-number suffix from the lane reset name, but continue
> supporting the legacy name as a fall back.
> 
> Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
> ---
>  drivers/phy/qualcomm/phy-qcom-qmp-pcie-msm8996.c | 9 ++++++---
>  1 file changed, 6 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/phy/qualcomm/phy-qcom-qmp-pcie-msm8996.c b/drivers/phy/qualcomm/phy-qcom-qmp-pcie-msm8996.c
> index b8481dab54db..9ddb42fa5f7a 100644
> --- a/drivers/phy/qualcomm/phy-qcom-qmp-pcie-msm8996.c
> +++ b/drivers/phy/qualcomm/phy-qcom-qmp-pcie-msm8996.c
> @@ -915,9 +915,12 @@ int qcom_qmp_phy_pcie_msm8996_create(struct device *dev, struct device_node *np,
>  				     "failed to get lane%d pipe clock\n", id);
>  	}
>  
> -	/* Get lane reset, if any */
> -	snprintf(prop_name, sizeof(prop_name), "lane%d", id);
> -	qphy->lane_rst = of_reset_control_get_exclusive(np, prop_name);
> +	qphy->lane_rst = of_reset_control_get_exclusive(np, "lane");

As well, just grab first entry and ABI is kept stable.

Best regards,
Krzysztof

-- 
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy

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

* Re: [PATCH 42/43] phy: qcom-qmp-pcie-msm8996: drop reset lane suffix
@ 2022-07-05 10:21     ` Krzysztof Kozlowski
  0 siblings, 0 replies; 178+ messages in thread
From: Krzysztof Kozlowski @ 2022-07-05 10:21 UTC (permalink / raw)
  To: Johan Hovold, Vinod Koul, Rob Herring, Krzysztof Kozlowski
  Cc: Andy Gross, Bjorn Andersson, Kishon Vijay Abraham I,
	linux-arm-msm, linux-phy, devicetree, linux-kernel

On 05/07/2022 11:42, Johan Hovold wrote:
> The lane reset is defined in the "lane" node so there's no need to keep
> adding a redundant lane-number suffix to the reset name.
> 
> Drop the lane-number suffix from the lane reset name, but continue
> supporting the legacy name as a fall back.
> 
> Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
> ---
>  drivers/phy/qualcomm/phy-qcom-qmp-pcie-msm8996.c | 9 ++++++---
>  1 file changed, 6 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/phy/qualcomm/phy-qcom-qmp-pcie-msm8996.c b/drivers/phy/qualcomm/phy-qcom-qmp-pcie-msm8996.c
> index b8481dab54db..9ddb42fa5f7a 100644
> --- a/drivers/phy/qualcomm/phy-qcom-qmp-pcie-msm8996.c
> +++ b/drivers/phy/qualcomm/phy-qcom-qmp-pcie-msm8996.c
> @@ -915,9 +915,12 @@ int qcom_qmp_phy_pcie_msm8996_create(struct device *dev, struct device_node *np,
>  				     "failed to get lane%d pipe clock\n", id);
>  	}
>  
> -	/* Get lane reset, if any */
> -	snprintf(prop_name, sizeof(prop_name), "lane%d", id);
> -	qphy->lane_rst = of_reset_control_get_exclusive(np, prop_name);
> +	qphy->lane_rst = of_reset_control_get_exclusive(np, "lane");

As well, just grab first entry and ABI is kept stable.

Best regards,
Krzysztof

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

* Re: [PATCH 09/43] dt-bindings: phy: qcom,msm8996-qmp-pcie: add example node
  2022-07-05 10:10     ` Krzysztof Kozlowski
@ 2022-07-05 10:22       ` Johan Hovold
  -1 siblings, 0 replies; 178+ messages in thread
From: Johan Hovold @ 2022-07-05 10:22 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: Johan Hovold, Vinod Koul, Rob Herring, Krzysztof Kozlowski,
	Andy Gross, Bjorn Andersson, Kishon Vijay Abraham I,
	linux-arm-msm, linux-phy, devicetree, linux-kernel

On Tue, Jul 05, 2022 at 12:10:29PM +0200, Krzysztof Kozlowski wrote:
> On 05/07/2022 11:42, Johan Hovold wrote:
> > Add an example node based on a cleaned up version of msm8996.dtsi.
> > 
> > Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
> 
> Squash it, please.

Why? It's a new addition to the schema.

Johan

-- 
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy

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

* Re: [PATCH 09/43] dt-bindings: phy: qcom,msm8996-qmp-pcie: add example node
@ 2022-07-05 10:22       ` Johan Hovold
  0 siblings, 0 replies; 178+ messages in thread
From: Johan Hovold @ 2022-07-05 10:22 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: Johan Hovold, Vinod Koul, Rob Herring, Krzysztof Kozlowski,
	Andy Gross, Bjorn Andersson, Kishon Vijay Abraham I,
	linux-arm-msm, linux-phy, devicetree, linux-kernel

On Tue, Jul 05, 2022 at 12:10:29PM +0200, Krzysztof Kozlowski wrote:
> On 05/07/2022 11:42, Johan Hovold wrote:
> > Add an example node based on a cleaned up version of msm8996.dtsi.
> > 
> > Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
> 
> Squash it, please.

Why? It's a new addition to the schema.

Johan

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

* Re: [PATCH 06/43] dt-bindings: phy: qcom,qmp: split out msm8996-qmp-pcie-phy
  2022-07-05 10:20       ` Johan Hovold
@ 2022-07-05 10:23         ` Krzysztof Kozlowski
  -1 siblings, 0 replies; 178+ messages in thread
From: Krzysztof Kozlowski @ 2022-07-05 10:23 UTC (permalink / raw)
  To: Johan Hovold
  Cc: Johan Hovold, Vinod Koul, Rob Herring, Krzysztof Kozlowski,
	Andy Gross, Bjorn Andersson, Kishon Vijay Abraham I,
	linux-arm-msm, linux-phy, devicetree, linux-kernel

On 05/07/2022 12:20, Johan Hovold wrote:
> On Tue, Jul 05, 2022 at 12:08:36PM +0200, Krzysztof Kozlowski wrote:
>> On 05/07/2022 11:42, Johan Hovold wrote:
>>> The QMP PHY DT schema is getting unwieldy. Break out the odd-bird
>>> msm8996-qmp-pcie-phy which is the only QMP PHY that uses separate
>>> "per-lane" nodes.
>>>
>>> Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
>>> ---
>>>  .../phy/qcom,msm8996-qmp-pcie-phy.yaml        | 114 ++++++++++++++++++
>>>  .../devicetree/bindings/phy/qcom,qmp-phy.yaml |  32 -----
>>>  2 files changed, 114 insertions(+), 32 deletions(-)
>>>  create mode 100644 Documentation/devicetree/bindings/phy/qcom,msm8996-qmp-pcie-phy.yaml
>>>
>>> diff --git a/Documentation/devicetree/bindings/phy/qcom,msm8996-qmp-pcie-phy.yaml b/Documentation/devicetree/bindings/phy/qcom,msm8996-qmp-pcie-phy.yaml
>>> new file mode 100644
>>> index 000000000000..14fd86fd91ec
>>> --- /dev/null
>>> +++ b/Documentation/devicetree/bindings/phy/qcom,msm8996-qmp-pcie-phy.yaml
>>> @@ -0,0 +1,114 @@
>>> +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
>>> +
>>
>> No line break
>>
>>> +%YAML 1.2
>>> +---
>>> +$id: "http://devicetree.org/schemas/phy/qcom,msm8996-qmp-pcie-phy.yaml#"
>>> +$schema: "http://devicetree.org/meta-schemas/core.yaml#"
>>
>> Drop the quotes from two above.
> 
> This comes from the current binding. I can clean that one up first.

You now selectively copy pieces from old binding into new one. Copy
while correcting obvious issues.

> 
>>> +
>>> +title: Qualcomm QMP PHY controller (MSM8996 PCIe)
>>> +
>>> +maintainers:
>>> +  - Vinod Koul <vkoul@kernel.org>
>>> +
>>> +description:
>>> +  QMP PHY controller supports physical layer functionality for a number of
>>> +  controllers on Qualcomm chipsets, such as, PCIe, UFS, and USB.
>>> +
>>> +properties:
>>> +  compatible:
>>> +    const: qcom,msm8996-qmp-pcie-phy
>>> +
>>> +  reg:
>>> +    minItems: 1
>>> +    items:
>>> +      - description: Address and length of PHY's common serdes block.
>>> +      - description: Address and length of PHY's DP_COM control block.
>>
>> Are two reg items applicable here?
> 
> No, but see below.
> 
>>> +
>>> +  "#address-cells":
>>> +    enum: [ 1, 2 ]
>>> +
>>> +  "#size-cells":
>>> +    enum: [ 1, 2 ]
>>> +
>>> +  ranges: true
>>> +
>>> +  clocks:
>>> +    minItems: 1
>>> +    maxItems: 4
>>
>> Define clocks here, not in allOf:if:then.
> 
> To remain sane, and to help reviewers, I decided not to do changes to
> the binding while splitting it up which would only make them harder
> to review.
> 
> Hence the split followed by cleanup/tightening of constraints.

It's confusing. I look at this commit and it is not correct. How do I
know that next commits will correct it? I responded in further patches
that most of them they should be squashed with this copy.

> 
>> How about an example?
> 
> That's also a new addition to the binding and goes in a later separate
> patch.
> 



Best regards,
Krzysztof

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

* Re: [PATCH 06/43] dt-bindings: phy: qcom,qmp: split out msm8996-qmp-pcie-phy
@ 2022-07-05 10:23         ` Krzysztof Kozlowski
  0 siblings, 0 replies; 178+ messages in thread
From: Krzysztof Kozlowski @ 2022-07-05 10:23 UTC (permalink / raw)
  To: Johan Hovold
  Cc: Johan Hovold, Vinod Koul, Rob Herring, Krzysztof Kozlowski,
	Andy Gross, Bjorn Andersson, Kishon Vijay Abraham I,
	linux-arm-msm, linux-phy, devicetree, linux-kernel

On 05/07/2022 12:20, Johan Hovold wrote:
> On Tue, Jul 05, 2022 at 12:08:36PM +0200, Krzysztof Kozlowski wrote:
>> On 05/07/2022 11:42, Johan Hovold wrote:
>>> The QMP PHY DT schema is getting unwieldy. Break out the odd-bird
>>> msm8996-qmp-pcie-phy which is the only QMP PHY that uses separate
>>> "per-lane" nodes.
>>>
>>> Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
>>> ---
>>>  .../phy/qcom,msm8996-qmp-pcie-phy.yaml        | 114 ++++++++++++++++++
>>>  .../devicetree/bindings/phy/qcom,qmp-phy.yaml |  32 -----
>>>  2 files changed, 114 insertions(+), 32 deletions(-)
>>>  create mode 100644 Documentation/devicetree/bindings/phy/qcom,msm8996-qmp-pcie-phy.yaml
>>>
>>> diff --git a/Documentation/devicetree/bindings/phy/qcom,msm8996-qmp-pcie-phy.yaml b/Documentation/devicetree/bindings/phy/qcom,msm8996-qmp-pcie-phy.yaml
>>> new file mode 100644
>>> index 000000000000..14fd86fd91ec
>>> --- /dev/null
>>> +++ b/Documentation/devicetree/bindings/phy/qcom,msm8996-qmp-pcie-phy.yaml
>>> @@ -0,0 +1,114 @@
>>> +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
>>> +
>>
>> No line break
>>
>>> +%YAML 1.2
>>> +---
>>> +$id: "http://devicetree.org/schemas/phy/qcom,msm8996-qmp-pcie-phy.yaml#"
>>> +$schema: "http://devicetree.org/meta-schemas/core.yaml#"
>>
>> Drop the quotes from two above.
> 
> This comes from the current binding. I can clean that one up first.

You now selectively copy pieces from old binding into new one. Copy
while correcting obvious issues.

> 
>>> +
>>> +title: Qualcomm QMP PHY controller (MSM8996 PCIe)
>>> +
>>> +maintainers:
>>> +  - Vinod Koul <vkoul@kernel.org>
>>> +
>>> +description:
>>> +  QMP PHY controller supports physical layer functionality for a number of
>>> +  controllers on Qualcomm chipsets, such as, PCIe, UFS, and USB.
>>> +
>>> +properties:
>>> +  compatible:
>>> +    const: qcom,msm8996-qmp-pcie-phy
>>> +
>>> +  reg:
>>> +    minItems: 1
>>> +    items:
>>> +      - description: Address and length of PHY's common serdes block.
>>> +      - description: Address and length of PHY's DP_COM control block.
>>
>> Are two reg items applicable here?
> 
> No, but see below.
> 
>>> +
>>> +  "#address-cells":
>>> +    enum: [ 1, 2 ]
>>> +
>>> +  "#size-cells":
>>> +    enum: [ 1, 2 ]
>>> +
>>> +  ranges: true
>>> +
>>> +  clocks:
>>> +    minItems: 1
>>> +    maxItems: 4
>>
>> Define clocks here, not in allOf:if:then.
> 
> To remain sane, and to help reviewers, I decided not to do changes to
> the binding while splitting it up which would only make them harder
> to review.
> 
> Hence the split followed by cleanup/tightening of constraints.

It's confusing. I look at this commit and it is not correct. How do I
know that next commits will correct it? I responded in further patches
that most of them they should be squashed with this copy.

> 
>> How about an example?
> 
> That's also a new addition to the binding and goes in a later separate
> patch.
> 



Best regards,
Krzysztof

-- 
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy

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

* Re: [PATCH 07/43] dt-bindings: phy: qcom,msm8996-qmp-pcie: clean up constraints
  2022-07-05 10:21       ` Johan Hovold
@ 2022-07-05 10:23         ` Krzysztof Kozlowski
  -1 siblings, 0 replies; 178+ messages in thread
From: Krzysztof Kozlowski @ 2022-07-05 10:23 UTC (permalink / raw)
  To: Johan Hovold
  Cc: Johan Hovold, Vinod Koul, Rob Herring, Krzysztof Kozlowski,
	Andy Gross, Bjorn Andersson, Kishon Vijay Abraham I,
	linux-arm-msm, linux-phy, devicetree, linux-kernel

On 05/07/2022 12:21, Johan Hovold wrote:
> On Tue, Jul 05, 2022 at 12:09:19PM +0200, Krzysztof Kozlowski wrote:
>> On 05/07/2022 11:42, Johan Hovold wrote:
>>> Drop the compatible conditional and tighten the property constraints.
>>>
>>> Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
>>
>> Squash it with previous patch. Does not make sense to add new file and a
>> patch later change it.
> 
> I beg to differ, for the reasons I just spelled out in my previous
> reply.

So let's keep the discussion there.

Best regards,
Krzysztof

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

* Re: [PATCH 07/43] dt-bindings: phy: qcom,msm8996-qmp-pcie: clean up constraints
@ 2022-07-05 10:23         ` Krzysztof Kozlowski
  0 siblings, 0 replies; 178+ messages in thread
From: Krzysztof Kozlowski @ 2022-07-05 10:23 UTC (permalink / raw)
  To: Johan Hovold
  Cc: Johan Hovold, Vinod Koul, Rob Herring, Krzysztof Kozlowski,
	Andy Gross, Bjorn Andersson, Kishon Vijay Abraham I,
	linux-arm-msm, linux-phy, devicetree, linux-kernel

On 05/07/2022 12:21, Johan Hovold wrote:
> On Tue, Jul 05, 2022 at 12:09:19PM +0200, Krzysztof Kozlowski wrote:
>> On 05/07/2022 11:42, Johan Hovold wrote:
>>> Drop the compatible conditional and tighten the property constraints.
>>>
>>> Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
>>
>> Squash it with previous patch. Does not make sense to add new file and a
>> patch later change it.
> 
> I beg to differ, for the reasons I just spelled out in my previous
> reply.

So let's keep the discussion there.

Best regards,
Krzysztof

-- 
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy

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

* Re: [PATCH 39/43] phy: qcom-qmp-combo: drop unused lane reset
  2022-07-05  9:42   ` Johan Hovold
@ 2022-07-05 11:10     ` Dmitry Baryshkov
  -1 siblings, 0 replies; 178+ messages in thread
From: Dmitry Baryshkov @ 2022-07-05 11:10 UTC (permalink / raw)
  To: Johan Hovold, Vinod Koul, Rob Herring, Krzysztof Kozlowski
  Cc: Andy Gross, Bjorn Andersson, Kishon Vijay Abraham I,
	linux-arm-msm, linux-phy, devicetree, linux-kernel

On 05/07/2022 12:42, Johan Hovold wrote:
> Drop the unused lane reset pointer which isn't used by any combo PHY.
> 
> Signed-off-by: Johan Hovold <johan+linaro@kernel.org>

Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>

> ---
>   drivers/phy/qualcomm/phy-qcom-qmp-combo.c | 2 --
>   1 file changed, 2 deletions(-)


-- 
With best wishes
Dmitry

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

* Re: [PATCH 39/43] phy: qcom-qmp-combo: drop unused lane reset
@ 2022-07-05 11:10     ` Dmitry Baryshkov
  0 siblings, 0 replies; 178+ messages in thread
From: Dmitry Baryshkov @ 2022-07-05 11:10 UTC (permalink / raw)
  To: Johan Hovold, Vinod Koul, Rob Herring, Krzysztof Kozlowski
  Cc: Andy Gross, Bjorn Andersson, Kishon Vijay Abraham I,
	linux-arm-msm, linux-phy, devicetree, linux-kernel

On 05/07/2022 12:42, Johan Hovold wrote:
> Drop the unused lane reset pointer which isn't used by any combo PHY.
> 
> Signed-off-by: Johan Hovold <johan+linaro@kernel.org>

Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>

> ---
>   drivers/phy/qualcomm/phy-qcom-qmp-combo.c | 2 --
>   1 file changed, 2 deletions(-)


-- 
With best wishes
Dmitry

-- 
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy

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

* Re: [PATCH 38/43] phy: qcom-qmp-pcie: drop pipe clock lane suffix
  2022-07-05 10:20     ` Krzysztof Kozlowski
@ 2022-07-05 11:13       ` Dmitry Baryshkov
  -1 siblings, 0 replies; 178+ messages in thread
From: Dmitry Baryshkov @ 2022-07-05 11:13 UTC (permalink / raw)
  To: Krzysztof Kozlowski, Johan Hovold, Vinod Koul, Rob Herring,
	Krzysztof Kozlowski
  Cc: Andy Gross, Bjorn Andersson, Kishon Vijay Abraham I,
	linux-arm-msm, linux-phy, devicetree, linux-kernel

On 05/07/2022 13:20, Krzysztof Kozlowski wrote:
> On 05/07/2022 11:42, Johan Hovold wrote:
>> The pipe clock is defined in the "lane" node so there's no need to keep
>> adding a redundant lane-number suffix to the clock name.
>>
>> Drop the lane suffix from the pipe clock name, but continue supporting
>> the legacy name as a fall back.
>>
>> Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
>> ---
>>   drivers/phy/qualcomm/phy-qcom-qmp-pcie.c | 8 ++++++--
>>   1 file changed, 6 insertions(+), 2 deletions(-)
>>
>> diff --git a/drivers/phy/qualcomm/phy-qcom-qmp-pcie.c b/drivers/phy/qualcomm/phy-qcom-qmp-pcie.c
>> index 385ea3d8de08..254ad25591b9 100644
>> --- a/drivers/phy/qualcomm/phy-qcom-qmp-pcie.c
>> +++ b/drivers/phy/qualcomm/phy-qcom-qmp-pcie.c
>> @@ -2210,8 +2210,12 @@ int qcom_qmp_phy_pcie_create(struct device *dev, struct device_node *np, int id,
>>   	if (!qphy->pcs_misc)
>>   		dev_vdbg(dev, "PHY pcs_misc-reg not used\n");
>>   
>> -	snprintf(prop_name, sizeof(prop_name), "pipe%d", id);
>> -	qphy->pipe_clk = devm_get_clk_from_child(dev, np, prop_name);
>> +	qphy->pipe_clk = devm_get_clk_from_child(dev, np, "pipe");
> 
> Just get first clock and no need for handling any deprecation.

If I got it correctly, passing NULL instead of the name would do the trick.

-- 
With best wishes
Dmitry

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

* Re: [PATCH 38/43] phy: qcom-qmp-pcie: drop pipe clock lane suffix
@ 2022-07-05 11:13       ` Dmitry Baryshkov
  0 siblings, 0 replies; 178+ messages in thread
From: Dmitry Baryshkov @ 2022-07-05 11:13 UTC (permalink / raw)
  To: Krzysztof Kozlowski, Johan Hovold, Vinod Koul, Rob Herring,
	Krzysztof Kozlowski
  Cc: Andy Gross, Bjorn Andersson, Kishon Vijay Abraham I,
	linux-arm-msm, linux-phy, devicetree, linux-kernel

On 05/07/2022 13:20, Krzysztof Kozlowski wrote:
> On 05/07/2022 11:42, Johan Hovold wrote:
>> The pipe clock is defined in the "lane" node so there's no need to keep
>> adding a redundant lane-number suffix to the clock name.
>>
>> Drop the lane suffix from the pipe clock name, but continue supporting
>> the legacy name as a fall back.
>>
>> Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
>> ---
>>   drivers/phy/qualcomm/phy-qcom-qmp-pcie.c | 8 ++++++--
>>   1 file changed, 6 insertions(+), 2 deletions(-)
>>
>> diff --git a/drivers/phy/qualcomm/phy-qcom-qmp-pcie.c b/drivers/phy/qualcomm/phy-qcom-qmp-pcie.c
>> index 385ea3d8de08..254ad25591b9 100644
>> --- a/drivers/phy/qualcomm/phy-qcom-qmp-pcie.c
>> +++ b/drivers/phy/qualcomm/phy-qcom-qmp-pcie.c
>> @@ -2210,8 +2210,12 @@ int qcom_qmp_phy_pcie_create(struct device *dev, struct device_node *np, int id,
>>   	if (!qphy->pcs_misc)
>>   		dev_vdbg(dev, "PHY pcs_misc-reg not used\n");
>>   
>> -	snprintf(prop_name, sizeof(prop_name), "pipe%d", id);
>> -	qphy->pipe_clk = devm_get_clk_from_child(dev, np, prop_name);
>> +	qphy->pipe_clk = devm_get_clk_from_child(dev, np, "pipe");
> 
> Just get first clock and no need for handling any deprecation.

If I got it correctly, passing NULL instead of the name would do the trick.

-- 
With best wishes
Dmitry

-- 
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy

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

* Re: [PATCH 09/43] dt-bindings: phy: qcom,msm8996-qmp-pcie: add example node
  2022-07-05 10:22       ` Johan Hovold
@ 2022-07-05 11:32         ` Krzysztof Kozlowski
  -1 siblings, 0 replies; 178+ messages in thread
From: Krzysztof Kozlowski @ 2022-07-05 11:32 UTC (permalink / raw)
  To: Johan Hovold
  Cc: Johan Hovold, Vinod Koul, Rob Herring, Krzysztof Kozlowski,
	Andy Gross, Bjorn Andersson, Kishon Vijay Abraham I,
	linux-arm-msm, linux-phy, devicetree, linux-kernel

On 05/07/2022 12:22, Johan Hovold wrote:
> On Tue, Jul 05, 2022 at 12:10:29PM +0200, Krzysztof Kozlowski wrote:
>> On 05/07/2022 11:42, Johan Hovold wrote:
>>> Add an example node based on a cleaned up version of msm8996.dtsi.
>>>
>>> Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
>>
>> Squash it, please.
> 
> Why? It's a new addition to the schema.

Because it is not really new. When you add new bindings or convert
existing ones (without example), it is expected that example is within
that commit. You do here the same - add entirely new file. Old file had
example and the bindings. You now split some pieces, convert it, so new
file is also expected to come with the bindings.

The same as there is no point to make half-TXT-YAML conversion, there is
no point in half-split of existing bindings. Either this split is
correct and complete, or it's not a finished commit and we do not commit
half-commits.

Best regards,
Krzysztof

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

* Re: [PATCH 09/43] dt-bindings: phy: qcom,msm8996-qmp-pcie: add example node
@ 2022-07-05 11:32         ` Krzysztof Kozlowski
  0 siblings, 0 replies; 178+ messages in thread
From: Krzysztof Kozlowski @ 2022-07-05 11:32 UTC (permalink / raw)
  To: Johan Hovold
  Cc: Johan Hovold, Vinod Koul, Rob Herring, Krzysztof Kozlowski,
	Andy Gross, Bjorn Andersson, Kishon Vijay Abraham I,
	linux-arm-msm, linux-phy, devicetree, linux-kernel

On 05/07/2022 12:22, Johan Hovold wrote:
> On Tue, Jul 05, 2022 at 12:10:29PM +0200, Krzysztof Kozlowski wrote:
>> On 05/07/2022 11:42, Johan Hovold wrote:
>>> Add an example node based on a cleaned up version of msm8996.dtsi.
>>>
>>> Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
>>
>> Squash it, please.
> 
> Why? It's a new addition to the schema.

Because it is not really new. When you add new bindings or convert
existing ones (without example), it is expected that example is within
that commit. You do here the same - add entirely new file. Old file had
example and the bindings. You now split some pieces, convert it, so new
file is also expected to come with the bindings.

The same as there is no point to make half-TXT-YAML conversion, there is
no point in half-split of existing bindings. Either this split is
correct and complete, or it's not a finished commit and we do not commit
half-commits.

Best regards,
Krzysztof

-- 
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy

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

* Re: [PATCH 16/43] dt-bindings: phy: qcom,qmp-pcie: drop unused vddp-ref-clk supply
  2022-07-05 10:16     ` Krzysztof Kozlowski
@ 2022-07-05 11:46       ` Johan Hovold
  -1 siblings, 0 replies; 178+ messages in thread
From: Johan Hovold @ 2022-07-05 11:46 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: Johan Hovold, Vinod Koul, Rob Herring, Krzysztof Kozlowski,
	Andy Gross, Bjorn Andersson, Kishon Vijay Abraham I,
	linux-arm-msm, linux-phy, devicetree, linux-kernel

On Tue, Jul 05, 2022 at 12:16:34PM +0200, Krzysztof Kozlowski wrote:
> On 05/07/2022 11:42, Johan Hovold wrote:
> > Only UFS PHY nodes in mainline have a vddp-ref-clk supply. Drop it from
> > the PCIe PHY binding.
> > 
> 
> That's not really good reason. Either the hardware uses ref-clk supply
> or not. Now it looks like you copied everything from common schema and
> clean things up. That's not how it should be organize.

Yes, and I've been pretty clear that that's how I'm going about to
disentangle the current binding.
 
> It's okay to copy existing bindings which are applicable and then in
> separate patch deprecate things or remove pieces which are not correct.
> But all this in assumption that the first copy already selected only
> applicable parts.

But how would you be able to tell what parts I left out from the
original copy unless I first do the split and then explicitly remove
things that were presumably *never* applicable and just happened to be
added because all bindings where combined in one large mess of a schema?

Johan

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

* Re: [PATCH 16/43] dt-bindings: phy: qcom,qmp-pcie: drop unused vddp-ref-clk supply
@ 2022-07-05 11:46       ` Johan Hovold
  0 siblings, 0 replies; 178+ messages in thread
From: Johan Hovold @ 2022-07-05 11:46 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: Johan Hovold, Vinod Koul, Rob Herring, Krzysztof Kozlowski,
	Andy Gross, Bjorn Andersson, Kishon Vijay Abraham I,
	linux-arm-msm, linux-phy, devicetree, linux-kernel

On Tue, Jul 05, 2022 at 12:16:34PM +0200, Krzysztof Kozlowski wrote:
> On 05/07/2022 11:42, Johan Hovold wrote:
> > Only UFS PHY nodes in mainline have a vddp-ref-clk supply. Drop it from
> > the PCIe PHY binding.
> > 
> 
> That's not really good reason. Either the hardware uses ref-clk supply
> or not. Now it looks like you copied everything from common schema and
> clean things up. That's not how it should be organize.

Yes, and I've been pretty clear that that's how I'm going about to
disentangle the current binding.
 
> It's okay to copy existing bindings which are applicable and then in
> separate patch deprecate things or remove pieces which are not correct.
> But all this in assumption that the first copy already selected only
> applicable parts.

But how would you be able to tell what parts I left out from the
original copy unless I first do the split and then explicitly remove
things that were presumably *never* applicable and just happened to be
added because all bindings where combined in one large mess of a schema?

Johan

-- 
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy

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

* Re: [PATCH 17/43] dt-bindings: phy: qcom,qmp-pcie: add missing child node schema
  2022-07-05 10:18     ` Krzysztof Kozlowski
@ 2022-07-05 11:51       ` Johan Hovold
  -1 siblings, 0 replies; 178+ messages in thread
From: Johan Hovold @ 2022-07-05 11:51 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: Johan Hovold, Vinod Koul, Rob Herring, Krzysztof Kozlowski,
	Andy Gross, Bjorn Andersson, Kishon Vijay Abraham I,
	linux-arm-msm, linux-phy, devicetree, linux-kernel

On Tue, Jul 05, 2022 at 12:18:37PM +0200, Krzysztof Kozlowski wrote:
> On 05/07/2022 11:42, Johan Hovold wrote:
> > Add the missing the description of the PHY-provider child node which was
> > ignored when converting to DT schema.
> > 
> > Also fix up the incorrect description that claimed that one child node
> > per lane was required.
> > 
> > Fixes: ccf51c1cedfd ("dt-bindings: phy: qcom,qmp: Convert QMP PHY bindings to yaml")
> > Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
> > ---
> >  .../bindings/phy/qcom,qmp-pcie-phy.yaml       | 88 ++++++++++++++++++-
> >  1 file changed, 85 insertions(+), 3 deletions(-)
> > 
> > diff --git a/Documentation/devicetree/bindings/phy/qcom,qmp-pcie-phy.yaml b/Documentation/devicetree/bindings/phy/qcom,qmp-pcie-phy.yaml
> > index ff1577f68a00..5a1ebf874559 100644
> > --- a/Documentation/devicetree/bindings/phy/qcom,qmp-pcie-phy.yaml
> > +++ b/Documentation/devicetree/bindings/phy/qcom,qmp-pcie-phy.yaml
> > @@ -69,9 +69,37 @@ properties:

> > +  - if:
> > +      properties:
> > +        compatible:
> > +          contains:
> > +            enum:
> > +              - qcom,sm8250-qmp-gen3x2-pcie-phy
> > +              - qcom,sm8250-qmp-modem-pcie-phy
> > +              - qcom,sm8450-qmp-gen4x2-pcie-phy
> > +    then:
> > +      patternProperties:
> > +        "^phy@[0-9a-f]+$":
> > +          properties:
> > +            reg:
> > +              items:
> > +                - description: TX lane 1
> > +                - description: RX lane 1
> > +                - description: PCS
> > +                - description: TX lane 2
> > +                - description: RX lane 2
> > +                - description: PCS_MISC
> > +    else:
> > +      patternProperties:
> > +        "^phy@[0-9a-f]+$":
> > +          properties:
> > +            reg:
> > +              minItems: 3
> > +              maxItems: 4
> > +              items:
> > +                - description: TX
> > +                - description: RX
> > +                - description: PCS
> > +                - description: PCS_MISC
> > +      if:
> 
> Do not include if within other if. Just split the entire section to its
> own if:.

That sounds like it would just obfuscate the logic. The else clause
specified 3-4 registers and the nested if determines which compatibles
use which by further narrowing the range.

If you move it out to the else: this would be really hard understand and
verify.

> > +        properties:
> > +          compatible:
> > +            contains:
> > +              enum:
> > +                - qcom,ipq6018-qmp-pcie-phy
> > +                - qcom,ipq8074-qmp-pcie-phy
> > +                - qcom,msm8998-qmp-pcie-phy
> > +                - qcom,sdm845-qhp-pcie-phy
> > +      then:
> > +        patternProperties:
> > +          "^phy@[0-9a-f]+$":
> > +            properties:
> > +              reg:
> > +                maxItems: 3
> > +      else:
> > +        patternProperties:
> > +          "^phy@[0-9a-f]+$":
> > +            properties:
> > +              reg:
> > +                minItems: 4

Johan

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

* Re: [PATCH 17/43] dt-bindings: phy: qcom,qmp-pcie: add missing child node schema
@ 2022-07-05 11:51       ` Johan Hovold
  0 siblings, 0 replies; 178+ messages in thread
From: Johan Hovold @ 2022-07-05 11:51 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: Johan Hovold, Vinod Koul, Rob Herring, Krzysztof Kozlowski,
	Andy Gross, Bjorn Andersson, Kishon Vijay Abraham I,
	linux-arm-msm, linux-phy, devicetree, linux-kernel

On Tue, Jul 05, 2022 at 12:18:37PM +0200, Krzysztof Kozlowski wrote:
> On 05/07/2022 11:42, Johan Hovold wrote:
> > Add the missing the description of the PHY-provider child node which was
> > ignored when converting to DT schema.
> > 
> > Also fix up the incorrect description that claimed that one child node
> > per lane was required.
> > 
> > Fixes: ccf51c1cedfd ("dt-bindings: phy: qcom,qmp: Convert QMP PHY bindings to yaml")
> > Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
> > ---
> >  .../bindings/phy/qcom,qmp-pcie-phy.yaml       | 88 ++++++++++++++++++-
> >  1 file changed, 85 insertions(+), 3 deletions(-)
> > 
> > diff --git a/Documentation/devicetree/bindings/phy/qcom,qmp-pcie-phy.yaml b/Documentation/devicetree/bindings/phy/qcom,qmp-pcie-phy.yaml
> > index ff1577f68a00..5a1ebf874559 100644
> > --- a/Documentation/devicetree/bindings/phy/qcom,qmp-pcie-phy.yaml
> > +++ b/Documentation/devicetree/bindings/phy/qcom,qmp-pcie-phy.yaml
> > @@ -69,9 +69,37 @@ properties:

> > +  - if:
> > +      properties:
> > +        compatible:
> > +          contains:
> > +            enum:
> > +              - qcom,sm8250-qmp-gen3x2-pcie-phy
> > +              - qcom,sm8250-qmp-modem-pcie-phy
> > +              - qcom,sm8450-qmp-gen4x2-pcie-phy
> > +    then:
> > +      patternProperties:
> > +        "^phy@[0-9a-f]+$":
> > +          properties:
> > +            reg:
> > +              items:
> > +                - description: TX lane 1
> > +                - description: RX lane 1
> > +                - description: PCS
> > +                - description: TX lane 2
> > +                - description: RX lane 2
> > +                - description: PCS_MISC
> > +    else:
> > +      patternProperties:
> > +        "^phy@[0-9a-f]+$":
> > +          properties:
> > +            reg:
> > +              minItems: 3
> > +              maxItems: 4
> > +              items:
> > +                - description: TX
> > +                - description: RX
> > +                - description: PCS
> > +                - description: PCS_MISC
> > +      if:
> 
> Do not include if within other if. Just split the entire section to its
> own if:.

That sounds like it would just obfuscate the logic. The else clause
specified 3-4 registers and the nested if determines which compatibles
use which by further narrowing the range.

If you move it out to the else: this would be really hard understand and
verify.

> > +        properties:
> > +          compatible:
> > +            contains:
> > +              enum:
> > +                - qcom,ipq6018-qmp-pcie-phy
> > +                - qcom,ipq8074-qmp-pcie-phy
> > +                - qcom,msm8998-qmp-pcie-phy
> > +                - qcom,sdm845-qhp-pcie-phy
> > +      then:
> > +        patternProperties:
> > +          "^phy@[0-9a-f]+$":
> > +            properties:
> > +              reg:
> > +                maxItems: 3
> > +      else:
> > +        patternProperties:
> > +          "^phy@[0-9a-f]+$":
> > +            properties:
> > +              reg:
> > +                minItems: 4

Johan

-- 
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy

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

* Re: [PATCH 17/43] dt-bindings: phy: qcom,qmp-pcie: add missing child node schema
  2022-07-05 11:51       ` Johan Hovold
@ 2022-07-05 11:56         ` Krzysztof Kozlowski
  -1 siblings, 0 replies; 178+ messages in thread
From: Krzysztof Kozlowski @ 2022-07-05 11:56 UTC (permalink / raw)
  To: Johan Hovold
  Cc: Johan Hovold, Vinod Koul, Rob Herring, Krzysztof Kozlowski,
	Andy Gross, Bjorn Andersson, Kishon Vijay Abraham I,
	linux-arm-msm, linux-phy, devicetree, linux-kernel

On 05/07/2022 13:51, Johan Hovold wrote:
> On Tue, Jul 05, 2022 at 12:18:37PM +0200, Krzysztof Kozlowski wrote:
>> On 05/07/2022 11:42, Johan Hovold wrote:
>>> Add the missing the description of the PHY-provider child node which was
>>> ignored when converting to DT schema.
>>>
>>> Also fix up the incorrect description that claimed that one child node
>>> per lane was required.
>>>
>>> Fixes: ccf51c1cedfd ("dt-bindings: phy: qcom,qmp: Convert QMP PHY bindings to yaml")
>>> Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
>>> ---
>>>  .../bindings/phy/qcom,qmp-pcie-phy.yaml       | 88 ++++++++++++++++++-
>>>  1 file changed, 85 insertions(+), 3 deletions(-)
>>>
>>> diff --git a/Documentation/devicetree/bindings/phy/qcom,qmp-pcie-phy.yaml b/Documentation/devicetree/bindings/phy/qcom,qmp-pcie-phy.yaml
>>> index ff1577f68a00..5a1ebf874559 100644
>>> --- a/Documentation/devicetree/bindings/phy/qcom,qmp-pcie-phy.yaml
>>> +++ b/Documentation/devicetree/bindings/phy/qcom,qmp-pcie-phy.yaml
>>> @@ -69,9 +69,37 @@ properties:
> 
>>> +  - if:
>>> +      properties:
>>> +        compatible:
>>> +          contains:
>>> +            enum:
>>> +              - qcom,sm8250-qmp-gen3x2-pcie-phy
>>> +              - qcom,sm8250-qmp-modem-pcie-phy
>>> +              - qcom,sm8450-qmp-gen4x2-pcie-phy
>>> +    then:
>>> +      patternProperties:
>>> +        "^phy@[0-9a-f]+$":
>>> +          properties:
>>> +            reg:
>>> +              items:
>>> +                - description: TX lane 1
>>> +                - description: RX lane 1
>>> +                - description: PCS
>>> +                - description: TX lane 2
>>> +                - description: RX lane 2
>>> +                - description: PCS_MISC
>>> +    else:
>>> +      patternProperties:
>>> +        "^phy@[0-9a-f]+$":
>>> +          properties:
>>> +            reg:
>>> +              minItems: 3
>>> +              maxItems: 4
>>> +              items:
>>> +                - description: TX
>>> +                - description: RX
>>> +                - description: PCS
>>> +                - description: PCS_MISC
>>> +      if:
>>
>> Do not include if within other if. Just split the entire section to its
>> own if:.
> 
> That sounds like it would just obfuscate the logic. The else clause
> specified 3-4 registers and the nested if determines which compatibles
> use which by further narrowing the range.
> 
> If you move it out to the else: this would be really hard understand and
> verify.

Every bindings are expected to do that way and most of them are doing
it: define broad constraints in properties:, then define strict
constraints per each variant. Easy to follow code. This binding is not
particularly special to make it different than other ones. Doing
semi-strict constraints in if: and then additional constrain in nested
if: is not easy to understand and verify.


Best regards,
Krzysztof

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

* Re: [PATCH 17/43] dt-bindings: phy: qcom,qmp-pcie: add missing child node schema
@ 2022-07-05 11:56         ` Krzysztof Kozlowski
  0 siblings, 0 replies; 178+ messages in thread
From: Krzysztof Kozlowski @ 2022-07-05 11:56 UTC (permalink / raw)
  To: Johan Hovold
  Cc: Johan Hovold, Vinod Koul, Rob Herring, Krzysztof Kozlowski,
	Andy Gross, Bjorn Andersson, Kishon Vijay Abraham I,
	linux-arm-msm, linux-phy, devicetree, linux-kernel

On 05/07/2022 13:51, Johan Hovold wrote:
> On Tue, Jul 05, 2022 at 12:18:37PM +0200, Krzysztof Kozlowski wrote:
>> On 05/07/2022 11:42, Johan Hovold wrote:
>>> Add the missing the description of the PHY-provider child node which was
>>> ignored when converting to DT schema.
>>>
>>> Also fix up the incorrect description that claimed that one child node
>>> per lane was required.
>>>
>>> Fixes: ccf51c1cedfd ("dt-bindings: phy: qcom,qmp: Convert QMP PHY bindings to yaml")
>>> Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
>>> ---
>>>  .../bindings/phy/qcom,qmp-pcie-phy.yaml       | 88 ++++++++++++++++++-
>>>  1 file changed, 85 insertions(+), 3 deletions(-)
>>>
>>> diff --git a/Documentation/devicetree/bindings/phy/qcom,qmp-pcie-phy.yaml b/Documentation/devicetree/bindings/phy/qcom,qmp-pcie-phy.yaml
>>> index ff1577f68a00..5a1ebf874559 100644
>>> --- a/Documentation/devicetree/bindings/phy/qcom,qmp-pcie-phy.yaml
>>> +++ b/Documentation/devicetree/bindings/phy/qcom,qmp-pcie-phy.yaml
>>> @@ -69,9 +69,37 @@ properties:
> 
>>> +  - if:
>>> +      properties:
>>> +        compatible:
>>> +          contains:
>>> +            enum:
>>> +              - qcom,sm8250-qmp-gen3x2-pcie-phy
>>> +              - qcom,sm8250-qmp-modem-pcie-phy
>>> +              - qcom,sm8450-qmp-gen4x2-pcie-phy
>>> +    then:
>>> +      patternProperties:
>>> +        "^phy@[0-9a-f]+$":
>>> +          properties:
>>> +            reg:
>>> +              items:
>>> +                - description: TX lane 1
>>> +                - description: RX lane 1
>>> +                - description: PCS
>>> +                - description: TX lane 2
>>> +                - description: RX lane 2
>>> +                - description: PCS_MISC
>>> +    else:
>>> +      patternProperties:
>>> +        "^phy@[0-9a-f]+$":
>>> +          properties:
>>> +            reg:
>>> +              minItems: 3
>>> +              maxItems: 4
>>> +              items:
>>> +                - description: TX
>>> +                - description: RX
>>> +                - description: PCS
>>> +                - description: PCS_MISC
>>> +      if:
>>
>> Do not include if within other if. Just split the entire section to its
>> own if:.
> 
> That sounds like it would just obfuscate the logic. The else clause
> specified 3-4 registers and the nested if determines which compatibles
> use which by further narrowing the range.
> 
> If you move it out to the else: this would be really hard understand and
> verify.

Every bindings are expected to do that way and most of them are doing
it: define broad constraints in properties:, then define strict
constraints per each variant. Easy to follow code. This binding is not
particularly special to make it different than other ones. Doing
semi-strict constraints in if: and then additional constrain in nested
if: is not easy to understand and verify.


Best regards,
Krzysztof

-- 
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy

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

* Re: [PATCH 38/43] phy: qcom-qmp-pcie: drop pipe clock lane suffix
  2022-07-05 11:13       ` Dmitry Baryshkov
@ 2022-07-05 11:58         ` Johan Hovold
  -1 siblings, 0 replies; 178+ messages in thread
From: Johan Hovold @ 2022-07-05 11:58 UTC (permalink / raw)
  To: Dmitry Baryshkov
  Cc: Krzysztof Kozlowski, Johan Hovold, Vinod Koul, Rob Herring,
	Krzysztof Kozlowski, Andy Gross, Bjorn Andersson,
	Kishon Vijay Abraham I, linux-arm-msm, linux-phy, devicetree,
	linux-kernel

On Tue, Jul 05, 2022 at 02:13:04PM +0300, Dmitry Baryshkov wrote:
> On 05/07/2022 13:20, Krzysztof Kozlowski wrote:
> > On 05/07/2022 11:42, Johan Hovold wrote:
> >> The pipe clock is defined in the "lane" node so there's no need to keep
> >> adding a redundant lane-number suffix to the clock name.
> >>
> >> Drop the lane suffix from the pipe clock name, but continue supporting
> >> the legacy name as a fall back.
> >>
> >> Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
> >> ---
> >>   drivers/phy/qualcomm/phy-qcom-qmp-pcie.c | 8 ++++++--
> >>   1 file changed, 6 insertions(+), 2 deletions(-)
> >>
> >> diff --git a/drivers/phy/qualcomm/phy-qcom-qmp-pcie.c b/drivers/phy/qualcomm/phy-qcom-qmp-pcie.c
> >> index 385ea3d8de08..254ad25591b9 100644
> >> --- a/drivers/phy/qualcomm/phy-qcom-qmp-pcie.c
> >> +++ b/drivers/phy/qualcomm/phy-qcom-qmp-pcie.c
> >> @@ -2210,8 +2210,12 @@ int qcom_qmp_phy_pcie_create(struct device *dev, struct device_node *np, int id,
> >>   	if (!qphy->pcs_misc)
> >>   		dev_vdbg(dev, "PHY pcs_misc-reg not used\n");
> >>   
> >> -	snprintf(prop_name, sizeof(prop_name), "pipe%d", id);
> >> -	qphy->pipe_clk = devm_get_clk_from_child(dev, np, prop_name);
> >> +	qphy->pipe_clk = devm_get_clk_from_child(dev, np, "pipe");
> > 
> > Just get first clock and no need for handling any deprecation.

I still want to deprecate the current name as it makes no sense and
risks introducing inconsistencies when adding new resources (e.g. should
they also get a bogus suffix).

> If I got it correctly, passing NULL instead of the name would do the trick.

Ah, thanks for spotting that. I feared this would require adding a host
of new devres wrappers otherwise.

Would still be needed for the upcoming second pipediv2 clock though...

Johan

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

* Re: [PATCH 38/43] phy: qcom-qmp-pcie: drop pipe clock lane suffix
@ 2022-07-05 11:58         ` Johan Hovold
  0 siblings, 0 replies; 178+ messages in thread
From: Johan Hovold @ 2022-07-05 11:58 UTC (permalink / raw)
  To: Dmitry Baryshkov
  Cc: Krzysztof Kozlowski, Johan Hovold, Vinod Koul, Rob Herring,
	Krzysztof Kozlowski, Andy Gross, Bjorn Andersson,
	Kishon Vijay Abraham I, linux-arm-msm, linux-phy, devicetree,
	linux-kernel

On Tue, Jul 05, 2022 at 02:13:04PM +0300, Dmitry Baryshkov wrote:
> On 05/07/2022 13:20, Krzysztof Kozlowski wrote:
> > On 05/07/2022 11:42, Johan Hovold wrote:
> >> The pipe clock is defined in the "lane" node so there's no need to keep
> >> adding a redundant lane-number suffix to the clock name.
> >>
> >> Drop the lane suffix from the pipe clock name, but continue supporting
> >> the legacy name as a fall back.
> >>
> >> Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
> >> ---
> >>   drivers/phy/qualcomm/phy-qcom-qmp-pcie.c | 8 ++++++--
> >>   1 file changed, 6 insertions(+), 2 deletions(-)
> >>
> >> diff --git a/drivers/phy/qualcomm/phy-qcom-qmp-pcie.c b/drivers/phy/qualcomm/phy-qcom-qmp-pcie.c
> >> index 385ea3d8de08..254ad25591b9 100644
> >> --- a/drivers/phy/qualcomm/phy-qcom-qmp-pcie.c
> >> +++ b/drivers/phy/qualcomm/phy-qcom-qmp-pcie.c
> >> @@ -2210,8 +2210,12 @@ int qcom_qmp_phy_pcie_create(struct device *dev, struct device_node *np, int id,
> >>   	if (!qphy->pcs_misc)
> >>   		dev_vdbg(dev, "PHY pcs_misc-reg not used\n");
> >>   
> >> -	snprintf(prop_name, sizeof(prop_name), "pipe%d", id);
> >> -	qphy->pipe_clk = devm_get_clk_from_child(dev, np, prop_name);
> >> +	qphy->pipe_clk = devm_get_clk_from_child(dev, np, "pipe");
> > 
> > Just get first clock and no need for handling any deprecation.

I still want to deprecate the current name as it makes no sense and
risks introducing inconsistencies when adding new resources (e.g. should
they also get a bogus suffix).

> If I got it correctly, passing NULL instead of the name would do the trick.

Ah, thanks for spotting that. I feared this would require adding a host
of new devres wrappers otherwise.

Would still be needed for the upcoming second pipediv2 clock though...

Johan

-- 
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy

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

* Re: [PATCH 16/43] dt-bindings: phy: qcom,qmp-pcie: drop unused vddp-ref-clk supply
  2022-07-05 11:46       ` Johan Hovold
@ 2022-07-05 11:59         ` Krzysztof Kozlowski
  -1 siblings, 0 replies; 178+ messages in thread
From: Krzysztof Kozlowski @ 2022-07-05 11:59 UTC (permalink / raw)
  To: Johan Hovold
  Cc: Johan Hovold, Vinod Koul, Rob Herring, Krzysztof Kozlowski,
	Andy Gross, Bjorn Andersson, Kishon Vijay Abraham I,
	linux-arm-msm, linux-phy, devicetree, linux-kernel

On 05/07/2022 13:46, Johan Hovold wrote:
>> It's okay to copy existing bindings which are applicable and then in
>> separate patch deprecate things or remove pieces which are not correct.
>> But all this in assumption that the first copy already selected only
>> applicable parts.
> 
> But how would you be able to tell what parts I left out from the
> original copy 

They are obvious and immediately visible. I see old bindings and new
bindings - no troubles to compare. I review new bindings - everything in
place.

I don't want to review old code, inapplicable code. The patch I am
reviewing (the one doing the split) must bring correct bindings, except
these few differences like deprecated stuff.

> unless I first do the split and then explicitly remove
> things that were presumably *never* applicable and just happened to be
> added because all bindings where combined in one large mess of a schema?

Best regards,
Krzysztof

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

* Re: [PATCH 16/43] dt-bindings: phy: qcom,qmp-pcie: drop unused vddp-ref-clk supply
@ 2022-07-05 11:59         ` Krzysztof Kozlowski
  0 siblings, 0 replies; 178+ messages in thread
From: Krzysztof Kozlowski @ 2022-07-05 11:59 UTC (permalink / raw)
  To: Johan Hovold
  Cc: Johan Hovold, Vinod Koul, Rob Herring, Krzysztof Kozlowski,
	Andy Gross, Bjorn Andersson, Kishon Vijay Abraham I,
	linux-arm-msm, linux-phy, devicetree, linux-kernel

On 05/07/2022 13:46, Johan Hovold wrote:
>> It's okay to copy existing bindings which are applicable and then in
>> separate patch deprecate things or remove pieces which are not correct.
>> But all this in assumption that the first copy already selected only
>> applicable parts.
> 
> But how would you be able to tell what parts I left out from the
> original copy 

They are obvious and immediately visible. I see old bindings and new
bindings - no troubles to compare. I review new bindings - everything in
place.

I don't want to review old code, inapplicable code. The patch I am
reviewing (the one doing the split) must bring correct bindings, except
these few differences like deprecated stuff.

> unless I first do the split and then explicitly remove
> things that were presumably *never* applicable and just happened to be
> added because all bindings where combined in one large mess of a schema?

Best regards,
Krzysztof

-- 
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy

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

* Re: [PATCH 09/43] dt-bindings: phy: qcom,msm8996-qmp-pcie: add example node
  2022-07-05 11:32         ` Krzysztof Kozlowski
@ 2022-07-05 12:00           ` Johan Hovold
  -1 siblings, 0 replies; 178+ messages in thread
From: Johan Hovold @ 2022-07-05 12:00 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: Johan Hovold, Vinod Koul, Rob Herring, Krzysztof Kozlowski,
	Andy Gross, Bjorn Andersson, Kishon Vijay Abraham I,
	linux-arm-msm, linux-phy, devicetree, linux-kernel

On Tue, Jul 05, 2022 at 01:32:30PM +0200, Krzysztof Kozlowski wrote:
> On 05/07/2022 12:22, Johan Hovold wrote:
> > On Tue, Jul 05, 2022 at 12:10:29PM +0200, Krzysztof Kozlowski wrote:
> >> On 05/07/2022 11:42, Johan Hovold wrote:
> >>> Add an example node based on a cleaned up version of msm8996.dtsi.
> >>>
> >>> Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
> >>
> >> Squash it, please.
> > 
> > Why? It's a new addition to the schema.
> 
> Because it is not really new. When you add new bindings or convert
> existing ones (without example), it is expected that example is within
> that commit. You do here the same - add entirely new file. Old file had
> example and the bindings. You now split some pieces, convert it, so new
> file is also expected to come with the bindings.
> 
> The same as there is no point to make half-TXT-YAML conversion, there is
> no point in half-split of existing bindings. Either this split is
> correct and complete, or it's not a finished commit and we do not commit
> half-commits.

Fair enough, I'll squash the examples in.

Thanks for the quick review.

Johan

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

* Re: [PATCH 09/43] dt-bindings: phy: qcom,msm8996-qmp-pcie: add example node
@ 2022-07-05 12:00           ` Johan Hovold
  0 siblings, 0 replies; 178+ messages in thread
From: Johan Hovold @ 2022-07-05 12:00 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: Johan Hovold, Vinod Koul, Rob Herring, Krzysztof Kozlowski,
	Andy Gross, Bjorn Andersson, Kishon Vijay Abraham I,
	linux-arm-msm, linux-phy, devicetree, linux-kernel

On Tue, Jul 05, 2022 at 01:32:30PM +0200, Krzysztof Kozlowski wrote:
> On 05/07/2022 12:22, Johan Hovold wrote:
> > On Tue, Jul 05, 2022 at 12:10:29PM +0200, Krzysztof Kozlowski wrote:
> >> On 05/07/2022 11:42, Johan Hovold wrote:
> >>> Add an example node based on a cleaned up version of msm8996.dtsi.
> >>>
> >>> Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
> >>
> >> Squash it, please.
> > 
> > Why? It's a new addition to the schema.
> 
> Because it is not really new. When you add new bindings or convert
> existing ones (without example), it is expected that example is within
> that commit. You do here the same - add entirely new file. Old file had
> example and the bindings. You now split some pieces, convert it, so new
> file is also expected to come with the bindings.
> 
> The same as there is no point to make half-TXT-YAML conversion, there is
> no point in half-split of existing bindings. Either this split is
> correct and complete, or it's not a finished commit and we do not commit
> half-commits.

Fair enough, I'll squash the examples in.

Thanks for the quick review.

Johan

-- 
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy

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

* Re: [PATCH 38/43] phy: qcom-qmp-pcie: drop pipe clock lane suffix
  2022-07-05 11:58         ` Johan Hovold
@ 2022-07-05 12:06           ` Krzysztof Kozlowski
  -1 siblings, 0 replies; 178+ messages in thread
From: Krzysztof Kozlowski @ 2022-07-05 12:06 UTC (permalink / raw)
  To: Johan Hovold, Dmitry Baryshkov
  Cc: Johan Hovold, Vinod Koul, Rob Herring, Krzysztof Kozlowski,
	Andy Gross, Bjorn Andersson, Kishon Vijay Abraham I,
	linux-arm-msm, linux-phy, devicetree, linux-kernel

On 05/07/2022 13:58, Johan Hovold wrote:
> On Tue, Jul 05, 2022 at 02:13:04PM +0300, Dmitry Baryshkov wrote:
>> On 05/07/2022 13:20, Krzysztof Kozlowski wrote:
>>> On 05/07/2022 11:42, Johan Hovold wrote:
>>>> The pipe clock is defined in the "lane" node so there's no need to keep
>>>> adding a redundant lane-number suffix to the clock name.
>>>>
>>>> Drop the lane suffix from the pipe clock name, but continue supporting
>>>> the legacy name as a fall back.
>>>>
>>>> Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
>>>> ---
>>>>   drivers/phy/qualcomm/phy-qcom-qmp-pcie.c | 8 ++++++--
>>>>   1 file changed, 6 insertions(+), 2 deletions(-)
>>>>
>>>> diff --git a/drivers/phy/qualcomm/phy-qcom-qmp-pcie.c b/drivers/phy/qualcomm/phy-qcom-qmp-pcie.c
>>>> index 385ea3d8de08..254ad25591b9 100644
>>>> --- a/drivers/phy/qualcomm/phy-qcom-qmp-pcie.c
>>>> +++ b/drivers/phy/qualcomm/phy-qcom-qmp-pcie.c
>>>> @@ -2210,8 +2210,12 @@ int qcom_qmp_phy_pcie_create(struct device *dev, struct device_node *np, int id,
>>>>   	if (!qphy->pcs_misc)
>>>>   		dev_vdbg(dev, "PHY pcs_misc-reg not used\n");
>>>>   
>>>> -	snprintf(prop_name, sizeof(prop_name), "pipe%d", id);
>>>> -	qphy->pipe_clk = devm_get_clk_from_child(dev, np, prop_name);
>>>> +	qphy->pipe_clk = devm_get_clk_from_child(dev, np, "pipe");
>>>
>>> Just get first clock and no need for handling any deprecation.
> 
> I still want to deprecate the current name as it makes no sense and
> risks introducing inconsistencies when adding new resources (e.g. should
> they also get a bogus suffix).

And it was suggested to you to deprecate entire property... There is no
need to handle anything in the driver.

> 
>> If I got it correctly, passing NULL instead of the name would do the trick.
> 
> Ah, thanks for spotting that. I feared this would require adding a host
> of new devres wrappers otherwise.
> 
> Would still be needed for the upcoming second pipediv2 clock though...


Best regards,
Krzysztof

-- 
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy

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

* Re: [PATCH 38/43] phy: qcom-qmp-pcie: drop pipe clock lane suffix
@ 2022-07-05 12:06           ` Krzysztof Kozlowski
  0 siblings, 0 replies; 178+ messages in thread
From: Krzysztof Kozlowski @ 2022-07-05 12:06 UTC (permalink / raw)
  To: Johan Hovold, Dmitry Baryshkov
  Cc: Johan Hovold, Vinod Koul, Rob Herring, Krzysztof Kozlowski,
	Andy Gross, Bjorn Andersson, Kishon Vijay Abraham I,
	linux-arm-msm, linux-phy, devicetree, linux-kernel

On 05/07/2022 13:58, Johan Hovold wrote:
> On Tue, Jul 05, 2022 at 02:13:04PM +0300, Dmitry Baryshkov wrote:
>> On 05/07/2022 13:20, Krzysztof Kozlowski wrote:
>>> On 05/07/2022 11:42, Johan Hovold wrote:
>>>> The pipe clock is defined in the "lane" node so there's no need to keep
>>>> adding a redundant lane-number suffix to the clock name.
>>>>
>>>> Drop the lane suffix from the pipe clock name, but continue supporting
>>>> the legacy name as a fall back.
>>>>
>>>> Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
>>>> ---
>>>>   drivers/phy/qualcomm/phy-qcom-qmp-pcie.c | 8 ++++++--
>>>>   1 file changed, 6 insertions(+), 2 deletions(-)
>>>>
>>>> diff --git a/drivers/phy/qualcomm/phy-qcom-qmp-pcie.c b/drivers/phy/qualcomm/phy-qcom-qmp-pcie.c
>>>> index 385ea3d8de08..254ad25591b9 100644
>>>> --- a/drivers/phy/qualcomm/phy-qcom-qmp-pcie.c
>>>> +++ b/drivers/phy/qualcomm/phy-qcom-qmp-pcie.c
>>>> @@ -2210,8 +2210,12 @@ int qcom_qmp_phy_pcie_create(struct device *dev, struct device_node *np, int id,
>>>>   	if (!qphy->pcs_misc)
>>>>   		dev_vdbg(dev, "PHY pcs_misc-reg not used\n");
>>>>   
>>>> -	snprintf(prop_name, sizeof(prop_name), "pipe%d", id);
>>>> -	qphy->pipe_clk = devm_get_clk_from_child(dev, np, prop_name);
>>>> +	qphy->pipe_clk = devm_get_clk_from_child(dev, np, "pipe");
>>>
>>> Just get first clock and no need for handling any deprecation.
> 
> I still want to deprecate the current name as it makes no sense and
> risks introducing inconsistencies when adding new resources (e.g. should
> they also get a bogus suffix).

And it was suggested to you to deprecate entire property... There is no
need to handle anything in the driver.

> 
>> If I got it correctly, passing NULL instead of the name would do the trick.
> 
> Ah, thanks for spotting that. I feared this would require adding a host
> of new devres wrappers otherwise.
> 
> Would still be needed for the upcoming second pipediv2 clock though...


Best regards,
Krzysztof

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

* Re: [PATCH 17/43] dt-bindings: phy: qcom,qmp-pcie: add missing child node schema
  2022-07-05 11:56         ` Krzysztof Kozlowski
@ 2022-07-05 12:11           ` Johan Hovold
  -1 siblings, 0 replies; 178+ messages in thread
From: Johan Hovold @ 2022-07-05 12:11 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: Johan Hovold, Vinod Koul, Rob Herring, Krzysztof Kozlowski,
	Andy Gross, Bjorn Andersson, Kishon Vijay Abraham I,
	linux-arm-msm, linux-phy, devicetree, linux-kernel

On Tue, Jul 05, 2022 at 01:56:32PM +0200, Krzysztof Kozlowski wrote:
> On 05/07/2022 13:51, Johan Hovold wrote:
> > On Tue, Jul 05, 2022 at 12:18:37PM +0200, Krzysztof Kozlowski wrote:
> >> On 05/07/2022 11:42, Johan Hovold wrote:
> >>> Add the missing the description of the PHY-provider child node which was
> >>> ignored when converting to DT schema.
> >>>
> >>> Also fix up the incorrect description that claimed that one child node
> >>> per lane was required.
> >>>
> >>> Fixes: ccf51c1cedfd ("dt-bindings: phy: qcom,qmp: Convert QMP PHY bindings to yaml")
> >>> Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
> >>> ---
> >>>  .../bindings/phy/qcom,qmp-pcie-phy.yaml       | 88 ++++++++++++++++++-
> >>>  1 file changed, 85 insertions(+), 3 deletions(-)
> >>>
> >>> diff --git a/Documentation/devicetree/bindings/phy/qcom,qmp-pcie-phy.yaml b/Documentation/devicetree/bindings/phy/qcom,qmp-pcie-phy.yaml
> >>> index ff1577f68a00..5a1ebf874559 100644
> >>> --- a/Documentation/devicetree/bindings/phy/qcom,qmp-pcie-phy.yaml
> >>> +++ b/Documentation/devicetree/bindings/phy/qcom,qmp-pcie-phy.yaml
> >>> @@ -69,9 +69,37 @@ properties:
> > 
> >>> +  - if:
> >>> +      properties:
> >>> +        compatible:
> >>> +          contains:
> >>> +            enum:
> >>> +              - qcom,sm8250-qmp-gen3x2-pcie-phy
> >>> +              - qcom,sm8250-qmp-modem-pcie-phy
> >>> +              - qcom,sm8450-qmp-gen4x2-pcie-phy
> >>> +    then:
> >>> +      patternProperties:
> >>> +        "^phy@[0-9a-f]+$":
> >>> +          properties:
> >>> +            reg:
> >>> +              items:
> >>> +                - description: TX lane 1
> >>> +                - description: RX lane 1
> >>> +                - description: PCS
> >>> +                - description: TX lane 2
> >>> +                - description: RX lane 2
> >>> +                - description: PCS_MISC
> >>> +    else:
> >>> +      patternProperties:
> >>> +        "^phy@[0-9a-f]+$":
> >>> +          properties:
> >>> +            reg:
> >>> +              minItems: 3
> >>> +              maxItems: 4
> >>> +              items:
> >>> +                - description: TX
> >>> +                - description: RX
> >>> +                - description: PCS
> >>> +                - description: PCS_MISC
> >>> +      if:
> >>
> >> Do not include if within other if. Just split the entire section to its
> >> own if:.
> > 
> > That sounds like it would just obfuscate the logic. The else clause
> > specified 3-4 registers and the nested if determines which compatibles
> > use which by further narrowing the range.
> > 
> > If you move it out to the else: this would be really hard understand and
> > verify.
> 
> Every bindings are expected to do that way and most of them are doing
> it: define broad constraints in properties:, then define strict
> constraints per each variant. Easy to follow code. This binding is not
> particularly special to make it different than other ones. Doing
> semi-strict constraints in if: and then additional constrain in nested
> if: is not easy to understand and verify.

Ok, so you want to flatten this by repeating also the register
descriptions?

That wouldn't hurt readability as much, but doing so would be more error
prone as it's easy to miss adding a new compatible in every group of
conditionals and there's no else clause to catch the mistake.

Right know the logic is

	if dual-lane
		items = 6
	else
		items = 3 or 4
		if single-lane-exception
			items = 3
		else
			items = 4

Flattening this gives

	if dual-lane
		items = 6
	if single-lane-normal
		items = 4
	if single-lane-exception
		items = 3

Which means that every compatible must now be listed in one of the
conditionals.

Fine with me, but please confirm that I understood you correctly.

Johan

-- 
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy

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

* Re: [PATCH 17/43] dt-bindings: phy: qcom,qmp-pcie: add missing child node schema
@ 2022-07-05 12:11           ` Johan Hovold
  0 siblings, 0 replies; 178+ messages in thread
From: Johan Hovold @ 2022-07-05 12:11 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: Johan Hovold, Vinod Koul, Rob Herring, Krzysztof Kozlowski,
	Andy Gross, Bjorn Andersson, Kishon Vijay Abraham I,
	linux-arm-msm, linux-phy, devicetree, linux-kernel

On Tue, Jul 05, 2022 at 01:56:32PM +0200, Krzysztof Kozlowski wrote:
> On 05/07/2022 13:51, Johan Hovold wrote:
> > On Tue, Jul 05, 2022 at 12:18:37PM +0200, Krzysztof Kozlowski wrote:
> >> On 05/07/2022 11:42, Johan Hovold wrote:
> >>> Add the missing the description of the PHY-provider child node which was
> >>> ignored when converting to DT schema.
> >>>
> >>> Also fix up the incorrect description that claimed that one child node
> >>> per lane was required.
> >>>
> >>> Fixes: ccf51c1cedfd ("dt-bindings: phy: qcom,qmp: Convert QMP PHY bindings to yaml")
> >>> Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
> >>> ---
> >>>  .../bindings/phy/qcom,qmp-pcie-phy.yaml       | 88 ++++++++++++++++++-
> >>>  1 file changed, 85 insertions(+), 3 deletions(-)
> >>>
> >>> diff --git a/Documentation/devicetree/bindings/phy/qcom,qmp-pcie-phy.yaml b/Documentation/devicetree/bindings/phy/qcom,qmp-pcie-phy.yaml
> >>> index ff1577f68a00..5a1ebf874559 100644
> >>> --- a/Documentation/devicetree/bindings/phy/qcom,qmp-pcie-phy.yaml
> >>> +++ b/Documentation/devicetree/bindings/phy/qcom,qmp-pcie-phy.yaml
> >>> @@ -69,9 +69,37 @@ properties:
> > 
> >>> +  - if:
> >>> +      properties:
> >>> +        compatible:
> >>> +          contains:
> >>> +            enum:
> >>> +              - qcom,sm8250-qmp-gen3x2-pcie-phy
> >>> +              - qcom,sm8250-qmp-modem-pcie-phy
> >>> +              - qcom,sm8450-qmp-gen4x2-pcie-phy
> >>> +    then:
> >>> +      patternProperties:
> >>> +        "^phy@[0-9a-f]+$":
> >>> +          properties:
> >>> +            reg:
> >>> +              items:
> >>> +                - description: TX lane 1
> >>> +                - description: RX lane 1
> >>> +                - description: PCS
> >>> +                - description: TX lane 2
> >>> +                - description: RX lane 2
> >>> +                - description: PCS_MISC
> >>> +    else:
> >>> +      patternProperties:
> >>> +        "^phy@[0-9a-f]+$":
> >>> +          properties:
> >>> +            reg:
> >>> +              minItems: 3
> >>> +              maxItems: 4
> >>> +              items:
> >>> +                - description: TX
> >>> +                - description: RX
> >>> +                - description: PCS
> >>> +                - description: PCS_MISC
> >>> +      if:
> >>
> >> Do not include if within other if. Just split the entire section to its
> >> own if:.
> > 
> > That sounds like it would just obfuscate the logic. The else clause
> > specified 3-4 registers and the nested if determines which compatibles
> > use which by further narrowing the range.
> > 
> > If you move it out to the else: this would be really hard understand and
> > verify.
> 
> Every bindings are expected to do that way and most of them are doing
> it: define broad constraints in properties:, then define strict
> constraints per each variant. Easy to follow code. This binding is not
> particularly special to make it different than other ones. Doing
> semi-strict constraints in if: and then additional constrain in nested
> if: is not easy to understand and verify.

Ok, so you want to flatten this by repeating also the register
descriptions?

That wouldn't hurt readability as much, but doing so would be more error
prone as it's easy to miss adding a new compatible in every group of
conditionals and there's no else clause to catch the mistake.

Right know the logic is

	if dual-lane
		items = 6
	else
		items = 3 or 4
		if single-lane-exception
			items = 3
		else
			items = 4

Flattening this gives

	if dual-lane
		items = 6
	if single-lane-normal
		items = 4
	if single-lane-exception
		items = 3

Which means that every compatible must now be listed in one of the
conditionals.

Fine with me, but please confirm that I understood you correctly.

Johan

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

* Re: [PATCH 11/43] dt-bindings: phy: qcom,msm8996-qmp-pcie: deprecate reset names
  2022-07-05 10:12     ` Krzysztof Kozlowski
@ 2022-07-05 12:14       ` Johan Hovold
  -1 siblings, 0 replies; 178+ messages in thread
From: Johan Hovold @ 2022-07-05 12:14 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: Johan Hovold, Vinod Koul, Rob Herring, Krzysztof Kozlowski,
	Andy Gross, Bjorn Andersson, Kishon Vijay Abraham I,
	linux-arm-msm, linux-phy, devicetree, linux-kernel

On Tue, Jul 05, 2022 at 12:12:25PM +0200, Krzysztof Kozlowski wrote:
> On 05/07/2022 11:42, Johan Hovold wrote:
> > Drop the unnecessary "lane" suffix from the PHY reset names and mark the
> > old names as deprecated.
> > 
> > Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
> > ---
> >  .../phy/qcom,msm8996-qmp-pcie-phy.yaml        | 20 +++++++++++--------
> >  1 file changed, 12 insertions(+), 8 deletions(-)
> > 
> > diff --git a/Documentation/devicetree/bindings/phy/qcom,msm8996-qmp-pcie-phy.yaml b/Documentation/devicetree/bindings/phy/qcom,msm8996-qmp-pcie-phy.yaml
> > index 7931b1fd1476..0bea8270b37e 100644
> > --- a/Documentation/devicetree/bindings/phy/qcom,msm8996-qmp-pcie-phy.yaml
> > +++ b/Documentation/devicetree/bindings/phy/qcom,msm8996-qmp-pcie-phy.yaml
> > @@ -94,11 +94,15 @@ patternProperties:
> >            - description: PHY (lane) reset
> >  
> >        reset-names:
> > -        items:
> > -          - enum:
> > -              - lane0
> > -              - lane1
> > -              - lane2
> > +        oneOf:
> > +          - items:
> > +              - const: lane
> > +          - items:
> > +              - enum:
> > +                  - lane0
> > +                  - lane1
> > +                  - lane2
> > +            deprecated: true
> >  
> 
> How about just dropping reset-names entirely? Marking entire field
> deprecated and removing from DTS? The same in the previous patch.
> 
> Usually one-item xxx-names do not bring any useful information.

Yeah, I agree, that's better.

Johan

-- 
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy

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

* Re: [PATCH 11/43] dt-bindings: phy: qcom,msm8996-qmp-pcie: deprecate reset names
@ 2022-07-05 12:14       ` Johan Hovold
  0 siblings, 0 replies; 178+ messages in thread
From: Johan Hovold @ 2022-07-05 12:14 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: Johan Hovold, Vinod Koul, Rob Herring, Krzysztof Kozlowski,
	Andy Gross, Bjorn Andersson, Kishon Vijay Abraham I,
	linux-arm-msm, linux-phy, devicetree, linux-kernel

On Tue, Jul 05, 2022 at 12:12:25PM +0200, Krzysztof Kozlowski wrote:
> On 05/07/2022 11:42, Johan Hovold wrote:
> > Drop the unnecessary "lane" suffix from the PHY reset names and mark the
> > old names as deprecated.
> > 
> > Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
> > ---
> >  .../phy/qcom,msm8996-qmp-pcie-phy.yaml        | 20 +++++++++++--------
> >  1 file changed, 12 insertions(+), 8 deletions(-)
> > 
> > diff --git a/Documentation/devicetree/bindings/phy/qcom,msm8996-qmp-pcie-phy.yaml b/Documentation/devicetree/bindings/phy/qcom,msm8996-qmp-pcie-phy.yaml
> > index 7931b1fd1476..0bea8270b37e 100644
> > --- a/Documentation/devicetree/bindings/phy/qcom,msm8996-qmp-pcie-phy.yaml
> > +++ b/Documentation/devicetree/bindings/phy/qcom,msm8996-qmp-pcie-phy.yaml
> > @@ -94,11 +94,15 @@ patternProperties:
> >            - description: PHY (lane) reset
> >  
> >        reset-names:
> > -        items:
> > -          - enum:
> > -              - lane0
> > -              - lane1
> > -              - lane2
> > +        oneOf:
> > +          - items:
> > +              - const: lane
> > +          - items:
> > +              - enum:
> > +                  - lane0
> > +                  - lane1
> > +                  - lane2
> > +            deprecated: true
> >  
> 
> How about just dropping reset-names entirely? Marking entire field
> deprecated and removing from DTS? The same in the previous patch.
> 
> Usually one-item xxx-names do not bring any useful information.

Yeah, I agree, that's better.

Johan

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

* Re: [PATCH 16/43] dt-bindings: phy: qcom,qmp-pcie: drop unused vddp-ref-clk supply
  2022-07-05 11:59         ` Krzysztof Kozlowski
@ 2022-07-05 12:43           ` Johan Hovold
  -1 siblings, 0 replies; 178+ messages in thread
From: Johan Hovold @ 2022-07-05 12:43 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: Johan Hovold, Vinod Koul, Rob Herring, Krzysztof Kozlowski,
	Andy Gross, Bjorn Andersson, Kishon Vijay Abraham I,
	linux-arm-msm, linux-phy, devicetree, linux-kernel

On Tue, Jul 05, 2022 at 01:59:26PM +0200, Krzysztof Kozlowski wrote:
> On 05/07/2022 13:46, Johan Hovold wrote:
> >> It's okay to copy existing bindings which are applicable and then in
> >> separate patch deprecate things or remove pieces which are not correct.
> >> But all this in assumption that the first copy already selected only
> >> applicable parts.
> > 
> > But how would you be able to tell what parts I left out from the
> > original copy 
> 
> They are obvious and immediately visible. I see old bindings and new
> bindings - no troubles to compare. I review new bindings - everything in
> place.

Heh, with all these conditionals in place that may be harder than it
sounds.

> I don't want to review old code, inapplicable code. The patch I am
> reviewing (the one doing the split) must bring correct bindings, except
> these few differences like deprecated stuff.

Sure, I get that. But this very patch is an example of why I tried to
remove things explicitly instead folding this into the original patch
and risking it not being noticed.

It's not always obvious what is applicable and what is not, especially
when the old schema is in the state it is.

> > unless I first do the split and then explicitly remove
> > things that were presumably *never* applicable and just happened to be
> > added because all bindings where combined in one large mess of a schema?

So you suggest we keep this regulator for all PHY variants even though
it was probably only needed for UFS on some older SoCs?

Johan

-- 
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy

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

* Re: [PATCH 16/43] dt-bindings: phy: qcom,qmp-pcie: drop unused vddp-ref-clk supply
@ 2022-07-05 12:43           ` Johan Hovold
  0 siblings, 0 replies; 178+ messages in thread
From: Johan Hovold @ 2022-07-05 12:43 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: Johan Hovold, Vinod Koul, Rob Herring, Krzysztof Kozlowski,
	Andy Gross, Bjorn Andersson, Kishon Vijay Abraham I,
	linux-arm-msm, linux-phy, devicetree, linux-kernel

On Tue, Jul 05, 2022 at 01:59:26PM +0200, Krzysztof Kozlowski wrote:
> On 05/07/2022 13:46, Johan Hovold wrote:
> >> It's okay to copy existing bindings which are applicable and then in
> >> separate patch deprecate things or remove pieces which are not correct.
> >> But all this in assumption that the first copy already selected only
> >> applicable parts.
> > 
> > But how would you be able to tell what parts I left out from the
> > original copy 
> 
> They are obvious and immediately visible. I see old bindings and new
> bindings - no troubles to compare. I review new bindings - everything in
> place.

Heh, with all these conditionals in place that may be harder than it
sounds.

> I don't want to review old code, inapplicable code. The patch I am
> reviewing (the one doing the split) must bring correct bindings, except
> these few differences like deprecated stuff.

Sure, I get that. But this very patch is an example of why I tried to
remove things explicitly instead folding this into the original patch
and risking it not being noticed.

It's not always obvious what is applicable and what is not, especially
when the old schema is in the state it is.

> > unless I first do the split and then explicitly remove
> > things that were presumably *never* applicable and just happened to be
> > added because all bindings where combined in one large mess of a schema?

So you suggest we keep this regulator for all PHY variants even though
it was probably only needed for UFS on some older SoCs?

Johan

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

* Re: [PATCH 17/43] dt-bindings: phy: qcom,qmp-pcie: add missing child node schema
  2022-07-05  9:42   ` Johan Hovold
@ 2022-07-05 14:14     ` Rob Herring
  -1 siblings, 0 replies; 178+ messages in thread
From: Rob Herring @ 2022-07-05 14:14 UTC (permalink / raw)
  To: Johan Hovold
  Cc: Krzysztof Kozlowski, linux-phy, Vinod Koul, linux-arm-msm,
	devicetree, Bjorn Andersson, linux-kernel, Andy Gross,
	Kishon Vijay Abraham I, Rob Herring

On Tue, 05 Jul 2022 11:42:13 +0200, Johan Hovold wrote:
> Add the missing the description of the PHY-provider child node which was
> ignored when converting to DT schema.
> 
> Also fix up the incorrect description that claimed that one child node
> per lane was required.
> 
> Fixes: ccf51c1cedfd ("dt-bindings: phy: qcom,qmp: Convert QMP PHY bindings to yaml")
> Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
> ---
>  .../bindings/phy/qcom,qmp-pcie-phy.yaml       | 88 ++++++++++++++++++-
>  1 file changed, 85 insertions(+), 3 deletions(-)
> 

My bot found errors running 'make DT_CHECKER_FLAGS=-m dt_binding_check'
on your patch (DT_CHECKER_FLAGS is new in v5.13):

yamllint warnings/errors:

dtschema/dtc warnings/errors:
/builds/robherring/linux-dt-review/Documentation/devicetree/bindings/phy/qcom,qmp-pcie-phy.yaml: allOf:3:else:patternProperties:^phy@[0-9a-f]+$:properties:reg: {'minItems': 3, 'maxItems': 4, 'items': [{'description': 'TX'}, {'description': 'RX'}, {'description': 'PCS'}, {'description': 'PCS_MISC'}]} should not be valid under {'required': ['maxItems']}
	hint: "maxItems" is not needed with an "items" list
	from schema $id: http://devicetree.org/meta-schemas/items.yaml#
/builds/robherring/linux-dt-review/Documentation/devicetree/bindings/phy/qcom,qmp-pcie-phy.yaml: ignoring, error in schema: allOf: 3: else: patternProperties: ^phy@[0-9a-f]+$: properties: reg

doc reference errors (make refcheckdocs):

See https://patchwork.ozlabs.org/patch/

This check can fail if there are any dependencies. The base for a patch
series is generally the most recent rc1.

If you already ran 'make dt_binding_check' and didn't see the above
error(s), then make sure 'yamllint' is installed and dt-schema is up to
date:

pip3 install dtschema --upgrade

Please check and re-submit.


-- 
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy

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

* Re: [PATCH 17/43] dt-bindings: phy: qcom,qmp-pcie: add missing child node schema
@ 2022-07-05 14:14     ` Rob Herring
  0 siblings, 0 replies; 178+ messages in thread
From: Rob Herring @ 2022-07-05 14:14 UTC (permalink / raw)
  To: Johan Hovold
  Cc: Krzysztof Kozlowski, linux-phy, Vinod Koul, linux-arm-msm,
	devicetree, Bjorn Andersson, linux-kernel, Andy Gross,
	Kishon Vijay Abraham I, Rob Herring

On Tue, 05 Jul 2022 11:42:13 +0200, Johan Hovold wrote:
> Add the missing the description of the PHY-provider child node which was
> ignored when converting to DT schema.
> 
> Also fix up the incorrect description that claimed that one child node
> per lane was required.
> 
> Fixes: ccf51c1cedfd ("dt-bindings: phy: qcom,qmp: Convert QMP PHY bindings to yaml")
> Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
> ---
>  .../bindings/phy/qcom,qmp-pcie-phy.yaml       | 88 ++++++++++++++++++-
>  1 file changed, 85 insertions(+), 3 deletions(-)
> 

My bot found errors running 'make DT_CHECKER_FLAGS=-m dt_binding_check'
on your patch (DT_CHECKER_FLAGS is new in v5.13):

yamllint warnings/errors:

dtschema/dtc warnings/errors:
/builds/robherring/linux-dt-review/Documentation/devicetree/bindings/phy/qcom,qmp-pcie-phy.yaml: allOf:3:else:patternProperties:^phy@[0-9a-f]+$:properties:reg: {'minItems': 3, 'maxItems': 4, 'items': [{'description': 'TX'}, {'description': 'RX'}, {'description': 'PCS'}, {'description': 'PCS_MISC'}]} should not be valid under {'required': ['maxItems']}
	hint: "maxItems" is not needed with an "items" list
	from schema $id: http://devicetree.org/meta-schemas/items.yaml#
/builds/robherring/linux-dt-review/Documentation/devicetree/bindings/phy/qcom,qmp-pcie-phy.yaml: ignoring, error in schema: allOf: 3: else: patternProperties: ^phy@[0-9a-f]+$: properties: reg

doc reference errors (make refcheckdocs):

See https://patchwork.ozlabs.org/patch/

This check can fail if there are any dependencies. The base for a patch
series is generally the most recent rc1.

If you already ran 'make dt_binding_check' and didn't see the above
error(s), then make sure 'yamllint' is installed and dt-schema is up to
date:

pip3 install dtschema --upgrade

Please check and re-submit.


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

* Re: [PATCH 16/43] dt-bindings: phy: qcom,qmp-pcie: drop unused vddp-ref-clk supply
  2022-07-05 12:43           ` Johan Hovold
@ 2022-07-05 18:13             ` Krzysztof Kozlowski
  -1 siblings, 0 replies; 178+ messages in thread
From: Krzysztof Kozlowski @ 2022-07-05 18:13 UTC (permalink / raw)
  To: Johan Hovold
  Cc: Johan Hovold, Vinod Koul, Rob Herring, Krzysztof Kozlowski,
	Andy Gross, Bjorn Andersson, Kishon Vijay Abraham I,
	linux-arm-msm, linux-phy, devicetree, linux-kernel

On 05/07/2022 14:43, Johan Hovold wrote:
> On Tue, Jul 05, 2022 at 01:59:26PM +0200, Krzysztof Kozlowski wrote:
>> On 05/07/2022 13:46, Johan Hovold wrote:
>>>> It's okay to copy existing bindings which are applicable and then in
>>>> separate patch deprecate things or remove pieces which are not correct.
>>>> But all this in assumption that the first copy already selected only
>>>> applicable parts.
>>>
>>> But how would you be able to tell what parts I left out from the
>>> original copy 
>>
>> They are obvious and immediately visible. I see old bindings and new
>> bindings - no troubles to compare. I review new bindings - everything in
>> place.
> 
> Heh, with all these conditionals in place that may be harder than it
> sounds.

True and your patchset split does not make it easier.

> 
>> I don't want to review old code, inapplicable code. The patch I am
>> reviewing (the one doing the split) must bring correct bindings, except
>> these few differences like deprecated stuff.
> 
> Sure, I get that. But this very patch is an example of why I tried to
> remove things explicitly instead folding this into the original patch
> and risking it not being noticed.
> 
> It's not always obvious what is applicable and what is not, especially
> when the old schema is in the state it is.

Unless bindings are very precise, usually it's not visible what is
applicable or not, so there is just no benefit in multi-step approach in
split from old bindings. The same as with conversion of bindings, the
assumption is that original file was not correct, so we review the final
file.

> 
>>> unless I first do the split and then explicitly remove
>>> things that were presumably *never* applicable and just happened to be
>>> added because all bindings where combined in one large mess of a schema?
> 
> So you suggest we keep this regulator for all PHY variants even though
> it was probably only needed for UFS on some older SoCs?

No. I commented only that reason is not a good one. The proper reason
could be: there is or there is no such pin in the device or the history
tells that adding it for all variants was a mistake.

Best regards,
Krzysztof

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

* Re: [PATCH 16/43] dt-bindings: phy: qcom,qmp-pcie: drop unused vddp-ref-clk supply
@ 2022-07-05 18:13             ` Krzysztof Kozlowski
  0 siblings, 0 replies; 178+ messages in thread
From: Krzysztof Kozlowski @ 2022-07-05 18:13 UTC (permalink / raw)
  To: Johan Hovold
  Cc: Johan Hovold, Vinod Koul, Rob Herring, Krzysztof Kozlowski,
	Andy Gross, Bjorn Andersson, Kishon Vijay Abraham I,
	linux-arm-msm, linux-phy, devicetree, linux-kernel

On 05/07/2022 14:43, Johan Hovold wrote:
> On Tue, Jul 05, 2022 at 01:59:26PM +0200, Krzysztof Kozlowski wrote:
>> On 05/07/2022 13:46, Johan Hovold wrote:
>>>> It's okay to copy existing bindings which are applicable and then in
>>>> separate patch deprecate things or remove pieces which are not correct.
>>>> But all this in assumption that the first copy already selected only
>>>> applicable parts.
>>>
>>> But how would you be able to tell what parts I left out from the
>>> original copy 
>>
>> They are obvious and immediately visible. I see old bindings and new
>> bindings - no troubles to compare. I review new bindings - everything in
>> place.
> 
> Heh, with all these conditionals in place that may be harder than it
> sounds.

True and your patchset split does not make it easier.

> 
>> I don't want to review old code, inapplicable code. The patch I am
>> reviewing (the one doing the split) must bring correct bindings, except
>> these few differences like deprecated stuff.
> 
> Sure, I get that. But this very patch is an example of why I tried to
> remove things explicitly instead folding this into the original patch
> and risking it not being noticed.
> 
> It's not always obvious what is applicable and what is not, especially
> when the old schema is in the state it is.

Unless bindings are very precise, usually it's not visible what is
applicable or not, so there is just no benefit in multi-step approach in
split from old bindings. The same as with conversion of bindings, the
assumption is that original file was not correct, so we review the final
file.

> 
>>> unless I first do the split and then explicitly remove
>>> things that were presumably *never* applicable and just happened to be
>>> added because all bindings where combined in one large mess of a schema?
> 
> So you suggest we keep this regulator for all PHY variants even though
> it was probably only needed for UFS on some older SoCs?

No. I commented only that reason is not a good one. The proper reason
could be: there is or there is no such pin in the device or the history
tells that adding it for all variants was a mistake.

Best regards,
Krzysztof

-- 
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy

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

* Re: [PATCH 17/43] dt-bindings: phy: qcom,qmp-pcie: add missing child node schema
  2022-07-05 12:11           ` Johan Hovold
@ 2022-07-05 18:21             ` Krzysztof Kozlowski
  -1 siblings, 0 replies; 178+ messages in thread
From: Krzysztof Kozlowski @ 2022-07-05 18:21 UTC (permalink / raw)
  To: Johan Hovold
  Cc: Johan Hovold, Vinod Koul, Rob Herring, Krzysztof Kozlowski,
	Andy Gross, Bjorn Andersson, Kishon Vijay Abraham I,
	linux-arm-msm, linux-phy, devicetree, linux-kernel

On 05/07/2022 14:11, Johan Hovold wrote:
> On Tue, Jul 05, 2022 at 01:56:32PM +0200, Krzysztof Kozlowski wrote:
>> On 05/07/2022 13:51, Johan Hovold wrote:
>>> On Tue, Jul 05, 2022 at 12:18:37PM +0200, Krzysztof Kozlowski wrote:
>>>> On 05/07/2022 11:42, Johan Hovold wrote:
>>>>> Add the missing the description of the PHY-provider child node which was
>>>>> ignored when converting to DT schema.
>>>>>
>>>>> Also fix up the incorrect description that claimed that one child node
>>>>> per lane was required.
>>>>>
>>>>> Fixes: ccf51c1cedfd ("dt-bindings: phy: qcom,qmp: Convert QMP PHY bindings to yaml")
>>>>> Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
>>>>> ---
>>>>>  .../bindings/phy/qcom,qmp-pcie-phy.yaml       | 88 ++++++++++++++++++-
>>>>>  1 file changed, 85 insertions(+), 3 deletions(-)
>>>>>
>>>>> diff --git a/Documentation/devicetree/bindings/phy/qcom,qmp-pcie-phy.yaml b/Documentation/devicetree/bindings/phy/qcom,qmp-pcie-phy.yaml
>>>>> index ff1577f68a00..5a1ebf874559 100644
>>>>> --- a/Documentation/devicetree/bindings/phy/qcom,qmp-pcie-phy.yaml
>>>>> +++ b/Documentation/devicetree/bindings/phy/qcom,qmp-pcie-phy.yaml
>>>>> @@ -69,9 +69,37 @@ properties:
>>>
>>>>> +  - if:
>>>>> +      properties:
>>>>> +        compatible:
>>>>> +          contains:
>>>>> +            enum:
>>>>> +              - qcom,sm8250-qmp-gen3x2-pcie-phy
>>>>> +              - qcom,sm8250-qmp-modem-pcie-phy
>>>>> +              - qcom,sm8450-qmp-gen4x2-pcie-phy
>>>>> +    then:
>>>>> +      patternProperties:
>>>>> +        "^phy@[0-9a-f]+$":
>>>>> +          properties:
>>>>> +            reg:
>>>>> +              items:
>>>>> +                - description: TX lane 1
>>>>> +                - description: RX lane 1
>>>>> +                - description: PCS
>>>>> +                - description: TX lane 2
>>>>> +                - description: RX lane 2
>>>>> +                - description: PCS_MISC
>>>>> +    else:
>>>>> +      patternProperties:
>>>>> +        "^phy@[0-9a-f]+$":
>>>>> +          properties:
>>>>> +            reg:
>>>>> +              minItems: 3
>>>>> +              maxItems: 4
>>>>> +              items:
>>>>> +                - description: TX
>>>>> +                - description: RX
>>>>> +                - description: PCS
>>>>> +                - description: PCS_MISC
>>>>> +      if:
>>>>
>>>> Do not include if within other if. Just split the entire section to its
>>>> own if:.
>>>
>>> That sounds like it would just obfuscate the logic. The else clause
>>> specified 3-4 registers and the nested if determines which compatibles
>>> use which by further narrowing the range.
>>>
>>> If you move it out to the else: this would be really hard understand and
>>> verify.
>>
>> Every bindings are expected to do that way and most of them are doing
>> it: define broad constraints in properties:, then define strict
>> constraints per each variant. Easy to follow code. This binding is not
>> particularly special to make it different than other ones. Doing
>> semi-strict constraints in if: and then additional constrain in nested
>> if: is not easy to understand and verify.
> 
> Ok, so you want to flatten this by repeating also the register
> descriptions?
> 
> That wouldn't hurt readability as much, but doing so would be more error
> prone as it's easy to miss adding a new compatible in every group of
> conditionals and there's no else clause to catch the mistake.
> 
> Right know the logic is
> 
> 	if dual-lane
> 		items = 6
> 	else
> 		items = 3 or 4
> 		if single-lane-exception
> 			items = 3
> 		else
> 			items = 4
> 
> Flattening this gives
> 
> 	if dual-lane
> 		items = 6
> 	if single-lane-normal
> 		items = 4
> 	if single-lane-exception
> 		items = 3
> 
> Which means that every compatible must now be listed in one of the
> conditionals.

Yes, because it's explicit and easy to read. Handling compatibles in
'else' makes it opposite - one cannot use grep and cannot easily find
what is actually covered by maxItems:4 (you need to check all 7
compatibles to find what is not covered here).

> 
> Fine with me, but please confirm that I understood you correctly.

You have already flattened if-if-if for clocks and resets, so this
should follow similar approach. I don't think it could be squashed with
that previous if-if-if, though.

Best regards,
Krzysztof

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

* Re: [PATCH 17/43] dt-bindings: phy: qcom,qmp-pcie: add missing child node schema
@ 2022-07-05 18:21             ` Krzysztof Kozlowski
  0 siblings, 0 replies; 178+ messages in thread
From: Krzysztof Kozlowski @ 2022-07-05 18:21 UTC (permalink / raw)
  To: Johan Hovold
  Cc: Johan Hovold, Vinod Koul, Rob Herring, Krzysztof Kozlowski,
	Andy Gross, Bjorn Andersson, Kishon Vijay Abraham I,
	linux-arm-msm, linux-phy, devicetree, linux-kernel

On 05/07/2022 14:11, Johan Hovold wrote:
> On Tue, Jul 05, 2022 at 01:56:32PM +0200, Krzysztof Kozlowski wrote:
>> On 05/07/2022 13:51, Johan Hovold wrote:
>>> On Tue, Jul 05, 2022 at 12:18:37PM +0200, Krzysztof Kozlowski wrote:
>>>> On 05/07/2022 11:42, Johan Hovold wrote:
>>>>> Add the missing the description of the PHY-provider child node which was
>>>>> ignored when converting to DT schema.
>>>>>
>>>>> Also fix up the incorrect description that claimed that one child node
>>>>> per lane was required.
>>>>>
>>>>> Fixes: ccf51c1cedfd ("dt-bindings: phy: qcom,qmp: Convert QMP PHY bindings to yaml")
>>>>> Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
>>>>> ---
>>>>>  .../bindings/phy/qcom,qmp-pcie-phy.yaml       | 88 ++++++++++++++++++-
>>>>>  1 file changed, 85 insertions(+), 3 deletions(-)
>>>>>
>>>>> diff --git a/Documentation/devicetree/bindings/phy/qcom,qmp-pcie-phy.yaml b/Documentation/devicetree/bindings/phy/qcom,qmp-pcie-phy.yaml
>>>>> index ff1577f68a00..5a1ebf874559 100644
>>>>> --- a/Documentation/devicetree/bindings/phy/qcom,qmp-pcie-phy.yaml
>>>>> +++ b/Documentation/devicetree/bindings/phy/qcom,qmp-pcie-phy.yaml
>>>>> @@ -69,9 +69,37 @@ properties:
>>>
>>>>> +  - if:
>>>>> +      properties:
>>>>> +        compatible:
>>>>> +          contains:
>>>>> +            enum:
>>>>> +              - qcom,sm8250-qmp-gen3x2-pcie-phy
>>>>> +              - qcom,sm8250-qmp-modem-pcie-phy
>>>>> +              - qcom,sm8450-qmp-gen4x2-pcie-phy
>>>>> +    then:
>>>>> +      patternProperties:
>>>>> +        "^phy@[0-9a-f]+$":
>>>>> +          properties:
>>>>> +            reg:
>>>>> +              items:
>>>>> +                - description: TX lane 1
>>>>> +                - description: RX lane 1
>>>>> +                - description: PCS
>>>>> +                - description: TX lane 2
>>>>> +                - description: RX lane 2
>>>>> +                - description: PCS_MISC
>>>>> +    else:
>>>>> +      patternProperties:
>>>>> +        "^phy@[0-9a-f]+$":
>>>>> +          properties:
>>>>> +            reg:
>>>>> +              minItems: 3
>>>>> +              maxItems: 4
>>>>> +              items:
>>>>> +                - description: TX
>>>>> +                - description: RX
>>>>> +                - description: PCS
>>>>> +                - description: PCS_MISC
>>>>> +      if:
>>>>
>>>> Do not include if within other if. Just split the entire section to its
>>>> own if:.
>>>
>>> That sounds like it would just obfuscate the logic. The else clause
>>> specified 3-4 registers and the nested if determines which compatibles
>>> use which by further narrowing the range.
>>>
>>> If you move it out to the else: this would be really hard understand and
>>> verify.
>>
>> Every bindings are expected to do that way and most of them are doing
>> it: define broad constraints in properties:, then define strict
>> constraints per each variant. Easy to follow code. This binding is not
>> particularly special to make it different than other ones. Doing
>> semi-strict constraints in if: and then additional constrain in nested
>> if: is not easy to understand and verify.
> 
> Ok, so you want to flatten this by repeating also the register
> descriptions?
> 
> That wouldn't hurt readability as much, but doing so would be more error
> prone as it's easy to miss adding a new compatible in every group of
> conditionals and there's no else clause to catch the mistake.
> 
> Right know the logic is
> 
> 	if dual-lane
> 		items = 6
> 	else
> 		items = 3 or 4
> 		if single-lane-exception
> 			items = 3
> 		else
> 			items = 4
> 
> Flattening this gives
> 
> 	if dual-lane
> 		items = 6
> 	if single-lane-normal
> 		items = 4
> 	if single-lane-exception
> 		items = 3
> 
> Which means that every compatible must now be listed in one of the
> conditionals.

Yes, because it's explicit and easy to read. Handling compatibles in
'else' makes it opposite - one cannot use grep and cannot easily find
what is actually covered by maxItems:4 (you need to check all 7
compatibles to find what is not covered here).

> 
> Fine with me, but please confirm that I understood you correctly.

You have already flattened if-if-if for clocks and resets, so this
should follow similar approach. I don't think it could be squashed with
that previous if-if-if, though.

Best regards,
Krzysztof

-- 
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy

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

* Re: [PATCH 16/43] dt-bindings: phy: qcom,qmp-pcie: drop unused vddp-ref-clk supply
  2022-07-05 18:13             ` Krzysztof Kozlowski
@ 2022-07-06  6:03               ` Johan Hovold
  -1 siblings, 0 replies; 178+ messages in thread
From: Johan Hovold @ 2022-07-06  6:03 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: Johan Hovold, Vinod Koul, Rob Herring, Krzysztof Kozlowski,
	Andy Gross, Bjorn Andersson, Kishon Vijay Abraham I,
	linux-arm-msm, linux-phy, devicetree, linux-kernel

On Tue, Jul 05, 2022 at 08:13:55PM +0200, Krzysztof Kozlowski wrote:
> On 05/07/2022 14:43, Johan Hovold wrote:

> > So you suggest we keep this regulator for all PHY variants even though
> > it was probably only needed for UFS on some older SoCs?
> 
> No. I commented only that reason is not a good one. The proper reason
> could be: there is or there is no such pin in the device or the history
> tells that adding it for all variants was a mistake.

Ok, I'll include it since it was there as an optional regulator from the
start and hence implicitly made part of the binding for later PHYs even
though it likely only applies to the older MSM8996/98.

If anyone has access to the documentation they can drop it later.

Johan

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

* Re: [PATCH 16/43] dt-bindings: phy: qcom,qmp-pcie: drop unused vddp-ref-clk supply
@ 2022-07-06  6:03               ` Johan Hovold
  0 siblings, 0 replies; 178+ messages in thread
From: Johan Hovold @ 2022-07-06  6:03 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: Johan Hovold, Vinod Koul, Rob Herring, Krzysztof Kozlowski,
	Andy Gross, Bjorn Andersson, Kishon Vijay Abraham I,
	linux-arm-msm, linux-phy, devicetree, linux-kernel

On Tue, Jul 05, 2022 at 08:13:55PM +0200, Krzysztof Kozlowski wrote:
> On 05/07/2022 14:43, Johan Hovold wrote:

> > So you suggest we keep this regulator for all PHY variants even though
> > it was probably only needed for UFS on some older SoCs?
> 
> No. I commented only that reason is not a good one. The proper reason
> could be: there is or there is no such pin in the device or the history
> tells that adding it for all variants was a mistake.

Ok, I'll include it since it was there as an optional regulator from the
start and hence implicitly made part of the binding for later PHYs even
though it likely only applies to the older MSM8996/98.

If anyone has access to the documentation they can drop it later.

Johan

-- 
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy

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

* Re: [PATCH 17/43] dt-bindings: phy: qcom,qmp-pcie: add missing child node schema
  2022-07-05 18:21             ` Krzysztof Kozlowski
@ 2022-07-06  6:06               ` Johan Hovold
  -1 siblings, 0 replies; 178+ messages in thread
From: Johan Hovold @ 2022-07-06  6:06 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: Johan Hovold, Vinod Koul, Rob Herring, Krzysztof Kozlowski,
	Andy Gross, Bjorn Andersson, Kishon Vijay Abraham I,
	linux-arm-msm, linux-phy, devicetree, linux-kernel

On Tue, Jul 05, 2022 at 08:21:12PM +0200, Krzysztof Kozlowski wrote:
> On 05/07/2022 14:11, Johan Hovold wrote:

> > Ok, so you want to flatten this by repeating also the register
> > descriptions?
> > 
> > That wouldn't hurt readability as much, but doing so would be more error
> > prone as it's easy to miss adding a new compatible in every group of
> > conditionals and there's no else clause to catch the mistake.
> > 
> > Right know the logic is
> > 
> > 	if dual-lane
> > 		items = 6
> > 	else
> > 		items = 3 or 4
> > 		if single-lane-exception
> > 			items = 3
> > 		else
> > 			items = 4
> > 
> > Flattening this gives
> > 
> > 	if dual-lane
> > 		items = 6
> > 	if single-lane-normal
> > 		items = 4
> > 	if single-lane-exception
> > 		items = 3
> > 
> > Which means that every compatible must now be listed in one of the
> > conditionals.
> 
> Yes, because it's explicit and easy to read. Handling compatibles in
> 'else' makes it opposite - one cannot use grep and cannot easily find
> what is actually covered by maxItems:4 (you need to check all 7
> compatibles to find what is not covered here).

I'll go with that then.

Johan

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

* Re: [PATCH 17/43] dt-bindings: phy: qcom,qmp-pcie: add missing child node schema
@ 2022-07-06  6:06               ` Johan Hovold
  0 siblings, 0 replies; 178+ messages in thread
From: Johan Hovold @ 2022-07-06  6:06 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: Johan Hovold, Vinod Koul, Rob Herring, Krzysztof Kozlowski,
	Andy Gross, Bjorn Andersson, Kishon Vijay Abraham I,
	linux-arm-msm, linux-phy, devicetree, linux-kernel

On Tue, Jul 05, 2022 at 08:21:12PM +0200, Krzysztof Kozlowski wrote:
> On 05/07/2022 14:11, Johan Hovold wrote:

> > Ok, so you want to flatten this by repeating also the register
> > descriptions?
> > 
> > That wouldn't hurt readability as much, but doing so would be more error
> > prone as it's easy to miss adding a new compatible in every group of
> > conditionals and there's no else clause to catch the mistake.
> > 
> > Right know the logic is
> > 
> > 	if dual-lane
> > 		items = 6
> > 	else
> > 		items = 3 or 4
> > 		if single-lane-exception
> > 			items = 3
> > 		else
> > 			items = 4
> > 
> > Flattening this gives
> > 
> > 	if dual-lane
> > 		items = 6
> > 	if single-lane-normal
> > 		items = 4
> > 	if single-lane-exception
> > 		items = 3
> > 
> > Which means that every compatible must now be listed in one of the
> > conditionals.
> 
> Yes, because it's explicit and easy to read. Handling compatibles in
> 'else' makes it opposite - one cannot use grep and cannot easily find
> what is actually covered by maxItems:4 (you need to check all 7
> compatibles to find what is not covered here).

I'll go with that then.

Johan

-- 
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy

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

end of thread, other threads:[~2022-07-06  6:06 UTC | newest]

Thread overview: 178+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-05  9:41 [PATCH 00/43] phy: qcom,qmp: fix dt-bindings and deprecate lane suffix Johan Hovold
2022-07-05  9:41 ` Johan Hovold
2022-07-05  9:41 ` [PATCH 01/43] dt-bindings: phy: qcom,qmp: fix bogus clock-cells property Johan Hovold
2022-07-05  9:41   ` Johan Hovold
2022-07-05 10:01   ` Krzysztof Kozlowski
2022-07-05 10:01     ` Krzysztof Kozlowski
2022-07-05  9:41 ` [PATCH 02/43] dt-bindings: phy: qcom,qmp: sort compatible strings Johan Hovold
2022-07-05  9:41   ` Johan Hovold
2022-07-05 10:02   ` Krzysztof Kozlowski
2022-07-05 10:02     ` Krzysztof Kozlowski
2022-07-05  9:41 ` [PATCH 03/43] dt-bindings: phy: qcom,qmp: clean up descriptions Johan Hovold
2022-07-05  9:41   ` Johan Hovold
2022-07-05 10:02   ` Krzysztof Kozlowski
2022-07-05 10:02     ` Krzysztof Kozlowski
2022-07-05  9:42 ` [PATCH 04/43] dt-bindings: phy: qcom,qmp: clean up example Johan Hovold
2022-07-05  9:42   ` Johan Hovold
2022-07-05 10:03   ` Krzysztof Kozlowski
2022-07-05 10:03     ` Krzysztof Kozlowski
2022-07-05  9:42 ` [PATCH 05/43] dt-bindings: phy: qcom,qmp: drop child-node comment Johan Hovold
2022-07-05  9:42   ` Johan Hovold
2022-07-05 10:03   ` Krzysztof Kozlowski
2022-07-05 10:03     ` Krzysztof Kozlowski
2022-07-05  9:42 ` [PATCH 06/43] dt-bindings: phy: qcom,qmp: split out msm8996-qmp-pcie-phy Johan Hovold
2022-07-05  9:42   ` Johan Hovold
2022-07-05 10:08   ` Krzysztof Kozlowski
2022-07-05 10:08     ` Krzysztof Kozlowski
2022-07-05 10:20     ` Johan Hovold
2022-07-05 10:20       ` Johan Hovold
2022-07-05 10:23       ` Krzysztof Kozlowski
2022-07-05 10:23         ` Krzysztof Kozlowski
2022-07-05  9:42 ` [PATCH 07/43] dt-bindings: phy: qcom,msm8996-qmp-pcie: clean up constraints Johan Hovold
2022-07-05  9:42   ` Johan Hovold
2022-07-05 10:09   ` Krzysztof Kozlowski
2022-07-05 10:09     ` Krzysztof Kozlowski
2022-07-05 10:21     ` Johan Hovold
2022-07-05 10:21       ` Johan Hovold
2022-07-05 10:23       ` Krzysztof Kozlowski
2022-07-05 10:23         ` Krzysztof Kozlowski
2022-07-05  9:42 ` [PATCH 08/43] dt-bindings: phy: qcom,msm8996-qmp-pcie: add missing child node schema Johan Hovold
2022-07-05  9:42   ` Johan Hovold
2022-07-05 10:10   ` Krzysztof Kozlowski
2022-07-05 10:10     ` Krzysztof Kozlowski
2022-07-05  9:42 ` [PATCH 09/43] dt-bindings: phy: qcom,msm8996-qmp-pcie: add example node Johan Hovold
2022-07-05  9:42   ` Johan Hovold
2022-07-05 10:10   ` Krzysztof Kozlowski
2022-07-05 10:10     ` Krzysztof Kozlowski
2022-07-05 10:22     ` Johan Hovold
2022-07-05 10:22       ` Johan Hovold
2022-07-05 11:32       ` Krzysztof Kozlowski
2022-07-05 11:32         ` Krzysztof Kozlowski
2022-07-05 12:00         ` Johan Hovold
2022-07-05 12:00           ` Johan Hovold
2022-07-05  9:42 ` [PATCH 10/43] dt-bindings: phy: qcom,msm8996-qmp-pcie: deprecate PIPE clock names Johan Hovold
2022-07-05  9:42   ` Johan Hovold
2022-07-05 10:10   ` Krzysztof Kozlowski
2022-07-05 10:10     ` Krzysztof Kozlowski
2022-07-05  9:42 ` [PATCH 11/43] dt-bindings: phy: qcom,msm8996-qmp-pcie: deprecate reset names Johan Hovold
2022-07-05  9:42   ` Johan Hovold
2022-07-05 10:12   ` Krzysztof Kozlowski
2022-07-05 10:12     ` Krzysztof Kozlowski
2022-07-05 12:14     ` Johan Hovold
2022-07-05 12:14       ` Johan Hovold
2022-07-05  9:42 ` [PATCH 12/43] dt-bindings: phy: qcom,qmp: split out PCIe PHY binding Johan Hovold
2022-07-05  9:42   ` Johan Hovold
2022-07-05 10:13   ` Krzysztof Kozlowski
2022-07-05 10:13     ` Krzysztof Kozlowski
2022-07-05  9:42 ` [PATCH 13/43] dt-bindings: phy: qcom,qmp-pcie: clean up register constraints Johan Hovold
2022-07-05  9:42   ` Johan Hovold
2022-07-05 10:13   ` Krzysztof Kozlowski
2022-07-05 10:13     ` Krzysztof Kozlowski
2022-07-05  9:42 ` [PATCH 14/43] dt-bindings: phy: qcom,qmp-pcie: clean up clock constraints Johan Hovold
2022-07-05  9:42   ` Johan Hovold
2022-07-05 10:14   ` Krzysztof Kozlowski
2022-07-05 10:14     ` Krzysztof Kozlowski
2022-07-05  9:42 ` [PATCH 15/43] dt-bindings: phy: qcom,qmp-pcie: clean up reset constraints Johan Hovold
2022-07-05  9:42   ` Johan Hovold
2022-07-05 10:14   ` Krzysztof Kozlowski
2022-07-05 10:14     ` Krzysztof Kozlowski
2022-07-05  9:42 ` [PATCH 16/43] dt-bindings: phy: qcom,qmp-pcie: drop unused vddp-ref-clk supply Johan Hovold
2022-07-05  9:42   ` Johan Hovold
2022-07-05 10:16   ` Krzysztof Kozlowski
2022-07-05 10:16     ` Krzysztof Kozlowski
2022-07-05 11:46     ` Johan Hovold
2022-07-05 11:46       ` Johan Hovold
2022-07-05 11:59       ` Krzysztof Kozlowski
2022-07-05 11:59         ` Krzysztof Kozlowski
2022-07-05 12:43         ` Johan Hovold
2022-07-05 12:43           ` Johan Hovold
2022-07-05 18:13           ` Krzysztof Kozlowski
2022-07-05 18:13             ` Krzysztof Kozlowski
2022-07-06  6:03             ` Johan Hovold
2022-07-06  6:03               ` Johan Hovold
2022-07-05  9:42 ` [PATCH 17/43] dt-bindings: phy: qcom,qmp-pcie: add missing child node schema Johan Hovold
2022-07-05  9:42   ` Johan Hovold
2022-07-05 10:18   ` Krzysztof Kozlowski
2022-07-05 10:18     ` Krzysztof Kozlowski
2022-07-05 11:51     ` Johan Hovold
2022-07-05 11:51       ` Johan Hovold
2022-07-05 11:56       ` Krzysztof Kozlowski
2022-07-05 11:56         ` Krzysztof Kozlowski
2022-07-05 12:11         ` Johan Hovold
2022-07-05 12:11           ` Johan Hovold
2022-07-05 18:21           ` Krzysztof Kozlowski
2022-07-05 18:21             ` Krzysztof Kozlowski
2022-07-06  6:06             ` Johan Hovold
2022-07-06  6:06               ` Johan Hovold
2022-07-05 14:14   ` Rob Herring
2022-07-05 14:14     ` Rob Herring
2022-07-05  9:42 ` [PATCH 18/43] dt-bindings: phy: qcom,qmp-pcie: add example node Johan Hovold
2022-07-05  9:42   ` Johan Hovold
2022-07-05 10:18   ` Krzysztof Kozlowski
2022-07-05 10:18     ` Krzysztof Kozlowski
2022-07-05  9:42 ` [PATCH 19/43] dt-bindings: phy: qcom,qmp-pcie: deprecate PIPE clock name Johan Hovold
2022-07-05  9:42   ` Johan Hovold
2022-07-05  9:42 ` [PATCH 20/43] dt-bindings: phy: qcom,qmp: split out UFS PHY binding Johan Hovold
2022-07-05  9:42   ` Johan Hovold
2022-07-05 10:19   ` Krzysztof Kozlowski
2022-07-05 10:19     ` Krzysztof Kozlowski
2022-07-05  9:42 ` [PATCH 21/43] dt-bindings: phy: qcom,qmp-ufs: clean up supplies Johan Hovold
2022-07-05  9:42   ` Johan Hovold
2022-07-05  9:42 ` [PATCH 22/43] dt-bindings: phy: qcom,qmp-ufs: clean up reset providers Johan Hovold
2022-07-05  9:42   ` Johan Hovold
2022-07-05  9:42 ` [PATCH 23/43] dt-bindings: phy: qcom,qmp-ufs: clean up clock constraints Johan Hovold
2022-07-05  9:42   ` Johan Hovold
2022-07-05  9:42 ` [PATCH 24/43] dt-bindings: phy: qcom,qmp-ufs: clean up register constraints Johan Hovold
2022-07-05  9:42   ` Johan Hovold
2022-07-05  9:42 ` [PATCH 25/43] dt-bindings: phy: qcom,qmp-ufs: add missing SM8450 clock Johan Hovold
2022-07-05  9:42   ` Johan Hovold
2022-07-05  9:42 ` [PATCH 26/43] dt-bindings: phy: qcom,qmp-ufs: add missing SM8150 power domain Johan Hovold
2022-07-05  9:42   ` Johan Hovold
2022-07-05  9:42 ` [PATCH 27/43] dt-bindings: phy: qcom,qmp-ufs: add missing child node schema Johan Hovold
2022-07-05  9:42   ` Johan Hovold
2022-07-05  9:42 ` [PATCH 28/43] dt-bindings: phy: qcom,qmp-ufs: add example node Johan Hovold
2022-07-05  9:42   ` Johan Hovold
2022-07-05  9:42 ` [PATCH 29/43] dt-bindings: phy: qcom,qmp: split out USB binding Johan Hovold
2022-07-05  9:42   ` Johan Hovold
2022-07-05  9:42 ` [PATCH 30/43] dt-bindings: phy: qcom,qmp-usb: clean up clock constraints Johan Hovold
2022-07-05  9:42   ` Johan Hovold
2022-07-05  9:42 ` [PATCH 31/43] dt-bindings: phy: qcom,qmp-usb: clean up supplies Johan Hovold
2022-07-05  9:42   ` Johan Hovold
2022-07-05  9:42 ` [PATCH 32/43] dt-bindings: phy: qcom,qmp-usb: drop unused vddp-ref-clk supply Johan Hovold
2022-07-05  9:42   ` Johan Hovold
2022-07-05  9:42 ` [PATCH 33/43] dt-bindings: phy: qcom,qmp-usb: clean up reset providers Johan Hovold
2022-07-05  9:42   ` Johan Hovold
2022-07-05  9:42 ` [PATCH 34/43] dt-bindings: phy: qcom,qmp-usb: add missing child node schema Johan Hovold
2022-07-05  9:42   ` Johan Hovold
2022-07-05  9:42 ` [PATCH 35/43] dt-bindings: phy: qcom,qmp-usb: deprecate PIPE clock name Johan Hovold
2022-07-05  9:42   ` Johan Hovold
2022-07-05  9:42 ` [PATCH 36/43] dt-bindings: phy: qcom,qmp-usb3-dp: fix bogus clock-cells property Johan Hovold
2022-07-05  9:42   ` Johan Hovold
2022-07-05  9:42 ` [PATCH 37/43] dt-bindings: phy: qcom,qmp-usb3-dp: deprecate USB PIPE clock name Johan Hovold
2022-07-05  9:42   ` Johan Hovold
2022-07-05  9:42 ` [PATCH 38/43] phy: qcom-qmp-pcie: drop pipe clock lane suffix Johan Hovold
2022-07-05  9:42   ` Johan Hovold
2022-07-05 10:20   ` Krzysztof Kozlowski
2022-07-05 10:20     ` Krzysztof Kozlowski
2022-07-05 11:13     ` Dmitry Baryshkov
2022-07-05 11:13       ` Dmitry Baryshkov
2022-07-05 11:58       ` Johan Hovold
2022-07-05 11:58         ` Johan Hovold
2022-07-05 12:06         ` Krzysztof Kozlowski
2022-07-05 12:06           ` Krzysztof Kozlowski
2022-07-05  9:42 ` [PATCH 39/43] phy: qcom-qmp-combo: drop unused lane reset Johan Hovold
2022-07-05  9:42   ` Johan Hovold
2022-07-05 11:10   ` Dmitry Baryshkov
2022-07-05 11:10     ` Dmitry Baryshkov
2022-07-05  9:42 ` [PATCH 40/43] phy: qcom-qmp-combo: drop pipe clock lane suffix Johan Hovold
2022-07-05  9:42   ` Johan Hovold
2022-07-05 10:20   ` Krzysztof Kozlowski
2022-07-05 10:20     ` Krzysztof Kozlowski
2022-07-05  9:42 ` [PATCH 41/43] phy: qcom-qmp-pcie-msm8996: " Johan Hovold
2022-07-05  9:42   ` Johan Hovold
2022-07-05  9:42 ` [PATCH 42/43] phy: qcom-qmp-pcie-msm8996: drop reset " Johan Hovold
2022-07-05  9:42   ` Johan Hovold
2022-07-05 10:21   ` Krzysztof Kozlowski
2022-07-05 10:21     ` Krzysztof Kozlowski
2022-07-05  9:42 ` [PATCH 43/43] phy: qcom-qmp-usb: drop pipe clock " Johan Hovold
2022-07-05  9:42   ` Johan Hovold

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.