Skip to content

Commit c156633

Browse files
Sergei Shtylyovdavem330
Sergei Shtylyov
authored andcommitted
Renesas Ethernet AVB driver proper
Ethernet AVB includes an Gigabit Ethernet controller (E-MAC) that is basically compatible with SuperH Gigabit Ethernet E-MAC. Ethernet AVB has a dedicated direct memory access controller (AVB-DMAC) that is a new design compared to the SuperH E-DMAC. The AVB-DMAC is compliant with 3 standards formulated for IEEE 802.1BA: IEEE 802.1AS timing and synchronization protocol, IEEE 802.1Qav real- time transfer, and the IEEE 802.1Qat stream reservation protocol. The driver only supports device tree probing, so the binding document is included in this patch. Based on the original patches by Mitsuhiro Kimura. Signed-off-by: Mitsuhiro Kimura <[email protected]> Signed-off-by: Sergei Shtylyov <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 2b0a8c9 commit c156633

File tree

5 files changed

+2687
-0
lines changed

5 files changed

+2687
-0
lines changed
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
* Renesas Electronics Ethernet AVB
2+
3+
This file provides information on what the device node for the Ethernet AVB
4+
interface contains.
5+
6+
Required properties:
7+
- compatible: "renesas,etheravb-r8a7790" if the device is a part of R8A7790 SoC.
8+
"renesas,etheravb-r8a7794" if the device is a part of R8A7794 SoC.
9+
- reg: offset and length of (1) the register block and (2) the stream buffer.
10+
- interrupts: interrupt specifier for the sole interrupt.
11+
- phy-mode: see ethernet.txt file in the same directory.
12+
- phy-handle: see ethernet.txt file in the same directory.
13+
- #address-cells: number of address cells for the MDIO bus, must be equal to 1.
14+
- #size-cells: number of size cells on the MDIO bus, must be equal to 0.
15+
- clocks: clock phandle and specifier pair.
16+
- pinctrl-0: phandle, referring to a default pin configuration node.
17+
18+
Optional properties:
19+
- interrupt-parent: the phandle for the interrupt controller that services
20+
interrupts for this device.
21+
- pinctrl-names: pin configuration state name ("default").
22+
- renesas,no-ether-link: boolean, specify when a board does not provide a proper
23+
AVB_LINK signal.
24+
- renesas,ether-link-active-low: boolean, specify when the AVB_LINK signal is
25+
active-low instead of normal active-high.
26+
27+
Example:
28+
29+
ethernet@e6800000 {
30+
compatible = "renesas,etheravb-r8a7790";
31+
reg = <0 0xe6800000 0 0x800>, <0 0xee0e8000 0 0x4000>;
32+
interrupt-parent = <&gic>;
33+
interrupts = <0 163 IRQ_TYPE_LEVEL_HIGH>;
34+
clocks = <&mstp8_clks R8A7790_CLK_ETHERAVB>;
35+
phy-mode = "rmii";
36+
phy-handle = <&phy0>;
37+
pinctrl-0 = <&ether_pins>;
38+
pinctrl-names = "default";
39+
renesas,no-ether-link;
40+
#address-cells = <1>;
41+
#size-cells = <0>;
42+
43+
phy0: ethernet-phy@0 {
44+
reg = <0>;
45+
interrupt-parent = <&gpio2>;
46+
interrupts = <15 IRQ_TYPE_LEVEL_LOW>;
47+
};
48+
};

drivers/net/ethernet/renesas/Kconfig

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,21 @@
22
# Renesas device configuration
33
#
44

5+
config NET_VENDOR_RENESAS
6+
bool "Renesas devices"
7+
default y
8+
---help---
9+
If you have a network (Ethernet) card belonging to this class, say Y
10+
and read the Ethernet-HOWTO, available from
11+
<http://www.tldp.org/docs.html#howto>.
12+
13+
Note that the answer to this question doesn't directly affect the
14+
kernel: saying N will just cause the configurator to skip all
15+
the questions about Renesas devices. If you say Y, you will be asked
16+
for your specific device in the following questions.
17+
18+
if NET_VENDOR_RENESAS
19+
520
config SH_ETH
621
tristate "Renesas SuperH Ethernet support"
722
depends on HAS_DMA
@@ -15,3 +30,19 @@ config SH_ETH
1530
This driver supporting CPUs are:
1631
- SH7619, SH7710, SH7712, SH7724, SH7734, SH7763, SH7757,
1732
R8A7740, R8A777x and R8A779x.
33+
34+
config RAVB
35+
tristate "Renesas Ethernet AVB support"
36+
depends on HAS_DMA
37+
depends on ARCH_SHMOBILE || COMPILE_TEST
38+
select CRC32
39+
select MII
40+
select MDIO_BITBANG
41+
select PHYLIB
42+
select PTP_1588_CLOCK
43+
help
44+
Renesas Ethernet AVB device driver.
45+
This driver supports the following SoCs:
46+
- R8A779x.
47+
48+
endif # NET_VENDOR_RENESAS

drivers/net/ethernet/renesas/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,4 @@
33
#
44

55
obj-$(CONFIG_SH_ETH) += sh_eth.o
6+
obj-$(CONFIG_RAVB) += ravb.o

0 commit comments

Comments
 (0)