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