12eb32b0aSMugunthan V NTI SoC Ethernet Switch Controller Device Tree Bindings 22eb32b0aSMugunthan V N------------------------------------------------------ 32eb32b0aSMugunthan V N 42eb32b0aSMugunthan V NRequired properties: 52eb32b0aSMugunthan V N- compatible : Should be "ti,cpsw" 62eb32b0aSMugunthan V N- reg : physical base address and size of the cpsw 72eb32b0aSMugunthan V N registers map 82eb32b0aSMugunthan V N- interrupts : property with a value describing the interrupt 92eb32b0aSMugunthan V N number 102eb32b0aSMugunthan V N- interrupt-parent : The parent interrupt controller 112eb32b0aSMugunthan V N- cpdma_channels : Specifies number of channels in CPDMA 122eb32b0aSMugunthan V N- host_port_no : Specifies host port shift 132eb32b0aSMugunthan V N- cpdma_reg_ofs : Specifies CPDMA submodule register offset 14e07b94f1SMugunthan V N- cpdma_sram_ofs : Specifies CPDMA SRAM offset 152eb32b0aSMugunthan V N- ale_reg_ofs : Specifies ALE submodule register offset 162eb32b0aSMugunthan V N- ale_entries : Specifies No of entries ALE can hold 172eb32b0aSMugunthan V N- host_port_reg_ofs : Specifies host port register offset 182eb32b0aSMugunthan V N- hw_stats_reg_ofs : Specifies hardware statistics register offset 192eb32b0aSMugunthan V N- bd_ram_ofs : Specifies internal desciptor RAM offset 202eb32b0aSMugunthan V N- bd_ram_size : Specifies internal descriptor RAM size 212eb32b0aSMugunthan V N- rx_descs : Specifies number of Rx descriptors 222eb32b0aSMugunthan V N- mac_control : Specifies Default MAC control register content 232eb32b0aSMugunthan V N for the specific platform 242eb32b0aSMugunthan V N- slaves : Specifies number for slaves 252eb32b0aSMugunthan V N- slave_reg_ofs : Specifies slave register offset 262eb32b0aSMugunthan V N- sliver_reg_ofs : Specifies slave sliver register offset 272eb32b0aSMugunthan V N- phy_id : Specifies slave phy id 282eb32b0aSMugunthan V N- mac-address : Specifies slave MAC address 292eb32b0aSMugunthan V N 302eb32b0aSMugunthan V NOptional properties: 312eb32b0aSMugunthan V N- ti,hwmods : Must be "cpgmac0" 322eb32b0aSMugunthan V N- no_bd_ram : Must be 0 or 1 332eb32b0aSMugunthan V N 342eb32b0aSMugunthan V NNote: "ti,hwmods" field is used to fetch the base address and irq 352eb32b0aSMugunthan V Nresources from TI, omap hwmod data base during device registration. 362eb32b0aSMugunthan V NFuture plan is to migrate hwmod data base contents into device tree 372eb32b0aSMugunthan V Nblob so that, all the required data will be used from device tree dts 382eb32b0aSMugunthan V Nfile. 392eb32b0aSMugunthan V N 402eb32b0aSMugunthan V NExamples: 412eb32b0aSMugunthan V N 422eb32b0aSMugunthan V N mac: ethernet@4A100000 { 432eb32b0aSMugunthan V N compatible = "ti,cpsw"; 442eb32b0aSMugunthan V N reg = <0x4A100000 0x1000>; 452eb32b0aSMugunthan V N interrupts = <55 0x4>; 462eb32b0aSMugunthan V N interrupt-parent = <&intc>; 47e07b94f1SMugunthan V N cpdma_channels = <8>; 48e07b94f1SMugunthan V N host_port_no = <0>; 49e07b94f1SMugunthan V N cpdma_reg_ofs = <0x800>; 50e07b94f1SMugunthan V N cpdma_sram_ofs = <0xa00>; 51e07b94f1SMugunthan V N ale_reg_ofs = <0xd00>; 52e07b94f1SMugunthan V N ale_entries = <1024>; 53e07b94f1SMugunthan V N host_port_reg_ofs = <0x108>; 54e07b94f1SMugunthan V N hw_stats_reg_ofs = <0x900>; 55e07b94f1SMugunthan V N bd_ram_ofs = <0x2000>; 56e07b94f1SMugunthan V N bd_ram_size = <0x2000>; 57e07b94f1SMugunthan V N no_bd_ram = <0>; 58e07b94f1SMugunthan V N rx_descs = <64>; 59e07b94f1SMugunthan V N mac_control = <0x20>; 60e07b94f1SMugunthan V N slaves = <2>; 61e07b94f1SMugunthan V N cpsw_emac0: slave@0 { 62*9750a3adSRichard Cochran slave_reg_ofs = <0x200>; 63e07b94f1SMugunthan V N sliver_reg_ofs = <0xd80>; 64e07b94f1SMugunthan V N phy_id = "davinci_mdio.16:00"; 65e07b94f1SMugunthan V N /* Filled in by U-Boot */ 66e07b94f1SMugunthan V N mac-address = [ 00 00 00 00 00 00 ]; 672eb32b0aSMugunthan V N }; 68e07b94f1SMugunthan V N cpsw_emac1: slave@1 { 69*9750a3adSRichard Cochran slave_reg_ofs = <0x300>; 70e07b94f1SMugunthan V N sliver_reg_ofs = <0xdc0>; 71e07b94f1SMugunthan V N phy_id = "davinci_mdio.16:01"; 72e07b94f1SMugunthan V N /* Filled in by U-Boot */ 73e07b94f1SMugunthan V N mac-address = [ 00 00 00 00 00 00 ]; 742eb32b0aSMugunthan V N }; 752eb32b0aSMugunthan V N }; 762eb32b0aSMugunthan V N 772eb32b0aSMugunthan V N(or) 782eb32b0aSMugunthan V N mac: ethernet@4A100000 { 792eb32b0aSMugunthan V N compatible = "ti,cpsw"; 802eb32b0aSMugunthan V N ti,hwmods = "cpgmac0"; 81e07b94f1SMugunthan V N cpdma_channels = <8>; 82e07b94f1SMugunthan V N host_port_no = <0>; 83e07b94f1SMugunthan V N cpdma_reg_ofs = <0x800>; 84e07b94f1SMugunthan V N cpdma_sram_ofs = <0xa00>; 85e07b94f1SMugunthan V N ale_reg_ofs = <0xd00>; 86e07b94f1SMugunthan V N ale_entries = <1024>; 87e07b94f1SMugunthan V N host_port_reg_ofs = <0x108>; 88e07b94f1SMugunthan V N hw_stats_reg_ofs = <0x900>; 89e07b94f1SMugunthan V N bd_ram_ofs = <0x2000>; 90e07b94f1SMugunthan V N bd_ram_size = <0x2000>; 91e07b94f1SMugunthan V N no_bd_ram = <0>; 92e07b94f1SMugunthan V N rx_descs = <64>; 93e07b94f1SMugunthan V N mac_control = <0x20>; 94e07b94f1SMugunthan V N slaves = <2>; 95e07b94f1SMugunthan V N cpsw_emac0: slave@0 { 96*9750a3adSRichard Cochran slave_reg_ofs = <0x200>; 97e07b94f1SMugunthan V N sliver_reg_ofs = <0xd80>; 98e07b94f1SMugunthan V N phy_id = "davinci_mdio.16:00"; 99e07b94f1SMugunthan V N /* Filled in by U-Boot */ 100e07b94f1SMugunthan V N mac-address = [ 00 00 00 00 00 00 ]; 1012eb32b0aSMugunthan V N }; 102e07b94f1SMugunthan V N cpsw_emac1: slave@1 { 103*9750a3adSRichard Cochran slave_reg_ofs = <0x300>; 104e07b94f1SMugunthan V N sliver_reg_ofs = <0xdc0>; 105e07b94f1SMugunthan V N phy_id = "davinci_mdio.16:01"; 106e07b94f1SMugunthan V N /* Filled in by U-Boot */ 107e07b94f1SMugunthan V N mac-address = [ 00 00 00 00 00 00 ]; 1082eb32b0aSMugunthan V N }; 1092eb32b0aSMugunthan V N }; 110