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 33*1d147ccbSMugunthan V N- mode-gpios : Should be added if one/multiple gpio lines are 34*1d147ccbSMugunthan V N required to be driven so that cpsw data lines 35*1d147ccbSMugunthan V N can be connected to the phy via selective mux. 36*1d147ccbSMugunthan V N For example in dra72x-evm, pcf gpio has to be 37*1d147ccbSMugunthan V N driven low so that cpsw slave 0 and phy data 38*1d147ccbSMugunthan V N lines are connected via mux. 39*1d147ccbSMugunthan 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 492eb32b0aSMugunthan V N 502eb32b0aSMugunthan V NNote: "ti,hwmods" field is used to fetch the base address and irq 512eb32b0aSMugunthan V Nresources from TI, omap hwmod data base during device registration. 522eb32b0aSMugunthan V NFuture plan is to migrate hwmod data base contents into device tree 532eb32b0aSMugunthan V Nblob so that, all the required data will be used from device tree dts 542eb32b0aSMugunthan V Nfile. 552eb32b0aSMugunthan V N 562eb32b0aSMugunthan V NExamples: 572eb32b0aSMugunthan V N 582eb32b0aSMugunthan V N mac: ethernet@4A100000 { 592eb32b0aSMugunthan V N compatible = "ti,cpsw"; 602eb32b0aSMugunthan V N reg = <0x4A100000 0x1000>; 612eb32b0aSMugunthan V N interrupts = <55 0x4>; 622eb32b0aSMugunthan V N interrupt-parent = <&intc>; 63e07b94f1SMugunthan V N cpdma_channels = <8>; 64e07b94f1SMugunthan V N ale_entries = <1024>; 65e07b94f1SMugunthan V N bd_ram_size = <0x2000>; 66e07b94f1SMugunthan V N no_bd_ram = <0>; 67e07b94f1SMugunthan V N rx_descs = <64>; 68e07b94f1SMugunthan V N mac_control = <0x20>; 69e07b94f1SMugunthan V N slaves = <2>; 70e86ac13bSMugunthan V N active_slave = <0>; 7100ab94eeSRichard Cochran cpts_clock_mult = <0x80000000>; 7200ab94eeSRichard Cochran cpts_clock_shift = <29>; 730ba517b1SMarkus Pargmann syscon = <&cm>; 74e07b94f1SMugunthan V N cpsw_emac0: slave@0 { 75549985eeSRichard Cochran phy_id = <&davinci_mdio>, <0>; 76c5ceea7aSMugunthan V N phy-mode = "rgmii-txid"; 77e07b94f1SMugunthan V N /* Filled in by U-Boot */ 78e07b94f1SMugunthan V N mac-address = [ 00 00 00 00 00 00 ]; 792eb32b0aSMugunthan V N }; 80e07b94f1SMugunthan V N cpsw_emac1: slave@1 { 81549985eeSRichard Cochran phy_id = <&davinci_mdio>, <1>; 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 }; 862eb32b0aSMugunthan V N }; 872eb32b0aSMugunthan V N 882eb32b0aSMugunthan V N(or) 892eb32b0aSMugunthan V N mac: ethernet@4A100000 { 902eb32b0aSMugunthan V N compatible = "ti,cpsw"; 912eb32b0aSMugunthan V N ti,hwmods = "cpgmac0"; 92e07b94f1SMugunthan V N cpdma_channels = <8>; 93e07b94f1SMugunthan V N ale_entries = <1024>; 94e07b94f1SMugunthan V N bd_ram_size = <0x2000>; 95e07b94f1SMugunthan V N no_bd_ram = <0>; 96e07b94f1SMugunthan V N rx_descs = <64>; 97e07b94f1SMugunthan V N mac_control = <0x20>; 98e07b94f1SMugunthan V N slaves = <2>; 99e86ac13bSMugunthan V N active_slave = <0>; 10000ab94eeSRichard Cochran cpts_clock_mult = <0x80000000>; 10100ab94eeSRichard Cochran cpts_clock_shift = <29>; 1020ba517b1SMarkus Pargmann syscon = <&cm>; 103e07b94f1SMugunthan V N cpsw_emac0: slave@0 { 104549985eeSRichard Cochran phy_id = <&davinci_mdio>, <0>; 105c5ceea7aSMugunthan V N phy-mode = "rgmii-txid"; 106e07b94f1SMugunthan V N /* Filled in by U-Boot */ 107e07b94f1SMugunthan V N mac-address = [ 00 00 00 00 00 00 ]; 1082eb32b0aSMugunthan V N }; 109e07b94f1SMugunthan V N cpsw_emac1: slave@1 { 110549985eeSRichard Cochran phy_id = <&davinci_mdio>, <1>; 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 }; 1152eb32b0aSMugunthan V N }; 116