apm-xgene-enet.txt 3.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. APM X-Gene SoC Ethernet nodes
  2. Ethernet nodes are defined to describe on-chip ethernet interfaces in
  3. APM X-Gene SoC.
  4. Required properties for all the ethernet interfaces:
  5. - compatible: Should state binding information from the following list,
  6. - "apm,xgene-enet": RGMII based 1G interface
  7. - "apm,xgene1-sgenet": SGMII based 1G interface
  8. - "apm,xgene1-xgenet": XFI based 10G interface
  9. - reg: Address and length of the register set for the device. It contains the
  10. information of registers in the same order as described by reg-names
  11. - reg-names: Should contain the register set names
  12. - "enet_csr": Ethernet control and status register address space
  13. - "ring_csr": Descriptor ring control and status register address space
  14. - "ring_cmd": Descriptor ring command register address space
  15. - interrupts: Two interrupt specifiers can be specified.
  16. - First is the Rx interrupt. This irq is mandatory.
  17. - Second is the Tx completion interrupt.
  18. This is supported only on SGMII based 1GbE and 10GbE interfaces.
  19. - channel: Ethernet to CPU, start channel (prefetch buffer) number
  20. - Must map to the first irq and irqs must be sequential
  21. - port-id: Port number (0 or 1)
  22. - clocks: Reference to the clock entry.
  23. - local-mac-address: MAC address assigned to this device
  24. - phy-connection-type: Interface type between ethernet device and PHY device
  25. Required properties for ethernet interfaces that have external PHY:
  26. - phy-handle: Reference to a PHY node connected to this device
  27. - mdio: Device tree subnode with the following required properties:
  28. - compatible: Must be "apm,xgene-mdio".
  29. - #address-cells: Must be <1>.
  30. - #size-cells: Must be <0>.
  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. Optional properties:
  35. - status: Should be "ok" or "disabled" for enabled/disabled. Default is "ok".
  36. - tx-delay: Delay value for RGMII bridge TX clock.
  37. Valid values are between 0 to 7, that maps to
  38. 417, 717, 1020, 1321, 1611, 1913, 2215, 2514 ps
  39. Default value is 4, which corresponds to 1611 ps
  40. - rx-delay: Delay value for RGMII bridge RX clock.
  41. Valid values are between 0 to 7, that maps to
  42. 273, 589, 899, 1222, 1480, 1806, 2147, 2464 ps
  43. Default value is 2, which corresponds to 899 ps
  44. - rxlos-gpios: Input gpio from SFP+ module to indicate availability of
  45. incoming signal.
  46. Example:
  47. menetclk: menetclk {
  48. compatible = "apm,xgene-device-clock";
  49. clock-output-names = "menetclk";
  50. status = "ok";
  51. };
  52. menet: ethernet@17020000 {
  53. compatible = "apm,xgene-enet";
  54. status = "disabled";
  55. reg = <0x0 0x17020000 0x0 0xd100>,
  56. <0x0 0x17030000 0x0 0x400>,
  57. <0x0 0x10000000 0x0 0x200>;
  58. reg-names = "enet_csr", "ring_csr", "ring_cmd";
  59. interrupts = <0x0 0x3c 0x4>;
  60. port-id = <0>;
  61. clocks = <&menetclk 0>;
  62. local-mac-address = [00 01 73 00 00 01];
  63. phy-connection-type = "rgmii";
  64. phy-handle = <&menetphy>;
  65. mdio {
  66. compatible = "apm,xgene-mdio";
  67. #address-cells = <1>;
  68. #size-cells = <0>;
  69. menetphy: menetphy@3 {
  70. compatible = "ethernet-phy-id001c.c915";
  71. reg = <0x3>;
  72. };
  73. };
  74. };
  75. /* Board-specific peripheral configurations */
  76. &menet {
  77. tx-delay = <4>;
  78. rx-delay = <2>;
  79. status = "ok";
  80. };