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 71*390b14b5SRob Herring (Arm) mediatek,pcie-mirror: 72*390b14b5SRob Herring (Arm) $ref: /schemas/types.yaml#/definitions/phandle 73*390b14b5SRob Herring (Arm) description: 74*390b14b5SRob Herring (Arm) Phandle to the mediatek pcie-mirror controller. 75*390b14b5SRob Herring (Arm) 76*390b14b5SRob Herring (Arm) mediatek,pctl: 77*390b14b5SRob Herring (Arm) $ref: /schemas/types.yaml#/definitions/phandle 78*390b14b5SRob Herring (Arm) description: 79*390b14b5SRob Herring (Arm) Phandle to the syscon node that handles the ports slew rate and 80*390b14b5SRob Herring (Arm) driver current. 81*390b14b5SRob 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: 1304b139b75SLorenzo Bianconi maxItems: 3 1314b139b75SLorenzo Bianconi 132c78c5a66SLorenzo Bianconi clocks: 133c78c5a66SLorenzo Bianconi minItems: 4 134c78c5a66SLorenzo Bianconi maxItems: 4 135c78c5a66SLorenzo Bianconi 136c78c5a66SLorenzo Bianconi clock-names: 137c78c5a66SLorenzo Bianconi items: 138c78c5a66SLorenzo Bianconi - const: ethif 139c78c5a66SLorenzo Bianconi - const: esw 140c78c5a66SLorenzo Bianconi - const: gp1 141c78c5a66SLorenzo Bianconi - const: gp2 142c78c5a66SLorenzo Bianconi 143c94a9aabSDaniel Golle mediatek,infracfg: false 144c94a9aabSDaniel Golle 14522ecfce1SLorenzo Bianconi mediatek,wed: false 14622ecfce1SLorenzo Bianconi 147e3ac1c27SDaniel Golle mediatek,wed-pcie: false 148*390b14b5SRob Herring (Arm) else: 149*390b14b5SRob Herring (Arm) properties: 150*390b14b5SRob Herring (Arm) mediatek,pctl: false 151e3ac1c27SDaniel Golle 152c78c5a66SLorenzo Bianconi - if: 153c78c5a66SLorenzo Bianconi properties: 154c78c5a66SLorenzo Bianconi compatible: 155c78c5a66SLorenzo Bianconi contains: 1561cbf487dSDaniel Golle enum: 1571cbf487dSDaniel Golle - mediatek,mt7621-eth 1581cbf487dSDaniel Golle then: 1591cbf487dSDaniel Golle properties: 1601cbf487dSDaniel Golle interrupts: 1611cbf487dSDaniel Golle maxItems: 1 1621cbf487dSDaniel Golle 1631cbf487dSDaniel Golle clocks: 1641cbf487dSDaniel Golle minItems: 2 1651cbf487dSDaniel Golle maxItems: 2 1661cbf487dSDaniel Golle 1671cbf487dSDaniel Golle clock-names: 1681cbf487dSDaniel Golle items: 1691cbf487dSDaniel Golle - const: ethif 1701cbf487dSDaniel Golle - const: fe 1711cbf487dSDaniel Golle 172c94a9aabSDaniel Golle mediatek,infracfg: false 173c94a9aabSDaniel Golle 1741cbf487dSDaniel Golle mediatek,wed: false 1751cbf487dSDaniel Golle 1761cbf487dSDaniel Golle mediatek,wed-pcie: false 1771cbf487dSDaniel Golle 1781cbf487dSDaniel Golle - if: 1791cbf487dSDaniel Golle properties: 1801cbf487dSDaniel Golle compatible: 1811cbf487dSDaniel Golle contains: 182c78c5a66SLorenzo Bianconi const: mediatek,mt7622-eth 183c78c5a66SLorenzo Bianconi then: 184c78c5a66SLorenzo Bianconi properties: 1854b139b75SLorenzo Bianconi interrupts: 1864b139b75SLorenzo Bianconi maxItems: 3 1874b139b75SLorenzo Bianconi 188c78c5a66SLorenzo Bianconi clocks: 189c78c5a66SLorenzo Bianconi minItems: 11 190c78c5a66SLorenzo Bianconi maxItems: 11 191c78c5a66SLorenzo Bianconi 192c78c5a66SLorenzo Bianconi clock-names: 193c78c5a66SLorenzo Bianconi items: 194c78c5a66SLorenzo Bianconi - const: ethif 195c78c5a66SLorenzo Bianconi - const: esw 196c78c5a66SLorenzo Bianconi - const: gp0 197c78c5a66SLorenzo Bianconi - const: gp1 198c78c5a66SLorenzo Bianconi - const: gp2 199c78c5a66SLorenzo Bianconi - const: sgmii_tx250m 200c78c5a66SLorenzo Bianconi - const: sgmii_rx250m 201c78c5a66SLorenzo Bianconi - const: sgmii_cdr_ref 202c78c5a66SLorenzo Bianconi - const: sgmii_cdr_fb 203c78c5a66SLorenzo Bianconi - const: sgmii_ck 204c78c5a66SLorenzo Bianconi - const: eth2pll 205c78c5a66SLorenzo Bianconi 206c94a9aabSDaniel Golle mediatek,infracfg: false 207c94a9aabSDaniel Golle 208c78c5a66SLorenzo Bianconi mediatek,sgmiisys: 209c78c5a66SLorenzo Bianconi minItems: 1 210c78c5a66SLorenzo Bianconi maxItems: 1 211c78c5a66SLorenzo Bianconi 212e3ac1c27SDaniel Golle mediatek,wed-pcie: false 213*390b14b5SRob Herring (Arm) else: 214*390b14b5SRob Herring (Arm) properties: 215*390b14b5SRob Herring (Arm) mediatek,pcie-mirror: false 216e3ac1c27SDaniel Golle 217c78c5a66SLorenzo Bianconi - if: 218c78c5a66SLorenzo Bianconi properties: 219c78c5a66SLorenzo Bianconi compatible: 220c78c5a66SLorenzo Bianconi contains: 221c78c5a66SLorenzo Bianconi const: mediatek,mt7629-eth 222c78c5a66SLorenzo Bianconi then: 223c78c5a66SLorenzo Bianconi properties: 2244b139b75SLorenzo Bianconi interrupts: 2254b139b75SLorenzo Bianconi maxItems: 3 2264b139b75SLorenzo Bianconi 227c78c5a66SLorenzo Bianconi clocks: 228c78c5a66SLorenzo Bianconi minItems: 17 229c78c5a66SLorenzo Bianconi maxItems: 17 230c78c5a66SLorenzo Bianconi 231c78c5a66SLorenzo Bianconi clock-names: 232c78c5a66SLorenzo Bianconi items: 233c78c5a66SLorenzo Bianconi - const: ethif 234c78c5a66SLorenzo Bianconi - const: sgmiitop 235c78c5a66SLorenzo Bianconi - const: esw 236c78c5a66SLorenzo Bianconi - const: gp0 237c78c5a66SLorenzo Bianconi - const: gp1 238c78c5a66SLorenzo Bianconi - const: gp2 239c78c5a66SLorenzo Bianconi - const: fe 240c78c5a66SLorenzo Bianconi - const: sgmii_tx250m 241c78c5a66SLorenzo Bianconi - const: sgmii_rx250m 242c78c5a66SLorenzo Bianconi - const: sgmii_cdr_ref 243c78c5a66SLorenzo Bianconi - const: sgmii_cdr_fb 244c78c5a66SLorenzo Bianconi - const: sgmii2_tx250m 245c78c5a66SLorenzo Bianconi - const: sgmii2_rx250m 246c78c5a66SLorenzo Bianconi - const: sgmii2_cdr_ref 247c78c5a66SLorenzo Bianconi - const: sgmii2_cdr_fb 248c78c5a66SLorenzo Bianconi - const: sgmii_ck 249c78c5a66SLorenzo Bianconi - const: eth2pll 250c78c5a66SLorenzo Bianconi 251c78c5a66SLorenzo Bianconi mediatek,sgmiisys: 252c78c5a66SLorenzo Bianconi minItems: 2 253c78c5a66SLorenzo Bianconi maxItems: 2 254c78c5a66SLorenzo Bianconi 25522ecfce1SLorenzo Bianconi mediatek,wed: false 25622ecfce1SLorenzo Bianconi 257e3ac1c27SDaniel Golle mediatek,wed-pcie: false 258e3ac1c27SDaniel Golle 259e3ac1c27SDaniel Golle - if: 260e3ac1c27SDaniel Golle properties: 261e3ac1c27SDaniel Golle compatible: 262e3ac1c27SDaniel Golle contains: 263e3ac1c27SDaniel Golle const: mediatek,mt7981-eth 264e3ac1c27SDaniel Golle then: 265e3ac1c27SDaniel Golle properties: 266e3ac1c27SDaniel Golle interrupts: 267e3ac1c27SDaniel Golle minItems: 4 268e3ac1c27SDaniel Golle 269e3ac1c27SDaniel Golle clocks: 270e3ac1c27SDaniel Golle minItems: 15 271e3ac1c27SDaniel Golle maxItems: 15 272e3ac1c27SDaniel Golle 273e3ac1c27SDaniel Golle clock-names: 274e3ac1c27SDaniel Golle items: 275e3ac1c27SDaniel Golle - const: fe 276e3ac1c27SDaniel Golle - const: gp2 277e3ac1c27SDaniel Golle - const: gp1 278e3ac1c27SDaniel Golle - const: wocpu0 279e3ac1c27SDaniel Golle - const: sgmii_ck 280e3ac1c27SDaniel Golle - const: sgmii_tx250m 281e3ac1c27SDaniel Golle - const: sgmii_rx250m 282e3ac1c27SDaniel Golle - const: sgmii_cdr_ref 283e3ac1c27SDaniel Golle - const: sgmii_cdr_fb 284e3ac1c27SDaniel Golle - const: sgmii2_tx250m 285e3ac1c27SDaniel Golle - const: sgmii2_rx250m 286e3ac1c27SDaniel Golle - const: sgmii2_cdr_ref 287e3ac1c27SDaniel Golle - const: sgmii2_cdr_fb 288e3ac1c27SDaniel Golle - const: netsys0 289e3ac1c27SDaniel Golle - const: netsys1 290e3ac1c27SDaniel Golle 291c94a9aabSDaniel Golle mediatek,infracfg: false 292c94a9aabSDaniel Golle 293e3ac1c27SDaniel Golle mediatek,sgmiisys: 294e3ac1c27SDaniel Golle minItems: 2 295e3ac1c27SDaniel Golle maxItems: 2 296e3ac1c27SDaniel Golle 2974b139b75SLorenzo Bianconi - if: 2984b139b75SLorenzo Bianconi properties: 2994b139b75SLorenzo Bianconi compatible: 3004b139b75SLorenzo Bianconi contains: 3014b139b75SLorenzo Bianconi const: mediatek,mt7986-eth 3024b139b75SLorenzo Bianconi then: 3034b139b75SLorenzo Bianconi properties: 3044b139b75SLorenzo Bianconi interrupts: 3054b139b75SLorenzo Bianconi minItems: 4 3064b139b75SLorenzo Bianconi 3074b139b75SLorenzo Bianconi clocks: 3084b139b75SLorenzo Bianconi minItems: 15 3094b139b75SLorenzo Bianconi maxItems: 15 3104b139b75SLorenzo Bianconi 3114b139b75SLorenzo Bianconi clock-names: 3124b139b75SLorenzo Bianconi items: 3134b139b75SLorenzo Bianconi - const: fe 3144b139b75SLorenzo Bianconi - const: gp2 3154b139b75SLorenzo Bianconi - const: gp1 3164b139b75SLorenzo Bianconi - const: wocpu1 3174b139b75SLorenzo Bianconi - const: wocpu0 3184b139b75SLorenzo Bianconi - const: sgmii_tx250m 3194b139b75SLorenzo Bianconi - const: sgmii_rx250m 3204b139b75SLorenzo Bianconi - const: sgmii_cdr_ref 3214b139b75SLorenzo Bianconi - const: sgmii_cdr_fb 3224b139b75SLorenzo Bianconi - const: sgmii2_tx250m 3234b139b75SLorenzo Bianconi - const: sgmii2_rx250m 3244b139b75SLorenzo Bianconi - const: sgmii2_cdr_ref 3254b139b75SLorenzo Bianconi - const: sgmii2_cdr_fb 3264b139b75SLorenzo Bianconi - const: netsys0 3274b139b75SLorenzo Bianconi - const: netsys1 3284b139b75SLorenzo Bianconi 329c94a9aabSDaniel Golle mediatek,infracfg: false 330c94a9aabSDaniel Golle 331c94a9aabSDaniel Golle mediatek,sgmiisys: 332c94a9aabSDaniel Golle minItems: 2 333c94a9aabSDaniel Golle maxItems: 2 334c94a9aabSDaniel Golle 335c94a9aabSDaniel Golle - if: 336c94a9aabSDaniel Golle properties: 337c94a9aabSDaniel Golle compatible: 338c94a9aabSDaniel Golle contains: 339c94a9aabSDaniel Golle const: mediatek,mt7988-eth 340c94a9aabSDaniel Golle then: 341c94a9aabSDaniel Golle properties: 342c94a9aabSDaniel Golle interrupts: 343c94a9aabSDaniel Golle minItems: 4 344c94a9aabSDaniel Golle 345c94a9aabSDaniel Golle clocks: 346cc349b07SDaniel Golle minItems: 24 347cc349b07SDaniel Golle maxItems: 24 348c94a9aabSDaniel Golle 349c94a9aabSDaniel Golle clock-names: 350c94a9aabSDaniel Golle items: 351c94a9aabSDaniel Golle - const: crypto 352c94a9aabSDaniel Golle - const: fe 353c94a9aabSDaniel Golle - const: gp2 354c94a9aabSDaniel Golle - const: gp1 355c94a9aabSDaniel Golle - const: gp3 356c94a9aabSDaniel Golle - const: ethwarp_wocpu2 357c94a9aabSDaniel Golle - const: ethwarp_wocpu1 358c94a9aabSDaniel Golle - const: ethwarp_wocpu0 359c94a9aabSDaniel Golle - const: esw 360c94a9aabSDaniel Golle - const: top_eth_gmii_sel 361c94a9aabSDaniel Golle - const: top_eth_refck_50m_sel 362c94a9aabSDaniel Golle - const: top_eth_sys_200m_sel 363c94a9aabSDaniel Golle - const: top_eth_sys_sel 364c94a9aabSDaniel Golle - const: top_eth_xgmii_sel 365c94a9aabSDaniel Golle - const: top_eth_mii_sel 366c94a9aabSDaniel Golle - const: top_netsys_sel 367c94a9aabSDaniel Golle - const: top_netsys_500m_sel 368c94a9aabSDaniel Golle - const: top_netsys_pao_2x_sel 369c94a9aabSDaniel Golle - const: top_netsys_sync_250m_sel 370c94a9aabSDaniel Golle - const: top_netsys_ppefb_250m_sel 371c94a9aabSDaniel Golle - const: top_netsys_warp_sel 372c94a9aabSDaniel Golle - const: xgp1 373c94a9aabSDaniel Golle - const: xgp2 374c94a9aabSDaniel Golle - const: xgp3 375c94a9aabSDaniel Golle 376c78c5a66SLorenzo BianconipatternProperties: 377c78c5a66SLorenzo Bianconi "^mac@[0-1]$": 378c78c5a66SLorenzo Bianconi type: object 3798469c7f5SRafał Miłecki unevaluatedProperties: false 380c78c5a66SLorenzo Bianconi allOf: 381c78c5a66SLorenzo Bianconi - $ref: ethernet-controller.yaml# 382c78c5a66SLorenzo Bianconi description: 383c78c5a66SLorenzo Bianconi Ethernet MAC node 384c78c5a66SLorenzo Bianconi properties: 385c78c5a66SLorenzo Bianconi compatible: 386c78c5a66SLorenzo Bianconi const: mediatek,eth-mac 387c78c5a66SLorenzo Bianconi 388c78c5a66SLorenzo Bianconi reg: 389c78c5a66SLorenzo Bianconi maxItems: 1 390c78c5a66SLorenzo Bianconi 391c78c5a66SLorenzo Bianconi required: 392c78c5a66SLorenzo Bianconi - reg 393c78c5a66SLorenzo Bianconi - compatible 394c78c5a66SLorenzo Bianconi 395c78c5a66SLorenzo Bianconirequired: 396c78c5a66SLorenzo Bianconi - compatible 397c78c5a66SLorenzo Bianconi - reg 398c78c5a66SLorenzo Bianconi - interrupts 399c78c5a66SLorenzo Bianconi - clocks 400c78c5a66SLorenzo Bianconi - clock-names 401c78c5a66SLorenzo Bianconi - mediatek,ethsys 402c78c5a66SLorenzo Bianconi 403c78c5a66SLorenzo BianconiunevaluatedProperties: false 404c78c5a66SLorenzo Bianconi 405c78c5a66SLorenzo Bianconiexamples: 406c78c5a66SLorenzo Bianconi - | 407c78c5a66SLorenzo Bianconi #include <dt-bindings/interrupt-controller/arm-gic.h> 408c78c5a66SLorenzo Bianconi #include <dt-bindings/interrupt-controller/irq.h> 409c78c5a66SLorenzo Bianconi #include <dt-bindings/clock/mt7622-clk.h> 410c78c5a66SLorenzo Bianconi #include <dt-bindings/power/mt7622-power.h> 411c78c5a66SLorenzo Bianconi 412c78c5a66SLorenzo Bianconi soc { 413c78c5a66SLorenzo Bianconi #address-cells = <2>; 414c78c5a66SLorenzo Bianconi #size-cells = <2>; 415c78c5a66SLorenzo Bianconi 416c78c5a66SLorenzo Bianconi ethernet: ethernet@1b100000 { 417c78c5a66SLorenzo Bianconi compatible = "mediatek,mt7622-eth"; 418c78c5a66SLorenzo Bianconi reg = <0 0x1b100000 0 0x20000>; 419c78c5a66SLorenzo Bianconi interrupts = <GIC_SPI 223 IRQ_TYPE_LEVEL_LOW>, 420c78c5a66SLorenzo Bianconi <GIC_SPI 224 IRQ_TYPE_LEVEL_LOW>, 421c78c5a66SLorenzo Bianconi <GIC_SPI 225 IRQ_TYPE_LEVEL_LOW>; 422c78c5a66SLorenzo Bianconi clocks = <&topckgen CLK_TOP_ETH_SEL>, 423c78c5a66SLorenzo Bianconi <ðsys CLK_ETH_ESW_EN>, 424c78c5a66SLorenzo Bianconi <ðsys CLK_ETH_GP0_EN>, 425c78c5a66SLorenzo Bianconi <ðsys CLK_ETH_GP1_EN>, 426c78c5a66SLorenzo Bianconi <ðsys CLK_ETH_GP2_EN>, 427c78c5a66SLorenzo Bianconi <&sgmiisys CLK_SGMII_TX250M_EN>, 428c78c5a66SLorenzo Bianconi <&sgmiisys CLK_SGMII_RX250M_EN>, 429c78c5a66SLorenzo Bianconi <&sgmiisys CLK_SGMII_CDR_REF>, 430c78c5a66SLorenzo Bianconi <&sgmiisys CLK_SGMII_CDR_FB>, 431c78c5a66SLorenzo Bianconi <&topckgen CLK_TOP_SGMIIPLL>, 432c78c5a66SLorenzo Bianconi <&apmixedsys CLK_APMIXED_ETH2PLL>; 433c78c5a66SLorenzo Bianconi clock-names = "ethif", "esw", "gp0", "gp1", "gp2", 434c78c5a66SLorenzo Bianconi "sgmii_tx250m", "sgmii_rx250m", 435c78c5a66SLorenzo Bianconi "sgmii_cdr_ref", "sgmii_cdr_fb", "sgmii_ck", 436c78c5a66SLorenzo Bianconi "eth2pll"; 437c78c5a66SLorenzo Bianconi power-domains = <&scpsys MT7622_POWER_DOMAIN_ETHSYS>; 438c78c5a66SLorenzo Bianconi mediatek,ethsys = <ðsys>; 439c78c5a66SLorenzo Bianconi mediatek,sgmiisys = <&sgmiisys>; 440c78c5a66SLorenzo Bianconi cci-control-port = <&cci_control2>; 441c78c5a66SLorenzo Bianconi mediatek,pcie-mirror = <&pcie_mirror>; 442c78c5a66SLorenzo Bianconi mediatek,hifsys = <&hifsys>; 443c78c5a66SLorenzo Bianconi dma-coherent; 444c78c5a66SLorenzo Bianconi 445c78c5a66SLorenzo Bianconi #address-cells = <1>; 446c78c5a66SLorenzo Bianconi #size-cells = <0>; 447c78c5a66SLorenzo Bianconi 448c78c5a66SLorenzo Bianconi mdio0: mdio-bus { 449c78c5a66SLorenzo Bianconi #address-cells = <1>; 450c78c5a66SLorenzo Bianconi #size-cells = <0>; 451c78c5a66SLorenzo Bianconi 452c78c5a66SLorenzo Bianconi phy0: ethernet-phy@0 { 453c78c5a66SLorenzo Bianconi reg = <0>; 454c78c5a66SLorenzo Bianconi }; 455c78c5a66SLorenzo Bianconi 456c78c5a66SLorenzo Bianconi phy1: ethernet-phy@1 { 457c78c5a66SLorenzo Bianconi reg = <1>; 458c78c5a66SLorenzo Bianconi }; 459c78c5a66SLorenzo Bianconi }; 460c78c5a66SLorenzo Bianconi 461c78c5a66SLorenzo Bianconi gmac0: mac@0 { 462c78c5a66SLorenzo Bianconi compatible = "mediatek,eth-mac"; 463c78c5a66SLorenzo Bianconi phy-mode = "rgmii"; 464c78c5a66SLorenzo Bianconi phy-handle = <&phy0>; 465c78c5a66SLorenzo Bianconi reg = <0>; 466c78c5a66SLorenzo Bianconi }; 467c78c5a66SLorenzo Bianconi 468c78c5a66SLorenzo Bianconi gmac1: mac@1 { 469c78c5a66SLorenzo Bianconi compatible = "mediatek,eth-mac"; 470c78c5a66SLorenzo Bianconi phy-mode = "rgmii"; 471c78c5a66SLorenzo Bianconi phy-handle = <&phy1>; 472c78c5a66SLorenzo Bianconi reg = <1>; 473c78c5a66SLorenzo Bianconi }; 474c78c5a66SLorenzo Bianconi }; 475c78c5a66SLorenzo Bianconi }; 4764b139b75SLorenzo Bianconi 4774b139b75SLorenzo Bianconi - | 4784b139b75SLorenzo Bianconi #include <dt-bindings/interrupt-controller/arm-gic.h> 4794b139b75SLorenzo Bianconi #include <dt-bindings/interrupt-controller/irq.h> 4804b139b75SLorenzo Bianconi #include <dt-bindings/clock/mt7622-clk.h> 4814b139b75SLorenzo Bianconi 4824b139b75SLorenzo Bianconi soc { 4834b139b75SLorenzo Bianconi #address-cells = <2>; 4844b139b75SLorenzo Bianconi #size-cells = <2>; 4854b139b75SLorenzo Bianconi 4864b139b75SLorenzo Bianconi eth: ethernet@15100000 { 4874b139b75SLorenzo Bianconi #define CLK_ETH_FE_EN 0 4884b139b75SLorenzo Bianconi #define CLK_ETH_WOCPU1_EN 3 4894b139b75SLorenzo Bianconi #define CLK_ETH_WOCPU0_EN 4 4904b139b75SLorenzo Bianconi #define CLK_TOP_NETSYS_SEL 43 4914b139b75SLorenzo Bianconi #define CLK_TOP_NETSYS_500M_SEL 44 4924b139b75SLorenzo Bianconi #define CLK_TOP_NETSYS_2X_SEL 46 4934b139b75SLorenzo Bianconi #define CLK_TOP_SGM_325M_SEL 47 4944b139b75SLorenzo Bianconi #define CLK_APMIXED_NET2PLL 1 4954b139b75SLorenzo Bianconi #define CLK_APMIXED_SGMPLL 3 4964b139b75SLorenzo Bianconi 4974b139b75SLorenzo Bianconi compatible = "mediatek,mt7986-eth"; 4984b139b75SLorenzo Bianconi reg = <0 0x15100000 0 0x80000>; 4994b139b75SLorenzo Bianconi interrupts = <GIC_SPI 196 IRQ_TYPE_LEVEL_HIGH>, 5004b139b75SLorenzo Bianconi <GIC_SPI 197 IRQ_TYPE_LEVEL_HIGH>, 5014b139b75SLorenzo Bianconi <GIC_SPI 198 IRQ_TYPE_LEVEL_HIGH>, 5024b139b75SLorenzo Bianconi <GIC_SPI 199 IRQ_TYPE_LEVEL_HIGH>; 5034b139b75SLorenzo Bianconi clocks = <ðsys CLK_ETH_FE_EN>, 5044b139b75SLorenzo Bianconi <ðsys CLK_ETH_GP2_EN>, 5054b139b75SLorenzo Bianconi <ðsys CLK_ETH_GP1_EN>, 5064b139b75SLorenzo Bianconi <ðsys CLK_ETH_WOCPU1_EN>, 5074b139b75SLorenzo Bianconi <ðsys CLK_ETH_WOCPU0_EN>, 5084b139b75SLorenzo Bianconi <&sgmiisys0 CLK_SGMII_TX250M_EN>, 5094b139b75SLorenzo Bianconi <&sgmiisys0 CLK_SGMII_RX250M_EN>, 5104b139b75SLorenzo Bianconi <&sgmiisys0 CLK_SGMII_CDR_REF>, 5114b139b75SLorenzo Bianconi <&sgmiisys0 CLK_SGMII_CDR_FB>, 5124b139b75SLorenzo Bianconi <&sgmiisys1 CLK_SGMII_TX250M_EN>, 5134b139b75SLorenzo Bianconi <&sgmiisys1 CLK_SGMII_RX250M_EN>, 5144b139b75SLorenzo Bianconi <&sgmiisys1 CLK_SGMII_CDR_REF>, 5154b139b75SLorenzo Bianconi <&sgmiisys1 CLK_SGMII_CDR_FB>, 5164b139b75SLorenzo Bianconi <&topckgen CLK_TOP_NETSYS_SEL>, 5174b139b75SLorenzo Bianconi <&topckgen CLK_TOP_NETSYS_SEL>; 5184b139b75SLorenzo Bianconi clock-names = "fe", "gp2", "gp1", "wocpu1", "wocpu0", 5194b139b75SLorenzo Bianconi "sgmii_tx250m", "sgmii_rx250m", 5204b139b75SLorenzo Bianconi "sgmii_cdr_ref", "sgmii_cdr_fb", 5214b139b75SLorenzo Bianconi "sgmii2_tx250m", "sgmii2_rx250m", 5224b139b75SLorenzo Bianconi "sgmii2_cdr_ref", "sgmii2_cdr_fb", 5234b139b75SLorenzo Bianconi "netsys0", "netsys1"; 5244b139b75SLorenzo Bianconi mediatek,ethsys = <ðsys>; 5254b139b75SLorenzo Bianconi mediatek,sgmiisys = <&sgmiisys0>, <&sgmiisys1>; 5264b139b75SLorenzo Bianconi assigned-clocks = <&topckgen CLK_TOP_NETSYS_2X_SEL>, 5274b139b75SLorenzo Bianconi <&topckgen CLK_TOP_SGM_325M_SEL>; 5284b139b75SLorenzo Bianconi assigned-clock-parents = <&apmixedsys CLK_APMIXED_NET2PLL>, 5294b139b75SLorenzo Bianconi <&apmixedsys CLK_APMIXED_SGMPLL>; 5304b139b75SLorenzo Bianconi 5314b139b75SLorenzo Bianconi #address-cells = <1>; 5324b139b75SLorenzo Bianconi #size-cells = <0>; 5334b139b75SLorenzo Bianconi 5344b139b75SLorenzo Bianconi mdio: mdio-bus { 5354b139b75SLorenzo Bianconi #address-cells = <1>; 5364b139b75SLorenzo Bianconi #size-cells = <0>; 5374b139b75SLorenzo Bianconi 5384b139b75SLorenzo Bianconi phy5: ethernet-phy@0 { 5394b139b75SLorenzo Bianconi compatible = "ethernet-phy-id67c9.de0a"; 5404b139b75SLorenzo Bianconi phy-mode = "2500base-x"; 5414b139b75SLorenzo Bianconi reset-gpios = <&pio 6 1>; 5424b139b75SLorenzo Bianconi reset-deassert-us = <20000>; 5434b139b75SLorenzo Bianconi reg = <5>; 5444b139b75SLorenzo Bianconi }; 5454b139b75SLorenzo Bianconi 5464b139b75SLorenzo Bianconi phy6: ethernet-phy@1 { 5474b139b75SLorenzo Bianconi compatible = "ethernet-phy-id67c9.de0a"; 5484b139b75SLorenzo Bianconi phy-mode = "2500base-x"; 5494b139b75SLorenzo Bianconi reg = <6>; 5504b139b75SLorenzo Bianconi }; 5514b139b75SLorenzo Bianconi }; 5524b139b75SLorenzo Bianconi 5534b139b75SLorenzo Bianconi mac0: mac@0 { 5544b139b75SLorenzo Bianconi compatible = "mediatek,eth-mac"; 5554b139b75SLorenzo Bianconi phy-mode = "2500base-x"; 5564b139b75SLorenzo Bianconi phy-handle = <&phy5>; 5574b139b75SLorenzo Bianconi reg = <0>; 5584b139b75SLorenzo Bianconi }; 5594b139b75SLorenzo Bianconi 5604b139b75SLorenzo Bianconi mac1: mac@1 { 5614b139b75SLorenzo Bianconi compatible = "mediatek,eth-mac"; 5624b139b75SLorenzo Bianconi phy-mode = "2500base-x"; 5634b139b75SLorenzo Bianconi phy-handle = <&phy6>; 5644b139b75SLorenzo Bianconi reg = <1>; 5654b139b75SLorenzo Bianconi }; 5664b139b75SLorenzo Bianconi }; 5674b139b75SLorenzo Bianconi }; 568