From: "Marek Behún" <kabel@kernel.org>
To: Rob Herring <robh+dt@kernel.org>, devicetree@vger.kernel.org
Cc: "Vladimir Oltean" <olteanv@gmail.com>,
"Holger Brunck" <holger.brunck@hitachienergy.com>,
"Andrew Lunn" <andrew@lunn.ch>,
"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
"Russell King" <rmk+kernel@armlinux.org.uk>,
linux-phy@lists.infradead.org, "Vinod Koul" <vkoul@kernel.org>,
"Kishon Vijay Abraham I" <kishon@ti.com>,
"Marek Behún" <kabel@kernel.org>
Subject: [PATCH devicetree 1/2] dt-bindings: phy: Convert generic PHY provider binding to YAML
Date: Wed, 15 Dec 2021 00:34:31 +0100 [thread overview]
Message-ID: <20211214233432.22580-2-kabel@kernel.org> (raw)
In-Reply-To: <20211214233432.22580-1-kabel@kernel.org>
Convert phy-bindings.txt to YAML. This creates binding only for PHY
provider, since PHY consumer binding is in dtschema. Consumer binding
example is provided.
Signed-off-by: Marek Behún <kabel@kernel.org>
---
.../devicetree/bindings/phy/phy-bindings.txt | 73 +------------------
.../devicetree/bindings/phy/phy.yaml | 59 +++++++++++++++
2 files changed, 60 insertions(+), 72 deletions(-)
create mode 100644 Documentation/devicetree/bindings/phy/phy.yaml
diff --git a/Documentation/devicetree/bindings/phy/phy-bindings.txt b/Documentation/devicetree/bindings/phy/phy-bindings.txt
index c4eb38902533..ded3cf18352d 100644
--- a/Documentation/devicetree/bindings/phy/phy-bindings.txt
+++ b/Documentation/devicetree/bindings/phy/phy-bindings.txt
@@ -1,72 +1 @@
-This document explains only the device tree data binding. For general
-information about PHY subsystem refer to Documentation/driver-api/phy/phy.rst
-
-PHY device node
-===============
-
-Required Properties:
-#phy-cells: Number of cells in a PHY specifier; The meaning of all those
- cells is defined by the binding for the phy node. The PHY
- provider can use the values in cells to find the appropriate
- PHY.
-
-Optional Properties:
-phy-supply: Phandle to a regulator that provides power to the PHY. This
- regulator will be managed during the PHY power on/off sequence.
-
-For example:
-
-phys: phy {
- compatible = "xxx";
- reg = <...>;
- .
- .
- #phy-cells = <1>;
- .
- .
-};
-
-That node describes an IP block (PHY provider) that implements 2 different PHYs.
-In order to differentiate between these 2 PHYs, an additional specifier should be
-given while trying to get a reference to it.
-
-PHY user node
-=============
-
-Required Properties:
-phys : the phandle for the PHY device (used by the PHY subsystem; not to be
- confused with the Ethernet specific 'phy' and 'phy-handle' properties,
- see Documentation/devicetree/bindings/net/ethernet.txt for these)
-phy-names : the names of the PHY corresponding to the PHYs present in the
- *phys* phandle
-
-Example 1:
-usb1: usb_otg_ss@xxx {
- compatible = "xxx";
- reg = <xxx>;
- .
- .
- phys = <&usb2_phy>, <&usb3_phy>;
- phy-names = "usb2phy", "usb3phy";
- .
- .
-};
-
-This node represents a controller that uses two PHYs, one for usb2 and one for
-usb3.
-
-Example 2:
-usb2: usb_otg_ss@xxx {
- compatible = "xxx";
- reg = <xxx>;
- .
- .
- phys = <&phys 1>;
- phy-names = "usbphy";
- .
- .
-};
-
-This node represents a controller that uses one of the PHYs of the PHY provider
-device defined previously. Note that the phy handle has an additional specifier
-"1" to differentiate between the two PHYs.
+This file has moved to ./phy.yaml.
diff --git a/Documentation/devicetree/bindings/phy/phy.yaml b/Documentation/devicetree/bindings/phy/phy.yaml
new file mode 100644
index 000000000000..a5b6b04cff5b
--- /dev/null
+++ b/Documentation/devicetree/bindings/phy/phy.yaml
@@ -0,0 +1,59 @@
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/phy/phy.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Common PHY Provider Generic Binding
+
+description:
+ This is the generic binding for common PHYs providers.
+
+maintainers:
+ - Kishon Vijay Abraham I <kishon@ti.com>
+ - Vinod Koul <vkoul@kernel.org>
+
+select:
+ required:
+ - '#phy-cells'
+
+properties:
+ '#phy-cells':
+ $ref: '/schemas/types.yaml#/definitions/uint32'
+ description:
+ Number of cells in a PHY specifier. The meaning of all those cells is
+ defined by the binding for the PHY node. The PHY provider can use the
+ values in cells to find the appropriate PHY.
+ maximum: 16
+
+ phy-supply:
+ description:
+ Phandle to a regulator that provides power to the PHY. This regulator
+ will be managed during the PHY power on/off sequence.
+
+required:
+ - '#phy-cells'
+
+additionalProperties: true
+
+examples:
+ - |
+ phy_regulator: regulator {
+ compatible = "regulator-fixed";
+ regulator-name = "phy-regulator";
+ };
+
+ phy: phy {
+ #phy-cells = <1>;
+ phy-supply = <&phy_regulator>;
+ };
+
+ ethernet-controller {
+ phys = <&phy 0>;
+ phy-names = "ethphy";
+ };
+
+ usb {
+ phys = <&phy 1>, <&phy 2>;
+ phy-names = "usb2phy", "usb3phy";
+ };
--
2.32.0
next prev parent reply other threads:[~2021-12-14 23:34 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-12-14 23:34 [PATCH devicetree 0/2] Common PHY to YAML + tx-amplitude property Marek Behún
2021-12-14 23:34 ` Marek Behún [this message]
2021-12-15 21:41 ` [PATCH devicetree 1/2] dt-bindings: phy: Convert generic PHY provider binding to YAML Rob Herring
2021-12-14 23:34 ` [PATCH devicetree 2/2] dt-bindings: phy: Add `tx-amplitude-microvolt` property binding Marek Behún
2021-12-15 10:55 ` Andrew Lunn
2021-12-15 17:22 ` Marek Behún
2021-12-15 17:29 ` Andrew Lunn
2021-12-15 22:01 ` Rob Herring
2021-12-15 21:58 ` Rob Herring
2022-01-12 17:29 ` Marek Behún
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20211214233432.22580-2-kabel@kernel.org \
--to=kabel@kernel.org \
--cc=andrew@lunn.ch \
--cc=devicetree@vger.kernel.org \
--cc=holger.brunck@hitachienergy.com \
--cc=kishon@ti.com \
--cc=linux-phy@lists.infradead.org \
--cc=netdev@vger.kernel.org \
--cc=olteanv@gmail.com \
--cc=rmk+kernel@armlinux.org.uk \
--cc=robh+dt@kernel.org \
--cc=vkoul@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).