cpsw.txt 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104
  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. - syscon : Phandle to the system control device node, which is
  26. the control module device of the am33x
  27. Slave Properties:
  28. Required properties:
  29. - phy_id : Specifies slave phy id
  30. - phy-mode : See ethernet.txt file in the same directory
  31. Optional properties:
  32. - dual_emac_res_vlan : Specifies VID to be used to segregate the ports
  33. - mac-address : See ethernet.txt file in the same directory
  34. Note: "ti,hwmods" field is used to fetch the base address and irq
  35. resources from TI, omap hwmod data base during device registration.
  36. Future plan is to migrate hwmod data base contents into device tree
  37. blob so that, all the required data will be used from device tree dts
  38. file.
  39. Examples:
  40. mac: ethernet@4A100000 {
  41. compatible = "ti,cpsw";
  42. reg = <0x4A100000 0x1000>;
  43. interrupts = <55 0x4>;
  44. interrupt-parent = <&intc>;
  45. cpdma_channels = <8>;
  46. ale_entries = <1024>;
  47. bd_ram_size = <0x2000>;
  48. no_bd_ram = <0>;
  49. rx_descs = <64>;
  50. mac_control = <0x20>;
  51. slaves = <2>;
  52. active_slave = <0>;
  53. cpts_clock_mult = <0x80000000>;
  54. cpts_clock_shift = <29>;
  55. syscon = <&cm>;
  56. cpsw_emac0: slave@0 {
  57. phy_id = <&davinci_mdio>, <0>;
  58. phy-mode = "rgmii-txid";
  59. /* Filled in by U-Boot */
  60. mac-address = [ 00 00 00 00 00 00 ];
  61. };
  62. cpsw_emac1: slave@1 {
  63. phy_id = <&davinci_mdio>, <1>;
  64. phy-mode = "rgmii-txid";
  65. /* Filled in by U-Boot */
  66. mac-address = [ 00 00 00 00 00 00 ];
  67. };
  68. };
  69. (or)
  70. mac: ethernet@4A100000 {
  71. compatible = "ti,cpsw";
  72. ti,hwmods = "cpgmac0";
  73. cpdma_channels = <8>;
  74. ale_entries = <1024>;
  75. bd_ram_size = <0x2000>;
  76. no_bd_ram = <0>;
  77. rx_descs = <64>;
  78. mac_control = <0x20>;
  79. slaves = <2>;
  80. active_slave = <0>;
  81. cpts_clock_mult = <0x80000000>;
  82. cpts_clock_shift = <29>;
  83. syscon = <&cm>;
  84. cpsw_emac0: slave@0 {
  85. phy_id = <&davinci_mdio>, <0>;
  86. phy-mode = "rgmii-txid";
  87. /* Filled in by U-Boot */
  88. mac-address = [ 00 00 00 00 00 00 ];
  89. };
  90. cpsw_emac1: slave@1 {
  91. phy_id = <&davinci_mdio>, <1>;
  92. phy-mode = "rgmii-txid";
  93. /* Filled in by U-Boot */
  94. mac-address = [ 00 00 00 00 00 00 ];
  95. };
  96. };