Message ID | 20231215212244.1658-2-ansuelsmth@gmail.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel+bounces-1903-ouuuleilei=gmail.com@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:3b04:b0:fb:cd0c:d3e with SMTP id c4csp9670843dys; Fri, 15 Dec 2023 16:36:31 -0800 (PST) X-Google-Smtp-Source: AGHT+IE4JZsAHuBmJbJh9XNMSrCR0RUxjbEPANV282T9GUUejuVGrqQVIfdr2YM5DmvP0I6us6PP X-Received: by 2002:a05:6a21:6da1:b0:18f:97c:6142 with SMTP id wl33-20020a056a216da100b0018f097c6142mr16792460pzb.63.1702686991276; Fri, 15 Dec 2023 16:36:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702686991; cv=none; d=google.com; s=arc-20160816; b=D4OaGI8K5bPHSOSSi7srx+HhS8PSdU9ZJEtk1a1Gq9VFrueAM7RMgvRtp5bwL++8eN mpuAgZeUZRvjbPWFOISD+fUSM5IAUkMS0k8FzVIBBMNbji19aYdMIofQp0SCixoiCVUw BcIb5K01VkbbWfmWDlc3IHQH5TGJiH4Jb4oUthverr+ltWcPH5+D0CmkWRr8hoPFT9ti ipYUkpluNLgj7q0TbXst59fToJ7cgrlNHK6PMeIH4+6Gr3/o5cEha6PFmPAjY54v8R0t moohrj+N3h7t2QP7R52wMrcsguyus26fNIB7OLbwOUkGUTdGtG5q0zQ6C1qPWAmRIW// IEGg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:to:from:dkim-signature; bh=0uIS1xvpcGYFfMf9N01u33T+TCWbWjii1imIi3mSLAk=; fh=zMhr/QaHlUGdJIFxViiudBM+C42ITh4H3O1f/VExlVE=; b=jFcXidCHN9L15SZ3tYzYXtUCN3wGqNFJvDlTutzI5qWj/ETn7TLSpX+SEPd+LWLSlA 5GdwznNFKQ/mo5q9Nj8KoS2zKxtZ25S2Z12AwfHI/gvrHhhZDAq2TOpUX+GVN1GgeLUE maSebKX16Wk1/mMLIVuAMGqNsSiMovuv5nt3XJKOaAED6at9HlJu/19W3xSHmisRC2y/ JxNhf7g2F0U9R8DJX3rpzRk4AiY1COJt8WJofZYszZ+Q3lUE+fthLHfnnPCudID6JSwn kpaRuttgHv2t3vAH7yzMQQvh2qc/1zIRaJXhDt99SzQb5wTKaTE5c5t0NJsfa9ir4mSX n4Ig== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=I2bgX0By; spf=pass (google.com: domain of linux-kernel+bounces-1903-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-1903-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id d11-20020a056a00244b00b006d0b617fb6esi6231434pfj.403.2023.12.15.16.36.30 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Dec 2023 16:36:31 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-1903-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=I2bgX0By; spf=pass (google.com: domain of linux-kernel+bounces-1903-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-1903-ouuuleilei=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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 803F7B24809 for <ouuuleilei@gmail.com>; Sat, 16 Dec 2023 00:33:51 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id A9F1441C95; Sat, 16 Dec 2023 00:23:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="I2bgX0By" X-Original-To: linux-kernel@vger.kernel.org Received: from mail-wr1-f42.google.com (mail-wr1-f42.google.com [209.85.221.42]) (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 5460B6127; Sat, 16 Dec 2023 00:23:09 +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-wr1-f42.google.com with SMTP id ffacd0b85a97d-3332efd75c9so938141f8f.2; Fri, 15 Dec 2023 16:23:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1702686187; x=1703290987; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=0uIS1xvpcGYFfMf9N01u33T+TCWbWjii1imIi3mSLAk=; b=I2bgX0ByCIK5LsvxD3qeHX/7h6c2eZu1vtBZYJXnhb1PzwTi2X+6nRhsrKjfzIXVS9 vPrl6ATH4W/g5TX+Ksz0n12vU3LwfwFNNgKlYgAPEVuGC6o1J5zp5x1FtEDpe5XGyJde g88WJG7EVhGAKxCjB/qByWhbksDLld51AhNmwse1Tcj1UyGN2h4W2NB6cw/dIu+HuktY +mvamT+nwMng0fSZrPQ79FP84SwvbuKFl3mhaxLufzfbV3uzpbW5fBQFzBcsZnsANoDG tv+xFlJrl/lDbHtxMmt0W7/UY0cXBxQo7wwwrgiDLT6AgDKDmxInYNm2JrXcF06oIyL7 pZtg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1702686187; x=1703290987; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=0uIS1xvpcGYFfMf9N01u33T+TCWbWjii1imIi3mSLAk=; b=gadwxLqdWXcs7/0vDvvz4jMId3ZhEn7mg9IlZl6k+aIG9iSUNiqQ9d7DzYygsHDX2L ORZDTEH03p4Md6bVBkHx0itxRdj7axtvtitwpaeidQfVWp+ZpI/doq1SdY3pyDB5EnAE eAwzk5yrfOY45jFny0vZ2vT5OVYT59S/BjRgoe9bN/xvNExjrJQSqG9Fp9C+5N30MI80 ANZKsuFuORPVMEwAJugVvZHlCTKKsRBHrcBV+hhSgZqhmvfwNbrO/NMnBUZ8oiqMXvLS m19hB9IkzfSK69Ia5DabWu4vwPPu8tnzXAETKKstFpNPzGJG6woHG/hjqs6CkJhMtxnb n2Kw== X-Gm-Message-State: AOJu0Ywf3jF5wmX3M+hK/RTL0V76i21zaGZzZ2CJ40HOljmrB7/Y/iZ/ VtDvlXgJWcs5Qp2oU8l3GvA= X-Received: by 2002:a05:6000:b4a:b0:333:4052:bfeb with SMTP id dk10-20020a0560000b4a00b003334052bfebmr2988930wrb.208.1702686187282; Fri, 15 Dec 2023 16:23:07 -0800 (PST) Received: from localhost.localdomain (93-34-89-13.ip49.fastwebnet.it. [93.34.89.13]) by smtp.googlemail.com with ESMTPSA id a15-20020a5d508f000000b0033330846e76sm1496191wrt.86.2023.12.15.16.23.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Dec 2023 16:23:06 -0800 (PST) From: Christian Marangi <ansuelsmth@gmail.com> To: Andrew Lunn <andrew@lunn.ch>, Heiner Kallweit <hkallweit1@gmail.com>, Russell King <linux@armlinux.org.uk>, "David S. Miller" <davem@davemloft.net>, Eric Dumazet <edumazet@google.com>, Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>, Rob Herring <robh+dt@kernel.org>, Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>, Conor Dooley <conor+dt@kernel.org>, Florian Fainelli <f.fainelli@gmail.com>, Christian Marangi <ansuelsmth@gmail.com>, netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Tobias Waldekranz <tobias@waldekranz.com> Subject: [net-next PATCH v4 1/4] dt-bindings: net: phy: Document new LEDs polarity property Date: Fri, 15 Dec 2023 22:22:41 +0100 Message-Id: <20231215212244.1658-2-ansuelsmth@gmail.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20231215212244.1658-1-ansuelsmth@gmail.com> References: <20231215212244.1658-1-ansuelsmth@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: <linux-kernel.vger.kernel.org> List-Subscribe: <mailto:linux-kernel+subscribe@vger.kernel.org> List-Unsubscribe: <mailto:linux-kernel+unsubscribe@vger.kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1785396714332399837 X-GMAIL-MSGID: 1785396714332399837 |
Series |
net: phy: generic polarity + LED support for qca808x
|
|
Commit Message
Christian Marangi
Dec. 15, 2023, 9:22 p.m. UTC
Document new LEDs polarity property to define what mode the LED needs to
be put to turn it on.
Currently supported modes are:
- active-low
- active-high
- active-low-tristate
- active-high-tristate
Mode is optional and if it's not defined, a default value is chosed by
the driver.
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
---
Changes v4:
- Drop support for global active-low
- Rework to polarity option (for marvell10g series support)
Changes v3:
- Out of RFC
Changes v2:
- Add this patch
.../devicetree/bindings/net/ethernet-phy.yaml | 11 +++++++++++
1 file changed, 11 insertions(+)
Comments
On Fri, Dec 15, 2023 at 10:22:41PM +0100, Christian Marangi wrote: > Document new LEDs polarity property to define what mode the LED needs to > be put to turn it on. > > Currently supported modes are: > > - active-low > - active-high > - active-low-tristate > - active-high-tristate Why is having a polarity unique to LEDs on ethernet PHYs? It's not. We already have 'active-low' established on several LED bindings. Please move the definition to leds/common.yaml and extend it. I would simply add an 'inactive-tristate' boolean property (if there's an actual user). I do worry this continues to evolve until we've re-created the pinctrl binding... Rob
On Wed, Dec 20, 2023 at 09:22:09AM -0600, Rob Herring wrote: > On Fri, Dec 15, 2023 at 10:22:41PM +0100, Christian Marangi wrote: > > Document new LEDs polarity property to define what mode the LED needs to > > be put to turn it on. > > > > Currently supported modes are: > > > > - active-low > > - active-high > > - active-low-tristate > > - active-high-tristate > > Why is having a polarity unique to LEDs on ethernet PHYs? It's not. We > already have 'active-low' established on several LED bindings. Please > move the definition to leds/common.yaml and extend it. I would simply > add an 'inactive-tristate' boolean property (if there's an actual user). > Should I also drop the active-low from the current schema that have it? Also we have led-active-low. (should we support both?) On the marvell10g series we are discussing of using tristate or not. We notice tristate might be confusing, would it be better to use inactive-high-impedance ? > I do worry this continues to evolve until we've re-created the pinctrl > binding... >
> I do worry this continues to evolve until we've re-created the pinctrl > binding... Hi Rob What is you opinion of the pinctrl binding? Should we just copy parts of it? Andrew
> On the marvell10g series we are discussing of using tristate or not. We > notice tristate might be confusing, would it be better to use > inactive-high-impedance ? The pincfg-node.yaml binding has: drive-open-drain: oneOf: - type: boolean - $ref: /schemas/types.yaml#/definitions/uint32 const: 1 # No known cases of 0 deprecated: true description: drive with open drain drive-open-source: type: boolean description: drive with open source I'm not sure what the deprecated means. Is it that a value is deprecated, not the property as a whole? Andrew
On Thu, Dec 21, 2023 at 10:43:17AM +0100, Andrew Lunn wrote: > > On the marvell10g series we are discussing of using tristate or not. We > > notice tristate might be confusing, would it be better to use > > inactive-high-impedance ? > > The pincfg-node.yaml binding has: > > drive-open-drain: > oneOf: > - type: boolean > - $ref: /schemas/types.yaml#/definitions/uint32 > const: 1 # No known cases of 0 > deprecated: true > description: drive with open drain > > drive-open-source: > type: boolean > description: drive with open source > > I'm not sure what the deprecated means. Is it that a value is > deprecated, not the property as a whole? Yeah, it means that only the boolean form of this property should be used going forward. The comment suggests that the value had no meaning in the first place, and that testing for presence alone has been sufficient all along.
On Thu, Dec 21, 2023 at 10:34:41AM +0100, Andrew Lunn wrote: > > I do worry this continues to evolve until we've re-created the pinctrl > > binding... > > Hi Rob > > What is you opinion of the pinctrl binding? Should we just copy parts > of it? > Hi, I have the new series ready but I'm not sure pincfg-node have useful property. What we should use from there? From what I can see only output-low would be useful to us. I didn't find a way to handle the inactive mode. Should I send the new series so we can continue the discussion there or better to wait for Rob feedback?
diff --git a/Documentation/devicetree/bindings/net/ethernet-phy.yaml b/Documentation/devicetree/bindings/net/ethernet-phy.yaml index 8fb2a6ee7e5b..282bf18f50fd 100644 --- a/Documentation/devicetree/bindings/net/ethernet-phy.yaml +++ b/Documentation/devicetree/bindings/net/ethernet-phy.yaml @@ -225,6 +225,17 @@ properties: driver dependent and required for ports that define multiple LED for the same port. + polarity: + description: | + Electrical polarity and drive type for the LED to turn it + on. + $ref: /schemas/types.yaml#/definitions/string + enum: + - active-low + - active-high + - active-low-tristate + - active-high-tristate + required: - reg