linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2] dt-bindings: phy: rockchip: Convert RK3399 PCIe PHY to schema
@ 2025-04-15  1:18 Rob Herring (Arm)
  2025-05-01 13:24 ` Heiko Stübner
  2025-05-14 11:37 ` Vinod Koul
  0 siblings, 2 replies; 3+ messages in thread
From: Rob Herring (Arm) @ 2025-04-15  1:18 UTC (permalink / raw)
  To: Vinod Koul, Kishon Vijay Abraham I, Krzysztof Kozlowski,
	Conor Dooley, Heiko Stuebner
  Cc: linux-phy, devicetree, linux-arm-kernel, linux-rockchip,
	linux-kernel

Convert the Rockchip RK3399 PCIe PHY to DT schema format. Move the
example to the GRF binding as that has the complete block.

Signed-off-by: Rob Herring (Arm) <robh@kernel.org>
---
v2:
 - actually include new schema file!
---
 .../phy/rockchip,rk3399-pcie-phy.yaml         | 45 +++++++++++++++++++
 .../bindings/phy/rockchip-pcie-phy.txt        | 36 ---------------
 .../devicetree/bindings/soc/rockchip/grf.yaml | 13 +++++-
 3 files changed, 56 insertions(+), 38 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/phy/rockchip,rk3399-pcie-phy.yaml
 delete mode 100644 Documentation/devicetree/bindings/phy/rockchip-pcie-phy.txt

diff --git a/Documentation/devicetree/bindings/phy/rockchip,rk3399-pcie-phy.yaml b/Documentation/devicetree/bindings/phy/rockchip,rk3399-pcie-phy.yaml
new file mode 100644
index 000000000000..f46f065e5dbe
--- /dev/null
+++ b/Documentation/devicetree/bindings/phy/rockchip,rk3399-pcie-phy.yaml
@@ -0,0 +1,45 @@
+# SPDX-License-Identifier: GPL-2.0
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/phy/rockchip,rk3399-pcie-phy.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Rockchip RK3399 PCIE PHY
+
+maintainers:
+  - Heiko Stuebner <heiko@sntech.de>
+
+properties:
+  compatible:
+    const: rockchip,rk3399-pcie-phy
+
+  '#phy-cells':
+    oneOf:
+      - const: 0
+        deprecated: true
+      - const: 1
+        description: One lane per phy mode
+
+  clocks:
+    maxItems: 1
+
+  clock-names:
+    const: refclk
+
+  resets:
+    maxItems: 1
+
+  reset-names:
+    const: phy
+
+required:
+  - compatible
+  - '#phy-cells'
+  - clocks
+  - clock-names
+  - resets
+  - reset-names
+
+additionalProperties: false
+
+...
diff --git a/Documentation/devicetree/bindings/phy/rockchip-pcie-phy.txt b/Documentation/devicetree/bindings/phy/rockchip-pcie-phy.txt
deleted file mode 100644
index b496042f1f44..000000000000
--- a/Documentation/devicetree/bindings/phy/rockchip-pcie-phy.txt
+++ /dev/null
@@ -1,36 +0,0 @@
-Rockchip PCIE PHY
------------------------
-
-Required properties:
- - compatible: rockchip,rk3399-pcie-phy
- - clocks: Must contain an entry in clock-names.
-	See ../clocks/clock-bindings.txt for details.
- - clock-names: Must be "refclk"
- - resets: Must contain an entry in reset-names.
-	See ../reset/reset.txt for details.
- - reset-names: Must be "phy"
-
-Required properties for legacy PHY mode (deprecated):
- - #phy-cells: must be 0
-
-Required properties for per-lane PHY mode (preferred):
- - #phy-cells: must be 1
-
-Example:
-
-grf: syscon@ff770000 {
-	compatible = "rockchip,rk3399-grf", "syscon", "simple-mfd";
-	#address-cells = <1>;
-	#size-cells = <1>;
-
-	...
-
-	pcie_phy: pcie-phy {
-		compatible = "rockchip,rk3399-pcie-phy";
-		#phy-cells = <0>;
-		clocks = <&cru SCLK_PCIEPHY_REF>;
-		clock-names = "refclk";
-		resets = <&cru SRST_PCIEPHY>;
-		reset-names = "phy";
-	};
-};
diff --git a/Documentation/devicetree/bindings/soc/rockchip/grf.yaml b/Documentation/devicetree/bindings/soc/rockchip/grf.yaml
index 2f61c1b95fea..fc328c4a35e4 100644
--- a/Documentation/devicetree/bindings/soc/rockchip/grf.yaml
+++ b/Documentation/devicetree/bindings/soc/rockchip/grf.yaml
@@ -201,8 +201,8 @@ allOf:
 
         pcie-phy:
           type: object
-          description:
-            Documentation/devicetree/bindings/phy/rockchip-pcie-phy.txt
+          $ref: /schemas/phy/rockchip,rk3399-pcie-phy.yaml#
+          unevaluatedProperties: false
 
       patternProperties:
         "^phy@[0-9a-f]+$":
@@ -326,6 +326,15 @@ examples:
         #phy-cells = <0>;
       };
 
+      pcie-phy {
+        compatible = "rockchip,rk3399-pcie-phy";
+        #phy-cells = <1>;
+        clocks = <&cru SCLK_PCIEPHY_REF>;
+        clock-names = "refclk";
+        resets = <&cru SRST_PCIEPHY>;
+        reset-names = "phy";
+      };
+
       phy@f780 {
         compatible = "rockchip,rk3399-emmc-phy";
         reg = <0xf780 0x20>;
-- 
2.47.2



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

* Re: [PATCH v2] dt-bindings: phy: rockchip: Convert RK3399 PCIe PHY to schema
  2025-04-15  1:18 [PATCH v2] dt-bindings: phy: rockchip: Convert RK3399 PCIe PHY to schema Rob Herring (Arm)
@ 2025-05-01 13:24 ` Heiko Stübner
  2025-05-14 11:37 ` Vinod Koul
  1 sibling, 0 replies; 3+ messages in thread
From: Heiko Stübner @ 2025-05-01 13:24 UTC (permalink / raw)
  To: Vinod Koul, Kishon Vijay Abraham I, Krzysztof Kozlowski,
	Conor Dooley, Rob Herring (Arm)
  Cc: linux-phy, devicetree, linux-arm-kernel, linux-rockchip,
	linux-kernel

Am Dienstag, 15. April 2025, 03:18:23 Mitteleuropäische Sommerzeit schrieb Rob Herring (Arm):
> Convert the Rockchip RK3399 PCIe PHY to DT schema format. Move the
> example to the GRF binding as that has the complete block.
> 
> Signed-off-by: Rob Herring (Arm) <robh@kernel.org>

Reviewed-by: Heiko Stuebner <heiko@sntech.de>




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

* Re: [PATCH v2] dt-bindings: phy: rockchip: Convert RK3399 PCIe PHY to schema
  2025-04-15  1:18 [PATCH v2] dt-bindings: phy: rockchip: Convert RK3399 PCIe PHY to schema Rob Herring (Arm)
  2025-05-01 13:24 ` Heiko Stübner
@ 2025-05-14 11:37 ` Vinod Koul
  1 sibling, 0 replies; 3+ messages in thread
From: Vinod Koul @ 2025-05-14 11:37 UTC (permalink / raw)
  To: Kishon Vijay Abraham I, Krzysztof Kozlowski, Conor Dooley,
	Heiko Stuebner, Rob Herring (Arm)
  Cc: linux-phy, devicetree, linux-arm-kernel, linux-rockchip,
	linux-kernel


On Mon, 14 Apr 2025 20:18:23 -0500, Rob Herring (Arm) wrote:
> Convert the Rockchip RK3399 PCIe PHY to DT schema format. Move the
> example to the GRF binding as that has the complete block.
> 
> 

Applied, thanks!

[1/1] dt-bindings: phy: rockchip: Convert RK3399 PCIe PHY to schema
      commit: 1d6fc048b86b76db73073ded8e84b0fd8757c908

Best regards,
-- 
~Vinod




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

end of thread, other threads:[~2025-05-14 12:26 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-04-15  1:18 [PATCH v2] dt-bindings: phy: rockchip: Convert RK3399 PCIe PHY to schema Rob Herring (Arm)
2025-05-01 13:24 ` Heiko Stübner
2025-05-14 11:37 ` Vinod Koul

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).