xref: /linux/Documentation/devicetree/bindings/net/loongson,ls1b-gmac.yaml (revision 2af21077fa9f8aa7b2418bd3bb835d337d1caeab)
1*2af21077SKeguang Zhang# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2*2af21077SKeguang Zhang%YAML 1.2
3*2af21077SKeguang Zhang---
4*2af21077SKeguang Zhang$id: http://devicetree.org/schemas/net/loongson,ls1b-gmac.yaml#
5*2af21077SKeguang Zhang$schema: http://devicetree.org/meta-schemas/core.yaml#
6*2af21077SKeguang Zhang
7*2af21077SKeguang Zhangtitle: Loongson-1B Gigabit Ethernet MAC Controller
8*2af21077SKeguang Zhang
9*2af21077SKeguang Zhangmaintainers:
10*2af21077SKeguang Zhang  - Keguang Zhang <keguang.zhang@gmail.com>
11*2af21077SKeguang Zhang
12*2af21077SKeguang Zhangdescription: |
13*2af21077SKeguang Zhang  Loongson-1B Gigabit Ethernet MAC Controller is based on
14*2af21077SKeguang Zhang  Synopsys DesignWare MAC (version 3.50a).
15*2af21077SKeguang Zhang
16*2af21077SKeguang Zhang  Main features
17*2af21077SKeguang Zhang  - Dual 10/100/1000Mbps GMAC controllers
18*2af21077SKeguang Zhang  - Full-duplex operation (IEEE 802.3x flow control automatic transmission)
19*2af21077SKeguang Zhang  - Half-duplex operation (CSMA/CD Protocol and back-pressure support)
20*2af21077SKeguang Zhang  - RX Checksum Offload
21*2af21077SKeguang Zhang  - TX Checksum insertion
22*2af21077SKeguang Zhang  - MII interface
23*2af21077SKeguang Zhang  - RGMII interface
24*2af21077SKeguang Zhang
25*2af21077SKeguang Zhangselect:
26*2af21077SKeguang Zhang  properties:
27*2af21077SKeguang Zhang    compatible:
28*2af21077SKeguang Zhang      contains:
29*2af21077SKeguang Zhang        enum:
30*2af21077SKeguang Zhang          - loongson,ls1b-gmac
31*2af21077SKeguang Zhang  required:
32*2af21077SKeguang Zhang    - compatible
33*2af21077SKeguang Zhang
34*2af21077SKeguang Zhangproperties:
35*2af21077SKeguang Zhang  compatible:
36*2af21077SKeguang Zhang    items:
37*2af21077SKeguang Zhang      - enum:
38*2af21077SKeguang Zhang          - loongson,ls1b-gmac
39*2af21077SKeguang Zhang      - const: snps,dwmac-3.50a
40*2af21077SKeguang Zhang
41*2af21077SKeguang Zhang  reg:
42*2af21077SKeguang Zhang    maxItems: 1
43*2af21077SKeguang Zhang
44*2af21077SKeguang Zhang  clocks:
45*2af21077SKeguang Zhang    maxItems: 1
46*2af21077SKeguang Zhang
47*2af21077SKeguang Zhang  clock-names:
48*2af21077SKeguang Zhang    items:
49*2af21077SKeguang Zhang      - const: stmmaceth
50*2af21077SKeguang Zhang
51*2af21077SKeguang Zhang  interrupts:
52*2af21077SKeguang Zhang    maxItems: 1
53*2af21077SKeguang Zhang
54*2af21077SKeguang Zhang  interrupt-names:
55*2af21077SKeguang Zhang    items:
56*2af21077SKeguang Zhang      - const: macirq
57*2af21077SKeguang Zhang
58*2af21077SKeguang Zhang  loongson,ls1-syscon:
59*2af21077SKeguang Zhang    $ref: /schemas/types.yaml#/definitions/phandle
60*2af21077SKeguang Zhang    description:
61*2af21077SKeguang Zhang      Phandle to the syscon containing some extra configurations
62*2af21077SKeguang Zhang      including PHY interface mode.
63*2af21077SKeguang Zhang
64*2af21077SKeguang Zhang  phy-mode:
65*2af21077SKeguang Zhang    enum:
66*2af21077SKeguang Zhang      - mii
67*2af21077SKeguang Zhang      - rgmii-id
68*2af21077SKeguang Zhang
69*2af21077SKeguang Zhangrequired:
70*2af21077SKeguang Zhang  - compatible
71*2af21077SKeguang Zhang  - reg
72*2af21077SKeguang Zhang  - clocks
73*2af21077SKeguang Zhang  - clock-names
74*2af21077SKeguang Zhang  - interrupts
75*2af21077SKeguang Zhang  - interrupt-names
76*2af21077SKeguang Zhang  - loongson,ls1-syscon
77*2af21077SKeguang Zhang
78*2af21077SKeguang ZhangallOf:
79*2af21077SKeguang Zhang  - $ref: snps,dwmac.yaml#
80*2af21077SKeguang Zhang
81*2af21077SKeguang ZhangunevaluatedProperties: false
82*2af21077SKeguang Zhang
83*2af21077SKeguang Zhangexamples:
84*2af21077SKeguang Zhang  - |
85*2af21077SKeguang Zhang    #include <dt-bindings/clock/loongson,ls1x-clk.h>
86*2af21077SKeguang Zhang    #include <dt-bindings/interrupt-controller/irq.h>
87*2af21077SKeguang Zhang
88*2af21077SKeguang Zhang    gmac0: ethernet@1fe10000 {
89*2af21077SKeguang Zhang        compatible = "loongson,ls1b-gmac", "snps,dwmac-3.50a";
90*2af21077SKeguang Zhang        reg = <0x1fe10000 0x10000>;
91*2af21077SKeguang Zhang
92*2af21077SKeguang Zhang        clocks = <&clkc LS1X_CLKID_AHB>;
93*2af21077SKeguang Zhang        clock-names = "stmmaceth";
94*2af21077SKeguang Zhang
95*2af21077SKeguang Zhang        interrupt-parent = <&intc1>;
96*2af21077SKeguang Zhang        interrupts = <2 IRQ_TYPE_LEVEL_HIGH>;
97*2af21077SKeguang Zhang        interrupt-names = "macirq";
98*2af21077SKeguang Zhang
99*2af21077SKeguang Zhang        loongson,ls1-syscon = <&syscon>;
100*2af21077SKeguang Zhang
101*2af21077SKeguang Zhang        phy-handle = <&phy0>;
102*2af21077SKeguang Zhang        phy-mode = "mii";
103*2af21077SKeguang Zhang        snps,pbl = <1>;
104*2af21077SKeguang Zhang
105*2af21077SKeguang Zhang        mdio {
106*2af21077SKeguang Zhang            #address-cells = <1>;
107*2af21077SKeguang Zhang            #size-cells = <0>;
108*2af21077SKeguang Zhang            compatible = "snps,dwmac-mdio";
109*2af21077SKeguang Zhang
110*2af21077SKeguang Zhang            phy0: ethernet-phy@0 {
111*2af21077SKeguang Zhang                reg = <0x0>;
112*2af21077SKeguang Zhang            };
113*2af21077SKeguang Zhang        };
114*2af21077SKeguang Zhang    };
115