cpsw.txt 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121
  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. - rx_descs : Specifies number of Rx descriptors
  18. - mac_control : Specifies Default MAC control register content
  19. for the specific platform
  20. - slaves : Specifies number for slaves
  21. - active_slave : Specifies the slave to use for time stamping,
  22. ethtool and SIOCGMIIPHY
  23. - cpts_clock_mult : Numerator to convert input clock ticks into nanoseconds
  24. - cpts_clock_shift : Denominator to convert input clock ticks into nanoseconds
  25. Optional properties:
  26. - ti,hwmods : Must be "cpgmac0"
  27. - no_bd_ram : Must be 0 or 1
  28. - dual_emac : Specifies Switch to act as Dual EMAC
  29. - syscon : Phandle to the system control device node, which is
  30. the control module device of the am33x
  31. - mode-gpios : Should be added if one/multiple gpio lines are
  32. required to be driven so that cpsw data lines
  33. can be connected to the phy via selective mux.
  34. For example in dra72x-evm, pcf gpio has to be
  35. driven low so that cpsw slave 0 and phy data
  36. lines are connected via mux.
  37. Slave Properties:
  38. Required properties:
  39. - phy-mode : See ethernet.txt file in the same directory
  40. Optional properties:
  41. - dual_emac_res_vlan : Specifies VID to be used to segregate the ports
  42. - mac-address : See ethernet.txt file in the same directory
  43. - phy_id : Specifies slave phy id
  44. - phy-handle : See ethernet.txt file in the same directory
  45. Slave sub-nodes:
  46. - fixed-link : See fixed-link.txt file in the same directory
  47. Either the property phy_id, or the sub-node
  48. fixed-link can be specified
  49. Note: "ti,hwmods" field is used to fetch the base address and irq
  50. resources from TI, omap hwmod data base during device registration.
  51. Future plan is to migrate hwmod data base contents into device tree
  52. blob so that, all the required data will be used from device tree dts
  53. file.
  54. Examples:
  55. mac: ethernet@4A100000 {
  56. compatible = "ti,cpsw";
  57. reg = <0x4A100000 0x1000>;
  58. interrupts = <55 0x4>;
  59. interrupt-parent = <&intc>;
  60. cpdma_channels = <8>;
  61. ale_entries = <1024>;
  62. bd_ram_size = <0x2000>;
  63. no_bd_ram = <0>;
  64. rx_descs = <64>;
  65. mac_control = <0x20>;
  66. slaves = <2>;
  67. active_slave = <0>;
  68. cpts_clock_mult = <0x80000000>;
  69. cpts_clock_shift = <29>;
  70. syscon = <&cm>;
  71. cpsw_emac0: slave@0 {
  72. phy_id = <&davinci_mdio>, <0>;
  73. phy-mode = "rgmii-txid";
  74. /* Filled in by U-Boot */
  75. mac-address = [ 00 00 00 00 00 00 ];
  76. };
  77. cpsw_emac1: slave@1 {
  78. phy_id = <&davinci_mdio>, <1>;
  79. phy-mode = "rgmii-txid";
  80. /* Filled in by U-Boot */
  81. mac-address = [ 00 00 00 00 00 00 ];
  82. };
  83. };
  84. (or)
  85. mac: ethernet@4A100000 {
  86. compatible = "ti,cpsw";
  87. ti,hwmods = "cpgmac0";
  88. cpdma_channels = <8>;
  89. ale_entries = <1024>;
  90. bd_ram_size = <0x2000>;
  91. no_bd_ram = <0>;
  92. rx_descs = <64>;
  93. mac_control = <0x20>;
  94. slaves = <2>;
  95. active_slave = <0>;
  96. cpts_clock_mult = <0x80000000>;
  97. cpts_clock_shift = <29>;
  98. syscon = <&cm>;
  99. cpsw_emac0: slave@0 {
  100. phy_id = <&davinci_mdio>, <0>;
  101. phy-mode = "rgmii-txid";
  102. /* Filled in by U-Boot */
  103. mac-address = [ 00 00 00 00 00 00 ];
  104. };
  105. cpsw_emac1: slave@1 {
  106. phy_id = <&davinci_mdio>, <1>;
  107. phy-mode = "rgmii-txid";
  108. /* Filled in by U-Boot */
  109. mac-address = [ 00 00 00 00 00 00 ];
  110. };
  111. };