mediatek,star-emac.yaml 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  1. # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
  2. %YAML 1.2
  3. ---
  4. $id: http://devicetree.org/schemas/net/mediatek,star-emac.yaml#
  5. $schema: http://devicetree.org/meta-schemas/core.yaml#
  6. title: MediaTek STAR Ethernet MAC Controller
  7. maintainers:
  8. - Bartosz Golaszewski <bgolaszewski@baylibre.com>
  9. description:
  10. This Ethernet MAC is used on the MT8* family of SoCs from MediaTek.
  11. It's compliant with 802.3 standards and supports half- and full-duplex
  12. modes with flow-control as well as CRC offloading and VLAN tags.
  13. allOf:
  14. - $ref: ethernet-controller.yaml#
  15. properties:
  16. compatible:
  17. enum:
  18. - mediatek,mt8516-eth
  19. - mediatek,mt8518-eth
  20. - mediatek,mt8175-eth
  21. - mediatek,mt8365-eth
  22. reg:
  23. maxItems: 1
  24. interrupts:
  25. maxItems: 1
  26. clocks:
  27. minItems: 3
  28. maxItems: 3
  29. clock-names:
  30. additionalItems: false
  31. items:
  32. - const: core
  33. - const: reg
  34. - const: trans
  35. mediatek,pericfg:
  36. $ref: /schemas/types.yaml#/definitions/phandle
  37. description:
  38. Phandle to the device containing the PERICFG register range. This is used
  39. to control the MII mode.
  40. mediatek,rmii-rxc:
  41. type: boolean
  42. description:
  43. If present, indicates that the RMII reference clock, which is from external
  44. PHYs, is connected to RXC pin. Otherwise, is connected to TXC pin.
  45. mediatek,rxc-inverse:
  46. type: boolean
  47. description:
  48. If present, indicates that clock on RXC pad will be inversed.
  49. mediatek,txc-inverse:
  50. type: boolean
  51. description:
  52. If present, indicates that clock on TXC pad will be inversed.
  53. mdio:
  54. $ref: mdio.yaml#
  55. unevaluatedProperties: false
  56. required:
  57. - compatible
  58. - reg
  59. - interrupts
  60. - clocks
  61. - clock-names
  62. - mediatek,pericfg
  63. - phy-handle
  64. unevaluatedProperties: false
  65. examples:
  66. - |
  67. #include <dt-bindings/interrupt-controller/arm-gic.h>
  68. #include <dt-bindings/clock/mt8516-clk.h>
  69. ethernet: ethernet@11180000 {
  70. compatible = "mediatek,mt8516-eth";
  71. reg = <0x11180000 0x1000>;
  72. mediatek,pericfg = <&pericfg>;
  73. interrupts = <GIC_SPI 111 IRQ_TYPE_LEVEL_LOW>;
  74. clocks = <&topckgen CLK_TOP_RG_ETH>,
  75. <&topckgen CLK_TOP_66M_ETH>,
  76. <&topckgen CLK_TOP_133M_ETH>;
  77. clock-names = "core", "reg", "trans";
  78. phy-handle = <&eth_phy>;
  79. phy-mode = "rmii";
  80. mdio {
  81. #address-cells = <1>;
  82. #size-cells = <0>;
  83. eth_phy: ethernet-phy@0 {
  84. reg = <0>;
  85. };
  86. };
  87. };