Freescale Three-Speed Ethernet Controller (TSEC), "Gianfar"

Schema identifier ($id): "http://devicetree.org/schemas/net/fsl,gianfar.yaml#"

Schema dialect ($schema): "http://devicetree.org/meta-schemas/core.yaml#"

Maintainers (maintainers): "J. Neuschäfer <j.ne@posteo.net>"

Automatic schema selection (select) #

Exactly one of these rules must match (oneOf) #

Rule 1 #

Properties and child nodes (properties)

compatible — not listed as required here

Rule for matching array elements (contains)

Exact value (const): "gianfar"

device_type — required here

Exact value (const): "network"

Required in this object (required): "device_type"

Rule 2 #

Properties and child nodes (properties)

compatible — not listed as required here

Exact value (const): "fsl,etsec2"

Required in this object (required): "compatible"

Properties and child nodes (properties) #

compatible — required here #

Allowed values (enum): "gianfar", "fsl,etsec2"

device_type — not listed as required here #

Exact value (const): "network"

model — required here #

Allowed values (enum): "FEC", "TSEC", "eTSEC"

reg — not listed as required here #

Maximum number of items (maxItems): 1

ranges — not listed as required here #

true — No constraints added by this property rule.

#address-cells — not listed as required here #

Allowed values (enum): 1, 2

#size-cells — not listed as required here #

Allowed values (enum): 1, 2

cell-index — not listed as required here #

Shared schema rule ($ref): /schemas/types.yaml#/definitions/uint32

interrupts — not listed as required here #

Minimum number of items (minItems): 1

Array item rules (items) #

Item 1

Transmit interrupt or single combined interrupt

Item 2

Receive interrupt

Item 3

Error interrupt

dma-coherent — not listed as required here #

true — No constraints added by this property rule.

fsl,magic-packet — not listed as required here #

Value type (type): "boolean"

If present, indicates that the hardware supports waking up via magic packet.

fsl,wake-on-filer — not listed as required here #

Value type (type): "boolean"

If present, indicates that the hardware supports waking up by Filer General Purpose Interrupt (FGPI) asserted on the Rx int line. This is an advanced power management capability allowing certain packet types (user) defined by filer rules to wake up the system.

bd-stash — not listed as required here #

Value type (type): "boolean"

If present, indicates that the hardware supports stashing buffer descriptors in the L2.

rx-stash-len — not listed as required here #

Shared schema rule ($ref): /schemas/types.yaml#/definitions/uint32

Denotes the number of bytes of a received buffer to stash in the L2.

rx-stash-idx — not listed as required here #

Shared schema rule ($ref): /schemas/types.yaml#/definitions/uint32

Denotes the index of the first byte from the received buffer to stash in the L2.

fsl,num_rx_queues — not listed as required here #

Shared schema rule ($ref): /schemas/types.yaml#/definitions/uint32

Number of receive queues

Exact value (const): 8

fsl,num_tx_queues — not listed as required here #

Shared schema rule ($ref): /schemas/types.yaml#/definitions/uint32

Number of transmit queues

Exact value (const): 8

tbi-handle — not listed as required here #

Shared schema rule ($ref): /schemas/types.yaml#/definitions/phandle

Reference (phandle) to the TBI node

Required in this object (required): "compatible", "model"

Properties matching a name pattern (patternProperties) #

^mdio@[0-9a-f]+$ — name matches this regular expression #

Shared schema rule ($ref): /schemas/net/fsl,gianfar-mdio.yaml#

All of these rules must match (allOf) #

Rule 1 #

Shared schema rule ($ref): ethernet-controller.yaml#

Rule 2 #

Condition (if) #

Properties and child nodes (properties)

compatible — not listed as required here

Rule for matching array elements (contains)

Exact value (const): "fsl,etsec2"

When the condition matches (then) #

Properties matching a name pattern (patternProperties)

^queue-group@[0-9a-f]+$ — name matches this regular expression

Value type (type): "object"

Properties and child nodes (properties)

reg — required here

Maximum number of items (maxItems): 1

interrupts — required here

Array item rules (items)

Item 1

Transmit interrupt

Item 2

Receive interrupt

Item 3

Error interrupt

Required in this object (required): "reg", "interrupts"

Properties not matched by properties or patternProperties in this schema (additionalProperties)

false

Not allowed by this rule.

When the condition does not match (else) #

Required in this object (required): "reg"

Rule 3 #

Condition (if) #

Properties and child nodes (properties)

model — not listed as required here

Rule for matching array elements (contains)

Allowed values (enum): "TSEC", "eTSEC"

When the condition matches (then) #

Properties and child nodes (properties)

interrupts — not listed as required here

Array item rules (items)

Item 1

Transmit interrupt

Item 2

Receive interrupt

Item 3

Error interrupt

Properties not evaluated by applicable rules (unevaluatedProperties) #

false

Not allowed by this rule.

Examples (examples) #

ethernet@24000 {
    device_type = "network";
    model = "TSEC";
    compatible = "gianfar";
    reg = <0x24000 0x1000>;
    local-mac-address = [ 00 00 00 00 00 00 ];
    interrupts = <29 2>, <30 2>, <34 2>;
    interrupt-parent = <&mpic>;
    phy-handle = <&phy0>;
};
#include <dt-bindings/interrupt-controller/irq.h>

ethernet@24000 {
    compatible = "gianfar";
    reg = <0x24000 0x1000>;
    ranges = <0x0 0x24000 0x1000>;
    #address-cells = <1>;
    #size-cells = <1>;
    cell-index = <0>;
    device_type = "network";
    model = "eTSEC";
    local-mac-address = [ 00 00 00 00 00 00 ];
    interrupts = <32 IRQ_TYPE_LEVEL_LOW>,
                 <33 IRQ_TYPE_LEVEL_LOW>,
                 <34 IRQ_TYPE_LEVEL_LOW>;
    interrupt-parent = <&ipic>;

    mdio@520 {
        #address-cells = <1>;
        #size-cells = <0>;
        compatible = "fsl,gianfar-mdio";
        reg = <0x520 0x20>;
    };
};
#include <dt-bindings/interrupt-controller/irq.h>
#include <dt-bindings/interrupt-controller/arm-gic.h>

bus {
    #address-cells = <2>;
    #size-cells = <2>;

    ethernet {
        compatible = "fsl,etsec2";
        ranges;
        device_type = "network";
        #address-cells = <2>;
        #size-cells = <2>;
        interrupt-parent = <&gic>;
        model = "eTSEC";
        fsl,magic-packet;
        dma-coherent;

        queue-group@2d10000 {
            reg = <0x0 0x2d10000 0x0 0x1000>;
            interrupts = <GIC_SPI 144 IRQ_TYPE_LEVEL_HIGH>,
                         <GIC_SPI 145 IRQ_TYPE_LEVEL_HIGH>,
                         <GIC_SPI 146 IRQ_TYPE_LEVEL_HIGH>;
        };

        queue-group@2d14000  {
            reg = <0x0 0x2d14000 0x0 0x1000>;
            interrupts = <GIC_SPI 147 IRQ_TYPE_LEVEL_HIGH>,
                         <GIC_SPI 148 IRQ_TYPE_LEVEL_HIGH>,
                         <GIC_SPI 149 IRQ_TYPE_LEVEL_HIGH>;
        };
    };
};

Source notes #

Annotations retained from the schema source

Line 1: SPDX-License-Identifier: GPL-2.0

Line 12: This is needed to distinguish gianfar.yaml and gianfar-mdio.yaml, because

Line 13: both use compatible = "gianfar" (with different device_type values)

Line 125: eTSEC2 controller nodes have "queue group" subnodes and don't need a "reg"

Line 126: property.

Line 156: TSEC and eTSEC devices require three interrupts

Edit this page