cpsw.txt 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124
  1. TI SoC Ethernet Switch Controller Device Tree Bindings
  2. ------------------------------------------------------
  3. Required properties:
  4. - compatible : Should be one of the below:-
  5. "ti,cpsw" for backward compatible
  6. "ti,am335x-cpsw" for AM335x controllers
  7. "ti,am4372-cpsw" for AM437x controllers
  8. "ti,dra7-cpsw" for DRA7x controllers
  9. - reg : physical base address and size of the cpsw
  10. registers map
  11. - interrupts : property with a value describing the interrupt
  12. number
  13. - cpdma_channels : Specifies number of channels in CPDMA
  14. - ale_entries : Specifies No of entries ALE can hold
  15. - bd_ram_size : Specifies internal descriptor RAM size
  16. - mac_control : Specifies Default MAC control register content
  17. for the specific platform
  18. - slaves : Specifies number for slaves
  19. - active_slave : Specifies the slave to use for time stamping,
  20. ethtool and SIOCGMIIPHY
  21. - cpsw-phy-sel : Specifies the phandle to the CPSW phy mode selection
  22. device. See also cpsw-phy-sel.txt for it's binding.
  23. Note that in legacy cases cpsw-phy-sel may be
  24. a child device instead of a phandle.
  25. Optional properties:
  26. - ti,hwmods : Must be "cpgmac0"
  27. - dual_emac : Specifies Switch to act as Dual EMAC
  28. - syscon : Phandle to the system control device node, which is
  29. the control module device of the am33x
  30. - mode-gpios : Should be added if one/multiple gpio lines are
  31. required to be driven so that cpsw data lines
  32. can be connected to the phy via selective mux.
  33. For example in dra72x-evm, pcf gpio has to be
  34. driven low so that cpsw slave 0 and phy data
  35. lines are connected via mux.
  36. - cpts_clock_mult : Numerator to convert input clock ticks into nanoseconds
  37. - cpts_clock_shift : Denominator to convert input clock ticks into nanoseconds
  38. Mult and shift will be calculated basing on CPTS
  39. rftclk frequency if both cpts_clock_shift and
  40. cpts_clock_mult properties are not provided.
  41. Slave Properties:
  42. Required properties:
  43. - phy-mode : See ethernet.txt file in the same directory
  44. Optional properties:
  45. - dual_emac_res_vlan : Specifies VID to be used to segregate the ports
  46. - mac-address : See ethernet.txt file in the same directory
  47. - phy_id : Specifies slave phy id (deprecated, use phy-handle)
  48. - phy-handle : See ethernet.txt file in the same directory
  49. Slave sub-nodes:
  50. - fixed-link : See fixed-link.txt file in the same directory
  51. Note: Exactly one of phy_id, phy-handle, or fixed-link must be specified.
  52. Note: "ti,hwmods" field is used to fetch the base address and irq
  53. resources from TI, omap hwmod data base during device registration.
  54. Future plan is to migrate hwmod data base contents into device tree
  55. blob so that, all the required data will be used from device tree dts
  56. file.
  57. Examples:
  58. mac: ethernet@4a100000 {
  59. compatible = "ti,cpsw";
  60. reg = <0x4A100000 0x1000>;
  61. interrupts = <55 0x4>;
  62. interrupt-parent = <&intc>;
  63. cpdma_channels = <8>;
  64. ale_entries = <1024>;
  65. bd_ram_size = <0x2000>;
  66. rx_descs = <64>;
  67. mac_control = <0x20>;
  68. slaves = <2>;
  69. active_slave = <0>;
  70. cpts_clock_mult = <0x80000000>;
  71. cpts_clock_shift = <29>;
  72. syscon = <&cm>;
  73. cpsw-phy-sel = <&phy_sel>;
  74. cpsw_emac0: slave@0 {
  75. phy_id = <&davinci_mdio>, <0>;
  76. phy-mode = "rgmii-txid";
  77. /* Filled in by U-Boot */
  78. mac-address = [ 00 00 00 00 00 00 ];
  79. };
  80. cpsw_emac1: slave@1 {
  81. phy_id = <&davinci_mdio>, <1>;
  82. phy-mode = "rgmii-txid";
  83. /* Filled in by U-Boot */
  84. mac-address = [ 00 00 00 00 00 00 ];
  85. };
  86. };
  87. (or)
  88. mac: ethernet@4a100000 {
  89. compatible = "ti,cpsw";
  90. ti,hwmods = "cpgmac0";
  91. cpdma_channels = <8>;
  92. ale_entries = <1024>;
  93. bd_ram_size = <0x2000>;
  94. rx_descs = <64>;
  95. mac_control = <0x20>;
  96. slaves = <2>;
  97. active_slave = <0>;
  98. cpts_clock_mult = <0x80000000>;
  99. cpts_clock_shift = <29>;
  100. syscon = <&cm>;
  101. cpsw-phy-sel = <&phy_sel>;
  102. cpsw_emac0: slave@0 {
  103. phy_id = <&davinci_mdio>, <0>;
  104. phy-mode = "rgmii-txid";
  105. /* Filled in by U-Boot */
  106. mac-address = [ 00 00 00 00 00 00 ];
  107. };
  108. cpsw_emac1: slave@1 {
  109. phy_id = <&davinci_mdio>, <1>;
  110. phy-mode = "rgmii-txid";
  111. /* Filled in by U-Boot */
  112. mac-address = [ 00 00 00 00 00 00 ];
  113. };
  114. };