Amlogic Meson DWMAC Ethernet controller

Schema identifier ($id): "http://devicetree.org/schemas/net/amlogic,meson-dwmac.yaml#"

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

Maintainers (maintainers): "Neil Armstrong <neil.armstrong@linaro.org>", "Martin Blumenstingl <martin.blumenstingl@googlemail.com>"

Automatic schema selection (select) #

Properties and child nodes (properties) #

compatible — required here #

Rule for matching array elements (contains)

Allowed values (enum): "amlogic,meson6-dwmac", "amlogic,meson8b-dwmac", "amlogic,meson8m2-dwmac", "amlogic,meson-gxbb-dwmac", "amlogic,meson-axg-dwmac", "amlogic,meson-g12a-dwmac"

Required in this object (required): "compatible"

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): "amlogic,meson8b-dwmac", "amlogic,meson8m2-dwmac", "amlogic,meson-gxbb-dwmac", "amlogic,meson-axg-dwmac", "amlogic,meson-g12a-dwmac"

When the condition matches (then) #

Properties and child nodes (properties)

clocks — not listed as required here

Minimum number of items (minItems): 3

Array item rules (items)

Item 1

GMAC main clock

Item 2

First parent clock of the internal mux

Item 3

Second parent clock of the internal mux

Item 4

The clock which drives the timing adjustment logic

clock-names — not listed as required here

Minimum number of items (minItems): 3

Array item rules (items)

Item 1

Exact value (const): "stmmaceth"

Item 2

Exact value (const): "clkin0"

Item 3

Exact value (const): "clkin1"

Item 4

Exact value (const): "timing-adjustment"

amlogic,tx-delay-ns — not listed as required here

Allowed values (enum): 0, 2, 4, 6

Default value (default): 2

The internal RGMII TX clock delay (provided by this driver) in nanoseconds. When phy-mode is set to "rgmii" then the TX delay should be explicitly configured. When the phy-mode is set to either "rgmii-id" or "rgmii-txid" the TX clock delay is already provided by the PHY. In that case this property should be set to 0ns (which disables the TX clock delay in the MAC to prevent the clock from going off because both PHY and MAC are adding a delay). Any configuration is ignored when the phy-mode is set to "rmii".

amlogic,rx-delay-ns — not listed as required here

Deprecated (deprecated): true

Allowed values (enum): 0, 2

Default value (default): 0

The internal RGMII RX clock delay in nanoseconds. Deprecated, use rx-internal-delay-ps instead.

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

Default value (default): 0

Rule 3 #

Condition (if) #

Properties and child nodes (properties)

compatible — not listed as required here

Rule for matching array elements (contains)

Allowed values (enum): "amlogic,meson8b-dwmac", "amlogic,meson8m2-dwmac", "amlogic,meson-gxbb-dwmac", "amlogic,meson-axg-dwmac"

When the condition matches (then) #

Properties and child nodes (properties)

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

Allowed values (enum): 0, 2000

Rule 4 #

Condition (if) #

Properties and child nodes (properties)

compatible — not listed as required here

Rule for matching array elements (contains)

Allowed values (enum): "amlogic,meson-g12a-dwmac"

When the condition matches (then) #

Properties and child nodes (properties)

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

Allowed values (enum): 0, 200, 400, 600, 800, 1000, 1200, 1400, 1600, 1800, 2000, 2200, 2400, 2600, 2800, 3000

Properties and child nodes (properties) #

compatible — required here #

Array items beyond the listed positions (additionalItems) #

true

Allowed by this rule.

Maximum number of items (maxItems): 3

Array item rules (items) #

Item 1

Allowed values (enum): "amlogic,meson6-dwmac", "amlogic,meson8b-dwmac", "amlogic,meson8m2-dwmac", "amlogic,meson-gxbb-dwmac", "amlogic,meson-axg-dwmac", "amlogic,meson-g12a-dwmac"

Rule for matching array elements (contains) #

Allowed values (enum): "snps,dwmac-3.70a", "snps,dwmac"

reg — required here #

Array item rules (items) #

Item 1

The first register range should be the one of the DWMAC controller

Item 2

The second range is for the Amlogic specific configuration (for example the PRG_ETHERNET register range on Meson8b and newer)

interrupts — required here #

Maximum number of items (maxItems): 1

interrupt-names — required here #

Exact value (const): "macirq"

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

Properties not evaluated by applicable rules (unevaluatedProperties) #

false

Not allowed by this rule.

Examples (examples) #

ethmac: ethernet@c9410000 {
    compatible = "amlogic,meson-gxbb-dwmac", "snps,dwmac";
    reg = <0xc9410000 0x10000>, <0xc8834540 0x8>;
    interrupts = <8>;
    interrupt-names = "macirq";
    clocks = <&clk_eth>, <&clk_fclk_div2>, <&clk_mpll2>, <&clk_fclk_div2>;
    clock-names = "stmmaceth", "clkin0", "clkin1", "timing-adjustment";
    phy-mode = "rgmii";
};

Source notes #

Annotations retained from the schema source

Line 1: SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)

Line 2: Copyright 2019 BayLibre, SAS

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

Edit this page