From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net [23.128.96.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C097B15CA for ; Tue, 31 Oct 2023 05:48:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="oDrea8wB" Received: from mail-ed1-x535.google.com (mail-ed1-x535.google.com [IPv6:2a00:1450:4864:20::535]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DDA8CE4 for ; Mon, 30 Oct 2023 22:48:38 -0700 (PDT) Received: by mail-ed1-x535.google.com with SMTP id 4fb4d7f45d1cf-53e70b0a218so8271828a12.2 for ; Mon, 30 Oct 2023 22:48:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1698731317; x=1699336117; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:autocrypt:from:references:cc :to:content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=d8tsL5oB87Rx8sJrlG5ElUtswTptcOb5Z68cZ32EAsY=; b=oDrea8wBuYrj+l8rGGG8zZp7F9CUUPlnFZy2a3K9lKCYdnB5Bacf2nA8cGPDGHwYcw NQKvclcI2qkplBlAqd8pmavKV97rHt7WOmZtqjohcyhuO0+y9d+dq0OOnmOcCBBvXtKU 58+4oxAFmeAI/+5ngy8wxGYfhY+HUE5zJxzrJ4lxCqppSDH7F1PmbhOqZ+np25s5Nwyd eI+DKStmO9gNB3qDwHyrSqZ4vBGZtoBn37YOAn1x/oC5EfPSLX0kn3FV5hL3D3Q+N3qd VvD6o+yGTx/JoCVRYnzzszLrXmCL5q9KzmEIhLUyeOGso64pUkn3QZDqWq88Z7+znMA8 4O9g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1698731317; x=1699336117; h=content-transfer-encoding:in-reply-to:autocrypt:from:references:cc :to:content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=d8tsL5oB87Rx8sJrlG5ElUtswTptcOb5Z68cZ32EAsY=; b=uv6NIg+7Mreg3n90IQVLN79UgYfCIHJYjaQQ459LNW0FOOxVUoIrDh8fGCzJWzoJH7 7JnszvgH56MzLljsNcDlLxl9l0tdNsFKc7+UmpQFRbdLLxCT/oWbmgKhoHsDcXPDQtcQ JHjZj4mlshmLf1zzSsGFE48bCmpEldUPmXalT00B0L36j6DUIvy2P2zofoGm+vOF5LyZ wjjQt5CFfPWk23FndpZ0tMvUHJFsPk+U8NZuluFo2Ra3QGITL9QZ5F+C3WKCxQnNBAAC pNsSgzeEPkYJaOEw35FUNNDvKDYrcuMWn+Fabp6BTg+cq7G8l2SN3EYs3gR8bKleOS22 v0dw== X-Gm-Message-State: AOJu0YzuqIG87Q3GS37hQaEJEGGj7FdeVJV0lWBbHlXvaaeLg4r8FWD5 6ZSR6hlLbaOthCSiQS5W6ZnO9A== X-Google-Smtp-Source: AGHT+IH7TmlrhHtGaYMSqpY2i7vK1vgWIGw5a4YiJB8UtrNg8R8oC1mb+KBwD5+C5OPY2DzZOFMUxQ== X-Received: by 2002:a05:6402:379:b0:540:9b47:4f70 with SMTP id s25-20020a056402037900b005409b474f70mr9028247edw.26.1698731317311; Mon, 30 Oct 2023 22:48:37 -0700 (PDT) Received: from [192.168.1.20] ([178.197.218.126]) by smtp.gmail.com with ESMTPSA id ks24-20020a170906f85800b009ad8acac02asm361918ejb.172.2023.10.30.22.48.35 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 30 Oct 2023 22:48:36 -0700 (PDT) Message-ID: Date: Tue, 31 Oct 2023 06:48:34 +0100 Precedence: bulk X-Mailing-List: devicetree@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: 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: Cristian Ciocaltea , "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: Krzysztof Kozlowski Autocrypt: addr=krzysztof.kozlowski@linaro.org; keydata= xsFNBFVDQq4BEAC6KeLOfFsAvFMBsrCrJ2bCalhPv5+KQF2PS2+iwZI8BpRZoV+Bd5kWvN79 cFgcqTTuNHjAvxtUG8pQgGTHAObYs6xeYJtjUH0ZX6ndJ33FJYf5V3yXqqjcZ30FgHzJCFUu JMp7PSyMPzpUXfU12yfcRYVEMQrmplNZssmYhiTeVicuOOypWugZKVLGNm0IweVCaZ/DJDIH gNbpvVwjcKYrx85m9cBVEBUGaQP6AT7qlVCkrf50v8bofSIyVa2xmubbAwwFA1oxoOusjPIE J3iadrwpFvsZjF5uHAKS+7wHLoW9hVzOnLbX6ajk5Hf8Pb1m+VH/E8bPBNNYKkfTtypTDUCj NYcd27tjnXfG+SDs/EXNUAIRefCyvaRG7oRYF3Ec+2RgQDRnmmjCjoQNbFrJvJkFHlPeHaeS BosGY+XWK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3lzsm02y7Ooq+ERVKiJzlvLd9tSe4jRx6Z6LMXhB21fa5DGs/tHAcUF35hSJrvMJzPT/+u /oVmYDFZkbLlqs2XpWaVCo2jv8+iHxZZ9FL7F6AHFzqEFdqGnJQqmEApiRqH6b4jRBOgJ+cY qc+rJggwMQcJL9F+oDm3wX47nr6jIsEB5ZftdybIzpMZ5V9v45lUwmdnMrSzZVgC4jRGXzsU EViBQt2CopXtHtYfPAO5nAkIvKSNp3jmGxZw4aTc5xoAZBLo0OV+Ezo71pg3AYvq0a3/oGRG KQ06ztUMRrj8eVtpImjsWCd0bDWRaaR4vqhCHvAG9iWXZu4qh3ipie2Y0oSJygcZT7H3UZxq fyYKiqEmRuqsvv6dcbblD8ZLkz1EVZL6djImH5zc5x8qpVxlA0A0i23v5QvN00m6G9NFF0Le D2GYIS41Kv4Isx2dEFh+/Q== In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit 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). > > Hence, I think it makes sense to keep this patch, after adding the above > details in the commit message. > > [1] 843f603762a5 ("dt-bindings: net: snps,dwmac: Add 'ahb' > reset/reset-name") > > Thanks, > Cristian Best regards, Krzysztof