linux-serial.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Rob Herring <robh@kernel.org>
To: Claudiu <claudiu.beznea@tuxon.dev>
Cc: geert+renesas@glider.be, magnus.damm@gmail.com,
	krzk+dt@kernel.org, conor+dt@kernel.org, mturquette@baylibre.com,
	sboyd@kernel.org, gregkh@linuxfoundation.org,
	jirislaby@kernel.org, p.zabel@pengutronix.de,
	lethal@linux-sh.org, g.liakhovetski@gmx.de,
	linux-renesas-soc@vger.kernel.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org, linux-clk@vger.kernel.org,
	linux-serial@vger.kernel.org,
	Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com>
Subject: Re: [PATCH v3 6/8] arm64: dts: renesas: rzg3s-smarc-switches: Add a header to describe different switches
Date: Tue, 19 Nov 2024 10:23:54 -0600	[thread overview]
Message-ID: <20241119162354.GA1761971-robh@kernel.org> (raw)
In-Reply-To: <20241115134401.3893008-7-claudiu.beznea.uj@bp.renesas.com>

On Fri, Nov 15, 2024 at 03:43:59PM +0200, Claudiu wrote:
> From: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com>
> 
> There are different switches available on both the RZ/G3S SMARC Module and
> RZ SMARC Carrier II boards. These switches are used to route different SoC
> signals to different parts available on board.
> 
> These switches are described in device trees through macros. These macros
> are set accordingly such that the resulted compiled dtb to describe the
> on-board switches states.
> 
> Based on the SW_CONFIG3 switch state (populated on the module board), the
> SCIF3 SoC interface is routed or not to an U(S)ART pin header available on
> the carrier board. As the SCIF3 is accessible through the carrier board,
> the device tree enables it in the carrier DTS. To be able to cope with
> these type of configurations, add a header file where all the on-board
> switches can be described and shared accordingly between module and carrier
> board.
> 
> Commit prepares the code to enable SCIF3 on the RZ/G3S carrier device
> tree.
> 
> Signed-off-by: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com>
> ---
> 
> Changes in v3:
> - none
> 
> Changes in v2:
> - none
> 
>  .../boot/dts/renesas/rzg3s-smarc-som.dtsi     | 20 +-----------
>  .../boot/dts/renesas/rzg3s-smarc-switches.h   | 32 +++++++++++++++++++
>  2 files changed, 33 insertions(+), 19 deletions(-)
>  create mode 100644 arch/arm64/boot/dts/renesas/rzg3s-smarc-switches.h
> 
> diff --git a/arch/arm64/boot/dts/renesas/rzg3s-smarc-som.dtsi b/arch/arm64/boot/dts/renesas/rzg3s-smarc-som.dtsi
> index 55c72c8a0735..5c88e130c89e 100644
> --- a/arch/arm64/boot/dts/renesas/rzg3s-smarc-som.dtsi
> +++ b/arch/arm64/boot/dts/renesas/rzg3s-smarc-som.dtsi
> @@ -9,25 +9,7 @@
>  #include <dt-bindings/gpio/gpio.h>
>  #include <dt-bindings/pinctrl/rzg2l-pinctrl.h>
>  
> -/*
> - * On-board switches' states:
> - * @SW_OFF: switch's state is OFF
> - * @SW_ON:  switch's state is ON
> - */
> -#define SW_OFF		0
> -#define SW_ON		1
> -
> -/*
> - * SW_CONFIG[x] switches' states:
> - * @SW_CONFIG2:
> - *	SW_OFF - SD0 is connected to eMMC
> - *	SW_ON  - SD0 is connected to uSD0 card
> - * @SW_CONFIG3:
> - *	SW_OFF - SD2 is connected to SoC
> - *	SW_ON  - SCIF1, SSI0, IRQ0, IRQ1 connected to SoC
> - */
> -#define SW_CONFIG2	SW_OFF
> -#define SW_CONFIG3	SW_ON
> +#include "rzg3s-smarc-switches.h"
>  
>  / {
>  	compatible = "renesas,rzg3s-smarcm", "renesas,r9a08g045s33", "renesas,r9a08g045";
> diff --git a/arch/arm64/boot/dts/renesas/rzg3s-smarc-switches.h b/arch/arm64/boot/dts/renesas/rzg3s-smarc-switches.h
> new file mode 100644
> index 000000000000..e2d9b953f627
> --- /dev/null
> +++ b/arch/arm64/boot/dts/renesas/rzg3s-smarc-switches.h
> @@ -0,0 +1,32 @@
> +/* SPDX-License-Identifier: GPL-2.0 */

Use the same license as the .dtsi file.

> +/*
> + * On-board switches for the Renesas RZ/G3S SMARC Module and RZ SMARC Carrier II
> + * boards.
> + *
> + * Copyright (C) 2024 Renesas Electronics Corp.
> + */
> +
> +#ifndef __RZG3S_SMARC_SWITCHES__
> +#define __RZG3S_SMARC_SWITCHES__
> +
> +/*
> + * On-board switches' states:
> + * @SW_OFF: switch's state is OFF
> + * @SW_ON:  switch's state is ON
> + */
> +#define SW_OFF		0
> +#define SW_ON		1
> +
> +/*
> + * SW_CONFIG[x] switches' states:
> + * @SW_CONFIG2:
> + *	SW_OFF - SD0 is connected to eMMC
> + *	SW_ON  - SD0 is connected to uSD0 card
> + * @SW_CONFIG3:
> + *	SW_OFF - SD2 is connected to SoC
> + *	SW_ON  - SCIF3, SSI3, IRQ0, IRQ1 connected to SoC
> + */
> +#define SW_CONFIG2	SW_OFF
> +#define SW_CONFIG3	SW_ON
> +
> +#endif /* __RZG3S_SMARC_SWITCHES__ */
> -- 
> 2.39.2
> 

  reply	other threads:[~2024-11-19 16:23 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-11-15 13:43 [PATCH v3 0/8] Add support for the rest of Renesas RZ/G3S serial interfaces Claudiu
2024-11-15 13:43 ` [PATCH v3 1/8] clk: renesas: r9a08g045: Add clock, reset and power domain for the remaining SCIFs Claudiu
2024-11-27 14:48   ` Geert Uytterhoeven
2024-11-15 13:43 ` [PATCH v3 2/8] serial: sh-sci: Check if TX data was written to device in .tx_empty() Claudiu
2024-11-21 21:32   ` Greg KH
2024-11-22  8:17     ` Claudiu Beznea
2024-11-27 13:47   ` Geert Uytterhoeven
2024-11-27 13:52     ` Claudiu Beznea
2024-11-15 13:43 ` [PATCH v3 3/8] serial: sh-sci: Update the suspend/resume support Claudiu
2024-11-15 15:40   ` Philipp Zabel
2024-11-18  9:47     ` Claudiu Beznea
2024-11-18 11:51       ` Philipp Zabel
2024-11-15 13:43 ` [PATCH v3 4/8] arm64: dts: renesas: r9a08g045: Add the remaining SCIF interfaces Claudiu
2024-12-06 14:30   ` Geert Uytterhoeven
2024-11-15 13:43 ` [PATCH v3 5/8] arm64: dts: renesas: rzg3s-smarc: Fix the debug serial alias Claudiu
2024-12-06 14:57   ` Geert Uytterhoeven
2024-11-15 13:43 ` [PATCH v3 6/8] arm64: dts: renesas: rzg3s-smarc-switches: Add a header to describe different switches Claudiu
2024-11-19 16:23   ` Rob Herring [this message]
2024-12-09 10:09   ` Geert Uytterhoeven
2024-12-09 12:10     ` Claudiu Beznea
2024-11-15 13:44 ` [PATCH v3 7/8] arm64: dts: renesas: rzg3s-smarc: Enable SCIF3 Claudiu
2024-12-09 10:13   ` Geert Uytterhoeven
2024-11-15 13:44 ` [PATCH v3 8/8] arm64: dts: renesas: r9a08g045s33-smarc-pmod: Add overlay for SCIF1 Claudiu
2024-12-09 10:44   ` Geert Uytterhoeven
2024-12-09 12:19     ` Claudiu Beznea

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=20241119162354.GA1761971-robh@kernel.org \
    --to=robh@kernel.org \
    --cc=claudiu.beznea.uj@bp.renesas.com \
    --cc=claudiu.beznea@tuxon.dev \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=g.liakhovetski@gmx.de \
    --cc=geert+renesas@glider.be \
    --cc=gregkh@linuxfoundation.org \
    --cc=jirislaby@kernel.org \
    --cc=krzk+dt@kernel.org \
    --cc=lethal@linux-sh.org \
    --cc=linux-clk@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=linux-serial@vger.kernel.org \
    --cc=magnus.damm@gmail.com \
    --cc=mturquette@baylibre.com \
    --cc=p.zabel@pengutronix.de \
    --cc=sboyd@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;
as well as URLs for NNTP newsgroup(s).