cpsw.txt 2.8 KB

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