114 lines · yaml
1# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)2%YAML 1.23---4$id: http://devicetree.org/schemas/net/loongson,ls1c-emac.yaml#5$schema: http://devicetree.org/meta-schemas/core.yaml#6 7title: Loongson-1C Ethernet MAC Controller8 9maintainers:10 - Keguang Zhang <keguang.zhang@gmail.com>11 12description: |13 Loongson-1C Ethernet MAC Controller is based on14 Synopsys DesignWare MAC (version 3.50a).15 16 Main features17 - 10/100Mbps18 - Full-duplex operation (IEEE 802.3x flow control automatic transmission)19 - Half-duplex operation (CSMA/CD Protocol and back-pressure support)20 - IEEE 802.1Q VLAN tag detection for reception frames21 - MII interface22 - RMII interface23 24select:25 properties:26 compatible:27 contains:28 enum:29 - loongson,ls1c-emac30 required:31 - compatible32 33properties:34 compatible:35 items:36 - enum:37 - loongson,ls1c-emac38 - const: snps,dwmac-3.50a39 40 reg:41 maxItems: 142 43 clocks:44 maxItems: 145 46 clock-names:47 items:48 - const: stmmaceth49 50 interrupts:51 maxItems: 152 53 interrupt-names:54 items:55 - const: macirq56 57 loongson,ls1-syscon:58 $ref: /schemas/types.yaml#/definitions/phandle59 description:60 Phandle to the syscon containing some extra configurations61 including PHY interface mode.62 63 phy-mode:64 enum:65 - mii66 - rmii67 68required:69 - compatible70 - reg71 - clocks72 - clock-names73 - interrupts74 - interrupt-names75 - loongson,ls1-syscon76 77allOf:78 - $ref: snps,dwmac.yaml#79 80unevaluatedProperties: false81 82examples:83 - |84 #include <dt-bindings/clock/loongson,ls1x-clk.h>85 #include <dt-bindings/interrupt-controller/irq.h>86 87 emac: ethernet@1fe10000 {88 compatible = "loongson,ls1c-emac", "snps,dwmac-3.50a";89 reg = <0x1fe10000 0x10000>;90 91 clocks = <&clkc LS1X_CLKID_AHB>;92 clock-names = "stmmaceth";93 94 interrupt-parent = <&intc1>;95 interrupts = <2 IRQ_TYPE_LEVEL_HIGH>;96 interrupt-names = "macirq";97 98 loongson,ls1-syscon = <&syscon>;99 100 phy-handle = <&phy0>;101 phy-mode = "mii";102 snps,pbl = <1>;103 104 mdio {105 #address-cells = <1>;106 #size-cells = <0>;107 compatible = "snps,dwmac-mdio";108 109 phy0: ethernet-phy@13 {110 reg = <0x13>;111 };112 };113 };114