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- mac_control : Specifies Default MAC control register content 192eb32b0aSMugunthan V N for the specific platform 202eb32b0aSMugunthan V N- slaves : Specifies number for slaves 21e86ac13bSMugunthan V N- active_slave : Specifies the slave to use for time stamping, 22e86ac13bSMugunthan V N ethtool and SIOCGMIIPHY 232eb32b0aSMugunthan V N 242eb32b0aSMugunthan V NOptional properties: 252eb32b0aSMugunthan V N- ti,hwmods : Must be "cpgmac0" 262eb32b0aSMugunthan V N- no_bd_ram : Must be 0 or 1 27d9ba8f9eSMugunthan V N- dual_emac : Specifies Switch to act as Dual EMAC 280ba517b1SMarkus Pargmann- syscon : Phandle to the system control device node, which is 290ba517b1SMarkus Pargmann the control module device of the am33x 301d147ccbSMugunthan V N- mode-gpios : Should be added if one/multiple gpio lines are 311d147ccbSMugunthan V N required to be driven so that cpsw data lines 321d147ccbSMugunthan V N can be connected to the phy via selective mux. 331d147ccbSMugunthan V N For example in dra72x-evm, pcf gpio has to be 341d147ccbSMugunthan V N driven low so that cpsw slave 0 and phy data 351d147ccbSMugunthan V N lines are connected via mux. 36*88f0f0b0SGrygorii Strashko- cpts_clock_mult : Numerator to convert input clock ticks into nanoseconds 37*88f0f0b0SGrygorii Strashko- cpts_clock_shift : Denominator to convert input clock ticks into nanoseconds 38*88f0f0b0SGrygorii Strashko Mult and shift will be calculated basing on CPTS 39*88f0f0b0SGrygorii Strashko rftclk frequency if both cpts_clock_shift and 40*88f0f0b0SGrygorii Strashko cpts_clock_mult properties are not provided. 41470d1474SMugunthan V N 42470d1474SMugunthan V NSlave Properties: 43470d1474SMugunthan V NRequired properties: 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 49a5d2cb3bSDavid Rivshin- phy_id : Specifies slave phy id (deprecated, use phy-handle) 509e42f715SHeiko Schocher- phy-handle : See ethernet.txt file in the same directory 512eb32b0aSMugunthan V N 521f71e8c9SMarkus BrunnerSlave sub-nodes: 531f71e8c9SMarkus Brunner- fixed-link : See fixed-link.txt file in the same directory 54a5d2cb3bSDavid Rivshin 55a5d2cb3bSDavid RivshinNote: Exactly one of phy_id, phy-handle, or fixed-link must be specified. 561f71e8c9SMarkus Brunner 572eb32b0aSMugunthan V NNote: "ti,hwmods" field is used to fetch the base address and irq 582eb32b0aSMugunthan V Nresources from TI, omap hwmod data base during device registration. 592eb32b0aSMugunthan V NFuture plan is to migrate hwmod data base contents into device tree 602eb32b0aSMugunthan V Nblob so that, all the required data will be used from device tree dts 612eb32b0aSMugunthan V Nfile. 622eb32b0aSMugunthan V N 632eb32b0aSMugunthan V NExamples: 642eb32b0aSMugunthan V N 652eb32b0aSMugunthan V N mac: ethernet@4A100000 { 662eb32b0aSMugunthan V N compatible = "ti,cpsw"; 672eb32b0aSMugunthan V N reg = <0x4A100000 0x1000>; 682eb32b0aSMugunthan V N interrupts = <55 0x4>; 692eb32b0aSMugunthan V N interrupt-parent = <&intc>; 70e07b94f1SMugunthan V N cpdma_channels = <8>; 71e07b94f1SMugunthan V N ale_entries = <1024>; 72e07b94f1SMugunthan V N bd_ram_size = <0x2000>; 73e07b94f1SMugunthan V N no_bd_ram = <0>; 74e07b94f1SMugunthan V N rx_descs = <64>; 75e07b94f1SMugunthan V N mac_control = <0x20>; 76e07b94f1SMugunthan V N slaves = <2>; 77e86ac13bSMugunthan V N active_slave = <0>; 7800ab94eeSRichard Cochran cpts_clock_mult = <0x80000000>; 7900ab94eeSRichard Cochran cpts_clock_shift = <29>; 800ba517b1SMarkus Pargmann syscon = <&cm>; 81e07b94f1SMugunthan V N cpsw_emac0: slave@0 { 82549985eeSRichard Cochran phy_id = <&davinci_mdio>, <0>; 83c5ceea7aSMugunthan V N phy-mode = "rgmii-txid"; 84e07b94f1SMugunthan V N /* Filled in by U-Boot */ 85e07b94f1SMugunthan V N mac-address = [ 00 00 00 00 00 00 ]; 862eb32b0aSMugunthan V N }; 87e07b94f1SMugunthan V N cpsw_emac1: slave@1 { 88549985eeSRichard Cochran phy_id = <&davinci_mdio>, <1>; 89c5ceea7aSMugunthan V N phy-mode = "rgmii-txid"; 90e07b94f1SMugunthan V N /* Filled in by U-Boot */ 91e07b94f1SMugunthan V N mac-address = [ 00 00 00 00 00 00 ]; 922eb32b0aSMugunthan V N }; 932eb32b0aSMugunthan V N }; 942eb32b0aSMugunthan V N 952eb32b0aSMugunthan V N(or) 962eb32b0aSMugunthan V N mac: ethernet@4A100000 { 972eb32b0aSMugunthan V N compatible = "ti,cpsw"; 982eb32b0aSMugunthan V N ti,hwmods = "cpgmac0"; 99e07b94f1SMugunthan V N cpdma_channels = <8>; 100e07b94f1SMugunthan V N ale_entries = <1024>; 101e07b94f1SMugunthan V N bd_ram_size = <0x2000>; 102e07b94f1SMugunthan V N no_bd_ram = <0>; 103e07b94f1SMugunthan V N rx_descs = <64>; 104e07b94f1SMugunthan V N mac_control = <0x20>; 105e07b94f1SMugunthan V N slaves = <2>; 106e86ac13bSMugunthan V N active_slave = <0>; 10700ab94eeSRichard Cochran cpts_clock_mult = <0x80000000>; 10800ab94eeSRichard Cochran cpts_clock_shift = <29>; 1090ba517b1SMarkus Pargmann syscon = <&cm>; 110e07b94f1SMugunthan V N cpsw_emac0: slave@0 { 111549985eeSRichard Cochran phy_id = <&davinci_mdio>, <0>; 112c5ceea7aSMugunthan V N phy-mode = "rgmii-txid"; 113e07b94f1SMugunthan V N /* Filled in by U-Boot */ 114e07b94f1SMugunthan V N mac-address = [ 00 00 00 00 00 00 ]; 1152eb32b0aSMugunthan V N }; 116e07b94f1SMugunthan V N cpsw_emac1: slave@1 { 117549985eeSRichard Cochran phy_id = <&davinci_mdio>, <1>; 118c5ceea7aSMugunthan V N phy-mode = "rgmii-txid"; 119e07b94f1SMugunthan V N /* Filled in by U-Boot */ 120e07b94f1SMugunthan V N mac-address = [ 00 00 00 00 00 00 ]; 1212eb32b0aSMugunthan V N }; 1222eb32b0aSMugunthan V N }; 123