From: Joseph Telaak <jose…@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 <jose…@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 <jose…@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> + + ethe…@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 <jose…@telaak.dev> +L: netd…@vger.kernel.org +S: Maintained +F: Documentation/devicetree/bindings/net/siflower,sf19a2890-gmac.yaml + SILEAD TOUCHSCREEN DRIVER M: Hans de Goede <han…@kernel.org> L: linu…@vger.kernel.org
-- Git-155)