Synchronize R-Car R8A7794 E2 PFC tables with Linux 6.1.7,
commit 21e996306a6afaae88295858de0ffb8955173a15 .

Signed-off-by: Marek Vasut <marek.vasut+rene...@mailbox.org>
---
 drivers/pinctrl/renesas/pfc-r8a7794.c | 671 +++++++++++++++++---------
 1 file changed, 455 insertions(+), 216 deletions(-)

diff --git a/drivers/pinctrl/renesas/pfc-r8a7794.c 
b/drivers/pinctrl/renesas/pfc-r8a7794.c
index 9495603f7c7..7ed54f0cfff 100644
--- a/drivers/pinctrl/renesas/pfc-r8a7794.c
+++ b/drivers/pinctrl/renesas/pfc-r8a7794.c
@@ -16,15 +16,66 @@
 #include "sh_pfc.h"
 
 #define CPU_ALL_GP(fn, sfx)                                            \
-       PORT_GP_32(0, fn, sfx),                                         \
-       PORT_GP_26(1, fn, sfx),                                         \
-       PORT_GP_32(2, fn, sfx),                                         \
-       PORT_GP_32(3, fn, sfx),                                         \
-       PORT_GP_32(4, fn, sfx),                                         \
-       PORT_GP_28(5, fn, sfx),                                         \
-       PORT_GP_CFG_24(6, fn, sfx, SH_PFC_PIN_CFG_IO_VOLTAGE),          \
-       PORT_GP_1(6, 24, fn, sfx),                                      \
-       PORT_GP_1(6, 25, fn, sfx)
+       PORT_GP_CFG_32(0, fn, sfx, SH_PFC_PIN_CFG_PULL_UP),             \
+       PORT_GP_CFG_26(1, fn, sfx, SH_PFC_PIN_CFG_PULL_UP),             \
+       PORT_GP_CFG_32(2, fn, sfx, SH_PFC_PIN_CFG_PULL_UP),             \
+       PORT_GP_CFG_32(3, fn, sfx, SH_PFC_PIN_CFG_PULL_UP),             \
+       PORT_GP_CFG_32(4, fn, sfx, SH_PFC_PIN_CFG_PULL_UP),             \
+       PORT_GP_CFG_7(5, fn, sfx, SH_PFC_PIN_CFG_PULL_UP),              \
+       PORT_GP_1(5, 7, fn, sfx),                                       \
+       PORT_GP_1(5, 8, fn, sfx),                                       \
+       PORT_GP_1(5, 9, fn, sfx),                                       \
+       PORT_GP_CFG_1(5, 10, fn, sfx, SH_PFC_PIN_CFG_PULL_UP),          \
+       PORT_GP_CFG_1(5, 11, fn, sfx, SH_PFC_PIN_CFG_PULL_UP),          \
+       PORT_GP_CFG_1(5, 12, fn, sfx, SH_PFC_PIN_CFG_PULL_UP),          \
+       PORT_GP_CFG_1(5, 13, fn, sfx, SH_PFC_PIN_CFG_PULL_UP),          \
+       PORT_GP_CFG_1(5, 14, fn, sfx, SH_PFC_PIN_CFG_PULL_UP),          \
+       PORT_GP_CFG_1(5, 15, fn, sfx, SH_PFC_PIN_CFG_PULL_UP),          \
+       PORT_GP_CFG_1(5, 16, fn, sfx, SH_PFC_PIN_CFG_PULL_UP),          \
+       PORT_GP_CFG_1(5, 17, fn, sfx, SH_PFC_PIN_CFG_PULL_UP),          \
+       PORT_GP_CFG_1(5, 18, fn, sfx, SH_PFC_PIN_CFG_PULL_UP),          \
+       PORT_GP_CFG_1(5, 19, fn, sfx, SH_PFC_PIN_CFG_PULL_UP),          \
+       PORT_GP_CFG_1(5, 20, fn, sfx, SH_PFC_PIN_CFG_PULL_UP),          \
+       PORT_GP_CFG_1(5, 21, fn, sfx, SH_PFC_PIN_CFG_PULL_UP),          \
+       PORT_GP_CFG_1(5, 22, fn, sfx, SH_PFC_PIN_CFG_PULL_UP),          \
+       PORT_GP_CFG_1(5, 23, fn, sfx, SH_PFC_PIN_CFG_PULL_UP),          \
+       PORT_GP_1(5, 24, fn, sfx),                                      \
+       PORT_GP_1(5, 25, fn, sfx),                                      \
+       PORT_GP_1(5, 26, fn, sfx),                                      \
+       PORT_GP_1(5, 27, fn, sfx),                                      \
+       PORT_GP_CFG_1(6, 0, fn, sfx, SH_PFC_PIN_CFG_IO_VOLTAGE),        \
+       PORT_GP_CFG_1(6, 1, fn, sfx, SH_PFC_PIN_CFG_IO_VOLTAGE | 
SH_PFC_PIN_CFG_PULL_UP),       \
+       PORT_GP_CFG_1(6, 2, fn, sfx, SH_PFC_PIN_CFG_IO_VOLTAGE | 
SH_PFC_PIN_CFG_PULL_UP),       \
+       PORT_GP_CFG_1(6, 3, fn, sfx, SH_PFC_PIN_CFG_IO_VOLTAGE | 
SH_PFC_PIN_CFG_PULL_UP),       \
+       PORT_GP_CFG_1(6, 4, fn, sfx, SH_PFC_PIN_CFG_IO_VOLTAGE | 
SH_PFC_PIN_CFG_PULL_UP),       \
+       PORT_GP_CFG_1(6, 5, fn, sfx, SH_PFC_PIN_CFG_IO_VOLTAGE | 
SH_PFC_PIN_CFG_PULL_UP),       \
+       PORT_GP_CFG_1(6, 6, fn, sfx, SH_PFC_PIN_CFG_IO_VOLTAGE | 
SH_PFC_PIN_CFG_PULL_UP),       \
+       PORT_GP_CFG_1(6, 7, fn, sfx, SH_PFC_PIN_CFG_IO_VOLTAGE | 
SH_PFC_PIN_CFG_PULL_UP),       \
+       PORT_GP_CFG_1(6, 8, fn, sfx, SH_PFC_PIN_CFG_IO_VOLTAGE),        \
+       PORT_GP_CFG_1(6, 9, fn, sfx, SH_PFC_PIN_CFG_IO_VOLTAGE | 
SH_PFC_PIN_CFG_PULL_UP),       \
+       PORT_GP_CFG_1(6, 10, fn, sfx, SH_PFC_PIN_CFG_IO_VOLTAGE | 
SH_PFC_PIN_CFG_PULL_UP),      \
+       PORT_GP_CFG_1(6, 11, fn, sfx, SH_PFC_PIN_CFG_IO_VOLTAGE | 
SH_PFC_PIN_CFG_PULL_UP),      \
+       PORT_GP_CFG_1(6, 12, fn, sfx, SH_PFC_PIN_CFG_IO_VOLTAGE | 
SH_PFC_PIN_CFG_PULL_UP),      \
+       PORT_GP_CFG_1(6, 13, fn, sfx, SH_PFC_PIN_CFG_IO_VOLTAGE | 
SH_PFC_PIN_CFG_PULL_UP),      \
+       PORT_GP_CFG_1(6, 14, fn, sfx, SH_PFC_PIN_CFG_IO_VOLTAGE | 
SH_PFC_PIN_CFG_PULL_UP),      \
+       PORT_GP_CFG_1(6, 15, fn, sfx, SH_PFC_PIN_CFG_IO_VOLTAGE | 
SH_PFC_PIN_CFG_PULL_UP),      \
+       PORT_GP_CFG_1(6, 16, fn, sfx, SH_PFC_PIN_CFG_IO_VOLTAGE),       \
+       PORT_GP_CFG_1(6, 17, fn, sfx, SH_PFC_PIN_CFG_IO_VOLTAGE | 
SH_PFC_PIN_CFG_PULL_UP),      \
+       PORT_GP_CFG_1(6, 18, fn, sfx, SH_PFC_PIN_CFG_IO_VOLTAGE | 
SH_PFC_PIN_CFG_PULL_UP),      \
+       PORT_GP_CFG_1(6, 19, fn, sfx, SH_PFC_PIN_CFG_IO_VOLTAGE | 
SH_PFC_PIN_CFG_PULL_UP),      \
+       PORT_GP_CFG_1(6, 20, fn, sfx, SH_PFC_PIN_CFG_IO_VOLTAGE | 
SH_PFC_PIN_CFG_PULL_UP),      \
+       PORT_GP_CFG_1(6, 21, fn, sfx, SH_PFC_PIN_CFG_IO_VOLTAGE | 
SH_PFC_PIN_CFG_PULL_UP),      \
+       PORT_GP_CFG_1(6, 22, fn, sfx, SH_PFC_PIN_CFG_IO_VOLTAGE | 
SH_PFC_PIN_CFG_PULL_UP),      \
+       PORT_GP_CFG_1(6, 23, fn, sfx, SH_PFC_PIN_CFG_IO_VOLTAGE | 
SH_PFC_PIN_CFG_PULL_UP),      \
+       PORT_GP_CFG_1(6, 24, fn, sfx, SH_PFC_PIN_CFG_PULL_UP),          \
+       PORT_GP_CFG_1(6, 25, fn, sfx, SH_PFC_PIN_CFG_PULL_UP)
+
+#define CPU_ALL_NOGP(fn)                                               \
+       PIN_NOGP_CFG(ASEBRK_N_ACK, "ASEBRK#/ACK", fn, 
SH_PFC_PIN_CFG_PULL_DOWN),        \
+       PIN_NOGP_CFG(TCK, "TCK", fn, SH_PFC_PIN_CFG_PULL_UP),           \
+       PIN_NOGP_CFG(TDI, "TDI", fn, SH_PFC_PIN_CFG_PULL_UP),           \
+       PIN_NOGP_CFG(TMS, "TMS", fn, SH_PFC_PIN_CFG_PULL_UP),           \
+       PIN_NOGP_CFG(TRST_N, "TRST#", fn, SH_PFC_PIN_CFG_PULL_UP)
 
 enum {
        PINMUX_RESERVED = 0,
@@ -1437,8 +1488,17 @@ static const u16 pinmux_data[] = {
        PINMUX_IPSR_MSEL(IP13_26_24, FMIN_E, SEL_DARC_4),
 };
 
+/*
+ * Pins not associated with a GPIO port.
+ */
+enum {
+       GP_ASSIGN_LAST(),
+       NOGP_ALL(),
+};
+
 static const struct sh_pfc_pin pinmux_pins[] = {
        PINMUX_GPIO_GP_ALL(),
+       PINMUX_NOGP_ALL(),
 };
 
 /* - Audio Clock ------------------------------------------------------------ 
*/
@@ -2329,29 +2389,14 @@ static const unsigned int intc_irq9_mux[] = {
        IRQ9_MARK,
 };
 /* - MMCIF ------------------------------------------------------------------ 
*/
-static const unsigned int mmc_data1_pins[] = {
-       /* D[0] */
-       RCAR_GP_PIN(6, 18),
-};
-static const unsigned int mmc_data1_mux[] = {
-       MMC_D0_MARK,
-};
-static const unsigned int mmc_data4_pins[] = {
-       /* D[0:3] */
-       RCAR_GP_PIN(6, 18), RCAR_GP_PIN(6, 19),
-       RCAR_GP_PIN(6, 20), RCAR_GP_PIN(6, 21),
-};
-static const unsigned int mmc_data4_mux[] = {
-       MMC_D0_MARK, MMC_D1_MARK, MMC_D2_MARK, MMC_D3_MARK,
-};
-static const unsigned int mmc_data8_pins[] = {
+static const unsigned int mmc_data_pins[] = {
        /* D[0:7] */
        RCAR_GP_PIN(6, 18), RCAR_GP_PIN(6, 19),
        RCAR_GP_PIN(6, 20), RCAR_GP_PIN(6, 21),
        RCAR_GP_PIN(6, 22), RCAR_GP_PIN(6, 23),
        RCAR_GP_PIN(6, 24), RCAR_GP_PIN(6, 25),
 };
-static const unsigned int mmc_data8_mux[] = {
+static const unsigned int mmc_data_mux[] = {
        MMC_D0_MARK, MMC_D1_MARK, MMC_D2_MARK, MMC_D3_MARK,
        MMC_D4_MARK, MMC_D5_MARK, MMC_D6_MARK, MMC_D7_MARK,
 };
@@ -2686,19 +2731,12 @@ static const unsigned int qspi_ctrl_pins[] = {
 static const unsigned int qspi_ctrl_mux[] = {
        SPCLK_MARK, SSL_MARK,
 };
-static const unsigned int qspi_data2_pins[] = {
-       /* MOSI_IO0, MISO_IO1 */
-       RCAR_GP_PIN(1, 5), RCAR_GP_PIN(1, 6),
-};
-static const unsigned int qspi_data2_mux[] = {
-       MOSI_IO0_MARK, MISO_IO1_MARK,
-};
-static const unsigned int qspi_data4_pins[] = {
+static const unsigned int qspi_data_pins[] = {
        /* MOSI_IO0, MISO_IO1, IO2, IO3 */
        RCAR_GP_PIN(1, 5), RCAR_GP_PIN(1, 6), RCAR_GP_PIN(1, 7),
        RCAR_GP_PIN(1, 8),
 };
-static const unsigned int qspi_data4_mux[] = {
+static const unsigned int qspi_data_mux[] = {
        MOSI_IO0_MARK, MISO_IO1_MARK, IO2_MARK, IO3_MARK,
 };
 /* - SCIF0 ------------------------------------------------------------------ 
*/
@@ -3173,19 +3211,12 @@ static const unsigned int scif_clk_b_mux[] = {
        SCIF_CLK_B_MARK,
 };
 /* - SDHI0 ------------------------------------------------------------------ 
*/
-static const unsigned int sdhi0_data1_pins[] = {
-       /* D0 */
-       RCAR_GP_PIN(6, 2),
-};
-static const unsigned int sdhi0_data1_mux[] = {
-       SD0_DATA0_MARK,
-};
-static const unsigned int sdhi0_data4_pins[] = {
+static const unsigned int sdhi0_data_pins[] = {
        /* D[0:3] */
        RCAR_GP_PIN(6, 2), RCAR_GP_PIN(6, 3),
        RCAR_GP_PIN(6, 4), RCAR_GP_PIN(6, 5),
 };
-static const unsigned int sdhi0_data4_mux[] = {
+static const unsigned int sdhi0_data_mux[] = {
        SD0_DATA0_MARK, SD0_DATA1_MARK, SD0_DATA2_MARK, SD0_DATA3_MARK,
 };
 static const unsigned int sdhi0_ctrl_pins[] = {
@@ -3210,19 +3241,12 @@ static const unsigned int sdhi0_wp_mux[] = {
        SD0_WP_MARK,
 };
 /* - SDHI1 ------------------------------------------------------------------ 
*/
-static const unsigned int sdhi1_data1_pins[] = {
-       /* D0 */
-       RCAR_GP_PIN(6, 10),
-};
-static const unsigned int sdhi1_data1_mux[] = {
-       SD1_DATA0_MARK,
-};
-static const unsigned int sdhi1_data4_pins[] = {
+static const unsigned int sdhi1_data_pins[] = {
        /* D[0:3] */
        RCAR_GP_PIN(6, 10), RCAR_GP_PIN(6, 11),
        RCAR_GP_PIN(6, 12), RCAR_GP_PIN(6, 13),
 };
-static const unsigned int sdhi1_data4_mux[] = {
+static const unsigned int sdhi1_data_mux[] = {
        SD1_DATA0_MARK, SD1_DATA1_MARK, SD1_DATA2_MARK, SD1_DATA3_MARK,
 };
 static const unsigned int sdhi1_ctrl_pins[] = {
@@ -3247,19 +3271,12 @@ static const unsigned int sdhi1_wp_mux[] = {
        SD1_WP_MARK,
 };
 /* - SDHI2 ------------------------------------------------------------------ 
*/
-static const unsigned int sdhi2_data1_pins[] = {
-       /* D0 */
-       RCAR_GP_PIN(6, 18),
-};
-static const unsigned int sdhi2_data1_mux[] = {
-       SD2_DATA0_MARK,
-};
-static const unsigned int sdhi2_data4_pins[] = {
+static const unsigned int sdhi2_data_pins[] = {
        /* D[0:3] */
        RCAR_GP_PIN(6, 18), RCAR_GP_PIN(6, 19),
        RCAR_GP_PIN(6, 20), RCAR_GP_PIN(6, 21),
 };
-static const unsigned int sdhi2_data4_mux[] = {
+static const unsigned int sdhi2_data_mux[] = {
        SD2_DATA0_MARK, SD2_DATA1_MARK, SD2_DATA2_MARK, SD2_DATA3_MARK,
 };
 static const unsigned int sdhi2_ctrl_pins[] = {
@@ -3614,43 +3631,39 @@ static const unsigned int usb1_mux[] = {
        USB1_OVC_MARK,
 };
 /* - VIN0 ------------------------------------------------------------------- 
*/
-static const union vin_data vin0_data_pins = {
-       .data24 = {
-               /* B */
-               RCAR_GP_PIN(3, 1), RCAR_GP_PIN(3, 2),
-               RCAR_GP_PIN(3, 3), RCAR_GP_PIN(3, 4),
-               RCAR_GP_PIN(3, 5), RCAR_GP_PIN(3, 6),
-               RCAR_GP_PIN(3, 7), RCAR_GP_PIN(3, 8),
-               /* G */
-               RCAR_GP_PIN(3, 13), RCAR_GP_PIN(3, 14),
-               RCAR_GP_PIN(3, 15), RCAR_GP_PIN(3, 16),
-               RCAR_GP_PIN(3, 17), RCAR_GP_PIN(3, 18),
-               RCAR_GP_PIN(3, 19), RCAR_GP_PIN(3, 20),
-               /* R */
-               RCAR_GP_PIN(3, 21), RCAR_GP_PIN(3, 22),
-               RCAR_GP_PIN(3, 23), RCAR_GP_PIN(3, 24),
-               RCAR_GP_PIN(3, 25), RCAR_GP_PIN(3, 26),
-               RCAR_GP_PIN(3, 27), RCAR_GP_PIN(3, 28),
-       },
+static const unsigned int vin0_data_pins[] = {
+       /* B */
+       RCAR_GP_PIN(3, 1), RCAR_GP_PIN(3, 2),
+       RCAR_GP_PIN(3, 3), RCAR_GP_PIN(3, 4),
+       RCAR_GP_PIN(3, 5), RCAR_GP_PIN(3, 6),
+       RCAR_GP_PIN(3, 7), RCAR_GP_PIN(3, 8),
+       /* G */
+       RCAR_GP_PIN(3, 13), RCAR_GP_PIN(3, 14),
+       RCAR_GP_PIN(3, 15), RCAR_GP_PIN(3, 16),
+       RCAR_GP_PIN(3, 17), RCAR_GP_PIN(3, 18),
+       RCAR_GP_PIN(3, 19), RCAR_GP_PIN(3, 20),
+       /* R */
+       RCAR_GP_PIN(3, 21), RCAR_GP_PIN(3, 22),
+       RCAR_GP_PIN(3, 23), RCAR_GP_PIN(3, 24),
+       RCAR_GP_PIN(3, 25), RCAR_GP_PIN(3, 26),
+       RCAR_GP_PIN(3, 27), RCAR_GP_PIN(3, 28),
 };
-static const union vin_data vin0_data_mux = {
-       .data24 = {
-               /* B */
-               VI0_DATA0_VI0_B0_MARK, VI0_DATA1_VI0_B1_MARK,
-               VI0_DATA2_VI0_B2_MARK, VI0_DATA3_VI0_B3_MARK,
-               VI0_DATA4_VI0_B4_MARK, VI0_DATA5_VI0_B5_MARK,
-               VI0_DATA6_VI0_B6_MARK, VI0_DATA7_VI0_B7_MARK,
-               /* G */
-               VI0_G0_MARK, VI0_G1_MARK,
-               VI0_G2_MARK, VI0_G3_MARK,
-               VI0_G4_MARK, VI0_G5_MARK,
-               VI0_G6_MARK, VI0_G7_MARK,
-               /* R */
-               VI0_R0_MARK, VI0_R1_MARK,
-               VI0_R2_MARK, VI0_R3_MARK,
-               VI0_R4_MARK, VI0_R5_MARK,
-               VI0_R6_MARK, VI0_R7_MARK,
-       },
+static const unsigned int vin0_data_mux[] = {
+       /* B */
+       VI0_DATA0_VI0_B0_MARK, VI0_DATA1_VI0_B1_MARK,
+       VI0_DATA2_VI0_B2_MARK, VI0_DATA3_VI0_B3_MARK,
+       VI0_DATA4_VI0_B4_MARK, VI0_DATA5_VI0_B5_MARK,
+       VI0_DATA6_VI0_B6_MARK, VI0_DATA7_VI0_B7_MARK,
+       /* G */
+       VI0_G0_MARK, VI0_G1_MARK,
+       VI0_G2_MARK, VI0_G3_MARK,
+       VI0_G4_MARK, VI0_G5_MARK,
+       VI0_G6_MARK, VI0_G7_MARK,
+       /* R */
+       VI0_R0_MARK, VI0_R1_MARK,
+       VI0_R2_MARK, VI0_R3_MARK,
+       VI0_R4_MARK, VI0_R5_MARK,
+       VI0_R6_MARK, VI0_R7_MARK,
 };
 static const unsigned int vin0_data18_pins[] = {
        /* B */
@@ -3707,25 +3720,21 @@ static const unsigned int vin0_clk_mux[] = {
        VI0_CLK_MARK,
 };
 /* - VIN1 ------------------------------------------------------------------- 
*/
-static const union vin_data12 vin1_data_pins = {
-       .data12 = {
-               RCAR_GP_PIN(5, 12), RCAR_GP_PIN(5, 13),
-               RCAR_GP_PIN(5, 14), RCAR_GP_PIN(5, 15),
-               RCAR_GP_PIN(5, 16), RCAR_GP_PIN(5, 17),
-               RCAR_GP_PIN(5, 18), RCAR_GP_PIN(5, 19),
-               RCAR_GP_PIN(1, 10), RCAR_GP_PIN(1, 11),
-               RCAR_GP_PIN(1, 12), RCAR_GP_PIN(1, 13),
-       },
+static const unsigned int vin1_data_pins[] = {
+       RCAR_GP_PIN(5, 12), RCAR_GP_PIN(5, 13),
+       RCAR_GP_PIN(5, 14), RCAR_GP_PIN(5, 15),
+       RCAR_GP_PIN(5, 16), RCAR_GP_PIN(5, 17),
+       RCAR_GP_PIN(5, 18), RCAR_GP_PIN(5, 19),
+       RCAR_GP_PIN(1, 10), RCAR_GP_PIN(1, 11),
+       RCAR_GP_PIN(1, 12), RCAR_GP_PIN(1, 13),
 };
-static const union vin_data12 vin1_data_mux = {
-       .data12 = {
-               VI1_DATA0_MARK, VI1_DATA1_MARK,
-               VI1_DATA2_MARK, VI1_DATA3_MARK,
-               VI1_DATA4_MARK, VI1_DATA5_MARK,
-               VI1_DATA6_MARK, VI1_DATA7_MARK,
-               VI1_DATA8_MARK, VI1_DATA9_MARK,
-               VI1_DATA10_MARK, VI1_DATA11_MARK,
-       },
+static const unsigned int vin1_data_mux[] = {
+       VI1_DATA0_MARK, VI1_DATA1_MARK,
+       VI1_DATA2_MARK, VI1_DATA3_MARK,
+       VI1_DATA4_MARK, VI1_DATA5_MARK,
+       VI1_DATA6_MARK, VI1_DATA7_MARK,
+       VI1_DATA8_MARK, VI1_DATA9_MARK,
+       VI1_DATA10_MARK, VI1_DATA11_MARK,
 };
 static const unsigned int vin1_sync_pins[] = {
        RCAR_GP_PIN(5, 22), /* HSYNC */
@@ -3864,9 +3873,9 @@ static const struct sh_pfc_pin_group pinmux_groups[] = {
        SH_PFC_PIN_GROUP(intc_irq7),
        SH_PFC_PIN_GROUP(intc_irq8),
        SH_PFC_PIN_GROUP(intc_irq9),
-       SH_PFC_PIN_GROUP(mmc_data1),
-       SH_PFC_PIN_GROUP(mmc_data4),
-       SH_PFC_PIN_GROUP(mmc_data8),
+       BUS_DATA_PIN_GROUP(mmc_data, 1),
+       BUS_DATA_PIN_GROUP(mmc_data, 4),
+       BUS_DATA_PIN_GROUP(mmc_data, 8),
        SH_PFC_PIN_GROUP(mmc_ctrl),
        SH_PFC_PIN_GROUP(msiof0_clk),
        SH_PFC_PIN_GROUP(msiof0_sync),
@@ -3916,8 +3925,8 @@ static const struct sh_pfc_pin_group pinmux_groups[] = {
        SH_PFC_PIN_GROUP(pwm6),
        SH_PFC_PIN_GROUP(pwm6_b),
        SH_PFC_PIN_GROUP(qspi_ctrl),
-       SH_PFC_PIN_GROUP(qspi_data2),
-       SH_PFC_PIN_GROUP(qspi_data4),
+       BUS_DATA_PIN_GROUP(qspi_data, 2),
+       BUS_DATA_PIN_GROUP(qspi_data, 4),
        SH_PFC_PIN_GROUP(scif0_data),
        SH_PFC_PIN_GROUP(scif0_data_b),
        SH_PFC_PIN_GROUP(scif0_data_c),
@@ -3983,18 +3992,18 @@ static const struct sh_pfc_pin_group pinmux_groups[] = {
        SH_PFC_PIN_GROUP(scifb2_ctrl),
        SH_PFC_PIN_GROUP(scif_clk),
        SH_PFC_PIN_GROUP(scif_clk_b),
-       SH_PFC_PIN_GROUP(sdhi0_data1),
-       SH_PFC_PIN_GROUP(sdhi0_data4),
+       BUS_DATA_PIN_GROUP(sdhi0_data, 1),
+       BUS_DATA_PIN_GROUP(sdhi0_data, 4),
        SH_PFC_PIN_GROUP(sdhi0_ctrl),
        SH_PFC_PIN_GROUP(sdhi0_cd),
        SH_PFC_PIN_GROUP(sdhi0_wp),
-       SH_PFC_PIN_GROUP(sdhi1_data1),
-       SH_PFC_PIN_GROUP(sdhi1_data4),
+       BUS_DATA_PIN_GROUP(sdhi1_data, 1),
+       BUS_DATA_PIN_GROUP(sdhi1_data, 4),
        SH_PFC_PIN_GROUP(sdhi1_ctrl),
        SH_PFC_PIN_GROUP(sdhi1_cd),
        SH_PFC_PIN_GROUP(sdhi1_wp),
-       SH_PFC_PIN_GROUP(sdhi2_data1),
-       SH_PFC_PIN_GROUP(sdhi2_data4),
+       BUS_DATA_PIN_GROUP(sdhi2_data, 1),
+       BUS_DATA_PIN_GROUP(sdhi2_data, 4),
        SH_PFC_PIN_GROUP(sdhi2_ctrl),
        SH_PFC_PIN_GROUP(sdhi2_cd),
        SH_PFC_PIN_GROUP(sdhi2_wp),
@@ -4046,20 +4055,20 @@ static const struct sh_pfc_pin_group pinmux_groups[] = {
        SH_PFC_PIN_GROUP(tpu_to3_c),
        SH_PFC_PIN_GROUP(usb0),
        SH_PFC_PIN_GROUP(usb1),
-       VIN_DATA_PIN_GROUP(vin0_data, 24),
-       VIN_DATA_PIN_GROUP(vin0_data, 20),
+       BUS_DATA_PIN_GROUP(vin0_data, 24),
+       BUS_DATA_PIN_GROUP(vin0_data, 20),
        SH_PFC_PIN_GROUP(vin0_data18),
-       VIN_DATA_PIN_GROUP(vin0_data, 16),
-       VIN_DATA_PIN_GROUP(vin0_data, 12),
-       VIN_DATA_PIN_GROUP(vin0_data, 10),
-       VIN_DATA_PIN_GROUP(vin0_data, 8),
+       BUS_DATA_PIN_GROUP(vin0_data, 16),
+       BUS_DATA_PIN_GROUP(vin0_data, 12),
+       BUS_DATA_PIN_GROUP(vin0_data, 10),
+       BUS_DATA_PIN_GROUP(vin0_data, 8),
        SH_PFC_PIN_GROUP(vin0_sync),
        SH_PFC_PIN_GROUP(vin0_field),
        SH_PFC_PIN_GROUP(vin0_clkenb),
        SH_PFC_PIN_GROUP(vin0_clk),
-       VIN_DATA_PIN_GROUP(vin1_data, 12),
-       VIN_DATA_PIN_GROUP(vin1_data, 10),
-       VIN_DATA_PIN_GROUP(vin1_data, 8),
+       BUS_DATA_PIN_GROUP(vin1_data, 12),
+       BUS_DATA_PIN_GROUP(vin1_data, 10),
+       BUS_DATA_PIN_GROUP(vin1_data, 8),
        SH_PFC_PIN_GROUP(vin1_sync),
        SH_PFC_PIN_GROUP(vin1_field),
        SH_PFC_PIN_GROUP(vin1_clkenb),
@@ -4859,7 +4868,7 @@ static const struct pinmux_cfg_reg pinmux_config_regs[] = 
{
        },
        { PINMUX_CFG_REG_VAR("IPSR0", 0xE6060020, 32,
                             GROUP(2, 2, 2, 1, 1, 2, 2, 2, 1, 1, 1, 1,
-                                  1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1),
+                                  1, 1, 1, 1, 2, -7, 1),
                             GROUP(
                /* IP0_31_30 [2] */
                FN_D5, FN_SCIF4_RXD_B, FN_I2C0_SCL_D, 0,
@@ -4895,25 +4904,12 @@ static const struct pinmux_cfg_reg pinmux_config_regs[] 
= {
                FN_MMC_CLK, FN_SD2_CLK,
                /* IP0_9_8 [2] */
                FN_SD1_WP, FN_IRQ7, FN_CAN0_TX, 0,
-               /* IP0_7 [1] */
-               0, 0,
-               /* IP0_6 [1] */
-               0, 0,
-               /* IP0_5 [1] */
-               0, 0,
-               /* IP0_4 [1] */
-               0, 0,
-               /* IP0_3 [1] */
-               0, 0,
-               /* IP0_2 [1] */
-               0, 0,
-               /* IP0_1 [1] */
-               0, 0,
+               /* IP0_7_1 [7] RESERVED */
                /* IP0_0 [1] */
                FN_SD1_CD, FN_CAN0_RX, ))
        },
        { PINMUX_CFG_REG_VAR("IPSR1", 0xE6060024, 32,
-                            GROUP(2, 2, 1, 1, 1, 1, 2, 2, 2, 3, 2, 2,
+                            GROUP(2, 2, 1, 1, -1, 1, 2, 2, 2, 3, 2, 2,
                                   3, 2, 2, 2, 2),
                             GROUP(
                /* IP1_31_30 [2] */
@@ -4924,8 +4920,7 @@ static const struct pinmux_cfg_reg pinmux_config_regs[] = 
{
                FN_A4, FN_SCIFB0_TXD,
                /* IP1_26 [1] */
                FN_A3, FN_SCIFB0_SCK,
-               /* IP1_25 [1] */
-               0, 0,
+               /* IP1_25 [1] RESERVED */
                /* IP1_24 [1] */
                FN_A1, FN_SCIFB1_TXD,
                /* IP1_23_22 [2] */
@@ -5152,12 +5147,11 @@ static const struct pinmux_cfg_reg pinmux_config_regs[] 
= {
                FN_DU0_EXVSYNC_DU0_VSYNC, FN_QSTB_QHE, 0, 0, ))
        },
        { PINMUX_CFG_REG_VAR("IPSR7", 0xE606003C, 32,
-                            GROUP(1, 1, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3),
+                            GROUP(1, -1, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3),
                             GROUP(
                /* IP7_31 [1] */
                FN_DREQ0_N, FN_SCIFB1_RXD,
-               /* IP7_30 [1] */
-               0, 0,
+               /* IP7_30 [1] RESERVED */
                /* IP7_29_27 [3] */
                FN_ETH_TXD0, FN_VI0_R2, FN_SCIF3_RXD_B, FN_I2C4_SCL_E,
                FN_AVB_GTX_CLK, FN_SSI_WS6_B, 0, 0,
@@ -5226,10 +5220,9 @@ static const struct pinmux_cfg_reg pinmux_config_regs[] 
= {
                FN_AVB_MDC, FN_SSI_SDATA6_B, 0, 0, ))
        },
        { PINMUX_CFG_REG_VAR("IPSR9", 0xE6060044, 32,
-                            GROUP(1, 3, 3, 3, 3, 2, 2, 3, 3, 3, 3, 3),
+                            GROUP(-1, 3, 3, 3, 3, 2, 2, 3, 3, 3, 3, 3),
                             GROUP(
-               /* IP9_31 [1] */
-               0, 0,
+               /* IP9_31 [1] RESERVED */
                /* IP9_30_28 [3] */
                FN_SCIF1_SCK, FN_PWM3, FN_TCLK2, FN_DU1_DG5,
                FN_SSI_SDATA1_B, 0, 0, 0,
@@ -5299,10 +5292,9 @@ static const struct pinmux_cfg_reg pinmux_config_regs[] 
= {
                0, 0, 0, 0, ))
        },
        { PINMUX_CFG_REG_VAR("IPSR11", 0xE606004C, 32,
-                            GROUP(2, 3, 3, 3, 3, 2, 2, 3, 3, 2, 3, 3),
+                            GROUP(-2, 3, 3, 3, 3, 2, 2, 3, 3, 2, 3, 3),
                             GROUP(
-               /* IP11_31_30 [2] */
-               0, 0, 0, 0,
+               /* IP11_31_30 [2] RESERVED */
                /* IP11_29_27 [3] */
                FN_SSI_SDATA0, FN_MSIOF1_SCK_B, FN_PWM0_B, FN_ADICLK_B,
                0, 0, 0, 0,
@@ -5335,10 +5327,9 @@ static const struct pinmux_cfg_reg pinmux_config_regs[] 
= {
                0, 0, 0, 0, ))
        },
        { PINMUX_CFG_REG_VAR("IPSR12", 0xE6060050, 32,
-                            GROUP(2, 3, 3, 3, 3, 3, 2, 2, 2, 3, 3, 3),
+                            GROUP(-2, 3, 3, 3, 3, 3, 2, 2, 2, 3, 3, 3),
                             GROUP(
-               /* IP12_31_30 [2] */
-               0, 0, 0, 0,
+               /* IP12_31_30 [2] RESERVED */
                /* IP12_29_27 [3] */
                FN_SSI_SCK2, FN_HSCIF1_HTX_B, FN_VI1_DATA2, 0,
                FN_ATAG0_N, FN_ETH_RXD1_B, 0, 0,
@@ -5371,18 +5362,9 @@ static const struct pinmux_cfg_reg pinmux_config_regs[] 
= {
                0, FN_DREQ1_N_B, 0, 0, ))
        },
        { PINMUX_CFG_REG_VAR("IPSR13", 0xE6060054, 32,
-                            GROUP(1, 1, 1, 1, 1, 3, 3, 3, 3, 3, 3, 3, 3, 3),
+                            GROUP(-5, 3, 3, 3, 3, 3, 3, 3, 3, 3),
                             GROUP(
-               /* IP13_31 [1] */
-               0, 0,
-               /* IP13_30 [1] */
-               0, 0,
-               /* IP13_29 [1] */
-               0, 0,
-               /* IP13_28 [1] */
-               0, 0,
-               /* IP13_27 [1] */
-               0, 0,
+               /* IP13_31_27 [5] RESERVED */
                /* IP13_26_24 [3] */
                FN_AUDIO_CLKOUT, FN_I2C4_SDA_B, FN_SCIFA5_TXD_D, FN_VI1_VSYNC_N,
                FN_TS_SPSYNC_C, 0, FN_FMIN_E, 0,
@@ -5412,23 +5394,21 @@ static const struct pinmux_cfg_reg pinmux_config_regs[] 
= {
                0, FN_ATACS00_N, FN_ETH_LINK_B, 0, ))
        },
        { PINMUX_CFG_REG_VAR("MOD_SEL", 0xE6060090, 32,
-                            GROUP(2, 1, 2, 3, 4, 1, 1, 3, 3, 3, 3, 3, 2, 1),
+                            GROUP(2, -1, 2, 3, -4, 1, -1,
+                                  3, 3, 3, 3, 3, 2, -1),
                             GROUP(
                /* SEL_ADG [2] */
                FN_SEL_ADG_0, FN_SEL_ADG_1, FN_SEL_ADG_2, FN_SEL_ADG_3,
                /* RESERVED [1] */
-               0, 0,
                /* SEL_CAN [2] */
                FN_SEL_CAN_0, FN_SEL_CAN_1, FN_SEL_CAN_2, FN_SEL_CAN_3,
                /* SEL_DARC [3] */
                FN_SEL_DARC_0, FN_SEL_DARC_1, FN_SEL_DARC_2, FN_SEL_DARC_3,
                FN_SEL_DARC_4, 0, 0, 0,
                /* RESERVED [4] */
-               0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
                /* SEL_ETH [1] */
                FN_SEL_ETH_0, FN_SEL_ETH_1,
                /* RESERVED [1] */
-               0, 0,
                /* SEL_IC200 [3] */
                FN_SEL_I2C00_0, FN_SEL_I2C00_1, FN_SEL_I2C00_2, FN_SEL_I2C00_3,
                FN_SEL_I2C00_4, 0, 0, 0,
@@ -5446,12 +5426,11 @@ static const struct pinmux_cfg_reg pinmux_config_regs[] 
= {
                FN_SEL_I2C04_4, 0, 0, 0,
                /* SEL_I2C05 [2] */
                FN_SEL_I2C05_0, FN_SEL_I2C05_1, FN_SEL_I2C05_2, FN_SEL_I2C05_3,
-               /* RESERVED [1] */
-               0, 0, ))
+               /* RESERVED [1] */ ))
        },
        { PINMUX_CFG_REG_VAR("MOD_SEL2", 0xE6060094, 32,
                             GROUP(2, 2, 1, 1, 1, 1, 1, 1, 2, 2, 1, 1,
-                                  2, 2, 1, 1, 2, 2, 2, 1, 1, 2),
+                                  2, 2, -1, 1, 2, 2, 2, 1, 1, -2),
                             GROUP(
                /* SEL_IEB [2] */
                FN_SEL_IEB_0, FN_SEL_IEB_1, FN_SEL_IEB_2, 0,
@@ -5485,7 +5464,6 @@ static const struct pinmux_cfg_reg pinmux_config_regs[] = 
{
                FN_SEL_SCIFA5_0, FN_SEL_SCIFA5_1, FN_SEL_SCIFA5_2,
                FN_SEL_SCIFA5_3,
                /* RESERVED [1] */
-               0, 0,
                /* SEL_TMU [1] */
                FN_SEL_TMU_0, FN_SEL_TMU_1,
                /* SEL_TSIF0 [2] */
@@ -5498,12 +5476,11 @@ static const struct pinmux_cfg_reg pinmux_config_regs[] 
= {
                FN_SEL_HSCIF0_0, FN_SEL_HSCIF0_1,
                /* SEL_HSCIF1 [1] */
                FN_SEL_HSCIF1_0, FN_SEL_HSCIF1_1,
-               /* RESERVED [2] */
-               0, 0, 0, 0, ))
+               /* RESERVED [2] */ ))
        },
        { PINMUX_CFG_REG_VAR("MOD_SEL3", 0xE6060098, 32,
                             GROUP(2, 2, 2, 1, 3, 2, 1, 1, 1, 1, 1, 1,
-                                  1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1),
+                                  1, 1, -12),
                             GROUP(
                /* SEL_SCIF0 [2] */
                FN_SEL_SCIF0_0, FN_SEL_SCIF0_1, FN_SEL_SCIF0_2, FN_SEL_SCIF0_3,
@@ -5534,36 +5511,16 @@ static const struct pinmux_cfg_reg pinmux_config_regs[] 
= {
                FN_SEL_SSI8_0, FN_SEL_SSI8_1,
                /* SEL_SSI9 [1] */
                FN_SEL_SSI9_0, FN_SEL_SSI9_1,
-               /* RESERVED [1] */
-               0, 0,
-               /* RESERVED [1] */
-               0, 0,
-               /* RESERVED [1] */
-               0, 0,
-               /* RESERVED [1] */
-               0, 0,
-               /* RESERVED [1] */
-               0, 0,
-               /* RESERVED [1] */
-               0, 0,
-               /* RESERVED [1] */
-               0, 0,
-               /* RESERVED [1] */
-               0, 0,
-               /* RESERVED [1] */
-               0, 0,
-               /* RESERVED [1] */
-               0, 0,
-               /* RESERVED [1] */
-               0, 0,
-               /* RESERVED [1] */
-               0, 0, ))
+               /* RESERVED [12] */ ))
        },
        { },
 };
 
-static int r8a7794_pin_to_pocctrl(struct sh_pfc *pfc, unsigned int pin, u32 
*pocctrl)
+static int r8a7794_pin_to_pocctrl(unsigned int pin, u32 *pocctrl)
 {
+       if (pin < RCAR_GP_PIN(6, 0) || pin > RCAR_GP_PIN(6, 23))
+               return -EINVAL;
+
        *pocctrl = 0xe606006c;
 
        switch (pin & 0x1f) {
@@ -5581,6 +5538,284 @@ static int r8a7794_pin_to_pocctrl(struct sh_pfc *pfc, 
unsigned int pin, u32 *poc
        return -EINVAL;
 }
 
+static const struct pinmux_bias_reg pinmux_bias_regs[] = {
+       { PINMUX_BIAS_REG("PUPR0", 0xe6060100, "N/A", 0) {
+               [ 0] = RCAR_GP_PIN(0, 0),       /* D0 */
+               [ 1] = RCAR_GP_PIN(0, 1),       /* D1 */
+               [ 2] = RCAR_GP_PIN(0, 2),       /* D2 */
+               [ 3] = RCAR_GP_PIN(0, 3),       /* D3 */
+               [ 4] = RCAR_GP_PIN(0, 4),       /* D4 */
+               [ 5] = RCAR_GP_PIN(0, 5),       /* D5 */
+               [ 6] = RCAR_GP_PIN(0, 6),       /* D6 */
+               [ 7] = RCAR_GP_PIN(0, 7),       /* D7 */
+               [ 8] = RCAR_GP_PIN(0, 8),       /* D8 */
+               [ 9] = RCAR_GP_PIN(0, 9),       /* D9 */
+               [10] = RCAR_GP_PIN(0, 10),      /* D10 */
+               [11] = RCAR_GP_PIN(0, 11),      /* D11 */
+               [12] = RCAR_GP_PIN(0, 12),      /* D12 */
+               [13] = RCAR_GP_PIN(0, 13),      /* D13 */
+               [14] = RCAR_GP_PIN(0, 14),      /* D14 */
+               [15] = RCAR_GP_PIN(0, 15),      /* D15 */
+               [16] = RCAR_GP_PIN(0, 16),      /* A0 */
+               [17] = RCAR_GP_PIN(0, 17),      /* A1 */
+               [18] = RCAR_GP_PIN(0, 18),      /* A2 */
+               [19] = RCAR_GP_PIN(0, 19),      /* A3 */
+               [20] = RCAR_GP_PIN(0, 20),      /* A4 */
+               [21] = RCAR_GP_PIN(0, 21),      /* A5 */
+               [22] = RCAR_GP_PIN(0, 22),      /* A6 */
+               [23] = RCAR_GP_PIN(0, 23),      /* A7 */
+               [24] = RCAR_GP_PIN(0, 24),      /* A8 */
+               [25] = RCAR_GP_PIN(0, 25),      /* A9 */
+               [26] = RCAR_GP_PIN(0, 26),      /* A10 */
+               [27] = RCAR_GP_PIN(0, 27),      /* A11 */
+               [28] = RCAR_GP_PIN(0, 28),      /* A12 */
+               [29] = RCAR_GP_PIN(0, 29),      /* A13 */
+               [30] = RCAR_GP_PIN(0, 30),      /* A14 */
+               [31] = RCAR_GP_PIN(0, 31),      /* A15 */
+       } },
+       { PINMUX_BIAS_REG("PUPR1", 0xe6060104, "N/A", 0) {
+               /* PUPR1 pull-up pins */
+               [ 0] = RCAR_GP_PIN(1, 0),       /* A16 */
+               [ 1] = RCAR_GP_PIN(1, 1),       /* A17 */
+               [ 2] = RCAR_GP_PIN(1, 2),       /* A18 */
+               [ 3] = RCAR_GP_PIN(1, 3),       /* A19 */
+               [ 4] = RCAR_GP_PIN(1, 4),       /* A20 */
+               [ 5] = RCAR_GP_PIN(1, 5),       /* A21 */
+               [ 6] = RCAR_GP_PIN(1, 6),       /* A22 */
+               [ 7] = RCAR_GP_PIN(1, 7),       /* A23 */
+               [ 8] = RCAR_GP_PIN(1, 8),       /* A24 */
+               [ 9] = RCAR_GP_PIN(1, 9),       /* A25 */
+               [10] = RCAR_GP_PIN(1, 10),      /* CS0# */
+               [11] = RCAR_GP_PIN(1, 12),      /* EX_CS0# */
+               [12] = RCAR_GP_PIN(1, 14),      /* EX_CS2# */
+               [13] = RCAR_GP_PIN(1, 16),      /* EX_CS4# */
+               [14] = RCAR_GP_PIN(1, 18),      /* BS# */
+               [15] = RCAR_GP_PIN(1, 19),      /* RD# */
+               [16] = RCAR_GP_PIN(1, 20),      /* RD/WR# */
+               [17] = RCAR_GP_PIN(1, 21),      /* WE0# */
+               [18] = RCAR_GP_PIN(1, 22),      /* WE1# */
+               [19] = RCAR_GP_PIN(1, 23),      /* EX_WAIT0 */
+               [20] = RCAR_GP_PIN(1, 24),      /* DREQ0# */
+               [21] = RCAR_GP_PIN(1, 25),      /* DACK0 */
+               [22] = PIN_TRST_N,              /* TRST# */
+               [23] = PIN_TCK,                 /* TCK */
+               [24] = PIN_TMS,                 /* TMS */
+               [25] = PIN_TDI,                 /* TDI */
+               [26] = RCAR_GP_PIN(1, 11),      /* CS1#/A26 */
+               [27] = RCAR_GP_PIN(1, 13),      /* EX_CS1# */
+               [28] = RCAR_GP_PIN(1, 15),      /* EX_CS3# */
+               [29] = RCAR_GP_PIN(1, 17),      /* EX_CS5# */
+               [30] = SH_PFC_PIN_NONE,
+               [31] = SH_PFC_PIN_NONE,
+       } },
+       { PINMUX_BIAS_REG("N/A", 0, "PUPR1", 0xe6060104) {
+               /* PUPR1 pull-down pins */
+               [ 0] = SH_PFC_PIN_NONE,
+               [ 1] = SH_PFC_PIN_NONE,
+               [ 2] = SH_PFC_PIN_NONE,
+               [ 3] = SH_PFC_PIN_NONE,
+               [ 4] = SH_PFC_PIN_NONE,
+               [ 5] = SH_PFC_PIN_NONE,
+               [ 6] = SH_PFC_PIN_NONE,
+               [ 7] = SH_PFC_PIN_NONE,
+               [ 8] = SH_PFC_PIN_NONE,
+               [ 9] = SH_PFC_PIN_NONE,
+               [10] = SH_PFC_PIN_NONE,
+               [11] = SH_PFC_PIN_NONE,
+               [12] = SH_PFC_PIN_NONE,
+               [13] = SH_PFC_PIN_NONE,
+               [14] = SH_PFC_PIN_NONE,
+               [15] = SH_PFC_PIN_NONE,
+               [16] = SH_PFC_PIN_NONE,
+               [17] = SH_PFC_PIN_NONE,
+               [18] = SH_PFC_PIN_NONE,
+               [19] = SH_PFC_PIN_NONE,
+               [20] = SH_PFC_PIN_NONE,
+               [21] = SH_PFC_PIN_NONE,
+               [22] = SH_PFC_PIN_NONE,
+               [23] = SH_PFC_PIN_NONE,
+               [24] = SH_PFC_PIN_NONE,
+               [25] = SH_PFC_PIN_NONE,
+               [26] = SH_PFC_PIN_NONE,
+               [27] = SH_PFC_PIN_NONE,
+               [28] = SH_PFC_PIN_NONE,
+               [29] = SH_PFC_PIN_NONE,
+               [30] = PIN_ASEBRK_N_ACK,        /* ASEBRK#/ACK */
+               [31] = SH_PFC_PIN_NONE,
+       } },
+       { PINMUX_BIAS_REG("PUPR2", 0xe6060108, "N/A", 0) {
+               [ 0] = RCAR_GP_PIN(2, 0),       /* DU0_DR0 */
+               [ 1] = RCAR_GP_PIN(2, 1),       /* DU0_DR1 */
+               [ 2] = RCAR_GP_PIN(2, 2),       /* DU0_DR2 */
+               [ 3] = RCAR_GP_PIN(2, 3),       /* DU0_DR3 */
+               [ 4] = RCAR_GP_PIN(2, 4),       /* DU0_DR4 */
+               [ 5] = RCAR_GP_PIN(2, 5),       /* DU0_DR5 */
+               [ 6] = RCAR_GP_PIN(2, 6),       /* DU0_DR6 */
+               [ 7] = RCAR_GP_PIN(2, 7),       /* DU0_DR7 */
+               [ 8] = RCAR_GP_PIN(2, 8),       /* DU0_DG0 */
+               [ 9] = RCAR_GP_PIN(2, 9),       /* DU0_DG1 */
+               [10] = RCAR_GP_PIN(2, 10),      /* DU0_DG2 */
+               [11] = RCAR_GP_PIN(2, 11),      /* DU0_DG3 */
+               [12] = RCAR_GP_PIN(2, 12),      /* DU0_DG4 */
+               [13] = RCAR_GP_PIN(2, 13),      /* DU0_DG5 */
+               [14] = RCAR_GP_PIN(2, 14),      /* DU0_DG6 */
+               [15] = RCAR_GP_PIN(2, 15),      /* DU0_DG7 */
+               [16] = RCAR_GP_PIN(2, 16),      /* DU0_DB0 */
+               [17] = RCAR_GP_PIN(2, 17),      /* DU0_DB1 */
+               [18] = RCAR_GP_PIN(2, 18),      /* DU0_DB2 */
+               [19] = RCAR_GP_PIN(2, 19),      /* DU0_DB3 */
+               [20] = RCAR_GP_PIN(2, 20),      /* DU0_DB4 */
+               [21] = RCAR_GP_PIN(2, 21),      /* DU0_DB5 */
+               [22] = RCAR_GP_PIN(2, 22),      /* DU0_DB6 */
+               [23] = RCAR_GP_PIN(2, 23),      /* DU0_DB7 */
+               [24] = RCAR_GP_PIN(2, 24),      /* DU0_DOTCLKIN */
+               [25] = RCAR_GP_PIN(2, 25),      /* DU0_DOTCLKOUT0 */
+               [26] = RCAR_GP_PIN(2, 26),      /* DU0_DOTCLKOUT1 */
+               [27] = RCAR_GP_PIN(2, 27),      /* DU0_EXHSYNC/DU0_HSYNC */
+               [28] = RCAR_GP_PIN(2, 28),      /* DU0_EXVSYNC/DU0_VSYNC */
+               [29] = RCAR_GP_PIN(2, 29),      /* DU0_EXODDF/DU0_ODDF_DISP_CDE 
*/
+               [30] = RCAR_GP_PIN(2, 30),      /* DU0_DISP */
+               [31] = RCAR_GP_PIN(2, 31),      /* DU0_CDE */
+       } },
+       { PINMUX_BIAS_REG("PUPR3", 0xe606010c, "N/A", 0) {
+               [ 0] = RCAR_GP_PIN(3, 2),       /* VI0_DATA1_VI0_B1 */
+               [ 1] = RCAR_GP_PIN(3, 3),       /* VI0_DATA2_VI0_B2 */
+               [ 2] = RCAR_GP_PIN(3, 4),       /* VI0_DATA3_VI0_B3 */
+               [ 3] = RCAR_GP_PIN(3, 5),       /* VI0_DATA4_VI0_B4 */
+               [ 4] = RCAR_GP_PIN(3, 6),       /* VI0_DATA5_VI0_B5 */
+               [ 5] = RCAR_GP_PIN(3, 7),       /* VI0_DATA6_VI0_B6 */
+               [ 6] = RCAR_GP_PIN(3, 8),       /* VI0_DATA7_VI0_B7 */
+               [ 7] = RCAR_GP_PIN(3, 9),       /* VI0_CLKENB */
+               [ 8] = RCAR_GP_PIN(3, 10),      /* VI0_FIELD */
+               [ 9] = RCAR_GP_PIN(3, 11),      /* VI0_HSYNC# */
+               [10] = RCAR_GP_PIN(3, 12),      /* VI0_VSYNC# */
+               [11] = RCAR_GP_PIN(3, 13),      /* ETH_MDIO */
+               [12] = RCAR_GP_PIN(3, 14),      /* ETH_CRS_DV */
+               [13] = RCAR_GP_PIN(3, 15),      /* ETH_RX_ER */
+               [14] = RCAR_GP_PIN(3, 16),      /* ETH_RXD0 */
+               [15] = RCAR_GP_PIN(3, 17),      /* ETH_RXD1 */
+               [16] = RCAR_GP_PIN(3, 18),      /* ETH_LINK */
+               [17] = RCAR_GP_PIN(3, 19),      /* ETH_REF_CLK */
+               [18] = RCAR_GP_PIN(3, 20),      /* ETH_TXD1 */
+               [19] = RCAR_GP_PIN(3, 21),      /* ETH_TX_EN */
+               [20] = RCAR_GP_PIN(3, 22),      /* ETH_MAGIC */
+               [21] = RCAR_GP_PIN(3, 23),      /* ETH_TXD0 */
+               [22] = RCAR_GP_PIN(3, 24),      /* ETH_MDC */
+               [23] = RCAR_GP_PIN(3, 25),      /* HSCIF0_HRX */
+               [24] = RCAR_GP_PIN(3, 26),      /* HSCIF0_HTX */
+               [25] = RCAR_GP_PIN(3, 27),      /* HSCIF0_HCTS# */
+               [26] = RCAR_GP_PIN(3, 28),      /* HSCIF0_HRTS# */
+               [27] = RCAR_GP_PIN(3, 29),      /* HSCIF0_HSCK */
+               [28] = RCAR_GP_PIN(3, 30),      /* I2C0_SCL */
+               [29] = RCAR_GP_PIN(3, 31),      /* I2C0_SDA */
+               [30] = RCAR_GP_PIN(4, 0),       /* I2C1_SCL */
+               [31] = RCAR_GP_PIN(4, 1),       /* I2C1_SDA */
+       } },
+       { PINMUX_BIAS_REG("PUPR4", 0xe6060110, "N/A", 0) {
+               [ 0] = RCAR_GP_PIN(4, 2),       /* MSIOF0_RXD */
+               [ 1] = RCAR_GP_PIN(4, 3),       /* MSIOF0_TXD */
+               [ 2] = RCAR_GP_PIN(4, 4),       /* MSIOF0_SCK */
+               [ 3] = RCAR_GP_PIN(4, 5),       /* MSIOF0_SYNC */
+               [ 4] = RCAR_GP_PIN(4, 6),       /* MSIOF0_SS1 */
+               [ 5] = RCAR_GP_PIN(4, 7),       /* MSIOF0_SS2 */
+               [ 6] = RCAR_GP_PIN(4, 8),       /* HSCIF1_HRX */
+               [ 7] = RCAR_GP_PIN(4, 9),       /* HSCIF1_HTX */
+               [ 8] = RCAR_GP_PIN(4, 10),      /* HSCIF1_HSCK */
+               [ 9] = RCAR_GP_PIN(4, 11),      /* HSCIF1_HCTS# */
+               [10] = RCAR_GP_PIN(4, 12),      /* HSCIF1_HRTS# */
+               [11] = RCAR_GP_PIN(4, 13),      /* SCIF1_SCK */
+               [12] = RCAR_GP_PIN(4, 14),      /* SCIF1_RXD */
+               [13] = RCAR_GP_PIN(4, 15),      /* SCIF1_TXD */
+               [14] = RCAR_GP_PIN(4, 16),      /* SCIF2_RXD */
+               [15] = RCAR_GP_PIN(4, 17),      /* SCIF2_TXD */
+               [16] = RCAR_GP_PIN(4, 18),      /* SCIF2_SCK */
+               [17] = RCAR_GP_PIN(4, 19),      /* SCIF3_SCK */
+               [18] = RCAR_GP_PIN(4, 20),      /* SCIF3_RXD */
+               [19] = RCAR_GP_PIN(4, 21),      /* SCIF3_TXD */
+               [20] = RCAR_GP_PIN(4, 22),      /* I2C2_SCL */
+               [21] = RCAR_GP_PIN(4, 23),      /* I2C2_SDA */
+               [22] = RCAR_GP_PIN(4, 24),      /* SSI_SCK5 */
+               [23] = RCAR_GP_PIN(4, 25),      /* SSI_WS5 */
+               [24] = RCAR_GP_PIN(4, 26),      /* SSI_SDATA5 */
+               [25] = RCAR_GP_PIN(4, 27),      /* SSI_SCK6 */
+               [26] = RCAR_GP_PIN(4, 28),      /* SSI_WS6 */
+               [27] = RCAR_GP_PIN(4, 29),      /* SSI_SDATA6 */
+               [28] = RCAR_GP_PIN(4, 30),      /* SSI_SCK78 */
+               [29] = RCAR_GP_PIN(4, 31),      /* SSI_WS78 */
+               [30] = RCAR_GP_PIN(5, 0),       /* SSI_SDATA7 */
+               [31] = RCAR_GP_PIN(5, 1),       /* SSI_SCK0129 */
+       } },
+       { PINMUX_BIAS_REG("PUPR5", 0xe6060114, "N/A", 0) {
+               [ 0] = RCAR_GP_PIN(5, 2),       /* SSI_WS0129 */
+               [ 1] = RCAR_GP_PIN(5, 3),       /* SSI_SDATA0 */
+               [ 2] = RCAR_GP_PIN(5, 4),       /* SSI_SCK34 */
+               [ 3] = RCAR_GP_PIN(5, 5),       /* SSI_WS34 */
+               [ 4] = RCAR_GP_PIN(5, 6),       /* SSI_SDATA3 */
+               [ 5] = SH_PFC_PIN_NONE,
+               [ 6] = SH_PFC_PIN_NONE,
+               [ 7] = SH_PFC_PIN_NONE,
+               [ 8] = RCAR_GP_PIN(5, 10),      /* SSI_SDATA8 */
+               [ 9] = RCAR_GP_PIN(5, 11),      /* SSI_SCK1 */
+               [10] = RCAR_GP_PIN(5, 12),      /* SSI_WS1 */
+               [11] = RCAR_GP_PIN(5, 13),      /* SSI_SDATA1 */
+               [12] = RCAR_GP_PIN(5, 14),      /* SSI_SCK2 */
+               [13] = RCAR_GP_PIN(5, 15),      /* SSI_WS2 */
+               [14] = RCAR_GP_PIN(5, 16),      /* SSI_SDATA2 */
+               [15] = RCAR_GP_PIN(5, 17),      /* SSI_SCK9 */
+               [16] = RCAR_GP_PIN(5, 18),      /* SSI_WS9 */
+               [17] = RCAR_GP_PIN(5, 19),      /* SSI_SDATA9 */
+               [18] = RCAR_GP_PIN(5, 20),      /* AUDIO_CLKA */
+               [19] = RCAR_GP_PIN(5, 21),      /* AUDIO_CLKB */
+               [20] = RCAR_GP_PIN(5, 22),      /* AUDIO_CLKC */
+               [21] = RCAR_GP_PIN(5, 23),      /* AUDIO_CLKOUT */
+               [22] = RCAR_GP_PIN(3, 0),       /* VI0_CLK */
+               [23] = RCAR_GP_PIN(3, 1),       /* VI0_DATA0_VI0_B0 */
+               [24] = SH_PFC_PIN_NONE,
+               [25] = SH_PFC_PIN_NONE,
+               [26] = SH_PFC_PIN_NONE,
+               [27] = SH_PFC_PIN_NONE,
+               [28] = SH_PFC_PIN_NONE,
+               [29] = SH_PFC_PIN_NONE,
+               [30] = SH_PFC_PIN_NONE,
+               [31] = SH_PFC_PIN_NONE,
+       } },
+       { PINMUX_BIAS_REG("PUPR6", 0xe6060118, "N/A", 0) {
+               [ 0] = RCAR_GP_PIN(6, 1),       /* SD0_CMD */
+               [ 1] = RCAR_GP_PIN(6, 2),       /* SD0_DATA0 */
+               [ 2] = RCAR_GP_PIN(6, 3),       /* SD0_DATA1 */
+               [ 3] = RCAR_GP_PIN(6, 4),       /* SD0_DATA2 */
+               [ 4] = RCAR_GP_PIN(6, 5),       /* SD0_DATA3 */
+               [ 5] = RCAR_GP_PIN(6, 6),       /* SD0_CD */
+               [ 6] = RCAR_GP_PIN(6, 7),       /* SD0_WP */
+               [ 7] = RCAR_GP_PIN(6, 9),       /* SD1_CMD */
+               [ 8] = RCAR_GP_PIN(6, 10),      /* SD1_DATA0 */
+               [ 9] = RCAR_GP_PIN(6, 11),      /* SD1_DATA1 */
+               [10] = RCAR_GP_PIN(6, 12),      /* SD1_DATA2 */
+               [11] = RCAR_GP_PIN(6, 13),      /* SD1_DATA3 */
+               [12] = RCAR_GP_PIN(6, 14),      /* SD1_CD */
+               [13] = RCAR_GP_PIN(6, 15),      /* SD1_WP */
+               [14] = SH_PFC_PIN_NONE,
+               [15] = RCAR_GP_PIN(6, 17),      /* MMC_CMD */
+               [16] = RCAR_GP_PIN(6, 18),      /* MMC_D0 */
+               [17] = RCAR_GP_PIN(6, 19),      /* MMC_D1 */
+               [18] = RCAR_GP_PIN(6, 20),      /* MMC_D2 */
+               [19] = RCAR_GP_PIN(6, 21),      /* MMC_D3 */
+               [20] = RCAR_GP_PIN(6, 22),      /* MMC_D4 */
+               [21] = RCAR_GP_PIN(6, 23),      /* MMC_D5 */
+               [22] = RCAR_GP_PIN(6, 24),      /* MMC_D6 */
+               [23] = RCAR_GP_PIN(6, 25),      /* MMC_D7 */
+               [24] = SH_PFC_PIN_NONE,
+               [25] = SH_PFC_PIN_NONE,
+               [26] = SH_PFC_PIN_NONE,
+               [27] = SH_PFC_PIN_NONE,
+               [28] = SH_PFC_PIN_NONE,
+               [29] = SH_PFC_PIN_NONE,
+               [30] = SH_PFC_PIN_NONE,
+               [31] = SH_PFC_PIN_NONE,
+       } },
+       { /* sentinel */ }
+};
+
 static int r8a7794_pinmux_soc_init(struct sh_pfc *pfc)
 {
        /* Initialize TDSEL on old revisions */
@@ -5591,15 +5826,17 @@ static int r8a7794_pinmux_soc_init(struct sh_pfc *pfc)
        return 0;
 }
 
-static const struct sh_pfc_soc_operations r8a7794_pinmux_ops = {
+static const struct sh_pfc_soc_operations r8a7794_pfc_ops = {
        .init = r8a7794_pinmux_soc_init,
        .pin_to_pocctrl = r8a7794_pin_to_pocctrl,
+       .get_bias = rcar_pinmux_get_bias,
+       .set_bias = rcar_pinmux_set_bias,
 };
 
 #ifdef CONFIG_PINCTRL_PFC_R8A7745
 const struct sh_pfc_soc_info r8a7745_pinmux_info = {
        .name = "r8a77450_pfc",
-       .ops = &r8a7794_pinmux_ops,
+       .ops = &r8a7794_pfc_ops,
        .unlock_reg = 0xe6060000, /* PMMR */
 
        .function = { PINMUX_FUNCTION_BEGIN, PINMUX_FUNCTION_END },
@@ -5612,6 +5849,7 @@ const struct sh_pfc_soc_info r8a7745_pinmux_info = {
        .nr_functions = ARRAY_SIZE(pinmux_functions),
 
        .cfg_regs = pinmux_config_regs,
+       .bias_regs = pinmux_bias_regs,
 
        .pinmux_data = pinmux_data,
        .pinmux_data_size = ARRAY_SIZE(pinmux_data),
@@ -5621,7 +5859,7 @@ const struct sh_pfc_soc_info r8a7745_pinmux_info = {
 #ifdef CONFIG_PINCTRL_PFC_R8A7794
 const struct sh_pfc_soc_info r8a7794_pinmux_info = {
        .name = "r8a77940_pfc",
-       .ops = &r8a7794_pinmux_ops,
+       .ops = &r8a7794_pfc_ops,
        .unlock_reg = 0xe6060000, /* PMMR */
 
        .function = { PINMUX_FUNCTION_BEGIN, PINMUX_FUNCTION_END },
@@ -5634,6 +5872,7 @@ const struct sh_pfc_soc_info r8a7794_pinmux_info = {
        .nr_functions = ARRAY_SIZE(pinmux_functions),
 
        .cfg_regs = pinmux_config_regs,
+       .bias_regs = pinmux_bias_regs,
 
        .pinmux_data = pinmux_data,
        .pinmux_data_size = ARRAY_SIZE(pinmux_data),
-- 
2.39.0


Reply via email to