Renesas Ethernet AVB driver proper
authorSergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Wed, 10 Jun 2015 22:01:43 +0000 (01:01 +0300)
committerDavid S. Miller <davem@davemloft.net>
Thu, 11 Jun 2015 07:14:29 +0000 (00:14 -0700)
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 <mitsuhiro.kimura.kc@renesas.com>
Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Documentation/devicetree/bindings/net/renesas,ravb.txt [new file with mode: 0644]
drivers/net/ethernet/renesas/Kconfig
drivers/net/ethernet/renesas/Makefile
drivers/net/ethernet/renesas/ravb.c [new file with mode: 0644]
drivers/net/ethernet/renesas/ravb.h [new file with mode: 0644]

diff --git a/Documentation/devicetree/bindings/net/renesas,ravb.txt b/Documentation/devicetree/bindings/net/renesas,ravb.txt
new file mode 100644 (file)
index 0000000..1fd8831
--- /dev/null
@@ -0,0 +1,48 @@
+* Renesas Electronics Ethernet AVB
+
+This file provides information on what the device node for the Ethernet AVB
+interface contains.
+
+Required properties:
+- compatible: "renesas,etheravb-r8a7790" if the device is a part of R8A7790 SoC.
+             "renesas,etheravb-r8a7794" if the device is a part of R8A7794 SoC.
+- reg: offset and length of (1) the register block and (2) the stream buffer.
+- interrupts: interrupt specifier for the sole interrupt.
+- phy-mode: see ethernet.txt file in the same directory.
+- phy-handle: see ethernet.txt file in the same directory.
+- #address-cells: number of address cells for the MDIO bus, must be equal to 1.
+- #size-cells: number of size cells on the MDIO bus, must be equal to 0.
+- clocks: clock phandle and specifier pair.
+- pinctrl-0: phandle, referring to a default pin configuration node.
+
+Optional properties:
+- interrupt-parent: the phandle for the interrupt controller that services
+                   interrupts for this device.
+- pinctrl-names: pin configuration state name ("default").
+- renesas,no-ether-link: boolean, specify when a board does not provide a proper
+                        AVB_LINK signal.
+- renesas,ether-link-active-low: boolean, specify when the AVB_LINK signal is
+                                active-low instead of normal active-high.
+
+Example:
+
+       ethernet@e6800000 {
+               compatible = "renesas,etheravb-r8a7790";
+               reg = <0 0xe6800000 0 0x800>, <0 0xee0e8000 0 0x4000>;
+               interrupt-parent = <&gic>;
+               interrupts = <0 163 IRQ_TYPE_LEVEL_HIGH>;
+               clocks = <&mstp8_clks R8A7790_CLK_ETHERAVB>;
+               phy-mode = "rmii";
+               phy-handle = <&phy0>;
+               pinctrl-0 = <&ether_pins>;
+               pinctrl-names = "default";
+               renesas,no-ether-link;
+               #address-cells = <1>;
+               #size-cells = <0>;
+
+               phy0: ethernet-phy@0 {
+                       reg = <0>;
+                       interrupt-parent = <&gpio2>;
+                       interrupts = <15 IRQ_TYPE_LEVEL_LOW>;
+               };
+       };
index 196e98a..8e8031a 100644 (file)
@@ -2,6 +2,21 @@
 # Renesas device configuration
 #
 
+config NET_VENDOR_RENESAS
+       bool "Renesas devices"
+       default y
+       ---help---
+         If you have a network (Ethernet) card belonging to this class, say Y
+         and read the Ethernet-HOWTO, available from
+         <http://www.tldp.org/docs.html#howto>.
+
+         Note that the answer to this question doesn't directly affect the
+         kernel: saying N will just cause the configurator to skip all
+         the questions about Renesas devices. If you say Y, you will be asked
+         for your specific device in the following questions.
+
+if NET_VENDOR_RENESAS
+
 config SH_ETH
        tristate "Renesas SuperH Ethernet support"
        depends on HAS_DMA
@@ -15,3 +30,19 @@ config SH_ETH
          This driver supporting CPUs are:
                - SH7619, SH7710, SH7712, SH7724, SH7734, SH7763, SH7757,
                  R8A7740, R8A777x and R8A779x.
+
+config RAVB
+       tristate "Renesas Ethernet AVB support"
+       depends on HAS_DMA
+       depends on ARCH_SHMOBILE || COMPILE_TEST
+       select CRC32
+       select MII
+       select MDIO_BITBANG
+       select PHYLIB
+       select PTP_1588_CLOCK
+       help
+         Renesas Ethernet AVB device driver.
+         This driver supports the following SoCs:
+               - R8A779x.
+
+endif # NET_VENDOR_RENESAS
Simple merge
Simple merge
Simple merge