]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
pinctrl: renesas: rzg2l: Fix PFC_MASK for RZ/V2H and RZ/G3E
authorLad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Fri, 10 Jan 2025 22:10:45 +0000 (22:10 +0000)
committerGeert Uytterhoeven <geert+renesas@glider.be>
Tue, 14 Jan 2025 08:22:48 +0000 (09:22 +0100)
The PFC_MASK value for the PFC_mx registers is currently hardcoded to
0x07, which is correct for SoCs in the RZ/G2L family, but insufficient
for RZ/V2H and RZ/G3E, where the mask value should be 0x0f.  This
discrepancy causes incorrect PFC register configuration on RZ/V2H and
RZ/G3E SoCs.

On RZ/G2L, the PFC_mx bitfields are also 4 bits wide, with bit 4 marked
as reserved.  The reserved bits are documented to read as zero and be
ignored when written.  Updating the PFC_MASK definition from 0x07 to
0x0f ensures compatibility with both SoC families while maintaining
correct behavior on RZ/G2L.

Fixes: 9bd95ac86e70 ("pinctrl: renesas: rzg2l: Add support for RZ/V2H SoC")
Cc: stable@vger.kernel.org
Reported-by: Hien Huynh <hien.huynh.px@renesas.com>
Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Link: https://lore.kernel.org/20250110221045.594596-1-prabhakar.mahadev-lad.rj@bp.renesas.com
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
drivers/pinctrl/renesas/pinctrl-rzg2l.c

index 4fae24453c11a99e8bf8420febe6731cb9963bc5..ce4a07a3df49aded07edd1508b247bea0a7f4681 100644 (file)
 #define PWPR_REGWE_B           BIT(5)  /* OEN Register Write Enable, known only in RZ/V2H(P) */
 
 #define PM_MASK                        0x03
-#define PFC_MASK               0x07
+#define PFC_MASK               0x0f
 #define IEN_MASK               0x01
 #define IOLH_MASK              0x03
 #define SR_MASK                        0x01