From: Rob Herring <robh@kernel.org>
To: Wolfram Sang <wsa+renesas@sang-engineering.com>
Cc: linux-renesas-soc@vger.kernel.org,
Geert Uytterhoeven <geert+renesas@glider.be>,
Magnus Damm <magnus.damm@gmail.com>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
devicetree@vger.kernel.org
Subject: Re: [RFC PATCH] ARM: dts: renesas: r9a06g032-rzn1d400-eb: describe LEDs
Date: Mon, 22 Sep 2025 14:26:40 -0500 [thread overview]
Message-ID: <20250922192640.GA841738-robh@kernel.org> (raw)
In-Reply-To: <20250919100740.28429-1-wsa+renesas@sang-engineering.com>
On Fri, Sep 19, 2025 at 12:07:20PM +0200, Wolfram Sang wrote:
> To be able to use the LEDs, a configuration switch has to be set to a
> non-default value. So, infrastructure to support these switches (which
> modify signal routing via the CPLD on the demo board (DB)) is added as
> well.
>
> Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
> ---
>
> This patch depends on "[PATCH v3 5/8] ARM: dts: r9a06g032: Add GPIO
> controllers" which is still in-flight. I send this out as RFC already,
> so we can discuss the introduction of the switch dependant settings. I
> copied this approach form RZ/G3S.
>
>
> .../renesas/r9a06g032-rzn1d400-db-switches.h | 22 ++++++++++++++
> .../dts/renesas/r9a06g032-rzn1d400-db.dts | 30 +++++++++++++++++++
> .../dts/renesas/r9a06g032-rzn1d400-eb.dts | 19 ++++++++++++
> 3 files changed, 71 insertions(+)
> create mode 100644 arch/arm/boot/dts/renesas/r9a06g032-rzn1d400-db-switches.h
>
> diff --git a/arch/arm/boot/dts/renesas/r9a06g032-rzn1d400-db-switches.h b/arch/arm/boot/dts/renesas/r9a06g032-rzn1d400-db-switches.h
> new file mode 100644
> index 000000000000..4560d16e7c60
> --- /dev/null
> +++ b/arch/arm/boot/dts/renesas/r9a06g032-rzn1d400-db-switches.h
> @@ -0,0 +1,22 @@
> +/* SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) */
> +/*
> + * On-board switches for the Renesas RZ/N1D demo board (DB) and extension
> + * board (EB)
> + *
> + * Copyright (C) 2025 Renesas Electronics Corp.
> + */
> +
> +#ifndef __N1D_DB_EB_SWITCHES_H__
> +#define __N1D_DB_EB_SWITCHES_H__
> +
> +#define SW_OFF 0
> +#define SW_ON 1
> +
> +/*
> + * SW_2-2:
> + * SW_OFF - enable PMOD1-3+LEDs on the extension board
> + * SW_ON - enable CAT/S3 (default)
> + */
> +#define SW_2_2 SW_ON
> +
> +#endif
> diff --git a/arch/arm/boot/dts/renesas/r9a06g032-rzn1d400-db.dts b/arch/arm/boot/dts/renesas/r9a06g032-rzn1d400-db.dts
> index 3258b2e27434..849b5ad9c79d 100644
> --- a/arch/arm/boot/dts/renesas/r9a06g032-rzn1d400-db.dts
> +++ b/arch/arm/boot/dts/renesas/r9a06g032-rzn1d400-db.dts
> @@ -15,6 +15,7 @@
> #include <dt-bindings/pinctrl/rzn1-pinctrl.h>
>
> #include "r9a06g032.dtsi"
> +#include "r9a06g032-rzn1d400-db-switches.h"
>
> / {
> model = "RZN1D-DB Board";
> @@ -185,6 +186,14 @@ fixed-link {
> };
> };
>
> +#if SW2_2 == SW_OFF
The "rule" for DT headers is #defines for numbers only.
If the switches are s/w readable, then I'd say firmware should read them
and enable/disable the LEDs as appropriate. If not, then maybe the DT
should have a property reflecting the switch state and firmware uses
that to enable/disable.
Rob
next prev parent reply other threads:[~2025-09-22 19:26 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-19 10:07 [RFC PATCH] ARM: dts: renesas: r9a06g032-rzn1d400-eb: describe LEDs Wolfram Sang
2025-09-22 19:26 ` Rob Herring [this message]
2025-09-26 9:24 ` Geert Uytterhoeven
2025-09-26 9:02 ` Geert Uytterhoeven
2025-09-26 9:15 ` Wolfram Sang
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=20250922192640.GA841738-robh@kernel.org \
--to=robh@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=geert+renesas@glider.be \
--cc=krzk+dt@kernel.org \
--cc=linux-renesas-soc@vger.kernel.org \
--cc=magnus.damm@gmail.com \
--cc=wsa+renesas@sang-engineering.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 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.