From: Rob Herring <robh@kernel.org>
To: Sander Vanheule <sander@svanheule.net>
Cc: Lee Jones <lee@kernel.org>, Pavel Machek <pavel@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>,
linux-leds@vger.kernel.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org
Subject: Re: [PATCH v7 1/6] dt-bindings: leds: Binding for RTL8231 scan matrix
Date: Tue, 18 Nov 2025 08:56:15 -0600 [thread overview]
Message-ID: <20251118145615.GA3223298-robh@kernel.org> (raw)
In-Reply-To: <20251117215138.4353-2-sander@svanheule.net>
On Mon, Nov 17, 2025 at 10:51:31PM +0100, Sander Vanheule wrote:
> Add a binding description for the Realtek RTL8231's LED support, which
> consists of up to 88 LEDs arranged in a number of scanning matrices.
>
> Signed-off-by: Sander Vanheule <sander@svanheule.net>
> ---
> Changes since v6:
> - Relax description formatting
> - Enforce address format for led node names
> - Use absolute paths for schema references
> ---
> .../bindings/leds/realtek,rtl8231-leds.yaml | 167 ++++++++++++++++++
> 1 file changed, 167 insertions(+)
> create mode 100644 Documentation/devicetree/bindings/leds/realtek,rtl8231-leds.yaml
>
> diff --git a/Documentation/devicetree/bindings/leds/realtek,rtl8231-leds.yaml b/Documentation/devicetree/bindings/leds/realtek,rtl8231-leds.yaml
> new file mode 100644
> index 000000000000..222cd08914da
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/leds/realtek,rtl8231-leds.yaml
> @@ -0,0 +1,167 @@
> +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/leds/realtek,rtl8231-leds.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Realtek RTL8231 LED scan matrix.
> +
> +maintainers:
> + - Sander Vanheule <sander@svanheule.net>
> +
> +description: |
> + The RTL8231 has support for driving a number of LED matrices, by scanning
> + over the LEDs pins, alternatingly lighting different columns and/or rows.
> +
> + This functionality is available on an RTL8231, when it is configured for use
> + as an MDIO device, or SMI device.
> +
> + In single color scan mode, 88 LEDs are supported. These are grouped into
> + three output matrices:
> + - Group A of 6×6 single color LEDs. Rows and columns are driven by GPIO
> + pins 0-11.
> + L0[n] L1[n] L2[n] L0[n+6] L1[n+6] L2[n+6]
> + | | | | | |
> + P0/P6 --<--------<--------<--------<--------<--------< (3)
> + | | | | | |
> + P1/P7 --<--------<--------<--------<--------<--------< (4)
> + | | | | | |
> + P2/P8 --<--------<--------<--------<--------<--------< (5)
> + | | | | | |
> + P3/P9 --<--------<--------<--------<--------<--------< (6)
> + | | | | | |
> + P4/P10 --<--------<--------<--------<--------<--------< (7)
> + | | | | | |
> + P5/P11 --<--------<--------<--------<--------<--------< (8)
> + (0) (1) (2) (9) (10) (11)
> + - Group B of 6×6 single color LEDs. Rows and columns are driven by GPIO
> + pins 12-23.
> + L0[n] L1[n] L2[n] L0[n+6] L1[n+6] L2[n+6]
> + | | | | | |
> + P12/P18 --<--------<--------<--------<--------<--------< (15)
> + | | | | | |
> + P13/P19 --<--------<--------<--------<--------<--------< (16)
> + | | | | | |
> + P14/P20 --<--------<--------<--------<--------<--------< (17)
> + | | | | | |
> + P15/P21 --<--------<--------<--------<--------<--------< (18)
> + | | | | | |
> + P16/P22 --<--------<--------<--------<--------<--------< (19)
> + | | | | | |
> + P17/P23 --<--------<--------<--------<--------<--------< (20)
> + (12) (13) (14) (21) (22) (23)
> + - Group C of 8 pairs of anti-parallel (or bi-color) LEDs. LED selection is
> + provided by GPIO pins 24-27 and 29-32, polarity selection by GPIO 28.
> + P24 P25 ... P30 P31
> + | | | |
> + LED POL --X-------X---/\/---X-------X (28)
> + (24) (25) ... (31) (32)
> +
> + In bi-color scan mode, 72 LEDs are supported. These are grouped into four
> + output matrices:
> + - Group A of 12 pairs of anti-parallel LEDs. LED selection is provided
> + by GPIO pins 0-11, polarity selection by GPIO 12.
> + - Group B of 6 pairs of anti-parallel LEDs. LED selection is provided
> + by GPIO pins 23-28, polarity selection by GPIO 21.
> + - Group C of 6 pairs of anti-parallel LEDs. LED selection is provided
> + by GPIO pins 29-34, polarity selection by GPIO 22.
> + - Group of 4×6 single color LEDs. Rows are driven by GPIO pins 15-20,
> + columns by GPIO pins 13-14 and 21-22 (shared with groups B and C).
> + L2[n] L2[n+6] L2[n+12] L2[n+18]
> + | | | |
> + +0 --<--------<---------<---------< (15)
> + | | | |
> + +1 --<--------<---------<---------< (16)
> + | | | |
> + +2 --<--------<---------<---------< (17)
> + | | | |
> + +3 --<--------<---------<---------< (18)
> + | | | |
> + +4 --<--------<---------<---------< (19)
> + | | | |
> + +6 --<--------<---------<---------< (20)
> + (13) (14) (21) (22)
> +
> + This node must always be a child of a 'realtek,rtl8231' node.
> +
> +properties:
> + $nodename:
> + const: led-controller
> +
> + compatible:
> + const: realtek,rtl8231-leds
> +
> + "#address-cells":
> + const: 2
> +
> + "#size-cells":
> + const: 0
> +
> + realtek,led-scan-mode:
> + $ref: /schemas/types.yaml#/definitions/string
> + description:
> + Specify the scanning mode the chip should run in. See general description
> + for how the scanning matrices are wired up.
> + enum: [single-color, bi-color]
> +
> +patternProperties:
> + "^led@([1-2]?[0-9]|3[0-1]),[0-2]":
> + description:
> + LEDs are addressed by their port index and led index. Ports 0-23 always
> + support three LEDs. Additionally, but only when used in single color scan
> + mode, ports 24-31 support two LEDs.
> + type: object
Drop the allOf and move the $ref here. You also need:
unevaluatedProperties: false
The tools should have caught this, I'll have to check...
> +
> + properties:
> + reg:
> + items:
> + - items:
> + - description: port index
> + maximum: 31
> + - description: led index
> + maximum: 2
> +
> + allOf:
> + - $ref: /schemas/leds/common.yaml#
next prev parent reply other threads:[~2025-11-18 14:56 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-17 21:51 [PATCH v7 0/6] RTL8231 GPIO expander support Sander Vanheule
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 [this message]
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=20251118145615.GA3223298-robh@kernel.org \
--to=robh@kernel.org \
--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=sander@svanheule.net \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.