115 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,ls1b-gmac.yaml#5$schema: http://devicetree.org/meta-schemas/core.yaml#6 7title: Loongson-1B Gigabit Ethernet MAC Controller8 9maintainers:10 - Keguang Zhang <keguang.zhang@gmail.com>11 12description: |13 Loongson-1B Gigabit Ethernet MAC Controller is based on14 Synopsys DesignWare MAC (version 3.50a).15 16 Main features17 - Dual 10/100/1000Mbps GMAC controllers18 - Full-duplex operation (IEEE 802.3x flow control automatic transmission)19 - Half-duplex operation (CSMA/CD Protocol and back-pressure support)20 - RX Checksum Offload21 - TX Checksum insertion22 - MII interface23 - RGMII interface24 25select:26 properties:27 compatible:28 contains:29 enum:30 - loongson,ls1b-gmac31 required:32 - compatible33 34properties:35 compatible:36 items:37 - enum:38 - loongson,ls1b-gmac39 - const: snps,dwmac-3.50a40 41 reg:42 maxItems: 143 44 clocks:45 maxItems: 146 47 clock-names:48 items:49 - const: stmmaceth50 51 interrupts:52 maxItems: 153 54 interrupt-names:55 items:56 - const: macirq57 58 loongson,ls1-syscon:59 $ref: /schemas/types.yaml#/definitions/phandle60 description:61 Phandle to the syscon containing some extra configurations62 including PHY interface mode.63 64 phy-mode:65 enum:66 - mii67 - rgmii-id68 69required:70 - compatible71 - reg72 - clocks73 - clock-names74 - interrupts75 - interrupt-names76 - loongson,ls1-syscon77 78allOf:79 - $ref: snps,dwmac.yaml#80 81unevaluatedProperties: false82 83examples:84 - |85 #include <dt-bindings/clock/loongson,ls1x-clk.h>86 #include <dt-bindings/interrupt-controller/irq.h>87 88 gmac0: ethernet@1fe10000 {89 compatible = "loongson,ls1b-gmac", "snps,dwmac-3.50a";90 reg = <0x1fe10000 0x10000>;91 92 clocks = <&clkc LS1X_CLKID_AHB>;93 clock-names = "stmmaceth";94 95 interrupt-parent = <&intc1>;96 interrupts = <2 IRQ_TYPE_LEVEL_HIGH>;97 interrupt-names = "macirq";98 99 loongson,ls1-syscon = <&syscon>;100 101 phy-handle = <&phy0>;102 phy-mode = "mii";103 snps,pbl = <1>;104 105 mdio {106 #address-cells = <1>;107 #size-cells = <0>;108 compatible = "snps,dwmac-mdio";109 110 phy0: ethernet-phy@0 {111 reg = <0x0>;112 };113 };114 };115