cpsw.txt 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120
  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. - interrupt-parent : The parent interrupt controller
  14. - cpdma_channels : Specifies number of channels in CPDMA
  15. - ale_entries : Specifies No of entries ALE can hold
  16. - bd_ram_size : Specifies internal descriptor RAM size
  17. - mac_control : Specifies Default MAC control register content
  18. for the specific platform
  19. - slaves : Specifies number for slaves
  20. - active_slave : Specifies the slave to use for time stamping,
  21. ethtool and SIOCGMIIPHY
  22. - cpts_clock_mult : Numerator to convert input clock ticks into nanoseconds
  23. - cpts_clock_shift : Denominator to convert input clock ticks into nanoseconds
  24. Optional properties:
  25. - ti,hwmods : Must be "cpgmac0"
  26. - no_bd_ram : Must be 0 or 1
  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. Slave Properties:
  37. Required properties:
  38. - phy-mode : See ethernet.txt file in the same directory
  39. Optional properties:
  40. - dual_emac_res_vlan : Specifies VID to be used to segregate the ports
  41. - mac-address : See ethernet.txt file in the same directory
  42. - phy_id : Specifies slave phy id (deprecated, use phy-handle)
  43. - phy-handle : See ethernet.txt file in the same directory
  44. Slave sub-nodes:
  45. - fixed-link : See fixed-link.txt file in the same directory
  46. Note: Exactly one of phy_id, phy-handle, or fixed-link must be specified.
  47. Note: "ti,hwmods" field is used to fetch the base address and irq
  48. resources from TI, omap hwmod data base during device registration.
  49. Future plan is to migrate hwmod data base contents into device tree
  50. blob so that, all the required data will be used from device tree dts
  51. file.
  52. Examples:
  53. mac: ethernet@4A100000 {
  54. compatible = "ti,cpsw";
  55. reg = <0x4A100000 0x1000>;
  56. interrupts = <55 0x4>;
  57. interrupt-parent = <&intc>;
  58. cpdma_channels = <8>;
  59. ale_entries = <1024>;
  60. bd_ram_size = <0x2000>;
  61. no_bd_ram = <0>;
  62. rx_descs = <64>;
  63. mac_control = <0x20>;
  64. slaves = <2>;
  65. active_slave = <0>;
  66. cpts_clock_mult = <0x80000000>;
  67. cpts_clock_shift = <29>;
  68. syscon = <&cm>;
  69. cpsw_emac0: slave@0 {
  70. phy_id = <&davinci_mdio>, <0>;
  71. phy-mode = "rgmii-txid";
  72. /* Filled in by U-Boot */
  73. mac-address = [ 00 00 00 00 00 00 ];
  74. };
  75. cpsw_emac1: slave@1 {
  76. phy_id = <&davinci_mdio>, <1>;
  77. phy-mode = "rgmii-txid";
  78. /* Filled in by U-Boot */
  79. mac-address = [ 00 00 00 00 00 00 ];
  80. };
  81. };
  82. (or)
  83. mac: ethernet@4A100000 {
  84. compatible = "ti,cpsw";
  85. ti,hwmods = "cpgmac0";
  86. cpdma_channels = <8>;
  87. ale_entries = <1024>;
  88. bd_ram_size = <0x2000>;
  89. no_bd_ram = <0>;
  90. rx_descs = <64>;
  91. mac_control = <0x20>;
  92. slaves = <2>;
  93. active_slave = <0>;
  94. cpts_clock_mult = <0x80000000>;
  95. cpts_clock_shift = <29>;
  96. syscon = <&cm>;
  97. cpsw_emac0: slave@0 {
  98. phy_id = <&davinci_mdio>, <0>;
  99. phy-mode = "rgmii-txid";
  100. /* Filled in by U-Boot */
  101. mac-address = [ 00 00 00 00 00 00 ];
  102. };
  103. cpsw_emac1: slave@1 {
  104. phy_id = <&davinci_mdio>, <1>;
  105. phy-mode = "rgmii-txid";
  106. /* Filled in by U-Boot */
  107. mac-address = [ 00 00 00 00 00 00 ];
  108. };
  109. };