cpsw.txt 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  1. TI SoC Ethernet Switch Controller Device Tree Bindings
  2. ------------------------------------------------------
  3. Required properties:
  4. - compatible : Should be "ti,cpsw"
  5. - reg : physical base address and size of the cpsw
  6. registers map
  7. - interrupts : property with a value describing the interrupt
  8. number
  9. - interrupt-parent : The parent interrupt controller
  10. - cpdma_channels : Specifies number of channels in CPDMA
  11. - ale_entries : Specifies No of entries ALE can hold
  12. - bd_ram_size : Specifies internal descriptor RAM size
  13. - rx_descs : Specifies number of Rx descriptors
  14. - mac_control : Specifies Default MAC control register content
  15. for the specific platform
  16. - slaves : Specifies number for slaves
  17. - active_slave : Specifies the slave to use for time stamping,
  18. ethtool and SIOCGMIIPHY
  19. - cpts_clock_mult : Numerator to convert input clock ticks into nanoseconds
  20. - cpts_clock_shift : Denominator to convert input clock ticks into nanoseconds
  21. Optional properties:
  22. - ti,hwmods : Must be "cpgmac0"
  23. - no_bd_ram : Must be 0 or 1
  24. - dual_emac : Specifies Switch to act as Dual EMAC
  25. Slave Properties:
  26. Required properties:
  27. - phy_id : Specifies slave phy id
  28. - phy-mode : The interface between the SoC and the PHY (a string
  29. that of_get_phy_mode() can understand)
  30. - mac-address : Specifies slave MAC address
  31. Optional properties:
  32. - dual_emac_res_vlan : Specifies VID to be used to segregate the ports
  33. Note: "ti,hwmods" field is used to fetch the base address and irq
  34. resources from TI, omap hwmod data base during device registration.
  35. Future plan is to migrate hwmod data base contents into device tree
  36. blob so that, all the required data will be used from device tree dts
  37. file.
  38. Examples:
  39. mac: ethernet@4A100000 {
  40. compatible = "ti,cpsw";
  41. reg = <0x4A100000 0x1000>;
  42. interrupts = <55 0x4>;
  43. interrupt-parent = <&intc>;
  44. cpdma_channels = <8>;
  45. ale_entries = <1024>;
  46. bd_ram_size = <0x2000>;
  47. no_bd_ram = <0>;
  48. rx_descs = <64>;
  49. mac_control = <0x20>;
  50. slaves = <2>;
  51. active_slave = <0>;
  52. cpts_clock_mult = <0x80000000>;
  53. cpts_clock_shift = <29>;
  54. cpsw_emac0: slave@0 {
  55. phy_id = <&davinci_mdio>, <0>;
  56. phy-mode = "rgmii-txid";
  57. /* Filled in by U-Boot */
  58. mac-address = [ 00 00 00 00 00 00 ];
  59. };
  60. cpsw_emac1: slave@1 {
  61. phy_id = <&davinci_mdio>, <1>;
  62. phy-mode = "rgmii-txid";
  63. /* Filled in by U-Boot */
  64. mac-address = [ 00 00 00 00 00 00 ];
  65. };
  66. };
  67. (or)
  68. mac: ethernet@4A100000 {
  69. compatible = "ti,cpsw";
  70. ti,hwmods = "cpgmac0";
  71. cpdma_channels = <8>;
  72. ale_entries = <1024>;
  73. bd_ram_size = <0x2000>;
  74. no_bd_ram = <0>;
  75. rx_descs = <64>;
  76. mac_control = <0x20>;
  77. slaves = <2>;
  78. active_slave = <0>;
  79. cpts_clock_mult = <0x80000000>;
  80. cpts_clock_shift = <29>;
  81. cpsw_emac0: slave@0 {
  82. phy_id = <&davinci_mdio>, <0>;
  83. phy-mode = "rgmii-txid";
  84. /* Filled in by U-Boot */
  85. mac-address = [ 00 00 00 00 00 00 ];
  86. };
  87. cpsw_emac1: slave@1 {
  88. phy_id = <&davinci_mdio>, <1>;
  89. phy-mode = "rgmii-txid";
  90. /* Filled in by U-Boot */
  91. mac-address = [ 00 00 00 00 00 00 ];
  92. };
  93. };