1c78c5a66SLorenzo Bianconi# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 2c78c5a66SLorenzo Bianconi%YAML 1.2 3c78c5a66SLorenzo Bianconi--- 4c78c5a66SLorenzo Bianconi$id: http://devicetree.org/schemas/net/mediatek,net.yaml# 5c78c5a66SLorenzo Bianconi$schema: http://devicetree.org/meta-schemas/core.yaml# 6c78c5a66SLorenzo Bianconi 7c78c5a66SLorenzo Bianconititle: MediaTek Frame Engine Ethernet controller 8c78c5a66SLorenzo Bianconi 9c78c5a66SLorenzo Bianconimaintainers: 10c78c5a66SLorenzo Bianconi - Lorenzo Bianconi <lorenzo@kernel.org> 11c78c5a66SLorenzo Bianconi - Felix Fietkau <nbd@nbd.name> 12c78c5a66SLorenzo Bianconi 13c78c5a66SLorenzo Bianconidescription: 14c78c5a66SLorenzo Bianconi The frame engine ethernet controller can be found on MediaTek SoCs. These SoCs 15c78c5a66SLorenzo Bianconi have dual GMAC ports. 16c78c5a66SLorenzo Bianconi 17c78c5a66SLorenzo Bianconiproperties: 18c78c5a66SLorenzo Bianconi compatible: 19c78c5a66SLorenzo Bianconi enum: 20c78c5a66SLorenzo Bianconi - mediatek,mt2701-eth 21c78c5a66SLorenzo Bianconi - mediatek,mt7623-eth 221cbf487dSDaniel Golle - mediatek,mt7621-eth 23c78c5a66SLorenzo Bianconi - mediatek,mt7622-eth 24c78c5a66SLorenzo Bianconi - mediatek,mt7629-eth 25e3ac1c27SDaniel Golle - mediatek,mt7981-eth 264b139b75SLorenzo Bianconi - mediatek,mt7986-eth 27c94a9aabSDaniel Golle - mediatek,mt7988-eth 28c78c5a66SLorenzo Bianconi - ralink,rt5350-eth 29c78c5a66SLorenzo Bianconi 30c78c5a66SLorenzo Bianconi reg: 31c78c5a66SLorenzo Bianconi maxItems: 1 32c78c5a66SLorenzo Bianconi 330a1e19c8SRob Herring clocks: true 340a1e19c8SRob Herring clock-names: true 350a1e19c8SRob Herring 36c78c5a66SLorenzo Bianconi interrupts: 371cbf487dSDaniel Golle minItems: 1 384b139b75SLorenzo Bianconi maxItems: 4 39c78c5a66SLorenzo Bianconi 40c78c5a66SLorenzo Bianconi power-domains: 41c78c5a66SLorenzo Bianconi maxItems: 1 42c78c5a66SLorenzo Bianconi 43c78c5a66SLorenzo Bianconi resets: 44c78c5a66SLorenzo Bianconi maxItems: 3 45c78c5a66SLorenzo Bianconi 46c78c5a66SLorenzo Bianconi reset-names: 47c78c5a66SLorenzo Bianconi items: 48c78c5a66SLorenzo Bianconi - const: fe 49c78c5a66SLorenzo Bianconi - const: gmac 50c78c5a66SLorenzo Bianconi - const: ppe 51c78c5a66SLorenzo Bianconi 52c78c5a66SLorenzo Bianconi mediatek,ethsys: 53c78c5a66SLorenzo Bianconi $ref: /schemas/types.yaml#/definitions/phandle 54c78c5a66SLorenzo Bianconi description: 55c78c5a66SLorenzo Bianconi Phandle to the syscon node that handles the port setup. 56c78c5a66SLorenzo Bianconi 57c78c5a66SLorenzo Bianconi cci-control-port: true 58c78c5a66SLorenzo Bianconi 59c78c5a66SLorenzo Bianconi mediatek,hifsys: 60c78c5a66SLorenzo Bianconi $ref: /schemas/types.yaml#/definitions/phandle 61c78c5a66SLorenzo Bianconi description: 62c78c5a66SLorenzo Bianconi Phandle to the mediatek hifsys controller used to provide various clocks 63c78c5a66SLorenzo Bianconi and reset to the system. 64c78c5a66SLorenzo Bianconi 65c94a9aabSDaniel Golle mediatek,infracfg: 66c94a9aabSDaniel Golle $ref: /schemas/types.yaml#/definitions/phandle 67c94a9aabSDaniel Golle description: 68c94a9aabSDaniel Golle Phandle to the syscon node that handles the path from GMAC to 69c94a9aabSDaniel Golle PHY variants. 70c94a9aabSDaniel Golle 71390b14b5SRob Herring (Arm) mediatek,pcie-mirror: 72390b14b5SRob Herring (Arm) $ref: /schemas/types.yaml#/definitions/phandle 73390b14b5SRob Herring (Arm) description: 74390b14b5SRob Herring (Arm) Phandle to the mediatek pcie-mirror controller. 75390b14b5SRob Herring (Arm) 76390b14b5SRob Herring (Arm) mediatek,pctl: 77390b14b5SRob Herring (Arm) $ref: /schemas/types.yaml#/definitions/phandle 78390b14b5SRob Herring (Arm) description: 79390b14b5SRob Herring (Arm) Phandle to the syscon node that handles the ports slew rate and 80390b14b5SRob Herring (Arm) driver current. 81390b14b5SRob Herring (Arm) 82c78c5a66SLorenzo Bianconi mediatek,sgmiisys: 83c78c5a66SLorenzo Bianconi $ref: /schemas/types.yaml#/definitions/phandle-array 84c78c5a66SLorenzo Bianconi minItems: 1 85c78c5a66SLorenzo Bianconi maxItems: 2 86c78c5a66SLorenzo Bianconi items: 87c78c5a66SLorenzo Bianconi maxItems: 1 88c78c5a66SLorenzo Bianconi description: 89c78c5a66SLorenzo Bianconi A list of phandle to the syscon node that handles the SGMII setup which is required for 90c78c5a66SLorenzo Bianconi those SoCs equipped with SGMII. 91c78c5a66SLorenzo Bianconi 9222ecfce1SLorenzo Bianconi mediatek,wed: 9322ecfce1SLorenzo Bianconi $ref: /schemas/types.yaml#/definitions/phandle-array 9422ecfce1SLorenzo Bianconi minItems: 2 9522ecfce1SLorenzo Bianconi maxItems: 2 9622ecfce1SLorenzo Bianconi items: 9722ecfce1SLorenzo Bianconi maxItems: 1 9822ecfce1SLorenzo Bianconi description: 9922ecfce1SLorenzo Bianconi List of phandles to wireless ethernet dispatch nodes. 10022ecfce1SLorenzo Bianconi 101e3ac1c27SDaniel Golle mediatek,wed-pcie: 102e3ac1c27SDaniel Golle $ref: /schemas/types.yaml#/definitions/phandle 103e3ac1c27SDaniel Golle description: 104e3ac1c27SDaniel Golle Phandle to the mediatek wed-pcie controller. 105e3ac1c27SDaniel Golle 106c78c5a66SLorenzo Bianconi dma-coherent: true 107c78c5a66SLorenzo Bianconi 108c78c5a66SLorenzo Bianconi mdio-bus: 109c78c5a66SLorenzo Bianconi $ref: mdio.yaml# 110c78c5a66SLorenzo Bianconi unevaluatedProperties: false 111c78c5a66SLorenzo Bianconi 112c78c5a66SLorenzo Bianconi "#address-cells": 113c78c5a66SLorenzo Bianconi const: 1 114c78c5a66SLorenzo Bianconi 115c78c5a66SLorenzo Bianconi "#size-cells": 116c78c5a66SLorenzo Bianconi const: 0 117c78c5a66SLorenzo Bianconi 118c78c5a66SLorenzo BianconiallOf: 1193079bfdbSRob Herring - $ref: ethernet-controller.yaml# 120c78c5a66SLorenzo Bianconi - if: 121c78c5a66SLorenzo Bianconi properties: 122c78c5a66SLorenzo Bianconi compatible: 123c78c5a66SLorenzo Bianconi contains: 124c78c5a66SLorenzo Bianconi enum: 125c78c5a66SLorenzo Bianconi - mediatek,mt2701-eth 126c78c5a66SLorenzo Bianconi - mediatek,mt7623-eth 127c78c5a66SLorenzo Bianconi then: 128c78c5a66SLorenzo Bianconi properties: 1294b139b75SLorenzo Bianconi interrupts: 130*55da77deSKrzysztof Kozlowski minItems: 3 1314b139b75SLorenzo Bianconi maxItems: 3 1324b139b75SLorenzo Bianconi 133c78c5a66SLorenzo Bianconi clocks: 134c78c5a66SLorenzo Bianconi minItems: 4 135c78c5a66SLorenzo Bianconi maxItems: 4 136c78c5a66SLorenzo Bianconi 137c78c5a66SLorenzo Bianconi clock-names: 138c78c5a66SLorenzo Bianconi items: 139c78c5a66SLorenzo Bianconi - const: ethif 140c78c5a66SLorenzo Bianconi - const: esw 141c78c5a66SLorenzo Bianconi - const: gp1 142c78c5a66SLorenzo Bianconi - const: gp2 143c78c5a66SLorenzo Bianconi 144c94a9aabSDaniel Golle mediatek,infracfg: false 145c94a9aabSDaniel Golle 14622ecfce1SLorenzo Bianconi mediatek,wed: false 14722ecfce1SLorenzo Bianconi 148e3ac1c27SDaniel Golle mediatek,wed-pcie: false 149390b14b5SRob Herring (Arm) else: 150390b14b5SRob Herring (Arm) properties: 151390b14b5SRob Herring (Arm) mediatek,pctl: false 152e3ac1c27SDaniel Golle 153c78c5a66SLorenzo Bianconi - if: 154c78c5a66SLorenzo Bianconi properties: 155c78c5a66SLorenzo Bianconi compatible: 156c78c5a66SLorenzo Bianconi contains: 1571cbf487dSDaniel Golle enum: 1581cbf487dSDaniel Golle - mediatek,mt7621-eth 1591cbf487dSDaniel Golle then: 1601cbf487dSDaniel Golle properties: 1611cbf487dSDaniel Golle interrupts: 1621cbf487dSDaniel Golle maxItems: 1 1631cbf487dSDaniel Golle 1641cbf487dSDaniel Golle clocks: 1651cbf487dSDaniel Golle minItems: 2 1661cbf487dSDaniel Golle maxItems: 2 1671cbf487dSDaniel Golle 1681cbf487dSDaniel Golle clock-names: 1691cbf487dSDaniel Golle items: 1701cbf487dSDaniel Golle - const: ethif 1711cbf487dSDaniel Golle - const: fe 1721cbf487dSDaniel Golle 173c94a9aabSDaniel Golle mediatek,infracfg: false 174c94a9aabSDaniel Golle 1751cbf487dSDaniel Golle mediatek,wed: false 1761cbf487dSDaniel Golle 1771cbf487dSDaniel Golle mediatek,wed-pcie: false 1781cbf487dSDaniel Golle 1791cbf487dSDaniel Golle - if: 1801cbf487dSDaniel Golle properties: 1811cbf487dSDaniel Golle compatible: 1821cbf487dSDaniel Golle contains: 183c78c5a66SLorenzo Bianconi const: mediatek,mt7622-eth 184c78c5a66SLorenzo Bianconi then: 185c78c5a66SLorenzo Bianconi properties: 1864b139b75SLorenzo Bianconi interrupts: 187*55da77deSKrzysztof Kozlowski minItems: 3 1884b139b75SLorenzo Bianconi maxItems: 3 1894b139b75SLorenzo Bianconi 190c78c5a66SLorenzo Bianconi clocks: 191c78c5a66SLorenzo Bianconi minItems: 11 192c78c5a66SLorenzo Bianconi maxItems: 11 193c78c5a66SLorenzo Bianconi 194c78c5a66SLorenzo Bianconi clock-names: 195c78c5a66SLorenzo Bianconi items: 196c78c5a66SLorenzo Bianconi - const: ethif 197c78c5a66SLorenzo Bianconi - const: esw 198c78c5a66SLorenzo Bianconi - const: gp0 199c78c5a66SLorenzo Bianconi - const: gp1 200c78c5a66SLorenzo Bianconi - const: gp2 201c78c5a66SLorenzo Bianconi - const: sgmii_tx250m 202c78c5a66SLorenzo Bianconi - const: sgmii_rx250m 203c78c5a66SLorenzo Bianconi - const: sgmii_cdr_ref 204c78c5a66SLorenzo Bianconi - const: sgmii_cdr_fb 205c78c5a66SLorenzo Bianconi - const: sgmii_ck 206c78c5a66SLorenzo Bianconi - const: eth2pll 207c78c5a66SLorenzo Bianconi 208c94a9aabSDaniel Golle mediatek,infracfg: false 209c94a9aabSDaniel Golle 210c78c5a66SLorenzo Bianconi mediatek,sgmiisys: 211c78c5a66SLorenzo Bianconi minItems: 1 212c78c5a66SLorenzo Bianconi maxItems: 1 213c78c5a66SLorenzo Bianconi 214e3ac1c27SDaniel Golle mediatek,wed-pcie: false 215390b14b5SRob Herring (Arm) else: 216390b14b5SRob Herring (Arm) properties: 217390b14b5SRob Herring (Arm) mediatek,pcie-mirror: false 218e3ac1c27SDaniel Golle 219c78c5a66SLorenzo Bianconi - if: 220c78c5a66SLorenzo Bianconi properties: 221c78c5a66SLorenzo Bianconi compatible: 222c78c5a66SLorenzo Bianconi contains: 223c78c5a66SLorenzo Bianconi const: mediatek,mt7629-eth 224c78c5a66SLorenzo Bianconi then: 225c78c5a66SLorenzo Bianconi properties: 2264b139b75SLorenzo Bianconi interrupts: 227*55da77deSKrzysztof Kozlowski minItems: 3 2284b139b75SLorenzo Bianconi maxItems: 3 2294b139b75SLorenzo Bianconi 230c78c5a66SLorenzo Bianconi clocks: 231c78c5a66SLorenzo Bianconi minItems: 17 232c78c5a66SLorenzo Bianconi maxItems: 17 233c78c5a66SLorenzo Bianconi 234c78c5a66SLorenzo Bianconi clock-names: 235c78c5a66SLorenzo Bianconi items: 236c78c5a66SLorenzo Bianconi - const: ethif 237c78c5a66SLorenzo Bianconi - const: sgmiitop 238c78c5a66SLorenzo Bianconi - const: esw 239c78c5a66SLorenzo Bianconi - const: gp0 240c78c5a66SLorenzo Bianconi - const: gp1 241c78c5a66SLorenzo Bianconi - const: gp2 242c78c5a66SLorenzo Bianconi - const: fe 243c78c5a66SLorenzo Bianconi - const: sgmii_tx250m 244c78c5a66SLorenzo Bianconi - const: sgmii_rx250m 245c78c5a66SLorenzo Bianconi - const: sgmii_cdr_ref 246c78c5a66SLorenzo Bianconi - const: sgmii_cdr_fb 247c78c5a66SLorenzo Bianconi - const: sgmii2_tx250m 248c78c5a66SLorenzo Bianconi - const: sgmii2_rx250m 249c78c5a66SLorenzo Bianconi - const: sgmii2_cdr_ref 250c78c5a66SLorenzo Bianconi - const: sgmii2_cdr_fb 251c78c5a66SLorenzo Bianconi - const: sgmii_ck 252c78c5a66SLorenzo Bianconi - const: eth2pll 253c78c5a66SLorenzo Bianconi 254c78c5a66SLorenzo Bianconi mediatek,sgmiisys: 255c78c5a66SLorenzo Bianconi minItems: 2 256c78c5a66SLorenzo Bianconi maxItems: 2 257c78c5a66SLorenzo Bianconi 25822ecfce1SLorenzo Bianconi mediatek,wed: false 25922ecfce1SLorenzo Bianconi 260e3ac1c27SDaniel Golle mediatek,wed-pcie: false 261e3ac1c27SDaniel Golle 262e3ac1c27SDaniel Golle - if: 263e3ac1c27SDaniel Golle properties: 264e3ac1c27SDaniel Golle compatible: 265e3ac1c27SDaniel Golle contains: 266e3ac1c27SDaniel Golle const: mediatek,mt7981-eth 267e3ac1c27SDaniel Golle then: 268e3ac1c27SDaniel Golle properties: 269e3ac1c27SDaniel Golle interrupts: 270e3ac1c27SDaniel Golle minItems: 4 271e3ac1c27SDaniel Golle 272e3ac1c27SDaniel Golle clocks: 273e3ac1c27SDaniel Golle minItems: 15 274e3ac1c27SDaniel Golle maxItems: 15 275e3ac1c27SDaniel Golle 276e3ac1c27SDaniel Golle clock-names: 277e3ac1c27SDaniel Golle items: 278e3ac1c27SDaniel Golle - const: fe 279e3ac1c27SDaniel Golle - const: gp2 280e3ac1c27SDaniel Golle - const: gp1 281e3ac1c27SDaniel Golle - const: wocpu0 282e3ac1c27SDaniel Golle - const: sgmii_ck 283e3ac1c27SDaniel Golle - const: sgmii_tx250m 284e3ac1c27SDaniel Golle - const: sgmii_rx250m 285e3ac1c27SDaniel Golle - const: sgmii_cdr_ref 286e3ac1c27SDaniel Golle - const: sgmii_cdr_fb 287e3ac1c27SDaniel Golle - const: sgmii2_tx250m 288e3ac1c27SDaniel Golle - const: sgmii2_rx250m 289e3ac1c27SDaniel Golle - const: sgmii2_cdr_ref 290e3ac1c27SDaniel Golle - const: sgmii2_cdr_fb 291e3ac1c27SDaniel Golle - const: netsys0 292e3ac1c27SDaniel Golle - const: netsys1 293e3ac1c27SDaniel Golle 294c94a9aabSDaniel Golle mediatek,infracfg: false 295c94a9aabSDaniel Golle 296e3ac1c27SDaniel Golle mediatek,sgmiisys: 297e3ac1c27SDaniel Golle minItems: 2 298e3ac1c27SDaniel Golle maxItems: 2 299e3ac1c27SDaniel Golle 3004b139b75SLorenzo Bianconi - if: 3014b139b75SLorenzo Bianconi properties: 3024b139b75SLorenzo Bianconi compatible: 3034b139b75SLorenzo Bianconi contains: 3044b139b75SLorenzo Bianconi const: mediatek,mt7986-eth 3054b139b75SLorenzo Bianconi then: 3064b139b75SLorenzo Bianconi properties: 3074b139b75SLorenzo Bianconi interrupts: 3084b139b75SLorenzo Bianconi minItems: 4 3094b139b75SLorenzo Bianconi 3104b139b75SLorenzo Bianconi clocks: 3114b139b75SLorenzo Bianconi minItems: 15 3124b139b75SLorenzo Bianconi maxItems: 15 3134b139b75SLorenzo Bianconi 3144b139b75SLorenzo Bianconi clock-names: 3154b139b75SLorenzo Bianconi items: 3164b139b75SLorenzo Bianconi - const: fe 3174b139b75SLorenzo Bianconi - const: gp2 3184b139b75SLorenzo Bianconi - const: gp1 3194b139b75SLorenzo Bianconi - const: wocpu1 3204b139b75SLorenzo Bianconi - const: wocpu0 3214b139b75SLorenzo Bianconi - const: sgmii_tx250m 3224b139b75SLorenzo Bianconi - const: sgmii_rx250m 3234b139b75SLorenzo Bianconi - const: sgmii_cdr_ref 3244b139b75SLorenzo Bianconi - const: sgmii_cdr_fb 3254b139b75SLorenzo Bianconi - const: sgmii2_tx250m 3264b139b75SLorenzo Bianconi - const: sgmii2_rx250m 3274b139b75SLorenzo Bianconi - const: sgmii2_cdr_ref 3284b139b75SLorenzo Bianconi - const: sgmii2_cdr_fb 3294b139b75SLorenzo Bianconi - const: netsys0 3304b139b75SLorenzo Bianconi - const: netsys1 3314b139b75SLorenzo Bianconi 332c94a9aabSDaniel Golle mediatek,infracfg: false 333c94a9aabSDaniel Golle 334c94a9aabSDaniel Golle mediatek,sgmiisys: 335c94a9aabSDaniel Golle minItems: 2 336c94a9aabSDaniel Golle maxItems: 2 337c94a9aabSDaniel Golle 338c94a9aabSDaniel Golle - if: 339c94a9aabSDaniel Golle properties: 340c94a9aabSDaniel Golle compatible: 341c94a9aabSDaniel Golle contains: 342c94a9aabSDaniel Golle const: mediatek,mt7988-eth 343c94a9aabSDaniel Golle then: 344c94a9aabSDaniel Golle properties: 345c94a9aabSDaniel Golle interrupts: 346c94a9aabSDaniel Golle minItems: 4 347c94a9aabSDaniel Golle 348c94a9aabSDaniel Golle clocks: 349cc349b07SDaniel Golle minItems: 24 350cc349b07SDaniel Golle maxItems: 24 351c94a9aabSDaniel Golle 352c94a9aabSDaniel Golle clock-names: 353c94a9aabSDaniel Golle items: 354c94a9aabSDaniel Golle - const: crypto 355c94a9aabSDaniel Golle - const: fe 356c94a9aabSDaniel Golle - const: gp2 357c94a9aabSDaniel Golle - const: gp1 358c94a9aabSDaniel Golle - const: gp3 359c94a9aabSDaniel Golle - const: ethwarp_wocpu2 360c94a9aabSDaniel Golle - const: ethwarp_wocpu1 361c94a9aabSDaniel Golle - const: ethwarp_wocpu0 362c94a9aabSDaniel Golle - const: esw 363c94a9aabSDaniel Golle - const: top_eth_gmii_sel 364c94a9aabSDaniel Golle - const: top_eth_refck_50m_sel 365c94a9aabSDaniel Golle - const: top_eth_sys_200m_sel 366c94a9aabSDaniel Golle - const: top_eth_sys_sel 367c94a9aabSDaniel Golle - const: top_eth_xgmii_sel 368c94a9aabSDaniel Golle - const: top_eth_mii_sel 369c94a9aabSDaniel Golle - const: top_netsys_sel 370c94a9aabSDaniel Golle - const: top_netsys_500m_sel 371c94a9aabSDaniel Golle - const: top_netsys_pao_2x_sel 372c94a9aabSDaniel Golle - const: top_netsys_sync_250m_sel 373c94a9aabSDaniel Golle - const: top_netsys_ppefb_250m_sel 374c94a9aabSDaniel Golle - const: top_netsys_warp_sel 375c94a9aabSDaniel Golle - const: xgp1 376c94a9aabSDaniel Golle - const: xgp2 377c94a9aabSDaniel Golle - const: xgp3 378c94a9aabSDaniel Golle 379c78c5a66SLorenzo BianconipatternProperties: 380c78c5a66SLorenzo Bianconi "^mac@[0-1]$": 381c78c5a66SLorenzo Bianconi type: object 3828469c7f5SRafał Miłecki unevaluatedProperties: false 383c78c5a66SLorenzo Bianconi allOf: 384c78c5a66SLorenzo Bianconi - $ref: ethernet-controller.yaml# 385c78c5a66SLorenzo Bianconi description: 386c78c5a66SLorenzo Bianconi Ethernet MAC node 387c78c5a66SLorenzo Bianconi properties: 388c78c5a66SLorenzo Bianconi compatible: 389c78c5a66SLorenzo Bianconi const: mediatek,eth-mac 390c78c5a66SLorenzo Bianconi 391c78c5a66SLorenzo Bianconi reg: 392c78c5a66SLorenzo Bianconi maxItems: 1 393c78c5a66SLorenzo Bianconi 394c78c5a66SLorenzo Bianconi required: 395c78c5a66SLorenzo Bianconi - reg 396c78c5a66SLorenzo Bianconi - compatible 397c78c5a66SLorenzo Bianconi 398c78c5a66SLorenzo Bianconirequired: 399c78c5a66SLorenzo Bianconi - compatible 400c78c5a66SLorenzo Bianconi - reg 401c78c5a66SLorenzo Bianconi - interrupts 402c78c5a66SLorenzo Bianconi - clocks 403c78c5a66SLorenzo Bianconi - clock-names 404c78c5a66SLorenzo Bianconi - mediatek,ethsys 405c78c5a66SLorenzo Bianconi 406c78c5a66SLorenzo BianconiunevaluatedProperties: false 407c78c5a66SLorenzo Bianconi 408c78c5a66SLorenzo Bianconiexamples: 409c78c5a66SLorenzo Bianconi - | 410c78c5a66SLorenzo Bianconi #include <dt-bindings/interrupt-controller/arm-gic.h> 411c78c5a66SLorenzo Bianconi #include <dt-bindings/interrupt-controller/irq.h> 412c78c5a66SLorenzo Bianconi #include <dt-bindings/clock/mt7622-clk.h> 413c78c5a66SLorenzo Bianconi #include <dt-bindings/power/mt7622-power.h> 414c78c5a66SLorenzo Bianconi 415c78c5a66SLorenzo Bianconi soc { 416c78c5a66SLorenzo Bianconi #address-cells = <2>; 417c78c5a66SLorenzo Bianconi #size-cells = <2>; 418c78c5a66SLorenzo Bianconi 419c78c5a66SLorenzo Bianconi ethernet: ethernet@1b100000 { 420c78c5a66SLorenzo Bianconi compatible = "mediatek,mt7622-eth"; 421c78c5a66SLorenzo Bianconi reg = <0 0x1b100000 0 0x20000>; 422c78c5a66SLorenzo Bianconi interrupts = <GIC_SPI 223 IRQ_TYPE_LEVEL_LOW>, 423c78c5a66SLorenzo Bianconi <GIC_SPI 224 IRQ_TYPE_LEVEL_LOW>, 424c78c5a66SLorenzo Bianconi <GIC_SPI 225 IRQ_TYPE_LEVEL_LOW>; 425c78c5a66SLorenzo Bianconi clocks = <&topckgen CLK_TOP_ETH_SEL>, 426c78c5a66SLorenzo Bianconi <ðsys CLK_ETH_ESW_EN>, 427c78c5a66SLorenzo Bianconi <ðsys CLK_ETH_GP0_EN>, 428c78c5a66SLorenzo Bianconi <ðsys CLK_ETH_GP1_EN>, 429c78c5a66SLorenzo Bianconi <ðsys CLK_ETH_GP2_EN>, 430c78c5a66SLorenzo Bianconi <&sgmiisys CLK_SGMII_TX250M_EN>, 431c78c5a66SLorenzo Bianconi <&sgmiisys CLK_SGMII_RX250M_EN>, 432c78c5a66SLorenzo Bianconi <&sgmiisys CLK_SGMII_CDR_REF>, 433c78c5a66SLorenzo Bianconi <&sgmiisys CLK_SGMII_CDR_FB>, 434c78c5a66SLorenzo Bianconi <&topckgen CLK_TOP_SGMIIPLL>, 435c78c5a66SLorenzo Bianconi <&apmixedsys CLK_APMIXED_ETH2PLL>; 436c78c5a66SLorenzo Bianconi clock-names = "ethif", "esw", "gp0", "gp1", "gp2", 437c78c5a66SLorenzo Bianconi "sgmii_tx250m", "sgmii_rx250m", 438c78c5a66SLorenzo Bianconi "sgmii_cdr_ref", "sgmii_cdr_fb", "sgmii_ck", 439c78c5a66SLorenzo Bianconi "eth2pll"; 440c78c5a66SLorenzo Bianconi power-domains = <&scpsys MT7622_POWER_DOMAIN_ETHSYS>; 441c78c5a66SLorenzo Bianconi mediatek,ethsys = <ðsys>; 442c78c5a66SLorenzo Bianconi mediatek,sgmiisys = <&sgmiisys>; 443c78c5a66SLorenzo Bianconi cci-control-port = <&cci_control2>; 444c78c5a66SLorenzo Bianconi mediatek,pcie-mirror = <&pcie_mirror>; 445c78c5a66SLorenzo Bianconi mediatek,hifsys = <&hifsys>; 446c78c5a66SLorenzo Bianconi dma-coherent; 447c78c5a66SLorenzo Bianconi 448c78c5a66SLorenzo Bianconi #address-cells = <1>; 449c78c5a66SLorenzo Bianconi #size-cells = <0>; 450c78c5a66SLorenzo Bianconi 451c78c5a66SLorenzo Bianconi mdio0: mdio-bus { 452c78c5a66SLorenzo Bianconi #address-cells = <1>; 453c78c5a66SLorenzo Bianconi #size-cells = <0>; 454c78c5a66SLorenzo Bianconi 455c78c5a66SLorenzo Bianconi phy0: ethernet-phy@0 { 456c78c5a66SLorenzo Bianconi reg = <0>; 457c78c5a66SLorenzo Bianconi }; 458c78c5a66SLorenzo Bianconi 459c78c5a66SLorenzo Bianconi phy1: ethernet-phy@1 { 460c78c5a66SLorenzo Bianconi reg = <1>; 461c78c5a66SLorenzo Bianconi }; 462c78c5a66SLorenzo Bianconi }; 463c78c5a66SLorenzo Bianconi 464c78c5a66SLorenzo Bianconi gmac0: mac@0 { 465c78c5a66SLorenzo Bianconi compatible = "mediatek,eth-mac"; 466c78c5a66SLorenzo Bianconi phy-mode = "rgmii"; 467c78c5a66SLorenzo Bianconi phy-handle = <&phy0>; 468c78c5a66SLorenzo Bianconi reg = <0>; 469c78c5a66SLorenzo Bianconi }; 470c78c5a66SLorenzo Bianconi 471c78c5a66SLorenzo Bianconi gmac1: mac@1 { 472c78c5a66SLorenzo Bianconi compatible = "mediatek,eth-mac"; 473c78c5a66SLorenzo Bianconi phy-mode = "rgmii"; 474c78c5a66SLorenzo Bianconi phy-handle = <&phy1>; 475c78c5a66SLorenzo Bianconi reg = <1>; 476c78c5a66SLorenzo Bianconi }; 477c78c5a66SLorenzo Bianconi }; 478c78c5a66SLorenzo Bianconi }; 4794b139b75SLorenzo Bianconi 4804b139b75SLorenzo Bianconi - | 4814b139b75SLorenzo Bianconi #include <dt-bindings/interrupt-controller/arm-gic.h> 4824b139b75SLorenzo Bianconi #include <dt-bindings/interrupt-controller/irq.h> 4834b139b75SLorenzo Bianconi #include <dt-bindings/clock/mt7622-clk.h> 4844b139b75SLorenzo Bianconi 4854b139b75SLorenzo Bianconi soc { 4864b139b75SLorenzo Bianconi #address-cells = <2>; 4874b139b75SLorenzo Bianconi #size-cells = <2>; 4884b139b75SLorenzo Bianconi 4894b139b75SLorenzo Bianconi eth: ethernet@15100000 { 4904b139b75SLorenzo Bianconi #define CLK_ETH_FE_EN 0 4914b139b75SLorenzo Bianconi #define CLK_ETH_WOCPU1_EN 3 4924b139b75SLorenzo Bianconi #define CLK_ETH_WOCPU0_EN 4 4934b139b75SLorenzo Bianconi #define CLK_TOP_NETSYS_SEL 43 4944b139b75SLorenzo Bianconi #define CLK_TOP_NETSYS_500M_SEL 44 4954b139b75SLorenzo Bianconi #define CLK_TOP_NETSYS_2X_SEL 46 4964b139b75SLorenzo Bianconi #define CLK_TOP_SGM_325M_SEL 47 4974b139b75SLorenzo Bianconi #define CLK_APMIXED_NET2PLL 1 4984b139b75SLorenzo Bianconi #define CLK_APMIXED_SGMPLL 3 4994b139b75SLorenzo Bianconi 5004b139b75SLorenzo Bianconi compatible = "mediatek,mt7986-eth"; 5014b139b75SLorenzo Bianconi reg = <0 0x15100000 0 0x80000>; 5024b139b75SLorenzo Bianconi interrupts = <GIC_SPI 196 IRQ_TYPE_LEVEL_HIGH>, 5034b139b75SLorenzo Bianconi <GIC_SPI 197 IRQ_TYPE_LEVEL_HIGH>, 5044b139b75SLorenzo Bianconi <GIC_SPI 198 IRQ_TYPE_LEVEL_HIGH>, 5054b139b75SLorenzo Bianconi <GIC_SPI 199 IRQ_TYPE_LEVEL_HIGH>; 5064b139b75SLorenzo Bianconi clocks = <ðsys CLK_ETH_FE_EN>, 5074b139b75SLorenzo Bianconi <ðsys CLK_ETH_GP2_EN>, 5084b139b75SLorenzo Bianconi <ðsys CLK_ETH_GP1_EN>, 5094b139b75SLorenzo Bianconi <ðsys CLK_ETH_WOCPU1_EN>, 5104b139b75SLorenzo Bianconi <ðsys CLK_ETH_WOCPU0_EN>, 5114b139b75SLorenzo Bianconi <&sgmiisys0 CLK_SGMII_TX250M_EN>, 5124b139b75SLorenzo Bianconi <&sgmiisys0 CLK_SGMII_RX250M_EN>, 5134b139b75SLorenzo Bianconi <&sgmiisys0 CLK_SGMII_CDR_REF>, 5144b139b75SLorenzo Bianconi <&sgmiisys0 CLK_SGMII_CDR_FB>, 5154b139b75SLorenzo Bianconi <&sgmiisys1 CLK_SGMII_TX250M_EN>, 5164b139b75SLorenzo Bianconi <&sgmiisys1 CLK_SGMII_RX250M_EN>, 5174b139b75SLorenzo Bianconi <&sgmiisys1 CLK_SGMII_CDR_REF>, 5184b139b75SLorenzo Bianconi <&sgmiisys1 CLK_SGMII_CDR_FB>, 5194b139b75SLorenzo Bianconi <&topckgen CLK_TOP_NETSYS_SEL>, 5204b139b75SLorenzo Bianconi <&topckgen CLK_TOP_NETSYS_SEL>; 5214b139b75SLorenzo Bianconi clock-names = "fe", "gp2", "gp1", "wocpu1", "wocpu0", 5224b139b75SLorenzo Bianconi "sgmii_tx250m", "sgmii_rx250m", 5234b139b75SLorenzo Bianconi "sgmii_cdr_ref", "sgmii_cdr_fb", 5244b139b75SLorenzo Bianconi "sgmii2_tx250m", "sgmii2_rx250m", 5254b139b75SLorenzo Bianconi "sgmii2_cdr_ref", "sgmii2_cdr_fb", 5264b139b75SLorenzo Bianconi "netsys0", "netsys1"; 5274b139b75SLorenzo Bianconi mediatek,ethsys = <ðsys>; 5284b139b75SLorenzo Bianconi mediatek,sgmiisys = <&sgmiisys0>, <&sgmiisys1>; 5294b139b75SLorenzo Bianconi assigned-clocks = <&topckgen CLK_TOP_NETSYS_2X_SEL>, 5304b139b75SLorenzo Bianconi <&topckgen CLK_TOP_SGM_325M_SEL>; 5314b139b75SLorenzo Bianconi assigned-clock-parents = <&apmixedsys CLK_APMIXED_NET2PLL>, 5324b139b75SLorenzo Bianconi <&apmixedsys CLK_APMIXED_SGMPLL>; 5334b139b75SLorenzo Bianconi 5344b139b75SLorenzo Bianconi #address-cells = <1>; 5354b139b75SLorenzo Bianconi #size-cells = <0>; 5364b139b75SLorenzo Bianconi 5374b139b75SLorenzo Bianconi mdio: mdio-bus { 5384b139b75SLorenzo Bianconi #address-cells = <1>; 5394b139b75SLorenzo Bianconi #size-cells = <0>; 5404b139b75SLorenzo Bianconi 5414b139b75SLorenzo Bianconi phy5: ethernet-phy@0 { 5424b139b75SLorenzo Bianconi compatible = "ethernet-phy-id67c9.de0a"; 5434b139b75SLorenzo Bianconi phy-mode = "2500base-x"; 5444b139b75SLorenzo Bianconi reset-gpios = <&pio 6 1>; 5454b139b75SLorenzo Bianconi reset-deassert-us = <20000>; 5464b139b75SLorenzo Bianconi reg = <5>; 5474b139b75SLorenzo Bianconi }; 5484b139b75SLorenzo Bianconi 5494b139b75SLorenzo Bianconi phy6: ethernet-phy@1 { 5504b139b75SLorenzo Bianconi compatible = "ethernet-phy-id67c9.de0a"; 5514b139b75SLorenzo Bianconi phy-mode = "2500base-x"; 5524b139b75SLorenzo Bianconi reg = <6>; 5534b139b75SLorenzo Bianconi }; 5544b139b75SLorenzo Bianconi }; 5554b139b75SLorenzo Bianconi 5564b139b75SLorenzo Bianconi mac0: mac@0 { 5574b139b75SLorenzo Bianconi compatible = "mediatek,eth-mac"; 5584b139b75SLorenzo Bianconi phy-mode = "2500base-x"; 5594b139b75SLorenzo Bianconi phy-handle = <&phy5>; 5604b139b75SLorenzo Bianconi reg = <0>; 5614b139b75SLorenzo Bianconi }; 5624b139b75SLorenzo Bianconi 5634b139b75SLorenzo Bianconi mac1: mac@1 { 5644b139b75SLorenzo Bianconi compatible = "mediatek,eth-mac"; 5654b139b75SLorenzo Bianconi phy-mode = "2500base-x"; 5664b139b75SLorenzo Bianconi phy-handle = <&phy6>; 5674b139b75SLorenzo Bianconi reg = <1>; 5684b139b75SLorenzo Bianconi }; 5694b139b75SLorenzo Bianconi }; 5704b139b75SLorenzo Bianconi }; 571