🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.kernel.netdev
Article #17881

Re: [PATCH net-next v4 1/8] dt-bindings: net: add Xilinx TSN Endpoint Ethernet MAC

#17881
From: netdev-bot+sashiko
Date: Tue, 17 Nov 2026 13:14
262 lines
17786 bytes
Thank you for your contribution! Sashiko AI review found more severe
issue(s) in other patches of this series. This mail is only an FYI, in case
you want to address the nit picks below when you respin.

Low priority / nit picks for your consideration:

- [Low] The top-level schema never requires the '^ethernet@[0-9a-f]+$'
  (xlnx,tsn-ep-mac) child or the '^switch@[0-9a-f]+$' (xlnx,tsn-switch)…
- [Low] The per-xlnx,num-priorities allOf branches force tx-queues-config
  to hold exactly queue0..queue(N-1).
- [Low] The wrapper compatible is IP-version-specific ('xlnx,tsn-
  endpoint-ethernet-mac-3.0').
- [Low] The commit message says 'Each external port@N references its PHY
  through a phy-handle in the matching mdio-<N> child.' Since v3, the…
- [Low] ethernet-port@1 and ethernet-port@2 restrict phy-mode to gmii,
  rgmii and rgmii-id, which excludes rgmii-txid and rgmii-rxid.
- [Low] clocks/clock-names is a fixed list of six required entries (gtx,
  gtx90, host_rxfifo, host_txfifo, ref, s_axi), with no conditional on…

--

dt-bindings: net: add Xilinx TSN Endpoint Ethernet MAC

This adds a YAML binding for the Xilinx TSN Endpoint Ethernet MAC IP in
its Bridged Endpoint configuration. The top-level wrapper node owns the
shared clocks and xlnx,num-priorities. It has an xlnx,tsn-ep-mac child for
the host-side DMA channels and an xlnx,tsn-switch child for the three-port
switch, its MDIO buses and its ports.

> children and per-MAC interrupt-names entries. Each external
> port@N references its PHY through a phy-handle in the matching
> mdio-<N> child.

[Severity: Low]
Is this sentence still accurate after the v3 rename? The binding now only
accepts ethernet-port@1 and ethernet-port@2 inside the ethernet-ports
container. That container has additionalProperties: false, so the schema
would reject a node named port@1.

Should this say ethernet-port@N instead?

> diff --git a/Documentation/devicetree/bindings/net/xlnx,tsn-endpoint-ethernet-mac.yaml b/Documentation/devicetree/bindings/net/xlnx,tsn-endpoint-ethernet-mac.yaml
> new file mode 100644
> index 0000000000000..2fd22bc0d0357
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/net/xlnx,tsn-endpoint-ethernet-mac.yaml
> @@ -0,0 +1,536 @@

[ ... ]

> +properties:
> +  compatible:
> +    const: xlnx,tsn-endpoint-ethernet-mac-3.0
> +
> +  clocks:
> +    items:
> +      - description: GTX clock for transmitter logic and RTC
> +      - description: GTX 90-degree phase shifted clock for RGMII
> +      - description: Host RX FIFO clock
> +      - description: Host TX FIFO clock
> +      - description: Reference clock for IDELAY control
> +      - description: AXI-Lite register interface clock
> +
> +  clock-names:
> +    items:
> +      - const: gtx
> +      - const: gtx90
> +      - const: host_rxfifo
> +      - const: host_txfifo
> +      - const: ref
> +      - const: s_axi

[Severity: Low]
Does the IP still have all six clock inputs when both external ports are
GMII? The description says gtx90 is the phase shifted clock for RGMII.
The list does not depend on the ports' phy-mode, so a GMII-only design
still has to supply gtx90.

The example already feeds the same clock to both gtx and gtx90:

    clocks = <&misc_clk_2>, <&misc_clk_2>, <&misc_clk_1>, <&misc_clk_1>,

Later in the series, tsn_ip_probe() in xilinx_tsn_main.c requests all six
clocks as mandatory:

    ret = devm_clk_bulk_get(dev, TSN_NUM_CLOCKS, w->clks);

A DT without gtx90 would therefore fail to probe. The binding does not say
which clock inputs exist in the GMII configuration. The ref (IDELAYCTRL)
clock may still be needed for GMII.

If the GMII configuration has no gtx90 input, should that clock depend on
the ports' phy-mode?

> +
> +  ranges: true

[ ... ]

> +patternProperties:
> +  "^ethernet@[0-9a-f]+$":
> +    type: object
> +    $ref: /schemas/net/ethernet-controller.yaml#
> +    unevaluatedProperties: false
> +    description:
> +      Endpoint MAC sub-node. Provides the host-side data path through the
> +      DMA channels described by its dmas / dma-names.
> +    properties:
> +      compatible:
> +        const: xlnx,tsn-ep-mac

[Severity: Low]
The wrapper compatible is versioned (xlnx,tsn-endpoint-ethernet-mac-3.0).
This child and the switch child (xlnx,tsn-switch) use unversioned names
that cover the whole family.

Documentation/devicetree/bindings/writing-bindings.rst asks for specific
compatibles and says not to use device-family names. For sub-blocks of a
bigger device, it prefers a compatible derived from the parent device.

The MDIO and PTP blocks sit at fixed offsets in the per-MAC windows of
this IP version. How would these child compatibles distinguish a later TSN
IP revision with a different sub-block layout?

Should the child compatibles follow the parent IP version too? If not,
could the commit message explain why they are generic?

[ ... ]

> +      dma-names:
> +        minItems: 2
> +        maxItems: 16
> +        items:
> +          pattern: "^(tx|rx)_chan[0-7]$"
> +        allOf:
> +          - contains:
> +              pattern: "^tx_chan[0-7]$"
> +          - contains:
> +              pattern: "^rx_chan[0-7]$"

[ ... ]

> +      tx-queues-config:
> +        type: object
> +        additionalProperties: false
> +        description:
> +          TX queue configuration node that maps IP priority queues to
> +          DMA TX channels. The TSN IP supports multiple priority queues for
> +          QoS scheduling. Each priority queue must be described exactly
> +          once and map to a distinct TX channel listed in dma-names. Two
> +          queues must not use the same TX channel. The mapping need not
> +          follow the channel numbering. For example, queue0 with
> +          xlnx,dma-channel-num set to 5 means priority queue 0 uses tx_chan5
> +          for data transfer.

[Severity: Low]
Should dma-names be tied to xlnx,num-priorities in the same way as the
queueN children?

The per-N allOf branches force tx-queues-config to hold exactly queue0 to
queue(N-1). dma-names only needs one tx_chan entry and one rx_chan entry,
and it has no uniqueItems. As far as I can tell, this would validate:

    xlnx,num-priorities = <8>;
    dma-names = "tx_chan0", "rx_chan0";
    tx-queues-config {
        queue0 { xlnx,dma-channel-num = <0>; };
        ...
        queue7 { xlnx,dma-channel-num = <0>; };
    };

That contradicts the description above, which says each queue maps to a
distinct TX channel listed in dma-names.

The driver added later in the series ("net: xilinx: tsn: parse endpoint
DMA channel configuration") also requires an exact match in
xlnx_tsn_ep_probe():

    if (num_tx_dma_channels != num_prio)
        return dev_err_probe(dev, -EINVAL,
                     "TX channel count %u must equal num-priorities %u\n",

The binding does not document this rule. A DT with more tx_chan entries
than priorities passes dt_binding_check but fails probe. The driver
rejects all of these cases at probe time with an error message.

Could each per-N if/then block also limit the tx_chan entries to exactly
N (contains with minContains/maxContains), and could dma-names get
uniqueItems: true?

The MAINTAINERS entry here lists only the binding file. The driver
directory is added to it later in the series.

[ ... ]

> +          ethernet-port@1:
> +            type: object
> +            unevaluatedProperties: true
> +            description:
> +              External Ethernet port wired to MAC1, reached through the
> +              mdio-1 bus.
> +
> +            properties:
> +              reg:
> +                const: 1
> +
> +              phy-mode:
> +                enum:
> +                  - gmii
> +                  - rgmii
> +                  - rgmii-id

[Severity: Low]
Why are rgmii-txid and rgmii-rxid left out here and on ethernet-port@2?

phy-mode describes which RGMII delays the board does not provide. A board
whose PCB adds only one of the two delays needs one of those modes. With
this enum, the board author has to choose rgmii (one delay missing) or
rgmii-id (one delay applied twice).

The gtx90 clock is described as "GTX 90-degree phase shifted clock for
RGMII", which suggests the MAC may shift TXC itself. Does the MAC add the
TX delay? If it does, and the PHY also adds the TX delay for rgmii-id, the
delay would be applied twice.

Should the binding say whether the MAC applies this delay, or describe it
with a property such as tx-internal-delay-ps?

[ ... ]

> +additionalProperties: false
> +
> +required:
> +  - compatible
> +  - clocks
> +  - clock-names
> +  - xlnx,num-priorities
> +  - ranges
> +  - '#address-cells'
> +  - '#size-cells'

[Severity: Low]
Should the ethernet@ and switch@ children be required here?

The description and changelog say the binding covers only the fixed
Bridged Endpoint configuration. ethernet-port@0/1/2 are required because
a DT missing any of them "cannot describe working hardware". Even so, a
wrapper with no switch@ child, or with no children at all, still passes
dt_binding_check.

A node with only an ethernet@ child already validates under
xlnx,tsn-endpoint-ethernet-mac-3.0. That is the Endpoint-only layout the
changelog says is not supported yet.

If the two configurations are told apart later by which children are
present, shouldn't this schema state that requirement now?

[ ... ]

-- 
Sashiko AI review · https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20261113-patches_v2_external-v4-0-56bb26f042a4%40amd.com
Technical Details
Message-ID: <179492128136.3136.2884088710304095071@kernel.org>
Path: mbox-mo1.pugleaf.net!news-lax.pugleaf.net!srl.newsdeef.eu!newsfeed.bofh.team!nntp.comgw.net!eternal-september.org!feeder.eternal-september.org!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-365286-linux-kernel-netdev=dewy.ru
References: <20261113-patches_v2_external-v4-1-56bb26f042a4@amd.com>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-lax.pugleaf.net!srl.newsdeef.eu!newsfeed.bofh.team!nntp.comgw.net!eternal-september.org!feeder.eternal-september.org!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-365286-linux-kernel-netdev=dewy.ru
From: netdev-bot+sashiko@kernel.org
Newsgroups: linux.kernel.netdev
Subject: Re: [PATCH net-next v4 1/8] dt-bindings: net: add Xilinx TSN Endpoint
 Ethernet MAC
Date: Tue, 17 Nov 2026 13:14:41 +0000
Organization: Usenet Network
Message-ID: <179492128136.3136.2884088710304095071@kernel.org>
References: <20261113-patches_v2_external-v4-1-56bb26f042a4@amd.com>
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 8bit
Injection-Info: usenet.network;
	logging-data="2335181"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:ukboJlwRR/V1baZJmdsNLrptbR0= sha256:NH3dHRQ0U5BrukDcgXdSy/OlL5gjU6Q09v6JIdaIryE=
	sha1:dFDNVo3Q7QxAlkkseynOtN8eeXY= sha256:74mbS9HPUdKHZnkSnsCYrN4LvaAofGIcpTT2TA/sfo8=
List-ID: <netdev.vger.kernel.org>
X-Mailpost-Empty-Hdrs: X-Spam-Level
X-Received: from localhost (localhost [127.0.0.1])
	by mail.dewy.ru (Postfix) with ESMTP id DFD50114F7C; Tue, 17 Nov 2026 16:15:13 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -3.401
X-Spam-Status: No, score=-3.401 tagged_above=-9999 required=6.31
	tests=[DCC_REPUT_70_89=0.1, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1,
	DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1,
	MAILING_LIST_MULTI=-1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001,
	SPF_PASS=-0.001] autolearn=ham autolearn_force=no
X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=pass (2048-bit key)
	header.d=kernel.org
X-Received: from mail.dewy.ru ([127.0.0.1])
	by localhost (mail.dewy.ru [127.0.0.1]) (amavisd-new, port 10024)
	with ESMTP id 4FeEEF7lb4dQ;
	Tue, 17 Nov 2026 16:15:09 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.105.105.114; helo=tor.lore.kernel.org; envelope-from=netdev+bounces-365286-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> 
X-Authentication-Results: OpenDMARC; dmarc=pass (p=quarantine dis=none) header.from=kernel.org
X-Received: from tor.lore.kernel.org (tor.lore.kernel.org [172.105.105.114])
	by mail.dewy.ru (Postfix) with ESMTPS id 63EE9114F70; Tue, 17 Nov 2026 16:15:01 +0300 (MSK)
X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92])
	by tor.lore.kernel.org (Postfix) with ESMTP id 3C684321C6; Tue, 17 Nov 2026 13:14:51 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1
X-ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass;
	t=1794921284;
	b=FFhcTJda86Kpiy8ktYhSkqcK3oSrmcxep0vWeEly5uPCbrMdpdp6du8iZKBPDRLICKWq
	 uZ5hTJwXlY9wWcYEABDZ6h1KQLD5WYQ1kqZSNMdbh3c8nB9jX7YqeYr6+hN2D8EL4EI0+
	 +RucKec4YzjQm8kVPdWQjU7w/qXrZCWeujh3EetecXy/cDDJjIWshhnBFnQjkweoeDOrL
	 cjdTGFNUiKjSQnHF7Hm3HJow1ZjUjaR4ozIUyteJMXn5T9Wq4t7IzJlSXisquWb4dMADS
	 rI2aNqQMRMP3SRwLT4PQtnb3wZ5ejPynib2Zo26GDOmlzN1MPbP9ExSnCwM5IXgorrw==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1794921284;
	h=X-Original-To:Received:Received:DKIM-Signature:Subject:From:To:Cc:
	 Date:Message-ID:In-Reply-To:References:X-sashiko-severity:
	 Content-Type:Content-Transfer-Encoding:X-Mailing-List:List-Id:
	 List-Post:List-Help:List-Subscribe:List-Unsubscribe:List-Owner:
	 Precedence:MIME-Version;
	bh=xyPkutf+7u4MBeQWcEZC0BYLhd811Pqb+vA5vUZ5q7U=;
	b=RcHBzAHNw+E0+1DCgTAsoJ+EDOjPyYpxlPNgKdKkx/9ZBQki5aAEj7v8MfRPMqzPlbc6
	 UiHE6SUEEtEshP0OcZQboOWIyZW02GGKNc2hCmdEZt4SytWIOrVY2hpgHsfzP4Db19hYT
	 1NneHkhznoUI62v9VCuzBl5/DguHlR4blkQSQryyIj3yuct4lmtPIFrSEwaaS41XUfU/n
	 kOCxJY5D9sxtFJthOMVIIu3SIMI7QJFm9X4wSbZxCCcfUtNamPmsuNqkG4cg37XloF+kj
	 wOrEY9kE6GHSte5+0NEFqg0RyzKp1edmGG3c5JohvtOz1EVhMBajvTyXmSht8qE7v/A==
X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; 
	dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=GVVA2TtO;
	arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1
X-Received: from localhost.localdomain (localhost [127.0.0.1])
	by smtp.subspace.kernel.org (Postfix) with ESMTP id 010C1606A33F;
	Tue, 17 Nov 2026 13:14:44 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org;
	dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=GVVA2TtO
X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18
X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none;
	t=1794921283;
	b=YEYlrCDy+irdWDbwnqEx7JD67KzOtj9FNxj/qoEK5p1kzvVZxaRrSiiTnR8UtNmEnz3j
	 SjM7Vg6wgmRec4agYUi84X8bcEl1EOyTE9/vfTqWlKxIvXs4iKIq8hFc/5+Eu3M6g/6a/
	 vdRnATL0yxXIwQh8HjVlREg0jWsxmiMlQuKFivGB95y7LTT7USgwcFbTW+ZT2ZMdvvicR
	 7qKEQlZg1LoQs8WkzV9q+wXIIf0+dkwZCx/4oasfqY2+zkjPLmWwdV2WqMtakphczbYVl
	 v3d0JFsNwQ1WTkk6b+gxFgDQhydbA9OeHg/9FhRmTXYwh9JyRzV57bBa4MbxLPS1rdA==
X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1794921283;
	h=Received:DKIM-Signature:Subject:From:To:Cc:Date:Message-ID:
	 In-Reply-To:References:X-sashiko-severity:Content-Type:
	 Content-Transfer-Encoding:MIME-Version;
	bh=xyPkutf+7u4MBeQWcEZC0BYLhd811Pqb+vA5vUZ5q7U=;
	b=bWKjZBGFLG0QanCaNfaMkC904268UMO6QFetDqAILhA0zDzxupo//K5aqfGdkBpdLmZ/
	 GH9UbrEm9XEz61cvJI93w+QgDjzJWspp2l9AkphIW1Pcg12Z2vOZUO+zydE2vd5fbWgK/
	 gCse4S8Oi3KYa0rjw7+sA49jMnJ/i9QqbSXWXam0Iijvf3XdCBTjAKxzFsfNtDF6oX3x0
	 XZ83ksZu5MzHw6n9st59iBklm3t56dbi8S6OMnr98fB/fhQoUjIv/6Yvxa/fvm0dJgeSz
	 quH5FucfWmYpGH4lejJEX08SyhIMRJpX0iJEVugs4qS9fTVyw/mhjGpar8uM9S5lRsw==
X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; 
	dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=GVVA2TtO;
	arc=none smtp.remote-ip=100.103.45.18
X-Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature ECDSA (prime256v1))
	(No client certificate requested)
	by smtp.subspace.kernel.org (Postfix) with ESMTPS id 22464606A323;
	Tue, 17 Nov 2026 13:14:43 +0000 (UTC)
X-Received: by smtp.kernel.org (Postfix) with ESMTPSA id C9A131F000C6;
	Tue, 17 Nov 2026 13:14:41 +0000 (UTC)
X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org;
	s=k20260515; t=1794921283;
	bh=xyPkutf+7u4MBeQWcEZC0BYLhd811Pqb+vA5vUZ5q7U=;
	h=Subject:From:To:Cc:Date:In-Reply-To:References;
	b=GVVA2TtOKCATkUVgz44orb44F6ykiWv6QfYowOc81WmQ5JHbSJnuEIvtXX1eDP5x7
	 +eaxtRfiU4i1bPhGayTJ+jpfq5sHebMIW0mVYD39Vb1hZnQm2tGbfGE5kXdeExBOBi
	 UqQhcVTTS24CHnLWE7HVH6/WpFwwpCSG0W8i+X70EtBrNz1NPT3viafmBK5Xc6Ak+U
	 0lfpu0s0ua0zUNDS08vjQfBILohX79k1XcEVe8ua5Kh3r4J2XrTsMeIFGwcUlfCIkA
	 /XOvRGzAEIaBCoJ4TU1oF1KE2aZ9ayNraIrK9MPOPFBHgB6sNvnlAHYVnCO+pFop1D
	 nIdz+1F2ROIrA==
X-Cc: nagadheeraj.rottela@amd.com, andrew+netdev@lunn.ch, davem@davemloft.net,
 kuba@kernel.org, pabeni@redhat.com, robh@kernel.org, krzk+dt@kernel.org,
 conor+dt@kernel.org, richardcochran@gmail.com, michal.simek@amd.com,
 bigeasy@linutronix.de, clrkwllms@kernel.org, rostedt@goodmis.org,
 edumazet@kernel.org, netdev@vger.kernel.org, devicetree@vger.kernel.org,
 linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
 linux-rt-devel@lists.linux.dev, git@amd.com, neelisrinivas18@gmail.com
X-In-Reply-To: <20261113-patches_v2_external-v4-1-56bb26f042a4@amd.com>
X-sashiko-severity: Low
X-Mailing-List: netdev@vger.kernel.org
X-List-Post: <mailto:netdev@vger.kernel.org>
X-List-Help: <mailto:netdev+help@vger.kernel.org>
X-List-Subscribe: <mailto:netdev+subscribe@vger.kernel.org>
X-List-Unsubscribe: <mailto:netdev+unsubscribe@vger.kernel.org>
X-List-Owner: <mailto:netdev+owner@vger.kernel.org>
X-Precedence: list