From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 622C2C4332F for ; Tue, 31 Oct 2023 11:01:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:From:References:Cc:To: Subject:MIME-Version:Date:Message-ID:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=saOHPaU2CNPVEJAVhsVLfE5H2Ihz80LmieU8et1uIzI=; b=wy3mnjGVz64Wgy jEXbxtROQKcRml4eZxbYgUvVdDWO1ut3KK0FEEp1uPIPjBmh3MVFaNR7b3l6kRHxJ79MsSvJQ73H1 pvAkvMCE6ibKzFmlfJzvWkUaR8uPshJJLC5L9CGR+y7lx9eFKzZA+liPpWNmSOOmr4F0u7lMNmHE9 QL3IVRSWJxSqga0PoKi83HF2Cem27WVmIiW5lXp8QZn8hPcDFspwWWRvxIEAE0ze4NzeyP86lkwFx a53Vef/MbgOUHv2FUBomQo81aDpeCc1Bnw93QxpcOnc1QoTBThFNQ7uiZqnhSgsS9QYYRVYgJnJMa MD9ThcJwoAnHxDLikl5A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qxmUi-00580x-0g; Tue, 31 Oct 2023 11:01:12 +0000 Received: from madras.collabora.co.uk ([2a00:1098:0:82:1000:25:2eeb:e5ab]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qxmUe-00580B-35; Tue, 31 Oct 2023 11:01:10 +0000 Received: from [100.116.17.117] (cola.collaboradmins.com [195.201.22.229]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: cristicc) by madras.collabora.co.uk (Postfix) with ESMTPSA id 357F766073A4; Tue, 31 Oct 2023 11:01:02 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1698750064; bh=7i4L1gq9GTQdB9bIM1L/ajdeUm7F+CvMd9bg+rP0cDY=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=Ut52fJKPN1zfqlv6rUpMovwC7ndfxzSTZs7G3NPsVQFCGhKFXlA8Ka//XbDcXfPf5 NWRV3qXXXV3NFtYoJHJEz44vaWYtmUGOK4YAQPTl6Br5B/UjpEqlVtaaWjQdeZAxli 9YwX0zOsUIPSPJ9hEI80CMqOsobA+55TBDZakhPKwInf5DjkcxUgWQC67UcVXXfzWL mF3I24QkTAvlie/uYqlZtG7mPDzLKulDUspn2b4NnFS/CUC0yEqMEaSOIahs3BSARQ Rzv1ciPJ1Dr0tr/GXXJFk1dbo2Crq62HeM7cFU4W8nQ2SoQV+MyXL2TNKk8x269C4R uJPUqBNrpfsww== Message-ID: Date: Tue, 31 Oct 2023 13:00:59 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v2 01/12] dt-bindings: net: snps,dwmac: Allow exclusive usage of ahb reset Content-Language: en-US To: Krzysztof Kozlowski , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Emil Renner Berthing , Samin Guo , Paul Walmsley , Palmer Dabbelt , Albert Ou , Alexandre Torgue , Jose Abreu , Maxime Coquelin , Richard Cochran , Giuseppe Cavallaro Cc: netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, kernel@collabora.com References: <20231029042712.520010-1-cristian.ciocaltea@collabora.com> <20231029042712.520010-2-cristian.ciocaltea@collabora.com> <3016eff2-fce5-4b5e-bbb2-d56cbb45df85@linaro.org> <05186c62-fcad-4d56-8ae8-d802f87a39e2@collabora.com> <98d90ba9-7e69-4b54-830d-bdbc0e6c54fe@linaro.org> From: Cristian Ciocaltea In-Reply-To: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231031_040109_255608_F40688E9 X-CRM114-Status: GOOD ( 23.94 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 10/31/23 07:48, Krzysztof Kozlowski wrote: > On 30/10/2023 20:07, Cristian Ciocaltea wrote: >> On 10/30/23 09:26, Krzysztof Kozlowski wrote: >>> On 29/10/2023 23:24, Cristian Ciocaltea wrote: >>>> On 10/29/23 13:25, Krzysztof Kozlowski wrote: >>>>> On 29/10/2023 05:27, Cristian Ciocaltea wrote: >>>>>> The Synopsys DesignWare MAC found on the StarFive JH7100 SoC requires >>>>>> just the 'ahb' reset name, but the binding allows selecting it only in >>>>>> conjunction with 'stmmaceth'. >>>>>> >>>>>> Fix the issue by permitting exclusive usage of the 'ahb' reset name. >>>>>> >>>>>> Signed-off-by: Cristian Ciocaltea >>>>>> --- >>>>>> Documentation/devicetree/bindings/net/snps,dwmac.yaml | 2 +- >>>>>> 1 file changed, 1 insertion(+), 1 deletion(-) >>>>>> >>>>>> diff --git a/Documentation/devicetree/bindings/net/snps,dwmac.yaml b/Documentation/devicetree/bindings/net/snps,dwmac.yaml >>>>>> index 5c2769dc689a..a4d7172ea701 100644 >>>>>> --- a/Documentation/devicetree/bindings/net/snps,dwmac.yaml >>>>>> +++ b/Documentation/devicetree/bindings/net/snps,dwmac.yaml >>>>>> @@ -146,7 +146,7 @@ properties: >>>>>> reset-names: >>>>>> minItems: 1 >>>>>> items: >>>>>> - - const: stmmaceth >>>>>> + - enum: [stmmaceth, ahb] >>>>> >>>>> Also, this makes sense only with patch #4, so this should be squashed there. >>>> >>>> I added this as a separate patch since it changes the generic schema >>>> which is included by many other bindings. JH7100 just happens to be the >>>> first use-case requiring this update. But I can squash the patch if >>>> that's not a good enough reason to keep it separately. >>> >>> If there is no single user of this, why changing this? I would even >>> argue that it is not correct from existing bindings point of view - >>> nothing allows and uses ahb as the only reset. Even the commit msg >>> mentions your hardware from patch 4. >> >> Sorry, I'm not sure I follow. JH7100 is (or will be) the user of it and, >> as a matter of fact, something similar has been done recently while >> adding support for JH7110. > > Every patch should stand on its own and at this point nothing uses it. > We apply this patch #1 and we add dead code, unused case. > >> >> In particular, commit [1] changed this binding before the JH7110 >> compatible was introduced in a subsequent patch. On a closer look that >> commit made a statement which is not entirely correct: >> >> "dwmac controller may require one (stmmaceth) or two (stmmaceth+ahb) >> reset signals" >> >> That's because stmmaceth is also optional in dwmac's driver, hence the >> correct message would have been: >> >> "[...] may require one (stmmaceth OR ahb) [...]" > > Driver does not describe the hardware. The bindings do, so according to > that description all supported hardware required MAC reset (stmmaceth). > Otherwise please point me to any hardware which skips MAC reset and > requires AHB reset instead (not future hardware, but current). I might have found one (arch/arm/boot/dts/allwinner/sun6i-a31.dtsi): gmac: ethernet@1c30000 { compatible = "allwinner,sun7i-a20-gmac"; [...] resets = <&ccu RST_AHB1_EMAC>; reset-names = "stmmaceth"; [...] }; It's possible the 'stmmaceth' naming has been used instead of 'ahb' just to avoid updating the binding, but that's just an assumption looking at RST_AHB1_EMAC. I will proceed with the squash for v3. Thanks for clarifying, Cristian _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel