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