From: Andrew Lunn <andrew@lunn.ch>
To: Matthias Kaehlcke <mka@chromium.org>
Cc: "David S . Miller" <davem@davemloft.net>,
Rob Herring <robh+dt@kernel.org>,
Mark Rutland <mark.rutland@arm.com>,
Florian Fainelli <f.fainelli@gmail.com>,
Heiner Kallweit <hkallweit1@gmail.com>,
netdev@vger.kernel.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org,
Douglas Anderson <dianders@chromium.org>
Subject: Re: [PATCH v4 1/4] dt-bindings: net: phy: Add subnode for LED configuration
Date: Fri, 2 Aug 2019 18:57:55 +0200 [thread overview]
Message-ID: <20190802165755.GM2099@lunn.ch> (raw)
In-Reply-To: <20190801190759.28201-2-mka@chromium.org>
On Thu, Aug 01, 2019 at 12:07:56PM -0700, Matthias Kaehlcke wrote:
> The LED behavior of some Ethernet PHYs is configurable. Add an
> optional 'leds' subnode with a child node for each LED to be
> configured. The binding aims to be compatible with the common
> LED binding (see devicetree/bindings/leds/common.txt).
>
> A LED can be configured to be 'on' when a link with a certain speed
> is active, or to blink on RX/TX activity. For the configuration to
> be effective it needs to be supported by the hardware and the
> corresponding PHY driver.
>
> Suggested-by: Andrew Lunn <andrew@lunn.ch>
> Signed-off-by: Matthias Kaehlcke <mka@chromium.org>
> ---
> Changes in v4:
> - patch added to the series
> ---
> .../devicetree/bindings/net/ethernet-phy.yaml | 47 +++++++++++++++++++
> 1 file changed, 47 insertions(+)
>
> diff --git a/Documentation/devicetree/bindings/net/ethernet-phy.yaml b/Documentation/devicetree/bindings/net/ethernet-phy.yaml
> index f70f18ff821f..81c5aacc89a5 100644
> --- a/Documentation/devicetree/bindings/net/ethernet-phy.yaml
> +++ b/Documentation/devicetree/bindings/net/ethernet-phy.yaml
> @@ -153,6 +153,38 @@ properties:
> Delay after the reset was deasserted in microseconds. If
> this property is missing the delay will be skipped.
>
> +patternProperties:
> + "^leds$":
> + type: object
> + description:
> + Subnode with configuration of the PHY LEDs.
> +
> + patternProperties:
> + "^led@[0-9]+$":
> + type: object
> + description:
> + Subnode with the configuration of a single PHY LED.
> +
> + properties:
> + reg:
> + description:
> + The ID number of the LED, typically corresponds to a hardware ID.
> + $ref: "/schemas/types.yaml#/definitions/uint32"
> +
> + linux,default-trigger:
> + description:
> + This parameter, if present, is a string specifying the trigger
> + assigned to the LED. Supported triggers are:
> + "phy_link_10m_active" - LED will be on when a 10Mb/s link is active
> + "phy_link_100m_active" - LED will be on when a 100Mb/s link is active
> + "phy_link_1g_active" - LED will be on when a 1Gb/s link is active
> + "phy_link_10g_active" - LED will be on when a 10Gb/s link is active
> + "phy_activity" - LED will blink when data is received or transmitted
Matthias
We should think a bit more about these names.
I can see in future needing 1G link, but it blinks off when there is
active traffic? So phy_link_1g_active could be confusing, and very similar to
phy_link_1g_activity? So maybe
> + "phy_link_10m" - LED will be solid on when a 10Mb/s link is active
> + "phy_link_100m" - LED will be solid on when a 100Mb/s link is active
> + "phy_link_1g" - LED will be solid on when a 1Gb/s link is active
etc.
And then in the future we can have
"phy_link_1g_activity' - LED will be on when 1Gbp/s
link is active and blink off
with activity.
What other use cases do we have? I don't want to support everything,
but we should be able to represent the most common modes without the
names getting too confusing.
Andrew
next prev parent reply other threads:[~2019-08-02 16:58 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-01 19:07 [PATCH v4 0/4] net: phy: realtek: Enable configuration of RTL8211E LEDs Matthias Kaehlcke
2019-08-01 19:07 ` [PATCH v4 1/4] dt-bindings: net: phy: Add subnode for LED configuration Matthias Kaehlcke
2019-08-02 16:57 ` Andrew Lunn [this message]
2019-08-02 18:27 ` Matthias Kaehlcke
2019-08-01 19:07 ` [PATCH v4 2/4] net: phy: Add function to retrieve LED configuration from the DT Matthias Kaehlcke
2019-08-02 16:38 ` Andrew Lunn
2019-08-02 17:59 ` Matthias Kaehlcke
2019-08-01 19:07 ` [PATCH v4 3/4] net: phy: realtek: Add helpers for accessing RTL8211E extension pages Matthias Kaehlcke
2019-08-04 8:33 ` Heiner Kallweit
2019-08-06 21:58 ` Matthias Kaehlcke
2019-08-01 19:07 ` [PATCH v4 4/4] net: phy: realtek: configure RTL8211E LEDs Matthias Kaehlcke
2019-08-01 21:04 ` David Miller
2019-08-02 18:18 ` Andrew Lunn
2019-08-02 19:40 ` Matthias Kaehlcke
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190802165755.GM2099@lunn.ch \
--to=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=devicetree@vger.kernel.org \
--cc=dianders@chromium.org \
--cc=f.fainelli@gmail.com \
--cc=hkallweit1@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=mka@chromium.org \
--cc=netdev@vger.kernel.org \
--cc=robh+dt@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox