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: |
Mugunthan V N | 472204f | 2015-08-31 11:51:29 +0530 | [diff] [blame] | 5 | - compatible : Should be one of the below:- |
| 6 | "ti,cpsw" for backward compatible |
| 7 | "ti,am335x-cpsw" for AM335x controllers |
| 8 | "ti,am4372-cpsw" for AM437x controllers |
| 9 | "ti,dra7-cpsw" for DRA7x controllers |
Mugunthan V N | 2eb32b0 | 2012-07-30 10:17:14 +0000 | [diff] [blame] | 10 | - reg : physical base address and size of the cpsw |
| 11 | registers map |
| 12 | - interrupts : property with a value describing the interrupt |
| 13 | number |
| 14 | - interrupt-parent : The parent interrupt controller |
| 15 | - cpdma_channels : Specifies number of channels in CPDMA |
Mugunthan V N | 2eb32b0 | 2012-07-30 10:17:14 +0000 | [diff] [blame] | 16 | - ale_entries : Specifies No of entries ALE can hold |
Mugunthan V N | 2eb32b0 | 2012-07-30 10:17:14 +0000 | [diff] [blame] | 17 | - bd_ram_size : Specifies internal descriptor RAM size |
Mugunthan V N | 2eb32b0 | 2012-07-30 10:17:14 +0000 | [diff] [blame] | 18 | - mac_control : Specifies Default MAC control register content |
| 19 | for the specific platform |
| 20 | - slaves : Specifies number for slaves |
Mugunthan V N | e86ac13 | 2013-03-11 23:16:35 +0000 | [diff] [blame] | 21 | - active_slave : Specifies the slave to use for time stamping, |
| 22 | ethtool and SIOCGMIIPHY |
Richard Cochran | 00ab94e | 2012-10-29 08:45:19 +0000 | [diff] [blame] | 23 | - cpts_clock_mult : Numerator to convert input clock ticks into nanoseconds |
| 24 | - cpts_clock_shift : Denominator to convert input clock ticks into nanoseconds |
Mugunthan V N | 2eb32b0 | 2012-07-30 10:17:14 +0000 | [diff] [blame] | 25 | |
| 26 | Optional properties: |
| 27 | - ti,hwmods : Must be "cpgmac0" |
| 28 | - no_bd_ram : Must be 0 or 1 |
Mugunthan V N | d9ba8f9 | 2013-02-11 09:52:20 +0000 | [diff] [blame] | 29 | - dual_emac : Specifies Switch to act as Dual EMAC |
Markus Pargmann | 0ba517b | 2014-09-29 08:53:17 +0200 | [diff] [blame] | 30 | - syscon : Phandle to the system control device node, which is |
| 31 | the control module device of the am33x |
Mugunthan V N | 1d147cc | 2015-09-07 15:16:44 +0530 | [diff] [blame] | 32 | - mode-gpios : Should be added if one/multiple gpio lines are |
| 33 | required to be driven so that cpsw data lines |
| 34 | can be connected to the phy via selective mux. |
| 35 | For example in dra72x-evm, pcf gpio has to be |
| 36 | driven low so that cpsw slave 0 and phy data |
| 37 | lines are connected via mux. |
| 38 | |
Mugunthan V N | 470d147 | 2013-03-11 23:16:34 +0000 | [diff] [blame] | 39 | |
| 40 | Slave Properties: |
| 41 | Required properties: |
Sergei Shtylyov | e8f08ee | 2014-02-18 02:41:59 +0300 | [diff] [blame] | 42 | - phy-mode : See ethernet.txt file in the same directory |
Mugunthan V N | 470d147 | 2013-03-11 23:16:34 +0000 | [diff] [blame] | 43 | |
| 44 | Optional properties: |
Mugunthan V N | d9ba8f9 | 2013-02-11 09:52:20 +0000 | [diff] [blame] | 45 | - dual_emac_res_vlan : Specifies VID to be used to segregate the ports |
Markus Pargmann | e4a9839 | 2014-09-29 08:53:13 +0200 | [diff] [blame] | 46 | - mac-address : See ethernet.txt file in the same directory |
David Rivshin | a5d2cb3 | 2016-04-27 21:42:47 -0400 | [diff] [blame] | 47 | - phy_id : Specifies slave phy id (deprecated, use phy-handle) |
Heiko Schocher | 9e42f71 | 2015-10-17 06:04:35 +0200 | [diff] [blame] | 48 | - phy-handle : See ethernet.txt file in the same directory |
Mugunthan V N | 2eb32b0 | 2012-07-30 10:17:14 +0000 | [diff] [blame] | 49 | |
Markus Brunner | 1f71e8c | 2015-11-03 22:09:51 +0100 | [diff] [blame] | 50 | Slave sub-nodes: |
| 51 | - fixed-link : See fixed-link.txt file in the same directory |
David Rivshin | a5d2cb3 | 2016-04-27 21:42:47 -0400 | [diff] [blame] | 52 | |
| 53 | Note: Exactly one of phy_id, phy-handle, or fixed-link must be specified. |
Markus Brunner | 1f71e8c | 2015-11-03 22:09:51 +0100 | [diff] [blame] | 54 | |
Mugunthan V N | 2eb32b0 | 2012-07-30 10:17:14 +0000 | [diff] [blame] | 55 | Note: "ti,hwmods" field is used to fetch the base address and irq |
| 56 | resources from TI, omap hwmod data base during device registration. |
| 57 | Future plan is to migrate hwmod data base contents into device tree |
| 58 | blob so that, all the required data will be used from device tree dts |
| 59 | file. |
| 60 | |
| 61 | Examples: |
| 62 | |
| 63 | mac: ethernet@4A100000 { |
| 64 | compatible = "ti,cpsw"; |
| 65 | reg = <0x4A100000 0x1000>; |
| 66 | interrupts = <55 0x4>; |
| 67 | interrupt-parent = <&intc>; |
Mugunthan V N | e07b94f | 2012-08-06 05:05:58 +0000 | [diff] [blame] | 68 | cpdma_channels = <8>; |
Mugunthan V N | e07b94f | 2012-08-06 05:05:58 +0000 | [diff] [blame] | 69 | ale_entries = <1024>; |
Mugunthan V N | e07b94f | 2012-08-06 05:05:58 +0000 | [diff] [blame] | 70 | bd_ram_size = <0x2000>; |
| 71 | no_bd_ram = <0>; |
| 72 | rx_descs = <64>; |
| 73 | mac_control = <0x20>; |
| 74 | slaves = <2>; |
Mugunthan V N | e86ac13 | 2013-03-11 23:16:35 +0000 | [diff] [blame] | 75 | active_slave = <0>; |
Richard Cochran | 00ab94e | 2012-10-29 08:45:19 +0000 | [diff] [blame] | 76 | cpts_clock_mult = <0x80000000>; |
| 77 | cpts_clock_shift = <29>; |
Markus Pargmann | 0ba517b | 2014-09-29 08:53:17 +0200 | [diff] [blame] | 78 | syscon = <&cm>; |
Mugunthan V N | e07b94f | 2012-08-06 05:05:58 +0000 | [diff] [blame] | 79 | cpsw_emac0: slave@0 { |
Richard Cochran | 549985e | 2012-11-14 09:07:56 +0000 | [diff] [blame] | 80 | phy_id = <&davinci_mdio>, <0>; |
Mugunthan V N | c5ceea7 | 2013-06-03 20:10:10 +0000 | [diff] [blame] | 81 | phy-mode = "rgmii-txid"; |
Mugunthan V N | e07b94f | 2012-08-06 05:05:58 +0000 | [diff] [blame] | 82 | /* Filled in by U-Boot */ |
| 83 | mac-address = [ 00 00 00 00 00 00 ]; |
Mugunthan V N | 2eb32b0 | 2012-07-30 10:17:14 +0000 | [diff] [blame] | 84 | }; |
Mugunthan V N | e07b94f | 2012-08-06 05:05:58 +0000 | [diff] [blame] | 85 | cpsw_emac1: slave@1 { |
Richard Cochran | 549985e | 2012-11-14 09:07:56 +0000 | [diff] [blame] | 86 | phy_id = <&davinci_mdio>, <1>; |
Mugunthan V N | c5ceea7 | 2013-06-03 20:10:10 +0000 | [diff] [blame] | 87 | phy-mode = "rgmii-txid"; |
Mugunthan V N | e07b94f | 2012-08-06 05:05:58 +0000 | [diff] [blame] | 88 | /* Filled in by U-Boot */ |
| 89 | mac-address = [ 00 00 00 00 00 00 ]; |
Mugunthan V N | 2eb32b0 | 2012-07-30 10:17:14 +0000 | [diff] [blame] | 90 | }; |
| 91 | }; |
| 92 | |
| 93 | (or) |
Mugunthan V N | 2eb32b0 | 2012-07-30 10:17:14 +0000 | [diff] [blame] | 94 | mac: ethernet@4A100000 { |
| 95 | compatible = "ti,cpsw"; |
| 96 | ti,hwmods = "cpgmac0"; |
Mugunthan V N | e07b94f | 2012-08-06 05:05:58 +0000 | [diff] [blame] | 97 | cpdma_channels = <8>; |
Mugunthan V N | e07b94f | 2012-08-06 05:05:58 +0000 | [diff] [blame] | 98 | ale_entries = <1024>; |
Mugunthan V N | e07b94f | 2012-08-06 05:05:58 +0000 | [diff] [blame] | 99 | bd_ram_size = <0x2000>; |
| 100 | no_bd_ram = <0>; |
| 101 | rx_descs = <64>; |
| 102 | mac_control = <0x20>; |
| 103 | slaves = <2>; |
Mugunthan V N | e86ac13 | 2013-03-11 23:16:35 +0000 | [diff] [blame] | 104 | 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>; |
Markus Pargmann | 0ba517b | 2014-09-29 08:53:17 +0200 | [diff] [blame] | 107 | syscon = <&cm>; |
Mugunthan V N | e07b94f | 2012-08-06 05:05:58 +0000 | [diff] [blame] | 108 | cpsw_emac0: slave@0 { |
Richard Cochran | 549985e | 2012-11-14 09:07:56 +0000 | [diff] [blame] | 109 | phy_id = <&davinci_mdio>, <0>; |
Mugunthan V N | c5ceea7 | 2013-06-03 20:10:10 +0000 | [diff] [blame] | 110 | phy-mode = "rgmii-txid"; |
Mugunthan V N | e07b94f | 2012-08-06 05:05:58 +0000 | [diff] [blame] | 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 | 549985e | 2012-11-14 09:07:56 +0000 | [diff] [blame] | 115 | phy_id = <&davinci_mdio>, <1>; |
Mugunthan V N | c5ceea7 | 2013-06-03 20:10:10 +0000 | [diff] [blame] | 116 | phy-mode = "rgmii-txid"; |
Mugunthan V N | e07b94f | 2012-08-06 05:05:58 +0000 | [diff] [blame] | 117 | /* Filled in by U-Boot */ |
| 118 | mac-address = [ 00 00 00 00 00 00 ]; |
Mugunthan V N | 2eb32b0 | 2012-07-30 10:17:14 +0000 | [diff] [blame] | 119 | }; |
Mugunthan V N | 2eb32b0 | 2012-07-30 10:17:14 +0000 | [diff] [blame] | 120 | }; |