Article View: linux.kernel.netdev
Article #4653[PATCH 1/3] dt-bindings: leds: add Realtek RTL9301 port LEDs
From: Ross Cawston
Date: Sun, 18 Oct 2026 19:43
Date: Sun, 18 Oct 2026 19:43
104 lines
9109 bytes
9109 bytes
Add a binding for RTL9300 switch port LEDs under software control. The
node is a child of the switch and gives the offset of the software LED
control registers; each LED child names its switch port and its place
among the port's LEDs.
Signed-off-by: Ross Cawston <ross@r-sc.ca>
---
.../leds/realtek,rtl9301-port-leds.yaml | 84 +++++++++++++++++++
1 file changed, 84 insertions(+)
create mode 100644 Documentation/devicetree/bindings/leds/realtek,rtl9301-port-leds.yaml
diff --git a/Documentation/devicetree/bindings/leds/realtek,rtl9301-port-leds.yaml b/Documentation/devicetree/bindings/leds/realtek,rtl9301-port-leds.yaml
new file mode 100644
index 00000000000..8d6b3552526
--- /dev/null
+++ b/Documentation/devicetree/bindings/leds/realtek,rtl9301-port-leds.yaml
@@ -0,0 +1,84 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/leds/realtek,rtl9301-port-leds.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Realtek RTL9300 switch port LEDs under software control
+
+maintainers:
+ - Ross Cawston <ross@r-sc.ca>
+
+description: |
+ The RTL9300 switch drives up to four LEDs per port over its LED interface,
+ serial or scanned, each normally showing a hardware function chosen by the
+ LED set of the port. The LEDs listed here are taken over by software instead
+ and switched on and off as LED class devices, for port LEDs that have no
+ hardware function such as the PoE status LED of a PoE switch. The node is a
+ child of the switch, whose registers it uses.
+
+properties:
+ compatible:
+ const: realtek,rtl9301-port-leds
+
+ reg:
+ description: The software LED control registers, from SW_LED_LOAD to the
+ end of LED_PORT_SW_CTRL, as an offset into the switch registers.
+ maxItems: 1
+
+ "#address-cells":
+ const: 2
+
+ "#size-cells":
+ const: 0
+
+patternProperties:
+ "^led@[0-9a-f]+,[0-3]$":
+ $ref: /schemas/leds/common.yaml#
+ unevaluatedProperties: false
+
+ properties:
+ reg:
+ items:
+ - items:
+ - description: Switch port
+ maximum: 27
+ - description: LED of the port, numbered as in the port's
+ LED set
+ maximum: 3
+
+ required:
+ - reg
+
+required:
+ - compatible
+ - reg
+ - "#address-cells"
+ - "#size-cells"
+
+additionalProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/leds/common.h>
+
+ led-controller@cc48 {
+ compatible = "realtek,rtl9301-port-leds";
+ reg = <0xcc48 0x84>;
+ #address-cells = <2>;
+ #size-cells = <0>;
+
+ led@0,2 {
+ reg = <0 2>;
+ color = <LED_COLOR_ID_GREEN>;
+ function = "poe";
+ function-enumerator = <1>;
+ };
+
+ led@8,2 {
+ reg = <8 2>;
+ color = <LED_COLOR_ID_GREEN>;
+ function = "poe";
+ function-enumerator = <2>;
+ };
+ };
--
2.55.0.windows.5
Technical Details
Message-ID:
<20261018194339.132-2-ross@r-sc.ca>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-348170-linux-kernel-netdev=dewy.ruReferences:
<20261018194339.132-1-ross@r-sc.ca>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-348170-linux-kernel-netdev=dewy.ru From: ross@r-sc.ca (Ross Cawston) Newsgroups: linux.kernel.netdev Subject: [PATCH 1/3] dt-bindings: leds: add Realtek RTL9301 port LEDs Date: Sun, 18 Oct 2026 12:43:36 -0700 Organization: Usenet Network Message-ID: <20261018194339.132-2-ross@r-sc.ca> References: <20261018194339.132-1-ross@r-sc.ca> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Injection-Info: usenet.network; logging-data="3415062"; mail-complaints-to="abuse@usenet.network" Cancel-Lock: sha1:g20JKW/T+GV7KKtz/1Gh9y59TYk= sha256:mRjr24sgm8ETk+WSHxYRaUTE8/AOaTXpeYP0/gy/kMM= sha1:e8komeagFzvonx+hb58LCPX8CLo= sha256:FJ5xgQ48jO6NHp0cTdQ56V/1CbtVE9PvqC6Pq4L3trI= List-ID: <netdev.vger.kernel.org> X-Mailpost-Empty-Hdrs: X-Spam-Level X-Received: from localhost (localhost [127.0.0.1]) by mail.dewy.ru (Postfix) with ESMTP id 0F624110896; Sun, 18 Oct 2026 22:56:42 +0300 (MSK) X-Virus-Scanned: Debian amavisd-new at usenet.network X-Spam-Flag: NO X-Spam-Score: -3.299 X-Spam-Status: No, score=-3.299 tagged_above=-9999 required=6.31 tests=[DCC_REPUT_70_89=0.1, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, MAILING_LIST_MULTI=-1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=pass (2048-bit key) header.d=r-sc.ca X-Received: from mail.dewy.ru ([127.0.0.1]) by localhost (mail.dewy.ru [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Pr_wTxmWR_oG; Sun, 18 Oct 2026 22:56:38 +0300 (MSK) X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.234.253.10; helo=sea.lore.kernel.org; envelope-from=netdev+bounces-348170-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> X-Authentication-Results: OpenDMARC; dmarc=none (p=none dis=none) header.from=r-sc.ca X-Received: from sea.lore.kernel.org (sea.lore.kernel.org [172.234.253.10]) by mail.dewy.ru (Postfix) with ESMTPS id D1596110879; Sun, 18 Oct 2026 22:56:28 +0300 (MSK) X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.90.174.1]) by sea.lore.kernel.org (Postfix) with ESMTP id 83B0A3DBB6; Sun, 18 Oct 2026 19:56:23 +0000 (UTC) X-Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 00ACA45DF41; Sun, 18 Oct 2026 19:56:23 +0000 (UTC) X-Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=r-sc.ca header.i=@r-sc.ca header.b="PWEByqwy" X-Received: from out-utut-a196.jellyfish.systems (out-utut-a196.jellyfish.systems [198.177.127.196]) (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 8BFF540BCBB for <netdev@vger.kernel.org>; Sun, 18 Oct 2026 19:56:21 +0000 (UTC) X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.177.127.196 X-ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1792353382; cv=none; b=GQv6TjssI/i5xNhPYRNOLg/FxM6hdoph3hUaMLwbF6RkUpmX/63CN88/wA6VJrDf5Ag9Aac8ml7kzGyWqsILT8gMGAaacZdtmFoNQzKcttH/32mtOarRyJzrn3Hsz/dUfwNbKlwz0tTElSyCGzZgODaXcko85Kl/cRcDL3Ldv/g= X-ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1792353382; c=relaxed/simple; bh=K5tVx83eZko7Hl+sBbrVkmUzvN6AVp1ARz5pSHuClps=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=t8RfgIS5B95Pw5yeO+bzMUL4NUcv0fkuploWubdnocaNWXBlu57hgvQUFA5j1PU+yebCYyhbKZZ5zWuRLKdL2PzDKOXBah8+Peqb+ypwf7INludqGcfbN1dMgWnE3L17eOgL6RGYVRLVk2gUKkI/RKy3fPOqp6sW7idamzYeIIo= X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=r-sc.ca; spf=pass smtp.mailfrom=r-sc.ca; dkim=pass (2048-bit key) header.d=r-sc.ca header.i=@r-sc.ca header.b=PWEByqwy; arc=none smtp.client-ip=198.177.127.196 X-Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=r-sc.ca X-Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=r-sc.ca X-Received: from DESKTOP-290OH2S (d207-6-150-133.bchsia.telus.net [207.6.150.133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mail.spacemail.com (Postfix) with ESMTPSA id 4j78Hm18rQz8sWR; Sun, 18 Oct 2026 19:43:48 +0000 (UTC) X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=r-sc.ca; s=spacemail; t=1792352630; bh=x1Jv6GO0wPuojhw9KPg5KMy9xKjoXPBBoSTMpj3/LZI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=PWEByqwyOcIRB+puisOnF81Sa0mgfaAbahDN9ulzoYKHj5TwpCjam3fOmZ1Urecxq am4a2L7VkuC+rpSKiPX3jlNWjm/wL5DcYofqlwEKLMJI3wMGlZ06CpqlBeD8IFgEkM xrWxa/3GsCxFuhObAhm36HEAq8SCIsyVT+qUxjQgYfBoPDqghID3N1UB188Ul8HoQx wTl7848eyDbt05VVfgT6ZW7O7X91H8dbOIpSc1f9vte1/4oTqsT6OIVmujBawVCe/c ITCrtCVZJooqZ5twRfEEMUqrtU/PjWNRiWwOhrJncKBfrptrzx6xshFITvNn2c1Z9u olZo/gYDBnCKQ== X-Cc: robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org, chris.packham@alliedtelesis.co.nz, andrew+netdev@lunn.ch, davem@davemloft.net, edumazet@kernel.org, kuba@kernel.org, pabeni@redhat.com, linux-leds@vger.kernel.org, devicetree@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Ross Cawston <ross@r-sc.ca> X-Mailer: git-send-email 2.55.0.windows.5 X-In-Reply-To: <20261018194339.132-1-ross@r-sc.ca> X-Precedence: bulk X-Mailing-List: netdev@vger.kernel.org X-List-Subscribe: <mailto:netdev+subscribe@vger.kernel.org> X-List-Unsubscribe: <mailto:netdev+unsubscribe@vger.kernel.org> X-Envelope-From: ross@r-sc.ca