Loongson-1C Ethernet MAC Controller

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

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

Maintainers (maintainers): "Keguang Zhang <keguang.zhang@gmail.com>"

Loongson-1C Ethernet MAC Controller is based on Synopsys DesignWare MAC (version 3.50a).

Main features - 10/100Mbps - Full-duplex operation (IEEE 802.3x flow control automatic transmission) - Half-duplex operation (CSMA/CD Protocol and back-pressure support) - IEEE 802.1Q VLAN tag detection for reception frames - MII interface - RMII interface

Automatic schema selection (select) #

Properties and child nodes (properties) #

compatible — required here #

Rule for matching array elements (contains)

Allowed values (enum): "loongson,ls1c-emac"

Required in this object (required): "compatible"

Properties and child nodes (properties) #

compatible — required here #

Array item rules (items) #

Item 1

Allowed values (enum): "loongson,ls1c-emac"

Item 2

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

reg — required here #

Maximum number of items (maxItems): 1

clocks — required here #

Maximum number of items (maxItems): 1

clock-names — required here #

Array item rules (items) #

Item 1

Exact value (const): "stmmaceth"

interrupts — required here #

Maximum number of items (maxItems): 1

interrupt-names — required here #

Array item rules (items) #

Item 1

Exact value (const): "macirq"

loongson,ls1-syscon — required here #

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

Phandle to the syscon containing some extra configurations including PHY interface mode.

phy-mode — not listed as required here #

Allowed values (enum): "mii", "rmii"

Required in this object (required): "compatible", "reg", "clocks", "clock-names", "interrupts", "interrupt-names", "loongson,ls1-syscon"

All of these rules must match (allOf) #

Rule 1 #

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

Properties not evaluated by applicable rules (unevaluatedProperties) #

false

Not allowed by this rule.

Examples (examples) #

#include <dt-bindings/clock/loongson,ls1x-clk.h>
#include <dt-bindings/interrupt-controller/irq.h>

emac: ethernet@1fe10000 {
    compatible = "loongson,ls1c-emac", "snps,dwmac-3.50a";
    reg = <0x1fe10000 0x10000>;

    clocks = <&clkc LS1X_CLKID_AHB>;
    clock-names = "stmmaceth";

    interrupt-parent = <&intc1>;
    interrupts = <2 IRQ_TYPE_LEVEL_HIGH>;
    interrupt-names = "macirq";

    loongson,ls1-syscon = <&syscon>;

    phy-handle = <&phy0>;
    phy-mode = "mii";
    snps,pbl = <1>;

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

        phy0: ethernet-phy@13 {
            reg = <0x13>;
        };
    };
};

Source notes #

Annotations retained from the schema source

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

Edit this page