12eb32b0aSMugunthan V NTI SoC Ethernet Switch Controller Device Tree Bindings 22eb32b0aSMugunthan V N------------------------------------------------------ 32eb32b0aSMugunthan V N 42eb32b0aSMugunthan V NRequired properties: 5472204feSMugunthan V N- compatible : Should be one of the below:- 6472204feSMugunthan V N "ti,cpsw" for backward compatible 7472204feSMugunthan V N "ti,am335x-cpsw" for AM335x controllers 8472204feSMugunthan V N "ti,am4372-cpsw" for AM437x controllers 9472204feSMugunthan V N "ti,dra7-cpsw" for DRA7x controllers 102eb32b0aSMugunthan V N- reg : physical base address and size of the cpsw 112eb32b0aSMugunthan V N registers map 122eb32b0aSMugunthan V N- interrupts : property with a value describing the interrupt 132eb32b0aSMugunthan V N number 142eb32b0aSMugunthan V N- interrupt-parent : The parent interrupt controller 152eb32b0aSMugunthan V N- cpdma_channels : Specifies number of channels in CPDMA 162eb32b0aSMugunthan V N- ale_entries : Specifies No of entries ALE can hold 172eb32b0aSMugunthan V N- bd_ram_size : Specifies internal descriptor RAM size 182eb32b0aSMugunthan V N- rx_descs : Specifies number of Rx descriptors 192eb32b0aSMugunthan V N- mac_control : Specifies Default MAC control register content 202eb32b0aSMugunthan V N for the specific platform 212eb32b0aSMugunthan V N- slaves : Specifies number for slaves 22e86ac13bSMugunthan V N- active_slave : Specifies the slave to use for time stamping, 23e86ac13bSMugunthan V N ethtool and SIOCGMIIPHY 2400ab94eeSRichard Cochran- cpts_clock_mult : Numerator to convert input clock ticks into nanoseconds 2500ab94eeSRichard Cochran- cpts_clock_shift : Denominator to convert input clock ticks into nanoseconds 262eb32b0aSMugunthan V N 272eb32b0aSMugunthan V NOptional properties: 282eb32b0aSMugunthan V N- ti,hwmods : Must be "cpgmac0" 292eb32b0aSMugunthan V N- no_bd_ram : Must be 0 or 1 30d9ba8f9eSMugunthan V N- dual_emac : Specifies Switch to act as Dual EMAC 310ba517b1SMarkus Pargmann- syscon : Phandle to the system control device node, which is 320ba517b1SMarkus Pargmann the control module device of the am33x 331d147ccbSMugunthan V N- mode-gpios : Should be added if one/multiple gpio lines are 341d147ccbSMugunthan V N required to be driven so that cpsw data lines 351d147ccbSMugunthan V N can be connected to the phy via selective mux. 361d147ccbSMugunthan V N For example in dra72x-evm, pcf gpio has to be 371d147ccbSMugunthan V N driven low so that cpsw slave 0 and phy data 381d147ccbSMugunthan V N lines are connected via mux. 391d147ccbSMugunthan V N 40470d1474SMugunthan V N 41470d1474SMugunthan V NSlave Properties: 42470d1474SMugunthan V NRequired properties: 43470d1474SMugunthan V N- phy_id : Specifies slave phy id 44e8f08ee0SSergei Shtylyov- phy-mode : See ethernet.txt file in the same directory 45470d1474SMugunthan V N 46470d1474SMugunthan V NOptional properties: 47d9ba8f9eSMugunthan V N- dual_emac_res_vlan : Specifies VID to be used to segregate the ports 48e4a9839bSMarkus Pargmann- mac-address : See ethernet.txt file in the same directory 499e42f715SHeiko Schocher- phy-handle : See ethernet.txt file in the same directory 502eb32b0aSMugunthan V N 51*1f71e8c9SMarkus BrunnerSlave sub-nodes: 52*1f71e8c9SMarkus Brunner- fixed-link : See fixed-link.txt file in the same directory 53*1f71e8c9SMarkus Brunner Either the properties phy_id and phy-mode, 54*1f71e8c9SMarkus Brunner or the sub-node fixed-link can be specified 55*1f71e8c9SMarkus Brunner 562eb32b0aSMugunthan V NNote: "ti,hwmods" field is used to fetch the base address and irq 572eb32b0aSMugunthan V Nresources from TI, omap hwmod data base during device registration. 582eb32b0aSMugunthan V NFuture plan is to migrate hwmod data base contents into device tree 592eb32b0aSMugunthan V Nblob so that, all the required data will be used from device tree dts 602eb32b0aSMugunthan V Nfile. 612eb32b0aSMugunthan V N 622eb32b0aSMugunthan V NExamples: 632eb32b0aSMugunthan V N 642eb32b0aSMugunthan V N mac: ethernet@4A100000 { 652eb32b0aSMugunthan V N compatible = "ti,cpsw"; 662eb32b0aSMugunthan V N reg = <0x4A100000 0x1000>; 672eb32b0aSMugunthan V N interrupts = <55 0x4>; 682eb32b0aSMugunthan V N interrupt-parent = <&intc>; 69e07b94f1SMugunthan V N cpdma_channels = <8>; 70e07b94f1SMugunthan V N ale_entries = <1024>; 71e07b94f1SMugunthan V N bd_ram_size = <0x2000>; 72e07b94f1SMugunthan V N no_bd_ram = <0>; 73e07b94f1SMugunthan V N rx_descs = <64>; 74e07b94f1SMugunthan V N mac_control = <0x20>; 75e07b94f1SMugunthan V N slaves = <2>; 76e86ac13bSMugunthan V N active_slave = <0>; 7700ab94eeSRichard Cochran cpts_clock_mult = <0x80000000>; 7800ab94eeSRichard Cochran cpts_clock_shift = <29>; 790ba517b1SMarkus Pargmann syscon = <&cm>; 80e07b94f1SMugunthan V N cpsw_emac0: slave@0 { 81549985eeSRichard Cochran phy_id = <&davinci_mdio>, <0>; 82c5ceea7aSMugunthan V N phy-mode = "rgmii-txid"; 83e07b94f1SMugunthan V N /* Filled in by U-Boot */ 84e07b94f1SMugunthan V N mac-address = [ 00 00 00 00 00 00 ]; 852eb32b0aSMugunthan V N }; 86e07b94f1SMugunthan V N cpsw_emac1: slave@1 { 87549985eeSRichard Cochran phy_id = <&davinci_mdio>, <1>; 88c5ceea7aSMugunthan V N phy-mode = "rgmii-txid"; 89e07b94f1SMugunthan V N /* Filled in by U-Boot */ 90e07b94f1SMugunthan V N mac-address = [ 00 00 00 00 00 00 ]; 912eb32b0aSMugunthan V N }; 922eb32b0aSMugunthan V N }; 932eb32b0aSMugunthan V N 942eb32b0aSMugunthan V N(or) 952eb32b0aSMugunthan V N mac: ethernet@4A100000 { 962eb32b0aSMugunthan V N compatible = "ti,cpsw"; 972eb32b0aSMugunthan V N ti,hwmods = "cpgmac0"; 98e07b94f1SMugunthan V N cpdma_channels = <8>; 99e07b94f1SMugunthan V N ale_entries = <1024>; 100e07b94f1SMugunthan V N bd_ram_size = <0x2000>; 101e07b94f1SMugunthan V N no_bd_ram = <0>; 102e07b94f1SMugunthan V N rx_descs = <64>; 103e07b94f1SMugunthan V N mac_control = <0x20>; 104e07b94f1SMugunthan V N slaves = <2>; 105e86ac13bSMugunthan V N active_slave = <0>; 10600ab94eeSRichard Cochran cpts_clock_mult = <0x80000000>; 10700ab94eeSRichard Cochran cpts_clock_shift = <29>; 1080ba517b1SMarkus Pargmann syscon = <&cm>; 109e07b94f1SMugunthan V N cpsw_emac0: slave@0 { 110549985eeSRichard Cochran phy_id = <&davinci_mdio>, <0>; 111c5ceea7aSMugunthan V N phy-mode = "rgmii-txid"; 112e07b94f1SMugunthan V N /* Filled in by U-Boot */ 113e07b94f1SMugunthan V N mac-address = [ 00 00 00 00 00 00 ]; 1142eb32b0aSMugunthan V N }; 115e07b94f1SMugunthan V N cpsw_emac1: slave@1 { 116549985eeSRichard Cochran phy_id = <&davinci_mdio>, <1>; 117c5ceea7aSMugunthan V N phy-mode = "rgmii-txid"; 118e07b94f1SMugunthan V N /* Filled in by U-Boot */ 119e07b94f1SMugunthan V N mac-address = [ 00 00 00 00 00 00 ]; 1202eb32b0aSMugunthan V N }; 1212eb32b0aSMugunthan V N }; 122