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 264DA606A31C for ; Sat, 28 Nov 2026 14:42:44 +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=RgdX+xR1 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=1DK4LwmCNpd1ho+cSH+5j9wFPzA55uu7znxxaqB/BwY=; b=RgdX+xR1TGk4uj8Lkfqn7EL/XQ W+Xq3R65kTi/jnw9lRZtj32ImzopmxcG73stvt0pAcpeb20GQWQaZfIpa3mTLu37WYpLjQ+6VNtmA xRXusiOeIOkvG0p05apVag14ClrRK/4/RXHnOCcZlXnCwNPv2eiWmkQ7bC4pGoYw5gOJ4DTL3IyKg cV/+7NDCvMQlPYAfSVy51/HrmE//YXWmMBsRGP+9+SvD2Rc0A/neZCMyIMKbi1yECrZiAhPDEZCFi peByRWqfvMJQzB1S2n35J/8a1u73sWvWBsP+EQJD3A5PF6iXLESIHeNZUpVFQyynLStWl70uy7YxO VbdZ01qQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.100.1 #2 (Red Hat Linux)) id 1xXJdH-00000000sFM-1Ue6; Sat, 28 Nov 2026 14:42:31 +0000 Received: from pidgin.makrotopia.org ([2a07:2ec0:3002::65]) by bombadil.infradead.org with esmtps (Exim 4.100.1 #2 (Red Hat Linux)) id 1xXJdF-00000000sEX-13bT; Sat, 28 Nov 2026 14:42:30 +0000 Received: from local by pidgin.makrotopia.org with esmtpsa (TLS1.3:TLS_AES_256_GCM_SHA384:256:X25519MLKEM768) (Exim 4.100.1) (envelope-from ) id 1xXJcv-000000003a7-3taX; Sat, 28 Nov 2026 14:42:10 +0000 Date: Sat, 28 Nov 2026 14:42:06 +0000 From: Daniel Golle To: Alastair D'Silva Cc: Junhui Liu , Stephen Boyd , Brian Masney , Jerome Brunet , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Philipp Zabel , Paul Walmsley , Palmer Dabbelt , Albert Ou , Alexandre Ghiti , Richard Cochran , linux-clk@vger.kernel.org, linux-sunxi@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Andre Przywara , netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-riscv@lists.infradead.org, Jerome Brunet , Enzo Adriano , Norman Herms , Vinicius Pedrosa Subject: Re: [PATCH v7 7/8] clk: sunxi-ng: a733: Add bus clock gates Message-ID: References: <20261112-a733-clk-v7-0-db7c5451ffa2@pigmoral.tech> <20261112-a733-clk-v7-7-db7c5451ffa2@pigmoral.tech> <20261125115320.3692954-1-alastair@d-silva.org> X-Archived-By: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20261125115320.3692954-1-alastair@d-silva.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.9.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20261128_064229_297190_70A2CB52 X-CRM114-Status: GOOD ( 16.21 ) X-Spam-Score: -1.9 (-) 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=-3.9 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no 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 Hi Alastair, On Wed, Nov 25, 2026 at 10:53:20PM +1100, Alastair D'Silva wrote: > While bringing up GMAC0 on the OrangePi 4 Pro with this v7 CCU series, > link-up and DMA broke as soon as clk_disable_unused() ran. > > ahb-msi-lite0 (0x5c0, BIT(16)) and mbus-msi-lite0 (0x5e0, BIT(29)) gate > the shared MSI-Lite0 bus fabric used by GMAC0 and other masters, whereas > bus-msi-lite0 is only its register configuration clock. Referencing > ahb-msi-lite0 and mbus-msi-lite0 only in gmac0 does not model the > shared fabric, and gating them off breaks GMAC0 DMA. > > Could you please mark ahb_msi_lite0_clk and mbus_msi_lite0_clk with > CLK_IS_CRITICAL, matching ahb_store_clk and mbus_store_clk in this > driver? I see the same on the Orange Pi 4 Pro, but I would rather not make these two gates critical. A gate in front of a shared fabric is still a gate that each master behind it depends on, and the clock framework already handles sharing: every master that needs the fabric lists the gates, and they stay enabled as long as one of them is in use. The A733 USB hosts are in the same position with mbus-msi-lite2, which both EHCI/OHCI pairs and the DWC3 controller need, and listing it in those nodes is enough there. Which masters other than GMAC0 sit behind MSI-Lite0 is not documented. The vendor CCU marks both gates CLK_IGNORE_UNUSED, and no node in the vendor device tree names them, so the BSP does not tell us either. CLK_IS_CRITICAL would keep the fabric clocked on every A733 system, including those without Ethernet, and the next master that turns out to need it would work by accident, with nothing in its node saying so. So I would suggest letting the A733 GMAC binding take ahb-msi-lite0 and mbus-msi-lite0 as two additional clocks, with GMAC0 in the dtsi referencing them and the glue driver enabling them, in place of a CCU change. Any other master found to depend on MSI-Lite0 can then list the same gates. As you plan to rebase the Orange Pi 4 Pro Ethernet support on Jerome's GMAC210 series, I will raise the binding side in that thread. For transparency: an LLM coding assistant helped with the analysis and with drafting this reply. Cheers, Daniel