From: Sander Vanheule <sander@svanheule.net>
To: Lee Jones <lee@kernel.org>, Pavel Machek <pavel@kernel.org>,
Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
Linus Walleij <linus.walleij@linaro.org>,
Michael Walle <mwalle@kernel.org>,
Bartosz Golaszewski <brgl@bgdev.pl>
Cc: linux-leds@vger.kernel.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org,
Sander Vanheule <sander@svanheule.net>
Subject: [PATCH v7 0/6] RTL8231 GPIO expander support
Date: Mon, 17 Nov 2025 22:51:30 +0100 [thread overview]
Message-ID: <20251117215138.4353-1-sander@svanheule.net> (raw)
The RTL8231 GPIO and LED expander can be configured for use as an MDIO
or SMI bus device. Currently only the MDIO mode is supported, although
SMI mode support should be fairly straightforward, once an SMI bus
driver is available.
Provided features by the RTL8231:
- Up to 37 GPIOs
- Configurable drive strength: 8mA or 4mA (currently unsupported)
- Input debouncing on GPIOs 31-36
- Up to 88 LEDs in multiple scan matrix groups
- On, off, or one of six toggling intervals
- "single-color mode": 2×36 single color LEDs + 8 bi-color LEDs
- "bi-color mode": (12 + 2×6) bi-color LEDs + 24 single color LEDs
- Up to one PWM output (currently unsupported)
- Fixed duty cycle, 8 selectable frequencies (1.2kHz - 4.8kHz)
The patches have been in use downstream by OpenWrt for some months. As
the original patches are already a few years old, I would like to request
all patches to be reviewed again (and I've dropped all provided tags and
changelogs until v6).
---
Changes since v6:
Link: https://lore.kernel.org/lkml/20251021142407.307753-1-sander@svanheule.net/
- Drop already merged regmap_gpio changes
- Devicetree bindings:
- Relax description formatting
- Use absolute paths for schema references
- Enforce address format for led node names
- Add pinctrl properties to led-controller node in example
- mfd driver:
- Small code refactors, variable renames
- Header include sorting
- regmap/regcache usage updates
- pinctrl driver:
- Fixed build issue on 64b platforms
- Simplify safe direction startup config
- Add GPIOLIB dependency
RFC for gpio-regmap changes:
Link: https://lore.kernel.org/lkml/20251020115636.55417-1-sander@svanheule.net/
Patch series v5 (June 2021):
Link: https://lore.kernel.org/lkml/cover.1623532208.git.sander@svanheule.net/
Sander Vanheule (6):
dt-bindings: leds: Binding for RTL8231 scan matrix
dt-bindings: mfd: Binding for RTL8231
mfd: Add RTL8231 core device
pinctrl: Add RTL8231 pin control and GPIO support
leds: Add support for RTL8231 LED scan matrix
MAINTAINERS: Add RTL8231 MFD driver
.../bindings/leds/realtek,rtl8231-leds.yaml | 167 ++++++
.../bindings/mfd/realtek,rtl8231.yaml | 193 +++++++
MAINTAINERS | 10 +
drivers/leds/Kconfig | 10 +
drivers/leds/Makefile | 1 +
drivers/leds/leds-rtl8231.c | 285 ++++++++++
drivers/mfd/Kconfig | 9 +
drivers/mfd/Makefile | 1 +
drivers/mfd/rtl8231.c | 193 +++++++
drivers/pinctrl/Kconfig | 12 +
drivers/pinctrl/Makefile | 1 +
drivers/pinctrl/pinctrl-rtl8231.c | 533 ++++++++++++++++++
include/linux/mfd/rtl8231.h | 71 +++
13 files changed, 1486 insertions(+)
create mode 100644 Documentation/devicetree/bindings/leds/realtek,rtl8231-leds.yaml
create mode 100644 Documentation/devicetree/bindings/mfd/realtek,rtl8231.yaml
create mode 100644 drivers/leds/leds-rtl8231.c
create mode 100644 drivers/mfd/rtl8231.c
create mode 100644 drivers/pinctrl/pinctrl-rtl8231.c
create mode 100644 include/linux/mfd/rtl8231.h
--
2.51.1
next reply other threads:[~2025-11-17 21:51 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-17 21:51 Sander Vanheule [this message]
2025-11-17 21:51 ` [PATCH v7 1/6] dt-bindings: leds: Binding for RTL8231 scan matrix Sander Vanheule
2025-11-18 14:56 ` Rob Herring
2025-11-18 14:58 ` Rob Herring
2025-11-18 20:37 ` Sander Vanheule
2025-11-17 21:51 ` [PATCH v7 2/6] dt-bindings: mfd: Binding for RTL8231 Sander Vanheule
2025-11-18 14:59 ` Rob Herring (Arm)
2025-11-18 21:28 ` Rob Herring
2025-11-18 21:57 ` Sander Vanheule
2025-11-19 1:37 ` Rob Herring
2025-11-17 21:51 ` [PATCH v7 3/6] mfd: Add RTL8231 core device Sander Vanheule
2025-11-17 21:51 ` [PATCH v7 4/6] pinctrl: Add RTL8231 pin control and GPIO support Sander Vanheule
2025-11-18 21:19 ` kernel test robot
2025-11-18 22:24 ` Sander Vanheule
2025-11-19 4:19 ` kernel test robot
2025-11-19 18:57 ` Sander Vanheule
2025-11-19 19:41 ` kernel test robot
2025-11-17 21:51 ` [PATCH v7 5/6] leds: Add support for RTL8231 LED scan matrix Sander Vanheule
2025-11-17 21:51 ` [PATCH v7 6/6] MAINTAINERS: Add RTL8231 MFD driver Sander Vanheule
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=20251117215138.4353-1-sander@svanheule.net \
--to=sander@svanheule.net \
--cc=brgl@bgdev.pl \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=krzk+dt@kernel.org \
--cc=lee@kernel.org \
--cc=linus.walleij@linaro.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-leds@vger.kernel.org \
--cc=mwalle@kernel.org \
--cc=pavel@kernel.org \
--cc=robh@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
all inboxes | Powered by JetHome®