Documentation: dtb: Add port-id field for APM X-Gene ethernet
[firefly-linux-kernel-4.4.55.git] / Documentation / devicetree / bindings / net / apm-xgene-enet.txt
1 APM X-Gene SoC Ethernet nodes
2
3 Ethernet nodes are defined to describe on-chip ethernet interfaces in
4 APM X-Gene SoC.
5
6 Required properties for all the ethernet interfaces:
7 - compatible: Should state binding information from the following list,
8   - "apm,xgene-enet":    RGMII based 1G interface
9   - "apm,xgene1-sgenet": SGMII based 1G interface
10   - "apm,xgene1-xgenet": XFI based 10G interface
11 - reg: Address and length of the register set for the device. It contains the
12   information of registers in the same order as described by reg-names
13 - reg-names: Should contain the register set names
14   - "enet_csr": Ethernet control and status register address space
15   - "ring_csr": Descriptor ring control and status register address space
16   - "ring_cmd": Descriptor ring command register address space
17 - interrupts: Ethernet main interrupt
18 - port-id: Port number (0 or 1)
19 - clocks: Reference to the clock entry.
20 - local-mac-address: MAC address assigned to this device
21 - phy-connection-type: Interface type between ethernet device and PHY device
22
23 Required properties for ethernet interfaces that have external PHY:
24 - phy-handle: Reference to a PHY node connected to this device
25
26 - mdio: Device tree subnode with the following required properties:
27   - compatible: Must be "apm,xgene-mdio".
28   - #address-cells: Must be <1>.
29   - #size-cells: Must be <0>.
30
31   For the phy on the mdio bus, there must be a node with the following fields:
32   - compatible: PHY identifier.  Please refer ./phy.txt for the format.
33   - reg: The ID number for the phy.
34
35 Optional properties:
36 - status: Should be "ok" or "disabled" for enabled/disabled. Default is "ok".
37
38 Example:
39         menetclk: menetclk {
40                 compatible = "apm,xgene-device-clock";
41                 clock-output-names = "menetclk";
42                 status = "ok";
43         };
44
45         menet: ethernet@17020000 {
46                 compatible = "apm,xgene-enet";
47                 status = "disabled";
48                 reg = <0x0 0x17020000 0x0 0xd100>,
49                       <0x0 0X17030000 0x0 0X400>,
50                       <0x0 0X10000000 0x0 0X200>;
51                 reg-names = "enet_csr", "ring_csr", "ring_cmd";
52                 interrupts = <0x0 0x3c 0x4>;
53                 port-id = <0>;
54                 clocks = <&menetclk 0>;
55                 local-mac-address = [00 01 73 00 00 01];
56                 phy-connection-type = "rgmii";
57                 phy-handle = <&menetphy>;
58                 mdio {
59                         compatible = "apm,xgene-mdio";
60                         #address-cells = <1>;
61                         #size-cells = <0>;
62                         menetphy: menetphy@3 {
63                                 compatible = "ethernet-phy-id001c.c915";
64                                 reg = <0x3>;
65                         };
66
67                 };
68         };
69
70 /* Board-specific peripheral configurations */
71 &menet {
72         status = "ok";
73 };