Skip to contentSkip to conversation

dt-bindings: phy: mediatek: tphy: add a property for power-domains

PATCH Superseded Macpaul Lin 3 participants 6 messages Sep 26, 2024 – Oct 11, 2024

Subsystems (4)

v1 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 dt-bindings: phy: mediatek: tphy: add a property for power-domains

Some platforms requires a dependency for power-domains. So we add property 'power-domains' and set 'maxItems: 1' in the DT Schema.

---
 Documentation/devicetree/bindings/phy/mediatek,tphy.yaml | 3 +++
 1 file changed, 3 insertions(+)
Documentation/devicetree/bindings/phy/mediatek,tphy.yaml +3 -0
index 423b7c4e62f2..c77fe43c224a 100644
@@ -125,6 +125,9 @@ properties:
     $ref: /schemas/types.yaml#/definitions/uint32
     default: 28
 
+  power-domains:
+    maxItems: 1
+
 # Required child node:
 patternProperties:
   "^(usb|pcie|sata)-phy@[0-9a-f]+$":
Signature · 1 line
2.45.2
#2 lore raw
In reply to Macpaul Lin
Quoted 1 line · Macpaul Lin

Some platforms requires a dependency for power-domains.

Some, so not all? Why isn't this restricted on a per compatible basis?

Quoted 25 lines

So we add property 'power-domains' and set 'maxItems: 1' in the DT Schema.

---
 Documentation/devicetree/bindings/phy/mediatek,tphy.yaml | 3 +++
 1 file changed, 3 insertions(+)
Documentation/devicetree/bindings/phy/mediatek,tphy.yaml +3 -0
index 423b7c4e62f2..c77fe43c224a 100644
@@ -125,6 +125,9 @@ properties:
     $ref: /schemas/types.yaml#/definitions/uint32
     default: 28
 
+  power-domains:
+    maxItems: 1
+
 # Required child node:
 patternProperties:
   "^(usb|pcie|sata)-phy@[0-9a-f]+$":
Signature · 1 line
2.45.2
#3 lore raw
Quoted 4 lines · Conor Dooley
Quoted 1 line · Macpaul Lin

Some platforms requires a dependency for power-domains.

Some, so not all? Why isn't this restricted on a per compatible basis?

After discussion with Chunfeng and double check tphy design in detail. Chunfeng commented that tphy dose not need to add mtcmos. It is not necessary to add it, if the power of the phy is turned off, it will affect other functions.

From the current USB hardware design perspective, even if mtcmos is added to the phy, it is always on.

Quoted 16 lines
Quoted 16 lines

So we add property 'power-domains' and set 'maxItems: 1' in the DT Schema.

---
  Documentation/devicetree/bindings/phy/mediatek,tphy.yaml | 3 +++
  1 file changed, 3 insertions(+)
Documentation/devicetree/bindings/phy/mediatek,tphy.yaml +0 -0
index 423b7c4e62f2..c77fe43c224a 100644
@@ -125,6 +125,9 @@ properties:
      $ref: /schemas/types.yaml#/definitions/uint32
      default: 28
 
Quoted 9 lines
Quoted 9 lines
Documentation/devicetree/bindings/phy/mediatek,tphy.yaml +3 -0
+  power-domains:
+    maxItems: 1
+
  # Required child node:
  patternProperties:
    "^(usb|pcie|sata)-phy@[0-9a-f]+$":
Signature · 1 line
2.45.2

Please drop this patch and I'll send a new fix to mt8195.dtsi.

Thanks
Macpaul Lin

#4 lore raw
Quoted 8 lines · Macpaul Lin
Quoted 4 lines · Conor Dooley
Quoted 1 line · Macpaul Lin

Some platforms requires a dependency for power-domains.

Some, so not all? Why isn't this restricted on a per compatible basis?

Quoted 7 lines

After discussion with Chunfeng and double check tphy design in detail. Chunfeng commented that tphy dose not need to add mtcmos. It is not necessary to add it, if the power of the phy is turned off, it will affect other functions.

From the current USB hardware design perspective, even if mtcmos is added to the phy, it is always on.

Firstly, I have no idea what "mtcmos" means, sorry. I am a dt-bindings guy, not someone familiar with mediatek hardware.
Secondly, it sounds like this /does/ have a power domain, so it should be in the binding. That it is turned on by something else and must remain on doesn't mean it shouldn't be documented here. What if those things try to turn it off while the tphy is using it?

Quoted 30 lines
Quoted 9 lines
Quoted 9 lines

So we add property 'power-domains' and set 'maxItems: 1' in the DT Schema.

---
  Documentation/devicetree/bindings/phy/mediatek,tphy.yaml | 3 +++
  1 file changed, 3 insertions(+)
Quoted 16 lines
Quoted 16 lines
Documentation/devicetree/bindings/phy/mediatek,tphy.yaml +3 -0
index 423b7c4e62f2..c77fe43c224a 100644
@@ -125,6 +125,9 @@ properties:
      $ref: /schemas/types.yaml#/definitions/uint32
      default: 28
+  power-domains:
+    maxItems: 1
+
  # Required child node:
  patternProperties:
    "^(usb|pcie|sata)-phy@[0-9a-f]+$":
Signature · 1 line
2.45.2

Please drop this patch and I'll send a new fix to mt8195.dtsi.

Thanks
Macpaul Lin

#5 lore raw
Quoted 17 lines · Conor Dooley
Quoted 8 lines · Macpaul Lin
Quoted 4 lines · Conor Dooley
Quoted 1 line · Macpaul Lin

Some platforms requires a dependency for power-domains.

Some, so not all? Why isn't this restricted on a per compatible basis?

Quoted 7 lines

After discussion with Chunfeng and double check tphy design in detail. Chunfeng commented that tphy dose not need to add mtcmos. It is not necessary to add it, if the power of the phy is turned off, it will affect other functions.

From the current USB hardware design perspective, even if mtcmos
is added to the phy, it is always on.

Quoted 6 lines

Firstly, I have no idea what "mtcmos" means, sorry. I am a dt-bindings guy, not someone familiar with mediatek hardware.
Secondly, it sounds like this /does/ have a power domain, so it should be in the binding. That it is turned on by something else and must remain on doesn't mean it shouldn't be documented here. What if those things try to turn it off while the tphy is using it?

After discussion in MediaTek internal. Chunfeng agreed to add 'power-domains' property to DT schema. The v2 patch will also adding the reminder in the description for developers.

Quoted 18 lines
Quoted 18 lines
Quoted 18 lines
Quoted 18 lines

So we add property 'power-domains' and set 'maxItems: 1' in the DT Schema.

---
   Documentation/devicetree/bindings/phy/mediatek,tphy.yaml | 3 +++
   1 file changed, 3 insertions(+)
Documentation/devicetree/bindings/phy/mediatek,tphy.yaml +2 -0
index 423b7c4e62f2..c77fe43c224a 100644
@@ -125,6 +125,9 @@ properties:
       $ref: /schemas/types.yaml#/definitions/uint32
       default: 28
+  power-domains:
+    maxItems: 1
Quoted 8 lines
Quoted 8 lines
Quoted 7 lines
Quoted 7 lines
Documentation/devicetree/bindings/phy/mediatek,tphy.yaml +1 -0
+
   # Required child node:
   patternProperties:
     "^(usb|pcie|sata)-phy@[0-9a-f]+$":
Signature · 1 line
2.45.2

[snip]

V2 of this patch has been send.

Thanks
Macpaul Lin.