mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Joseph Telaak via B4 Relay <devnull+joseph.telaak.dev@kernel.org>
To: Andrew Lunn <andrew+netdev@lunn.ch>,
	 "David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@kernel.org>,
	 Jakub Kicinski <kuba@kernel.org>,
	Paolo Abeni <pabeni@redhat.com>,  Rob Herring <robh@kernel.org>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	 Conor Dooley <conor+dt@kernel.org>,
	 Richard Cochran <richardcochran@gmail.com>,
	 Alexandre Torgue <alexandre.torgue@foss.st.com>,
	 Jose Abreu <joabreu@synopsys.com>,
	 Maxime Chevallier <maxime.chevallier@bootlin.com>,
	 Maxime Coquelin <mcoquelin.stm32@gmail.com>
Cc: Chuanhong Guo <gch981213@gmail.com>,
	 Russell King <linux@armlinux.org.uk>,
	linux-mips@vger.kernel.org,  netdev@vger.kernel.org,
	devicetree@vger.kernel.org,  linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	 Joseph Telaak <joseph@telaak.dev>
Subject: [PATCH net-next v2 2/3] dt-bindings: net: Add Siflower SF19A2890 GMAC
Date: Tue, 01 Dec 2026 02:00:26 -0500	[thread overview]
Message-ID: <20261201-sf19a2890-gmac-v2-2-8d2c513db496@telaak.dev> (raw)
In-Reply-To: <20261201-sf19a2890-gmac-v2-0-8d2c513db496@telaak.dev>

From: Joseph Telaak <joseph@telaak.dev>

The Siflower SF19A2890 has a DesignWare GMAC 3.73a whose interface
type and RGMII clock delays are set in a configuration block of its
own, next to its clock and reset manager. It takes a fourth clock, the
RGMII transmit reference.

The delay lines are calibrated per unit at the factory, and the result
is stored in flash in the lines' own steps, so the delays come from an
nvmem cell, rgmii-delay. The delay of the TX line at its lowest setting
is not known, so rx-internal-delay-ps and tx-internal-delay-ps are not
accepted: a value in picoseconds could not be honored.

Signed-off-by: Joseph Telaak <joseph@telaak.dev>
---
 .../bindings/net/siflower,sf19a2890-gmac.yaml      | 119 +++++++++++++++++++++
 .../devicetree/bindings/net/snps,dwmac.yaml        |   1 +
 MAINTAINERS                                        |   6 ++
 3 files changed, 126 insertions(+)

diff --git a/Documentation/devicetree/bindings/net/siflower,sf19a2890-gmac.yaml b/Documentation/devicetree/bindings/net/siflower,sf19a2890-gmac.yaml
new file mode 100644
index 000000000000..f42276c25d2c
--- /dev/null
+++ b/Documentation/devicetree/bindings/net/siflower,sf19a2890-gmac.yaml
@@ -0,0 +1,119 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/net/siflower,sf19a2890-gmac.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Siflower SF19A2890 GMAC
+
+maintainers:
+  - Joseph Telaak <joseph@telaak.dev>
+
+description:
+  The Siflower SF19A2890 has a Synopsys DesignWare GMAC 3.73a. Its
+  interface type and RGMII clock delays are set in a configuration block
+  of its own. The delay lines are calibrated per unit at the factory, and
+  the MAC adds the delays only where that calibration is given.
+
+select:
+  properties:
+    compatible:
+      contains:
+        const: siflower,sf19a2890-gmac
+  required:
+    - compatible
+
+properties:
+  compatible:
+    items:
+      - const: siflower,sf19a2890-gmac
+      - const: snps,dwmac
+
+  reg:
+    items:
+      - description: MAC registers
+      - description: Interface configuration registers
+
+  interrupts:
+    maxItems: 3
+
+  interrupt-names:
+    items:
+      - const: macirq
+      - const: eth_wake_irq
+      - const: eth_lpi
+
+  clocks:
+    items:
+      - description: GMAC main clock
+      - description: Peripheral registers interface clock
+      - description: PTP reference clock
+      - description: RGMII transmit reference clock
+
+  clock-names:
+    items:
+      - const: stmmaceth
+      - const: pclk
+      - const: ptp_ref
+      - const: byp_ref
+
+  nvmem-cells:
+    minItems: 1
+    maxItems: 2
+
+  nvmem-cell-names:
+    minItems: 1
+    items:
+      - const: mac-address
+      - const: rgmii-delay
+    description:
+      rgmii-delay is the factory calibration of the RGMII clock delay
+      lines, four ASCII hexadecimal digits giving the TX setting and then
+      the RX setting, in the lines' own steps.
+
+  # The delay of the TX delay line at its lowest setting is not known, so
+  # the delays cannot be given in picoseconds.
+  rx-internal-delay-ps: false
+  tx-internal-delay-ps: false
+
+required:
+  - compatible
+  - reg
+  - interrupts
+  - interrupt-names
+  - clocks
+  - clock-names
+  - resets
+  - reset-names
+
+allOf:
+  - $ref: snps,dwmac.yaml#
+
+unevaluatedProperties: false
+
+examples:
+  - |
+    #include <dt-bindings/interrupt-controller/irq.h>
+    #include <dt-bindings/interrupt-controller/mips-gic.h>
+
+    ethernet@10800000 {
+        compatible = "siflower,sf19a2890-gmac", "snps,dwmac";
+        reg = <0x10800000 0x200000>, <0x19e04440 0x10>;
+        interrupt-parent = <&gic>;
+        interrupts = <GIC_SHARED 32 IRQ_TYPE_LEVEL_HIGH>,
+                     <GIC_SHARED 34 IRQ_TYPE_LEVEL_HIGH>,
+                     <GIC_SHARED 33 IRQ_TYPE_LEVEL_HIGH>;
+        interrupt-names = "macirq", "eth_wake_irq", "eth_lpi";
+        clocks = <&gmac_crm 0>, <&gmac_crm 1>, <&gmac_crm 3>, <&gmac_crm 2>;
+        clock-names = "stmmaceth", "pclk", "ptp_ref", "byp_ref";
+        resets = <&gmac_crm 0>;
+        reset-names = "stmmaceth";
+        phy-mode = "rgmii-id";
+        nvmem-cells = <&macaddr>, <&rgmii_delay>;
+        nvmem-cell-names = "mac-address", "rgmii-delay";
+
+        fixed-link {
+            speed = <1000>;
+            full-duplex;
+        };
+    };
diff --git a/Documentation/devicetree/bindings/net/snps,dwmac.yaml b/Documentation/devicetree/bindings/net/snps,dwmac.yaml
index 69d88a9b1925..225aa597a012 100644
--- a/Documentation/devicetree/bindings/net/snps,dwmac.yaml
+++ b/Documentation/devicetree/bindings/net/snps,dwmac.yaml
@@ -99,6 +99,7 @@ properties:
         - rockchip,rk3588-gmac
         - rockchip,rv1108-gmac
         - rockchip,rv1126-gmac
+        - siflower,sf19a2890-gmac
         - snps,dwmac
         - snps,dwmac-3.40a
         - snps,dwmac-3.50a
diff --git a/MAINTAINERS b/MAINTAINERS
index 9336fa93ce38..c279b28bce86 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -25820,6 +25820,12 @@ N:	sifive
 K:	fu[57]40
 K:	[^@]sifive
 
+SIFLOWER SF19A2890 DWMAC GLUE LAYER
+M:	Joseph Telaak <joseph@telaak.dev>
+L:	netdev@vger.kernel.org
+S:	Maintained
+F:	Documentation/devicetree/bindings/net/siflower,sf19a2890-gmac.yaml
+
 SILEAD TOUCHSCREEN DRIVER
 M:	Hans de Goede <hansg@kernel.org>
 L:	linux-input@vger.kernel.org

-- 
Git-155)



  parent reply	other threads:[~2026-12-01  7:00 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-12-01  7:00 [PATCH net-next v2 0/3] net: stmmac: Add the Siflower SF19A2890 glue Joseph Telaak via B4 Relay
2026-12-01  7:00 ` [PATCH net-next v2 1/3] dt-bindings: net: ethernet-controller: Allow a device-specific nvmem cell Joseph Telaak via B4 Relay
2026-12-01  7:00 ` Joseph Telaak via B4 Relay [this message]
2026-12-01  7:00 ` [PATCH net-next v2 3/3] net: stmmac: Add Siflower SF19A2890 glue Joseph Telaak via B4 Relay

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=20261201-sf19a2890-gmac-v2-2-8d2c513db496@telaak.dev \
    --to=devnull+joseph.telaak.dev@kernel.org \
    --cc=alexandre.torgue@foss.st.com \
    --cc=andrew+netdev@lunn.ch \
    --cc=conor+dt@kernel.org \
    --cc=davem@davemloft.net \
    --cc=devicetree@vger.kernel.org \
    --cc=edumazet@kernel.org \
    --cc=gch981213@gmail.com \
    --cc=joabreu@synopsys.com \
    --cc=joseph@telaak.dev \
    --cc=krzk+dt@kernel.org \
    --cc=kuba@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mips@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=maxime.chevallier@bootlin.com \
    --cc=mcoquelin.stm32@gmail.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

all inboxes | Powered by JetHome®