🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.kernel.netdev
Article #4659

[PATCH 0/3] leds: add Realtek RTL9300 port LEDs under software control

#4659
From: Ross Cawston
Date: Sun, 18 Oct 2026 19:43
31 lines
7334 bytes
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. Some boards wire LEDs to it that have
no hardware function and that the vendor firmware switches in software,
such as the PoE status LEDs of the MokerLink POE-10G07110GSM.

This series adds a binding for such LEDs as a child of the switch, like
its I2C and MDIO controllers, and a driver that takes them under
software control and exposes them as LED class devices. With the PSE
core's LED triggers, the PoE LEDs then follow the power delivery of
their ports. The registers come from the vendor SDK's register table.
Tested on the MokerLink POE-10G07110GSM.

Ross Cawston (3):
  dt-bindings: leds: add Realtek RTL9301 port LEDs
  dt-bindings: net: realtek,rtl9301-switch: add port LED controller
  leds: add Realtek RTL9300 port LED driver

 .../leds/realtek,rtl9301-port-leds.yaml       |  84 ++++++++
 .../bindings/net/realtek,rtl9301-switch.yaml  |   3 +
 MAINTAINERS                                   |   7 +
 drivers/leds/Kconfig                          |  13 ++
 drivers/leds/Makefile                         |   1 +
 drivers/leds/leds-rtl9300-port.c              | 201 ++++++++++++++++++
 6 files changed, 309 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/leds/realtek,rtl9301-port-leds.yaml
 create mode 100644 drivers/leds/leds-rtl9300-port.c

-- 
2.55.0.windows.5
Technical Details
Message-ID: <20261018194339.132-1-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-348176-linux-kernel-netdev=dewy.ru

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-348176-linux-kernel-netdev=dewy.ru
From: ross@r-sc.ca (Ross Cawston)
Newsgroups: linux.kernel.netdev
Subject: [PATCH 0/3] leds: add Realtek RTL9300 port LEDs under software control
Date: Sun, 18 Oct 2026 12:43:35 -0700
Organization: Usenet Network
Message-ID: <20261018194339.132-1-ross@r-sc.ca>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
Injection-Info: usenet.network;
	logging-data="3422713"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:KBHksUjXb2YQh970ALCy0/c2kS4= sha256:qPnG8YEmzcEl0Xhkv4hQItXnLdd706+VYqRPYdUlVSs=
	sha1:D0Q9U7E4y8RjTf5OrXTECdMCxpo= sha256:dKeGr2gM0zrd1xpYphcTOQxM6h6QvOtf9xSsgNQM05U=
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 4D12611089B; Sun, 18 Oct 2026 23:29:56 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -2.2
X-Spam-Status: No, score=-2.2 tagged_above=-9999 required=6.31
	tests=[DCC_CHECK=1.1, 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]
	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 RI3waRaOc-YE;
	Sun, 18 Oct 2026 23:29:53 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.105.105.114; helo=tor.lore.kernel.org; envelope-from=netdev+bounces-348176-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 tor.lore.kernel.org (tor.lore.kernel.org [172.105.105.114])
	by mail.dewy.ru (Postfix) with ESMTPS id 021F911073A; Sun, 18 Oct 2026 23:29:41 +0300 (MSK)
X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.90.174.1])
	by tor.lore.kernel.org (Postfix) with ESMTP id A110230B60; Sun, 18 Oct 2026 20:29:38 +0000 (UTC)
X-Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
	by smtp.subspace.kernel.org (Postfix) with ESMTP id 52DF04C9DF1;
	Sun, 18 Oct 2026 20:29:38 +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="nk5rnZQs"
X-Received: from out-utut-a195.jellyfish.systems (out-utut-a195.jellyfish.systems [198.177.127.195])
	(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 B515C3C3F51
	for <netdev@vger.kernel.org>; Sun, 18 Oct 2026 20:29:35 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.177.127.195
X-ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
	t=1792355378; cv=none; b=pp3+TNFmALMl7po0PHM3IXf+AU9iTDX6lYpkUiJC3Byeecfp6HT4BDi8fqISPYj4Gl2EISv2Goh3duMbkkvpF0PE6yQqP03AzLWvtALYelF64LHV5dqmdAR+GDC38DzX+aIFU0tuWzRMjc9UbdU46QJJNK/tIDe6Y0Nks4+452Q=
X-ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org;
	s=arc-20240116; t=1792355378; c=relaxed/simple;
	bh=2PGAzzRlSdrIQUC+PQFeAibSGLtSOBZUnNfKQJY+qTo=;
	h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=XZfcMi1CIPHG8cRRkxZfGJ8Vqw1U+MgQPZJfkmTF2DexmAtfZBnuFq+amLOlm+UxQNC28lUu3QEDkgwTTA1DmagE/ibFY1gTyNhe5XKCtRY7YIGORauNgR6toB1CNfr7M5Y/713nDaIG9REQbyRJ6hTgIJeqyuF4eFQIvHXo0qs=
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=nk5rnZQs; arc=none smtp.client-ip=198.177.127.195
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 4j78Hk5Hsbz8sWP;
	Sun, 18 Oct 2026 19:43:46 +0000 (UTC)
X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=r-sc.ca;
	s=spacemail; t=1792352627;
	bh=dlM6jqufpKiSv8mOhbn+KjX0+8BaJbqWVeEnLDQePCM=;
	h=From:To:Cc:Subject:Date:From;
	b=nk5rnZQs3mBOMaxEhjyLZ1OLkyoD28nAqGDQlg674ZEXLclVqwtqYjoYaAE/ZdHLw
	 kA4EmrXzczeMHEjztdJ8AEgldbCr143A/q6FvUCNrfISJX5+aY0a+w/YiDB148IcEY
	 yUNGeaMoJboiDLOA83jNhmEi+/mjsJmKQyzIkwh0xq5UeH2WX0w8wnfUoCiD+fCmrg
	 H87zacnx9niX5Lq6Ccq0EXhMalmc9rychuqiHZHANmCbb2l2Y+8zF4sJAOtKDhgf3e
	 4/xLmCvjxWWFdgagdftmUHOP6cxfte4SzMoxoiwIKlo/hiyYSzz8c/ULG+9NrDy7m3
	 NIRJHTYlfLPyg==
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-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