From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wr1-f41.google.com (mail-wr1-f41.google.com [209.85.221.41]) (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 2A60B47CC80 for ; Wed, 6 May 2026 15:28:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.41 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778081302; cv=none; b=tJtzgcrGISTUbBYrflmMYEU9sCbV7vCL0qiLLD0hftY5VYQJJOmdO5RY3aEv4bKDKyeWjXzYCYi6PKRfGVTRO/h8uSXHTHEW6/642ZJPBKn3rcuqS3eTfXOsQDQJYeFZn9SxkGDT9k5sL7ct6C1dJqGYFVs5mQj4dnlBOCHQkok= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778081302; c=relaxed/simple; bh=ZjEF3HpGwOZm1XS1TR6kZf0bNGfRZAZycuJei4ErS4k=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=Ssm6sZ1n3g/4RHRwwdFb/EIuQtfRK1Y+lAokKRjWQnBjYpogKj/EMc+QHCFZlzJCJn3owky6LIFq/EhbDkpba0TcXk+x0qPGq8KDW8Z+xLCWm6FmztU5vaCT2Fos8bDjKevtSsZqiipxRqWziHMvs/jIVfBG3t42sExg5COZEM0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=riscstar.com; spf=pass smtp.mailfrom=riscstar.com; dkim=pass (2048-bit key) header.d=riscstar-com.20251104.gappssmtp.com header.i=@riscstar-com.20251104.gappssmtp.com header.b=C+XW4o+3; arc=none smtp.client-ip=209.85.221.41 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=riscstar.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=riscstar.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=riscstar-com.20251104.gappssmtp.com header.i=@riscstar-com.20251104.gappssmtp.com header.b="C+XW4o+3" Received: by mail-wr1-f41.google.com with SMTP id ffacd0b85a97d-44da2de25f3so2454026f8f.1 for ; Wed, 06 May 2026 08:28:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=riscstar-com.20251104.gappssmtp.com; s=20251104; t=1778081300; x=1778686100; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=CGs4aXiGfe9FWzGIQNV1c8scbxohD/REqUQGlNaM17Q=; b=C+XW4o+3BpfIYq+R7bvkXpReBGJrMLl/LMNXIlRWJaDMCP8l12gnAozRU838922lJO RRMdFfzQKpQnWzb6ARXvdQ/RtmoNDrD6n6niAyKgqBRMYhB4EgtCI9TgzaWGrCFvQr69 fFOwH466Yb5gBEBbxEPPUBIughRl1DS0H5ACmf77Pp1KVqBLSvWKdCqpaMHf8bQrkbrG WSEmp1uejt1RRMTrd2KyJVV6XAhyvlzZlZ6XjoIR5zHH8AFIBX7xOryI1vY82/TAmX2r QaH5nTkRIC2PshdIC8H4YqtCezuEp5OV4V4OailE6fk5iyxuluRnpcZi1h4qmNgHK/m3 OkoA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1778081300; x=1778686100; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-gg:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=CGs4aXiGfe9FWzGIQNV1c8scbxohD/REqUQGlNaM17Q=; b=npRKcXRwI79bskILsZLdPk+nH7HXffz7GTifbBHEecbUvObeEx73AEWUqmU0tt7NhA baKaS6dbok2U75FGmQL+h4KWcp2MQKQf3j3yNE9u3mBmCapuNB1sK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8q7yDiIicuT9T4bKk= X-Received: by 2002:a05:6000:2405:b0:44e:902f:e341 with SMTP id ffacd0b85a97d-4515cf11ce9mr6889250f8f.20.1778081299271; Wed, 06 May 2026 08:28:19 -0700 (PDT) Received: from aspen.lan (aztw-34-b2-v4wan-166919-cust780.vm26.cable.virginm.net. [82.37.195.13]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-45055960902sm14773996f8f.28.2026.05.06.08.28.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 May 2026 08:28:18 -0700 (PDT) Date: Wed, 6 May 2026 16:28:15 +0100 From: Daniel Thompson To: Andrew Lunn Cc: Xilin Wu , Alex Elder , andrew+netdev@lunn.ch, davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, maxime.chevallier@bootlin.com, rmk+kernel@armlinux.org.uk, andersson@kernel.org, konradybcio@kernel.org, robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org, linusw@kernel.org, brgl@kernel.org, arnd@arndb.de, gregkh@linuxfoundation.org, mohd.anwar@oss.qualcomm.com, a0987203069@gmail.com, alexandre.torgue@foss.st.com, ast@kernel.org, boon.khai.ng@altera.com, chenchuangyu@xiaomi.com, chenhuacai@kernel.org, daniel@iogearbox.net, hawk@kernel.org, hkallweit1@gmail.com, inochiama@gmail.com, john.fastabend@gmail.com, julianbraha@gmail.com, livelycarpet87@gmail.com, matthew.gerlach@altera.com, mcoquelin.stm32@gmail.com, me@ziyao.cc, prabhakar.mahadev-lad.rj@bp.renesas.com, richardcochran@gmail.com, rohan.g.thomas@altera.com, sdf@fomichev.me, siyanteng@cqsoftware.com.cn, weishangjuan@eswincomputing.com, wens@kernel.org, netdev@vger.kernel.org, bpf@vger.kernel.org, linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-gpio@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH net-next 10/12] net: stmmac: tc956x: add TC956x/QPS615 support Message-ID: References: <20260501155421.3329862-1-elder@riscstar.com> <20260501155421.3329862-11-elder@riscstar.com> <224E233C593EF171+8c8a43dd-5061-40f8-9eb7-f360eabf2ecc@radxa.com> <4015f47a-af62-441d-b1b8-a8598f963970@lunn.ch> Precedence: bulk X-Mailing-List: devicetree@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4015f47a-af62-441d-b1b8-a8598f963970@lunn.ch> On Wed, May 06, 2026 at 04:19:54PM +0200, Andrew Lunn wrote: > On Wed, May 06, 2026 at 08:59:01PM +0800, Xilin Wu wrote: > > On 5/1/2026 11:54 PM, Alex Elder wrote: > > > + /* AXI Configuration */ > > > + axi = &td->axi; > > > + axi->axi_lpi_en = 1; > > > + axi->axi_wr_osr_lmt = 31; > > > + axi->axi_rd_osr_lmt = 31; > > > + /* All sizes (2^2..2^8) are supported */ > > > + axi->axi_blen_regval = DMA_AXI_BLEN_MASK; > > > + plat->axi = axi; > > > + > > > + plat->mac_port_sel_speed = speed; > > > + plat->flags = STMMAC_FLAG_MULTI_MSI_EN | STMMAC_FLAG_TSO_EN; > > > > I got WoL working only after adding STMMAC_FLAG_USE_PHY_WOL here. I guess > > it's required, since the driver clocks down the MAC/PMA/XPCS in its suspend > > hook? > > Nice to see somebody testing WoL. Absolutely! We recently stripped out the (obviously broken and partially ported) WoL support we had in tc956x-pci.c. We planned to bring it back later. Hadn't realized it could be so easy. > In your testing, is it the PHY doing the WoL, or the MAC? I assume > PHY. > > If i remember the DT correctly, the PHY interrupt is connected to a > SoC GPIO, not a GPIO of this chip. On RB3Gen2 (and I think also the QPS615 reference design) the phy interrupt is routed twice. It is connected both to the TC9564 GPIO block and to the host SoC. > So for your board, it is the SoCs > GPIO controllers ability to perform the wake which is > important. However, where the PHY interrupt is connected is a board > design issue. Could the PHY interrupt be connected to the chip? Would > the chip be able to wake the system? Should STMMAC_FLAG_USE_PHY_WOL be > conditional? I couldn't think of any reason to use the TC9564 GPIO block for the interrupts on RB3gen2 so I left it unused and the DT describes the SoC routing only. However if TC9564 were to be mounted on a real PCIe card then we'd have to use the TC9564 GPIO instead and would have to leave enough of the TC9564 enabled to handle the interrupt (and also to load a firmware to catch the interrupt and drive the PCI wake up signal). However such systems would need extensions to the current driver. We have done all we can to make it possible to add those extensions in the future but we would not be able to test them: not only do would a real PCIe card need extra driver features to play nice with ACPI but the card would also need an I2C EEPROM. We don't have that EEPROM on RB3gen2 (and again, we'd need firmware to read it). TL;DR - there are conceivable (and sane) hardware designs where the interrupt goes only to the TC9564 GPIO, but they are too different to RB3gen2 (and related SBC designs) for them to be supported before they exist! Daniel.