NXP S32G2xx/S32G3xx/S32R45 GMAC ethernet controller
Schema identifier ($id): "http://devicetree.org/schemas/net/nxp,s32-dwmac.yaml#"
Schema dialect ($schema): "http://devicetree.org/meta-schemas/core.yaml#"
Maintainers (maintainers): "Jan Petrous (OSS) <jan.petrous@oss.nxp.com>"
This device is a Synopsys DWC IP, integrated on NXP S32G/R SoCs. The SoC series S32G2xx and S32G3xx feature one DWMAC instance, the SoC S32R45 has two instances. The devices can use RGMII/RMII/MII interface over Pinctrl device or the output can be routed to the embedded SerDes for SGMII connectivity.
Properties and child nodes (properties) #
compatible — not listed as required here #
Exactly one of these rules must match (oneOf) #
Rule 1
Exact value (
const):"nxp,s32g2-dwmac"
Rule 2
Array item rules (
items)Item 1
Allowed values (
enum):"nxp,s32g3-dwmac","nxp,s32r45-dwmac"Item 2
Exact value (
const):"nxp,s32g2-dwmac"
reg — not listed as required here #
Array item rules (items) #
Item 1
Main GMAC registers
Item 2
GMAC PHY mode control register
nxp,phy-sel — not listed as required here #
Shared schema rule ($ref): /schemas/types.yaml#/definitions/phandle-array
Array item rules (items) #
Item 1
Array item rules (
items)Item 1
phandle to the GPR syscon node
Item 2
offset of PHY selection register
This phandle points to the GMAC_0_CTRL_STS register which controls the GMAC_0 configuration options. The register lets you select the PHY interface and the PHY mode. It also controls if the FTM_0 or FTM_1 FlexTimer Modules connect to GMAC_0.
interrupts — not listed as required here #
Maximum number of items (maxItems): 1
interrupt-names — not listed as required here #
Exact value (const): "macirq"
clocks — required here #
Array item rules (items) #
Item 1
Main GMAC clock
Item 2
Transmit clock
Item 3
Receive clock
Item 4
PTP reference clock
clock-names — required here #
Array item rules (items) #
Item 1
Exact value (
const):"stmmaceth"
Item 2
Exact value (
const):"tx"
Item 3
Exact value (
const):"rx"
Item 4
Exact value (
const):"ptp_ref"
Required in this object (required): "clocks", "clock-names"
All of these rules must match (allOf) #
Rule 1 #
Shared schema rule (
$ref):snps,dwmac.yaml#
Properties not evaluated by applicable rules (unevaluatedProperties) #
false
Not allowed by this rule.
Examples (examples) #
#include <dt-bindings/interrupt-controller/arm-gic.h>
#include <dt-bindings/interrupt-controller/irq.h>
#include <dt-bindings/phy/phy.h>
bus {
#address-cells = <2>;
#size-cells = <2>;
ethernet@4033c000 {
compatible = "nxp,s32g2-dwmac";
reg = <0x0 0x4033c000 0x0 0x2000>, /* gmac IP */
<0x0 0x4007c004 0x0 0x4>; /* GMAC_0_CTRL_STS */
nxp,phy-sel = <&gpr 0x4>;
interrupt-parent = <&gic>;
interrupts = <GIC_SPI 57 IRQ_TYPE_LEVEL_HIGH>;
interrupt-names = "macirq";
snps,mtl-rx-config = <&mtl_rx_setup>;
snps,mtl-tx-config = <&mtl_tx_setup>;
clocks = <&clks 24>, <&clks 17>, <&clks 16>, <&clks 15>;
clock-names = "stmmaceth", "tx", "rx", "ptp_ref";
phy-mode = "rgmii-id";
phy-handle = <&phy0>;
mtl_rx_setup: rx-queues-config {
snps,rx-queues-to-use = <5>;
};
mtl_tx_setup: tx-queues-config {
snps,tx-queues-to-use = <5>;
};
mdio {
#address-cells = <1>;
#size-cells = <0>;
compatible = "snps,dwmac-mdio";
phy0: ethernet-phy@0 {
reg = <0>;
};
};
};
};
Source notes #
Annotations retained from the schema source
Line 1: SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
Line 2: Copyright 2021-2024 NXP