-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
dt-bindings: net: Add Loongson-1 Ethernet Controller
Add devicetree binding document for Loongson-1 Ethernet controller. And modify MAINTAINERS to add a new F: entry for Loongson1 dt-binding documents. Signed-off-by: Keguang Zhang <keguang.zhang@gmail.com> Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Reviewed-by: Serge Semin <fancer.lancer@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
- Loading branch information
Keguang Zhang
authored and
David S. Miller
committed
Sep 16, 2023
1 parent
7e10088
commit 2af2107
Showing
3 changed files
with
228 additions
and
0 deletions.
There are no files selected for viewing
114 changes: 114 additions & 0 deletions
114
Documentation/devicetree/bindings/net/loongson,ls1b-gmac.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,114 @@ | ||
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) | ||
%YAML 1.2 | ||
--- | ||
$id: http://devicetree.org/schemas/net/loongson,ls1b-gmac.yaml# | ||
$schema: http://devicetree.org/meta-schemas/core.yaml# | ||
|
||
title: Loongson-1B Gigabit Ethernet MAC Controller | ||
|
||
maintainers: | ||
- Keguang Zhang <keguang.zhang@gmail.com> | ||
|
||
description: | | ||
Loongson-1B Gigabit Ethernet MAC Controller is based on | ||
Synopsys DesignWare MAC (version 3.50a). | ||
Main features | ||
- Dual 10/100/1000Mbps GMAC controllers | ||
- Full-duplex operation (IEEE 802.3x flow control automatic transmission) | ||
- Half-duplex operation (CSMA/CD Protocol and back-pressure support) | ||
- RX Checksum Offload | ||
- TX Checksum insertion | ||
- MII interface | ||
- RGMII interface | ||
select: | ||
properties: | ||
compatible: | ||
contains: | ||
enum: | ||
- loongson,ls1b-gmac | ||
required: | ||
- compatible | ||
|
||
properties: | ||
compatible: | ||
items: | ||
- enum: | ||
- loongson,ls1b-gmac | ||
- const: snps,dwmac-3.50a | ||
|
||
reg: | ||
maxItems: 1 | ||
|
||
clocks: | ||
maxItems: 1 | ||
|
||
clock-names: | ||
items: | ||
- const: stmmaceth | ||
|
||
interrupts: | ||
maxItems: 1 | ||
|
||
interrupt-names: | ||
items: | ||
- const: macirq | ||
|
||
loongson,ls1-syscon: | ||
$ref: /schemas/types.yaml#/definitions/phandle | ||
description: | ||
Phandle to the syscon containing some extra configurations | ||
including PHY interface mode. | ||
|
||
phy-mode: | ||
enum: | ||
- mii | ||
- rgmii-id | ||
|
||
required: | ||
- compatible | ||
- reg | ||
- clocks | ||
- clock-names | ||
- interrupts | ||
- interrupt-names | ||
- loongson,ls1-syscon | ||
|
||
allOf: | ||
- $ref: snps,dwmac.yaml# | ||
|
||
unevaluatedProperties: false | ||
|
||
examples: | ||
- | | ||
#include <dt-bindings/clock/loongson,ls1x-clk.h> | ||
#include <dt-bindings/interrupt-controller/irq.h> | ||
gmac0: ethernet@1fe10000 { | ||
compatible = "loongson,ls1b-gmac", "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@0 { | ||
reg = <0x0>; | ||
}; | ||
}; | ||
}; |
113 changes: 113 additions & 0 deletions
113
Documentation/devicetree/bindings/net/loongson,ls1c-emac.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,113 @@ | ||
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) | ||
%YAML 1.2 | ||
--- | ||
$id: http://devicetree.org/schemas/net/loongson,ls1c-emac.yaml# | ||
$schema: http://devicetree.org/meta-schemas/core.yaml# | ||
|
||
title: Loongson-1C Ethernet MAC Controller | ||
|
||
maintainers: | ||
- Keguang Zhang <keguang.zhang@gmail.com> | ||
|
||
description: | | ||
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 | ||
select: | ||
properties: | ||
compatible: | ||
contains: | ||
enum: | ||
- loongson,ls1c-emac | ||
required: | ||
- compatible | ||
|
||
properties: | ||
compatible: | ||
items: | ||
- enum: | ||
- loongson,ls1c-emac | ||
- const: snps,dwmac-3.50a | ||
|
||
reg: | ||
maxItems: 1 | ||
|
||
clocks: | ||
maxItems: 1 | ||
|
||
clock-names: | ||
items: | ||
- const: stmmaceth | ||
|
||
interrupts: | ||
maxItems: 1 | ||
|
||
interrupt-names: | ||
items: | ||
- const: macirq | ||
|
||
loongson,ls1-syscon: | ||
$ref: /schemas/types.yaml#/definitions/phandle | ||
description: | ||
Phandle to the syscon containing some extra configurations | ||
including PHY interface mode. | ||
|
||
phy-mode: | ||
enum: | ||
- mii | ||
- rmii | ||
|
||
required: | ||
- compatible | ||
- reg | ||
- clocks | ||
- clock-names | ||
- interrupts | ||
- interrupt-names | ||
- loongson,ls1-syscon | ||
|
||
allOf: | ||
- $ref: snps,dwmac.yaml# | ||
|
||
unevaluatedProperties: false | ||
|
||
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>; | ||
}; | ||
}; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters