From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pl1-f169.google.com (mail-pl1-f169.google.com [209.85.214.169]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 62736376BE8 for ; Tue, 3 Mar 2026 09:20:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.169 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772529619; cv=none; b=NjxHh6stCg6pMJT+qu2Vl85xneE3Jt0svRLBkb35dgeqT84h/FGEhDYIvKN8JJSUsResJUGBV7KPUiFo84I3vRtOTP+1vfF4I50XRCbEe2Ss4NVkp8onRcyyGh+WymXlPsGEcLUYbAbCSETMHJaHtKZQYYUXbU9z0Tu0rPTG4BI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772529619; c=relaxed/simple; bh=my9e4whQpD8mV2f3iFrPhKENfMZMudiUnVazjbZAeAc=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=gk+tm1GQ9XbH8rn+mq1KyLl1WF8rAn24+8X70xsqp25sz3giMPClhlckffv0yYrtbV3UpuWZfDR4FH2ZrI41OpHvz2CKuS3aWX8NjH4eyHBjaCjWoEmh5VdH+TehVFSNmtg+kpIDYjuySCqWl1HyuOKsPLi4/VrTev7j46gZOCI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=Ep8eRfAv; arc=none smtp.client-ip=209.85.214.169 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="Ep8eRfAv" Received: by mail-pl1-f169.google.com with SMTP id d9443c01a7336-2ab46931cf1so41838315ad.0 for ; Tue, 03 Mar 2026 01:20:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1772529618; x=1773134418; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=hrr8Af/aGKB61i0C6ukavupGQsufCcEMWOAgZ+sFvK0=; b=Ep8eRfAv7wq/63oe589EHFotisw73b7RqPe54E1x/qEnScniE31wRPHqmHHQeIa1EI HstL/0PyiUdytbluIc4/++ByH/a5xdd9AKpqQBbomwHJwKr7dP178TCFORl7o9TTUpdN ZByBksQlDII1sQtEzIUiPwnUiMjJeTHpFcea2S/1zAaAlHN2aFIuHemB7NUmI+S1kPzJ mT/lyh53beqGmY70rK+HRMz4kc2uwSUzUfB1mH7Bijw+watZiI5lhahRwsn/AJO+Dv38 OXGAPdtFlMIRQnsWt47tN7/UVZPtoOb7UKDSpTgcZxxnrj59cU9+OskRMppKim18DtDU al6w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1772529618; x=1773134418; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=hrr8Af/aGKB61i0C6ukavupGQsufCcEMWOAgZ+sFvK0=; b=JL5wALGWx7BbTK9Ov6PTPHlDfxECiOjS4KVM2nK6ZPoS8ipGGGGHa04V3TvNLyDYax XfEidIg15g3PE+kY3sANdW9ZTyzhzhf+czKFiEX8sLhzCplsGqXEIYzu3Ao66UTA28Fd +nQaPAfCHwwHyEkDSkpeyfRRDsQE9VrN7QQkjEw71juq/FPE8FYBQcCGAAFh7MpIfDZS ZT94++SAH1aj6HsuESCSYb4wRAi7+ZGYsrYk7tYdpiwhkv4aMluzXLGdmDl8/mWpteKb IdbL1RNra8L1u9oZlXSqDzdICGgt2wcfFjpZ/q7yQ6n/erfDtlJioio/V3ZBoMPmoHo7 zKkw== X-Forwarded-Encrypted: i=1; AJvYcCVNahgzxF6kzsAdJsJnwGisk5wGTXA3ni2zHPLrcwIJt+G09q6+etIevjIEMrB3Z2UU8/eCXkWhf2zrSSc=@vger.kernel.org X-Gm-Message-State: AOJu0YwWS+jZNcvYv4neT3kkIV7ZCBJBeU8Xj16C0ryUBRvWCG7VSVJZ LzcmrBrNVM8scyJiX0QuqOq5XceS8tbjYnFiwYW4rsCRBzVsB6YynNuuYNb0bQ== X-Gm-Gg: ATEYQzwreOOOwFDeiEgPo39x+vlA679S51j88L6T6leeytg4x0n3mrKKOiTvVmfJcS9 Vzyj/1Tyw7v4agbvBH7ZJUgo0N17du8d66z5yWfwwOwzn/8ICCF6xL2z8WxENijuOSB/6cvQyOE J6Jd+cKGvZyaKAMx95SgyiWcr+HUM1IkzT96ZNMKIFgvKAOuVwx6IVrhJKVJPHCAS9XjoqMguW3 +WxVEO2NIXbOTqP6kKeNNSa1/YpnhkVY0LX8aDyg/TtH9AObmr+w87nDd6PXF8ODQE7tonwG4qn UDei7BTwy81YqeNTJHqMi8QR9wgbMif7JQq4GSMKksji8ml+M/Nmq+GYfvOh1dC3x8QBE6ZNVfo 7eiV5tiMlSDq9amUgk960CnlJOy6vHqIWxqy7lvQEJAi0bssYd8iVlvd+E1XDHTm8LdoragHU9x IcotZ2ZR8D+l5JYHayqBkTOdzENmerF+0AF05Ce5llt1yPeMd3gN0LEza4uZNhGYFE/ZqORi6Rn r07nPDsdN1e X-Received: by 2002:a17:903:3bc8:b0:2ae:5a70:477e with SMTP id d9443c01a7336-2ae60cb2da4mr14189425ad.12.1772529617675; Tue, 03 Mar 2026 01:20:17 -0800 (PST) Received: from localhost.localdomain (60-250-196-139.hinet-ip.hinet.net. [60.250.196.139]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-2adfb69f996sm158777475ad.50.2026.03.03.01.20.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 03 Mar 2026 01:20:17 -0800 (PST) From: Joey Lu To: andrew+netdev@lunn.ch, davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org, mcoquelin.stm32@gmail.com, richardcochran@gmail.com Cc: alexandre.torgue@foss.st.com, joabreu@synopsys.com, ychuang3@nuvoton.com, schung@nuvoton.com, yclu4@nuvoton.com, peppe.cavallaro@st.com, linux-arm-kernel@lists.infradead.org, netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, openbmc@lists.ozlabs.org, linux-stm32@st-md-mailman.stormreply.com, Joey Lu Subject: [PATCH net-next v13 0/3] Add support for Nuvoton MA35D1 GMAC Date: Tue, 3 Mar 2026 17:20:03 +0800 Message-ID: <20260303092006.263715-1-a0987203069@gmail.com> X-Mailer: git-send-email 2.43.0 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit This patch series is submitted to add GMAC support for Nuvoton MA35D1 SoC platform. This work involves implementing a GMAC driver glue layer based on Synopsys DWMAC driver framework to leverage MA35D1's dual GMAC interface capabilities. Overview: 1. Added a GMAC driver glue layer for MA35D1 SoC, providing support for the platform's two GMAC interfaces. 2. Added device tree settings, with specific configurations for our development boards: a. SOM board: Configured for two RGMII interfaces. b. IoT board: Configured with one RGMII and one RMII interface. 3. Added dt-bindings for the GMAC interfaces. v13: - Fixed YAML with dt_binding_check - Added callback for plat_dat->phy_interface - Updated PHY-related setting helper function - Renamed registers and values to avoid misleading names v12: - Drop private structure nvt_priv_data - Fix error propagation to preserve probe deferral - Refactor internal delay handling into a dedicated helper - Move FIFO and filter configuration from driver to Device Tree - Update DT binding to include "snps,dwmac-3.70a" compatible v11: - Propagate syscon lookup errors to allow proper probe deferral. v10: - Update DTS/DTSI files to follow proper hierarchy and port modeling v9: - Fixed file permissions. (YAML, driver, DTS) - Moved phy-handle and PHY-related properties from SoC dtsi to board dts. v8: Changes since v7: - Rebased onto the latest net-next. - Removed unused symbol. - stmmac parent driver now reads hardware features directly to support Wake-on-LAN via magic packet, so PMT-related overrides in this driver have been removed. - Update dwmac-nuvoton driver: - Update the license to GPL. - Improve the description in Kconfig. v7: - Update dwmac-nuvoton driver - Update probe function to use stmmac_pltfr_probe instead. v6: - Update dwmac-nuvoton driver - Use NVT as the previx for all functions, structs, and defines. - Remove unnecessary comments. v5: - Update yaml - Remove the properties already defined in snps dwmac. - Update dwmac-nuvoton driver - Add a comment to explain the override of PMT flag. v4: - Update yaml - Remove unnecessary property 'select'. - Remove unnecessary compatible entries and fix items. - Specify number of entries for 'reg'. - Remove already defined property 'phy-handle'. - Update example. - Modify the property internal path delay to match the driver. - Update dtsi - Move 'status' to be the last property. - Update dwmac-nuvoton driver - Use remove instead of remove_new. - Use dev_err_probe instead. v3: - Update yaml - Fix for dt_binding_check warnings & errors. - Add compatible in snps dwmac. - Update dtsi - Update dtsi to follow examples in yaml. - Update dwmac-nuvoton driver - Fix for auto build test warnings. - Invalid path delay arguments will be returned. v2: - Update yaml - Rename file to align with the compatible property. - Add an argument to syscon to replace mac-id, with corresponding descriptions. - Use tx-internal-delay-ps and rx-internal-delay-ps properties for configurable path delay with corresponding descriptions, allowing selection between GMAC internal and PHY. - Add all supported phy-mode options. - Remove unused properties. - Update dtsi - Modify syscon configuration to include an argument for GMAC interface selection. - Update dwmac-nuvoton driver - Remove redundant device information print statements. - Remove non-global parameters. - Retrieve GMAC interface selection from the syscon argument. - Parse Tx and Rx path delays by correct properties. - Update configurations to support Wake-on-LAN. Joey Lu (3): dt-bindings: net: nuvoton: Add schema for Nuvoton MA35 family GMAC arm64: dts: nuvoton: Add Ethernet nodes net: stmmac: dwmac-nuvoton: Add dwmac glue for Nuvoton MA35 family .../bindings/net/nuvoton,ma35d1-dwmac.yaml | 131 +++++++++++++++++ .../devicetree/bindings/net/snps,dwmac.yaml | 1 + .../boot/dts/nuvoton/ma35d1-iot-512m.dts | 25 ++++ .../boot/dts/nuvoton/ma35d1-som-256m.dts | 24 ++++ arch/arm64/boot/dts/nuvoton/ma35d1.dtsi | 52 +++++++ drivers/net/ethernet/stmicro/stmmac/Kconfig | 12 ++ drivers/net/ethernet/stmicro/stmmac/Makefile | 1 + .../ethernet/stmicro/stmmac/dwmac-nuvoton.c | 136 ++++++++++++++++++ 8 files changed, 382 insertions(+) create mode 100644 Documentation/devicetree/bindings/net/nuvoton,ma35d1-dwmac.yaml create mode 100644 drivers/net/ethernet/stmicro/stmmac/dwmac-nuvoton.c -- 2.43.0