1d5b0e70fSEmmanuel Vadot# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 2d5b0e70fSEmmanuel Vadot%YAML 1.2 3d5b0e70fSEmmanuel Vadot--- 4d5b0e70fSEmmanuel Vadot$id: http://devicetree.org/schemas/net/mediatek,net.yaml# 5d5b0e70fSEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml# 6d5b0e70fSEmmanuel Vadot 7d5b0e70fSEmmanuel Vadottitle: MediaTek Frame Engine Ethernet controller 8d5b0e70fSEmmanuel Vadot 9d5b0e70fSEmmanuel Vadotmaintainers: 10d5b0e70fSEmmanuel Vadot - Lorenzo Bianconi <lorenzo@kernel.org> 11d5b0e70fSEmmanuel Vadot - Felix Fietkau <nbd@nbd.name> 12d5b0e70fSEmmanuel Vadot 13d5b0e70fSEmmanuel Vadotdescription: 14d5b0e70fSEmmanuel Vadot The frame engine ethernet controller can be found on MediaTek SoCs. These SoCs 15d5b0e70fSEmmanuel Vadot have dual GMAC ports. 16d5b0e70fSEmmanuel Vadot 17d5b0e70fSEmmanuel Vadotproperties: 18d5b0e70fSEmmanuel Vadot compatible: 19d5b0e70fSEmmanuel Vadot enum: 20d5b0e70fSEmmanuel Vadot - mediatek,mt2701-eth 21d5b0e70fSEmmanuel Vadot - mediatek,mt7623-eth 22*aa1a8ff2SEmmanuel Vadot - mediatek,mt7621-eth 23d5b0e70fSEmmanuel Vadot - mediatek,mt7622-eth 24d5b0e70fSEmmanuel Vadot - mediatek,mt7629-eth 25fac71e4eSEmmanuel Vadot - mediatek,mt7981-eth 26d5b0e70fSEmmanuel Vadot - mediatek,mt7986-eth 27*aa1a8ff2SEmmanuel Vadot - mediatek,mt7988-eth 28d5b0e70fSEmmanuel Vadot - ralink,rt5350-eth 29d5b0e70fSEmmanuel Vadot 30d5b0e70fSEmmanuel Vadot reg: 31d5b0e70fSEmmanuel Vadot maxItems: 1 32d5b0e70fSEmmanuel Vadot 33d5b0e70fSEmmanuel Vadot clocks: true 34d5b0e70fSEmmanuel Vadot clock-names: true 35d5b0e70fSEmmanuel Vadot 36d5b0e70fSEmmanuel Vadot interrupts: 37*aa1a8ff2SEmmanuel Vadot minItems: 1 38d5b0e70fSEmmanuel Vadot maxItems: 4 39d5b0e70fSEmmanuel Vadot 40d5b0e70fSEmmanuel Vadot power-domains: 41d5b0e70fSEmmanuel Vadot maxItems: 1 42d5b0e70fSEmmanuel Vadot 43d5b0e70fSEmmanuel Vadot resets: 44d5b0e70fSEmmanuel Vadot maxItems: 3 45d5b0e70fSEmmanuel Vadot 46d5b0e70fSEmmanuel Vadot reset-names: 47d5b0e70fSEmmanuel Vadot items: 48d5b0e70fSEmmanuel Vadot - const: fe 49d5b0e70fSEmmanuel Vadot - const: gmac 50d5b0e70fSEmmanuel Vadot - const: ppe 51d5b0e70fSEmmanuel Vadot 52d5b0e70fSEmmanuel Vadot mediatek,ethsys: 53d5b0e70fSEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/phandle 54d5b0e70fSEmmanuel Vadot description: 55d5b0e70fSEmmanuel Vadot Phandle to the syscon node that handles the port setup. 56d5b0e70fSEmmanuel Vadot 57d5b0e70fSEmmanuel Vadot cci-control-port: true 58d5b0e70fSEmmanuel Vadot 59d5b0e70fSEmmanuel Vadot mediatek,hifsys: 60d5b0e70fSEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/phandle 61d5b0e70fSEmmanuel Vadot description: 62d5b0e70fSEmmanuel Vadot Phandle to the mediatek hifsys controller used to provide various clocks 63d5b0e70fSEmmanuel Vadot and reset to the system. 64d5b0e70fSEmmanuel Vadot 65*aa1a8ff2SEmmanuel Vadot mediatek,infracfg: 66*aa1a8ff2SEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/phandle 67*aa1a8ff2SEmmanuel Vadot description: 68*aa1a8ff2SEmmanuel Vadot Phandle to the syscon node that handles the path from GMAC to 69*aa1a8ff2SEmmanuel Vadot PHY variants. 70*aa1a8ff2SEmmanuel Vadot 71d5b0e70fSEmmanuel Vadot mediatek,sgmiisys: 72d5b0e70fSEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/phandle-array 73d5b0e70fSEmmanuel Vadot minItems: 1 74d5b0e70fSEmmanuel Vadot maxItems: 2 75d5b0e70fSEmmanuel Vadot items: 76d5b0e70fSEmmanuel Vadot maxItems: 1 77d5b0e70fSEmmanuel Vadot description: 78d5b0e70fSEmmanuel Vadot A list of phandle to the syscon node that handles the SGMII setup which is required for 79d5b0e70fSEmmanuel Vadot those SoCs equipped with SGMII. 80d5b0e70fSEmmanuel Vadot 817ef62cebSEmmanuel Vadot mediatek,wed: 827ef62cebSEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/phandle-array 837ef62cebSEmmanuel Vadot minItems: 2 847ef62cebSEmmanuel Vadot maxItems: 2 857ef62cebSEmmanuel Vadot items: 867ef62cebSEmmanuel Vadot maxItems: 1 877ef62cebSEmmanuel Vadot description: 887ef62cebSEmmanuel Vadot List of phandles to wireless ethernet dispatch nodes. 897ef62cebSEmmanuel Vadot 90fac71e4eSEmmanuel Vadot mediatek,wed-pcie: 91fac71e4eSEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/phandle 92fac71e4eSEmmanuel Vadot description: 93fac71e4eSEmmanuel Vadot Phandle to the mediatek wed-pcie controller. 94fac71e4eSEmmanuel Vadot 95d5b0e70fSEmmanuel Vadot dma-coherent: true 96d5b0e70fSEmmanuel Vadot 97d5b0e70fSEmmanuel Vadot mdio-bus: 98d5b0e70fSEmmanuel Vadot $ref: mdio.yaml# 99d5b0e70fSEmmanuel Vadot unevaluatedProperties: false 100d5b0e70fSEmmanuel Vadot 101d5b0e70fSEmmanuel Vadot "#address-cells": 102d5b0e70fSEmmanuel Vadot const: 1 103d5b0e70fSEmmanuel Vadot 104d5b0e70fSEmmanuel Vadot "#size-cells": 105d5b0e70fSEmmanuel Vadot const: 0 106d5b0e70fSEmmanuel Vadot 107d5b0e70fSEmmanuel VadotallOf: 108fac71e4eSEmmanuel Vadot - $ref: ethernet-controller.yaml# 109d5b0e70fSEmmanuel Vadot - if: 110d5b0e70fSEmmanuel Vadot properties: 111d5b0e70fSEmmanuel Vadot compatible: 112d5b0e70fSEmmanuel Vadot contains: 113d5b0e70fSEmmanuel Vadot enum: 114d5b0e70fSEmmanuel Vadot - mediatek,mt2701-eth 115d5b0e70fSEmmanuel Vadot - mediatek,mt7623-eth 116d5b0e70fSEmmanuel Vadot then: 117d5b0e70fSEmmanuel Vadot properties: 118d5b0e70fSEmmanuel Vadot interrupts: 119d5b0e70fSEmmanuel Vadot maxItems: 3 120d5b0e70fSEmmanuel Vadot 121d5b0e70fSEmmanuel Vadot clocks: 122d5b0e70fSEmmanuel Vadot minItems: 4 123d5b0e70fSEmmanuel Vadot maxItems: 4 124d5b0e70fSEmmanuel Vadot 125d5b0e70fSEmmanuel Vadot clock-names: 126d5b0e70fSEmmanuel Vadot items: 127d5b0e70fSEmmanuel Vadot - const: ethif 128d5b0e70fSEmmanuel Vadot - const: esw 129d5b0e70fSEmmanuel Vadot - const: gp1 130d5b0e70fSEmmanuel Vadot - const: gp2 131d5b0e70fSEmmanuel Vadot 132*aa1a8ff2SEmmanuel Vadot mediatek,infracfg: false 133*aa1a8ff2SEmmanuel Vadot 134d5b0e70fSEmmanuel Vadot mediatek,pctl: 135d5b0e70fSEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/phandle 136d5b0e70fSEmmanuel Vadot description: 137d5b0e70fSEmmanuel Vadot Phandle to the syscon node that handles the ports slew rate and 138d5b0e70fSEmmanuel Vadot driver current. 139d5b0e70fSEmmanuel Vadot 1407ef62cebSEmmanuel Vadot mediatek,wed: false 1417ef62cebSEmmanuel Vadot 142fac71e4eSEmmanuel Vadot mediatek,wed-pcie: false 143fac71e4eSEmmanuel Vadot 144d5b0e70fSEmmanuel Vadot - if: 145d5b0e70fSEmmanuel Vadot properties: 146d5b0e70fSEmmanuel Vadot compatible: 147d5b0e70fSEmmanuel Vadot contains: 148*aa1a8ff2SEmmanuel Vadot enum: 149*aa1a8ff2SEmmanuel Vadot - mediatek,mt7621-eth 150*aa1a8ff2SEmmanuel Vadot then: 151*aa1a8ff2SEmmanuel Vadot properties: 152*aa1a8ff2SEmmanuel Vadot interrupts: 153*aa1a8ff2SEmmanuel Vadot maxItems: 1 154*aa1a8ff2SEmmanuel Vadot 155*aa1a8ff2SEmmanuel Vadot clocks: 156*aa1a8ff2SEmmanuel Vadot minItems: 2 157*aa1a8ff2SEmmanuel Vadot maxItems: 2 158*aa1a8ff2SEmmanuel Vadot 159*aa1a8ff2SEmmanuel Vadot clock-names: 160*aa1a8ff2SEmmanuel Vadot items: 161*aa1a8ff2SEmmanuel Vadot - const: ethif 162*aa1a8ff2SEmmanuel Vadot - const: fe 163*aa1a8ff2SEmmanuel Vadot 164*aa1a8ff2SEmmanuel Vadot mediatek,infracfg: false 165*aa1a8ff2SEmmanuel Vadot 166*aa1a8ff2SEmmanuel Vadot mediatek,wed: false 167*aa1a8ff2SEmmanuel Vadot 168*aa1a8ff2SEmmanuel Vadot mediatek,wed-pcie: false 169*aa1a8ff2SEmmanuel Vadot 170*aa1a8ff2SEmmanuel Vadot - if: 171*aa1a8ff2SEmmanuel Vadot properties: 172*aa1a8ff2SEmmanuel Vadot compatible: 173*aa1a8ff2SEmmanuel Vadot contains: 174d5b0e70fSEmmanuel Vadot const: mediatek,mt7622-eth 175d5b0e70fSEmmanuel Vadot then: 176d5b0e70fSEmmanuel Vadot properties: 177d5b0e70fSEmmanuel Vadot interrupts: 178d5b0e70fSEmmanuel Vadot maxItems: 3 179d5b0e70fSEmmanuel Vadot 180d5b0e70fSEmmanuel Vadot clocks: 181d5b0e70fSEmmanuel Vadot minItems: 11 182d5b0e70fSEmmanuel Vadot maxItems: 11 183d5b0e70fSEmmanuel Vadot 184d5b0e70fSEmmanuel Vadot clock-names: 185d5b0e70fSEmmanuel Vadot items: 186d5b0e70fSEmmanuel Vadot - const: ethif 187d5b0e70fSEmmanuel Vadot - const: esw 188d5b0e70fSEmmanuel Vadot - const: gp0 189d5b0e70fSEmmanuel Vadot - const: gp1 190d5b0e70fSEmmanuel Vadot - const: gp2 191d5b0e70fSEmmanuel Vadot - const: sgmii_tx250m 192d5b0e70fSEmmanuel Vadot - const: sgmii_rx250m 193d5b0e70fSEmmanuel Vadot - const: sgmii_cdr_ref 194d5b0e70fSEmmanuel Vadot - const: sgmii_cdr_fb 195d5b0e70fSEmmanuel Vadot - const: sgmii_ck 196d5b0e70fSEmmanuel Vadot - const: eth2pll 197d5b0e70fSEmmanuel Vadot 198*aa1a8ff2SEmmanuel Vadot mediatek,infracfg: false 199*aa1a8ff2SEmmanuel Vadot 200d5b0e70fSEmmanuel Vadot mediatek,sgmiisys: 201d5b0e70fSEmmanuel Vadot minItems: 1 202d5b0e70fSEmmanuel Vadot maxItems: 1 203d5b0e70fSEmmanuel Vadot 204d5b0e70fSEmmanuel Vadot mediatek,pcie-mirror: 205d5b0e70fSEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/phandle 206d5b0e70fSEmmanuel Vadot description: 207d5b0e70fSEmmanuel Vadot Phandle to the mediatek pcie-mirror controller. 208d5b0e70fSEmmanuel Vadot 209fac71e4eSEmmanuel Vadot mediatek,wed-pcie: false 210fac71e4eSEmmanuel Vadot 211d5b0e70fSEmmanuel Vadot - if: 212d5b0e70fSEmmanuel Vadot properties: 213d5b0e70fSEmmanuel Vadot compatible: 214d5b0e70fSEmmanuel Vadot contains: 215d5b0e70fSEmmanuel Vadot const: mediatek,mt7629-eth 216d5b0e70fSEmmanuel Vadot then: 217d5b0e70fSEmmanuel Vadot properties: 218d5b0e70fSEmmanuel Vadot interrupts: 219d5b0e70fSEmmanuel Vadot maxItems: 3 220d5b0e70fSEmmanuel Vadot 221d5b0e70fSEmmanuel Vadot clocks: 222d5b0e70fSEmmanuel Vadot minItems: 17 223d5b0e70fSEmmanuel Vadot maxItems: 17 224d5b0e70fSEmmanuel Vadot 225d5b0e70fSEmmanuel Vadot clock-names: 226d5b0e70fSEmmanuel Vadot items: 227d5b0e70fSEmmanuel Vadot - const: ethif 228d5b0e70fSEmmanuel Vadot - const: sgmiitop 229d5b0e70fSEmmanuel Vadot - const: esw 230d5b0e70fSEmmanuel Vadot - const: gp0 231d5b0e70fSEmmanuel Vadot - const: gp1 232d5b0e70fSEmmanuel Vadot - const: gp2 233d5b0e70fSEmmanuel Vadot - const: fe 234d5b0e70fSEmmanuel Vadot - const: sgmii_tx250m 235d5b0e70fSEmmanuel Vadot - const: sgmii_rx250m 236d5b0e70fSEmmanuel Vadot - const: sgmii_cdr_ref 237d5b0e70fSEmmanuel Vadot - const: sgmii_cdr_fb 238d5b0e70fSEmmanuel Vadot - const: sgmii2_tx250m 239d5b0e70fSEmmanuel Vadot - const: sgmii2_rx250m 240d5b0e70fSEmmanuel Vadot - const: sgmii2_cdr_ref 241d5b0e70fSEmmanuel Vadot - const: sgmii2_cdr_fb 242d5b0e70fSEmmanuel Vadot - const: sgmii_ck 243d5b0e70fSEmmanuel Vadot - const: eth2pll 244d5b0e70fSEmmanuel Vadot 245d5b0e70fSEmmanuel Vadot mediatek,sgmiisys: 246d5b0e70fSEmmanuel Vadot minItems: 2 247d5b0e70fSEmmanuel Vadot maxItems: 2 248d5b0e70fSEmmanuel Vadot 2497ef62cebSEmmanuel Vadot mediatek,wed: false 2507ef62cebSEmmanuel Vadot 251fac71e4eSEmmanuel Vadot mediatek,wed-pcie: false 252fac71e4eSEmmanuel Vadot 253fac71e4eSEmmanuel Vadot - if: 254fac71e4eSEmmanuel Vadot properties: 255fac71e4eSEmmanuel Vadot compatible: 256fac71e4eSEmmanuel Vadot contains: 257fac71e4eSEmmanuel Vadot const: mediatek,mt7981-eth 258fac71e4eSEmmanuel Vadot then: 259fac71e4eSEmmanuel Vadot properties: 260fac71e4eSEmmanuel Vadot interrupts: 261fac71e4eSEmmanuel Vadot minItems: 4 262fac71e4eSEmmanuel Vadot 263fac71e4eSEmmanuel Vadot clocks: 264fac71e4eSEmmanuel Vadot minItems: 15 265fac71e4eSEmmanuel Vadot maxItems: 15 266fac71e4eSEmmanuel Vadot 267fac71e4eSEmmanuel Vadot clock-names: 268fac71e4eSEmmanuel Vadot items: 269fac71e4eSEmmanuel Vadot - const: fe 270fac71e4eSEmmanuel Vadot - const: gp2 271fac71e4eSEmmanuel Vadot - const: gp1 272fac71e4eSEmmanuel Vadot - const: wocpu0 273fac71e4eSEmmanuel Vadot - const: sgmii_ck 274fac71e4eSEmmanuel Vadot - const: sgmii_tx250m 275fac71e4eSEmmanuel Vadot - const: sgmii_rx250m 276fac71e4eSEmmanuel Vadot - const: sgmii_cdr_ref 277fac71e4eSEmmanuel Vadot - const: sgmii_cdr_fb 278fac71e4eSEmmanuel Vadot - const: sgmii2_tx250m 279fac71e4eSEmmanuel Vadot - const: sgmii2_rx250m 280fac71e4eSEmmanuel Vadot - const: sgmii2_cdr_ref 281fac71e4eSEmmanuel Vadot - const: sgmii2_cdr_fb 282fac71e4eSEmmanuel Vadot - const: netsys0 283fac71e4eSEmmanuel Vadot - const: netsys1 284fac71e4eSEmmanuel Vadot 285*aa1a8ff2SEmmanuel Vadot mediatek,infracfg: false 286*aa1a8ff2SEmmanuel Vadot 287fac71e4eSEmmanuel Vadot mediatek,sgmiisys: 288fac71e4eSEmmanuel Vadot minItems: 2 289fac71e4eSEmmanuel Vadot maxItems: 2 290fac71e4eSEmmanuel Vadot 291d5b0e70fSEmmanuel Vadot - if: 292d5b0e70fSEmmanuel Vadot properties: 293d5b0e70fSEmmanuel Vadot compatible: 294d5b0e70fSEmmanuel Vadot contains: 295d5b0e70fSEmmanuel Vadot const: mediatek,mt7986-eth 296d5b0e70fSEmmanuel Vadot then: 297d5b0e70fSEmmanuel Vadot properties: 298d5b0e70fSEmmanuel Vadot interrupts: 299d5b0e70fSEmmanuel Vadot minItems: 4 300d5b0e70fSEmmanuel Vadot 301d5b0e70fSEmmanuel Vadot clocks: 302d5b0e70fSEmmanuel Vadot minItems: 15 303d5b0e70fSEmmanuel Vadot maxItems: 15 304d5b0e70fSEmmanuel Vadot 305d5b0e70fSEmmanuel Vadot clock-names: 306d5b0e70fSEmmanuel Vadot items: 307d5b0e70fSEmmanuel Vadot - const: fe 308d5b0e70fSEmmanuel Vadot - const: gp2 309d5b0e70fSEmmanuel Vadot - const: gp1 310d5b0e70fSEmmanuel Vadot - const: wocpu1 311d5b0e70fSEmmanuel Vadot - const: wocpu0 312d5b0e70fSEmmanuel Vadot - const: sgmii_tx250m 313d5b0e70fSEmmanuel Vadot - const: sgmii_rx250m 314d5b0e70fSEmmanuel Vadot - const: sgmii_cdr_ref 315d5b0e70fSEmmanuel Vadot - const: sgmii_cdr_fb 316d5b0e70fSEmmanuel Vadot - const: sgmii2_tx250m 317d5b0e70fSEmmanuel Vadot - const: sgmii2_rx250m 318d5b0e70fSEmmanuel Vadot - const: sgmii2_cdr_ref 319d5b0e70fSEmmanuel Vadot - const: sgmii2_cdr_fb 320d5b0e70fSEmmanuel Vadot - const: netsys0 321d5b0e70fSEmmanuel Vadot - const: netsys1 322d5b0e70fSEmmanuel Vadot 323*aa1a8ff2SEmmanuel Vadot mediatek,infracfg: false 324*aa1a8ff2SEmmanuel Vadot 325*aa1a8ff2SEmmanuel Vadot mediatek,sgmiisys: 326*aa1a8ff2SEmmanuel Vadot minItems: 2 327*aa1a8ff2SEmmanuel Vadot maxItems: 2 328*aa1a8ff2SEmmanuel Vadot 329*aa1a8ff2SEmmanuel Vadot - if: 330*aa1a8ff2SEmmanuel Vadot properties: 331*aa1a8ff2SEmmanuel Vadot compatible: 332*aa1a8ff2SEmmanuel Vadot contains: 333*aa1a8ff2SEmmanuel Vadot const: mediatek,mt7988-eth 334*aa1a8ff2SEmmanuel Vadot then: 335*aa1a8ff2SEmmanuel Vadot properties: 336*aa1a8ff2SEmmanuel Vadot interrupts: 337*aa1a8ff2SEmmanuel Vadot minItems: 4 338*aa1a8ff2SEmmanuel Vadot 339*aa1a8ff2SEmmanuel Vadot clocks: 340*aa1a8ff2SEmmanuel Vadot minItems: 34 341*aa1a8ff2SEmmanuel Vadot maxItems: 34 342*aa1a8ff2SEmmanuel Vadot 343*aa1a8ff2SEmmanuel Vadot clock-names: 344*aa1a8ff2SEmmanuel Vadot items: 345*aa1a8ff2SEmmanuel Vadot - const: crypto 346*aa1a8ff2SEmmanuel Vadot - const: fe 347*aa1a8ff2SEmmanuel Vadot - const: gp2 348*aa1a8ff2SEmmanuel Vadot - const: gp1 349*aa1a8ff2SEmmanuel Vadot - const: gp3 350*aa1a8ff2SEmmanuel Vadot - const: ethwarp_wocpu2 351*aa1a8ff2SEmmanuel Vadot - const: ethwarp_wocpu1 352*aa1a8ff2SEmmanuel Vadot - const: ethwarp_wocpu0 353*aa1a8ff2SEmmanuel Vadot - const: esw 354*aa1a8ff2SEmmanuel Vadot - const: netsys0 355*aa1a8ff2SEmmanuel Vadot - const: netsys1 356*aa1a8ff2SEmmanuel Vadot - const: sgmii_tx250m 357*aa1a8ff2SEmmanuel Vadot - const: sgmii_rx250m 358*aa1a8ff2SEmmanuel Vadot - const: sgmii2_tx250m 359*aa1a8ff2SEmmanuel Vadot - const: sgmii2_rx250m 360*aa1a8ff2SEmmanuel Vadot - const: top_usxgmii0_sel 361*aa1a8ff2SEmmanuel Vadot - const: top_usxgmii1_sel 362*aa1a8ff2SEmmanuel Vadot - const: top_sgm0_sel 363*aa1a8ff2SEmmanuel Vadot - const: top_sgm1_sel 364*aa1a8ff2SEmmanuel Vadot - const: top_xfi_phy0_xtal_sel 365*aa1a8ff2SEmmanuel Vadot - const: top_xfi_phy1_xtal_sel 366*aa1a8ff2SEmmanuel Vadot - const: top_eth_gmii_sel 367*aa1a8ff2SEmmanuel Vadot - const: top_eth_refck_50m_sel 368*aa1a8ff2SEmmanuel Vadot - const: top_eth_sys_200m_sel 369*aa1a8ff2SEmmanuel Vadot - const: top_eth_sys_sel 370*aa1a8ff2SEmmanuel Vadot - const: top_eth_xgmii_sel 371*aa1a8ff2SEmmanuel Vadot - const: top_eth_mii_sel 372*aa1a8ff2SEmmanuel Vadot - const: top_netsys_sel 373*aa1a8ff2SEmmanuel Vadot - const: top_netsys_500m_sel 374*aa1a8ff2SEmmanuel Vadot - const: top_netsys_pao_2x_sel 375*aa1a8ff2SEmmanuel Vadot - const: top_netsys_sync_250m_sel 376*aa1a8ff2SEmmanuel Vadot - const: top_netsys_ppefb_250m_sel 377*aa1a8ff2SEmmanuel Vadot - const: top_netsys_warp_sel 378*aa1a8ff2SEmmanuel Vadot - const: wocpu1 379*aa1a8ff2SEmmanuel Vadot - const: wocpu0 380*aa1a8ff2SEmmanuel Vadot - const: xgp1 381*aa1a8ff2SEmmanuel Vadot - const: xgp2 382*aa1a8ff2SEmmanuel Vadot - const: xgp3 383*aa1a8ff2SEmmanuel Vadot 384d5b0e70fSEmmanuel Vadot mediatek,sgmiisys: 385d5b0e70fSEmmanuel Vadot minItems: 2 386d5b0e70fSEmmanuel Vadot maxItems: 2 387d5b0e70fSEmmanuel Vadot 388d5b0e70fSEmmanuel VadotpatternProperties: 389d5b0e70fSEmmanuel Vadot "^mac@[0-1]$": 390d5b0e70fSEmmanuel Vadot type: object 391f126890aSEmmanuel Vadot unevaluatedProperties: false 392d5b0e70fSEmmanuel Vadot allOf: 393d5b0e70fSEmmanuel Vadot - $ref: ethernet-controller.yaml# 394d5b0e70fSEmmanuel Vadot description: 395d5b0e70fSEmmanuel Vadot Ethernet MAC node 396d5b0e70fSEmmanuel Vadot properties: 397d5b0e70fSEmmanuel Vadot compatible: 398d5b0e70fSEmmanuel Vadot const: mediatek,eth-mac 399d5b0e70fSEmmanuel Vadot 400d5b0e70fSEmmanuel Vadot reg: 401d5b0e70fSEmmanuel Vadot maxItems: 1 402d5b0e70fSEmmanuel Vadot 403d5b0e70fSEmmanuel Vadot required: 404d5b0e70fSEmmanuel Vadot - reg 405d5b0e70fSEmmanuel Vadot - compatible 406d5b0e70fSEmmanuel Vadot 407d5b0e70fSEmmanuel Vadotrequired: 408d5b0e70fSEmmanuel Vadot - compatible 409d5b0e70fSEmmanuel Vadot - reg 410d5b0e70fSEmmanuel Vadot - interrupts 411d5b0e70fSEmmanuel Vadot - clocks 412d5b0e70fSEmmanuel Vadot - clock-names 413d5b0e70fSEmmanuel Vadot - mediatek,ethsys 414d5b0e70fSEmmanuel Vadot 415d5b0e70fSEmmanuel VadotunevaluatedProperties: false 416d5b0e70fSEmmanuel Vadot 417d5b0e70fSEmmanuel Vadotexamples: 418d5b0e70fSEmmanuel Vadot - | 419d5b0e70fSEmmanuel Vadot #include <dt-bindings/interrupt-controller/arm-gic.h> 420d5b0e70fSEmmanuel Vadot #include <dt-bindings/interrupt-controller/irq.h> 421d5b0e70fSEmmanuel Vadot #include <dt-bindings/clock/mt7622-clk.h> 422d5b0e70fSEmmanuel Vadot #include <dt-bindings/power/mt7622-power.h> 423d5b0e70fSEmmanuel Vadot 424d5b0e70fSEmmanuel Vadot soc { 425d5b0e70fSEmmanuel Vadot #address-cells = <2>; 426d5b0e70fSEmmanuel Vadot #size-cells = <2>; 427d5b0e70fSEmmanuel Vadot 428d5b0e70fSEmmanuel Vadot ethernet: ethernet@1b100000 { 429d5b0e70fSEmmanuel Vadot compatible = "mediatek,mt7622-eth"; 430d5b0e70fSEmmanuel Vadot reg = <0 0x1b100000 0 0x20000>; 431d5b0e70fSEmmanuel Vadot interrupts = <GIC_SPI 223 IRQ_TYPE_LEVEL_LOW>, 432d5b0e70fSEmmanuel Vadot <GIC_SPI 224 IRQ_TYPE_LEVEL_LOW>, 433d5b0e70fSEmmanuel Vadot <GIC_SPI 225 IRQ_TYPE_LEVEL_LOW>; 434d5b0e70fSEmmanuel Vadot clocks = <&topckgen CLK_TOP_ETH_SEL>, 435d5b0e70fSEmmanuel Vadot <ðsys CLK_ETH_ESW_EN>, 436d5b0e70fSEmmanuel Vadot <ðsys CLK_ETH_GP0_EN>, 437d5b0e70fSEmmanuel Vadot <ðsys CLK_ETH_GP1_EN>, 438d5b0e70fSEmmanuel Vadot <ðsys CLK_ETH_GP2_EN>, 439d5b0e70fSEmmanuel Vadot <&sgmiisys CLK_SGMII_TX250M_EN>, 440d5b0e70fSEmmanuel Vadot <&sgmiisys CLK_SGMII_RX250M_EN>, 441d5b0e70fSEmmanuel Vadot <&sgmiisys CLK_SGMII_CDR_REF>, 442d5b0e70fSEmmanuel Vadot <&sgmiisys CLK_SGMII_CDR_FB>, 443d5b0e70fSEmmanuel Vadot <&topckgen CLK_TOP_SGMIIPLL>, 444d5b0e70fSEmmanuel Vadot <&apmixedsys CLK_APMIXED_ETH2PLL>; 445d5b0e70fSEmmanuel Vadot clock-names = "ethif", "esw", "gp0", "gp1", "gp2", 446d5b0e70fSEmmanuel Vadot "sgmii_tx250m", "sgmii_rx250m", 447d5b0e70fSEmmanuel Vadot "sgmii_cdr_ref", "sgmii_cdr_fb", "sgmii_ck", 448d5b0e70fSEmmanuel Vadot "eth2pll"; 449d5b0e70fSEmmanuel Vadot power-domains = <&scpsys MT7622_POWER_DOMAIN_ETHSYS>; 450d5b0e70fSEmmanuel Vadot mediatek,ethsys = <ðsys>; 451d5b0e70fSEmmanuel Vadot mediatek,sgmiisys = <&sgmiisys>; 452d5b0e70fSEmmanuel Vadot cci-control-port = <&cci_control2>; 453d5b0e70fSEmmanuel Vadot mediatek,pcie-mirror = <&pcie_mirror>; 454d5b0e70fSEmmanuel Vadot mediatek,hifsys = <&hifsys>; 455d5b0e70fSEmmanuel Vadot dma-coherent; 456d5b0e70fSEmmanuel Vadot 457d5b0e70fSEmmanuel Vadot #address-cells = <1>; 458d5b0e70fSEmmanuel Vadot #size-cells = <0>; 459d5b0e70fSEmmanuel Vadot 460d5b0e70fSEmmanuel Vadot mdio0: mdio-bus { 461d5b0e70fSEmmanuel Vadot #address-cells = <1>; 462d5b0e70fSEmmanuel Vadot #size-cells = <0>; 463d5b0e70fSEmmanuel Vadot 464d5b0e70fSEmmanuel Vadot phy0: ethernet-phy@0 { 465d5b0e70fSEmmanuel Vadot reg = <0>; 466d5b0e70fSEmmanuel Vadot }; 467d5b0e70fSEmmanuel Vadot 468d5b0e70fSEmmanuel Vadot phy1: ethernet-phy@1 { 469d5b0e70fSEmmanuel Vadot reg = <1>; 470d5b0e70fSEmmanuel Vadot }; 471d5b0e70fSEmmanuel Vadot }; 472d5b0e70fSEmmanuel Vadot 473d5b0e70fSEmmanuel Vadot gmac0: mac@0 { 474d5b0e70fSEmmanuel Vadot compatible = "mediatek,eth-mac"; 475d5b0e70fSEmmanuel Vadot phy-mode = "rgmii"; 476d5b0e70fSEmmanuel Vadot phy-handle = <&phy0>; 477d5b0e70fSEmmanuel Vadot reg = <0>; 478d5b0e70fSEmmanuel Vadot }; 479d5b0e70fSEmmanuel Vadot 480d5b0e70fSEmmanuel Vadot gmac1: mac@1 { 481d5b0e70fSEmmanuel Vadot compatible = "mediatek,eth-mac"; 482d5b0e70fSEmmanuel Vadot phy-mode = "rgmii"; 483d5b0e70fSEmmanuel Vadot phy-handle = <&phy1>; 484d5b0e70fSEmmanuel Vadot reg = <1>; 485d5b0e70fSEmmanuel Vadot }; 486d5b0e70fSEmmanuel Vadot }; 487d5b0e70fSEmmanuel Vadot }; 488d5b0e70fSEmmanuel Vadot 489d5b0e70fSEmmanuel Vadot - | 490d5b0e70fSEmmanuel Vadot #include <dt-bindings/interrupt-controller/arm-gic.h> 491d5b0e70fSEmmanuel Vadot #include <dt-bindings/interrupt-controller/irq.h> 492d5b0e70fSEmmanuel Vadot #include <dt-bindings/clock/mt7622-clk.h> 493d5b0e70fSEmmanuel Vadot 494d5b0e70fSEmmanuel Vadot soc { 495d5b0e70fSEmmanuel Vadot #address-cells = <2>; 496d5b0e70fSEmmanuel Vadot #size-cells = <2>; 497d5b0e70fSEmmanuel Vadot 498d5b0e70fSEmmanuel Vadot eth: ethernet@15100000 { 499d5b0e70fSEmmanuel Vadot #define CLK_ETH_FE_EN 0 500d5b0e70fSEmmanuel Vadot #define CLK_ETH_WOCPU1_EN 3 501d5b0e70fSEmmanuel Vadot #define CLK_ETH_WOCPU0_EN 4 502d5b0e70fSEmmanuel Vadot #define CLK_TOP_NETSYS_SEL 43 503d5b0e70fSEmmanuel Vadot #define CLK_TOP_NETSYS_500M_SEL 44 504d5b0e70fSEmmanuel Vadot #define CLK_TOP_NETSYS_2X_SEL 46 505d5b0e70fSEmmanuel Vadot #define CLK_TOP_SGM_325M_SEL 47 506d5b0e70fSEmmanuel Vadot #define CLK_APMIXED_NET2PLL 1 507d5b0e70fSEmmanuel Vadot #define CLK_APMIXED_SGMPLL 3 508d5b0e70fSEmmanuel Vadot 509d5b0e70fSEmmanuel Vadot compatible = "mediatek,mt7986-eth"; 510d5b0e70fSEmmanuel Vadot reg = <0 0x15100000 0 0x80000>; 511d5b0e70fSEmmanuel Vadot interrupts = <GIC_SPI 196 IRQ_TYPE_LEVEL_HIGH>, 512d5b0e70fSEmmanuel Vadot <GIC_SPI 197 IRQ_TYPE_LEVEL_HIGH>, 513d5b0e70fSEmmanuel Vadot <GIC_SPI 198 IRQ_TYPE_LEVEL_HIGH>, 514d5b0e70fSEmmanuel Vadot <GIC_SPI 199 IRQ_TYPE_LEVEL_HIGH>; 515d5b0e70fSEmmanuel Vadot clocks = <ðsys CLK_ETH_FE_EN>, 516d5b0e70fSEmmanuel Vadot <ðsys CLK_ETH_GP2_EN>, 517d5b0e70fSEmmanuel Vadot <ðsys CLK_ETH_GP1_EN>, 518d5b0e70fSEmmanuel Vadot <ðsys CLK_ETH_WOCPU1_EN>, 519d5b0e70fSEmmanuel Vadot <ðsys CLK_ETH_WOCPU0_EN>, 520d5b0e70fSEmmanuel Vadot <&sgmiisys0 CLK_SGMII_TX250M_EN>, 521d5b0e70fSEmmanuel Vadot <&sgmiisys0 CLK_SGMII_RX250M_EN>, 522d5b0e70fSEmmanuel Vadot <&sgmiisys0 CLK_SGMII_CDR_REF>, 523d5b0e70fSEmmanuel Vadot <&sgmiisys0 CLK_SGMII_CDR_FB>, 524d5b0e70fSEmmanuel Vadot <&sgmiisys1 CLK_SGMII_TX250M_EN>, 525d5b0e70fSEmmanuel Vadot <&sgmiisys1 CLK_SGMII_RX250M_EN>, 526d5b0e70fSEmmanuel Vadot <&sgmiisys1 CLK_SGMII_CDR_REF>, 527d5b0e70fSEmmanuel Vadot <&sgmiisys1 CLK_SGMII_CDR_FB>, 528d5b0e70fSEmmanuel Vadot <&topckgen CLK_TOP_NETSYS_SEL>, 529d5b0e70fSEmmanuel Vadot <&topckgen CLK_TOP_NETSYS_SEL>; 530d5b0e70fSEmmanuel Vadot clock-names = "fe", "gp2", "gp1", "wocpu1", "wocpu0", 531d5b0e70fSEmmanuel Vadot "sgmii_tx250m", "sgmii_rx250m", 532d5b0e70fSEmmanuel Vadot "sgmii_cdr_ref", "sgmii_cdr_fb", 533d5b0e70fSEmmanuel Vadot "sgmii2_tx250m", "sgmii2_rx250m", 534d5b0e70fSEmmanuel Vadot "sgmii2_cdr_ref", "sgmii2_cdr_fb", 535d5b0e70fSEmmanuel Vadot "netsys0", "netsys1"; 536d5b0e70fSEmmanuel Vadot mediatek,ethsys = <ðsys>; 537d5b0e70fSEmmanuel Vadot mediatek,sgmiisys = <&sgmiisys0>, <&sgmiisys1>; 538d5b0e70fSEmmanuel Vadot assigned-clocks = <&topckgen CLK_TOP_NETSYS_2X_SEL>, 539d5b0e70fSEmmanuel Vadot <&topckgen CLK_TOP_SGM_325M_SEL>; 540d5b0e70fSEmmanuel Vadot assigned-clock-parents = <&apmixedsys CLK_APMIXED_NET2PLL>, 541d5b0e70fSEmmanuel Vadot <&apmixedsys CLK_APMIXED_SGMPLL>; 542d5b0e70fSEmmanuel Vadot 543d5b0e70fSEmmanuel Vadot #address-cells = <1>; 544d5b0e70fSEmmanuel Vadot #size-cells = <0>; 545d5b0e70fSEmmanuel Vadot 546d5b0e70fSEmmanuel Vadot mdio: mdio-bus { 547d5b0e70fSEmmanuel Vadot #address-cells = <1>; 548d5b0e70fSEmmanuel Vadot #size-cells = <0>; 549d5b0e70fSEmmanuel Vadot 550d5b0e70fSEmmanuel Vadot phy5: ethernet-phy@0 { 551d5b0e70fSEmmanuel Vadot compatible = "ethernet-phy-id67c9.de0a"; 552d5b0e70fSEmmanuel Vadot phy-mode = "2500base-x"; 553d5b0e70fSEmmanuel Vadot reset-gpios = <&pio 6 1>; 554d5b0e70fSEmmanuel Vadot reset-deassert-us = <20000>; 555d5b0e70fSEmmanuel Vadot reg = <5>; 556d5b0e70fSEmmanuel Vadot }; 557d5b0e70fSEmmanuel Vadot 558d5b0e70fSEmmanuel Vadot phy6: ethernet-phy@1 { 559d5b0e70fSEmmanuel Vadot compatible = "ethernet-phy-id67c9.de0a"; 560d5b0e70fSEmmanuel Vadot phy-mode = "2500base-x"; 561d5b0e70fSEmmanuel Vadot reg = <6>; 562d5b0e70fSEmmanuel Vadot }; 563d5b0e70fSEmmanuel Vadot }; 564d5b0e70fSEmmanuel Vadot 565d5b0e70fSEmmanuel Vadot mac0: mac@0 { 566d5b0e70fSEmmanuel Vadot compatible = "mediatek,eth-mac"; 567d5b0e70fSEmmanuel Vadot phy-mode = "2500base-x"; 568d5b0e70fSEmmanuel Vadot phy-handle = <&phy5>; 569d5b0e70fSEmmanuel Vadot reg = <0>; 570d5b0e70fSEmmanuel Vadot }; 571d5b0e70fSEmmanuel Vadot 572d5b0e70fSEmmanuel Vadot mac1: mac@1 { 573d5b0e70fSEmmanuel Vadot compatible = "mediatek,eth-mac"; 574d5b0e70fSEmmanuel Vadot phy-mode = "2500base-x"; 575d5b0e70fSEmmanuel Vadot phy-handle = <&phy6>; 576d5b0e70fSEmmanuel Vadot reg = <1>; 577d5b0e70fSEmmanuel Vadot }; 578d5b0e70fSEmmanuel Vadot }; 579d5b0e70fSEmmanuel Vadot }; 580