linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Christian Marangi <ansuelsmth@gmail.com>
To: Andrew Lunn <andrew@lunn.ch>,
	Florian Fainelli <f.fainelli@gmail.com>,
	Vladimir Oltean <olteanv@gmail.com>,
	"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>,
	Heiner Kallweit <hkallweit1@gmail.com>,
	Russell King <linux@armlinux.org.uk>,
	Gregory Clement <gregory.clement@bootlin.com>,
	Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>,
	Christian Marangi <ansuelsmth@gmail.com>,
	John Crispin <john@phrozen.org>,
	netdev@vger.kernel.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org, Lee Jones <lee@kernel.org>,
	linux-leds@vger.kernel.org
Subject: [net-next PATCH 10/11] dt-bindings: net: phy: Document support for LEDs node
Date: Tue,  7 Mar 2023 18:00:45 +0100	[thread overview]
Message-ID: <20230307170046.28917-11-ansuelsmth@gmail.com> (raw)
In-Reply-To: <20230307170046.28917-1-ansuelsmth@gmail.com>

Document support for LEDs node in phy and add an example for it.
PHY LED will have to match led pattern and should be treated as a
generic led.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
---
 .../devicetree/bindings/net/ethernet-phy.yaml | 22 +++++++++++++++++++
 1 file changed, 22 insertions(+)

diff --git a/Documentation/devicetree/bindings/net/ethernet-phy.yaml b/Documentation/devicetree/bindings/net/ethernet-phy.yaml
index 1327b81f15a2..0ec8ef6b0d8a 100644
--- a/Documentation/devicetree/bindings/net/ethernet-phy.yaml
+++ b/Documentation/devicetree/bindings/net/ethernet-phy.yaml
@@ -197,6 +197,13 @@ properties:
       PHY's that have configurable TX internal delays. If this property is
       present then the PHY applies the TX delay.
 
+  leds:
+    type: object
+
+    patternProperties:
+      '^led(@[a-f0-9]+)?$':
+        $ref: /schemas/leds/common.yaml#
+
 required:
   - reg
 
@@ -204,6 +211,8 @@ additionalProperties: true
 
 examples:
   - |
+    #include <dt-bindings/leds/common.h>
+
     ethernet {
         #address-cells = <1>;
         #size-cells = <0>;
@@ -219,5 +228,18 @@ examples:
             reset-gpios = <&gpio1 4 1>;
             reset-assert-us = <1000>;
             reset-deassert-us = <2000>;
+
+            leds {
+                #address-cells = <1>;
+                #size-cells = <0>;
+
+                led@0 {
+                    reg = <0>;
+                    color = <LED_COLOR_ID_WHITE>;
+                    function = LED_FUNCTION_LAN;
+                    function-enumerator = <1>;
+                    default-state = "keep";
+                };
+            };
         };
     };
-- 
2.39.2


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  parent reply	other threads:[~2023-03-07 22:35 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-07 17:00 [net-next PATCH 00/11] net: Add basic LED support for switch/phy Christian Marangi
2023-03-07 17:00 ` [net-next PATCH 01/11] net: dsa: qca8k: add LEDs basic support Christian Marangi
2023-03-07 23:16   ` Andrew Lunn
2023-03-07 17:57     ` Christian Marangi
2023-03-08  0:49       ` Andrew Lunn
2023-03-07 19:41         ` Christian Marangi
2023-03-08  1:07           ` Andrew Lunn
2023-03-16 22:07   ` kernel test robot
2023-03-07 17:00 ` [net-next PATCH 02/11] net: dsa: qca8k: add LEDs blink_set() support Christian Marangi
2023-03-07 23:16   ` Andrew Lunn
2023-03-07 17:00 ` [net-next PATCH 03/11] net: phy: Add a binding for PHY LEDs Christian Marangi
2023-03-07 23:17   ` Andrew Lunn
2023-03-07 18:00     ` Christian Marangi
2023-03-08  0:54       ` Andrew Lunn
2023-03-07 17:00 ` [net-next PATCH 04/11] net: phy: phy_device: Call into the PHY driver to set LED brightness Christian Marangi
2023-03-07 17:00 ` [net-next PATCH 05/11] net: phy: marvell: Add software control of the LEDs Christian Marangi
2023-03-07 17:00 ` [net-next PATCH 06/11] net: phy: phy_device: Call into the PHY driver to set LED blinking Christian Marangi
2023-03-07 17:00 ` [net-next PATCH 07/11] net: phy: marvell: Implement led_blink_set() Christian Marangi
2023-03-07 17:00 ` [net-next PATCH 08/11] dt-bindings: net: dsa: dsa-port: Document support for LEDs node Christian Marangi
2023-03-08  1:00   ` Andrew Lunn
2023-03-08 18:58   ` Krzysztof Kozlowski
2023-03-07 17:00 ` [net-next PATCH 09/11] dt-bindings: net: dsa: qca8k: add LEDs definition example Christian Marangi
2023-03-08 10:58   ` Krzysztof Kozlowski
2023-03-08 13:57     ` Andrew Lunn
2023-03-08 18:49       ` Krzysztof Kozlowski
2023-03-08 19:02         ` Christian Marangi
2023-03-08 19:09           ` Krzysztof Kozlowski
2023-03-08 19:23             ` Christian Marangi
2023-03-08 19:42               ` Andrew Lunn
2023-03-07 17:00 ` Christian Marangi [this message]
2023-03-08  1:01   ` [net-next PATCH 10/11] dt-bindings: net: phy: Document support for LEDs node Andrew Lunn
2023-03-08 11:00   ` Krzysztof Kozlowski
2023-03-08 18:56     ` Krzysztof Kozlowski
2023-03-08 18:56   ` Krzysztof Kozlowski
2023-03-08 19:03     ` Christian Marangi
2023-03-07 17:00 ` [net-next PATCH 11/11] arm: mvebu: dt: Add PHY LED support for 370-rd WAN port Christian Marangi
2023-03-07 23:20   ` Andrew Lunn
2023-03-07 18:03     ` Christian Marangi
2023-03-08  1:20 ` [net-next PATCH 00/11] net: Add basic LED support for switch/phy Andrew Lunn

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=20230307170046.28917-11-ansuelsmth@gmail.com \
    --to=ansuelsmth@gmail.com \
    --cc=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=devicetree@vger.kernel.org \
    --cc=edumazet@google.com \
    --cc=f.fainelli@gmail.com \
    --cc=gregory.clement@bootlin.com \
    --cc=hkallweit1@gmail.com \
    --cc=john@phrozen.org \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=kuba@kernel.org \
    --cc=lee@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-leds@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=netdev@vger.kernel.org \
    --cc=olteanv@gmail.com \
    --cc=pabeni@redhat.com \
    --cc=robh+dt@kernel.org \
    --cc=sebastian.hesselbarth@gmail.com \
    /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;
as well as URLs for NNTP newsgroup(s).