xref: /freebsd/sys/contrib/device-tree/Bindings/net/imx-dwmac.txt (revision c66ec88fed842fbaad62c30d510644ceb7bd2d71)
1*c66ec88fSEmmanuel VadotIMX8 glue layer controller, NXP imx8 families support Synopsys MAC 5.10a IP.
2*c66ec88fSEmmanuel Vadot
3*c66ec88fSEmmanuel VadotThis file documents platform glue layer for IMX.
4*c66ec88fSEmmanuel VadotPlease see stmmac.txt for the other unchanged properties.
5*c66ec88fSEmmanuel Vadot
6*c66ec88fSEmmanuel VadotThe device node has following properties.
7*c66ec88fSEmmanuel Vadot
8*c66ec88fSEmmanuel VadotRequired properties:
9*c66ec88fSEmmanuel Vadot- compatible:  Should be "nxp,imx8mp-dwmac-eqos" to select glue layer
10*c66ec88fSEmmanuel Vadot	       and "snps,dwmac-5.10a" to select IP version.
11*c66ec88fSEmmanuel Vadot- clocks: Must contain a phandle for each entry in clock-names.
12*c66ec88fSEmmanuel Vadot- clock-names: Should be "stmmaceth" for the host clock.
13*c66ec88fSEmmanuel Vadot	       Should be "pclk" for the MAC apb clock.
14*c66ec88fSEmmanuel Vadot	       Should be "ptp_ref" for the MAC timer clock.
15*c66ec88fSEmmanuel Vadot	       Should be "tx" for the MAC RGMII TX clock:
16*c66ec88fSEmmanuel Vadot	       Should be "mem" for EQOS MEM clock.
17*c66ec88fSEmmanuel Vadot		- "mem" clock is required for imx8dxl platform.
18*c66ec88fSEmmanuel Vadot		- "mem" clock is not required for imx8mp platform.
19*c66ec88fSEmmanuel Vadot- interrupt-names: Should contain a list of interrupt names corresponding to
20*c66ec88fSEmmanuel Vadot		   the interrupts in the interrupts property, if available.
21*c66ec88fSEmmanuel Vadot		   Should be "macirq" for the main MAC IRQ
22*c66ec88fSEmmanuel Vadot		   Should be "eth_wake_irq" for the IT which wake up system
23*c66ec88fSEmmanuel Vadot- intf_mode: Should be phandle/offset pair. The phandle to the syscon node which
24*c66ec88fSEmmanuel Vadot	     encompases the GPR register, and the offset of the GPR register.
25*c66ec88fSEmmanuel Vadot		- required for imx8mp platform.
26*c66ec88fSEmmanuel Vadot		- is optional for imx8dxl platform.
27*c66ec88fSEmmanuel Vadot
28*c66ec88fSEmmanuel VadotOptional properties:
29*c66ec88fSEmmanuel Vadot- intf_mode: is optional for imx8dxl platform.
30*c66ec88fSEmmanuel Vadot- snps,rmii_refclk_ext: to select RMII reference clock from external.
31*c66ec88fSEmmanuel Vadot
32*c66ec88fSEmmanuel VadotExample:
33*c66ec88fSEmmanuel Vadot	eqos: ethernet@30bf0000 {
34*c66ec88fSEmmanuel Vadot		compatible = "nxp,imx8mp-dwmac-eqos", "snps,dwmac-5.10a";
35*c66ec88fSEmmanuel Vadot		reg = <0x30bf0000 0x10000>;
36*c66ec88fSEmmanuel Vadot		interrupts = <GIC_SPI 134 IRQ_TYPE_LEVEL_HIGH>,
37*c66ec88fSEmmanuel Vadot			     <GIC_SPI 135 IRQ_TYPE_LEVEL_HIGH>;
38*c66ec88fSEmmanuel Vadot		interrupt-names = "eth_wake_irq", "macirq";
39*c66ec88fSEmmanuel Vadot		clocks = <&clk IMX8MP_CLK_ENET_QOS_ROOT>,
40*c66ec88fSEmmanuel Vadot			 <&clk IMX8MP_CLK_QOS_ENET_ROOT>,
41*c66ec88fSEmmanuel Vadot			 <&clk IMX8MP_CLK_ENET_QOS_TIMER>,
42*c66ec88fSEmmanuel Vadot			 <&clk IMX8MP_CLK_ENET_QOS>;
43*c66ec88fSEmmanuel Vadot		clock-names = "stmmaceth", "pclk", "ptp_ref", "tx";
44*c66ec88fSEmmanuel Vadot		assigned-clocks = <&clk IMX8MP_CLK_ENET_AXI>,
45*c66ec88fSEmmanuel Vadot				  <&clk IMX8MP_CLK_ENET_QOS_TIMER>,
46*c66ec88fSEmmanuel Vadot				  <&clk IMX8MP_CLK_ENET_QOS>;
47*c66ec88fSEmmanuel Vadot		assigned-clock-parents = <&clk IMX8MP_SYS_PLL1_266M>,
48*c66ec88fSEmmanuel Vadot					 <&clk IMX8MP_SYS_PLL2_100M>,
49*c66ec88fSEmmanuel Vadot					 <&clk IMX8MP_SYS_PLL2_125M>;
50*c66ec88fSEmmanuel Vadot		assigned-clock-rates = <0>, <100000000>, <125000000>;
51*c66ec88fSEmmanuel Vadot		nvmem-cells = <&eth_mac0>;
52*c66ec88fSEmmanuel Vadot		nvmem-cell-names = "mac-address";
53*c66ec88fSEmmanuel Vadot		nvmem_macaddr_swap;
54*c66ec88fSEmmanuel Vadot		intf_mode = <&gpr 0x4>;
55*c66ec88fSEmmanuel Vadot		status = "disabled";
56*c66ec88fSEmmanuel Vadot	};
57