devicetree: add binding for Aurora VLSI NB8800 Ethernet controller
Subsystems (3)
PATCH v3 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 features are available. These variants are indicated by a "sigma,<chip>-ethernet" compatible string.
---
Changes:
- added phy child node
--- .../devicetree/bindings/net/aurora,nb8800.txt | 37 ++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 Documentation/devicetree/bindings/net/aurora,nb8800.txt
Documentation/devicetree/bindings/net/aurora,nb8800.txt new file +37 -0
@@ -0,0 +1,37 @@ +* Aurora VLSI AU-NB8800 Ethernet controller + +Required properties: +- compatible: Should be "sigma,<chip>-ethernet", "aurora,nb8800" +- 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 +- #address-cells: Should be <1> +- #size-cells: Should be <0> + +Common properties described in ethernet.txt: +- local-mac-address +- mac-address +- phy-handle +- phy-mode + +The attached PHY should be specified in a child node as per phy.txt. + +Example: + +ethernet@26000 { + compatible = "sigma,smp8642-ethernet", "aurora,nb8800"; + reg = <0x26000 0x800>; + interrupts = <38>; + clocks = <&sys_clk>; + max-speed = <1000>; + phy-connection-type = "rgmii"; + phy-handle = <ð0_phy>; + #address-cells = <1>; + #size-cells = <0>; + + eth0_phy: ethernet-phy@1 { + compatible = "ethernet-phy-ieee802.3-c22"; + reg = <1>; + }; +};
Signature · 1 line
2.6.2
PATCH v3 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:
- remove check for wake on lan irq as it is never requested
- prettify mac address setting
- use ethtool_op_get_link()
- use hardware statistics counters
- check for dma mapping errors
- drop bogus netdev_mc_count(dev) > 64 check
- move request_irq to ndo_open callback
- drop tx_queue_len override
- remove batched tx descriptor cleanup
- use bool type as appropriate
- set the IC_THRESHOLD register correctly according to documentation
- set the RX_ITR and TX_ITR registers to better values improving performance
- move phy_connect to ndo_open callback
- get phy information from devicetree
- move dma buffer allocation to ndo_open callback
- anything I forgot to mention
--- 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 | 1118 ++++++++++++++++++++++++++++++++++ drivers/net/ethernet/aurora/nb8800.h | 229 +++++++ 6 files changed, 1370 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
@@ -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
@@ -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
@@ -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
@@ -0,0 +1 @@ +obj-$(CONFIG_AURORA_NB8800) += nb8800.o
drivers/net/ethernet/aurora/nb8800.c new file +1118 -0
1,118 lines not on this page · raw message
drivers/net/ethernet/aurora/nb8800.h new file +229 -0
229 lines not on this page · raw message
Signature · 1 line
2.6.2
Re: [PATCH v3 2/2] net: ethernet: add driver for Aurora VLSI NB8800 Ethernet controller
drivers/net/ethernet/aurora/nb8800.c line 848
Quoted 3 lines
drivers/net/ethernet/aurora/nb8800.c new file +2
-0+ +static struct ethtool_ops nb8800_ethtool_ops = {
Ops should be const
drivers/net/ethernet/aurora/nb8800.c line 854
Quoted 6 lines
drivers/net/ethernet/aurora/nb8800.c new file +6
-0+ .get_settings = nb8800_get_settings, + .set_settings = nb8800_set_settings, + .nway_reset = nb8800_nway_reset, + .get_link = ethtool_op_get_link, +}; +
Since you are implementing ethtool please add a driver info function.
Re: [PATCH v3 2/2] net: ethernet: add driver for Aurora VLSI NB8800 Ethernet controller
Quoted 9 lines · Stephen Hemminger
drivers/net/ethernet/aurora/nb8800.c line 854
Quoted 6 lines
drivers/net/ethernet/aurora/nb8800.c new file +6
-0+ .get_settings = nb8800_get_settings, + .set_settings = nb8800_set_settings, + .nway_reset = nb8800_nway_reset, + .get_link = ethtool_op_get_link, +}; +Since you are implementing ethtool please add a driver info function.
I don't know what I'd set there that the fallback code doesn't.
Signature · 2 lines
Måns Rullgård [email protected]
Forgot to CC netdev.
Quoted 60 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 features are available. These variants are indicated by a "sigma,<chip>-ethernet" compatible string.
Signed-off-by Mans Rullgard <[email protected]>---
Changes:
- added phy child node--- .../devicetree/bindings/net/aurora,nb8800.txt | 37 ++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 Documentation/devicetree/bindings/net/aurora,nb8800.txtDocumentation/devicetree/bindings/net/aurora,nb8800.txt new file +37
-0@@ -0,0 +1,37 @@ +* Aurora VLSI AU-NB8800 Ethernet controller + +Required properties: +- compatible: Should be "sigma,<chip>-ethernet", "aurora,nb8800" +- 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 +- #address-cells: Should be <1> +- #size-cells: Should be <0> + +Common properties described in ethernet.txt: +- local-mac-address +- mac-address +- phy-handle +- phy-mode + +The attached PHY should be specified in a child node as per phy.txt. + +Example: + +ethernet@26000 { + compatible = "sigma,smp8642-ethernet", "aurora,nb8800"; + reg = <0x26000 0x800>; + interrupts = <38>; + clocks = <&sys_clk>; + max-speed = <1000>; + phy-connection-type = "rgmii"; + phy-handle = <ð0_phy>; + #address-cells = <1>; + #size-cells = <0>; + + eth0_phy: ethernet-phy@1 { + compatible = "ethernet-phy-ieee802.3-c22"; + reg = <1>; + }; +};Signature · 1 line
2.6.2
Signature · 2 lines
Måns Rullgård [email protected]
Quoted 6 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 features are available. These variants are indicated by a "sigma,<chip>-ethernet" compatible string.
Signed-off-by Mans Rullgard <[email protected]>
Quoted 54 lines
---
Changes:
- added phy child node--- .../devicetree/bindings/net/aurora,nb8800.txt | 37 ++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 Documentation/devicetree/bindings/net/aurora,nb8800.txtDocumentation/devicetree/bindings/net/aurora,nb8800.txt new file +37
-0@@ -0,0 +1,37 @@ +* Aurora VLSI AU-NB8800 Ethernet controller + +Required properties: +- compatible: Should be "sigma,<chip>-ethernet", "aurora,nb8800" +- 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 +- #address-cells: Should be <1> +- #size-cells: Should be <0> + +Common properties described in ethernet.txt: +- local-mac-address +- mac-address +- phy-handle +- phy-mode + +The attached PHY should be specified in a child node as per phy.txt. + +Example: + +ethernet@26000 { + compatible = "sigma,smp8642-ethernet", "aurora,nb8800"; + reg = <0x26000 0x800>; + interrupts = <38>; + clocks = <&sys_clk>; + max-speed = <1000>; + phy-connection-type = "rgmii"; + phy-handle = <ð0_phy>; + #address-cells = <1>; + #size-cells = <0>; + + eth0_phy: ethernet-phy@1 { + compatible = "ethernet-phy-ieee802.3-c22"; + reg = <1>; + }; +};Signature · 1 line
2.6.2
--
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