1*c66ec88fSEmmanuel VadotCPSW Port's Interface Mode Selection PHY Tree Bindings 2*c66ec88fSEmmanuel Vadot----------------------------------------------- 3*c66ec88fSEmmanuel Vadot 4*c66ec88fSEmmanuel VadotTI am335x/am437x/dra7(am5)/dm814x CPSW3G Ethernet Subsystem supports 5*c66ec88fSEmmanuel Vadottwo 10/100/1000 Ethernet ports with selectable G/MII, RMII, and RGMII interfaces. 6*c66ec88fSEmmanuel VadotThe interface mode is selected by configuring the MII mode selection register(s) 7*c66ec88fSEmmanuel Vadot(GMII_SEL) in the System Control Module chapter (SCM). GMII_SEL register(s) and 8*c66ec88fSEmmanuel Vadotbit fields placement in SCM are different between SoCs while fields meaning 9*c66ec88fSEmmanuel Vadotis the same. 10*c66ec88fSEmmanuel Vadot +--------------+ 11*c66ec88fSEmmanuel Vadot +-------------------------------+ |SCM | 12*c66ec88fSEmmanuel Vadot | CPSW | | +---------+ | 13*c66ec88fSEmmanuel Vadot | +--------------------------------+gmii_sel | | 14*c66ec88fSEmmanuel Vadot | | | | +---------+ | 15*c66ec88fSEmmanuel Vadot | +----v---+ +--------+ | +--------------+ 16*c66ec88fSEmmanuel Vadot | |Port 1..<--+-->GMII/MII<-------> 17*c66ec88fSEmmanuel Vadot | | | | | | | 18*c66ec88fSEmmanuel Vadot | +--------+ | +--------+ | 19*c66ec88fSEmmanuel Vadot | | | 20*c66ec88fSEmmanuel Vadot | | +--------+ | 21*c66ec88fSEmmanuel Vadot | | | RMII <-------> 22*c66ec88fSEmmanuel Vadot | +--> | | 23*c66ec88fSEmmanuel Vadot | | +--------+ | 24*c66ec88fSEmmanuel Vadot | | | 25*c66ec88fSEmmanuel Vadot | | +--------+ | 26*c66ec88fSEmmanuel Vadot | | | RGMII <-------> 27*c66ec88fSEmmanuel Vadot | +--> | | 28*c66ec88fSEmmanuel Vadot | +--------+ | 29*c66ec88fSEmmanuel Vadot +-------------------------------+ 30*c66ec88fSEmmanuel Vadot 31*c66ec88fSEmmanuel VadotCPSW Port's Interface Mode Selection PHY describes MII interface mode between 32*c66ec88fSEmmanuel VadotCPSW Port and Ethernet PHY which depends on Eth PHY and board configuration. 33*c66ec88fSEmmanuel Vadot 34*c66ec88fSEmmanuel VadotCPSW Port's Interface Mode Selection PHY device should defined as child device 35*c66ec88fSEmmanuel Vadotof SCM node (scm_conf) and can be attached to each CPSW port node using standard 36*c66ec88fSEmmanuel VadotPHY bindings (See phy/phy-bindings.txt). 37*c66ec88fSEmmanuel Vadot 38*c66ec88fSEmmanuel VadotRequired properties: 39*c66ec88fSEmmanuel Vadot- compatible : Should be "ti,am3352-phy-gmii-sel" for am335x platform 40*c66ec88fSEmmanuel Vadot "ti,dra7xx-phy-gmii-sel" for dra7xx/am57xx platform 41*c66ec88fSEmmanuel Vadot "ti,am43xx-phy-gmii-sel" for am43xx platform 42*c66ec88fSEmmanuel Vadot "ti,dm814-phy-gmii-sel" for dm814x platform 43*c66ec88fSEmmanuel Vadot "ti,am654-phy-gmii-sel" for AM654x/J721E platform 44*c66ec88fSEmmanuel Vadot- reg : Address and length of the register set for the device 45*c66ec88fSEmmanuel Vadot- #phy-cells : must be 2. 46*c66ec88fSEmmanuel Vadot cell 1 - CPSW port number (starting from 1) 47*c66ec88fSEmmanuel Vadot cell 2 - RMII refclk mode 48*c66ec88fSEmmanuel Vadot 49*c66ec88fSEmmanuel VadotExamples: 50*c66ec88fSEmmanuel Vadot phy_gmii_sel: phy-gmii-sel { 51*c66ec88fSEmmanuel Vadot compatible = "ti,am3352-phy-gmii-sel"; 52*c66ec88fSEmmanuel Vadot reg = <0x650 0x4>; 53*c66ec88fSEmmanuel Vadot #phy-cells = <2>; 54*c66ec88fSEmmanuel Vadot }; 55*c66ec88fSEmmanuel Vadot 56*c66ec88fSEmmanuel Vadot mac: ethernet@4a100000 { 57*c66ec88fSEmmanuel Vadot compatible = "ti,am335x-cpsw","ti,cpsw"; 58*c66ec88fSEmmanuel Vadot ... 59*c66ec88fSEmmanuel Vadot 60*c66ec88fSEmmanuel Vadot cpsw_emac0: slave@4a100200 { 61*c66ec88fSEmmanuel Vadot ... 62*c66ec88fSEmmanuel Vadot phys = <&phy_gmii_sel 1 1>; 63*c66ec88fSEmmanuel Vadot }; 64*c66ec88fSEmmanuel Vadot 65*c66ec88fSEmmanuel Vadot cpsw_emac1: slave@4a100300 { 66*c66ec88fSEmmanuel Vadot ... 67*c66ec88fSEmmanuel Vadot phys = <&phy_gmii_sel 2 1>; 68*c66ec88fSEmmanuel Vadot }; 69*c66ec88fSEmmanuel Vadot }; 70