1*4882a593SmuzhiyunQualcomm Technologies EMAC Gigabit Ethernet Controller 2*4882a593Smuzhiyun 3*4882a593SmuzhiyunThis network controller consists of two devices: a MAC and an SGMII 4*4882a593Smuzhiyuninternal PHY. Each device is represented by a device tree node. A phandle 5*4882a593Smuzhiyunconnects the MAC node to its corresponding internal phy node. Another 6*4882a593Smuzhiyunphandle points to the external PHY node. 7*4882a593Smuzhiyun 8*4882a593SmuzhiyunRequired properties: 9*4882a593Smuzhiyun 10*4882a593SmuzhiyunMAC node: 11*4882a593Smuzhiyun- compatible : Should be "qcom,fsm9900-emac". 12*4882a593Smuzhiyun- reg : Offset and length of the register regions for the device 13*4882a593Smuzhiyun- interrupts : Interrupt number used by this controller 14*4882a593Smuzhiyun- mac-address : The 6-byte MAC address. If present, it is the default 15*4882a593Smuzhiyun MAC address. 16*4882a593Smuzhiyun- internal-phy : phandle to the internal PHY node 17*4882a593Smuzhiyun- phy-handle : phandle the the external PHY node 18*4882a593Smuzhiyun 19*4882a593SmuzhiyunInternal PHY node: 20*4882a593Smuzhiyun- compatible : Should be "qcom,fsm9900-emac-sgmii" or "qcom,qdf2432-emac-sgmii". 21*4882a593Smuzhiyun- reg : Offset and length of the register region(s) for the device 22*4882a593Smuzhiyun- interrupts : Interrupt number used by this controller 23*4882a593Smuzhiyun 24*4882a593SmuzhiyunThe external phy child node: 25*4882a593Smuzhiyun- reg : The phy address 26*4882a593Smuzhiyun 27*4882a593SmuzhiyunExample: 28*4882a593Smuzhiyun 29*4882a593SmuzhiyunFSM9900: 30*4882a593Smuzhiyun 31*4882a593Smuzhiyunsoc { 32*4882a593Smuzhiyun #address-cells = <1>; 33*4882a593Smuzhiyun #size-cells = <1>; 34*4882a593Smuzhiyun 35*4882a593Smuzhiyun emac0: ethernet@feb20000 { 36*4882a593Smuzhiyun compatible = "qcom,fsm9900-emac"; 37*4882a593Smuzhiyun reg = <0xfeb20000 0x10000>, 38*4882a593Smuzhiyun <0xfeb36000 0x1000>; 39*4882a593Smuzhiyun interrupts = <76>; 40*4882a593Smuzhiyun 41*4882a593Smuzhiyun clocks = <&gcc 0>, <&gcc 1>, <&gcc 3>, <&gcc 4>, <&gcc 5>, 42*4882a593Smuzhiyun <&gcc 6>, <&gcc 7>; 43*4882a593Smuzhiyun clock-names = "axi_clk", "cfg_ahb_clk", "high_speed_clk", 44*4882a593Smuzhiyun "mdio_clk", "tx_clk", "rx_clk", "sys_clk"; 45*4882a593Smuzhiyun 46*4882a593Smuzhiyun internal-phy = <&emac_sgmii>; 47*4882a593Smuzhiyun 48*4882a593Smuzhiyun phy-handle = <&phy0>; 49*4882a593Smuzhiyun 50*4882a593Smuzhiyun #address-cells = <1>; 51*4882a593Smuzhiyun #size-cells = <0>; 52*4882a593Smuzhiyun phy0: ethernet-phy@0 { 53*4882a593Smuzhiyun reg = <0>; 54*4882a593Smuzhiyun }; 55*4882a593Smuzhiyun 56*4882a593Smuzhiyun pinctrl-names = "default"; 57*4882a593Smuzhiyun pinctrl-0 = <&mdio_pins_a>; 58*4882a593Smuzhiyun }; 59*4882a593Smuzhiyun 60*4882a593Smuzhiyun emac_sgmii: ethernet@feb38000 { 61*4882a593Smuzhiyun compatible = "qcom,fsm9900-emac-sgmii"; 62*4882a593Smuzhiyun reg = <0xfeb38000 0x1000>; 63*4882a593Smuzhiyun interrupts = <80>; 64*4882a593Smuzhiyun }; 65*4882a593Smuzhiyun 66*4882a593Smuzhiyun tlmm: pinctrl@fd510000 { 67*4882a593Smuzhiyun compatible = "qcom,fsm9900-pinctrl"; 68*4882a593Smuzhiyun 69*4882a593Smuzhiyun mdio_pins_a: mdio { 70*4882a593Smuzhiyun state { 71*4882a593Smuzhiyun pins = "gpio123", "gpio124"; 72*4882a593Smuzhiyun function = "mdio"; 73*4882a593Smuzhiyun }; 74*4882a593Smuzhiyun }; 75*4882a593Smuzhiyun }; 76*4882a593Smuzhiyun 77*4882a593Smuzhiyun 78*4882a593SmuzhiyunQDF2432: 79*4882a593Smuzhiyun 80*4882a593Smuzhiyunsoc { 81*4882a593Smuzhiyun #address-cells = <2>; 82*4882a593Smuzhiyun #size-cells = <2>; 83*4882a593Smuzhiyun 84*4882a593Smuzhiyun emac0: ethernet@38800000 { 85*4882a593Smuzhiyun compatible = "qcom,fsm9900-emac"; 86*4882a593Smuzhiyun reg = <0x0 0x38800000 0x0 0x10000>, 87*4882a593Smuzhiyun <0x0 0x38816000 0x0 0x1000>; 88*4882a593Smuzhiyun interrupts = <0 256 4>; 89*4882a593Smuzhiyun 90*4882a593Smuzhiyun clocks = <&gcc 0>, <&gcc 1>, <&gcc 3>, <&gcc 4>, <&gcc 5>, 91*4882a593Smuzhiyun <&gcc 6>, <&gcc 7>; 92*4882a593Smuzhiyun clock-names = "axi_clk", "cfg_ahb_clk", "high_speed_clk", 93*4882a593Smuzhiyun "mdio_clk", "tx_clk", "rx_clk", "sys_clk"; 94*4882a593Smuzhiyun 95*4882a593Smuzhiyun internal-phy = <&emac_sgmii>; 96*4882a593Smuzhiyun 97*4882a593Smuzhiyun phy-handle = <&phy0>; 98*4882a593Smuzhiyun 99*4882a593Smuzhiyun #address-cells = <1>; 100*4882a593Smuzhiyun #size-cells = <0>; 101*4882a593Smuzhiyun phy0: ethernet-phy@4 { 102*4882a593Smuzhiyun reg = <4>; 103*4882a593Smuzhiyun }; 104*4882a593Smuzhiyun }; 105*4882a593Smuzhiyun 106*4882a593Smuzhiyun emac_sgmii: ethernet@410400 { 107*4882a593Smuzhiyun compatible = "qcom,qdf2432-emac-sgmii"; 108*4882a593Smuzhiyun reg = <0x0 0x00410400 0x0 0xc00>, /* Base address */ 109*4882a593Smuzhiyun <0x0 0x00410000 0x0 0x400>; /* Per-lane digital */ 110*4882a593Smuzhiyun interrupts = <0 254 1>; 111*4882a593Smuzhiyun }; 112