cpsw.txt 2.7 KB

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