Skip to content

Commit 68d5c26

Browse files
committed
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: David S. Miller <[email protected]>
2 parents c215dae + 919e66a commit 68d5c26

File tree

5 files changed

+1848
-0
lines changed

5 files changed

+1848
-0
lines changed
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
* Socionext NetSec Ethernet Controller IP
2+
3+
Required properties:
4+
- compatible: Should be "socionext,synquacer-netsec"
5+
- reg: Address and length of the control register area, followed by the
6+
address and length of the EEPROM holding the MAC address and
7+
microengine firmware
8+
- interrupts: Should contain ethernet controller interrupt
9+
- clocks: phandle to the PHY reference clock
10+
- clock-names: Should be "phy_ref_clk"
11+
- phy-mode: See ethernet.txt file in the same directory
12+
- phy-handle: See ethernet.txt in the same directory.
13+
14+
- mdio device tree subnode: When the Netsec has a phy connected to its local
15+
mdio, there must be device tree subnode with the following
16+
required properties:
17+
18+
- #address-cells: Must be <1>.
19+
- #size-cells: Must be <0>.
20+
21+
For each phy on the mdio bus, there must be a node with the following
22+
fields:
23+
- compatible: Refer to phy.txt
24+
- reg: phy id used to communicate to phy.
25+
26+
Optional properties: (See ethernet.txt file in the same directory)
27+
- dma-coherent: Boolean property, must only be present if memory
28+
accesses performed by the device are cache coherent.
29+
- local-mac-address: See ethernet.txt in the same directory.
30+
- mac-address: See ethernet.txt in the same directory.
31+
- max-speed: See ethernet.txt in the same directory.
32+
- max-frame-size: See ethernet.txt in the same directory.
33+
34+
Example:
35+
eth0: ethernet@522d0000 {
36+
compatible = "socionext,synquacer-netsec";
37+
reg = <0 0x522d0000 0x0 0x10000>, <0 0x10000000 0x0 0x10000>;
38+
interrupts = <GIC_SPI 176 IRQ_TYPE_LEVEL_HIGH>;
39+
clocks = <&clk_netsec>;
40+
clock-names = "phy_ref_clk";
41+
phy-mode = "rgmii";
42+
max-speed = <1000>;
43+
max-frame-size = <9000>;
44+
phy-handle = <&phy1>;
45+
46+
mdio {
47+
#address-cells = <1>;
48+
#size-cells = <0>;
49+
phy1: ethernet-phy@1 {
50+
compatible = "ethernet-phy-ieee802.3-c22";
51+
reg = <1>;
52+
};
53+
};

MAINTAINERS

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12642,6 +12642,13 @@ F: drivers/md/raid*
1264212642
F: include/linux/raid/
1264312643
F: include/uapi/linux/raid/
1264412644

12645+
SOCIONEXT (SNI) NETSEC NETWORK DRIVER
12646+
M: Jassi Brar <[email protected]>
12647+
12648+
S: Maintained
12649+
F: drivers/net/ethernet/socionext/netsec.c
12650+
F: Documentation/devicetree/bindings/net/socionext-netsec.txt
12651+
1264512652
SONIC NETWORK DRIVER
1264612653
M: Thomas Bogendoerfer <[email protected]>
1264712654

drivers/net/ethernet/socionext/Kconfig

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,16 @@ config SNI_AVE
1919
Driver for gigabit ethernet MACs, called AVE, in the
2020
Socionext UniPhier family.
2121

22+
config SNI_NETSEC
23+
tristate "Socionext NETSEC ethernet support"
24+
depends on (ARCH_SYNQUACER || COMPILE_TEST) && OF
25+
select PHYLIB
26+
select MII
27+
---help---
28+
Enable to add support for the SocioNext NetSec Gigabit Ethernet
29+
controller + PHY, as found on the Synquacer SC2A11 SoC
30+
31+
To compile this driver as a module, choose M here: the module will be
32+
called netsec. If unsure, say N.
33+
2234
endif #NET_VENDOR_SOCIONEXT

drivers/net/ethernet/socionext/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,4 @@
33
# Makefile for all ethernet ip drivers on Socionext platforms
44
#
55
obj-$(CONFIG_SNI_AVE) += sni_ave.o
6+
obj-$(CONFIG_SNI_NETSEC) += netsec.o

0 commit comments

Comments
 (0)