Received: by 2002:a05:7412:e794:b0:fa:551:50a7 with SMTP id o20csp615848rdd; Tue, 9 Jan 2024 14:21:40 -0800 (PST) X-Google-Smtp-Source: AGHT+IFRwa7POByBIJ8UJqWihIFO4oD9IjBaIG/Ro8iuq2XtK9cDG4DdcmSmBakFjnw2yAqnwLNZ X-Received: by 2002:a17:902:db0c:b0:1d4:3dfd:7e34 with SMTP id m12-20020a170902db0c00b001d43dfd7e34mr70506plx.121.1704838900380; Tue, 09 Jan 2024 14:21:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704838900; cv=none; d=google.com; s=arc-20160816; b=TAzNayqRWSShEWy1BtG3z57plS2CLPkgRbTWoDloiO9aYd2yyi+jH6CfyouvhrBzz2 lMaULqlEMOsNDn1TvgBzS3yY6f3qg+907GJ5h+k5TcqTsJvy2lWe7mM5LnHZyRKERZCD xxmuH4hd4PyQqTgQv+P5GtbSnrpX1ipJGDRNRcfwMmN9S0Qns+jv5J/v5+q0d6yIicw8 azMFYRD+3qaY0W7f2H0g/Ik/lV4svU40vB0ExuYVIADEsD2KRbCXHmb4yNfrWjz8jUa3 fdx36IFmtN8f4coV38gXHXhSOK9Cjkz3mrzyJy9vWhl6QbrHenBhSdoedG19N2kIl0Pr nDhg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=FHficcIIFY7DUie+kBBBxCI5Hfo9wpTnRz3NE6iiBRs=; fh=r0X+UK2rp/vjyu0JC08rTCdS3qEkB04A0N2PINuv3RY=; b=U9l8+GpacSfaZnh3EaUuSRXLIbZM+Gl8e3YApuQH9aDOUTkqch5JMKPs6MX3HraFre kpwNZwxar1KXOWp7irkQATgFK6ynptyWtdXeIlNQNqfsfTx31ktIfnC5BbK1yhndZk7W uw77wgzKCM6UPWBCAPo0FX1eNN8Zh37oSUH8djASLa2i6a/OmAiOn1sXRT6HJx7y1s0F WFRho2zJ2b1i3Ucj0RiTTBtXvYvT5TrSyGcHg59DnYN4sZhl/ZLSmzYGuA3BBmm2y6yw iY+gvDqyuI7oTz4TNdepzmH4uMgEIEglry421YZKFMjJAo0PqkEA71wSIHGew30o8QIM RC+A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=TA+KCkts; spf=pass (google.com: domain of linux-kernel+bounces-21469-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-21469-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id q5-20020a170902bd8500b001d06da42b0csi2167535pls.503.2024.01.09.14.21.40 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 09 Jan 2024 14:21:40 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-21469-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=TA+KCkts; spf=pass (google.com: domain of linux-kernel+bounces-21469-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-21469-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 7BFB4288931 for ; Tue, 9 Jan 2024 22:21:39 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 9BC883E461; Tue, 9 Jan 2024 22:20:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="TA+KCkts" Received: from mail-lf1-f54.google.com (mail-lf1-f54.google.com [209.85.167.54]) (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 06D353DB80; Tue, 9 Jan 2024 22:20:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-lf1-f54.google.com with SMTP id 2adb3069b0e04-50e67e37661so4289105e87.0; Tue, 09 Jan 2024 14:20:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1704838843; x=1705443643; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=FHficcIIFY7DUie+kBBBxCI5Hfo9wpTnRz3NE6iiBRs=; b=TA+KCkts1HTytHrL3asmVtWWbRz7Ff0iB6mGOZ1v5WAHNg6axOMw3v0NSST7DYuTbs Om5UCYNS4niCK05tfvddHHhcHYvBLPPG1Ihw6LH42Q2Av7HTbkrJHsGt+dLzlPaF1zoo P9Wpm/RPPlQvXGHIZzk5b1xzEhQJBoVr/4rOcGWXG1DwILM0LEXQ48c+gHdJ91Ee+Uxi jI/jTXZLyE4/tOVhDeMkpkeTpJIX6ZOzhfsOT6tP+qK50m+o3o52nor/o7zmyJueb/ob jmyQtMtI28VqkQ4t9LiUNwAYcmMUVOeUe2o+Dxg3O9cicKy2Lc6YcMre18dJ7Z2PdlLv 6bDw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1704838843; x=1705443643; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=FHficcIIFY7DUie+kBBBxCI5Hfo9wpTnRz3NE6iiBRs=; b=OlclO4FeTwLvoMfLpYZWs+OHwq4IhCREYLrsktlttMnLuTbBWA++6coC1sCyMGgjTU 6MKIqE1SQYWfr2lvBKa6HU53O/RFjkJuNV2mURenRxUseLXylf6velL8FvESsVx8rTHk eUok6SSfsb8w6QCN4XUHbhvHof74RndulQ2SSK8virD9OB3xPFrX/xh1N0hnRE+qniI5 pv3VX5j+5tx/N2xdyXhoExQL2jEdMBK5Yo2rtAsKm5W8/viNPqy56/5vsDL0RShduRoC 5OTbcuyFMEExRNAsoy4/3DBixKwLGCwArSDTg5KAbVOOrXKsLd2bf7K/i258fmuYcGGp 1cog== X-Gm-Message-State: AOJu0Yzf+EoJsW6Zaar7v4P6QdM7E1GEMxskudPZpFa/q3n4sX/UbCO1 tiCzXc6EDqC/s39SxMy0oq0= X-Received: by 2002:a19:645e:0:b0:50e:7479:79da with SMTP id b30-20020a19645e000000b0050e747979damr19306lfj.24.1704838842804; Tue, 09 Jan 2024 14:20:42 -0800 (PST) Received: from mobilestation ([95.79.203.166]) by smtp.gmail.com with ESMTPSA id b16-20020a056512305000b0050ea1f2baeasm474292lfb.20.2024.01.09.14.20.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 09 Jan 2024 14:20:42 -0800 (PST) Date: Wed, 10 Jan 2024 01:20:40 +0300 From: Serge Semin To: Krzysztof Kozlowski , Leong Ching Swee Cc: Rob Herring , Krzysztof Kozlowski , Conor Dooley , Maxime Coquelin , Alexandre Torgue , Jose Abreu , "David S . Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Giuseppe Cavallaro , linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, netdev@vger.kernel.org, devicetree@vger.kernel.org, Rohan G Thomas Subject: Re: [PATCH net-next v2 1/4] dt-bindings: net: snps,dwmac: per channel irq Message-ID: <5y3ed4greqcdz6hsepvpqstyabxupqbw7dc3eilgi64acrbkoc@oy2c7flu33gs> References: <20240105070925.2948871-1-leong.ching.swee@intel.com> <20240105070925.2948871-2-leong.ching.swee@intel.com> <7cc4fa92-27cb-4b0d-8f1b-88091548bdb9@linaro.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <7cc4fa92-27cb-4b0d-8f1b-88091548bdb9@linaro.org> On Tue, Jan 09, 2024 at 10:10:37AM +0100, Krzysztof Kozlowski wrote: > On 07/01/2024 21:10, Serge Semin wrote: > > On Fri, Jan 05, 2024 at 03:09:22PM +0800, Leong Ching Swee wrote: > >> From: Swee Leong Ching > >> > >> Add dt-bindings for per channel irq. > >> > >> Signed-off-by: Rohan G Thomas > >> Signed-off-by: Swee Leong Ching > >> --- > >> .../devicetree/bindings/net/snps,dwmac.yaml | 24 +++++++++++++------ > >> 1 file changed, 17 insertions(+), 7 deletions(-) > >> > >> diff --git a/Documentation/devicetree/bindings/net/snps,dwmac.yaml b/Documentation/devicetree/bindings/net/snps,dwmac.yaml > >> index 5c2769dc689a..e72dded824f4 100644 > >> --- a/Documentation/devicetree/bindings/net/snps,dwmac.yaml > >> +++ b/Documentation/devicetree/bindings/net/snps,dwmac.yaml > >> @@ -103,17 +103,27 @@ properties: > >> > >> interrupts: > >> minItems: 1 > >> - items: > >> - - description: Combined signal for various interrupt events > >> - - description: The interrupt to manage the remote wake-up packet detection > >> - - description: The interrupt that occurs when Rx exits the LPI state > >> + maxItems: 19 > >> > >> interrupt-names: > >> minItems: 1 > >> + maxItems: 19 > >> items: > >> - - const: macirq > >> - - enum: [eth_wake_irq, eth_lpi] > >> - - const: eth_lpi > >> + oneOf: > >> + - description: Combined signal for various interrupt events > >> + const: macirq > >> + - description: The interrupt to manage the remote wake-up packet detection > >> + const: eth_wake_irq > >> + - description: The interrupt that occurs when Rx exits the LPI state > >> + const: eth_lpi > >> + - description: DMA Tx per-channel interrupt > >> + pattern: '^dma_tx[0-7]?$' > >> + - description: DMA Rx per-channel interrupt > >> + pattern: '^dma_rx[0-7]?$' > >> + > >> + allOf: > >> + - contains: > >> + const: macirq > > > > In order to restore the v1 discussion around this change, here is my > > comment copied from there: > > > >> As Rob correctly noted it's also better to make sure that 'macirq' is placed first > >> in the array. So instead of the constraint above I guess the next one would > >> make sure both the array has 'macirq' name and it's the first item: > >> > >> allOf: > >> - maxItems: 34 > >> items: > >> - const: macirq > > > > Leong said it didn't work: > > https://lore.kernel.org/netdev/CH0PR11MB54904615B45E521DE6B1A7B3CF61A@CH0PR11MB5490.namprd11.prod.outlook.com/ > > > > Rob, Krzysztof, Conor could you please clarify whether this change is ok the > > way it is or it would be better to preserve the stricter constraint > > and fix the DT-schema validation tool somehow? > > First of all this change is not good, because commit msg explains > absolutely nothing why this is done and what exactly you want to achieve > here. The "what" part often is obvious from the code, but not in this > case. Are the per-channel IRQs conflicting with macirq or others? Are > they complementary (maxItems: 19 suggests that, though, but could be > mistake as well)? Do they affect all snps,dwmac derivatives or only some? > > So many questions and zero answers in one liner commit msg! Right. The commit message is way too modest =) Leong? > > Now about the problem, I think we should preserve the order, assuming > that these are complementary so first three must be defined. Ok. But please note that "Wake" and "LPI" IRQs are optional. It's possible to have a device with the "MAC" and "DMA" IRQs and no individual "Wake"/"LPI" IRQ lines. Thus the only mandatory IRQ is "MAC" which order (being always first), I agree, should be preserved. > This > however could be done in the device schema referencing snps,dwmac. I > think I will repeat myself: I dislike this schema, because it mixes two > purposes: defining shared part and defining final device part. The code > in this patch is fine for a schema defining the shared part. > > Therefore before we start growing this monstrosity into bigger one, I > think we should go back to the plans of reworking and cleaning it. If you are talking about the changes like introduced here (essentially it's Patch 4): https://www.spinics.net/lists/netdev/msg888079.html I can resurrect it (rebase on the latest kernel, fix the notes, run dt-validation, etc) and submit for review on the next week or so. Then the Leong' patch in subject either won't be necessary or will concern the shared schema only. Does it sound acceptable? -Serge(y) > > Best regards, > Krzysztof >