From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: Geert Uytterhoeven <geert+renesas@glider.be>
Cc: Magnus Damm <magnus.damm@gmail.com>,
Rob Herring <robh+dt@kernel.org>,
linux-renesas-soc@vger.kernel.org, devicetree@vger.kernel.org
Subject: Re: [PATCH 03/14] pinctrl: renesas: Fix pin control matching on R-Car H3e-2G
Date: Mon, 14 Jun 2021 21:38:11 +0300 [thread overview]
Message-ID: <YMeiE0xMW5zpgpRM@pendragon.ideasonboard.com> (raw)
In-Reply-To: <ab1acd836e990c536ff3a8c715ce57363d3ff8cb.1623315732.git.geert+renesas@glider.be>
Hi Geert,
Thank you for the patch.
On Thu, Jun 10, 2021 at 11:37:16AM +0200, Geert Uytterhoeven wrote:
> As R-Car H3 ES1.x (R8A77950) and R-Car ES2.0+ (R8A77951) use the same
> compatible value, the pin control driver relies on soc_device_match()
> with soc_id = "r8a7795" and the (non)matching of revision = "ES1.*" to
> match with and distinguish between the two SoC variants. The
> corresponding entries in the normal of_match_table are present only to
> make the optional sanity checks work.
>
> The R-Car H3e-2G (R8A779M1) SoC is a different grading of the R-Car H3
> ES3.0 (R8A77951) SoC. It uses the same compatible values for individual
> devices, but has an additional compatible value for the root node.
> When running on an R-Car H3e-2G SoC, soc_device_match() with soc_id =
> "r8a7795" does not return a match. Hence the pin control driver falls
> back to the normal of_match_table, and, as the R8A77950 entry is listed
> first, incorrectly uses the sub-driver for R-Car H3 ES1.x.
>
> Fix this by moving the entry for R8A77951 before the entry for R8A77950.
>
> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
I wonder if this means we could drop the second entry in the quirks
array, in sh_pfc_quirk_match().
> ---
> drivers/pinctrl/renesas/core.c | 14 +++++++++-----
> 1 file changed, 9 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/pinctrl/renesas/core.c b/drivers/pinctrl/renesas/core.c
> index 5ccc49b387f17eb9..9adb97065704270d 100644
> --- a/drivers/pinctrl/renesas/core.c
> +++ b/drivers/pinctrl/renesas/core.c
> @@ -571,17 +571,21 @@ static const struct of_device_id sh_pfc_of_table[] = {
> .data = &r8a7794_pinmux_info,
> },
> #endif
> -/* Both r8a7795 entries must be present to make sanity checks work */
> -#ifdef CONFIG_PINCTRL_PFC_R8A77950
> +/*
> + * Both r8a7795 entries must be present to make sanity checks work, but only
> + * the first entry is actually used, for R-Car H3e.
> + * R-Car H3 ES1.x and ES2.0+ are matched using soc_device_match() instead.
> + */
> +#ifdef CONFIG_PINCTRL_PFC_R8A77951
> {
> .compatible = "renesas,pfc-r8a7795",
> - .data = &r8a77950_pinmux_info,
> + .data = &r8a77951_pinmux_info,
> },
> #endif
> -#ifdef CONFIG_PINCTRL_PFC_R8A77951
> +#ifdef CONFIG_PINCTRL_PFC_R8A77950
> {
> .compatible = "renesas,pfc-r8a7795",
> - .data = &r8a77951_pinmux_info,
> + .data = &r8a77950_pinmux_info,
> },
> #endif
> #ifdef CONFIG_PINCTRL_PFC_R8A77960
--
Regards,
Laurent Pinchart
next prev parent reply other threads:[~2021-06-14 18:38 UTC|newest]
Thread overview: 45+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-10 9:37 [PATCH 00/14] arm64: renesas: Add support for R Car H3e 2G-and M3e-2G Geert Uytterhoeven
2021-06-10 9:37 ` [PATCH 01/14] dt-bindings: arm: renesas: Document R-Car H3e-2G and M3e-2G SoCs and boards Geert Uytterhoeven
2021-06-13 1:13 ` Laurent Pinchart
2021-06-14 11:25 ` Geert Uytterhoeven
2021-06-14 18:24 ` Laurent Pinchart
2021-06-16 17:56 ` Rob Herring
2021-06-23 10:01 ` Yoshihiro Shimoda
2021-06-10 9:37 ` [PATCH 02/14] soc: renesas: Identify R-Car H3e-2G and M3e-2G Geert Uytterhoeven
2021-06-14 18:31 ` Laurent Pinchart
2021-06-23 10:13 ` Yoshihiro Shimoda
2021-06-10 9:37 ` [PATCH 03/14] pinctrl: renesas: Fix pin control matching on R-Car H3e-2G Geert Uytterhoeven
2021-06-14 18:38 ` Laurent Pinchart [this message]
2021-06-14 19:16 ` Geert Uytterhoeven
2021-06-23 10:34 ` Yoshihiro Shimoda
2021-06-10 9:37 ` [PATCH 04/14] mmc: renesas_sdhi: Add support for R-Car H3e-2G and M3e-2G Geert Uytterhoeven
2021-06-14 18:42 ` Laurent Pinchart
2021-06-14 19:32 ` Geert Uytterhoeven
2021-06-24 2:25 ` Yoshihiro Shimoda
2021-06-24 6:14 ` Wolfram Sang
2021-06-24 10:54 ` Yoshihiro Shimoda
2021-06-24 15:19 ` Wolfram Sang
2021-06-25 4:54 ` Yoshihiro Shimoda
2021-06-10 9:37 ` [PATCH 05/14] arm64: dts: renesas: Add Renesas R8A779M1 SoC support Geert Uytterhoeven
2021-06-14 18:43 ` Laurent Pinchart
2021-06-24 4:56 ` Yoshihiro Shimoda
2021-06-10 9:37 ` [PATCH 06/14] arm64: dts: renesas: Add Renesas R8A779M3 " Geert Uytterhoeven
2021-06-24 5:08 ` Yoshihiro Shimoda
2021-06-10 9:37 ` [PATCH 07/14] arm64: dts: renesas: Add support for Salvator-XS with R-Car H3e-2G Geert Uytterhoeven
2021-06-14 18:45 ` Laurent Pinchart
2021-06-14 19:34 ` Geert Uytterhoeven
2021-06-24 5:27 ` Yoshihiro Shimoda
2021-06-10 9:37 ` [PATCH 08/14] arm64: dts: renesas: Add support for H3ULCB " Geert Uytterhoeven
2021-06-14 18:46 ` Laurent Pinchart
2021-06-10 9:37 ` [PATCH 09/14] arm64: dts: renesas: Add support for H3ULCB+Kingfisher " Geert Uytterhoeven
2021-06-14 18:46 ` Laurent Pinchart
2021-06-10 9:37 ` [PATCH 10/14] arm64: dts: renesas: Add support for Salvator-XS with R-Car M3e-2G Geert Uytterhoeven
2021-06-14 18:48 ` Laurent Pinchart
2021-06-10 9:37 ` [PATCH 11/14] arm64: dts: renesas: Add support for M3ULCB " Geert Uytterhoeven
2021-06-14 18:48 ` Laurent Pinchart
2021-06-10 9:37 ` [PATCH 12/14] arm64: dts: renesas: Add support for M3ULCB+Kingfisher " Geert Uytterhoeven
2021-06-14 18:48 ` Laurent Pinchart
2021-06-10 9:37 ` [PATCH/RFC 13/14] arm64: dts: renesas: r8a779m1: Add Cortex-A57 2 GHz opp Geert Uytterhoeven
2021-06-16 11:25 ` Yoshihiro Shimoda
2021-06-10 9:37 ` [PATCH/RFC 14/14] arm64: dts: renesas: r8a779m3: " Geert Uytterhoeven
2021-06-16 11:27 ` Yoshihiro Shimoda
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=YMeiE0xMW5zpgpRM@pendragon.ideasonboard.com \
--to=laurent.pinchart@ideasonboard.com \
--cc=devicetree@vger.kernel.org \
--cc=geert+renesas@glider.be \
--cc=linux-renesas-soc@vger.kernel.org \
--cc=magnus.damm@gmail.com \
--cc=robh+dt@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).