Mugunthan V N | 2eb32b0 | 2012-07-30 10:17:14 +0000 | [diff] [blame] | 1 | TI SoC Ethernet Switch Controller Device Tree Bindings |
| 2 | ------------------------------------------------------ |
| 3 | |
| 4 | Required properties: |
| 5 | - compatible : Should be "ti,cpsw" |
| 6 | - reg : physical base address and size of the cpsw |
| 7 | registers map |
| 8 | - interrupts : property with a value describing the interrupt |
| 9 | number |
| 10 | - interrupt-parent : The parent interrupt controller |
| 11 | - cpdma_channels : Specifies number of channels in CPDMA |
| 12 | - host_port_no : Specifies host port shift |
| 13 | - cpdma_reg_ofs : Specifies CPDMA submodule register offset |
Mugunthan V N | e07b94f | 2012-08-06 05:05:58 +0000 | [diff] [blame] | 14 | - cpdma_sram_ofs : Specifies CPDMA SRAM offset |
Mugunthan V N | 2eb32b0 | 2012-07-30 10:17:14 +0000 | [diff] [blame] | 15 | - ale_reg_ofs : Specifies ALE submodule register offset |
| 16 | - ale_entries : Specifies No of entries ALE can hold |
| 17 | - host_port_reg_ofs : Specifies host port register offset |
| 18 | - hw_stats_reg_ofs : Specifies hardware statistics register offset |
Richard Cochran | 6b60393 | 2012-10-29 08:45:17 +0000 | [diff] [blame] | 19 | - cpts_reg_ofs : Specifies the offset of the CPTS registers |
Mugunthan V N | 2eb32b0 | 2012-07-30 10:17:14 +0000 | [diff] [blame] | 20 | - bd_ram_ofs : Specifies internal desciptor RAM offset |
| 21 | - bd_ram_size : Specifies internal descriptor RAM size |
| 22 | - rx_descs : Specifies number of Rx descriptors |
| 23 | - mac_control : Specifies Default MAC control register content |
| 24 | for the specific platform |
| 25 | - slaves : Specifies number for slaves |
Richard Cochran | 78ca0b2 | 2012-10-29 08:45:18 +0000 | [diff] [blame] | 26 | - cpts_active_slave : Specifies the slave to use for time stamping |
Richard Cochran | 00ab94e | 2012-10-29 08:45:19 +0000 | [diff] [blame^] | 27 | - cpts_clock_mult : Numerator to convert input clock ticks into nanoseconds |
| 28 | - cpts_clock_shift : Denominator to convert input clock ticks into nanoseconds |
Mugunthan V N | 2eb32b0 | 2012-07-30 10:17:14 +0000 | [diff] [blame] | 29 | - slave_reg_ofs : Specifies slave register offset |
| 30 | - sliver_reg_ofs : Specifies slave sliver register offset |
| 31 | - phy_id : Specifies slave phy id |
| 32 | - mac-address : Specifies slave MAC address |
| 33 | |
| 34 | Optional properties: |
| 35 | - ti,hwmods : Must be "cpgmac0" |
| 36 | - no_bd_ram : Must be 0 or 1 |
| 37 | |
| 38 | Note: "ti,hwmods" field is used to fetch the base address and irq |
| 39 | resources from TI, omap hwmod data base during device registration. |
| 40 | Future plan is to migrate hwmod data base contents into device tree |
| 41 | blob so that, all the required data will be used from device tree dts |
| 42 | file. |
| 43 | |
| 44 | Examples: |
| 45 | |
| 46 | mac: ethernet@4A100000 { |
| 47 | compatible = "ti,cpsw"; |
| 48 | reg = <0x4A100000 0x1000>; |
| 49 | interrupts = <55 0x4>; |
| 50 | interrupt-parent = <&intc>; |
Mugunthan V N | e07b94f | 2012-08-06 05:05:58 +0000 | [diff] [blame] | 51 | cpdma_channels = <8>; |
| 52 | host_port_no = <0>; |
| 53 | cpdma_reg_ofs = <0x800>; |
| 54 | cpdma_sram_ofs = <0xa00>; |
| 55 | ale_reg_ofs = <0xd00>; |
| 56 | ale_entries = <1024>; |
| 57 | host_port_reg_ofs = <0x108>; |
| 58 | hw_stats_reg_ofs = <0x900>; |
Richard Cochran | 6b60393 | 2012-10-29 08:45:17 +0000 | [diff] [blame] | 59 | cpts_reg_ofs = <0xc00>; |
Mugunthan V N | e07b94f | 2012-08-06 05:05:58 +0000 | [diff] [blame] | 60 | bd_ram_ofs = <0x2000>; |
| 61 | bd_ram_size = <0x2000>; |
| 62 | no_bd_ram = <0>; |
| 63 | rx_descs = <64>; |
| 64 | mac_control = <0x20>; |
| 65 | slaves = <2>; |
Richard Cochran | 78ca0b2 | 2012-10-29 08:45:18 +0000 | [diff] [blame] | 66 | cpts_active_slave = <0>; |
Richard Cochran | 00ab94e | 2012-10-29 08:45:19 +0000 | [diff] [blame^] | 67 | cpts_clock_mult = <0x80000000>; |
| 68 | cpts_clock_shift = <29>; |
Mugunthan V N | e07b94f | 2012-08-06 05:05:58 +0000 | [diff] [blame] | 69 | cpsw_emac0: slave@0 { |
Richard Cochran | 9750a3a | 2012-10-29 08:45:15 +0000 | [diff] [blame] | 70 | slave_reg_ofs = <0x200>; |
Mugunthan V N | e07b94f | 2012-08-06 05:05:58 +0000 | [diff] [blame] | 71 | sliver_reg_ofs = <0xd80>; |
| 72 | phy_id = "davinci_mdio.16:00"; |
| 73 | /* Filled in by U-Boot */ |
| 74 | mac-address = [ 00 00 00 00 00 00 ]; |
Mugunthan V N | 2eb32b0 | 2012-07-30 10:17:14 +0000 | [diff] [blame] | 75 | }; |
Mugunthan V N | e07b94f | 2012-08-06 05:05:58 +0000 | [diff] [blame] | 76 | cpsw_emac1: slave@1 { |
Richard Cochran | 9750a3a | 2012-10-29 08:45:15 +0000 | [diff] [blame] | 77 | slave_reg_ofs = <0x300>; |
Mugunthan V N | e07b94f | 2012-08-06 05:05:58 +0000 | [diff] [blame] | 78 | sliver_reg_ofs = <0xdc0>; |
| 79 | phy_id = "davinci_mdio.16:01"; |
| 80 | /* Filled in by U-Boot */ |
| 81 | mac-address = [ 00 00 00 00 00 00 ]; |
Mugunthan V N | 2eb32b0 | 2012-07-30 10:17:14 +0000 | [diff] [blame] | 82 | }; |
| 83 | }; |
| 84 | |
| 85 | (or) |
Mugunthan V N | 2eb32b0 | 2012-07-30 10:17:14 +0000 | [diff] [blame] | 86 | mac: ethernet@4A100000 { |
| 87 | compatible = "ti,cpsw"; |
| 88 | ti,hwmods = "cpgmac0"; |
Mugunthan V N | e07b94f | 2012-08-06 05:05:58 +0000 | [diff] [blame] | 89 | cpdma_channels = <8>; |
| 90 | host_port_no = <0>; |
| 91 | cpdma_reg_ofs = <0x800>; |
| 92 | cpdma_sram_ofs = <0xa00>; |
| 93 | ale_reg_ofs = <0xd00>; |
| 94 | ale_entries = <1024>; |
| 95 | host_port_reg_ofs = <0x108>; |
| 96 | hw_stats_reg_ofs = <0x900>; |
Richard Cochran | 6b60393 | 2012-10-29 08:45:17 +0000 | [diff] [blame] | 97 | cpts_reg_ofs = <0xc00>; |
Mugunthan V N | e07b94f | 2012-08-06 05:05:58 +0000 | [diff] [blame] | 98 | bd_ram_ofs = <0x2000>; |
| 99 | bd_ram_size = <0x2000>; |
| 100 | no_bd_ram = <0>; |
| 101 | rx_descs = <64>; |
| 102 | mac_control = <0x20>; |
| 103 | slaves = <2>; |
Richard Cochran | 78ca0b2 | 2012-10-29 08:45:18 +0000 | [diff] [blame] | 104 | cpts_active_slave = <0>; |
Richard Cochran | 00ab94e | 2012-10-29 08:45:19 +0000 | [diff] [blame^] | 105 | cpts_clock_mult = <0x80000000>; |
| 106 | cpts_clock_shift = <29>; |
Mugunthan V N | e07b94f | 2012-08-06 05:05:58 +0000 | [diff] [blame] | 107 | cpsw_emac0: slave@0 { |
Richard Cochran | 9750a3a | 2012-10-29 08:45:15 +0000 | [diff] [blame] | 108 | slave_reg_ofs = <0x200>; |
Mugunthan V N | e07b94f | 2012-08-06 05:05:58 +0000 | [diff] [blame] | 109 | sliver_reg_ofs = <0xd80>; |
| 110 | phy_id = "davinci_mdio.16:00"; |
| 111 | /* Filled in by U-Boot */ |
| 112 | mac-address = [ 00 00 00 00 00 00 ]; |
Mugunthan V N | 2eb32b0 | 2012-07-30 10:17:14 +0000 | [diff] [blame] | 113 | }; |
Mugunthan V N | e07b94f | 2012-08-06 05:05:58 +0000 | [diff] [blame] | 114 | cpsw_emac1: slave@1 { |
Richard Cochran | 9750a3a | 2012-10-29 08:45:15 +0000 | [diff] [blame] | 115 | slave_reg_ofs = <0x300>; |
Mugunthan V N | e07b94f | 2012-08-06 05:05:58 +0000 | [diff] [blame] | 116 | sliver_reg_ofs = <0xdc0>; |
| 117 | phy_id = "davinci_mdio.16:01"; |
| 118 | /* Filled in by U-Boot */ |
| 119 | mac-address = [ 00 00 00 00 00 00 ]; |
Mugunthan V N | 2eb32b0 | 2012-07-30 10:17:14 +0000 | [diff] [blame] | 120 | }; |
Mugunthan V N | 2eb32b0 | 2012-07-30 10:17:14 +0000 | [diff] [blame] | 121 | }; |