1 TI SoC Ethernet Switch Controller Device Tree 1 TI SoC Ethernet Switch Controller Device Tree Bindings 2 ---------------------------------------------- 2 ------------------------------------------------------ 3 3 4 Required properties: 4 Required properties: 5 - compatible : Should be one of the 5 - compatible : Should be one of the below:- 6 "ti,cpsw" for backwa 6 "ti,cpsw" for backward compatible 7 "ti,am335x-cpsw" for 7 "ti,am335x-cpsw" for AM335x controllers 8 "ti,am4372-cpsw" for 8 "ti,am4372-cpsw" for AM437x controllers 9 "ti,dra7-cpsw" for D 9 "ti,dra7-cpsw" for DRA7x controllers 10 - reg : physical base addres 10 - reg : physical base address and size of the cpsw 11 registers map 11 registers map 12 - interrupts : property with a valu 12 - interrupts : property with a value describing the interrupt 13 number 13 number 14 - cpdma_channels : Specifies number of 14 - cpdma_channels : Specifies number of channels in CPDMA 15 - ale_entries : Specifies No of entr 15 - ale_entries : Specifies No of entries ALE can hold 16 - bd_ram_size : Specifies internal d 16 - bd_ram_size : Specifies internal descriptor RAM size 17 - mac_control : Specifies Default MA 17 - mac_control : Specifies Default MAC control register content 18 for the specific pla 18 for the specific platform 19 - slaves : Specifies number for 19 - slaves : Specifies number for slaves 20 - active_slave : Specifies the slave 20 - active_slave : Specifies the slave to use for time stamping, 21 ethtool and SIOCGMII 21 ethtool and SIOCGMIIPHY 22 - cpsw-phy-sel : Specifies the phandl 22 - cpsw-phy-sel : Specifies the phandle to the CPSW phy mode selection 23 device. See also cps !! 23 device. See also cpsw-phy-sel.txt for it's binding. 24 Note that in legacy 24 Note that in legacy cases cpsw-phy-sel may be 25 a child device inste !! 25 a child device instead of a phandle. 26 (DEPRECATED, use phy << 27 26 28 Optional properties: 27 Optional properties: 29 - ti,hwmods : Must be "cpgmac0" 28 - ti,hwmods : Must be "cpgmac0" 30 - dual_emac : Specifies Switch to 29 - dual_emac : Specifies Switch to act as Dual EMAC 31 - syscon : Phandle to the syste 30 - syscon : Phandle to the system control device node, which is 32 the control module d 31 the control module device of the am33x 33 - mode-gpios : Should be added if o 32 - mode-gpios : Should be added if one/multiple gpio lines are 34 required to be drive 33 required to be driven so that cpsw data lines 35 can be connected to 34 can be connected to the phy via selective mux. 36 For example in dra72 35 For example in dra72x-evm, pcf gpio has to be 37 driven low so that c 36 driven low so that cpsw slave 0 and phy data 38 lines are connected 37 lines are connected via mux. 39 - cpts_clock_mult : Numerator to convert 38 - cpts_clock_mult : Numerator to convert input clock ticks into nanoseconds 40 - cpts_clock_shift : Denominator to conve 39 - cpts_clock_shift : Denominator to convert input clock ticks into nanoseconds 41 Mult and shift will 40 Mult and shift will be calculated basing on CPTS 42 rftclk frequency if 41 rftclk frequency if both cpts_clock_shift and 43 cpts_clock_mult prop 42 cpts_clock_mult properties are not provided. 44 43 45 Slave Properties: 44 Slave Properties: 46 Required properties: 45 Required properties: 47 - phy-mode : See ethernet.txt fil 46 - phy-mode : See ethernet.txt file in the same directory 48 - phys : phandle on phy-gmii- << 49 47 50 Optional properties: 48 Optional properties: 51 - dual_emac_res_vlan : Specifies VID to be 49 - dual_emac_res_vlan : Specifies VID to be used to segregate the ports >> 50 - mac-address : See ethernet.txt file in the same directory 52 - phy_id : Specifies slave phy 51 - phy_id : Specifies slave phy id (deprecated, use phy-handle) 53 - phy-handle : See ethernet.txt fil 52 - phy-handle : See ethernet.txt file in the same directory 54 53 55 The MAC address will be determined using the o << 56 defined in ethernet.txt. << 57 << 58 Slave sub-nodes: 54 Slave sub-nodes: 59 - fixed-link : See fixed-link.txt f 55 - fixed-link : See fixed-link.txt file in the same directory 60 56 61 Note: Exactly one of phy_id, phy-handle, or fi 57 Note: Exactly one of phy_id, phy-handle, or fixed-link must be specified. 62 58 63 Note: "ti,hwmods" field is used to fetch the b 59 Note: "ti,hwmods" field is used to fetch the base address and irq 64 resources from TI, omap hwmod data base during 60 resources from TI, omap hwmod data base during device registration. 65 Future plan is to migrate hwmod data base cont 61 Future plan is to migrate hwmod data base contents into device tree 66 blob so that, all the required data will be us 62 blob so that, all the required data will be used from device tree dts 67 file. 63 file. 68 64 69 Examples: 65 Examples: 70 66 71 mac: ethernet@4a100000 { 67 mac: ethernet@4a100000 { 72 compatible = "ti,cpsw"; 68 compatible = "ti,cpsw"; 73 reg = <0x4A100000 0x1000>; 69 reg = <0x4A100000 0x1000>; 74 interrupts = <55 0x4>; 70 interrupts = <55 0x4>; 75 interrupt-parent = <&intc>; 71 interrupt-parent = <&intc>; 76 cpdma_channels = <8>; 72 cpdma_channels = <8>; 77 ale_entries = <1024>; 73 ale_entries = <1024>; 78 bd_ram_size = <0x2000>; 74 bd_ram_size = <0x2000>; 79 rx_descs = <64>; 75 rx_descs = <64>; 80 mac_control = <0x20>; 76 mac_control = <0x20>; 81 slaves = <2>; 77 slaves = <2>; 82 active_slave = <0>; 78 active_slave = <0>; 83 cpts_clock_mult = <0x80000000> 79 cpts_clock_mult = <0x80000000>; 84 cpts_clock_shift = <29>; 80 cpts_clock_shift = <29>; 85 syscon = <&cm>; 81 syscon = <&cm>; 86 cpsw-phy-sel = <&phy_sel>; 82 cpsw-phy-sel = <&phy_sel>; 87 cpsw_emac0: slave@0 { 83 cpsw_emac0: slave@0 { 88 phy_id = <&davinci_mdi 84 phy_id = <&davinci_mdio>, <0>; 89 phy-mode = "rgmii-txid 85 phy-mode = "rgmii-txid"; 90 /* Filled in by U-Boot 86 /* Filled in by U-Boot */ 91 mac-address = [ 00 00 87 mac-address = [ 00 00 00 00 00 00 ]; 92 phys = <&phy_gmii_sel << 93 }; 88 }; 94 cpsw_emac1: slave@1 { 89 cpsw_emac1: slave@1 { 95 phy_id = <&davinci_mdi 90 phy_id = <&davinci_mdio>, <1>; 96 phy-mode = "rgmii-txid 91 phy-mode = "rgmii-txid"; 97 /* Filled in by U-Boot 92 /* Filled in by U-Boot */ 98 mac-address = [ 00 00 93 mac-address = [ 00 00 00 00 00 00 ]; 99 phys = <&phy_gmii_sel << 100 }; 94 }; 101 }; 95 }; 102 96 103 (or) 97 (or) 104 mac: ethernet@4a100000 { 98 mac: ethernet@4a100000 { 105 compatible = "ti,cpsw"; 99 compatible = "ti,cpsw"; 106 ti,hwmods = "cpgmac0"; 100 ti,hwmods = "cpgmac0"; 107 cpdma_channels = <8>; 101 cpdma_channels = <8>; 108 ale_entries = <1024>; 102 ale_entries = <1024>; 109 bd_ram_size = <0x2000>; 103 bd_ram_size = <0x2000>; 110 rx_descs = <64>; 104 rx_descs = <64>; 111 mac_control = <0x20>; 105 mac_control = <0x20>; 112 slaves = <2>; 106 slaves = <2>; 113 active_slave = <0>; 107 active_slave = <0>; 114 cpts_clock_mult = <0x80000000> 108 cpts_clock_mult = <0x80000000>; 115 cpts_clock_shift = <29>; 109 cpts_clock_shift = <29>; 116 syscon = <&cm>; 110 syscon = <&cm>; 117 cpsw-phy-sel = <&phy_sel>; 111 cpsw-phy-sel = <&phy_sel>; 118 cpsw_emac0: slave@0 { 112 cpsw_emac0: slave@0 { 119 phy_id = <&davinci_mdi 113 phy_id = <&davinci_mdio>, <0>; 120 phy-mode = "rgmii-txid 114 phy-mode = "rgmii-txid"; 121 /* Filled in by U-Boot 115 /* Filled in by U-Boot */ 122 mac-address = [ 00 00 116 mac-address = [ 00 00 00 00 00 00 ]; 123 phys = <&phy_gmii_sel << 124 }; 117 }; 125 cpsw_emac1: slave@1 { 118 cpsw_emac1: slave@1 { 126 phy_id = <&davinci_mdi 119 phy_id = <&davinci_mdio>, <1>; 127 phy-mode = "rgmii-txid 120 phy-mode = "rgmii-txid"; 128 /* Filled in by U-Boot 121 /* Filled in by U-Boot */ 129 mac-address = [ 00 00 122 mac-address = [ 00 00 00 00 00 00 ]; 130 phys = <&phy_gmii_sel << 131 }; 123 }; 132 }; 124 };
Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.