Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
142 changes: 142 additions & 0 deletions Documentation/devicetree/bindings/net/eswin,eic7700-eth.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,142 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/net/eswin,eic7700-eth.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Eswin EIC7700 SOC Eth Controller

maintainers:
- Shuang Liang <liangshuang@eswincomputing.com>
- Zhi Li <lizhi2@eswincomputing.com>
- Shangjuan Wei <weishangjuan@eswincomputing.com>

description: |
The eth controller registers are part of the syscrg block on
the EIC7700 SoC.

properties:
compatible:
const: eswin,eic7700-qos-eth

reg:
minItems: 1
items:
- description: Base address and size
- description: Extension region (optional)

interrupt-names:
const: macirq

interrupts:
maxItems: 1

phy-mode:
$ref: /schemas/types.yaml#/definitions/string
enum: [mii, gmii, rgmii, rmii, sgmii]

id:
$ref: /schemas/types.yaml#/definitions/uint32
description: Controller instance ID

clocks:
minItems: 3
maxItems: 7

clock-names:
minItems: 3
items:
- const: app
- const: stmmaceth
- const: tx
- const: slave_bus
- const: master_bus
- const: ptp_ref
- const: phy_ref_clk

resets:
maxItems: 1

reset-names:
items:
- const: ethrst

dma-noncoherent: true

# Custom properties
eswin,hsp_sp_csr:
$ref: /schemas/types.yaml#/definitions/phandle-array
description: HSP SP control registers

eswin,syscrg_csr:
$ref: /schemas/types.yaml#/definitions/phandle-array
description: System clock registers

eswin,dly_hsp_reg:
$ref: /schemas/types.yaml#/definitions/uint32-array
description: HSP delay control registers

snps,axi-config:
$ref: /schemas/types.yaml#/definitions/phandle
description: AXI bus configuration

stmmac-axi-config:
type: object
unevaluatedProperties: false
properties:
snps,lpi_en:
type: boolean
$ref: /schemas/types.yaml#/definitions/flag
description: Low Power Interface enable flag (true/false)

required:
- compatible
- reg
- interrupt-names
- interrupts
- phy-mode
- id
- clocks
- clock-names
- resets
- reset-names
- eswin,hsp_sp_csr
- eswin,syscrg_csr
- eswin,dly_hsp_reg
- snps,axi-config
- snps,blen
- snps,rd_osr_lmt
- snps,wr_osr_lmt
- snps,lpi_en

additionalProperties: false

examples:
- |
gmac0: ethernet@50400000 {
compatible = "eswin,eic7700-qos-eth";
reg = <0x0 0x50400000 0x0 0x10000>;
interrupt-parent = <&plic>;
interrupt-names = "macirq";
interrupts = <61>;
phy-mode = "rgmii";
id = <0>;
status = "disabled";
clocks = <&clock 550>,
<&clock 551>,
<&clock 552>;
clock-names = "app", "stmmaceth", "tx";
resets = <&reset 0x07 (1 << 26)>;
reset-names = "ethrst";
dma-noncoherent;
eswin,hsp_sp_csr = <&hsp_sp_csr 0x1030 0x100 0x108>;
eswin,syscrg_csr = <&sys_crg 0x148 0x14c>;
eswin,dly_hsp_reg = <0x114 0x118 0x11c>;
snps,axi-config = <&stmmac_axi_setup>;
stmmac_axi_setup: stmmac-axi-config {
snps,blen = <0 0 0 0 16 8 4>;
snps,rd_osr_lmt = <2>;
snps,wr_osr_lmt = <2>;
snps,lpi_en;
};
};
11 changes: 11 additions & 0 deletions drivers/net/ethernet/stmicro/stmmac/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,17 @@ config DWMAC_ANARION

This selects the Anarion SoC glue layer support for the stmmac driver.

config DWMAC_EIC7700
tristate "Support for Eswin eic7700 ethernet driver"
select CRC32
select MII
depends on OF && HAS_DMA && ARCH_ESWIN || COMPILE_TEST
help
This driver supports the Eswin EIC7700 Ethernet controller,
which integrates Synopsys DesignWare QoS features. It enables
high-speed networking with DMA acceleration and is optimized
for embedded systems.

config DWMAC_INGENIC
tristate "Ingenic MAC support"
default MACH_INGENIC
Expand Down
1 change: 1 addition & 0 deletions drivers/net/ethernet/stmicro/stmmac/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ stmmac-$(CONFIG_STMMAC_SELFTESTS) += stmmac_selftests.o
# Ordering matters. Generic driver must be last.
obj-$(CONFIG_STMMAC_PLATFORM) += stmmac-platform.o
obj-$(CONFIG_DWMAC_ANARION) += dwmac-anarion.o
obj-$(CONFIG_DWMAC_EIC7700) += dwmac-eic7700.o
obj-$(CONFIG_DWMAC_INGENIC) += dwmac-ingenic.o
obj-$(CONFIG_DWMAC_IPQ806X) += dwmac-ipq806x.o
obj-$(CONFIG_DWMAC_LPC18XX) += dwmac-lpc18xx.o
Expand Down
Loading