All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3 0/4] Fix  dtbs_check warning(s) for Qualcomm QMP PHY
@ 2022-04-18 20:55 ` Bhupesh Sharma
  0 siblings, 0 replies; 26+ messages in thread
From: Bhupesh Sharma @ 2022-04-18 20:55 UTC (permalink / raw)
  To: linux-arm-msm, linux-phy
  Cc: bhupesh.sharma, bhupesh.linux, agross, linux-kernel, devicetree,
	robh+dt, vkoul, bjorn.andersson, Rob Herring

Changes since v2:
-----------------
- v2 can be found here: https://lore.kernel.org/linux-arm-msm/20220228123019.382037-1-bhupesh.sharma@linaro.org/
- Addressed review comments from Rob and Shawn.
- Collected ACK from Rob on [PATCH 2/4].
- Since, Bjorn accepted 4 patches from v2 already, drop them for this series.
- This series is rebased on linux-next/master.

Changes since v1:
-----------------
- v1 can be found here: https://www.spinics.net/lists/linux-arm-msm/msg104871.html
- Addressed review comments from Dmitry.
- Addressed the remaining dtbs_check warnings rasied by Rob's bot on v1.

Shawn Guo recently fixed a large number of 'dtbs_check' warnings
on Qualcomm DTS files for qmp phys. However a few warnings are still left
(possibly due to new dts files being added over time).

So, I decided to clean them up.
After this series, '$ make dtbs_check' leads to no warning for QCOM
QMP PHY.

Cc: Bjorn Andersson <bjorn.andersson@linaro.org>
Cc: Rob Herring <robh@kernel.org>

Bhupesh Sharma (4):
  dt-bindings: phy: qcom,qmp: Mark '#clock-cells' as a 'optional'
    property
  dt-bindings: phy: qcom,qmp: Describe 'vdda-max-microamp' &
    'vdda-pll-max-microamp' properties
  dt-bindings: phy: qcom,qmp: Describe phy@ subnode properly
  arm64: dts: qcom: sm8450: Fix qmp phy node (use phy@ instead of
    lanes@)

 .../devicetree/bindings/phy/qcom,qmp-phy.yaml | 29 +++++++++++++++----
 arch/arm64/boot/dts/qcom/sm8450.dtsi          |  4 +--
 2 files changed, 26 insertions(+), 7 deletions(-)

-- 
2.35.1


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

* [PATCH v3 0/4] Fix  dtbs_check warning(s) for Qualcomm QMP PHY
@ 2022-04-18 20:55 ` Bhupesh Sharma
  0 siblings, 0 replies; 26+ messages in thread
From: Bhupesh Sharma @ 2022-04-18 20:55 UTC (permalink / raw)
  To: linux-arm-msm, linux-phy
  Cc: bhupesh.sharma, bhupesh.linux, agross, linux-kernel, devicetree,
	robh+dt, vkoul, bjorn.andersson, Rob Herring

Changes since v2:
-----------------
- v2 can be found here: https://lore.kernel.org/linux-arm-msm/20220228123019.382037-1-bhupesh.sharma@linaro.org/
- Addressed review comments from Rob and Shawn.
- Collected ACK from Rob on [PATCH 2/4].
- Since, Bjorn accepted 4 patches from v2 already, drop them for this series.
- This series is rebased on linux-next/master.

Changes since v1:
-----------------
- v1 can be found here: https://www.spinics.net/lists/linux-arm-msm/msg104871.html
- Addressed review comments from Dmitry.
- Addressed the remaining dtbs_check warnings rasied by Rob's bot on v1.

Shawn Guo recently fixed a large number of 'dtbs_check' warnings
on Qualcomm DTS files for qmp phys. However a few warnings are still left
(possibly due to new dts files being added over time).

So, I decided to clean them up.
After this series, '$ make dtbs_check' leads to no warning for QCOM
QMP PHY.

Cc: Bjorn Andersson <bjorn.andersson@linaro.org>
Cc: Rob Herring <robh@kernel.org>

Bhupesh Sharma (4):
  dt-bindings: phy: qcom,qmp: Mark '#clock-cells' as a 'optional'
    property
  dt-bindings: phy: qcom,qmp: Describe 'vdda-max-microamp' &
    'vdda-pll-max-microamp' properties
  dt-bindings: phy: qcom,qmp: Describe phy@ subnode properly
  arm64: dts: qcom: sm8450: Fix qmp phy node (use phy@ instead of
    lanes@)

 .../devicetree/bindings/phy/qcom,qmp-phy.yaml | 29 +++++++++++++++----
 arch/arm64/boot/dts/qcom/sm8450.dtsi          |  4 +--
 2 files changed, 26 insertions(+), 7 deletions(-)

-- 
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] 26+ messages in thread

* [PATCH v3 1/4] dt-bindings: phy: qcom,qmp: Mark '#clock-cells' as a 'optional' property
  2022-04-18 20:55 ` Bhupesh Sharma
@ 2022-04-18 20:55   ` Bhupesh Sharma
  -1 siblings, 0 replies; 26+ messages in thread
From: Bhupesh Sharma @ 2022-04-18 20:55 UTC (permalink / raw)
  To: linux-arm-msm, linux-phy
  Cc: bhupesh.sharma, bhupesh.linux, agross, linux-kernel, devicetree,
	robh+dt, vkoul, bjorn.andersson

'#clock-cells' is not a required property for qmp-phy(s) in the
'/' node, but it should be is used in 'phy@' subnode (where it is
actually a 'required' property). Fix the same.

This also fixes the following 'make dtbs_check' warning(s):

sm8350-microsoft-surface-duo2.dt.yaml: phy@1d87000:
  '#clock-cells' is a required property

Cc: Bjorn Andersson <bjorn.andersson@linaro.org>
Cc: Vinod Koul <vkoul@kernel.org>
Cc: Rob Herring <robh+dt@kernel.org>
Signed-off-by: Bhupesh Sharma <bhupesh.sharma@linaro.org>
---
 Documentation/devicetree/bindings/phy/qcom,qmp-phy.yaml | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/Documentation/devicetree/bindings/phy/qcom,qmp-phy.yaml b/Documentation/devicetree/bindings/phy/qcom,qmp-phy.yaml
index 8b850c5ab116..c39ead81ecd7 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 ]
 
@@ -112,11 +109,13 @@ patternProperties:
     description:
       Each device node of QMP phy is required to have as many child nodes as
       the number of lanes the PHY has.
+    properties:
+      "#clock-cells":
+        enum: [ 0, 1, 2 ]
 
 required:
   - compatible
   - reg
-  - "#clock-cells"
   - "#address-cells"
   - "#size-cells"
   - ranges
@@ -468,7 +467,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] 26+ messages in thread

* [PATCH v3 1/4] dt-bindings: phy: qcom, qmp: Mark '#clock-cells' as a 'optional' property
@ 2022-04-18 20:55   ` Bhupesh Sharma
  0 siblings, 0 replies; 26+ messages in thread
From: Bhupesh Sharma @ 2022-04-18 20:55 UTC (permalink / raw)
  To: linux-arm-msm, linux-phy
  Cc: bhupesh.sharma, bhupesh.linux, agross, linux-kernel, devicetree,
	robh+dt, vkoul, bjorn.andersson

'#clock-cells' is not a required property for qmp-phy(s) in the
'/' node, but it should be is used in 'phy@' subnode (where it is
actually a 'required' property). Fix the same.

This also fixes the following 'make dtbs_check' warning(s):

sm8350-microsoft-surface-duo2.dt.yaml: phy@1d87000:
  '#clock-cells' is a required property

Cc: Bjorn Andersson <bjorn.andersson@linaro.org>
Cc: Vinod Koul <vkoul@kernel.org>
Cc: Rob Herring <robh+dt@kernel.org>
Signed-off-by: Bhupesh Sharma <bhupesh.sharma@linaro.org>
---
 Documentation/devicetree/bindings/phy/qcom,qmp-phy.yaml | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/Documentation/devicetree/bindings/phy/qcom,qmp-phy.yaml b/Documentation/devicetree/bindings/phy/qcom,qmp-phy.yaml
index 8b850c5ab116..c39ead81ecd7 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 ]
 
@@ -112,11 +109,13 @@ patternProperties:
     description:
       Each device node of QMP phy is required to have as many child nodes as
       the number of lanes the PHY has.
+    properties:
+      "#clock-cells":
+        enum: [ 0, 1, 2 ]
 
 required:
   - compatible
   - reg
-  - "#clock-cells"
   - "#address-cells"
   - "#size-cells"
   - ranges
@@ -468,7 +467,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] 26+ messages in thread

* [PATCH v3 2/4] dt-bindings: phy: qcom,qmp: Describe 'vdda-max-microamp' & 'vdda-pll-max-microamp' properties
  2022-04-18 20:55 ` Bhupesh Sharma
@ 2022-04-18 20:55   ` Bhupesh Sharma
  -1 siblings, 0 replies; 26+ messages in thread
From: Bhupesh Sharma @ 2022-04-18 20:55 UTC (permalink / raw)
  To: linux-arm-msm, linux-phy
  Cc: bhupesh.sharma, bhupesh.linux, agross, linux-kernel, devicetree,
	robh+dt, vkoul, bjorn.andersson, Rob Herring

Since a few boards based on QCoM qmp phy use the
'vdda-max-microamp' & 'vdda-pll-max-microamp' properties to
describe the ufs phy nodes, add them to the dt-bindings doc as well.

This fixes the following '$ make dtbs_check' warning(s):

sm8350-microsoft-surface-duo2.dt.yaml: phy@1d87000:
  'vdda-max-microamp', 'vdda-pll-max-microamp' do not match any of
   the regexes: '^phy@[0-9a-f]+$', 'pinctrl-[0-9]+'

Cc: Bjorn Andersson <bjorn.andersson@linaro.org>
Cc: Vinod Koul <vkoul@kernel.org>
Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Bhupesh Sharma <bhupesh.sharma@linaro.org>
---
 Documentation/devicetree/bindings/phy/qcom,qmp-phy.yaml | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/Documentation/devicetree/bindings/phy/qcom,qmp-phy.yaml b/Documentation/devicetree/bindings/phy/qcom,qmp-phy.yaml
index c39ead81ecd7..411c79dbfa15 100644
--- a/Documentation/devicetree/bindings/phy/qcom,qmp-phy.yaml
+++ b/Documentation/devicetree/bindings/phy/qcom,qmp-phy.yaml
@@ -90,6 +90,14 @@ properties:
     minItems: 1
     maxItems: 3
 
+  vdda-max-microamp:
+    description:
+      Specifies max. load that can be drawn from phy supply.
+
+  vdda-pll-max-microamp:
+    description:
+      Specifies max. load that can be drawn from pll supply.
+
   vdda-phy-supply:
     description:
       Phandle to a regulator supply to PHY core block.
-- 
2.35.1


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

* [PATCH v3 2/4] dt-bindings: phy: qcom, qmp: Describe 'vdda-max-microamp' & 'vdda-pll-max-microamp' properties
@ 2022-04-18 20:55   ` Bhupesh Sharma
  0 siblings, 0 replies; 26+ messages in thread
From: Bhupesh Sharma @ 2022-04-18 20:55 UTC (permalink / raw)
  To: linux-arm-msm, linux-phy
  Cc: bhupesh.sharma, bhupesh.linux, agross, linux-kernel, devicetree,
	robh+dt, vkoul, bjorn.andersson, Rob Herring

Since a few boards based on QCoM qmp phy use the
'vdda-max-microamp' & 'vdda-pll-max-microamp' properties to
describe the ufs phy nodes, add them to the dt-bindings doc as well.

This fixes the following '$ make dtbs_check' warning(s):

sm8350-microsoft-surface-duo2.dt.yaml: phy@1d87000:
  'vdda-max-microamp', 'vdda-pll-max-microamp' do not match any of
   the regexes: '^phy@[0-9a-f]+$', 'pinctrl-[0-9]+'

Cc: Bjorn Andersson <bjorn.andersson@linaro.org>
Cc: Vinod Koul <vkoul@kernel.org>
Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Bhupesh Sharma <bhupesh.sharma@linaro.org>
---
 Documentation/devicetree/bindings/phy/qcom,qmp-phy.yaml | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/Documentation/devicetree/bindings/phy/qcom,qmp-phy.yaml b/Documentation/devicetree/bindings/phy/qcom,qmp-phy.yaml
index c39ead81ecd7..411c79dbfa15 100644
--- a/Documentation/devicetree/bindings/phy/qcom,qmp-phy.yaml
+++ b/Documentation/devicetree/bindings/phy/qcom,qmp-phy.yaml
@@ -90,6 +90,14 @@ properties:
     minItems: 1
     maxItems: 3
 
+  vdda-max-microamp:
+    description:
+      Specifies max. load that can be drawn from phy supply.
+
+  vdda-pll-max-microamp:
+    description:
+      Specifies max. load that can be drawn from pll supply.
+
   vdda-phy-supply:
     description:
       Phandle to a regulator supply to PHY core block.
-- 
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] 26+ messages in thread

* [PATCH v3 3/4] dt-bindings: phy: qcom,qmp: Describe phy@ subnode properly
  2022-04-18 20:55 ` Bhupesh Sharma
@ 2022-04-18 20:55   ` Bhupesh Sharma
  -1 siblings, 0 replies; 26+ messages in thread
From: Bhupesh Sharma @ 2022-04-18 20:55 UTC (permalink / raw)
  To: linux-arm-msm, linux-phy
  Cc: bhupesh.sharma, bhupesh.linux, agross, linux-kernel, devicetree,
	robh+dt, vkoul, bjorn.andersson, Rob Herring

Currently the qcom,qmp-phy dt-binding doesn't describe
the 'reg' and '#phy-cells' properties for the phy@ subnode.

Fix the same.

Cc: Bjorn Andersson <bjorn.andersson@linaro.org>
Cc: Rob Herring <robh@kernel.org>
Signed-off-by: Bhupesh Sharma <bhupesh.sharma@linaro.org>
---
 .../devicetree/bindings/phy/qcom,qmp-phy.yaml       | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/Documentation/devicetree/bindings/phy/qcom,qmp-phy.yaml b/Documentation/devicetree/bindings/phy/qcom,qmp-phy.yaml
index 411c79dbfa15..c553c8ad0d1a 100644
--- a/Documentation/devicetree/bindings/phy/qcom,qmp-phy.yaml
+++ b/Documentation/devicetree/bindings/phy/qcom,qmp-phy.yaml
@@ -118,6 +118,19 @@ patternProperties:
       Each device node of QMP phy is required to have as many child nodes as
       the number of lanes the PHY has.
     properties:
+      reg:
+        minItems: 1
+        maxItems: 6
+        items:
+          description: |
+            List of offset and length pairs of register sets for PHY blocks.
+            common block control registers, such as - SW_RESET, START_CTRL.
+            pcs registers, such as - PCS_STATUS, POWER_DOWN_CONTROL,
+            pcs misc registers, such as - PCS_MISC_TYPEC_CTRL.
+
+      "#phy-cells":
+        const: 0
+
       "#clock-cells":
         enum: [ 0, 1, 2 ]
 
-- 
2.35.1


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

* [PATCH v3 3/4] dt-bindings: phy: qcom, qmp: Describe phy@ subnode properly
@ 2022-04-18 20:55   ` Bhupesh Sharma
  0 siblings, 0 replies; 26+ messages in thread
From: Bhupesh Sharma @ 2022-04-18 20:55 UTC (permalink / raw)
  To: linux-arm-msm, linux-phy
  Cc: bhupesh.sharma, bhupesh.linux, agross, linux-kernel, devicetree,
	robh+dt, vkoul, bjorn.andersson, Rob Herring

Currently the qcom,qmp-phy dt-binding doesn't describe
the 'reg' and '#phy-cells' properties for the phy@ subnode.

Fix the same.

Cc: Bjorn Andersson <bjorn.andersson@linaro.org>
Cc: Rob Herring <robh@kernel.org>
Signed-off-by: Bhupesh Sharma <bhupesh.sharma@linaro.org>
---
 .../devicetree/bindings/phy/qcom,qmp-phy.yaml       | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/Documentation/devicetree/bindings/phy/qcom,qmp-phy.yaml b/Documentation/devicetree/bindings/phy/qcom,qmp-phy.yaml
index 411c79dbfa15..c553c8ad0d1a 100644
--- a/Documentation/devicetree/bindings/phy/qcom,qmp-phy.yaml
+++ b/Documentation/devicetree/bindings/phy/qcom,qmp-phy.yaml
@@ -118,6 +118,19 @@ patternProperties:
       Each device node of QMP phy is required to have as many child nodes as
       the number of lanes the PHY has.
     properties:
+      reg:
+        minItems: 1
+        maxItems: 6
+        items:
+          description: |
+            List of offset and length pairs of register sets for PHY blocks.
+            common block control registers, such as - SW_RESET, START_CTRL.
+            pcs registers, such as - PCS_STATUS, POWER_DOWN_CONTROL,
+            pcs misc registers, such as - PCS_MISC_TYPEC_CTRL.
+
+      "#phy-cells":
+        const: 0
+
       "#clock-cells":
         enum: [ 0, 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] 26+ messages in thread

* [PATCH v3 4/4] arm64: dts: qcom: sm8450: Fix qmp phy node (use phy@ instead of lanes@)
  2022-04-18 20:55 ` Bhupesh Sharma
@ 2022-04-18 20:55   ` Bhupesh Sharma
  -1 siblings, 0 replies; 26+ messages in thread
From: Bhupesh Sharma @ 2022-04-18 20:55 UTC (permalink / raw)
  To: linux-arm-msm, linux-phy
  Cc: bhupesh.sharma, bhupesh.linux, agross, linux-kernel, devicetree,
	robh+dt, vkoul, bjorn.andersson, Rob Herring

Fix the following 'make dtbs_check' warning(s) by
using phy@ instead of lanes@:
arch/arm64/boot/dts/qcom/sm8450-hdk.dtb: phy@1c0f000: 'lanes@1c0e000'
  does not match any of the regexes: '^phy@[0-9a-f]+$', 'pinctrl-[0-9]+'

Cc: Bjorn Andersson <bjorn.andersson@linaro.org>
Cc: Rob Herring <robh@kernel.org>
Signed-off-by: Bhupesh Sharma <bhupesh.sharma@linaro.org>
---
 arch/arm64/boot/dts/qcom/sm8450.dtsi | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/arm64/boot/dts/qcom/sm8450.dtsi b/arch/arm64/boot/dts/qcom/sm8450.dtsi
index 2cfc67b75259..721bd9495eb6 100644
--- a/arch/arm64/boot/dts/qcom/sm8450.dtsi
+++ b/arch/arm64/boot/dts/qcom/sm8450.dtsi
@@ -851,7 +851,7 @@ pcie0_phy: phy@1c06000 {
 
 			status = "disabled";
 
-			pcie0_lane: lanes@1c06200 {
+			pcie0_lane: phy@1c06200 {
 				reg = <0 0x1c06e00 0 0x200>, /* tx */
 				      <0 0x1c07000 0 0x200>, /* rx */
 				      <0 0x1c06200 0 0x200>, /* pcs */
@@ -958,7 +958,7 @@ pcie1_phy: phy@1c0f000 {
 
 			status = "disabled";
 
-			pcie1_lane: lanes@1c0e000 {
+			pcie1_lane: phy@1c0e000 {
 				reg = <0 0x1c0e000 0 0x200>, /* tx */
 				      <0 0x1c0e200 0 0x300>, /* rx */
 				      <0 0x1c0f200 0 0x200>, /* pcs */
-- 
2.35.1


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

* [PATCH v3 4/4] arm64: dts: qcom: sm8450: Fix qmp phy node (use phy@ instead of lanes@)
@ 2022-04-18 20:55   ` Bhupesh Sharma
  0 siblings, 0 replies; 26+ messages in thread
From: Bhupesh Sharma @ 2022-04-18 20:55 UTC (permalink / raw)
  To: linux-arm-msm, linux-phy
  Cc: bhupesh.sharma, bhupesh.linux, agross, linux-kernel, devicetree,
	robh+dt, vkoul, bjorn.andersson, Rob Herring

Fix the following 'make dtbs_check' warning(s) by
using phy@ instead of lanes@:
arch/arm64/boot/dts/qcom/sm8450-hdk.dtb: phy@1c0f000: 'lanes@1c0e000'
  does not match any of the regexes: '^phy@[0-9a-f]+$', 'pinctrl-[0-9]+'

Cc: Bjorn Andersson <bjorn.andersson@linaro.org>
Cc: Rob Herring <robh@kernel.org>
Signed-off-by: Bhupesh Sharma <bhupesh.sharma@linaro.org>
---
 arch/arm64/boot/dts/qcom/sm8450.dtsi | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/arm64/boot/dts/qcom/sm8450.dtsi b/arch/arm64/boot/dts/qcom/sm8450.dtsi
index 2cfc67b75259..721bd9495eb6 100644
--- a/arch/arm64/boot/dts/qcom/sm8450.dtsi
+++ b/arch/arm64/boot/dts/qcom/sm8450.dtsi
@@ -851,7 +851,7 @@ pcie0_phy: phy@1c06000 {
 
 			status = "disabled";
 
-			pcie0_lane: lanes@1c06200 {
+			pcie0_lane: phy@1c06200 {
 				reg = <0 0x1c06e00 0 0x200>, /* tx */
 				      <0 0x1c07000 0 0x200>, /* rx */
 				      <0 0x1c06200 0 0x200>, /* pcs */
@@ -958,7 +958,7 @@ pcie1_phy: phy@1c0f000 {
 
 			status = "disabled";
 
-			pcie1_lane: lanes@1c0e000 {
+			pcie1_lane: phy@1c0e000 {
 				reg = <0 0x1c0e000 0 0x200>, /* tx */
 				      <0 0x1c0e200 0 0x300>, /* rx */
 				      <0 0x1c0f200 0 0x200>, /* pcs */
-- 
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] 26+ messages in thread

* Re: [PATCH v3 2/4] dt-bindings: phy: qcom,qmp: Describe 'vdda-max-microamp' & 'vdda-pll-max-microamp' properties
  2022-04-18 20:55   ` [PATCH v3 2/4] dt-bindings: phy: qcom, qmp: " Bhupesh Sharma
@ 2022-04-18 22:34     ` Dmitry Baryshkov
  -1 siblings, 0 replies; 26+ messages in thread
From: Dmitry Baryshkov @ 2022-04-18 22:34 UTC (permalink / raw)
  To: Bhupesh Sharma
  Cc: linux-arm-msm, linux-phy, bhupesh.linux, agross, linux-kernel,
	devicetree, robh+dt, vkoul, bjorn.andersson, Rob Herring

On Mon, 18 Apr 2022 at 23:55, Bhupesh Sharma <bhupesh.sharma@linaro.org> wrote:
>
> Since a few boards based on QCoM qmp phy use the
> 'vdda-max-microamp' & 'vdda-pll-max-microamp' properties to
> describe the ufs phy nodes, add them to the dt-bindings doc as well.

Ugh. They give a false sense that they are supported. I think in
reality they are not used by the kernel.
So, ideally, this patch should be accompanied with regulator core change.
Or (better) drop them completely.

>
> This fixes the following '$ make dtbs_check' warning(s):
>
> sm8350-microsoft-surface-duo2.dt.yaml: phy@1d87000:
>   'vdda-max-microamp', 'vdda-pll-max-microamp' do not match any of
>    the regexes: '^phy@[0-9a-f]+$', 'pinctrl-[0-9]+'
>
> Cc: Bjorn Andersson <bjorn.andersson@linaro.org>
> Cc: Vinod Koul <vkoul@kernel.org>
> Acked-by: Rob Herring <robh@kernel.org>
> Signed-off-by: Bhupesh Sharma <bhupesh.sharma@linaro.org>
> ---
>  Documentation/devicetree/bindings/phy/qcom,qmp-phy.yaml | 8 ++++++++
>  1 file changed, 8 insertions(+)
>
> diff --git a/Documentation/devicetree/bindings/phy/qcom,qmp-phy.yaml b/Documentation/devicetree/bindings/phy/qcom,qmp-phy.yaml
> index c39ead81ecd7..411c79dbfa15 100644
> --- a/Documentation/devicetree/bindings/phy/qcom,qmp-phy.yaml
> +++ b/Documentation/devicetree/bindings/phy/qcom,qmp-phy.yaml
> @@ -90,6 +90,14 @@ properties:
>      minItems: 1
>      maxItems: 3
>
> +  vdda-max-microamp:
> +    description:
> +      Specifies max. load that can be drawn from phy supply.
> +
> +  vdda-pll-max-microamp:
> +    description:
> +      Specifies max. load that can be drawn from pll supply.
> +
>    vdda-phy-supply:
>      description:
>        Phandle to a regulator supply to PHY core block.
> --
> 2.35.1
>


-- 
With best wishes
Dmitry

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

* Re: [PATCH v3 2/4] dt-bindings: phy: qcom,qmp: Describe 'vdda-max-microamp' & 'vdda-pll-max-microamp' properties
@ 2022-04-18 22:34     ` Dmitry Baryshkov
  0 siblings, 0 replies; 26+ messages in thread
From: Dmitry Baryshkov @ 2022-04-18 22:34 UTC (permalink / raw)
  To: Bhupesh Sharma
  Cc: linux-arm-msm, linux-phy, bhupesh.linux, agross, linux-kernel,
	devicetree, robh+dt, vkoul, bjorn.andersson, Rob Herring

On Mon, 18 Apr 2022 at 23:55, Bhupesh Sharma <bhupesh.sharma@linaro.org> wrote:
>
> Since a few boards based on QCoM qmp phy use the
> 'vdda-max-microamp' & 'vdda-pll-max-microamp' properties to
> describe the ufs phy nodes, add them to the dt-bindings doc as well.

Ugh. They give a false sense that they are supported. I think in
reality they are not used by the kernel.
So, ideally, this patch should be accompanied with regulator core change.
Or (better) drop them completely.

>
> This fixes the following '$ make dtbs_check' warning(s):
>
> sm8350-microsoft-surface-duo2.dt.yaml: phy@1d87000:
>   'vdda-max-microamp', 'vdda-pll-max-microamp' do not match any of
>    the regexes: '^phy@[0-9a-f]+$', 'pinctrl-[0-9]+'
>
> Cc: Bjorn Andersson <bjorn.andersson@linaro.org>
> Cc: Vinod Koul <vkoul@kernel.org>
> Acked-by: Rob Herring <robh@kernel.org>
> Signed-off-by: Bhupesh Sharma <bhupesh.sharma@linaro.org>
> ---
>  Documentation/devicetree/bindings/phy/qcom,qmp-phy.yaml | 8 ++++++++
>  1 file changed, 8 insertions(+)
>
> diff --git a/Documentation/devicetree/bindings/phy/qcom,qmp-phy.yaml b/Documentation/devicetree/bindings/phy/qcom,qmp-phy.yaml
> index c39ead81ecd7..411c79dbfa15 100644
> --- a/Documentation/devicetree/bindings/phy/qcom,qmp-phy.yaml
> +++ b/Documentation/devicetree/bindings/phy/qcom,qmp-phy.yaml
> @@ -90,6 +90,14 @@ properties:
>      minItems: 1
>      maxItems: 3
>
> +  vdda-max-microamp:
> +    description:
> +      Specifies max. load that can be drawn from phy supply.
> +
> +  vdda-pll-max-microamp:
> +    description:
> +      Specifies max. load that can be drawn from pll supply.
> +
>    vdda-phy-supply:
>      description:
>        Phandle to a regulator supply to PHY core block.
> --
> 2.35.1
>


-- 
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] 26+ messages in thread

* Re: [PATCH v3 2/4] dt-bindings: phy: qcom,qmp: Describe 'vdda-max-microamp' & 'vdda-pll-max-microamp' properties
  2022-04-18 22:34     ` Dmitry Baryshkov
@ 2022-04-19  3:36       ` Bhupesh Sharma
  -1 siblings, 0 replies; 26+ messages in thread
From: Bhupesh Sharma @ 2022-04-19  3:36 UTC (permalink / raw)
  To: Dmitry Baryshkov
  Cc: linux-arm-msm, linux-phy, bhupesh.linux, agross, linux-kernel,
	devicetree, robh+dt, vkoul, bjorn.andersson, Rob Herring

On Tue, 19 Apr 2022 at 04:04, Dmitry Baryshkov
<dmitry.baryshkov@linaro.org> wrote:
>
> On Mon, 18 Apr 2022 at 23:55, Bhupesh Sharma <bhupesh.sharma@linaro.org> wrote:
> >
> > Since a few boards based on QCoM qmp phy use the
> > 'vdda-max-microamp' & 'vdda-pll-max-microamp' properties to
> > describe the ufs phy nodes, add them to the dt-bindings doc as well.
>
> Ugh. They give a false sense that they are supported. I think in
> reality they are not used by the kernel.
> So, ideally, this patch should be accompanied with regulator core change.
> Or (better) drop them completely.

Indeed. However, the earlier reviews were contrary to this
understanding. Maybe, @Bjorn Andersson can help with more background
on the same.

Although I agree that since this appears mainly in sm8450 and sm8350
dts and is relevant for ufs qmp phy nodes, I can send patches for
cleaning up the dts files instead.

My hunch is that these have been copied over into the qcom dts/dtsi
files from the similar  ones described in [1].

[1]. https://www.kernel.org/doc/Documentation/devicetree/bindings/ufs/ufs-qcom.txt

Thanks,
Bhupesh


> >
> > This fixes the following '$ make dtbs_check' warning(s):
> >
> > sm8350-microsoft-surface-duo2.dt.yaml: phy@1d87000:
> >   'vdda-max-microamp', 'vdda-pll-max-microamp' do not match any of
> >    the regexes: '^phy@[0-9a-f]+$', 'pinctrl-[0-9]+'
> >
> > Cc: Bjorn Andersson <bjorn.andersson@linaro.org>
> > Cc: Vinod Koul <vkoul@kernel.org>
> > Acked-by: Rob Herring <robh@kernel.org>
> > Signed-off-by: Bhupesh Sharma <bhupesh.sharma@linaro.org>
> > ---
> >  Documentation/devicetree/bindings/phy/qcom,qmp-phy.yaml | 8 ++++++++
> >  1 file changed, 8 insertions(+)
> >
> > diff --git a/Documentation/devicetree/bindings/phy/qcom,qmp-phy.yaml b/Documentation/devicetree/bindings/phy/qcom,qmp-phy.yaml
> > index c39ead81ecd7..411c79dbfa15 100644
> > --- a/Documentation/devicetree/bindings/phy/qcom,qmp-phy.yaml
> > +++ b/Documentation/devicetree/bindings/phy/qcom,qmp-phy.yaml
> > @@ -90,6 +90,14 @@ properties:
> >      minItems: 1
> >      maxItems: 3
> >
> > +  vdda-max-microamp:
> > +    description:
> > +      Specifies max. load that can be drawn from phy supply.
> > +
> > +  vdda-pll-max-microamp:
> > +    description:
> > +      Specifies max. load that can be drawn from pll supply.
> > +
> >    vdda-phy-supply:
> >      description:
> >        Phandle to a regulator supply to PHY core block.
> > --
> > 2.35.1
> >
>
>
> --
> With best wishes
> Dmitry

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

* Re: [PATCH v3 2/4] dt-bindings: phy: qcom,qmp: Describe 'vdda-max-microamp' & 'vdda-pll-max-microamp' properties
@ 2022-04-19  3:36       ` Bhupesh Sharma
  0 siblings, 0 replies; 26+ messages in thread
From: Bhupesh Sharma @ 2022-04-19  3:36 UTC (permalink / raw)
  To: Dmitry Baryshkov
  Cc: linux-arm-msm, linux-phy, bhupesh.linux, agross, linux-kernel,
	devicetree, robh+dt, vkoul, bjorn.andersson, Rob Herring

On Tue, 19 Apr 2022 at 04:04, Dmitry Baryshkov
<dmitry.baryshkov@linaro.org> wrote:
>
> On Mon, 18 Apr 2022 at 23:55, Bhupesh Sharma <bhupesh.sharma@linaro.org> wrote:
> >
> > Since a few boards based on QCoM qmp phy use the
> > 'vdda-max-microamp' & 'vdda-pll-max-microamp' properties to
> > describe the ufs phy nodes, add them to the dt-bindings doc as well.
>
> Ugh. They give a false sense that they are supported. I think in
> reality they are not used by the kernel.
> So, ideally, this patch should be accompanied with regulator core change.
> Or (better) drop them completely.

Indeed. However, the earlier reviews were contrary to this
understanding. Maybe, @Bjorn Andersson can help with more background
on the same.

Although I agree that since this appears mainly in sm8450 and sm8350
dts and is relevant for ufs qmp phy nodes, I can send patches for
cleaning up the dts files instead.

My hunch is that these have been copied over into the qcom dts/dtsi
files from the similar  ones described in [1].

[1]. https://www.kernel.org/doc/Documentation/devicetree/bindings/ufs/ufs-qcom.txt

Thanks,
Bhupesh


> >
> > This fixes the following '$ make dtbs_check' warning(s):
> >
> > sm8350-microsoft-surface-duo2.dt.yaml: phy@1d87000:
> >   'vdda-max-microamp', 'vdda-pll-max-microamp' do not match any of
> >    the regexes: '^phy@[0-9a-f]+$', 'pinctrl-[0-9]+'
> >
> > Cc: Bjorn Andersson <bjorn.andersson@linaro.org>
> > Cc: Vinod Koul <vkoul@kernel.org>
> > Acked-by: Rob Herring <robh@kernel.org>
> > Signed-off-by: Bhupesh Sharma <bhupesh.sharma@linaro.org>
> > ---
> >  Documentation/devicetree/bindings/phy/qcom,qmp-phy.yaml | 8 ++++++++
> >  1 file changed, 8 insertions(+)
> >
> > diff --git a/Documentation/devicetree/bindings/phy/qcom,qmp-phy.yaml b/Documentation/devicetree/bindings/phy/qcom,qmp-phy.yaml
> > index c39ead81ecd7..411c79dbfa15 100644
> > --- a/Documentation/devicetree/bindings/phy/qcom,qmp-phy.yaml
> > +++ b/Documentation/devicetree/bindings/phy/qcom,qmp-phy.yaml
> > @@ -90,6 +90,14 @@ properties:
> >      minItems: 1
> >      maxItems: 3
> >
> > +  vdda-max-microamp:
> > +    description:
> > +      Specifies max. load that can be drawn from phy supply.
> > +
> > +  vdda-pll-max-microamp:
> > +    description:
> > +      Specifies max. load that can be drawn from pll supply.
> > +
> >    vdda-phy-supply:
> >      description:
> >        Phandle to a regulator supply to PHY core block.
> > --
> > 2.35.1
> >
>
>
> --
> 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] 26+ messages in thread

* Re: [PATCH v3 1/4] dt-bindings: phy: qcom,qmp: Mark '#clock-cells' as a 'optional' property
  2022-04-18 20:55   ` [PATCH v3 1/4] dt-bindings: phy: qcom, qmp: " Bhupesh Sharma
@ 2022-04-19 12:12     ` Rob Herring
  -1 siblings, 0 replies; 26+ messages in thread
From: Rob Herring @ 2022-04-19 12:12 UTC (permalink / raw)
  To: Bhupesh Sharma
  Cc: robh+dt, linux-kernel, linux-arm-msm, vkoul, linux-phy,
	devicetree, bhupesh.linux, bjorn.andersson, agross

On Tue, 19 Apr 2022 02:25:06 +0530, Bhupesh Sharma wrote:
> '#clock-cells' is not a required property for qmp-phy(s) in the
> '/' node, but it should be is used in 'phy@' subnode (where it is
> actually a 'required' property). Fix the same.
> 
> This also fixes the following 'make dtbs_check' warning(s):
> 
> sm8350-microsoft-surface-duo2.dt.yaml: phy@1d87000:
>   '#clock-cells' is a required property
> 
> Cc: Bjorn Andersson <bjorn.andersson@linaro.org>
> Cc: Vinod Koul <vkoul@kernel.org>
> Cc: Rob Herring <robh+dt@kernel.org>
> Signed-off-by: Bhupesh Sharma <bhupesh.sharma@linaro.org>
> ---
>  Documentation/devicetree/bindings/phy/qcom,qmp-phy.yaml | 8 +++-----
>  1 file changed, 3 insertions(+), 5 deletions(-)
> 

Running 'make dtbs_check' with the schema in this patch gives the
following warnings. Consider if they are expected or the schema is
incorrect. These may not be new warnings.

Note that it is not yet a requirement to have 0 warnings for dtbs_check.
This will change in the future.

Full log is available here: https://patchwork.ozlabs.org/patch/


phy@1c07000: 'lanes@1c06000' does not match any of the regexes: '^phy@[0-9a-f]+$', 'pinctrl-[0-9]+'
	arch/arm/boot/dts/qcom-sdx55-mtp.dtb
	arch/arm/boot/dts/qcom-sdx55-t55.dtb
	arch/arm/boot/dts/qcom-sdx55-telit-fn980-tlb.dtb

phy@1c0e000: 'lanes@1c0e200' does not match any of the regexes: '^phy@[0-9a-f]+$', 'pinctrl-[0-9]+'
	arch/arm64/boot/dts/qcom/sc7280-crd.dtb
	arch/arm64/boot/dts/qcom/sc7280-herobrine-herobrine-r0.dtb
	arch/arm64/boot/dts/qcom/sc7280-herobrine-herobrine-r1.dtb
	arch/arm64/boot/dts/qcom/sc7280-idp2.dtb
	arch/arm64/boot/dts/qcom/sc7280-idp.dtb

phy@1d87000: 'lanes@1d87400', 'vdda-max-microamp', 'vdda-pll-max-microamp' do not match any of the regexes: '^phy@[0-9a-f]+$', 'pinctrl-[0-9]+'
	arch/arm64/boot/dts/qcom/sm8450-hdk.dtb
	arch/arm64/boot/dts/qcom/sm8450-qrd.dtb

phy@1d87000: 'vdda-max-microamp', 'vdda-pll-max-microamp' do not match any of the regexes: '^phy@[0-9a-f]+$', 'pinctrl-[0-9]+'
	arch/arm64/boot/dts/qcom/sm8350-microsoft-surface-duo2.dtb

phy@627000: 'vdda-phy-max-microamp', 'vdda-pll-max-microamp', 'vddp-ref-clk-always-on', 'vddp-ref-clk-max-microamp' do not match any of the regexes: '^phy@[0-9a-f]+$', 'pinctrl-[0-9]+'
	arch/arm64/boot/dts/qcom/msm8996-xiaomi-gemini.dtb
	arch/arm64/boot/dts/qcom/msm8996-xiaomi-scorpio.dtb

phy-wrapper@88e9000: 'vdda-phy-supply' is a required property
	arch/arm64/boot/dts/qcom/sm8350-sony-xperia-sagami-pdx214.dtb
	arch/arm64/boot/dts/qcom/sm8350-sony-xperia-sagami-pdx215.dtb

phy-wrapper@88e9000: 'vdda-pll-supply' is a required property
	arch/arm64/boot/dts/qcom/sm8350-sony-xperia-sagami-pdx214.dtb
	arch/arm64/boot/dts/qcom/sm8350-sony-xperia-sagami-pdx215.dtb

ssphy@78000: '#clock-cells', 'lane@78200' do not match any of the regexes: '^phy@[0-9a-f]+$', 'pinctrl-[0-9]+'
	arch/arm64/boot/dts/qcom/ipq6018-cp01-c1.dtb


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

* Re: [PATCH v3 1/4] dt-bindings: phy: qcom, qmp: Mark '#clock-cells' as a 'optional' property
@ 2022-04-19 12:12     ` Rob Herring
  0 siblings, 0 replies; 26+ messages in thread
From: Rob Herring @ 2022-04-19 12:12 UTC (permalink / raw)
  To: Bhupesh Sharma
  Cc: robh+dt, linux-kernel, linux-arm-msm, vkoul, linux-phy,
	devicetree, bhupesh.linux, bjorn.andersson, agross

On Tue, 19 Apr 2022 02:25:06 +0530, Bhupesh Sharma wrote:
> '#clock-cells' is not a required property for qmp-phy(s) in the
> '/' node, but it should be is used in 'phy@' subnode (where it is
> actually a 'required' property). Fix the same.
> 
> This also fixes the following 'make dtbs_check' warning(s):
> 
> sm8350-microsoft-surface-duo2.dt.yaml: phy@1d87000:
>   '#clock-cells' is a required property
> 
> Cc: Bjorn Andersson <bjorn.andersson@linaro.org>
> Cc: Vinod Koul <vkoul@kernel.org>
> Cc: Rob Herring <robh+dt@kernel.org>
> Signed-off-by: Bhupesh Sharma <bhupesh.sharma@linaro.org>
> ---
>  Documentation/devicetree/bindings/phy/qcom,qmp-phy.yaml | 8 +++-----
>  1 file changed, 3 insertions(+), 5 deletions(-)
> 

Running 'make dtbs_check' with the schema in this patch gives the
following warnings. Consider if they are expected or the schema is
incorrect. These may not be new warnings.

Note that it is not yet a requirement to have 0 warnings for dtbs_check.
This will change in the future.

Full log is available here: https://patchwork.ozlabs.org/patch/


phy@1c07000: 'lanes@1c06000' does not match any of the regexes: '^phy@[0-9a-f]+$', 'pinctrl-[0-9]+'
	arch/arm/boot/dts/qcom-sdx55-mtp.dtb
	arch/arm/boot/dts/qcom-sdx55-t55.dtb
	arch/arm/boot/dts/qcom-sdx55-telit-fn980-tlb.dtb

phy@1c0e000: 'lanes@1c0e200' does not match any of the regexes: '^phy@[0-9a-f]+$', 'pinctrl-[0-9]+'
	arch/arm64/boot/dts/qcom/sc7280-crd.dtb
	arch/arm64/boot/dts/qcom/sc7280-herobrine-herobrine-r0.dtb
	arch/arm64/boot/dts/qcom/sc7280-herobrine-herobrine-r1.dtb
	arch/arm64/boot/dts/qcom/sc7280-idp2.dtb
	arch/arm64/boot/dts/qcom/sc7280-idp.dtb

phy@1d87000: 'lanes@1d87400', 'vdda-max-microamp', 'vdda-pll-max-microamp' do not match any of the regexes: '^phy@[0-9a-f]+$', 'pinctrl-[0-9]+'
	arch/arm64/boot/dts/qcom/sm8450-hdk.dtb
	arch/arm64/boot/dts/qcom/sm8450-qrd.dtb

phy@1d87000: 'vdda-max-microamp', 'vdda-pll-max-microamp' do not match any of the regexes: '^phy@[0-9a-f]+$', 'pinctrl-[0-9]+'
	arch/arm64/boot/dts/qcom/sm8350-microsoft-surface-duo2.dtb

phy@627000: 'vdda-phy-max-microamp', 'vdda-pll-max-microamp', 'vddp-ref-clk-always-on', 'vddp-ref-clk-max-microamp' do not match any of the regexes: '^phy@[0-9a-f]+$', 'pinctrl-[0-9]+'
	arch/arm64/boot/dts/qcom/msm8996-xiaomi-gemini.dtb
	arch/arm64/boot/dts/qcom/msm8996-xiaomi-scorpio.dtb

phy-wrapper@88e9000: 'vdda-phy-supply' is a required property
	arch/arm64/boot/dts/qcom/sm8350-sony-xperia-sagami-pdx214.dtb
	arch/arm64/boot/dts/qcom/sm8350-sony-xperia-sagami-pdx215.dtb

phy-wrapper@88e9000: 'vdda-pll-supply' is a required property
	arch/arm64/boot/dts/qcom/sm8350-sony-xperia-sagami-pdx214.dtb
	arch/arm64/boot/dts/qcom/sm8350-sony-xperia-sagami-pdx215.dtb

ssphy@78000: '#clock-cells', 'lane@78200' do not match any of the regexes: '^phy@[0-9a-f]+$', 'pinctrl-[0-9]+'
	arch/arm64/boot/dts/qcom/ipq6018-cp01-c1.dtb


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

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

* Re: [PATCH v3 1/4] dt-bindings: phy: qcom,qmp: Mark '#clock-cells' as a 'optional' property
  2022-04-18 20:55   ` [PATCH v3 1/4] dt-bindings: phy: qcom, qmp: " Bhupesh Sharma
@ 2022-04-23 15:46     ` Bjorn Andersson
  -1 siblings, 0 replies; 26+ messages in thread
From: Bjorn Andersson @ 2022-04-23 15:46 UTC (permalink / raw)
  To: Bhupesh Sharma
  Cc: linux-arm-msm, linux-phy, bhupesh.linux, agross, linux-kernel,
	devicetree, robh+dt, vkoul

On Mon 18 Apr 13:55 PDT 2022, Bhupesh Sharma wrote:

> '#clock-cells' is not a required property for qmp-phy(s) in the
> '/' node, but it should be is used in 'phy@' subnode (where it is
> actually a 'required' property). Fix the same.
> 

It's not that #clock-cells is "not a required property", it's that the
clock comes out of the phy (the child node), so there is no clocks
provided by the parent device.


Please rewrite the commit message.

> This also fixes the following 'make dtbs_check' warning(s):
> 
> sm8350-microsoft-surface-duo2.dt.yaml: phy@1d87000:
>   '#clock-cells' is a required property
> 
> Cc: Bjorn Andersson <bjorn.andersson@linaro.org>
> Cc: Vinod Koul <vkoul@kernel.org>
> Cc: Rob Herring <robh+dt@kernel.org>
> Signed-off-by: Bhupesh Sharma <bhupesh.sharma@linaro.org>
> ---
>  Documentation/devicetree/bindings/phy/qcom,qmp-phy.yaml | 8 +++-----
>  1 file changed, 3 insertions(+), 5 deletions(-)
> 
> diff --git a/Documentation/devicetree/bindings/phy/qcom,qmp-phy.yaml b/Documentation/devicetree/bindings/phy/qcom,qmp-phy.yaml
> index 8b850c5ab116..c39ead81ecd7 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 ]
>  
> @@ -112,11 +109,13 @@ patternProperties:
>      description:
>        Each device node of QMP phy is required to have as many child nodes as
>        the number of lanes the PHY has.
> +    properties:
> +      "#clock-cells":
> +        enum: [ 0, 1, 2 ]

The commit message doesn't mention the fact that 0 is also a valid
value. Perhaps just keep it [1, 2] in this patch?

Regards,
Bjorn

>  
>  required:
>    - compatible
>    - reg
> -  - "#clock-cells"
>    - "#address-cells"
>    - "#size-cells"
>    - ranges
> @@ -468,7 +467,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	[flat|nested] 26+ messages in thread

* Re: [PATCH v3 1/4] dt-bindings: phy: qcom,qmp: Mark '#clock-cells' as a 'optional' property
@ 2022-04-23 15:46     ` Bjorn Andersson
  0 siblings, 0 replies; 26+ messages in thread
From: Bjorn Andersson @ 2022-04-23 15:46 UTC (permalink / raw)
  To: Bhupesh Sharma
  Cc: linux-arm-msm, linux-phy, bhupesh.linux, agross, linux-kernel,
	devicetree, robh+dt, vkoul

On Mon 18 Apr 13:55 PDT 2022, Bhupesh Sharma wrote:

> '#clock-cells' is not a required property for qmp-phy(s) in the
> '/' node, but it should be is used in 'phy@' subnode (where it is
> actually a 'required' property). Fix the same.
> 

It's not that #clock-cells is "not a required property", it's that the
clock comes out of the phy (the child node), so there is no clocks
provided by the parent device.


Please rewrite the commit message.

> This also fixes the following 'make dtbs_check' warning(s):
> 
> sm8350-microsoft-surface-duo2.dt.yaml: phy@1d87000:
>   '#clock-cells' is a required property
> 
> Cc: Bjorn Andersson <bjorn.andersson@linaro.org>
> Cc: Vinod Koul <vkoul@kernel.org>
> Cc: Rob Herring <robh+dt@kernel.org>
> Signed-off-by: Bhupesh Sharma <bhupesh.sharma@linaro.org>
> ---
>  Documentation/devicetree/bindings/phy/qcom,qmp-phy.yaml | 8 +++-----
>  1 file changed, 3 insertions(+), 5 deletions(-)
> 
> diff --git a/Documentation/devicetree/bindings/phy/qcom,qmp-phy.yaml b/Documentation/devicetree/bindings/phy/qcom,qmp-phy.yaml
> index 8b850c5ab116..c39ead81ecd7 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 ]
>  
> @@ -112,11 +109,13 @@ patternProperties:
>      description:
>        Each device node of QMP phy is required to have as many child nodes as
>        the number of lanes the PHY has.
> +    properties:
> +      "#clock-cells":
> +        enum: [ 0, 1, 2 ]

The commit message doesn't mention the fact that 0 is also a valid
value. Perhaps just keep it [1, 2] in this patch?

Regards,
Bjorn

>  
>  required:
>    - compatible
>    - reg
> -  - "#clock-cells"
>    - "#address-cells"
>    - "#size-cells"
>    - ranges
> @@ -468,7 +467,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	[flat|nested] 26+ messages in thread

* Re: [PATCH v3 3/4] dt-bindings: phy: qcom,qmp: Describe phy@ subnode properly
  2022-04-18 20:55   ` [PATCH v3 3/4] dt-bindings: phy: qcom, qmp: " Bhupesh Sharma
@ 2022-04-23 15:51     ` Bjorn Andersson
  -1 siblings, 0 replies; 26+ messages in thread
From: Bjorn Andersson @ 2022-04-23 15:51 UTC (permalink / raw)
  To: Bhupesh Sharma
  Cc: linux-arm-msm, linux-phy, bhupesh.linux, agross, linux-kernel,
	devicetree, robh+dt, vkoul, Rob Herring

On Mon 18 Apr 13:55 PDT 2022, Bhupesh Sharma wrote:

> Currently the qcom,qmp-phy dt-binding doesn't describe
> the 'reg' and '#phy-cells' properties for the phy@ subnode.
> 
> Fix the same.
> 
> Cc: Bjorn Andersson <bjorn.andersson@linaro.org>
> Cc: Rob Herring <robh@kernel.org>
> Signed-off-by: Bhupesh Sharma <bhupesh.sharma@linaro.org>
> ---
>  .../devicetree/bindings/phy/qcom,qmp-phy.yaml       | 13 +++++++++++++
>  1 file changed, 13 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/phy/qcom,qmp-phy.yaml b/Documentation/devicetree/bindings/phy/qcom,qmp-phy.yaml
> index 411c79dbfa15..c553c8ad0d1a 100644
> --- a/Documentation/devicetree/bindings/phy/qcom,qmp-phy.yaml
> +++ b/Documentation/devicetree/bindings/phy/qcom,qmp-phy.yaml
> @@ -118,6 +118,19 @@ patternProperties:
>        Each device node of QMP phy is required to have as many child nodes as
>        the number of lanes the PHY has.
>      properties:
> +      reg:
> +        minItems: 1
> +        maxItems: 6
> +        items:
> +          description: |
> +            List of offset and length pairs of register sets for PHY blocks.
> +            common block control registers, such as - SW_RESET, START_CTRL.
> +            pcs registers, such as - PCS_STATUS, POWER_DOWN_CONTROL,
> +            pcs misc registers, such as - PCS_MISC_TYPEC_CTRL.

The two cases we have is:

  tx
  rx
  pcs
  pcs_misc

and:

  tx
  rx
  pcs
  tx2
  rx2
  pcs_misc

So I think we should express that explicitly here.

Regards,
Bjorn

> +
> +      "#phy-cells":
> +        const: 0
> +
>        "#clock-cells":
>          enum: [ 0, 1, 2 ]
>  
> -- 
> 2.35.1
> 

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

* Re: [PATCH v3 3/4] dt-bindings: phy: qcom, qmp: Describe phy@ subnode properly
@ 2022-04-23 15:51     ` Bjorn Andersson
  0 siblings, 0 replies; 26+ messages in thread
From: Bjorn Andersson @ 2022-04-23 15:51 UTC (permalink / raw)
  To: Bhupesh Sharma
  Cc: linux-arm-msm, linux-phy, bhupesh.linux, agross, linux-kernel,
	devicetree, robh+dt, vkoul, Rob Herring

On Mon 18 Apr 13:55 PDT 2022, Bhupesh Sharma wrote:

> Currently the qcom,qmp-phy dt-binding doesn't describe
> the 'reg' and '#phy-cells' properties for the phy@ subnode.
> 
> Fix the same.
> 
> Cc: Bjorn Andersson <bjorn.andersson@linaro.org>
> Cc: Rob Herring <robh@kernel.org>
> Signed-off-by: Bhupesh Sharma <bhupesh.sharma@linaro.org>
> ---
>  .../devicetree/bindings/phy/qcom,qmp-phy.yaml       | 13 +++++++++++++
>  1 file changed, 13 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/phy/qcom,qmp-phy.yaml b/Documentation/devicetree/bindings/phy/qcom,qmp-phy.yaml
> index 411c79dbfa15..c553c8ad0d1a 100644
> --- a/Documentation/devicetree/bindings/phy/qcom,qmp-phy.yaml
> +++ b/Documentation/devicetree/bindings/phy/qcom,qmp-phy.yaml
> @@ -118,6 +118,19 @@ patternProperties:
>        Each device node of QMP phy is required to have as many child nodes as
>        the number of lanes the PHY has.
>      properties:
> +      reg:
> +        minItems: 1
> +        maxItems: 6
> +        items:
> +          description: |
> +            List of offset and length pairs of register sets for PHY blocks.
> +            common block control registers, such as - SW_RESET, START_CTRL.
> +            pcs registers, such as - PCS_STATUS, POWER_DOWN_CONTROL,
> +            pcs misc registers, such as - PCS_MISC_TYPEC_CTRL.

The two cases we have is:

  tx
  rx
  pcs
  pcs_misc

and:

  tx
  rx
  pcs
  tx2
  rx2
  pcs_misc

So I think we should express that explicitly here.

Regards,
Bjorn

> +
> +      "#phy-cells":
> +        const: 0
> +
>        "#clock-cells":
>          enum: [ 0, 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	[flat|nested] 26+ messages in thread

* Re: [PATCH v3 2/4] dt-bindings: phy: qcom,qmp: Describe 'vdda-max-microamp' & 'vdda-pll-max-microamp' properties
  2022-04-18 20:55   ` [PATCH v3 2/4] dt-bindings: phy: qcom, qmp: " Bhupesh Sharma
@ 2022-04-23 15:56     ` Bjorn Andersson
  -1 siblings, 0 replies; 26+ messages in thread
From: Bjorn Andersson @ 2022-04-23 15:56 UTC (permalink / raw)
  To: Bhupesh Sharma
  Cc: linux-arm-msm, linux-phy, bhupesh.linux, agross, linux-kernel,
	devicetree, robh+dt, vkoul, Rob Herring

On Mon 18 Apr 13:55 PDT 2022, Bhupesh Sharma wrote:

> Since a few boards based on QCoM qmp phy use the
> 'vdda-max-microamp' & 'vdda-pll-max-microamp' properties to
> describe the ufs phy nodes, add them to the dt-bindings doc as well.
> 
> This fixes the following '$ make dtbs_check' warning(s):
> 
> sm8350-microsoft-surface-duo2.dt.yaml: phy@1d87000:
>   'vdda-max-microamp', 'vdda-pll-max-microamp' do not match any of
>    the regexes: '^phy@[0-9a-f]+$', 'pinctrl-[0-9]+'
> 
> Cc: Bjorn Andersson <bjorn.andersson@linaro.org>
> Cc: Vinod Koul <vkoul@kernel.org>
> Acked-by: Rob Herring <robh@kernel.org>
> Signed-off-by: Bhupesh Sharma <bhupesh.sharma@linaro.org>
> ---
>  Documentation/devicetree/bindings/phy/qcom,qmp-phy.yaml | 8 ++++++++
>  1 file changed, 8 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/phy/qcom,qmp-phy.yaml b/Documentation/devicetree/bindings/phy/qcom,qmp-phy.yaml
> index c39ead81ecd7..411c79dbfa15 100644
> --- a/Documentation/devicetree/bindings/phy/qcom,qmp-phy.yaml
> +++ b/Documentation/devicetree/bindings/phy/qcom,qmp-phy.yaml
> @@ -90,6 +90,14 @@ properties:
>      minItems: 1
>      maxItems: 3
>  
> +  vdda-max-microamp:
> +    description:
> +      Specifies max. load that can be drawn from phy supply.
> +
> +  vdda-pll-max-microamp:
> +    description:
> +      Specifies max. load that can be drawn from pll supply.

It's not clear to me what an implementation would do with this
information. As expressed here it sounds like it's a property of the
specified regulator, so the driver should just request that information
from the regulator framework.

So let's wait with introducing such properties until we know.

Thanks,
Bjorn

> +
>    vdda-phy-supply:
>      description:
>        Phandle to a regulator supply to PHY core block.
> -- 
> 2.35.1
> 

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

* Re: [PATCH v3 2/4] dt-bindings: phy: qcom,qmp: Describe 'vdda-max-microamp' & 'vdda-pll-max-microamp' properties
@ 2022-04-23 15:56     ` Bjorn Andersson
  0 siblings, 0 replies; 26+ messages in thread
From: Bjorn Andersson @ 2022-04-23 15:56 UTC (permalink / raw)
  To: Bhupesh Sharma
  Cc: linux-arm-msm, linux-phy, bhupesh.linux, agross, linux-kernel,
	devicetree, robh+dt, vkoul, Rob Herring

On Mon 18 Apr 13:55 PDT 2022, Bhupesh Sharma wrote:

> Since a few boards based on QCoM qmp phy use the
> 'vdda-max-microamp' & 'vdda-pll-max-microamp' properties to
> describe the ufs phy nodes, add them to the dt-bindings doc as well.
> 
> This fixes the following '$ make dtbs_check' warning(s):
> 
> sm8350-microsoft-surface-duo2.dt.yaml: phy@1d87000:
>   'vdda-max-microamp', 'vdda-pll-max-microamp' do not match any of
>    the regexes: '^phy@[0-9a-f]+$', 'pinctrl-[0-9]+'
> 
> Cc: Bjorn Andersson <bjorn.andersson@linaro.org>
> Cc: Vinod Koul <vkoul@kernel.org>
> Acked-by: Rob Herring <robh@kernel.org>
> Signed-off-by: Bhupesh Sharma <bhupesh.sharma@linaro.org>
> ---
>  Documentation/devicetree/bindings/phy/qcom,qmp-phy.yaml | 8 ++++++++
>  1 file changed, 8 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/phy/qcom,qmp-phy.yaml b/Documentation/devicetree/bindings/phy/qcom,qmp-phy.yaml
> index c39ead81ecd7..411c79dbfa15 100644
> --- a/Documentation/devicetree/bindings/phy/qcom,qmp-phy.yaml
> +++ b/Documentation/devicetree/bindings/phy/qcom,qmp-phy.yaml
> @@ -90,6 +90,14 @@ properties:
>      minItems: 1
>      maxItems: 3
>  
> +  vdda-max-microamp:
> +    description:
> +      Specifies max. load that can be drawn from phy supply.
> +
> +  vdda-pll-max-microamp:
> +    description:
> +      Specifies max. load that can be drawn from pll supply.

It's not clear to me what an implementation would do with this
information. As expressed here it sounds like it's a property of the
specified regulator, so the driver should just request that information
from the regulator framework.

So let's wait with introducing such properties until we know.

Thanks,
Bjorn

> +
>    vdda-phy-supply:
>      description:
>        Phandle to a regulator supply to PHY core block.
> -- 
> 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] 26+ messages in thread

* Re: (subset) [PATCH v3 4/4] arm64: dts: qcom: sm8450: Fix qmp phy node (use phy@ instead of lanes@)
  2022-04-18 20:55   ` Bhupesh Sharma
@ 2022-04-23 16:03     ` Bjorn Andersson
  -1 siblings, 0 replies; 26+ messages in thread
From: Bjorn Andersson @ 2022-04-23 16:03 UTC (permalink / raw)
  To: Bhupesh Sharma, linux-phy, linux-arm-msm
  Cc: robh+dt, agross, Rob Herring, bhupesh.linux, vkoul, linux-kernel,
	devicetree

On Tue, 19 Apr 2022 02:25:09 +0530, Bhupesh Sharma wrote:
> Fix the following 'make dtbs_check' warning(s) by
> using phy@ instead of lanes@:
> arch/arm64/boot/dts/qcom/sm8450-hdk.dtb: phy@1c0f000: 'lanes@1c0e000'
>   does not match any of the regexes: '^phy@[0-9a-f]+$', 'pinctrl-[0-9]+'
> 
> 

Applied, thanks!

[4/4] arm64: dts: qcom: sm8450: Fix qmp phy node (use phy@ instead of lanes@)
      commit: 2a31f958f8326c263f2af2511cd6d8256d81e810

Best regards,
-- 
Bjorn Andersson <bjorn.andersson@linaro.org>

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

* Re: (subset) [PATCH v3 4/4] arm64: dts: qcom: sm8450: Fix qmp phy node (use phy@ instead of lanes@)
@ 2022-04-23 16:03     ` Bjorn Andersson
  0 siblings, 0 replies; 26+ messages in thread
From: Bjorn Andersson @ 2022-04-23 16:03 UTC (permalink / raw)
  To: Bhupesh Sharma, linux-phy, linux-arm-msm
  Cc: robh+dt, agross, Rob Herring, bhupesh.linux, vkoul, linux-kernel,
	devicetree

On Tue, 19 Apr 2022 02:25:09 +0530, Bhupesh Sharma wrote:
> Fix the following 'make dtbs_check' warning(s) by
> using phy@ instead of lanes@:
> arch/arm64/boot/dts/qcom/sm8450-hdk.dtb: phy@1c0f000: 'lanes@1c0e000'
>   does not match any of the regexes: '^phy@[0-9a-f]+$', 'pinctrl-[0-9]+'
> 
> 

Applied, thanks!

[4/4] arm64: dts: qcom: sm8450: Fix qmp phy node (use phy@ instead of lanes@)
      commit: 2a31f958f8326c263f2af2511cd6d8256d81e810

Best regards,
-- 
Bjorn Andersson <bjorn.andersson@linaro.org>

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

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

* Re: [PATCH v3 1/4] dt-bindings: phy: qcom,qmp: Mark '#clock-cells' as a 'optional' property
  2022-04-23 15:46     ` Bjorn Andersson
@ 2022-05-15  6:36       ` Bhupesh Sharma
  -1 siblings, 0 replies; 26+ messages in thread
From: Bhupesh Sharma @ 2022-05-15  6:36 UTC (permalink / raw)
  To: Bjorn Andersson
  Cc: linux-arm-msm, linux-phy, bhupesh.linux, agross, linux-kernel,
	devicetree, robh+dt, vkoul

Hi Bjorn,

On Sat, 23 Apr 2022 at 21:14, Bjorn Andersson
<bjorn.andersson@linaro.org> wrote:
>
> On Mon 18 Apr 13:55 PDT 2022, Bhupesh Sharma wrote:
>
> > '#clock-cells' is not a required property for qmp-phy(s) in the
> > '/' node, but it should be is used in 'phy@' subnode (where it is
> > actually a 'required' property). Fix the same.
> >
>
> It's not that #clock-cells is "not a required property", it's that the
> clock comes out of the phy (the child node), so there is no clocks
> provided by the parent device.
>
>
> Please rewrite the commit message.

Ok.

> > This also fixes the following 'make dtbs_check' warning(s):
> >
> > sm8350-microsoft-surface-duo2.dt.yaml: phy@1d87000:
> >   '#clock-cells' is a required property
> >
> > Cc: Bjorn Andersson <bjorn.andersson@linaro.org>
> > Cc: Vinod Koul <vkoul@kernel.org>
> > Cc: Rob Herring <robh+dt@kernel.org>
> > Signed-off-by: Bhupesh Sharma <bhupesh.sharma@linaro.org>
> > ---
> >  Documentation/devicetree/bindings/phy/qcom,qmp-phy.yaml | 8 +++-----
> >  1 file changed, 3 insertions(+), 5 deletions(-)
> >
> > diff --git a/Documentation/devicetree/bindings/phy/qcom,qmp-phy.yaml b/Documentation/devicetree/bindings/phy/qcom,qmp-phy.yaml
> > index 8b850c5ab116..c39ead81ecd7 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 ]
> >
> > @@ -112,11 +109,13 @@ patternProperties:
> >      description:
> >        Each device node of QMP phy is required to have as many child nodes as
> >        the number of lanes the PHY has.
> > +    properties:
> > +      "#clock-cells":
> > +        enum: [ 0, 1, 2 ]
>
> The commit message doesn't mention the fact that 0 is also a valid
> value. Perhaps just keep it [1, 2] in this patch?

0 is a valid value as mentioned in the example inside the dt-binding
example itself.
For e.g. see the 'sdm845-qmp-pcie-phy' node:

    pcie0_phy: phy@1c06000 {
            compatible = "qcom,sdm845-qmp-pcie-phy";
            <..snip..>

            pcie0_lane: phy@1c06200 {
                    <..snip..>

                #clock-cells = <0>;

So, without [ 0, 1, 2 ] in the yaml bindings we get the following
error while running '$ make dt_binding_check' :
qcom,qmp-phy.example.dtb: phy-wrapper@88eb000:
phy@200:#clock-cells:0:0: 0 is not one of [1, 2]

Thanks,
Bhupesh

> >
> >  required:
> >    - compatible
> >    - reg
> > -  - "#clock-cells"
> >    - "#address-cells"
> >    - "#size-cells"
> >    - ranges
> > @@ -468,7 +467,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	[flat|nested] 26+ messages in thread

* Re: [PATCH v3 1/4] dt-bindings: phy: qcom, qmp: Mark '#clock-cells' as a 'optional' property
@ 2022-05-15  6:36       ` Bhupesh Sharma
  0 siblings, 0 replies; 26+ messages in thread
From: Bhupesh Sharma @ 2022-05-15  6:36 UTC (permalink / raw)
  To: Bjorn Andersson
  Cc: linux-arm-msm, linux-phy, bhupesh.linux, agross, linux-kernel,
	devicetree, robh+dt, vkoul

Hi Bjorn,

On Sat, 23 Apr 2022 at 21:14, Bjorn Andersson
<bjorn.andersson@linaro.org> wrote:
>
> On Mon 18 Apr 13:55 PDT 2022, Bhupesh Sharma wrote:
>
> > '#clock-cells' is not a required property for qmp-phy(s) in the
> > '/' node, but it should be is used in 'phy@' subnode (where it is
> > actually a 'required' property). Fix the same.
> >
>
> It's not that #clock-cells is "not a required property", it's that the
> clock comes out of the phy (the child node), so there is no clocks
> provided by the parent device.
>
>
> Please rewrite the commit message.

Ok.

> > This also fixes the following 'make dtbs_check' warning(s):
> >
> > sm8350-microsoft-surface-duo2.dt.yaml: phy@1d87000:
> >   '#clock-cells' is a required property
> >
> > Cc: Bjorn Andersson <bjorn.andersson@linaro.org>
> > Cc: Vinod Koul <vkoul@kernel.org>
> > Cc: Rob Herring <robh+dt@kernel.org>
> > Signed-off-by: Bhupesh Sharma <bhupesh.sharma@linaro.org>
> > ---
> >  Documentation/devicetree/bindings/phy/qcom,qmp-phy.yaml | 8 +++-----
> >  1 file changed, 3 insertions(+), 5 deletions(-)
> >
> > diff --git a/Documentation/devicetree/bindings/phy/qcom,qmp-phy.yaml b/Documentation/devicetree/bindings/phy/qcom,qmp-phy.yaml
> > index 8b850c5ab116..c39ead81ecd7 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 ]
> >
> > @@ -112,11 +109,13 @@ patternProperties:
> >      description:
> >        Each device node of QMP phy is required to have as many child nodes as
> >        the number of lanes the PHY has.
> > +    properties:
> > +      "#clock-cells":
> > +        enum: [ 0, 1, 2 ]
>
> The commit message doesn't mention the fact that 0 is also a valid
> value. Perhaps just keep it [1, 2] in this patch?

0 is a valid value as mentioned in the example inside the dt-binding
example itself.
For e.g. see the 'sdm845-qmp-pcie-phy' node:

    pcie0_phy: phy@1c06000 {
            compatible = "qcom,sdm845-qmp-pcie-phy";
            <..snip..>

            pcie0_lane: phy@1c06200 {
                    <..snip..>

                #clock-cells = <0>;

So, without [ 0, 1, 2 ] in the yaml bindings we get the following
error while running '$ make dt_binding_check' :
qcom,qmp-phy.example.dtb: phy-wrapper@88eb000:
phy@200:#clock-cells:0:0: 0 is not one of [1, 2]

Thanks,
Bhupesh

> >
> >  required:
> >    - compatible
> >    - reg
> > -  - "#clock-cells"
> >    - "#address-cells"
> >    - "#size-cells"
> >    - ranges
> > @@ -468,7 +467,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	[flat|nested] 26+ messages in thread

end of thread, other threads:[~2022-05-15  6:36 UTC | newest]

Thread overview: 26+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-18 20:55 [PATCH v3 0/4] Fix dtbs_check warning(s) for Qualcomm QMP PHY Bhupesh Sharma
2022-04-18 20:55 ` Bhupesh Sharma
2022-04-18 20:55 ` [PATCH v3 1/4] dt-bindings: phy: qcom,qmp: Mark '#clock-cells' as a 'optional' property Bhupesh Sharma
2022-04-18 20:55   ` [PATCH v3 1/4] dt-bindings: phy: qcom, qmp: " Bhupesh Sharma
2022-04-19 12:12   ` [PATCH v3 1/4] dt-bindings: phy: qcom,qmp: " Rob Herring
2022-04-19 12:12     ` [PATCH v3 1/4] dt-bindings: phy: qcom, qmp: " Rob Herring
2022-04-23 15:46   ` [PATCH v3 1/4] dt-bindings: phy: qcom,qmp: " Bjorn Andersson
2022-04-23 15:46     ` Bjorn Andersson
2022-05-15  6:36     ` Bhupesh Sharma
2022-05-15  6:36       ` [PATCH v3 1/4] dt-bindings: phy: qcom, qmp: " Bhupesh Sharma
2022-04-18 20:55 ` [PATCH v3 2/4] dt-bindings: phy: qcom,qmp: Describe 'vdda-max-microamp' & 'vdda-pll-max-microamp' properties Bhupesh Sharma
2022-04-18 20:55   ` [PATCH v3 2/4] dt-bindings: phy: qcom, qmp: " Bhupesh Sharma
2022-04-18 22:34   ` [PATCH v3 2/4] dt-bindings: phy: qcom,qmp: " Dmitry Baryshkov
2022-04-18 22:34     ` Dmitry Baryshkov
2022-04-19  3:36     ` Bhupesh Sharma
2022-04-19  3:36       ` Bhupesh Sharma
2022-04-23 15:56   ` Bjorn Andersson
2022-04-23 15:56     ` Bjorn Andersson
2022-04-18 20:55 ` [PATCH v3 3/4] dt-bindings: phy: qcom,qmp: Describe phy@ subnode properly Bhupesh Sharma
2022-04-18 20:55   ` [PATCH v3 3/4] dt-bindings: phy: qcom, qmp: " Bhupesh Sharma
2022-04-23 15:51   ` [PATCH v3 3/4] dt-bindings: phy: qcom,qmp: " Bjorn Andersson
2022-04-23 15:51     ` [PATCH v3 3/4] dt-bindings: phy: qcom, qmp: " Bjorn Andersson
2022-04-18 20:55 ` [PATCH v3 4/4] arm64: dts: qcom: sm8450: Fix qmp phy node (use phy@ instead of lanes@) Bhupesh Sharma
2022-04-18 20:55   ` Bhupesh Sharma
2022-04-23 16:03   ` (subset) " Bjorn Andersson
2022-04-23 16:03     ` Bjorn Andersson

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.