apm-xgene-enet.txt 3.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  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. - port-id: Port number (0 or 1)
  20. - clocks: Reference to the clock entry.
  21. - local-mac-address: MAC address assigned to this device
  22. - phy-connection-type: Interface type between ethernet device and PHY device
  23. Required properties for ethernet interfaces that have external PHY:
  24. - phy-handle: Reference to a PHY node connected to this device
  25. - mdio: Device tree subnode with the following required properties:
  26. - compatible: Must be "apm,xgene-mdio".
  27. - #address-cells: Must be <1>.
  28. - #size-cells: Must be <0>.
  29. For the phy on the mdio bus, there must be a node with the following fields:
  30. - compatible: PHY identifier. Please refer ./phy.txt for the format.
  31. - reg: The ID number for the phy.
  32. Optional properties:
  33. - status: Should be "ok" or "disabled" for enabled/disabled. Default is "ok".
  34. - tx-delay: Delay value for RGMII bridge TX clock.
  35. Valid values are between 0 to 7, that maps to
  36. 417, 717, 1020, 1321, 1611, 1913, 2215, 2514 ps
  37. Default value is 4, which corresponds to 1611 ps
  38. - rx-delay: Delay value for RGMII bridge RX clock.
  39. Valid values are between 0 to 7, that maps to
  40. 273, 589, 899, 1222, 1480, 1806, 2147, 2464 ps
  41. Default value is 2, which corresponds to 899 ps
  42. Example:
  43. menetclk: menetclk {
  44. compatible = "apm,xgene-device-clock";
  45. clock-output-names = "menetclk";
  46. status = "ok";
  47. };
  48. menet: ethernet@17020000 {
  49. compatible = "apm,xgene-enet";
  50. status = "disabled";
  51. reg = <0x0 0x17020000 0x0 0xd100>,
  52. <0x0 0X17030000 0x0 0X400>,
  53. <0x0 0X10000000 0x0 0X200>;
  54. reg-names = "enet_csr", "ring_csr", "ring_cmd";
  55. interrupts = <0x0 0x3c 0x4>;
  56. port-id = <0>;
  57. clocks = <&menetclk 0>;
  58. local-mac-address = [00 01 73 00 00 01];
  59. phy-connection-type = "rgmii";
  60. phy-handle = <&menetphy>;
  61. mdio {
  62. compatible = "apm,xgene-mdio";
  63. #address-cells = <1>;
  64. #size-cells = <0>;
  65. menetphy: menetphy@3 {
  66. compatible = "ethernet-phy-id001c.c915";
  67. reg = <0x3>;
  68. };
  69. };
  70. };
  71. /* Board-specific peripheral configurations */
  72. &menet {
  73. tx-delay = <4>;
  74. rx-delay = <2>;
  75. status = "ok";
  76. };