From: Maxime Chevallier <maxime.chevallier@bootlin.com>
To: Matthew Gerlach <matthew.gerlach@altera.com>
Cc: andrew+netdev@lunn.ch, davem@davemloft.net, edumazet@google.com,
kuba@kernel.org, pabeni@redhat.com, robh@kernel.org,
krzk+dt@kernel.org, conor+dt@kernel.org,
richardcochran@gmail.com, netdev@vger.kernel.org,
devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
Mun Yew Tham <mun.yew.tham@altera.com>
Subject: Re: [PATCH v2] dt-bindings: net: Convert socfpga-dwmac bindings to yaml
Date: Wed, 28 May 2025 17:06:50 +0200 [thread overview]
Message-ID: <20250528170650.2357ea07@fedora.home> (raw)
In-Reply-To: <20250528144650.48343-1-matthew.gerlach@altera.com>
Hello Matthew,
On Wed, 28 May 2025 07:46:50 -0700
Matthew Gerlach <matthew.gerlach@altera.com> wrote:
> From: Mun Yew Tham <mun.yew.tham@altera.com>
>
> Convert the bindings for socfpga-dwmac to yaml.
Oh nice ! Thanks for doing that ! I had some very distant plans to do
that at some point, but it was way down my priority list :( I'll try to
help the best I can !
> Signed-off-by: Mun Yew Tham <mun.yew.tham@altera.com>
> Signed-off-by: Matthew Gerlach <matthew.gerlach@altera.com>
> ---
> v2:
> - Add compatible to required.
> - Add descriptions for clocks.
> - Add clock-names.
> - Clean up items: in altr,sysmgr-syscon.
> - Change "additionalProperties: true" to "unevaluatedProperties: false".
> - Add properties needed for "unevaluatedProperties: false".
> - Fix indentation in examples.
> - Drop gmac0: label in examples.
> - Exclude support for Arria10 that is not validating.
> ---
> .../bindings/net/socfpga,dwmac.yaml | 148 ++++++++++++++++++
> .../devicetree/bindings/net/socfpga-dwmac.txt | 57 -------
> 2 files changed, 148 insertions(+), 57 deletions(-)
> create mode 100644 Documentation/devicetree/bindings/net/socfpga,dwmac.yaml
> delete mode 100644 Documentation/devicetree/bindings/net/socfpga-dwmac.txt
>
> diff --git a/Documentation/devicetree/bindings/net/socfpga,dwmac.yaml b/Documentation/devicetree/bindings/net/socfpga,dwmac.yaml
> new file mode 100644
> index 000000000000..a02175838fba
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/net/socfpga,dwmac.yaml
> @@ -0,0 +1,148 @@
> +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/net/socfpga,dwmac.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Altera SOCFPGA SoC DWMAC controller
> +
> +maintainers:
> + - Matthew Gerlach <matthew.gerlach@altera.com>
> +
> +description:
> + This binding describes the Altera SOCFPGA SoC implementation of the
> + Synopsys DWMAC for the Cyclone5, Arria5, Stratix10, and Agilex7 families
> + of chips.
> + # TODO: Determine how to handle the Arria10 reset-name, stmmaceth-ocp, that
> + # does not validate against net/snps,dwmac.yaml.
> +
> +select:
> + properties:
> + compatible:
> + oneOf:
> + - items:
> + - const: altr,socfpga-stmmac
> + - const: snps,dwmac-3.70a
> + - const: snps,dwmac
> + - items:
> + - const: altr,socfpga-stmmac-a10-s10
> + - const: snps,dwmac-3.74a
> + - const: snps,dwmac
> +
> + required:
> + - compatible
> + - altr,sysmgr-syscon
> +
> +properties:
> + clocks:
> + minItems: 1
> + items:
> + - description: GMAC main clock
> + - description:
> + PTP reference clock. This clock is used for programming the
> + Timestamp Addend Register. If not passed then the system
> + clock will be used and this is fine on some platforms.
> +
> + clock-names:
> + minItems: 1
> + maxItems: 2
> + contains:
> + enum:
> + - stmmaceth
> + - ptp_ref
> +
> + iommus:
> + maxItems: 1
> +
> + phy-mode:
> + enum:
> + - rgmii
You're missing rgmii-id, rgmii-rxid and rgmii-txid
> + - sgmii
SGMII is only supported when we have the optional
altr,gmii-to-sgmii-converter phandle, but I am pretty bad at writing
binding, I don't really know how to express this kind of constraint :/
1000base-x is also supported if the gmii-to-sgmii adapter supports it
as well, by having a TSE PCS (Lynx) included.
> + - gmii
rmii and mii are also supported, it would make sense to add it
here.
Maxime
next prev parent reply other threads:[~2025-05-28 15:07 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-28 14:46 [PATCH v2] dt-bindings: net: Convert socfpga-dwmac bindings to yaml Matthew Gerlach
2025-05-28 15:06 ` Maxime Chevallier [this message]
2025-05-28 16:19 ` Andrew Lunn
2025-05-28 22:42 ` Matthew Gerlach
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=20250528170650.2357ea07@fedora.home \
--to=maxime.chevallier@bootlin.com \
--cc=andrew+netdev@lunn.ch \
--cc=conor+dt@kernel.org \
--cc=davem@davemloft.net \
--cc=devicetree@vger.kernel.org \
--cc=edumazet@google.com \
--cc=krzk+dt@kernel.org \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=matthew.gerlach@altera.com \
--cc=mun.yew.tham@altera.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=richardcochran@gmail.com \
--cc=robh@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).