xref: /OK3568_Linux_fs/kernel/Documentation/devicetree/bindings/net/hisilicon-hns-nic.txt (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593SmuzhiyunHisilicon Network Subsystem NIC controller
2*4882a593Smuzhiyun
3*4882a593SmuzhiyunRequired properties:
4*4882a593Smuzhiyun- compatible: "hisilicon,hns-nic-v1" or "hisilicon,hns-nic-v2".
5*4882a593Smuzhiyun  "hisilicon,hns-nic-v1" is for hip05.
6*4882a593Smuzhiyun  "hisilicon,hns-nic-v2" is for Hi1610 and Hi1612.
7*4882a593Smuzhiyun- ae-handle: accelerator engine handle for hns,
8*4882a593Smuzhiyun  specifies a reference to the associating hardware driver node.
9*4882a593Smuzhiyun  see Documentation/devicetree/bindings/net/hisilicon-hns-dsaf.txt
10*4882a593Smuzhiyun- port-id: is the index of port provided by DSAF (the accelerator). DSAF can
11*4882a593Smuzhiyun  connect to 8 PHYs. Port 0 to 1 are both used for administration purpose. They
12*4882a593Smuzhiyun  are called debug ports.
13*4882a593Smuzhiyun
14*4882a593Smuzhiyun  The remaining 6 PHYs are taken according to the mode of DSAF.
15*4882a593Smuzhiyun
16*4882a593Smuzhiyun  In NIC mode of DSAF, all 6 PHYs are taken as ethernet ports to the CPU. The
17*4882a593Smuzhiyun  port-id can be 2 to 7. Here is the diagram:
18*4882a593Smuzhiyun            +-----+---------------+
19*4882a593Smuzhiyun            |            CPU      |
20*4882a593Smuzhiyun            +-+-+-+---+-+-+-+-+-+-+
21*4882a593Smuzhiyun              | |     | | | | | |
22*4882a593Smuzhiyun             debug       service
23*4882a593Smuzhiyun             port         port
24*4882a593Smuzhiyun             (0,1)       (2-7)
25*4882a593Smuzhiyun
26*4882a593Smuzhiyun  In Switch mode of DSAF, all 6 PHYs are taken as physical ports connect to a
27*4882a593Smuzhiyun  LAN Switch while the CPU side assume itself have one single NIC connect to
28*4882a593Smuzhiyun  this switch. In this case, the port-id will be 2 only.
29*4882a593Smuzhiyun            +-----+---------------+
30*4882a593Smuzhiyun            |            CPU      |
31*4882a593Smuzhiyun            +-+-+-+---+-+-+-+-+-+-+
32*4882a593Smuzhiyun              | |   service| port(2)
33*4882a593Smuzhiyun             debug   +------------+
34*4882a593Smuzhiyun             port    |   switch   |
35*4882a593Smuzhiyun             (0,1)   +-+-+-+-+-+-++
36*4882a593Smuzhiyun                       | | | | | |
37*4882a593Smuzhiyun                      external port
38*4882a593Smuzhiyun
39*4882a593Smuzhiyun  This attribute is remained for compatible purpose. It is not recommended to
40*4882a593Smuzhiyun  use it in new code.
41*4882a593Smuzhiyun
42*4882a593Smuzhiyun- port-idx-in-ae: is the index of port provided by AE.
43*4882a593Smuzhiyun  In NIC mode of DSAF, all 6 PHYs of service DSAF are taken as ethernet ports
44*4882a593Smuzhiyun  to the CPU. The port-idx-in-ae can be 0 to 5. Here is the diagram:
45*4882a593Smuzhiyun            +-----+---------------+
46*4882a593Smuzhiyun            |            CPU      |
47*4882a593Smuzhiyun            +-+-+-+---+-+-+-+-+-+-+
48*4882a593Smuzhiyun              |    |   | | | | | |
49*4882a593Smuzhiyun           debug debug   service
50*4882a593Smuzhiyun           port  port     port
51*4882a593Smuzhiyun           (0)   (0)     (0-5)
52*4882a593Smuzhiyun
53*4882a593Smuzhiyun  In Switch mode of DSAF, all 6 PHYs of service DSAF are taken as physical
54*4882a593Smuzhiyun  ports connected to a LAN Switch while the CPU side assume itself have one
55*4882a593Smuzhiyun  single NIC connected to this switch. In this case, the port-idx-in-ae
56*4882a593Smuzhiyun  will be 0 only.
57*4882a593Smuzhiyun            +-----+-----+------+------+
58*4882a593Smuzhiyun            |                CPU      |
59*4882a593Smuzhiyun            +-+-+-+-+-+-+-+-+-+-+-+-+-+
60*4882a593Smuzhiyun              |    |     service| port(0)
61*4882a593Smuzhiyun            debug debug  +------------+
62*4882a593Smuzhiyun            port  port   |   switch   |
63*4882a593Smuzhiyun            (0)   (0)    +-+-+-+-+-+-++
64*4882a593Smuzhiyun                          | | | | | |
65*4882a593Smuzhiyun                         external port
66*4882a593Smuzhiyun
67*4882a593Smuzhiyun- local-mac-address: mac addr of the ethernet interface
68*4882a593Smuzhiyun
69*4882a593SmuzhiyunExample:
70*4882a593Smuzhiyun
71*4882a593Smuzhiyun	ethernet@0{
72*4882a593Smuzhiyun		compatible = "hisilicon,hns-nic-v1";
73*4882a593Smuzhiyun		ae-handle = <&dsaf0>;
74*4882a593Smuzhiyun		port-idx-in-ae = <0>;
75*4882a593Smuzhiyun		local-mac-address = [a2 14 e4 4b 56 76];
76*4882a593Smuzhiyun	};
77