From 08260efdaf538411623471f517b3da63060251dd Mon Sep 17 00:00:00 2001 From: Hiroyuki Yokoyama Date: Wed, 26 Sep 2018 18:14:41 +0900 Subject: [PATCH 1/3] ARM: rmobile: Identify R-Car M3-W R8A7796 r1.1/1.2 SoC r8a7796 cpu revision v1.2 has the same information as revision v1.1. This patch fixes revision display at startup to "rev 1.1/1.2". Reviewed-by: Marek Vasut Signed-off-by: Hiroyuki Yokoyama Signed-off-by: Hai Pham [Marek: Slight update to commit message, spell out the SoC model] --- arch/arm/mach-rmobile/cpu_info.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/arch/arm/mach-rmobile/cpu_info.c b/arch/arm/mach-rmobile/cpu_info.c index 71a856ea879..1d33e2aa9da 100644 --- a/arch/arm/mach-rmobile/cpu_info.c +++ b/arch/arm/mach-rmobile/cpu_info.c @@ -120,6 +120,13 @@ int print_cpuinfo(void) { int i = rmobile_cpuinfo_idx(); + if (rmobile_cpuinfo[i].cpu_type == RMOBILE_CPU_TYPE_R8A7796 && + rmobile_get_cpu_rev_integer() == 1 && + rmobile_get_cpu_rev_fraction() == 1) { + printf("CPU: Renesas Electronics %s rev 1.1/1.2\n", get_cpu_name(i)); + return 0; + } + printf("CPU: Renesas Electronics %s rev %d.%d\n", get_cpu_name(i), rmobile_get_cpu_rev_integer(), rmobile_get_cpu_rev_fraction()); From 13c8a0717dc1fe777b2bf668d099941f5f0081e8 Mon Sep 17 00:00:00 2001 From: Hai Pham Date: Tue, 4 May 2021 17:43:23 +0700 Subject: [PATCH 2/3] ARM: rmobile: Identify R-Car D3 R8A77995 r1.1 SoC Add support to identify R8A77995 r1.1 SoC. Reviewed-by: Marek Vasut Signed-off-by: Hai Pham [Marek: Slight update to commit message, spell out the SoC model] --- arch/arm/mach-rmobile/cpu_info-rcar.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/arch/arm/mach-rmobile/cpu_info-rcar.c b/arch/arm/mach-rmobile/cpu_info-rcar.c index 62017f52c3b..8fc4cd7f9de 100644 --- a/arch/arm/mach-rmobile/cpu_info-rcar.c +++ b/arch/arm/mach-rmobile/cpu_info-rcar.c @@ -11,6 +11,7 @@ #define R8A7796_REV_1_0 0x5200 #define R8A7796_REV_1_1 0x5210 #define R8A7796_REV_1_3 0x5211 +#define R8A77995_REV_1_1 0x5810 static u32 rmobile_get_prr(void) { @@ -30,7 +31,8 @@ u32 rmobile_get_cpu_rev_integer(void) const u32 prr = rmobile_get_prr(); const u32 rev = prr & PRR_MASK; - if (rev == R8A7796_REV_1_1 || rev == R8A7796_REV_1_3) + if (rev == R8A7796_REV_1_1 || rev == R8A7796_REV_1_3 || + rev == R8A77995_REV_1_1) return 1; else return ((prr & 0x000000F0) >> 4) + 1; @@ -41,7 +43,7 @@ u32 rmobile_get_cpu_rev_fraction(void) const u32 prr = rmobile_get_prr(); const u32 rev = prr & PRR_MASK; - if (rev == R8A7796_REV_1_1) + if (rev == R8A7796_REV_1_1 || rev == R8A77995_REV_1_1) return 1; else if (rev == R8A7796_REV_1_3) return 3; From b597b6f9861c2d5531b0055249622ee0e663577c Mon Sep 17 00:00:00 2001 From: Hai Pham Date: Fri, 27 Jan 2023 14:10:31 +0100 Subject: [PATCH 3/3] pinctrl: renesas: r8a779a0: Remove incorrect AVB[01] pinmux configuration AVB[01]_{MAGIC,MDC,MDIO,TXCREFCLK} are registered as both PINMUX_SINGLE(fn) and PINMUX_IPSR_GPSR(fn) in the pinmux_data array. The latter are correct, hence remove the former. Without this fix, the Ethernet PHY is not operational on the MDIO bus. Ported from Linux kernel commit a145c9a8674ac8fbfa1595276e1b6cbfc5139038 . Signed-off-by: Hai Pham Signed-off-by: LUU HOAI Fixes: 741a7370fc3b8b54 ("pinctrl: renesas: Initial R8A779A0 (V3U) PFC support") Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/6fd217b71e83ba9a8157513ed671a1fa218b23b6.1674824958.git.geert+renesas@glider.be --- Cc: Geert Uytterhoeven Cc: Hai Pham Cc: LUU HOAI Cc: Marek Vasut --- drivers/pinctrl/renesas/pfc-r8a779a0.c | 8 -------- 1 file changed, 8 deletions(-) diff --git a/drivers/pinctrl/renesas/pfc-r8a779a0.c b/drivers/pinctrl/renesas/pfc-r8a779a0.c index 544d7964442..0f570e4ea5e 100644 --- a/drivers/pinctrl/renesas/pfc-r8a779a0.c +++ b/drivers/pinctrl/renesas/pfc-r8a779a0.c @@ -699,16 +699,8 @@ static const u16 pinmux_data[] = { PINMUX_SINGLE(PCIE0_CLKREQ_N), PINMUX_SINGLE(AVB0_PHY_INT), - PINMUX_SINGLE(AVB0_MAGIC), - PINMUX_SINGLE(AVB0_MDC), - PINMUX_SINGLE(AVB0_MDIO), - PINMUX_SINGLE(AVB0_TXCREFCLK), PINMUX_SINGLE(AVB1_PHY_INT), - PINMUX_SINGLE(AVB1_MAGIC), - PINMUX_SINGLE(AVB1_MDC), - PINMUX_SINGLE(AVB1_MDIO), - PINMUX_SINGLE(AVB1_TXCREFCLK), PINMUX_SINGLE(AVB2_AVTP_PPS), PINMUX_SINGLE(AVB2_AVTP_CAPTURE),