Allwinner A83t EMAC

Schema identifier ($id): "http://devicetree.org/schemas/net/allwinner,sun8i-a83t-emac.yaml#"

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

Maintainers (maintainers): "Chen-Yu Tsai <wens@csie.org>", "Maxime Ripard <mripard@kernel.org>"

Automatic schema selection (select) #

Properties and child nodes (properties) #

compatible — required here #

Rule for matching array elements (contains)

Allowed values (enum): "allwinner,sun8i-a83t-emac", "allwinner,sun8i-h3-emac", "allwinner,sun8i-r40-gmac", "allwinner,sun8i-v3s-emac", "allwinner,sun50i-a64-emac", "allwinner,sun55i-a523-gmac200"

Required in this object (required): "compatible"

Properties and child nodes (properties) #

compatible — required here #

Exactly one of these rules must match (oneOf) #

Rule 1

Exact value (const): "allwinner,sun8i-a83t-emac"

Rule 2

Exact value (const): "allwinner,sun8i-h3-emac"

Rule 3

Exact value (const): "allwinner,sun8i-r40-gmac"

Rule 4

Exact value (const): "allwinner,sun8i-v3s-emac"

Rule 5

Exact value (const): "allwinner,sun50i-a64-emac"

Rule 6

Array item rules (items)

Item 1

Allowed values (enum): "allwinner,sun20i-d1-emac", "allwinner,sun50i-a100-emac", "allwinner,sun50i-h6-emac", "allwinner,sun50i-h616-emac0", "allwinner,sun55i-a523-gmac0"

Item 2

Exact value (const): "allwinner,sun50i-a64-emac"

Rule 7

Array item rules (items)

Item 1

Exact value (const): "allwinner,sun55i-a523-gmac200"

Item 2

Exact value (const): "snps,dwmac-4.20a"

reg — required here #

Maximum number of items (maxItems): 1

interrupts — required here #

Maximum number of items (maxItems): 1

interrupt-names — required here #

Exact value (const): "macirq"

clocks — required here #

Minimum number of items (minItems): 1

Maximum number of items (maxItems): 2

clock-names — required here #

Minimum number of items (minItems): 1

Array item rules (items) #

Item 1

Exact value (const): "stmmaceth"

Item 2

Exact value (const): "mbus"

phy-supply — not listed as required here #

PHY regulator

power-domains — not listed as required here #

Maximum number of items (maxItems): 1

syscon — required here #

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

Phandle to the device containing the EMAC or GMAC clock register

Required in this object (required): "compatible", "reg", "interrupts", "interrupt-names", "clocks", "clock-names", "resets", "reset-names", "phy-handle", "phy-mode", "syscon"

All of these rules must match (allOf) #

Rule 1 #

Shared schema rule ($ref): snps,dwmac.yaml#

Rule 2 #

Condition (if) #

Properties and child nodes (properties)

compatible — not listed as required here

Rule for matching array elements (contains)

Allowed values (enum): "allwinner,sun8i-a83t-emac", "allwinner,sun8i-h3-emac", "allwinner,sun8i-v3s-emac", "allwinner,sun50i-a64-emac"

When the condition matches (then) #

Properties and child nodes (properties)

allwinner,tx-delay-ps — not listed as required here

Default value (default): 0

Minimum value (minimum): 0

Maximum value (maximum): 700

Multiple of (multipleOf): 100

External RGMII PHY TX clock delay chain value in ps.

allwinner,rx-delay-ps — not listed as required here

Default value (default): 0

Minimum value (minimum): 0

Maximum value (maximum): 3100

Multiple of (multipleOf): 100

External RGMII PHY TX clock delay chain value in ps.

Rule 3 #

Condition (if) #

Properties and child nodes (properties)

compatible — not listed as required here

Rule for matching array elements (contains)

Allowed values (enum): "allwinner,sun8i-r40-gmac"

When the condition matches (then) #

Properties and child nodes (properties)

allwinner,rx-delay-ps — not listed as required here

Default value (default): 0

Minimum value (minimum): 0

Maximum value (maximum): 700

Multiple of (multipleOf): 100

External RGMII PHY TX clock delay chain value in ps.

Rule 4 #

Condition (if) #

Properties and child nodes (properties)

compatible — not listed as required here

Rule for matching array elements (contains)

Allowed values (enum): "allwinner,sun8i-h3-emac", "allwinner,sun8i-v3s-emac"

When the condition matches (then) #

Properties and child nodes (properties)

allwinner,leds-active-low — not listed as required here

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

EPHY LEDs are active low.

mdio-mux — not listed as required here

Value type (type): "object"

Properties not evaluated by applicable rules (unevaluatedProperties)

false

Not allowed by this rule.

Properties and child nodes (properties)

compatible — required here

Exact value (const): "allwinner,sun8i-h3-mdio-mux"

mdio-parent-bus — required here

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

Phandle to EMAC MDIO.

#address-cells — not listed as required here

Exact value (const): 1

#size-cells — not listed as required here

Exact value (const): 0

mdio@1 — required here

Shared schema rule ($ref): mdio.yaml#

Properties not evaluated by applicable rules (unevaluatedProperties)

false

Not allowed by this rule.

Internal MDIO Bus

Properties and child nodes (properties)

compatible — not listed as required here

Exact value (const): "allwinner,sun8i-h3-mdio-internal"

reg — not listed as required here

Exact value (const): 1

Properties matching a name pattern (patternProperties)

^ethernet-phy@[0-9a-f]$ — name matches this regular expression

Value type (type): "object"

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

Properties not evaluated by applicable rules (unevaluatedProperties)

false

Not allowed by this rule.

Integrated PHY node

Properties and child nodes (properties)

clocks — required here

Maximum number of items (maxItems): 1

resets — required here

Maximum number of items (maxItems): 1

Required in this object (required): "clocks", "resets"

mdio@2 — not listed as required here

Shared schema rule ($ref): mdio.yaml#

Properties not evaluated by applicable rules (unevaluatedProperties)

false

Not allowed by this rule.

External MDIO Bus (H3 only)

Properties and child nodes (properties)

reg — not listed as required here

Exact value (const): 2

Required in this object (required): "compatible", "mdio-parent-bus", "mdio@1"

Rule 5 #

Condition (if) #

Properties and child nodes (properties)

compatible — not listed as required here

Rule for matching array elements (contains)

Exact value (const): "allwinner,sun55i-a523-gmac200"

When the condition matches (then) #

Properties and child nodes (properties)

clocks — not listed as required here

Minimum number of items (minItems): 2

clock-names — not listed as required here

Minimum number of items (minItems): 2

tx-internal-delay-ps — not listed as required here

Default value (default): 0

Minimum value (minimum): 0

Maximum value (maximum): 700

Multiple of (multipleOf): 100

External RGMII PHY TX clock delay chain value in ps.

rx-internal-delay-ps — not listed as required here

Default value (default): 0

Minimum value (minimum): 0

Maximum value (maximum): 3100

Multiple of (multipleOf): 100

External RGMII PHY TX clock delay chain value in ps.

Required in this object (required): "power-domains"

When the condition does not match (else) #

Properties and child nodes (properties)

clocks — not listed as required here

Maximum number of items (maxItems): 1

clock-names — not listed as required here

Maximum number of items (maxItems): 1

power-domains — not listed as required here

false — Not permitted by this property rule.

Properties not evaluated by applicable rules (unevaluatedProperties) #

false

Not allowed by this rule.

Examples (examples) #

ethernet@1c0b000 {
    compatible = "allwinner,sun8i-h3-emac";
    syscon = <&syscon>;
    reg = <0x01c0b000 0x104>;
    interrupts = <0 82 1>;
    interrupt-names = "macirq";
    resets = <&ccu 12>;
    reset-names = "stmmaceth";
    clocks = <&ccu 27>;
    clock-names = "stmmaceth";

    phy-handle = <&int_mii_phy>;
    phy-mode = "mii";
    allwinner,leds-active-low;

    mdio1: mdio {
        #address-cells = <1>;
        #size-cells = <0>;
        compatible = "snps,dwmac-mdio";
    };

    mdio-mux {
        compatible = "allwinner,sun8i-h3-mdio-mux";
        #address-cells = <1>;
        #size-cells = <0>;

        mdio-parent-bus = <&mdio1>;

        int_mii_phy: mdio@1 {
            compatible = "allwinner,sun8i-h3-mdio-internal";
            reg = <1>;
            #address-cells = <1>;
            #size-cells = <0>;

            ethernet-phy@1 {
                reg = <1>;
                clocks = <&ccu 67>;
                resets = <&ccu 39>;
                phy-is-integrated;
            };
        };

        mdio@2 {
            reg = <2>;
            #address-cells = <1>;
            #size-cells = <0>;
        };
    };
};
ethernet@1c0b000 {
    compatible = "allwinner,sun8i-h3-emac";
    syscon = <&syscon>;
    reg = <0x01c0b000 0x104>;
    interrupts = <0 82 1>;
    interrupt-names = "macirq";
    resets = <&ccu 12>;
    reset-names = "stmmaceth";
    clocks = <&ccu 27>;
    clock-names = "stmmaceth";

    phy-handle = <&ext_rgmii_phy>;
    phy-mode = "rgmii";
    allwinner,leds-active-low;

    mdio2: mdio {
        #address-cells = <1>;
        #size-cells = <0>;
        compatible = "snps,dwmac-mdio";
    };

    mdio-mux {
        compatible = "allwinner,sun8i-h3-mdio-mux";
        #address-cells = <1>;
        #size-cells = <0>;
        mdio-parent-bus = <&mdio2>;

        mdio@1 {
            compatible = "allwinner,sun8i-h3-mdio-internal";
            reg = <1>;
            #address-cells = <1>;
            #size-cells = <0>;

            ethernet-phy@1 {
                reg = <1>;
                clocks = <&ccu 67>;
                resets = <&ccu 39>;
            };
        };

        mdio@2 {
            reg = <2>;
            #address-cells = <1>;
            #size-cells = <0>;

            ext_rgmii_phy: ethernet-phy@1 {
                reg = <1>;
            };
        };
    };
};
ethernet@1c0b000 {
    compatible = "allwinner,sun8i-a83t-emac";
    syscon = <&syscon>;
    reg = <0x01c0b000 0x104>;
    interrupts = <0 82 1>;
    interrupt-names = "macirq";
    resets = <&ccu 13>;
    reset-names = "stmmaceth";
    clocks = <&ccu 27>;
    clock-names = "stmmaceth";
    phy-handle = <&ext_rgmii_phy1>;
    phy-mode = "rgmii";

    mdio {
        compatible = "snps,dwmac-mdio";
        #address-cells = <1>;
        #size-cells = <0>;

        ext_rgmii_phy1: ethernet-phy@1 {
            reg = <1>;
        };
    };
};
ethernet@4510000 {
    compatible = "allwinner,sun55i-a523-gmac200",
                 "snps,dwmac-4.20a";
    reg = <0x04510000 0x10000>;
    clocks = <&ccu 117>, <&ccu 79>;
    clock-names = "stmmaceth", "mbus";
    resets = <&ccu 43>;
    reset-names = "stmmaceth";
    interrupts = <0 47 4>;
    interrupt-names = "macirq";
    pinctrl-names = "default";
    pinctrl-0 = <&rgmii1_pins>;
    power-domains = <&pck600 4>;
    syscon = <&syscon>;
    phy-handle = <&ext_rgmii_phy_1>;
    phy-mode = "rgmii-id";
    snps,fixed-burst;
    snps,axi-config = <&gmac1_stmmac_axi_setup>;

    mdio {
        compatible = "snps,dwmac-mdio";
        #address-cells = <1>;
        #size-cells = <0>;

        ext_rgmii_phy_1: ethernet-phy@1 {
            reg = <1>;
        };
    };
};

Source notes #

Annotations retained from the schema source

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

Line 13: We need a select here so we don't match all nodes with 'snps,dwmac'

Edit this page