1*2846c905SEmmanuel Vadot# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 2*2846c905SEmmanuel Vadot# Copyright 2021-2024 NXP 3*2846c905SEmmanuel Vadot%YAML 1.2 4*2846c905SEmmanuel Vadot--- 5*2846c905SEmmanuel Vadot$id: http://devicetree.org/schemas/net/nxp,s32-dwmac.yaml# 6*2846c905SEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml# 7*2846c905SEmmanuel Vadot 8*2846c905SEmmanuel Vadottitle: NXP S32G2xx/S32G3xx/S32R45 GMAC ethernet controller 9*2846c905SEmmanuel Vadot 10*2846c905SEmmanuel Vadotmaintainers: 11*2846c905SEmmanuel Vadot - Jan Petrous (OSS) <jan.petrous@oss.nxp.com> 12*2846c905SEmmanuel Vadot 13*2846c905SEmmanuel Vadotdescription: 14*2846c905SEmmanuel Vadot This device is a Synopsys DWC IP, integrated on NXP S32G/R SoCs. 15*2846c905SEmmanuel Vadot The SoC series S32G2xx and S32G3xx feature one DWMAC instance, 16*2846c905SEmmanuel Vadot the SoC S32R45 has two instances. The devices can use RGMII/RMII/MII 17*2846c905SEmmanuel Vadot interface over Pinctrl device or the output can be routed 18*2846c905SEmmanuel Vadot to the embedded SerDes for SGMII connectivity. 19*2846c905SEmmanuel Vadot 20*2846c905SEmmanuel Vadotproperties: 21*2846c905SEmmanuel Vadot compatible: 22*2846c905SEmmanuel Vadot oneOf: 23*2846c905SEmmanuel Vadot - const: nxp,s32g2-dwmac 24*2846c905SEmmanuel Vadot - items: 25*2846c905SEmmanuel Vadot - enum: 26*2846c905SEmmanuel Vadot - nxp,s32g3-dwmac 27*2846c905SEmmanuel Vadot - nxp,s32r45-dwmac 28*2846c905SEmmanuel Vadot - const: nxp,s32g2-dwmac 29*2846c905SEmmanuel Vadot 30*2846c905SEmmanuel Vadot reg: 31*2846c905SEmmanuel Vadot items: 32*2846c905SEmmanuel Vadot - description: Main GMAC registers 33*2846c905SEmmanuel Vadot - description: GMAC PHY mode control register 34*2846c905SEmmanuel Vadot 35*2846c905SEmmanuel Vadot interrupts: 36*2846c905SEmmanuel Vadot maxItems: 1 37*2846c905SEmmanuel Vadot 38*2846c905SEmmanuel Vadot interrupt-names: 39*2846c905SEmmanuel Vadot const: macirq 40*2846c905SEmmanuel Vadot 41*2846c905SEmmanuel Vadot clocks: 42*2846c905SEmmanuel Vadot items: 43*2846c905SEmmanuel Vadot - description: Main GMAC clock 44*2846c905SEmmanuel Vadot - description: Transmit clock 45*2846c905SEmmanuel Vadot - description: Receive clock 46*2846c905SEmmanuel Vadot - description: PTP reference clock 47*2846c905SEmmanuel Vadot 48*2846c905SEmmanuel Vadot clock-names: 49*2846c905SEmmanuel Vadot items: 50*2846c905SEmmanuel Vadot - const: stmmaceth 51*2846c905SEmmanuel Vadot - const: tx 52*2846c905SEmmanuel Vadot - const: rx 53*2846c905SEmmanuel Vadot - const: ptp_ref 54*2846c905SEmmanuel Vadot 55*2846c905SEmmanuel Vadotrequired: 56*2846c905SEmmanuel Vadot - clocks 57*2846c905SEmmanuel Vadot - clock-names 58*2846c905SEmmanuel Vadot 59*2846c905SEmmanuel VadotallOf: 60*2846c905SEmmanuel Vadot - $ref: snps,dwmac.yaml# 61*2846c905SEmmanuel Vadot 62*2846c905SEmmanuel VadotunevaluatedProperties: false 63*2846c905SEmmanuel Vadot 64*2846c905SEmmanuel Vadotexamples: 65*2846c905SEmmanuel Vadot - | 66*2846c905SEmmanuel Vadot #include <dt-bindings/interrupt-controller/arm-gic.h> 67*2846c905SEmmanuel Vadot #include <dt-bindings/interrupt-controller/irq.h> 68*2846c905SEmmanuel Vadot #include <dt-bindings/phy/phy.h> 69*2846c905SEmmanuel Vadot bus { 70*2846c905SEmmanuel Vadot #address-cells = <2>; 71*2846c905SEmmanuel Vadot #size-cells = <2>; 72*2846c905SEmmanuel Vadot 73*2846c905SEmmanuel Vadot ethernet@4033c000 { 74*2846c905SEmmanuel Vadot compatible = "nxp,s32g2-dwmac"; 75*2846c905SEmmanuel Vadot reg = <0x0 0x4033c000 0x0 0x2000>, /* gmac IP */ 76*2846c905SEmmanuel Vadot <0x0 0x4007c004 0x0 0x4>; /* GMAC_0_CTRL_STS */ 77*2846c905SEmmanuel Vadot interrupt-parent = <&gic>; 78*2846c905SEmmanuel Vadot interrupts = <GIC_SPI 57 IRQ_TYPE_LEVEL_HIGH>; 79*2846c905SEmmanuel Vadot interrupt-names = "macirq"; 80*2846c905SEmmanuel Vadot snps,mtl-rx-config = <&mtl_rx_setup>; 81*2846c905SEmmanuel Vadot snps,mtl-tx-config = <&mtl_tx_setup>; 82*2846c905SEmmanuel Vadot clocks = <&clks 24>, <&clks 17>, <&clks 16>, <&clks 15>; 83*2846c905SEmmanuel Vadot clock-names = "stmmaceth", "tx", "rx", "ptp_ref"; 84*2846c905SEmmanuel Vadot phy-mode = "rgmii-id"; 85*2846c905SEmmanuel Vadot phy-handle = <&phy0>; 86*2846c905SEmmanuel Vadot 87*2846c905SEmmanuel Vadot mtl_rx_setup: rx-queues-config { 88*2846c905SEmmanuel Vadot snps,rx-queues-to-use = <5>; 89*2846c905SEmmanuel Vadot }; 90*2846c905SEmmanuel Vadot 91*2846c905SEmmanuel Vadot mtl_tx_setup: tx-queues-config { 92*2846c905SEmmanuel Vadot snps,tx-queues-to-use = <5>; 93*2846c905SEmmanuel Vadot }; 94*2846c905SEmmanuel Vadot 95*2846c905SEmmanuel Vadot mdio { 96*2846c905SEmmanuel Vadot #address-cells = <1>; 97*2846c905SEmmanuel Vadot #size-cells = <0>; 98*2846c905SEmmanuel Vadot compatible = "snps,dwmac-mdio"; 99*2846c905SEmmanuel Vadot 100*2846c905SEmmanuel Vadot phy0: ethernet-phy@0 { 101*2846c905SEmmanuel Vadot reg = <0>; 102*2846c905SEmmanuel Vadot }; 103*2846c905SEmmanuel Vadot }; 104*2846c905SEmmanuel Vadot }; 105*2846c905SEmmanuel Vadot }; 106