summaryrefslogtreecommitdiffstats
path: root/drivers/pinctrl/renesas/pfc-r8a7794.c
diff options
context:
space:
mode:
authorMarek Vasut <marek.vasut+renesas@gmail.com>2019-03-04 22:29:30 +0100
committerMarek Vasut <marex@denx.de>2019-04-09 18:19:10 +0200
commit37929ca84b1c28d71028ec530358332c1f064bec (patch)
treee9674c92bb64de81ec57cea42c7399e52a3ed78d /drivers/pinctrl/renesas/pfc-r8a7794.c
parent72242e5439b11ad1134712e3ed41a00473520f79 (diff)
downloadu-boot-37929ca84b1c28d71028ec530358332c1f064bec.tar.gz
u-boot-37929ca84b1c28d71028ec530358332c1f064bec.tar.xz
u-boot-37929ca84b1c28d71028ec530358332c1f064bec.zip
pinctrl: renesas: Add TDSEL fixup for H2/E2 ES1.0 SoCs
Linux 5.0, commit 1c163f4c7b3f621efff9b28a47abb36f7378d783, has a TDSEL fix for R8A7790 H2 and R8A7794 E2 SoCs, implement similar fix for U-Boot. The difference here is that the SoC ES matching has to be implemented manually. Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com> Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
Diffstat (limited to 'drivers/pinctrl/renesas/pfc-r8a7794.c')
-rw-r--r--drivers/pinctrl/renesas/pfc-r8a7794.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/pinctrl/renesas/pfc-r8a7794.c b/drivers/pinctrl/renesas/pfc-r8a7794.c
index 7264c70e85..079f4438ef 100644
--- a/drivers/pinctrl/renesas/pfc-r8a7794.c
+++ b/drivers/pinctrl/renesas/pfc-r8a7794.c
@@ -5563,7 +5563,18 @@ static int r8a7794_pin_to_pocctrl(struct sh_pfc *pfc, unsigned int pin, u32 *poc
return -EINVAL;
}
+static int r8a7794_pinmux_soc_init(struct sh_pfc *pfc)
+{
+ /* Initialize TDSEL on old revisions */
+ if ((rmobile_get_cpu_rev_integer() == 1) &&
+ (rmobile_get_cpu_rev_fraction() == 0))
+ sh_pfc_write(pfc, 0xe6060068, 0x55555500);
+
+ return 0;
+}
+
static const struct sh_pfc_soc_operations r8a7794_pinmux_ops = {
+ .init = r8a7794_pinmux_soc_init,
.pin_to_pocctrl = r8a7794_pin_to_pocctrl,
};