Skip to contentSkip to conversation

devicetree: add binding for Aurora VLSI NB8800 Ethernet controller

PATCH Superseded Mans Rullgard 3 participants 4 messages Oct 22, 2015 – Oct 24, 2015

Subsystems (3)

v2 of 8 Superseded Latest is v8 →

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/2 devicetree: add binding for Aurora VLSI NB8800 Ethernet controller

This adds a binding for the Aurora VLSI NB8800 Ethernet controller using the "aurora,nb8800" compatible string. When used in Sigma Designs chips a few additional control registers are available. This variant is indicated by the "sigma,smp8640-ethernet" compatible string.

---
Changes:
- correct order of compatible strings

---
 .../devicetree/bindings/net/aurora,nb8800.txt      | 26 ++++++++++++++++++++++
 1 file changed, 26 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/net/aurora,nb8800.txt
Documentation/devicetree/bindings/net/aurora,nb8800.txt new file +26 -0
new file mode 100644
index 0000000..cf7108d
@@ -0,0 +1,26 @@
+* Aurora VLSI AU-NB8800 Ethernet controller
+
+Required properties:
+- compatible: Should be "sigma,smp8640-ethernet", "aurora,nb8800"
+	The former indicates presence of extra features added by Sigma Designs.
+- reg: Should be MMIO address space of the device
+- interrupts: Should contain the interrupt specifier for the device
+- interrupt-parent: Should be a phandle for the interrupt controller
+- clocks: Should be a phandle for the clock for the device
+
+Common properties described in ethernet.txt:
+- local-mac-address
+- mac-address
+- max-speed
+- phy-mode
+
+Example:
+
+ethernet@26000 {
+	compatible = "aurora,nb8800";
+	reg = <0x10000 0x800>;
+	interrupts = <42>;
+	clocks = <&sys_clk>;
+	max-speed = <1000>;
+	phy-connection-type = "rgmii";
+};
Signature · 6 lines
2.5.3

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
#1 lore raw

PATCH v2 2/2 net: ethernet: add driver for Aurora VLSI NB8800 Ethernet controller

This adds a driver for the Aurora VLSI NB8800 Ethernet controller. It is an almost complete rewrite of a driver originally found in a Sigma Designs 2.6.22 tree.

---
Changes:
- fix 64-bit build warnings

---
 drivers/net/ethernet/Kconfig         |    1 +
 drivers/net/ethernet/Makefile        |    1 +
 drivers/net/ethernet/aurora/Kconfig  |   20 +
 drivers/net/ethernet/aurora/Makefile |    1 +
 drivers/net/ethernet/aurora/nb8800.c | 1173 ++++++++++++++++++++++++++++++++++
 drivers/net/ethernet/aurora/nb8800.h |  257 ++++++++
 6 files changed, 1453 insertions(+)
 create mode 100644 drivers/net/ethernet/aurora/Kconfig
 create mode 100644 drivers/net/ethernet/aurora/Makefile
 create mode 100644 drivers/net/ethernet/aurora/nb8800.c
 create mode 100644 drivers/net/ethernet/aurora/nb8800.h
drivers/net/ethernet/Kconfig +1 -0
index 05aa759..8310163 100644
@@ -29,6 +29,7 @@ source "drivers/net/ethernet/apm/Kconfig"
 source "drivers/net/ethernet/apple/Kconfig"
 source "drivers/net/ethernet/arc/Kconfig"
 source "drivers/net/ethernet/atheros/Kconfig"
+source "drivers/net/ethernet/aurora/Kconfig"
 source "drivers/net/ethernet/cadence/Kconfig"
 source "drivers/net/ethernet/adi/Kconfig"
 source "drivers/net/ethernet/broadcom/Kconfig"
drivers/net/ethernet/Makefile +1 -0
index ddfc808..b435fb0 100644
@@ -15,6 +15,7 @@ obj-$(CONFIG_NET_XGENE) += apm/
 obj-$(CONFIG_NET_VENDOR_APPLE) += apple/
 obj-$(CONFIG_NET_VENDOR_ARC) += arc/
 obj-$(CONFIG_NET_VENDOR_ATHEROS) += atheros/
+obj-$(CONFIG_NET_VENDOR_AURORA) += aurora/
 obj-$(CONFIG_NET_CADENCE) += cadence/
 obj-$(CONFIG_NET_BFIN) += adi/
 obj-$(CONFIG_NET_VENDOR_BROADCOM) += broadcom/
drivers/net/ethernet/aurora/Kconfig new file +20 -0
new file mode 100644
index 0000000..a3c7106
@@ -0,0 +1,20 @@
+config NET_VENDOR_AURORA
+	bool "Aurora VLSI devices"
+	help
+	  If you have a network (Ethernet) device belonging to this class,
+	  say Y.
+
+	  Note that the answer to this question doesn't directly affect the
+	  kernel: saying N will just cause the configurator to skip all
+	  questions about Aurora devices. If you say Y, you will be asked
+	  for your specific device in the following questions.
+
+if NET_VENDOR_AURORA
+
+config AURORA_NB8800
+	tristate "Aurora AU-NB8800 support"
+	select PHYLIB
+	help
+	 Support for the AU-NB8800 gigabit Ethernet controller.
+
+endif
drivers/net/ethernet/aurora/Makefile new file +1 -0
new file mode 100644
index 0000000..6cb528a
@@ -0,0 +1 @@
+obj-$(CONFIG_AURORA_NB8800) += nb8800.o
drivers/net/ethernet/aurora/nb8800.c new file +1173 -0

1,173 lines not on this page · raw message

drivers/net/ethernet/aurora/nb8800.h new file +257 -0

257 lines not on this page · raw message

Signature · 1 line
2.5.3
Acked-by on v2 1/2
#3 lore raw
In reply to Mans Rullgard
Quoted 7 lines · Mans Rullgard

This adds a binding for the Aurora VLSI NB8800 Ethernet controller using the "aurora,nb8800" compatible string. When used in Sigma Designs chips a few additional control registers are available. This variant is indicated by the "sigma,smp8640-ethernet" compatible string.

Quoted 43 lines

---
Changes:
- correct order of compatible strings

---
 .../devicetree/bindings/net/aurora,nb8800.txt      | 26 ++++++++++++++++++++++
 1 file changed, 26 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/net/aurora,nb8800.txt
Documentation/devicetree/bindings/net/aurora,nb8800.txt new file +26 -1
new file mode 100644
index 0000000..cf7108d
@@ -0,0 +1,26 @@
+* Aurora VLSI AU-NB8800 Ethernet controller
+
+Required properties:
+- compatible: Should be "sigma,smp8640-ethernet", "aurora,nb8800"
+       The former indicates presence of extra features added by Sigma Designs.
+- reg: Should be MMIO address space of the device
+- interrupts: Should contain the interrupt specifier for the device
+- interrupt-parent: Should be a phandle for the interrupt controller
+- clocks: Should be a phandle for the clock for the device
+
+Common properties described in ethernet.txt:
+- local-mac-address
+- mac-address
+- max-speed
+- phy-mode
+
+Example:
+
+ethernet@26000 {
+       compatible = "aurora,nb8800";
+       reg = <0x10000 0x800>;
+       interrupts = <42>;
+       clocks = <&sys_clk>;
+       max-speed = <1000>;
+       phy-connection-type = "rgmii";
+};
--

2.5.3

maintainer
#2 lore raw

Re: [PATCH v2 2/2] net: ethernet: add driver for Aurora VLSI NB8800 Ethernet controller

In reply to Mans Rullgard

From: Mans Rullgard <[email protected]>
Date: Thu, 22 Oct 2015 17:28:50 +0100

Quoted 1 line

+static void nb8800_mac_tx(struct net_device *dev, int enable)

...

Quoted 1 line

+static void nb8800_mac_rx(struct net_device *dev, int enable)

...

Quoted 1 line

+static void nb8800_mac_af(struct net_device *dev, int enable)

Please use 'bool' and true/false for 'enable'.

Quoted 1 line

+static int nb8800_alloc_rx(struct net_device *dev, int i, int napi)

Likewise here for 'napi'.