1TI SoC Ethernet Switch Controller Device Tree Bindings 2------------------------------------------------------ 3 4Required properties: 5- compatible : Should be "ti,cpsw" 6- reg : physical base address and size of the cpsw 7 registers map 8- interrupts : property with a value describing the interrupt 9 number 10- interrupt-parent : The parent interrupt controller 11- cpdma_channels : Specifies number of channels in CPDMA 12- host_port_no : Specifies host port shift 13- cpdma_reg_ofs : Specifies CPDMA submodule register offset 14- cpdma_sram_ofs : Specifies CPDMA SRAM offset 15- ale_reg_ofs : Specifies ALE submodule register offset 16- ale_entries : Specifies No of entries ALE can hold 17- host_port_reg_ofs : Specifies host port register offset 18- hw_stats_reg_ofs : Specifies hardware statistics register offset 19- bd_ram_ofs : Specifies internal desciptor RAM offset 20- bd_ram_size : Specifies internal descriptor RAM size 21- rx_descs : Specifies number of Rx descriptors 22- mac_control : Specifies Default MAC control register content 23 for the specific platform 24- slaves : Specifies number for slaves 25- slave_reg_ofs : Specifies slave register offset 26- sliver_reg_ofs : Specifies slave sliver register offset 27- phy_id : Specifies slave phy id 28- phy_if_mode : Specified slave phy interface mode (optional) 29 (one of the PHY_INTERFACE_MODE_* as numerical value) 30- mac-address : Specifies slave MAC address 31 32Optional properties: 33- ti,hwmods : Must be "cpgmac0" 34- no_bd_ram : Must be 0 or 1 35 36Note: "ti,hwmods" field is used to fetch the base address and irq 37resources from TI, omap hwmod data base during device registration. 38Future plan is to migrate hwmod data base contents into device tree 39blob so that, all the required data will be used from device tree dts 40file. 41 42Examples: 43 44 mac: ethernet@4A100000 { 45 compatible = "ti,cpsw"; 46 reg = <0x4A100000 0x1000>; 47 interrupts = <55 0x4>; 48 interrupt-parent = <&intc>; 49 cpdma_channels = <8>; 50 host_port_no = <0>; 51 cpdma_reg_ofs = <0x800>; 52 cpdma_sram_ofs = <0xa00>; 53 ale_reg_ofs = <0xd00>; 54 ale_entries = <1024>; 55 host_port_reg_ofs = <0x108>; 56 hw_stats_reg_ofs = <0x900>; 57 bd_ram_ofs = <0x2000>; 58 bd_ram_size = <0x2000>; 59 no_bd_ram = <0>; 60 rx_descs = <64>; 61 mac_control = <0x20>; 62 slaves = <2>; 63 cpsw_emac0: slave@0 { 64 slave_reg_ofs = <0x208>; 65 sliver_reg_ofs = <0xd80>; 66 phy_id = "davinci_mdio.16:00"; 67 phy_if_mode = <6>; /* PHY_INTERFACE_MODE_RGMII */ 68 /* Filled in by U-Boot */ 69 mac-address = [ 00 00 00 00 00 00 ]; 70 }; 71 cpsw_emac1: slave@1 { 72 slave_reg_ofs = <0x308>; 73 sliver_reg_ofs = <0xdc0>; 74 phy_id = "davinci_mdio.16:01"; 75 /* Filled in by U-Boot */ 76 mac-address = [ 00 00 00 00 00 00 ]; 77 }; 78 }; 79 80(or) 81 mac: ethernet@4A100000 { 82 compatible = "ti,cpsw"; 83 ti,hwmods = "cpgmac0"; 84 cpdma_channels = <8>; 85 host_port_no = <0>; 86 cpdma_reg_ofs = <0x800>; 87 cpdma_sram_ofs = <0xa00>; 88 ale_reg_ofs = <0xd00>; 89 ale_entries = <1024>; 90 host_port_reg_ofs = <0x108>; 91 hw_stats_reg_ofs = <0x900>; 92 bd_ram_ofs = <0x2000>; 93 bd_ram_size = <0x2000>; 94 no_bd_ram = <0>; 95 rx_descs = <64>; 96 mac_control = <0x20>; 97 slaves = <2>; 98 cpsw_emac0: slave@0 { 99 slave_reg_ofs = <0x208>; 100 sliver_reg_ofs = <0xd80>; 101 phy_id = "davinci_mdio.16:00"; 102 /* Filled in by U-Boot */ 103 mac-address = [ 00 00 00 00 00 00 ]; 104 }; 105 cpsw_emac1: slave@1 { 106 slave_reg_ofs = <0x308>; 107 sliver_reg_ofs = <0xdc0>; 108 phy_id = "davinci_mdio.16:01"; 109 /* Filled in by U-Boot */ 110 mac-address = [ 00 00 00 00 00 00 ]; 111 }; 112 }; 113