From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-lj1-f169.google.com (mail-lj1-f169.google.com [209.85.208.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 19E2017085A for ; Mon, 1 Jul 2024 20:16:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.169 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719864967; cv=none; b=Z0ch3iMweWoCi/glMiZNrM/S1fzUmbz9/KEJJYjqw/2qghz9qz7++ONfKsDR527qGHzMFw/quF4aORTuB0TBzIzx3y6oVS82j4+JDu8f65V/wICld74OdkokaXnHsBpDkjBSgk0dE3h/qvDvmyF642E0BO+/oj3UJGfJhMkZjew= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719864967; c=relaxed/simple; bh=8BAeJrhfF4MjoWK6BCb1lGegZfneASgqj+Rvzy7n+rk=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=MiUSIiQcSngF7Qxg2JPraMt2TTNwUL9ShVVQufVpsgy+2qU42lkrc0ZuPjzUuD/bvOxK9JnU63rYD+0AhrRxGVTG6A3TUtmR9mTzPjs+aBV1mTGVpl883wQvu8XcsFDh5WzRjeCyCAu7ydNlF4+k6tVEbjwzsXx+6/Z7G/pINBs= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=bgdev.pl; spf=none smtp.mailfrom=bgdev.pl; dkim=pass (2048-bit key) header.d=bgdev-pl.20230601.gappssmtp.com header.i=@bgdev-pl.20230601.gappssmtp.com header.b=Q60WqDUi; arc=none smtp.client-ip=209.85.208.169 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=bgdev.pl Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=bgdev.pl Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bgdev-pl.20230601.gappssmtp.com header.i=@bgdev-pl.20230601.gappssmtp.com header.b="Q60WqDUi" Received: by mail-lj1-f169.google.com with SMTP id 38308e7fff4ca-2ec6635aa43so34132951fa.1 for ; Mon, 01 Jul 2024 13:16:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bgdev-pl.20230601.gappssmtp.com; s=20230601; t=1719864963; x=1720469763; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=L/7AZmTT+AVERGwwpJNjGUJrmrBTr7GP14K4O8EWIlY=; b=Q60WqDUi3pqLWriq7fVrADnm2JxdRl9Qu/HKPaI6G+kwuZOdvFAHvcq8ce0veiz3J2 q5/3hS3OSDnCx5eT6fd5KXRqvPar4dHnHL3z0brtWdKRPeHmv19B13aIrIOVt6g8/vae I+YVodCB6mnvzHE74vmPDmA7GYyE7LH/nShXNeyqxvZPFvMMG1FTgIPj+0t/tex6rurM bC7As71en6Bv/3Jgs/VTgL2JPskQHrw0r1x7iJuzOiLbBAckdfdHGVhCU2lu/OzZjTZQ cqqUwEwjsUFWTfCIBlVyHWJ2I2nxfVXRykaQfi0wfoKzfOFufq1BdOZ5KpzKC44MuiT+ mCHg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719864963; x=1720469763; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=L/7AZmTT+AVERGwwpJNjGUJrmrBTr7GP14K4O8EWIlY=; b=Vu8uL7nS0Q3HpNtHhqiGNkpEIZmen38FBGphS7RHZZdg1hid86F7eaEs/MMGxYWYzZ QdD82X1vbuBHgyGI0hB5raCtMNb1HnZWoDydthXYdg42wejnzun5jwOmlm2A4/RTG4nw tm0AsObeJpdrxj3Bnm79bmUGApNhLozddoi1BoJvCscBWr2/lFTMJjYvtVmE94DP1tGI +bjzaIPO4eJBi7wJRlbf4yfdVBO5CskXjTxV98qJOL8Ef82k7rNevHMUGd/kDSKrXbZO y2bcivbTa7+n+ZTD4i0wcGQxACQoxuVWjeiQl0fVFnQR5ZTduE/GHkXigG6dvo8ofL1D HSIg== X-Forwarded-Encrypted: i=1; AJvYcCUFRDh/V6Yv1PEPIMhCTFB7H+HzCtMNmSpF9BocyQYcuYNfKQ1GSk4u/J9aEN/fKfUbKctBmaCw+jBxuyCRcE5rYKY3VAFip6Yq+aPG X-Gm-Message-State: AOJu0Yxgb/K1ZBXdXNhUQ947qDWtSErKU7HtBjmCldR4NdAD+w72pUkI CcmJYzN52t44obKuT7R7VdekB+CoiZG0OOTlZVagzrk8vOs1PX+eePH1r79I0DC0YwKKm8ScYmX gCfxek41Hg6EMYIHxhYBm4zOJc8Aozprcen6U4A== X-Google-Smtp-Source: AGHT+IEKAZ0mm0RcxwgLcfbN1Y6EDGlhonP962JD5DjNt0v+wIWUTtByp8xBB5E9Sy3ozcPBuqs8cSZzA/gNt5LZ0dQ= X-Received: by 2002:a05:651c:b0b:b0:2ec:5c94:3d99 with SMTP id 38308e7fff4ca-2ee5e3810b7mr44548691fa.2.1719864963002; Mon, 01 Jul 2024 13:16:03 -0700 (PDT) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20240627113948.25358-1-brgl@bgdev.pl> <20240627113948.25358-3-brgl@bgdev.pl> In-Reply-To: From: Bartosz Golaszewski Date: Mon, 1 Jul 2024 22:15:51 +0200 Message-ID: Subject: Re: [PATCH v2 net-next 2/2] net: stmmac: qcom-ethqos: add a DMA-reset quirk for sa8775p-ride To: Andrew Lunn Cc: Andrew Halaney , Vinod Koul , Alexandre Torgue , Jose Abreu , "David S . Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Maxime Coquelin , netdev@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Bartosz Golaszewski Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Thu, Jun 27, 2024 at 9:37=E2=80=AFPM Andrew Lunn wrote: > > On Thu, Jun 27, 2024 at 12:07:22PM -0500, Andrew Halaney wrote: > > On Thu, Jun 27, 2024 at 01:39:47PM GMT, Bartosz Golaszewski wrote: > > > From: Bartosz Golaszewski > > > > > > On sa8775p-ride the RX clocks from the AQR115C PHY are not available = at > > > the time of the DMA reset so we need to loop TX clocks to RX and then > > > disable loopback after link-up. Use the existing callbacks to do it j= ust > > > for this board. > > > > > > Signed-off-by: Bartosz Golaszewski > > > > Sorry, not being very helpful but trying to understand these changes > > and the general cleanup of stmmac... so I'll point out that I'm still > > confused by this based on Russell's last response: > > https://lore.kernel.org/netdev/ZnQLED%2FC3Opeim5q@shell.armlinux.org.uk= / > > > > Quote: > > > > If you're using true Cisco SGMII, there are _no_ clocks transferred > > between the PHY and PCS/MAC. There are two balanced pairs of data > > lines and that is all - one for transmit and one for receive. So th= is > > explanation doesn't make sense to me. > > > > Agreed. We need a deeper understanding of the clocking to find an > acceptable solution to this problem. > > Is the MAC extracting a clock from the SERDES lines? > > Is the PHY not driving the SERDES lines when there is no link? > > For RGMII PHYs, they often do have a clock output at 25 or 50MHz which > the MAC uses. And some PHY drivers need asking to not turn this clock > off. Maybe we need the same here, by asking the PHY to keep the > SERDES lines running when there is no link? > Yes, there are two 50MHz outputs on this PHY but they are not connected on this board. > https://elixir.bootlin.com/linux/v6.10-rc5/source/include/linux/phy.h#L78= 1 > > I also wounder why this is not an issue with plain SGMII, rather than > overclocked SGMII? Maybe there is already a workaround for SGMII and > it just needs extended to this not quiet 2500BaseX mode. > Well, you pointed out that there is a DMA-reset-related workaround in place for ethqos so I tried to reuse it in this version. Does it count? :) We did establish that this mode has no in-band signalling, so we should be fine with the above solution after all. Also regarding the PHY mode: on a rather non-technical diagram I found, the four SGMII signals going to the MAC are referred to as 2.5G HSGMII, not OCSGMII but I'm not sure if that's just naming convention. I'm still trying to get more info but it's taking time... :( Bartosz