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,ls1c-emac.yaml# 5*2af21077SKeguang Zhang$schema: http://devicetree.org/meta-schemas/core.yaml# 6*2af21077SKeguang Zhang 7*2af21077SKeguang Zhangtitle: Loongson-1C 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-1C 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 - 10/100Mbps 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 - IEEE 802.1Q VLAN tag detection for reception frames 21*2af21077SKeguang Zhang - MII interface 22*2af21077SKeguang Zhang - RMII interface 23*2af21077SKeguang Zhang 24*2af21077SKeguang Zhangselect: 25*2af21077SKeguang Zhang properties: 26*2af21077SKeguang Zhang compatible: 27*2af21077SKeguang Zhang contains: 28*2af21077SKeguang Zhang enum: 29*2af21077SKeguang Zhang - loongson,ls1c-emac 30*2af21077SKeguang Zhang required: 31*2af21077SKeguang Zhang - compatible 32*2af21077SKeguang Zhang 33*2af21077SKeguang Zhangproperties: 34*2af21077SKeguang Zhang compatible: 35*2af21077SKeguang Zhang items: 36*2af21077SKeguang Zhang - enum: 37*2af21077SKeguang Zhang - loongson,ls1c-emac 38*2af21077SKeguang Zhang - const: snps,dwmac-3.50a 39*2af21077SKeguang Zhang 40*2af21077SKeguang Zhang reg: 41*2af21077SKeguang Zhang maxItems: 1 42*2af21077SKeguang Zhang 43*2af21077SKeguang Zhang clocks: 44*2af21077SKeguang Zhang maxItems: 1 45*2af21077SKeguang Zhang 46*2af21077SKeguang Zhang clock-names: 47*2af21077SKeguang Zhang items: 48*2af21077SKeguang Zhang - const: stmmaceth 49*2af21077SKeguang Zhang 50*2af21077SKeguang Zhang interrupts: 51*2af21077SKeguang Zhang maxItems: 1 52*2af21077SKeguang Zhang 53*2af21077SKeguang Zhang interrupt-names: 54*2af21077SKeguang Zhang items: 55*2af21077SKeguang Zhang - const: macirq 56*2af21077SKeguang Zhang 57*2af21077SKeguang Zhang loongson,ls1-syscon: 58*2af21077SKeguang Zhang $ref: /schemas/types.yaml#/definitions/phandle 59*2af21077SKeguang Zhang description: 60*2af21077SKeguang Zhang Phandle to the syscon containing some extra configurations 61*2af21077SKeguang Zhang including PHY interface mode. 62*2af21077SKeguang Zhang 63*2af21077SKeguang Zhang phy-mode: 64*2af21077SKeguang Zhang enum: 65*2af21077SKeguang Zhang - mii 66*2af21077SKeguang Zhang - rmii 67*2af21077SKeguang Zhang 68*2af21077SKeguang Zhangrequired: 69*2af21077SKeguang Zhang - compatible 70*2af21077SKeguang Zhang - reg 71*2af21077SKeguang Zhang - clocks 72*2af21077SKeguang Zhang - clock-names 73*2af21077SKeguang Zhang - interrupts 74*2af21077SKeguang Zhang - interrupt-names 75*2af21077SKeguang Zhang - loongson,ls1-syscon 76*2af21077SKeguang Zhang 77*2af21077SKeguang ZhangallOf: 78*2af21077SKeguang Zhang - $ref: snps,dwmac.yaml# 79*2af21077SKeguang Zhang 80*2af21077SKeguang ZhangunevaluatedProperties: false 81*2af21077SKeguang Zhang 82*2af21077SKeguang Zhangexamples: 83*2af21077SKeguang Zhang - | 84*2af21077SKeguang Zhang #include <dt-bindings/clock/loongson,ls1x-clk.h> 85*2af21077SKeguang Zhang #include <dt-bindings/interrupt-controller/irq.h> 86*2af21077SKeguang Zhang 87*2af21077SKeguang Zhang emac: ethernet@1fe10000 { 88*2af21077SKeguang Zhang compatible = "loongson,ls1c-emac", "snps,dwmac-3.50a"; 89*2af21077SKeguang Zhang reg = <0x1fe10000 0x10000>; 90*2af21077SKeguang Zhang 91*2af21077SKeguang Zhang clocks = <&clkc LS1X_CLKID_AHB>; 92*2af21077SKeguang Zhang clock-names = "stmmaceth"; 93*2af21077SKeguang Zhang 94*2af21077SKeguang Zhang interrupt-parent = <&intc1>; 95*2af21077SKeguang Zhang interrupts = <2 IRQ_TYPE_LEVEL_HIGH>; 96*2af21077SKeguang Zhang interrupt-names = "macirq"; 97*2af21077SKeguang Zhang 98*2af21077SKeguang Zhang loongson,ls1-syscon = <&syscon>; 99*2af21077SKeguang Zhang 100*2af21077SKeguang Zhang phy-handle = <&phy0>; 101*2af21077SKeguang Zhang phy-mode = "mii"; 102*2af21077SKeguang Zhang snps,pbl = <1>; 103*2af21077SKeguang Zhang 104*2af21077SKeguang Zhang mdio { 105*2af21077SKeguang Zhang #address-cells = <1>; 106*2af21077SKeguang Zhang #size-cells = <0>; 107*2af21077SKeguang Zhang compatible = "snps,dwmac-mdio"; 108*2af21077SKeguang Zhang 109*2af21077SKeguang Zhang phy0: ethernet-phy@13 { 110*2af21077SKeguang Zhang reg = <0x13>; 111*2af21077SKeguang Zhang }; 112*2af21077SKeguang Zhang }; 113*2af21077SKeguang Zhang }; 114