Received: by 2002:ab2:6203:0:b0:1f5:f2ab:c469 with SMTP id o3csp1823532lqt; Sun, 21 Apr 2024 10:55:18 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXQJXSxsQr5L5Q/Bnj1NHwWdzHPwxEgsBvPjDmGW+mDZXnwkL9Val4nEshO+XDz16Dnq9Ym7fwW3qwx6dou8BqSWfuoii/rLO6GAzFkZQ== X-Google-Smtp-Source: AGHT+IFvgfnweXPBTpcyOhDDnTfE9E9PQPK5L4lZ/rmNs+zOOPCFnR+RtJHOf3wpc5bd8gl1Rcs2 X-Received: by 2002:a50:d4c9:0:b0:56e:2464:7c4b with SMTP id e9-20020a50d4c9000000b0056e24647c4bmr4966583edj.10.1713722118121; Sun, 21 Apr 2024 10:55:18 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713722118; cv=pass; d=google.com; s=arc-20160816; b=NuofTeUvkt5GYEbLGjSiS0vD++xumCfRvppo4hCAQO9d7u9KG7T5wWp/YolRx008X1 ZudZyLIwlx++R8gPHBUmfhRFUWyTxQWUQxaLQ1Z5Zw26XFO79ZH0Q71qSCgCIBSOP0Fv A1SpTk4kFnC56nfeIou8n50AnBlfu3sMohbQoi8biaaaH022g646CabepAvJBFC4SNRv mBYesuc2LBSLrTZxQqCmyxdtALMV1BwiE926SfzrFFENn80iEgKw5b6NjH1nphkymGkh vMxy+ifg64CJvuZ59ZV6oYZ4LoKWXYa87FfLabgcAnBZYbEGgmLkfWkEyJW3NY1rpG39 jj/g== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :references:message-id:subject:cc:to:from:date:dkim-signature; bh=mlipOm1BapM8HlNYoaxhyEbmDWmT73O1xUbpkHHF2aM=; fh=N50DolVcnYyCEJlgYjRb1WGGxo5jVdHzlAcqbAg4cQQ=; b=UeEgqgWolvIDbw7NeyKyRcMnS1oKyuPduIArztD37MhnQfEip2OJAzwzMgisQ/XLwg HNGIckYafctkVcTgevaYBbXl61st5VMAU6LM1HB11q7Ab3YtyQUGedBO/vRDEZAXhAAf gETumnvkGwFc0qn/eG+0HlF/EHeZi5HFsypW/v60PKwuY74aBV/kOggp908MUKslQHs/ B6cwH4IjXEakqyB5UrwNvRZyPa6dc2TsQIFmkG9TzUdAJKPiSvlo20G4HA9WhbsZAyLY HgiJcW+cBCYxeRnBJpkOqVQYKLqMDJX4e/dSH0wILeL74Glp5a7IYSr5h/Dx47LPApmX X3kQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=tlwBeR8T; arc=pass (i=1 spf=pass spfdomain=lunn.ch dkim=pass dkdomain=lunn.ch dmarc=pass fromdomain=lunn.ch); spf=pass (google.com: domain of linux-kernel+bounces-152549-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-152549-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=lunn.ch Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id c3-20020a50f603000000b00571bfc9c52fsi4536961edn.484.2024.04.21.10.55.17 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 21 Apr 2024 10:55:18 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-152549-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=tlwBeR8T; arc=pass (i=1 spf=pass spfdomain=lunn.ch dkim=pass dkdomain=lunn.ch dmarc=pass fromdomain=lunn.ch); spf=pass (google.com: domain of linux-kernel+bounces-152549-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-152549-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=lunn.ch 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 am.mirrors.kernel.org (Postfix) with ESMTPS id B0C601F210EC for ; Sun, 21 Apr 2024 17:55:17 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id DCAB53BB4B; Sun, 21 Apr 2024 17:55:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=lunn.ch header.i=@lunn.ch header.b="tlwBeR8T" Received: from vps0.lunn.ch (vps0.lunn.ch [156.67.10.101]) (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 D5C7379FD; Sun, 21 Apr 2024 17:55:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=156.67.10.101 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713722105; cv=none; b=VtgYgVVguiw+lh3R9mn1QkvhUKcjFGc5J9u5nmArtKm+7VZg69IhdA8YoZe0pTT84lu1DJKI5ojFNbbud8ZMk+kyA2LyUszutUZABV20/B3wku1UhyYiaMO5TceRDAB2XCJZz3MefZP4syaC9X+uFjgvWCwTThwkUduhVHj6yrU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713722105; c=relaxed/simple; bh=Qaj9o+2NK19fCBbgW9Z+DVmAh2E8bkZ2Z7Is1K9MqHU=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=FBkgtGWgAXRFRRNv6Mo5OvEUno7N4igsAlqLfeNgmmTsGFVact9GKScuino2STx+ltqVaQxB0AOWzdEFtjR45JRNk/wCxhefvi6keRuFRIoXWz62wzVBxXwwGFH1hE8mW6G87Kfj+ozWAsg5P3htdSDjCo9S6gzdYcx54kuMFXM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=lunn.ch; spf=pass smtp.mailfrom=lunn.ch; dkim=pass (1024-bit key) header.d=lunn.ch header.i=@lunn.ch header.b=tlwBeR8T; arc=none smtp.client-ip=156.67.10.101 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=lunn.ch Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=lunn.ch DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lunn.ch; s=20171124; h=In-Reply-To:Content-Transfer-Encoding:Content-Disposition: Content-Type:MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:From: Sender:Reply-To:Subject:Date:Message-ID:To:Cc:MIME-Version:Content-Type: Content-Transfer-Encoding:Content-ID:Content-Description:Content-Disposition: In-Reply-To:References; bh=mlipOm1BapM8HlNYoaxhyEbmDWmT73O1xUbpkHHF2aM=; b=tl wBeR8TgSnIoJPSXFuCCm3yVByJfFFgfTw4x7h+30jW2dUC8iJR5f9XiRLyBPlm7FXyOi4bMVrpf56 kpBzydxzzutY3guROW6cvYq8iIn1j4BISS6i7fI7gHJYjd7m9jjbmZu13jrkZeUr3CqDfWQWRz0Fl IuS0ej8m+8qt3tI=; Received: from andrew by vps0.lunn.ch with local (Exim 4.94.2) (envelope-from ) id 1rybOe-00DYZJ-NB; Sun, 21 Apr 2024 19:54:36 +0200 Date: Sun, 21 Apr 2024 19:54:36 +0200 From: Andrew Lunn To: Josua Mayer Cc: Michael Hennerich , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Alexandru Tachici , Heiner Kallweit , Russell King , Jon Nettleton , Yazan Shhady , "netdev@vger.kernel.org" , "devicetree@vger.kernel.org" , "linux-kernel@vger.kernel.org" Subject: Re: [PATCH net-next v2 1/2] dt-bindings: net: adin: add property for link-status pin polarity Message-ID: References: <20240420-adin-pin-polarity-v2-0-bf9714da7648@solid-run.com> <20240420-adin-pin-polarity-v2-1-bf9714da7648@solid-run.com> <41567aec-adf2-422a-867e-9087ef33ef36@lunn.ch> <2c622947-3b54-4172-b009-0551f43c3504@lunn.ch> <1fe2dce3-972e-420e-b4e1-f07e15b6b35f@solid-run.com> 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=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1fe2dce3-972e-420e-b4e1-f07e15b6b35f@solid-run.com> > I merely don't like the idea that this makes no sense for the other > possible pin functions. > Once somebody uses this pin for different use-case, they will need > to solve it again. There are not too many different uses of this pin. The data sheet indicates you can connect it to the MAC to indicate link. You might also be able to use it with an external PTP stamper, using the start of frame indication. I don't know of any bindings for such use case, but something will be needed to describe how the pin is connected to the other device. And at that point, the active low property could be used. > >> This kind of configuration is much more like pinctrl than led. > > > > So what is the pinctrl way of describing this? You should not be > > inventing something new if there is an existing mechanism to describe > > it. We want consistency, not 42 different ways of doing one thing. > I am mostly familiar with the > #define PIN_FUNCTION magic-numbers > pins = ; > > But on Marvell platforms there is: > marvell,pins =? "mpp1"; > marvell,function = "gpio"; > > I also found more generic???: > Documentation/devicetree/bindings/pinctrl/pincfg-node.yaml > Documentation/devicetree/bindings/pinctrl/pinmux-node.yaml > which have output-high/output-low, function, pin. So that is probably your alternative if you want to not use the LED binding. > > Interestingly LED_0 supports some non-led functions, too: > - collision detection > - carrier sense > - tx/rx start > - tx error > so polarity is also relevant to non-led usage of LED_0 pin. Collision detection is an LED usage, you just don't see it very often since half duplex is pretty unusual this century. Carrier sense is also similar age, from when Ethernet was CSMA/CD. Since they are not really used any more we don't have them in the LED framework, but i think we could implement them if somebody actually wanted them. My intention was to keep the LED framework KISS, since vendors tend to implement all sorts of odd LED blink reasons. But if nobody wants them, nobody has a good end user use case for them, why support them? Andrew