From: Rob Herring <robh@kernel.org>
To: Markus Stockhausen <markus.stockhausen@gmx.de>
Cc: linux-phy@lists.infradead.org, chris.packham@alliedtelesis.co.nz,
devicetree@vger.kernel.org, krzk@kernel.org
Subject: Re: [PATCH v2 1/3] dt-bindings: phy: add realtek,otto-serdes PHY binding
Date: Mon, 7 Oct 2024 14:30:44 -0500 [thread overview]
Message-ID: <20241007193044.GA2255474-robh@kernel.org> (raw)
In-Reply-To: <20241007163623.3274510-2-markus.stockhausen@gmx.de>
On Mon, Oct 07, 2024 at 12:36:21PM -0400, Markus Stockhausen wrote:
> Add bindings for the SerDes of the Realtek Otto platform. These are
> network Switch SoCs with up to 52 ports divided into four different
> model lines.
>
> Changes in v2:
> - new subject
> - removed patch command sequences
> - renamed parameter controlled-ports to realtek,controlled-ports
>
> Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
> ---
> .../bindings/phy/realtek,otto-serdes.yaml | 95 +++++++++++++++++++
> 1 file changed, 95 insertions(+)
> create mode 100644 Documentation/devicetree/bindings/phy/realtek,otto-serdes.yaml
>
> diff --git a/Documentation/devicetree/bindings/phy/realtek,otto-serdes.yaml b/Documentation/devicetree/bindings/phy/realtek,otto-serdes.yaml
> new file mode 100644
> index 000000000000..a72ac206b35f
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/phy/realtek,otto-serdes.yaml
> @@ -0,0 +1,95 @@
> +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/phy/realtek,otto-serdes.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Realtek Otto SerDes controller
> +
> +maintainers:
> + - Markus Stockhausen <markus.stockhausen@gmx.de>
> +
> +description:
You need '>' on the end if you want to preserve paragraphs.
> + The MIPS based Realtek Switch SoCs of the Realtek RTL838x, RTL839x, RTL930x and RTL931x series
> + have multiple SerDes built in. They are linked to single, quad or octa PHYs like the RTL8218B,
> + RTL8218D or RTL8214FC and are one of the integral part of the up-to-52-port switch architecture.
> +
> + Although these SerDes controllers have common basics they behave differently on the SoC families
> + and rely on heavy register magic. To keep the driver clean it can load patch sequences from
> + devictree and execute them during the controller actions like phy_init(), ...
> +
> + The driver exposes the SerDes registers different from the hardware but instead gives a
> + consistent view and programming interface. So the RTL838x series has 6 ports and 4 pages, the
> + RTL839x has 14 ports and 12 pages, the RTL930x has 12 ports and 64 pages and the RTL931x has
> + 14 ports and 192 pages.
> +
> +properties:
> + $nodename:
> + pattern: "^serdes@[0-9a-f]+$"
The node name for phy providers is 'phy'.
> +
> + compatible:
> + items:
> + - enum:
> + - realtek,rtl8380-serdes
> + - realtek,rtl8390-serdes
> + - realtek,rtl9300-serdes
> + - realtek,rtl9310-serdes
> +
> + reg:
> + items:
> + description:
> + The primary SerDes paged register memory location. Other SerDes control and management
> + registers are distributed all over the I/O memory space and are identified by the driver.
> +
> + "#phy-cells":
> + const: 4
> + description:
> + The first number defines the SerDes to use. The second number a linked SerDes. E.g. if a octa
> + 1G PHY is attached to two QSGMII SerDes. The third number is the first switch port this
> + SerDes is working for, the fourth number is the last switch port the SerDes is working for.
> +
> + realtek,controlled-ports:
> + $ref: /schemas/types.yaml#/definitions/uint32
> + description:
> + A bit mask defining the ports that are actively controlled by the driver. In case a bit is
> + not set the driver will only process read operations on the SerDes. This is just in case the
> + SerDes has been setup by U-Boot correctly and the driver malfunctions. If not set the driver
> + will control all SerDes.
> +
> +reguired:
> + - compatible
> + - reg
> + - "#phy-cells"
> +
> +additionalProperties:
> + false
One line like *everywhere* else.
> +
> +examples:
> + - |
> + serdes: serdes@1b00e780 {
Drop unused labels.
> + compatible = "realtek,rtl8380-serdes", "realtek,otto-serdes";
> + reg = <0x1b00e780 0x1200>;
> + controlled-ports = <0x003f>;
> + #phy-cells = <4>;
> + };
> + - |
> + serdes: serdes@1b00a000 {
> + compatible = "realtek,rtl8390-serdes", "realtek,otto-serdes";
> + reg = <0x1b00a000 0x1c00>;
> + controlled-ports = <0x3fff>;
> + #phy-cells = <4>;
> + };
> + - |
> + serdes: serdes@1b0003b0 {
> + compatible = "realtek,rtl9300-serdes", "realtek,otto-serdes";
> + reg = <0x1b0003b0 0x8>;
> + controlled-ports = <0x0fff>;
> + #phy-cells = <4>;
> + };
> + - |
> + serdes: serdes@1b005638 {
> + compatible = "realtek,rtl9310-serdes", "realtek,otto-serdes";
> + reg = <0x1b005638 0x8>;
> + controlled-ports = <0x3fff>;
> + #phy-cells = <4>;
> + };
You don't need 4 examples that are essentially the same.
> --
> 2.46.2
>
next prev parent reply other threads:[~2024-10-07 19:30 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-07 16:36 [PATCH v2 0/3] phy: Realtek Otto SerDes: add new driver Markus Stockhausen
2024-10-07 16:36 ` [PATCH v2 1/3] dt-bindings: phy: add realtek,otto-serdes PHY binding Markus Stockhausen
2024-10-07 18:17 ` Rob Herring (Arm)
2024-10-07 19:26 ` Krzysztof Kozlowski
2024-10-08 5:38 ` AW: " markus.stockhausen
2024-10-08 6:17 ` Krzysztof Kozlowski
2024-10-08 6:56 ` AW: " markus.stockhausen
2024-10-08 8:32 ` Krzysztof Kozlowski
2024-10-08 9:27 ` AW: " markus.stockhausen
2024-10-16 15:30 ` markus.stockhausen
2024-10-17 6:15 ` Krzysztof Kozlowski
2024-10-07 19:30 ` Rob Herring [this message]
2024-10-08 12:27 ` markus.stockhausen
2024-10-08 7:04 ` Krzysztof Kozlowski
2024-10-08 7:06 ` Krzysztof Kozlowski
2024-10-07 16:36 ` [PATCH v2 2/3] phy: Realtek Otto SerDes driver Markus Stockhausen
2024-10-07 19:32 ` Krzysztof Kozlowski
2024-10-07 16:36 ` [PATCH v2 3/3] phy: Integrate Realtek Otto SerDes driver into build system Markus Stockhausen
2024-10-07 19:27 ` Krzysztof Kozlowski
2024-10-08 6:38 ` kernel test robot
2024-10-08 7:20 ` kernel test robot
2024-10-08 8:21 ` kernel test robot
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=20241007193044.GA2255474-robh@kernel.org \
--to=robh@kernel.org \
--cc=chris.packham@alliedtelesis.co.nz \
--cc=devicetree@vger.kernel.org \
--cc=krzk@kernel.org \
--cc=linux-phy@lists.infradead.org \
--cc=markus.stockhausen@gmx.de \
/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).