Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 68d5c265 authored by David S. Miller's avatar David S. Miller
Browse files

Merge branch 'Socionext-Synquacer-NETSEC-driver'



Jassi Brar says:

====================
Socionext Synquacer NETSEC driver

Changes since v5
	# Removed helper macros
	# Removed 'inline' qualifier
	# Changed multiline empty comment to single line
	# Added 'clock-names' property in DT binding example
	# Ignore 'clock-names' property in driver until f/ws in the wild are
	  upgraded or we support instance that take in more than one clock.
	# Rebased the patchset onto net-next

Changes since v4
        # Fixed ucode indexing as a word, instead of byte
        # Removed redundant clocks, keep only phy rate reference clock
          and expect it to be 'phy_ref_clk'

Changes since v3
        # Discard 'socionext,snq-mdio', and simply use 'mdio' subnode.
        # Use ioremap on ucode region as well, instead of memremap.

Changes since v2
        # Use 'mdio' subnode in DT bindings.
        # Use phy_interface_mode_is_rgmii(), instead of open coding the check.
        # Use readl/b with eeprom_base pointer.
        # Unregister mdio bus upon failure in probe.

Changes since v1
        # Switched from using memremap to ioremap
        # Implemented ndo_do_ioctl callback
        # Defined optional 'dma-coherent' DT property
====================

Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parents c215dae4 919e66a2
Loading
Loading
Loading
Loading
+53 −0
Original line number Diff line number Diff line
* Socionext NetSec Ethernet Controller IP

Required properties:
- compatible: Should be "socionext,synquacer-netsec"
- reg: Address and length of the control register area, followed by the
       address and length of the EEPROM holding the MAC address and
       microengine firmware
- interrupts: Should contain ethernet controller interrupt
- clocks: phandle to the PHY reference clock
- clock-names: Should be "phy_ref_clk"
- phy-mode: See ethernet.txt file in the same directory
- phy-handle: See ethernet.txt in the same directory.

- mdio device tree subnode: When the Netsec has a phy connected to its local
		mdio, there must be device tree subnode with the following
		required properties:

	- #address-cells: Must be <1>.
	- #size-cells: Must be <0>.

	For each phy on the mdio bus, there must be a node with the following
	fields:
	- compatible: Refer to phy.txt
	- reg: phy id used to communicate to phy.

Optional properties: (See ethernet.txt file in the same directory)
- dma-coherent: Boolean property, must only be present if memory
	accesses performed by the device are cache coherent.
- local-mac-address: See ethernet.txt in the same directory.
- mac-address: See ethernet.txt in the same directory.
- max-speed: See ethernet.txt in the same directory.
- max-frame-size: See ethernet.txt in the same directory.

Example:
	eth0: ethernet@522d0000 {
		compatible = "socionext,synquacer-netsec";
		reg = <0 0x522d0000 0x0 0x10000>, <0 0x10000000 0x0 0x10000>;
		interrupts = <GIC_SPI 176 IRQ_TYPE_LEVEL_HIGH>;
		clocks = <&clk_netsec>;
		clock-names = "phy_ref_clk";
		phy-mode = "rgmii";
		max-speed = <1000>;
		max-frame-size = <9000>;
		phy-handle = <&phy1>;

		mdio {
			#address-cells = <1>;
			#size-cells = <0>;
			phy1: ethernet-phy@1 {
				compatible = "ethernet-phy-ieee802.3-c22";
				reg = <1>;
			};
		};
+7 −0
Original line number Diff line number Diff line
@@ -12642,6 +12642,13 @@ F: drivers/md/raid*
F:	include/linux/raid/
F:	include/uapi/linux/raid/

SOCIONEXT (SNI) NETSEC NETWORK DRIVER
M:	Jassi Brar <jaswinder.singh@linaro.org>
L:	netdev@vger.kernel.org
S:	Maintained
F:	drivers/net/ethernet/socionext/netsec.c
F:	Documentation/devicetree/bindings/net/socionext-netsec.txt

SONIC NETWORK DRIVER
M:	Thomas Bogendoerfer <tsbogend@alpha.franken.de>
L:	netdev@vger.kernel.org
+12 −0
Original line number Diff line number Diff line
@@ -19,4 +19,16 @@ config SNI_AVE
	  Driver for gigabit ethernet MACs, called AVE, in the
	  Socionext UniPhier family.

config SNI_NETSEC
	tristate "Socionext NETSEC ethernet support"
	depends on (ARCH_SYNQUACER || COMPILE_TEST) && OF
	select PHYLIB
	select MII
	---help---
	  Enable to add support for the SocioNext NetSec Gigabit Ethernet
	  controller + PHY, as found on the Synquacer SC2A11 SoC

	  To compile this driver as a module, choose M here: the module will be
	  called netsec.  If unsure, say N.

endif #NET_VENDOR_SOCIONEXT
+1 −0
Original line number Diff line number Diff line
@@ -3,3 +3,4 @@
# Makefile for all ethernet ip drivers on Socionext platforms
#
obj-$(CONFIG_SNI_AVE) += sni_ave.o
obj-$(CONFIG_SNI_NETSEC) += netsec.o
+1775 −0

File added.

Preview size limit exceeded, changes collapsed.