rockchip-dwmac.txt 2.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. Rockchip SoC RK3288 10/100/1000 Ethernet driver(GMAC)
  2. The device node has following properties.
  3. Required properties:
  4. - compatible: Can be one of "rockchip,rk3288-gmac", "rockchip,rk3368-gmac"
  5. - reg: addresses and length of the register sets for the device.
  6. - interrupts: Should contain the GMAC interrupts.
  7. - interrupt-names: Should contain the interrupt names "macirq".
  8. - rockchip,grf: phandle to the syscon grf used to control speed and mode.
  9. - clocks: <&cru SCLK_MAC>: clock selector for main clock, from PLL or PHY.
  10. <&cru SCLK_MAC_PLL>: PLL clock for SCLK_MAC
  11. <&cru SCLK_MAC_RX>: clock gate for RX
  12. <&cru SCLK_MAC_TX>: clock gate for TX
  13. <&cru SCLK_MACREF>: clock gate for RMII referce clock
  14. <&cru SCLK_MACREF_OUT> clock gate for RMII reference clock output
  15. <&cru ACLK_GMAC>: AXI clock gate for GMAC
  16. <&cru PCLK_GMAC>: APB clock gate for GMAC
  17. - clock-names: One name for each entry in the clocks property.
  18. - phy-mode: See ethernet.txt file in the same directory.
  19. - pinctrl-names: Names corresponding to the numbered pinctrl states.
  20. - pinctrl-0: pin-control mode. can be <&rgmii_pins> or <&rmii_pins>.
  21. - clock_in_out: For RGMII, it must be "input", means main clock(125MHz)
  22. is not sourced from SoC's PLL, but input from PHY; For RMII, "input" means
  23. PHY provides the reference clock(50MHz), "output" means GMAC provides the
  24. reference clock.
  25. - snps,reset-gpio gpio number for phy reset.
  26. - snps,reset-active-low boolean flag to indicate if phy reset is active low.
  27. - assigned-clocks: main clock, should be <&cru SCLK_MAC>;
  28. - assigned-clock-parents = parent of main clock.
  29. can be <&ext_gmac> or <&cru SCLK_MAC_PLL>.
  30. Optional properties:
  31. - tx_delay: Delay value for TXD timing. Range value is 0~0x7F, 0x30 as default.
  32. - rx_delay: Delay value for RXD timing. Range value is 0~0x7F, 0x10 as default.
  33. - phy-supply: phandle to a regulator if the PHY needs one
  34. Example:
  35. gmac: ethernet@ff290000 {
  36. compatible = "rockchip,rk3288-gmac";
  37. reg = <0xff290000 0x10000>;
  38. interrupts = <GIC_SPI 27 IRQ_TYPE_LEVEL_HIGH>;
  39. interrupt-names = "macirq";
  40. rockchip,grf = <&grf>;
  41. clocks = <&cru SCLK_MAC>,
  42. <&cru SCLK_MAC_RX>, <&cru SCLK_MAC_TX>,
  43. <&cru SCLK_MACREF>, <&cru SCLK_MACREF_OUT>,
  44. <&cru ACLK_GMAC>, <&cru PCLK_GMAC>;
  45. clock-names = "stmmaceth",
  46. "mac_clk_rx", "mac_clk_tx",
  47. "clk_mac_ref", "clk_mac_refout",
  48. "aclk_mac", "pclk_mac";
  49. phy-mode = "rgmii";
  50. pinctrl-names = "default";
  51. pinctrl-0 = <&rgmii_pins /*&rmii_pins*/>;
  52. clock_in_out = "input";
  53. snps,reset-gpio = <&gpio4 7 0>;
  54. snps,reset-active-low;
  55. assigned-clocks = <&cru SCLK_MAC>;
  56. assigned-clock-parents = <&ext_gmac>;
  57. tx_delay = <0x30>;
  58. rx_delay = <0x10>;
  59. status = "ok";
  60. };