From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1E494606A322 for ; Sat, 5 Dec 2026 13:36:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=Ix7fcxKT; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.a=rsa-sha256 header.s=qcppdkim1 header.b=W0D6sTkA; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.a=rsa-sha256 header.s=google header.b=e333M8Xs DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Unsubscribe-Post:List-Owner; bh=3TQbdtZW1mbJrxqth2zfInrdG28PUYbI80C5akZ/m/M=; b=Ix7fcxKTNvN+R42nHdVhDChhW2 8nkGU2s7NLPzSkAPbiKZRZaHts+RpyfhDOsjJeY3o7jksEcDVNlFq6u7GGp/sKrAN1utX9obKDKfk 5xYe+60D/Fgl4lalICGZLQVY2mt7pVRziLeQGMciARaZDpVRv14X0vyCjuvylsL7Fgk0s8YTRMkUN E3ExAfKrHvgPweXN2BESrVMGxCw181KHtCyURlJZs+XkXG70B8iqBdr/P+wnayJaG973woayOiDEk 5xhBd49wlt7c6FHOSw/cr015zYyVutcTZaJlin7MOn/D+qPnYkKNnQzGuo7+X931XLnRjCh4UnSMA Bn6bPpyw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.100.1 #2 (Red Hat Linux)) id 1xZpw9-00000002U1O-2aQr; Sat, 05 Dec 2026 13:36:25 +0000 Received: from mx0b-0031df01.pphosted.com ([205.220.180.131]) by bombadil.infradead.org with esmtps (Exim 4.100.1 #2 (Red Hat Linux)) id 1xZpw6-00000002U0u-1TdE for linux-arm-kernel@lists.infradead.org; Sat, 05 Dec 2026 13:36:24 +0000 Received: from pps.filterd (m0279868.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 6B5D68FI1524265 for ; Sat, 5 Dec 2026 13:36:21 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-type:date:from:in-reply-to:message-id:mime-version :references:subject:to; s=qcppdkim1; bh=3TQbdtZW1mbJrxqth2zfInrd G28PUYbI80C5akZ/m/M=; b=W0D6sTkAqvbfoDg7rIQfOGAUE6Xnxd1A5LRbM6oD d5IKLFaa+O5TPpGZTdVJOCcijX/uP7RkMJDW833YKLqgdV03iZi3h3SoDB1zuQGG DapAqu2E4AFKIl0Jp94s0tRZpgxnzuu1oYIm0cXnQuUOIteJLrTcQ5Wp+oBAWNTD pQZMmmoGP3EHM//34xI/c23IE92YE4ocEbGIQptYnhtXFNFz1im9L9RVttDTBT62 AbCLE88O3qU6NqcjOX7dnYLdf9t22w7mxfjd3eXB+NGc4iROcDKcyrt8mp7yIf1K h6vMEVsZRAqfEWnNWGANoKLIqp6Qbai3DqCyWRtRerfMPQ== Received: from mail-vs1-f72.google.com (mail-vs1-f72.google.com [209.85.217.72]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4jcbjth1g8-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Sat, 05 Dec 2026 13:36:21 +0000 (GMT) Received: by mail-vs1-f72.google.com with SMTP id ada2fe7eead31-7cc01d48a1bso2288365137.1 for ; Sat, 05 Dec 2026 05:36:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1796477780; x=1797082580; darn=lists.infradead.org; h=in-reply-to:content-disposition:content-type:mime-version :references:message-id:subject:cc:to:from:date:from:to:cc:subject :date:message-id:reply-to:content-type; bh=3TQbdtZW1mbJrxqth2zfInrdG28PUYbI80C5akZ/m/M=; b=e333M8Xs9arq0jTImqAK/tP4UGHlnc/iHCKZOYmuUd3dQi6nu9E9o2z/7n7UilrfyR cAW0gQckw1Ex2cAxz6PWSXiY8EDQrxwl4g5PobmSCk96BzkKgGnTRfp3OijAnVSxqpWo HCjas2S/qaBi/j7008PcDEmBCOWGXUWjCTuHsLBP7u3fCG5wdDTDRLZa3zeQ/6qnMFX6 oJ06iZU0GdSRf2eh81uNTacy3y3Qi6P+ArQS0gpPoEQaW553ttt78NJ21t4ShjIlSedT NP2Qq4vTXjbmLAO06uuZAxW1Bxo4wQvw0omWdM+jWqZSTbhcpqZIVirigHgTds0pI/V/ ALDg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796477780; x=1797082580; h=in-reply-to:content-disposition:content-type: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 :content-type; bh=3TQbdtZW1mbJrxqth2zfInrdG28PUYbI80C5akZ/m/M=; b=LYa9MQL9iiq198eAL7ATGqsgq+ndnVzHrGqjPcFxi9CC27r1Rfq6VYyS9lmMZJFI+r 3WoZQqaDdTMN6FpR7LACmR+XjsaFfRR/1Nfq1NNy3ipoWabEyCvVozfi8lJbpQDEfixm s8M2aEIqxiadKYXYEUQcPaHkuNa6zaz7pq6zg4YpXg5a25kqgVDB+WZlWB+Y4aDnwKrR YiQh+MRV5vmPD9iHgi08RNOhXNXWd+38CMX/t7OZHt8DrKcE4EIwiewzNTJ2wsVqgB8I y6iYYW6wBhzHtCQXKi8fvxRd4Juc4G0zCDRICwfivZlOhn8NZcmJ4O+g6UBBAiNfiXnA OJ4A== X-Forwarded-Encrypted: i=1; AL+hErE1a8IkfiFKy3kysZ/B/hmRSO/GRh3QeelZv3pLEuy2xeJoH8G+acgJ5jdBSACM1xdgaqwPWcnwYAo1GWabSfjR@lists.infradead.org X-Gm-Message-State: AB4q+uEcViqb8Uy9/ixJ3TzYqO72m6+zOTJYTgS3DA2Hs66DE3hjS/Zy 6egm74mJ05dx8eMrdwNEZN19nSE4ejJN7p9VBtqVBq37qxLPZeFW7wLwGpm/igV+j6HE66aQFsR gdPNf1B/agr2/R0VbDaZ10267bDSpXE/q4NbXNHgCDbbFMn57oL9fAAGy4F/0NXfPhOIfzx4W1j x74g== X-Gm-Gg: AZFdTZdmzjH60Poegp2V+AXbeqSRW6Pj7aVqAKVMn9MzbLD62kEbbIoXslUwaV/TVqZ SLadh+fkkSfz19DuhWuiMPxiZXbyiOjcJD/yCQCIRmnBYkkuuE0gtBQ1oDjuJdbA9FoqDZsmeVV b9kLpxUbP8eCInSFZvXlK7ccuPcE+Lo7Yp6zYykn1C8i/CV0ixjVA0OQ2yb/0XDL8zS3wSLzeSp r8J+94dM9CF+tujctbIIdPtIpKUL9lfN41gWpm+OkbwJnH7wgIkcxRwC/mAWO5/Nr13GjXsDMS5 D9cY1x6TiTEko1ORuOAPbNvFwFodkW06ApGIuQRtQ/uCOrQLzVT2/I8vbJJBT4I+QAZYW+0alz/ vpLxFAzIl16sPKLLEskmt7KLyt2A6BicdgFAZbmgoTOqq1vfZBQ23n6R5v+GLcw== X-Received: by 2002:a05:6102:292a:b0:7da:d26f:9667 with SMTP id ada2fe7eead31-7dad6a70ebamr5570393137.27.1796477780233; Sat, 05 Dec 2026 05:36:20 -0800 (PST) X-Received: by 2002:a05:6102:292a:b0:7da:d26f:9667 with SMTP id ada2fe7eead31-7dad6a70ebamr5570382137.27.1796477779744; Sat, 05 Dec 2026 05:36:19 -0800 (PST) Received: from localhost ([130.25.105.85]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-4d174d08d42sm10589309f8f.55.2026.12.05.05.36.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 05 Dec 2026 05:36:18 -0800 (PST) Date: Sat, 5 Dec 2026 14:36:18 +0100 From: Lorenzo Bianconi To: James Clark Cc: Maxime Chevallier , Andrew Lunn , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Maxime Coquelin , Alexandre Torgue , Jose Abreu , netdev@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH net] net: stmmac: xgmac: fix disabling flexible PPS output Message-ID: References: <20261205092716.17734-1-jjc@jclark.com> X-Archived-By: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="HIMTD0hoqNIwbybL" Content-Disposition: inline In-Reply-To: <20261205092716.17734-1-jjc@jclark.com> X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYxMjA1MDA1NCBTYWx0ZWRfX8RxP1T/Gko2M Y8qqq1sRP4wJGrOraOiJyKQsuOuL0A3XDlr357ABLt9x/+tokIJG4dIbRDeyPEtrhYvRgRbyRo2 5pdC01JPvyzsi/TtBBkBFVUsXqcV3zuDVW51b1AJAY4n5GR21gB4FMEgP0unfetbrD/E0Q0Ct1D dN4pGRDZm55GtXE0TrbfC1YiImbW4Myd2eXrBrk3ZDAM341uPUKr5fTTyvYO1+r2wiIpm4FoME9 0YKF2PLE+Ge5qm266P5YqZJvUngkEBxBxbajFuvvUT0CYcSvDYaGiW+draqMzPg5CRJMn7Q2NIM PAiUNOdpZQMtATwdNW8IVrVqp5EIiXPpwC8eAyGiv4rg4knc0nCDeac1XRMEtr31e+QGhRHt0Ob p1Q8fjha/5IcgdCmA9ypt2oNzhOPRdtEa/Y14VdSLIuPumUMatMvDMmwbRGEr2MmnJkay9HHNhR 0Mhq3q8MzjBYBsKomrQ== X-Proofpoint-GUID: RFzIVjqbU_e_Y3x5xOMqCh9vo72ZLxsV X-Proofpoint-Spam-Info: AW1haW4tMjYxMjA1MDA1NCBTYWx0ZWRfX8XnCgrStGaXL i8wrZnDy4wseZIC4lSdjdLTJMr/scp+ZUWtLdH42dPzJY8fMXgNe8XfuO+nEIjB8Zlfc0SY2Sxy yR2aURSdLeM8gNQJhw6iuQCcew//+xM= X-Authority-Analysis: v=2.4 cv=c4U+0h9l c=1 sm=1 tr=0 ts=6b141355 cx=c_pps a=DUEm7b3gzWu7BqY5nP7+9g==:117 a=RcFDq6c+avmIvxkL9iwlxA==:17 a=pUM-KoujPXoA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=ZpdpYltYx_vBUK5n70dp:22 a=NEAV23lmAAAA:8 a=idZxcIp9AAAA:8 a=EUspDBNiAAAA:8 a=aTf6Y1qc6H48dytMxgsA:9 a=CjuIK1q_8ugA:10 a=l4uQSsn9fpERBEmALbEA:9 a=-aSRE8QhW-JAV6biHavz:22 a=NzLqzEvlDKEySyxblcRP:22 X-Proofpoint-ORIG-GUID: RFzIVjqbU_e_Y3x5xOMqCh9vo72ZLxsV X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1176,Hydra:6.1.138,FMLib:17.12.100.49 definitions=2026-12-05_04,2026-12-03_04,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 adultscore=0 phishscore=0 suspectscore=0 impostorscore=0 lowpriorityscore=0 spamscore=0 clxscore=1015 bulkscore=0 malwarescore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2612040000 definitions=main-2612050054 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.9.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20261205_053622_797910_80F428C1 X-CRM114-Status: GOOD ( 26.39 ) X-Spam-Score: -2.8 (--) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" X-Spam-Status: No, score=-21.2 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,MENTIONS_GIT_HOSTING,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=4.0.1 X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on aws-us-west-2-korg-listserv-alma10-1 --HIMTD0hoqNIwbybL Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Dec 05, James Clark wrote: > On a Terasic DE25-Nano (Agilex 5, XGMAC core 3.10), disabling PPS > output 0 with PTP_PEROUT_REQUEST leaves about 15 pulses a second on the > pin instead of stopping it. >=20 > In the XGMAC register MAC_PPS_CONTROL, bit PPSEN0 selects what bits 3:0 > mean. When PPSEN0 is set, they are PPSCMD0, a command to the flexible > PPS logic. When it is clear, they are PPSCTRL0, the frequency of output > 0 in fixed PPS mode. The disable path in dwxgmac2_flex_pps_config() > clears PPSEN0 and then writes the stop command (0x5). The MAC reads > this as PPSCTRL0 =3D 5, so output 0 switches to fixed mode at that > frequency setting. >=20 > Set PPSENx when disabling, as the enable path does. Commit 520cf6002147 > ("net: stmmac: fix disabling flexible PPS output") made the same fix > for dwmac5 after the XGMAC code was copied from it. >=20 > Fix tested on the DE25-Nano. >=20 > Fixes: 95eaf3cd0a90 ("net: stmmac: dwxgmac: Add Flexible PPS support") > Signed-off-by: James Clark Reviewed-by: Lorenzo Bianconi > --- > I used an LLM coding assistant to help prepare this patch. >=20 > This can be tested on the DE25-Nano using the FPGA design at > https://github.com/jclark/de25-nano-debian, which connects periodic > output channel 0 to pin 6 of JP1. >=20 > drivers/net/ethernet/stmicro/stmmac/dwxgmac2_core.c | 1 + > 1 file changed, 1 insertion(+) >=20 > diff --git a/drivers/net/ethernet/stmicro/stmmac/dwxgmac2_core.c b/driver= s/net/ethernet/stmicro/stmmac/dwxgmac2_core.c > index 6b2bfc241109..c43e8c597a09 100644 > --- a/drivers/net/ethernet/stmicro/stmmac/dwxgmac2_core.c > +++ b/drivers/net/ethernet/stmicro/stmmac/dwxgmac2_core.c > @@ -1171,6 +1171,7 @@ static int dwxgmac2_flex_pps_config(void __iomem *i= oaddr, int index, > =20 > if (!enable) { > val |=3D XGMAC_PPSCMDx(index, XGMAC_PPSCMD_STOP); > + val |=3D XGMAC_PPSENx(index); > writel(val, ioaddr + XGMAC_PPS_CONTROL); > return 0; > } > --=20 > 2.56.1 >=20 >=20 --HIMTD0hoqNIwbybL Content-Type: application/pgp-signature; name=signature.asc -----BEGIN PGP SIGNATURE----- iHUEABYKAB0WIQTquNwa3Txd3rGGn7Y6cBh0uS2trAUCaxQTUgAKCRA6cBh0uS2t rNJmAQDOdbbO2M6iM9X4PlwKztF+YXUzZP49gDHHH6+QrE6BDAD+JQZfjUNdrKxw mO7+DWFhRwWX6OjgcdJfoJO5RoL5twM= =Tlfp -----END PGP SIGNATURE----- --HIMTD0hoqNIwbybL--