mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Paul Louvel <paul.louvel@bootlin.com>
To: Andrew Lunn <andrew@lunn.ch>, Vladimir Oltean <olteanv@gmail.com>,
	 "David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@kernel.org>,
	 Jakub Kicinski <kuba@kernel.org>,
	Paolo Abeni <pabeni@redhat.com>,  Rob Herring <robh@kernel.org>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	 Conor Dooley <conor+dt@kernel.org>, Frank Li <Frank.Li@nxp.com>,
	 Jerry Ray <jerry.ray@microchip.com>
Cc: netdev@vger.kernel.org, devicetree@vger.kernel.org,
	 linux-kernel@vger.kernel.org, Bo Mellberg <bo.mellberg@se.com>,
	 Pascal Eberhard <pascal.eberhard@se.com>,
	 Thomas Petazzoni <thomas.petazzoni@bootlin.com>,
	 Miquel Raynal <miquel.raynal@bootlin.com>,
	 Paul Louvel <paul.louvel@bootlin.com>
Subject: [PATCH net-next 2/3] dt-bindings: net: dsa: lan9303: add smsc,led-mode property
Date: Thu, 26 Nov 2026 15:13:44 +0100	[thread overview]
Message-ID: <20261126-lan9303-leds-v1-2-a96731317859@bootlin.com> (raw)
In-Reply-To: <20261126-lan9303-leds-v1-0-a96731317859@bootlin.com>

The LAN9303 and LAN9354 select the function of all six LED pins with a
single LED_FUN field. On some boards the LED straps double as
configuration straps for other functions, such as the PHY address or the
EEPROM size, so the desired LED mode cannot be strapped.

Document an optional "smsc,led-mode" property. The value 110b is
reserved on the LAN9354.

Signed-off-by: Paul Louvel (Schneider Electric) <paul.louvel@bootlin.com>
---
 .../devicetree/bindings/net/dsa/smsc,lan9303.yaml  | 25 ++++++++++++++++++++++
 1 file changed, 25 insertions(+)

diff --git a/Documentation/devicetree/bindings/net/dsa/smsc,lan9303.yaml b/Documentation/devicetree/bindings/net/dsa/smsc,lan9303.yaml
index 95abf043a118..f044589b643d 100644
--- a/Documentation/devicetree/bindings/net/dsa/smsc,lan9303.yaml
+++ b/Documentation/devicetree/bindings/net/dsa/smsc,lan9303.yaml
@@ -40,6 +40,18 @@ properties:
     default: 200
     $ref: /schemas/types.yaml#/definitions/uint32
 
+  smsc,led-mode:
+    description: |
+      LED function mode.
+
+      This value will apply a predefined configuration to all six LED pins of
+      both external ports. See the "LED Operation" section of the datasheet.
+
+      When the property is absent, the value sampled from the configuration
+      straps is kept.
+    $ref: /schemas/types.yaml#/definitions/uint32
+    minimum: 0
+
 required:
   - compatible
   - reg
@@ -48,6 +60,19 @@ unevaluatedProperties: false
 
 allOf:
   - $ref: dsa.yaml#
+  - if:
+      properties:
+        compatible:
+          contains:
+            const: microchip,lan9354-mdio
+    then:
+      properties:
+        smsc,led-mode:
+          enum: [0, 1, 2, 3, 4, 5, 7]
+    else:
+      properties:
+        smsc,led-mode:
+          maximum: 3
 
 examples:
   - |

-- 
2.56.1


  parent reply	other threads:[~2026-11-26 14:14 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-26 14:13 [PATCH net-next 0/3] net: dsa: lan9303: add LED mode configuration Paul Louvel
2026-11-26 14:13 ` [PATCH net-next 1/3] dt-bindings: net: dsa: lan9303: add Microchip LAN9354 compatible Paul Louvel
2026-11-26 14:13 ` Paul Louvel [this message]
2026-11-26 14:13 ` [PATCH net-next 3/3] net: dsa: lan9303: add LED mode configuration Paul Louvel
2026-11-26 15:04   ` Andrew Lunn
2026-11-26 14:52 ` [PATCH net-next 0/3] " 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=20261126-lan9303-leds-v1-2-a96731317859@bootlin.com \
    --to=paul.louvel@bootlin.com \
    --cc=Frank.Li@nxp.com \
    --cc=andrew@lunn.ch \
    --cc=bo.mellberg@se.com \
    --cc=conor+dt@kernel.org \
    --cc=davem@davemloft.net \
    --cc=devicetree@vger.kernel.org \
    --cc=edumazet@kernel.org \
    --cc=jerry.ray@microchip.com \
    --cc=krzk+dt@kernel.org \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=miquel.raynal@bootlin.com \
    --cc=netdev@vger.kernel.org \
    --cc=olteanv@gmail.com \
    --cc=pabeni@redhat.com \
    --cc=pascal.eberhard@se.com \
    --cc=robh@kernel.org \
    --cc=thomas.petazzoni@bootlin.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

all inboxes | Powered by JetHome®