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 2A68A47DFA5 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-43fe608cb92so3927959f8f.2 for ; Wed, 06 May 2026 08:28:21 -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=gjJoJedBat+J4XBGLDJ4FAQXXqDFSTrZKKxnZ+Xx/NpYpZsawivUGK6smVe7cmleeD hCgFoPc6fzNvyH9yHO2W8m3ZdKK8bRgwC5JDEEM8z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N3 6EiJBdPrH+VvAc6LqWA= 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: linux-gpio@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.