162306a36Sopenharmony_ci// SPDX-License-Identifier: GPL-2.0
262306a36Sopenharmony_ci/*
362306a36Sopenharmony_ci * R8A779F0 processor support - PFC hardware block.
462306a36Sopenharmony_ci *
562306a36Sopenharmony_ci * Copyright (C) 2021 Renesas Electronics Corp.
662306a36Sopenharmony_ci *
762306a36Sopenharmony_ci * This file is based on the drivers/pinctrl/renesas/pfc-r8a779a0.c
862306a36Sopenharmony_ci */
962306a36Sopenharmony_ci
1062306a36Sopenharmony_ci#include <linux/errno.h>
1162306a36Sopenharmony_ci#include <linux/io.h>
1262306a36Sopenharmony_ci#include <linux/kernel.h>
1362306a36Sopenharmony_ci
1462306a36Sopenharmony_ci#include "sh_pfc.h"
1562306a36Sopenharmony_ci
1662306a36Sopenharmony_ci#define CFG_FLAGS (SH_PFC_PIN_CFG_DRIVE_STRENGTH | SH_PFC_PIN_CFG_PULL_UP_DOWN)
1762306a36Sopenharmony_ci
1862306a36Sopenharmony_ci#define CPU_ALL_GP(fn, sfx)	\
1962306a36Sopenharmony_ci	PORT_GP_CFG_21(0, fn, sfx, CFG_FLAGS | SH_PFC_PIN_CFG_IO_VOLTAGE_18_33),	\
2062306a36Sopenharmony_ci	PORT_GP_CFG_25(1, fn, sfx, CFG_FLAGS | SH_PFC_PIN_CFG_IO_VOLTAGE_18_33),	\
2162306a36Sopenharmony_ci	PORT_GP_CFG_17(2, fn, sfx, CFG_FLAGS),	\
2262306a36Sopenharmony_ci	PORT_GP_CFG_19(3, fn, sfx, CFG_FLAGS | SH_PFC_PIN_CFG_IO_VOLTAGE_18_33)
2362306a36Sopenharmony_ci
2462306a36Sopenharmony_ci#define CPU_ALL_NOGP(fn)								\
2562306a36Sopenharmony_ci	PIN_NOGP_CFG(PRESETOUT0_N, "PRESETOUT0#", fn, SH_PFC_PIN_CFG_PULL_DOWN),	\
2662306a36Sopenharmony_ci	PIN_NOGP_CFG(EXTALR, "EXTALR", fn, SH_PFC_PIN_CFG_PULL_UP_DOWN)
2762306a36Sopenharmony_ci
2862306a36Sopenharmony_ci/*
2962306a36Sopenharmony_ci * F_() : just information
3062306a36Sopenharmony_ci * FM() : macro for FN_xxx / xxx_MARK
3162306a36Sopenharmony_ci */
3262306a36Sopenharmony_ci
3362306a36Sopenharmony_ci/* GPSR0 */
3462306a36Sopenharmony_ci#define GPSR0_20	F_(IRQ3,	IP2SR0_19_16)
3562306a36Sopenharmony_ci#define GPSR0_19	F_(IRQ2,	IP2SR0_15_12)
3662306a36Sopenharmony_ci#define GPSR0_18	F_(IRQ1,	IP2SR0_11_8)
3762306a36Sopenharmony_ci#define GPSR0_17	F_(IRQ0,	IP2SR0_7_4)
3862306a36Sopenharmony_ci#define GPSR0_16	F_(MSIOF0_SS2,	IP2SR0_3_0)
3962306a36Sopenharmony_ci#define GPSR0_15	F_(MSIOF0_SS1,	IP1SR0_31_28)
4062306a36Sopenharmony_ci#define GPSR0_14	F_(MSIOF0_SCK,	IP1SR0_27_24)
4162306a36Sopenharmony_ci#define GPSR0_13	F_(MSIOF0_TXD,	IP1SR0_23_20)
4262306a36Sopenharmony_ci#define GPSR0_12	F_(MSIOF0_RXD,	IP1SR0_19_16)
4362306a36Sopenharmony_ci#define GPSR0_11	F_(MSIOF0_SYNC,	IP1SR0_15_12)
4462306a36Sopenharmony_ci#define GPSR0_10	F_(CTS0_N,	IP1SR0_11_8)
4562306a36Sopenharmony_ci#define GPSR0_9		F_(RTS0_N,	IP1SR0_7_4)
4662306a36Sopenharmony_ci#define GPSR0_8		F_(SCK0,	IP1SR0_3_0)
4762306a36Sopenharmony_ci#define GPSR0_7		F_(TX0,		IP0SR0_31_28)
4862306a36Sopenharmony_ci#define GPSR0_6		F_(RX0,		IP0SR0_27_24)
4962306a36Sopenharmony_ci#define GPSR0_5		F_(HRTS0_N,	IP0SR0_23_20)
5062306a36Sopenharmony_ci#define GPSR0_4		F_(HCTS0_N,	IP0SR0_19_16)
5162306a36Sopenharmony_ci#define GPSR0_3		F_(HTX0,	IP0SR0_15_12)
5262306a36Sopenharmony_ci#define GPSR0_2		F_(HRX0,	IP0SR0_11_8)
5362306a36Sopenharmony_ci#define GPSR0_1		F_(HSCK0,	IP0SR0_7_4)
5462306a36Sopenharmony_ci#define GPSR0_0		F_(SCIF_CLK,	IP0SR0_3_0)
5562306a36Sopenharmony_ci
5662306a36Sopenharmony_ci/* GPSR1 */
5762306a36Sopenharmony_ci#define GPSR1_24	FM(SD_WP)
5862306a36Sopenharmony_ci#define GPSR1_23	FM(SD_CD)
5962306a36Sopenharmony_ci#define GPSR1_22	FM(MMC_SD_CMD)
6062306a36Sopenharmony_ci#define GPSR1_21	FM(MMC_D7)
6162306a36Sopenharmony_ci#define GPSR1_20	FM(MMC_DS)
6262306a36Sopenharmony_ci#define GPSR1_19	FM(MMC_D6)
6362306a36Sopenharmony_ci#define GPSR1_18	FM(MMC_D4)
6462306a36Sopenharmony_ci#define GPSR1_17	FM(MMC_D5)
6562306a36Sopenharmony_ci#define GPSR1_16	FM(MMC_SD_D3)
6662306a36Sopenharmony_ci#define GPSR1_15	FM(MMC_SD_D2)
6762306a36Sopenharmony_ci#define GPSR1_14	FM(MMC_SD_D1)
6862306a36Sopenharmony_ci#define GPSR1_13	FM(MMC_SD_D0)
6962306a36Sopenharmony_ci#define GPSR1_12	FM(MMC_SD_CLK)
7062306a36Sopenharmony_ci#define GPSR1_11	FM(GP1_11)
7162306a36Sopenharmony_ci#define GPSR1_10	FM(GP1_10)
7262306a36Sopenharmony_ci#define GPSR1_9		FM(GP1_09)
7362306a36Sopenharmony_ci#define GPSR1_8		FM(GP1_08)
7462306a36Sopenharmony_ci#define GPSR1_7		F_(GP1_07,	IP0SR1_31_28)
7562306a36Sopenharmony_ci#define GPSR1_6		F_(GP1_06,	IP0SR1_27_24)
7662306a36Sopenharmony_ci#define GPSR1_5		F_(GP1_05,	IP0SR1_23_20)
7762306a36Sopenharmony_ci#define GPSR1_4		F_(GP1_04,	IP0SR1_19_16)
7862306a36Sopenharmony_ci#define GPSR1_3		F_(GP1_03,	IP0SR1_15_12)
7962306a36Sopenharmony_ci#define GPSR1_2		F_(GP1_02,	IP0SR1_11_8)
8062306a36Sopenharmony_ci#define GPSR1_1		F_(GP1_01,	IP0SR1_7_4)
8162306a36Sopenharmony_ci#define GPSR1_0		F_(GP1_00,	IP0SR1_3_0)
8262306a36Sopenharmony_ci
8362306a36Sopenharmony_ci/* GPSR2 */
8462306a36Sopenharmony_ci#define GPSR2_16	FM(PCIE1_CLKREQ_N)
8562306a36Sopenharmony_ci#define GPSR2_15	FM(PCIE0_CLKREQ_N)
8662306a36Sopenharmony_ci#define GPSR2_14	FM(QSPI0_IO3)
8762306a36Sopenharmony_ci#define GPSR2_13	FM(QSPI0_SSL)
8862306a36Sopenharmony_ci#define GPSR2_12	FM(QSPI0_MISO_IO1)
8962306a36Sopenharmony_ci#define GPSR2_11	FM(QSPI0_IO2)
9062306a36Sopenharmony_ci#define GPSR2_10	FM(QSPI0_SPCLK)
9162306a36Sopenharmony_ci#define GPSR2_9		FM(QSPI0_MOSI_IO0)
9262306a36Sopenharmony_ci#define GPSR2_8		FM(QSPI1_SPCLK)
9362306a36Sopenharmony_ci#define GPSR2_7		FM(QSPI1_MOSI_IO0)
9462306a36Sopenharmony_ci#define GPSR2_6		FM(QSPI1_IO2)
9562306a36Sopenharmony_ci#define GPSR2_5		FM(QSPI1_MISO_IO1)
9662306a36Sopenharmony_ci#define GPSR2_4		FM(QSPI1_IO3)
9762306a36Sopenharmony_ci#define GPSR2_3		FM(QSPI1_SSL)
9862306a36Sopenharmony_ci#define GPSR2_2		FM(RPC_RESET_N)
9962306a36Sopenharmony_ci#define GPSR2_1		FM(RPC_WP_N)
10062306a36Sopenharmony_ci#define GPSR2_0		FM(RPC_INT_N)
10162306a36Sopenharmony_ci
10262306a36Sopenharmony_ci/* GPSR3 */
10362306a36Sopenharmony_ci#define GPSR3_18	FM(TSN0_AVTP_CAPTURE_B)
10462306a36Sopenharmony_ci#define GPSR3_17	FM(TSN0_AVTP_MATCH_B)
10562306a36Sopenharmony_ci#define GPSR3_16	FM(TSN0_AVTP_PPS)
10662306a36Sopenharmony_ci#define GPSR3_15	FM(TSN1_AVTP_CAPTURE_B)
10762306a36Sopenharmony_ci#define GPSR3_14	FM(TSN1_AVTP_MATCH_B)
10862306a36Sopenharmony_ci#define GPSR3_13	FM(TSN1_AVTP_PPS)
10962306a36Sopenharmony_ci#define GPSR3_12	FM(TSN0_MAGIC_B)
11062306a36Sopenharmony_ci#define GPSR3_11	FM(TSN1_PHY_INT_B)
11162306a36Sopenharmony_ci#define GPSR3_10	FM(TSN0_PHY_INT_B)
11262306a36Sopenharmony_ci#define GPSR3_9		FM(TSN2_PHY_INT_B)
11362306a36Sopenharmony_ci#define GPSR3_8		FM(TSN0_LINK_B)
11462306a36Sopenharmony_ci#define GPSR3_7		FM(TSN2_LINK_B)
11562306a36Sopenharmony_ci#define GPSR3_6		FM(TSN1_LINK_B)
11662306a36Sopenharmony_ci#define GPSR3_5		FM(TSN1_MDC_B)
11762306a36Sopenharmony_ci#define GPSR3_4		FM(TSN0_MDC_B)
11862306a36Sopenharmony_ci#define GPSR3_3		FM(TSN2_MDC_B)
11962306a36Sopenharmony_ci#define GPSR3_2		FM(TSN0_MDIO_B)
12062306a36Sopenharmony_ci#define GPSR3_1		FM(TSN2_MDIO_B)
12162306a36Sopenharmony_ci#define GPSR3_0		FM(TSN1_MDIO_B)
12262306a36Sopenharmony_ci
12362306a36Sopenharmony_ci/* IP0SR0 */		/* 0 */			/* 1 */			/* 2 */			/* 3 */			/* 4 */		/* 5 */			/* 6 */			/* 7 - F */
12462306a36Sopenharmony_ci#define IP0SR0_3_0	FM(SCIF_CLK)		F_(0, 0)		F_(0, 0)		F_(0, 0)		F_(0, 0)	F_(0, 0)		F_(0, 0)		F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0)
12562306a36Sopenharmony_ci#define IP0SR0_7_4	FM(HSCK0)		FM(SCK3)		FM(MSIOF3_SCK)		F_(0, 0)		F_(0, 0)	FM(TSN0_AVTP_CAPTURE_A)	F_(0, 0)		F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0)
12662306a36Sopenharmony_ci#define IP0SR0_11_8	FM(HRX0)		FM(RX3)			FM(MSIOF3_RXD)		F_(0, 0)		F_(0, 0)	FM(TSN0_AVTP_MATCH_A)	F_(0, 0)		F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0)
12762306a36Sopenharmony_ci#define IP0SR0_15_12	FM(HTX0)		FM(TX3)			FM(MSIOF3_TXD)		F_(0, 0)		F_(0, 0)	F_(0, 0)		F_(0, 0)		F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0)
12862306a36Sopenharmony_ci#define IP0SR0_19_16	FM(HCTS0_N)		FM(CTS3_N)		FM(MSIOF3_SS1)		F_(0, 0)		F_(0, 0)	FM(TSN0_MDC_A)		F_(0, 0)		F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0)
12962306a36Sopenharmony_ci#define IP0SR0_23_20	FM(HRTS0_N)		FM(RTS3_N)		FM(MSIOF3_SS2)		F_(0, 0)		F_(0, 0)	FM(TSN0_MDIO_A)		F_(0, 0)		F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0)
13062306a36Sopenharmony_ci#define IP0SR0_27_24	FM(RX0)			FM(HRX1)		F_(0, 0)		FM(MSIOF1_RXD)		F_(0, 0)	FM(TSN1_AVTP_MATCH_A)	F_(0, 0)		F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0)
13162306a36Sopenharmony_ci#define IP0SR0_31_28	FM(TX0)			FM(HTX1)		F_(0, 0)		FM(MSIOF1_TXD)		F_(0, 0)	FM(TSN1_AVTP_CAPTURE_A)	F_(0, 0)		F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0)
13262306a36Sopenharmony_ci/* IP1SR0 */		/* 0 */			/* 1 */			/* 2 */			/* 3 */			/* 4 */		/* 5 */			/* 6 */			/* 7 - F */
13362306a36Sopenharmony_ci#define IP1SR0_3_0	FM(SCK0)		FM(HSCK1)		F_(0, 0)		FM(MSIOF1_SCK)		F_(0, 0)	F_(0, 0)		F_(0, 0)		F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0)
13462306a36Sopenharmony_ci#define IP1SR0_7_4	FM(RTS0_N)		FM(HRTS1_N)		FM(MSIOF3_SYNC)		F_(0, 0)		F_(0, 0)	FM(TSN1_MDIO_A)		F_(0, 0)		F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0)
13562306a36Sopenharmony_ci#define IP1SR0_11_8	FM(CTS0_N)		FM(HCTS1_N)		F_(0, 0)		FM(MSIOF1_SYNC)		F_(0, 0)	FM(TSN1_MDC_A)		F_(0, 0)		F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0)
13662306a36Sopenharmony_ci#define IP1SR0_15_12	FM(MSIOF0_SYNC)		FM(HCTS3_N)		FM(CTS1_N)		FM(IRQ4)		F_(0, 0)	FM(TSN0_LINK_A)		F_(0, 0)		F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0)
13762306a36Sopenharmony_ci#define IP1SR0_19_16	FM(MSIOF0_RXD)		FM(HRX3)		FM(RX1)			F_(0, 0)		F_(0, 0)	F_(0, 0)		F_(0, 0)		F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0)
13862306a36Sopenharmony_ci#define IP1SR0_23_20	FM(MSIOF0_TXD)		FM(HTX3)		FM(TX1)			F_(0, 0)		F_(0, 0)	F_(0, 0)		F_(0, 0)		F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0)
13962306a36Sopenharmony_ci#define IP1SR0_27_24	FM(MSIOF0_SCK)		FM(HSCK3)		FM(SCK1)		F_(0, 0)		F_(0, 0)	F_(0, 0)		F_(0, 0)		F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0)
14062306a36Sopenharmony_ci#define IP1SR0_31_28	FM(MSIOF0_SS1)		FM(HRTS3_N)		FM(RTS1_N)		FM(IRQ5)		F_(0, 0)	FM(TSN1_LINK_A)		F_(0, 0)		F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0)
14162306a36Sopenharmony_ci/* IP2SR0 */		/* 0 */			/* 1 */			/* 2 */			/* 3 */			/* 4 */		/* 5 */			/* 6 */			/* 7 - F */
14262306a36Sopenharmony_ci#define IP2SR0_3_0	FM(MSIOF0_SS2)		F_(0, 0)		F_(0, 0)		F_(0, 0)		F_(0, 0)	FM(TSN2_LINK_A)		F_(0, 0)		F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0)
14362306a36Sopenharmony_ci#define IP2SR0_7_4	FM(IRQ0)		F_(0, 0)		F_(0, 0)		FM(MSIOF1_SS1)		F_(0, 0)	FM(TSN0_MAGIC_A)	F_(0, 0)		F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0)
14462306a36Sopenharmony_ci#define IP2SR0_11_8	FM(IRQ1)		F_(0, 0)		F_(0, 0)		FM(MSIOF1_SS2)		F_(0, 0)	FM(TSN0_PHY_INT_A)	F_(0, 0)		F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0)
14562306a36Sopenharmony_ci#define IP2SR0_15_12	FM(IRQ2)		F_(0, 0)		F_(0, 0)		F_(0, 0)		F_(0, 0)	FM(TSN1_PHY_INT_A)	F_(0, 0)		F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0)
14662306a36Sopenharmony_ci#define IP2SR0_19_16	FM(IRQ3)		F_(0, 0)		F_(0, 0)		F_(0, 0)		F_(0, 0)	FM(TSN2_PHY_INT_A)	F_(0, 0)		F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0)
14762306a36Sopenharmony_ci
14862306a36Sopenharmony_ci/* IP0SR1 */		/* 0 */			/* 1 */			/* 2 */			/* 3 */			/* 4 */		/* 5 */			/* 6 */			/* 7 - F */
14962306a36Sopenharmony_ci#define IP0SR1_3_0	FM(GP1_00)		FM(TCLK1)		FM(HSCK2)		F_(0, 0)		F_(0, 0)	F_(0, 0)		F_(0, 0)		F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0)
15062306a36Sopenharmony_ci#define IP0SR1_7_4	FM(GP1_01)		FM(TCLK4)		FM(HRX2)		F_(0, 0)		F_(0, 0)	F_(0, 0)		F_(0, 0)		F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0)
15162306a36Sopenharmony_ci#define IP0SR1_11_8	FM(GP1_02)		F_(0, 0)		FM(HTX2)		FM(MSIOF2_SS1)		F_(0, 0)	FM(TSN2_MDC_A)		F_(0, 0)		F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0)
15262306a36Sopenharmony_ci#define IP0SR1_15_12	FM(GP1_03)		FM(TCLK2)		FM(HCTS2_N)		FM(MSIOF2_SS2)		FM(CTS4_N)	FM(TSN2_MDIO_A)		F_(0, 0)		F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0)
15362306a36Sopenharmony_ci#define IP0SR1_19_16	FM(GP1_04)		FM(TCLK3)		FM(HRTS2_N)		FM(MSIOF2_SYNC)		FM(RTS4_N)	F_(0, 0)		F_(0, 0)		F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0)
15462306a36Sopenharmony_ci#define IP0SR1_23_20	FM(GP1_05)		FM(MSIOF2_SCK)		FM(SCK4)		F_(0, 0)		F_(0, 0)	F_(0, 0)		F_(0, 0)		F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0)
15562306a36Sopenharmony_ci#define IP0SR1_27_24	FM(GP1_06)		FM(MSIOF2_RXD)		FM(RX4)			F_(0, 0)		F_(0, 0)	F_(0, 0)		F_(0, 0)		F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0)
15662306a36Sopenharmony_ci#define IP0SR1_31_28	FM(GP1_07)		FM(MSIOF2_TXD)		FM(TX4)			F_(0, 0)		F_(0, 0)	F_(0, 0)		F_(0, 0)		F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0)
15762306a36Sopenharmony_ci
15862306a36Sopenharmony_ci#define PINMUX_GPSR	\
15962306a36Sopenharmony_ci		GPSR1_24					\
16062306a36Sopenharmony_ci		GPSR1_23					\
16162306a36Sopenharmony_ci		GPSR1_22					\
16262306a36Sopenharmony_ci		GPSR1_21					\
16362306a36Sopenharmony_ciGPSR0_20	GPSR1_20					\
16462306a36Sopenharmony_ciGPSR0_19	GPSR1_19					\
16562306a36Sopenharmony_ciGPSR0_18	GPSR1_18			GPSR3_18	\
16662306a36Sopenharmony_ciGPSR0_17	GPSR1_17			GPSR3_17	\
16762306a36Sopenharmony_ciGPSR0_16	GPSR1_16	GPSR2_16	GPSR3_16	\
16862306a36Sopenharmony_ciGPSR0_15	GPSR1_15	GPSR2_15	GPSR3_15	\
16962306a36Sopenharmony_ciGPSR0_14	GPSR1_14	GPSR2_14	GPSR3_14	\
17062306a36Sopenharmony_ciGPSR0_13	GPSR1_13	GPSR2_13	GPSR3_13	\
17162306a36Sopenharmony_ciGPSR0_12	GPSR1_12	GPSR2_12	GPSR3_12	\
17262306a36Sopenharmony_ciGPSR0_11	GPSR1_11	GPSR2_11	GPSR3_11	\
17362306a36Sopenharmony_ciGPSR0_10	GPSR1_10	GPSR2_10	GPSR3_10	\
17462306a36Sopenharmony_ciGPSR0_9		GPSR1_9		GPSR2_9		GPSR3_9		\
17562306a36Sopenharmony_ciGPSR0_8		GPSR1_8		GPSR2_8		GPSR3_8		\
17662306a36Sopenharmony_ciGPSR0_7		GPSR1_7		GPSR2_7		GPSR3_7		\
17762306a36Sopenharmony_ciGPSR0_6		GPSR1_6		GPSR2_6		GPSR3_6		\
17862306a36Sopenharmony_ciGPSR0_5		GPSR1_5		GPSR2_5		GPSR3_5		\
17962306a36Sopenharmony_ciGPSR0_4		GPSR1_4		GPSR2_4		GPSR3_4		\
18062306a36Sopenharmony_ciGPSR0_3		GPSR1_3		GPSR2_3		GPSR3_3		\
18162306a36Sopenharmony_ciGPSR0_2		GPSR1_2		GPSR2_2		GPSR3_2		\
18262306a36Sopenharmony_ciGPSR0_1		GPSR1_1		GPSR2_1		GPSR3_1		\
18362306a36Sopenharmony_ciGPSR0_0		GPSR1_0		GPSR2_0		GPSR3_0
18462306a36Sopenharmony_ci
18562306a36Sopenharmony_ci#define PINMUX_IPSR	\
18662306a36Sopenharmony_ci\
18762306a36Sopenharmony_ciFM(IP0SR0_3_0)		IP0SR0_3_0	FM(IP1SR0_3_0)		IP1SR0_3_0	FM(IP2SR0_3_0)		IP2SR0_3_0	\
18862306a36Sopenharmony_ciFM(IP0SR0_7_4)		IP0SR0_7_4	FM(IP1SR0_7_4)		IP1SR0_7_4	FM(IP2SR0_7_4)		IP2SR0_7_4	\
18962306a36Sopenharmony_ciFM(IP0SR0_11_8)		IP0SR0_11_8	FM(IP1SR0_11_8)		IP1SR0_11_8	FM(IP2SR0_11_8)		IP2SR0_11_8	\
19062306a36Sopenharmony_ciFM(IP0SR0_15_12)	IP0SR0_15_12	FM(IP1SR0_15_12)	IP1SR0_15_12	FM(IP2SR0_15_12)	IP2SR0_15_12	\
19162306a36Sopenharmony_ciFM(IP0SR0_19_16)	IP0SR0_19_16	FM(IP1SR0_19_16)	IP1SR0_19_16	FM(IP2SR0_19_16)	IP2SR0_19_16	\
19262306a36Sopenharmony_ciFM(IP0SR0_23_20)	IP0SR0_23_20	FM(IP1SR0_23_20)	IP1SR0_23_20	\
19362306a36Sopenharmony_ciFM(IP0SR0_27_24)	IP0SR0_27_24	FM(IP1SR0_27_24)	IP1SR0_27_24	\
19462306a36Sopenharmony_ciFM(IP0SR0_31_28)	IP0SR0_31_28	FM(IP1SR0_31_28)	IP1SR0_31_28	\
19562306a36Sopenharmony_ci\
19662306a36Sopenharmony_ciFM(IP0SR1_3_0)		IP0SR1_3_0	\
19762306a36Sopenharmony_ciFM(IP0SR1_7_4)		IP0SR1_7_4	\
19862306a36Sopenharmony_ciFM(IP0SR1_11_8)		IP0SR1_11_8	\
19962306a36Sopenharmony_ciFM(IP0SR1_15_12)	IP0SR1_15_12	\
20062306a36Sopenharmony_ciFM(IP0SR1_19_16)	IP0SR1_19_16	\
20162306a36Sopenharmony_ciFM(IP0SR1_23_20)	IP0SR1_23_20	\
20262306a36Sopenharmony_ciFM(IP0SR1_27_24)	IP0SR1_27_24	\
20362306a36Sopenharmony_ciFM(IP0SR1_31_28)	IP0SR1_31_28
20462306a36Sopenharmony_ci
20562306a36Sopenharmony_ci/* MOD_SEL1 */			/* 0 */		/* 1 */		/* 2 */		/* 3 */
20662306a36Sopenharmony_ci#define MOD_SEL1_11_10		FM(SEL_I2C5_0)	F_(0, 0)	F_(0, 0)	FM(SEL_I2C5_3)
20762306a36Sopenharmony_ci#define MOD_SEL1_9_8		FM(SEL_I2C4_0)	F_(0, 0)	F_(0, 0)	FM(SEL_I2C4_3)
20862306a36Sopenharmony_ci#define MOD_SEL1_7_6		FM(SEL_I2C3_0)	F_(0, 0)	F_(0, 0)	FM(SEL_I2C3_3)
20962306a36Sopenharmony_ci#define MOD_SEL1_5_4		FM(SEL_I2C2_0)	F_(0, 0)	F_(0, 0)	FM(SEL_I2C2_3)
21062306a36Sopenharmony_ci#define MOD_SEL1_3_2		FM(SEL_I2C1_0)	F_(0, 0)	F_(0, 0)	FM(SEL_I2C1_3)
21162306a36Sopenharmony_ci#define MOD_SEL1_1_0		FM(SEL_I2C0_0)	F_(0, 0)	F_(0, 0)	FM(SEL_I2C0_3)
21262306a36Sopenharmony_ci
21362306a36Sopenharmony_ci#define PINMUX_MOD_SELS \
21462306a36Sopenharmony_ci\
21562306a36Sopenharmony_ciMOD_SEL1_11_10 \
21662306a36Sopenharmony_ciMOD_SEL1_9_8 \
21762306a36Sopenharmony_ciMOD_SEL1_7_6 \
21862306a36Sopenharmony_ciMOD_SEL1_5_4 \
21962306a36Sopenharmony_ciMOD_SEL1_3_2 \
22062306a36Sopenharmony_ciMOD_SEL1_1_0
22162306a36Sopenharmony_ci
22262306a36Sopenharmony_ci#define PINMUX_PHYS \
22362306a36Sopenharmony_ci	FM(SCL0) FM(SDA0) FM(SCL1) FM(SDA1) FM(SCL2) FM(SDA2) FM(SCL3) FM(SDA3) \
22462306a36Sopenharmony_ci	FM(SCL4) FM(SDA4) FM(SCL5) FM(SDA5)
22562306a36Sopenharmony_ci
22662306a36Sopenharmony_cienum {
22762306a36Sopenharmony_ci	PINMUX_RESERVED = 0,
22862306a36Sopenharmony_ci
22962306a36Sopenharmony_ci	PINMUX_DATA_BEGIN,
23062306a36Sopenharmony_ci	GP_ALL(DATA),
23162306a36Sopenharmony_ci	PINMUX_DATA_END,
23262306a36Sopenharmony_ci
23362306a36Sopenharmony_ci#define F_(x, y)
23462306a36Sopenharmony_ci#define FM(x)   FN_##x,
23562306a36Sopenharmony_ci	PINMUX_FUNCTION_BEGIN,
23662306a36Sopenharmony_ci	GP_ALL(FN),
23762306a36Sopenharmony_ci	PINMUX_GPSR
23862306a36Sopenharmony_ci	PINMUX_IPSR
23962306a36Sopenharmony_ci	PINMUX_MOD_SELS
24062306a36Sopenharmony_ci	PINMUX_FUNCTION_END,
24162306a36Sopenharmony_ci#undef F_
24262306a36Sopenharmony_ci#undef FM
24362306a36Sopenharmony_ci
24462306a36Sopenharmony_ci#define F_(x, y)
24562306a36Sopenharmony_ci#define FM(x)	x##_MARK,
24662306a36Sopenharmony_ci	PINMUX_MARK_BEGIN,
24762306a36Sopenharmony_ci	PINMUX_GPSR
24862306a36Sopenharmony_ci	PINMUX_IPSR
24962306a36Sopenharmony_ci	PINMUX_MOD_SELS
25062306a36Sopenharmony_ci	PINMUX_PHYS
25162306a36Sopenharmony_ci	PINMUX_MARK_END,
25262306a36Sopenharmony_ci#undef F_
25362306a36Sopenharmony_ci#undef FM
25462306a36Sopenharmony_ci};
25562306a36Sopenharmony_ci
25662306a36Sopenharmony_cistatic const u16 pinmux_data[] = {
25762306a36Sopenharmony_ci/* Using GP_1_[0-9] requires disabling I2C in MOD_SEL1 */
25862306a36Sopenharmony_ci#define GP_1_0_FN	GP_1_0_FN,	FN_SEL_I2C0_0
25962306a36Sopenharmony_ci#define GP_1_1_FN	GP_1_1_FN,	FN_SEL_I2C0_0
26062306a36Sopenharmony_ci#define GP_1_2_FN	GP_1_2_FN,	FN_SEL_I2C1_0
26162306a36Sopenharmony_ci#define GP_1_3_FN	GP_1_3_FN,	FN_SEL_I2C1_0
26262306a36Sopenharmony_ci#define GP_1_4_FN	GP_1_4_FN,	FN_SEL_I2C2_0
26362306a36Sopenharmony_ci#define GP_1_5_FN	GP_1_5_FN,	FN_SEL_I2C2_0
26462306a36Sopenharmony_ci#define GP_1_6_FN	GP_1_6_FN,	FN_SEL_I2C3_0
26562306a36Sopenharmony_ci#define GP_1_7_FN	GP_1_7_FN,	FN_SEL_I2C3_0
26662306a36Sopenharmony_ci#define GP_1_8_FN	GP_1_8_FN,	FN_SEL_I2C4_0
26762306a36Sopenharmony_ci#define GP_1_9_FN	GP_1_9_FN,	FN_SEL_I2C4_0
26862306a36Sopenharmony_ci	PINMUX_DATA_GP_ALL(),
26962306a36Sopenharmony_ci#undef GP_1_0_FN
27062306a36Sopenharmony_ci#undef GP_1_1_FN
27162306a36Sopenharmony_ci#undef GP_1_2_FN
27262306a36Sopenharmony_ci#undef GP_1_3_FN
27362306a36Sopenharmony_ci#undef GP_1_4_FN
27462306a36Sopenharmony_ci#undef GP_1_5_FN
27562306a36Sopenharmony_ci#undef GP_1_6_FN
27662306a36Sopenharmony_ci#undef GP_1_7_FN
27762306a36Sopenharmony_ci#undef GP_1_8_FN
27862306a36Sopenharmony_ci#undef GP_1_9_FN
27962306a36Sopenharmony_ci
28062306a36Sopenharmony_ci	PINMUX_SINGLE(SD_WP),
28162306a36Sopenharmony_ci	PINMUX_SINGLE(SD_CD),
28262306a36Sopenharmony_ci	PINMUX_SINGLE(MMC_SD_CMD),
28362306a36Sopenharmony_ci	PINMUX_SINGLE(MMC_D7),
28462306a36Sopenharmony_ci	PINMUX_SINGLE(MMC_DS),
28562306a36Sopenharmony_ci	PINMUX_SINGLE(MMC_D6),
28662306a36Sopenharmony_ci	PINMUX_SINGLE(MMC_D4),
28762306a36Sopenharmony_ci	PINMUX_SINGLE(MMC_D5),
28862306a36Sopenharmony_ci	PINMUX_SINGLE(MMC_SD_D3),
28962306a36Sopenharmony_ci	PINMUX_SINGLE(MMC_SD_D2),
29062306a36Sopenharmony_ci	PINMUX_SINGLE(MMC_SD_D1),
29162306a36Sopenharmony_ci	PINMUX_SINGLE(MMC_SD_D0),
29262306a36Sopenharmony_ci	PINMUX_SINGLE(MMC_SD_CLK),
29362306a36Sopenharmony_ci	PINMUX_SINGLE(PCIE1_CLKREQ_N),
29462306a36Sopenharmony_ci	PINMUX_SINGLE(PCIE0_CLKREQ_N),
29562306a36Sopenharmony_ci	PINMUX_SINGLE(QSPI0_IO3),
29662306a36Sopenharmony_ci	PINMUX_SINGLE(QSPI0_SSL),
29762306a36Sopenharmony_ci	PINMUX_SINGLE(QSPI0_MISO_IO1),
29862306a36Sopenharmony_ci	PINMUX_SINGLE(QSPI0_IO2),
29962306a36Sopenharmony_ci	PINMUX_SINGLE(QSPI0_SPCLK),
30062306a36Sopenharmony_ci	PINMUX_SINGLE(QSPI0_MOSI_IO0),
30162306a36Sopenharmony_ci	PINMUX_SINGLE(QSPI1_SPCLK),
30262306a36Sopenharmony_ci	PINMUX_SINGLE(QSPI1_MOSI_IO0),
30362306a36Sopenharmony_ci	PINMUX_SINGLE(QSPI1_IO2),
30462306a36Sopenharmony_ci	PINMUX_SINGLE(QSPI1_MISO_IO1),
30562306a36Sopenharmony_ci	PINMUX_SINGLE(QSPI1_IO3),
30662306a36Sopenharmony_ci	PINMUX_SINGLE(QSPI1_SSL),
30762306a36Sopenharmony_ci	PINMUX_SINGLE(RPC_RESET_N),
30862306a36Sopenharmony_ci	PINMUX_SINGLE(RPC_WP_N),
30962306a36Sopenharmony_ci	PINMUX_SINGLE(RPC_INT_N),
31062306a36Sopenharmony_ci
31162306a36Sopenharmony_ci	PINMUX_SINGLE(TSN0_AVTP_CAPTURE_B),
31262306a36Sopenharmony_ci	PINMUX_SINGLE(TSN0_AVTP_MATCH_B),
31362306a36Sopenharmony_ci	PINMUX_SINGLE(TSN0_AVTP_PPS),
31462306a36Sopenharmony_ci	PINMUX_SINGLE(TSN1_AVTP_CAPTURE_B),
31562306a36Sopenharmony_ci	PINMUX_SINGLE(TSN1_AVTP_MATCH_B),
31662306a36Sopenharmony_ci	PINMUX_SINGLE(TSN1_AVTP_PPS),
31762306a36Sopenharmony_ci	PINMUX_SINGLE(TSN0_MAGIC_B),
31862306a36Sopenharmony_ci	PINMUX_SINGLE(TSN1_PHY_INT_B),
31962306a36Sopenharmony_ci	PINMUX_SINGLE(TSN0_PHY_INT_B),
32062306a36Sopenharmony_ci	PINMUX_SINGLE(TSN2_PHY_INT_B),
32162306a36Sopenharmony_ci	PINMUX_SINGLE(TSN0_LINK_B),
32262306a36Sopenharmony_ci	PINMUX_SINGLE(TSN2_LINK_B),
32362306a36Sopenharmony_ci	PINMUX_SINGLE(TSN1_LINK_B),
32462306a36Sopenharmony_ci	PINMUX_SINGLE(TSN1_MDC_B),
32562306a36Sopenharmony_ci	PINMUX_SINGLE(TSN0_MDC_B),
32662306a36Sopenharmony_ci	PINMUX_SINGLE(TSN2_MDC_B),
32762306a36Sopenharmony_ci	PINMUX_SINGLE(TSN0_MDIO_B),
32862306a36Sopenharmony_ci	PINMUX_SINGLE(TSN2_MDIO_B),
32962306a36Sopenharmony_ci	PINMUX_SINGLE(TSN1_MDIO_B),
33062306a36Sopenharmony_ci
33162306a36Sopenharmony_ci	/* IP0SR0 */
33262306a36Sopenharmony_ci	PINMUX_IPSR_GPSR(IP0SR0_3_0,	SCIF_CLK),
33362306a36Sopenharmony_ci
33462306a36Sopenharmony_ci	PINMUX_IPSR_GPSR(IP0SR0_7_4,	HSCK0),
33562306a36Sopenharmony_ci	PINMUX_IPSR_GPSR(IP0SR0_7_4,	SCK3),
33662306a36Sopenharmony_ci	PINMUX_IPSR_GPSR(IP0SR0_7_4,	MSIOF3_SCK),
33762306a36Sopenharmony_ci	PINMUX_IPSR_GPSR(IP0SR0_7_4,	TSN0_AVTP_CAPTURE_A),
33862306a36Sopenharmony_ci
33962306a36Sopenharmony_ci	PINMUX_IPSR_GPSR(IP0SR0_11_8,	HRX0),
34062306a36Sopenharmony_ci	PINMUX_IPSR_GPSR(IP0SR0_11_8,	RX3),
34162306a36Sopenharmony_ci	PINMUX_IPSR_GPSR(IP0SR0_11_8,	MSIOF3_RXD),
34262306a36Sopenharmony_ci	PINMUX_IPSR_GPSR(IP0SR0_11_8,	TSN0_AVTP_MATCH_A),
34362306a36Sopenharmony_ci
34462306a36Sopenharmony_ci	PINMUX_IPSR_GPSR(IP0SR0_15_12,	HTX0),
34562306a36Sopenharmony_ci	PINMUX_IPSR_GPSR(IP0SR0_15_12,	TX3),
34662306a36Sopenharmony_ci	PINMUX_IPSR_GPSR(IP0SR0_15_12,	MSIOF3_TXD),
34762306a36Sopenharmony_ci
34862306a36Sopenharmony_ci	PINMUX_IPSR_GPSR(IP0SR0_19_16,	HCTS0_N),
34962306a36Sopenharmony_ci	PINMUX_IPSR_GPSR(IP0SR0_19_16,	CTS3_N),
35062306a36Sopenharmony_ci	PINMUX_IPSR_GPSR(IP0SR0_19_16,	MSIOF3_SS1),
35162306a36Sopenharmony_ci	PINMUX_IPSR_GPSR(IP0SR0_19_16,	TSN0_MDC_A),
35262306a36Sopenharmony_ci
35362306a36Sopenharmony_ci	PINMUX_IPSR_GPSR(IP0SR0_23_20,	HRTS0_N),
35462306a36Sopenharmony_ci	PINMUX_IPSR_GPSR(IP0SR0_23_20,	RTS3_N),
35562306a36Sopenharmony_ci	PINMUX_IPSR_GPSR(IP0SR0_23_20,	MSIOF3_SS2),
35662306a36Sopenharmony_ci	PINMUX_IPSR_GPSR(IP0SR0_23_20,	TSN0_MDIO_A),
35762306a36Sopenharmony_ci
35862306a36Sopenharmony_ci	PINMUX_IPSR_GPSR(IP0SR0_27_24,	RX0),
35962306a36Sopenharmony_ci	PINMUX_IPSR_GPSR(IP0SR0_27_24,	HRX1),
36062306a36Sopenharmony_ci	PINMUX_IPSR_GPSR(IP0SR0_27_24,	MSIOF1_RXD),
36162306a36Sopenharmony_ci	PINMUX_IPSR_GPSR(IP0SR0_27_24,	TSN1_AVTP_MATCH_A),
36262306a36Sopenharmony_ci
36362306a36Sopenharmony_ci	PINMUX_IPSR_GPSR(IP0SR0_31_28,	TX0),
36462306a36Sopenharmony_ci	PINMUX_IPSR_GPSR(IP0SR0_31_28,	HTX1),
36562306a36Sopenharmony_ci	PINMUX_IPSR_GPSR(IP0SR0_31_28,	MSIOF1_TXD),
36662306a36Sopenharmony_ci	PINMUX_IPSR_GPSR(IP0SR0_31_28,	TSN1_AVTP_CAPTURE_A),
36762306a36Sopenharmony_ci
36862306a36Sopenharmony_ci	/* IP1SR0 */
36962306a36Sopenharmony_ci	PINMUX_IPSR_GPSR(IP1SR0_3_0,	SCK0),
37062306a36Sopenharmony_ci	PINMUX_IPSR_GPSR(IP1SR0_3_0,	HSCK1),
37162306a36Sopenharmony_ci	PINMUX_IPSR_GPSR(IP1SR0_3_0,	MSIOF1_SCK),
37262306a36Sopenharmony_ci
37362306a36Sopenharmony_ci	PINMUX_IPSR_GPSR(IP1SR0_7_4,	RTS0_N),
37462306a36Sopenharmony_ci	PINMUX_IPSR_GPSR(IP1SR0_7_4,	HRTS1_N),
37562306a36Sopenharmony_ci	PINMUX_IPSR_GPSR(IP1SR0_7_4,	MSIOF3_SYNC),
37662306a36Sopenharmony_ci	PINMUX_IPSR_GPSR(IP1SR0_7_4,	TSN1_MDIO_A),
37762306a36Sopenharmony_ci
37862306a36Sopenharmony_ci	PINMUX_IPSR_GPSR(IP1SR0_11_8,	CTS0_N),
37962306a36Sopenharmony_ci	PINMUX_IPSR_GPSR(IP1SR0_11_8,	HCTS1_N),
38062306a36Sopenharmony_ci	PINMUX_IPSR_GPSR(IP1SR0_11_8,	MSIOF1_SYNC),
38162306a36Sopenharmony_ci	PINMUX_IPSR_GPSR(IP1SR0_11_8,	TSN1_MDC_A),
38262306a36Sopenharmony_ci
38362306a36Sopenharmony_ci	PINMUX_IPSR_GPSR(IP1SR0_15_12,	MSIOF0_SYNC),
38462306a36Sopenharmony_ci	PINMUX_IPSR_GPSR(IP1SR0_15_12,	HCTS3_N),
38562306a36Sopenharmony_ci	PINMUX_IPSR_GPSR(IP1SR0_15_12,	CTS1_N),
38662306a36Sopenharmony_ci	PINMUX_IPSR_GPSR(IP1SR0_15_12,	IRQ4),
38762306a36Sopenharmony_ci	PINMUX_IPSR_GPSR(IP1SR0_15_12,	TSN0_LINK_A),
38862306a36Sopenharmony_ci
38962306a36Sopenharmony_ci	PINMUX_IPSR_GPSR(IP1SR0_19_16,	MSIOF0_RXD),
39062306a36Sopenharmony_ci	PINMUX_IPSR_GPSR(IP1SR0_19_16,	HRX3),
39162306a36Sopenharmony_ci	PINMUX_IPSR_GPSR(IP1SR0_19_16,	RX1),
39262306a36Sopenharmony_ci
39362306a36Sopenharmony_ci	PINMUX_IPSR_GPSR(IP1SR0_23_20,	MSIOF0_TXD),
39462306a36Sopenharmony_ci	PINMUX_IPSR_GPSR(IP1SR0_23_20,	HTX3),
39562306a36Sopenharmony_ci	PINMUX_IPSR_GPSR(IP1SR0_23_20,	TX1),
39662306a36Sopenharmony_ci
39762306a36Sopenharmony_ci	PINMUX_IPSR_GPSR(IP1SR0_27_24,	MSIOF0_SCK),
39862306a36Sopenharmony_ci	PINMUX_IPSR_GPSR(IP1SR0_27_24,	HSCK3),
39962306a36Sopenharmony_ci	PINMUX_IPSR_GPSR(IP1SR0_27_24,	SCK1),
40062306a36Sopenharmony_ci
40162306a36Sopenharmony_ci	PINMUX_IPSR_GPSR(IP1SR0_31_28,	MSIOF0_SS1),
40262306a36Sopenharmony_ci	PINMUX_IPSR_GPSR(IP1SR0_31_28,	HRTS3_N),
40362306a36Sopenharmony_ci	PINMUX_IPSR_GPSR(IP1SR0_31_28,	RTS1_N),
40462306a36Sopenharmony_ci	PINMUX_IPSR_GPSR(IP1SR0_31_28,	IRQ5),
40562306a36Sopenharmony_ci	PINMUX_IPSR_GPSR(IP1SR0_31_28,	TSN1_LINK_A),
40662306a36Sopenharmony_ci
40762306a36Sopenharmony_ci	/* IP2SR0 */
40862306a36Sopenharmony_ci	PINMUX_IPSR_GPSR(IP2SR0_3_0,	MSIOF0_SS2),
40962306a36Sopenharmony_ci	PINMUX_IPSR_GPSR(IP2SR0_3_0,	TSN2_LINK_A),
41062306a36Sopenharmony_ci
41162306a36Sopenharmony_ci	PINMUX_IPSR_GPSR(IP2SR0_7_4,	IRQ0),
41262306a36Sopenharmony_ci	PINMUX_IPSR_GPSR(IP2SR0_7_4,	MSIOF1_SS1),
41362306a36Sopenharmony_ci	PINMUX_IPSR_GPSR(IP2SR0_7_4,	TSN0_MAGIC_A),
41462306a36Sopenharmony_ci
41562306a36Sopenharmony_ci	PINMUX_IPSR_GPSR(IP2SR0_11_8,	IRQ1),
41662306a36Sopenharmony_ci	PINMUX_IPSR_GPSR(IP2SR0_11_8,	MSIOF1_SS2),
41762306a36Sopenharmony_ci	PINMUX_IPSR_GPSR(IP2SR0_11_8,	TSN0_PHY_INT_A),
41862306a36Sopenharmony_ci
41962306a36Sopenharmony_ci	PINMUX_IPSR_GPSR(IP2SR0_15_12,	IRQ2),
42062306a36Sopenharmony_ci	PINMUX_IPSR_GPSR(IP2SR0_15_12,	TSN1_PHY_INT_A),
42162306a36Sopenharmony_ci
42262306a36Sopenharmony_ci	PINMUX_IPSR_GPSR(IP2SR0_19_16,	IRQ3),
42362306a36Sopenharmony_ci	PINMUX_IPSR_GPSR(IP2SR0_19_16,	TSN2_PHY_INT_A),
42462306a36Sopenharmony_ci
42562306a36Sopenharmony_ci	/* IP0SR1 */
42662306a36Sopenharmony_ci	/* GP1_00 = SCL0 */
42762306a36Sopenharmony_ci	PINMUX_IPSR_MSEL(IP0SR1_3_0,	GP1_00,		SEL_I2C0_0),
42862306a36Sopenharmony_ci	PINMUX_IPSR_MSEL(IP0SR1_3_0,	TCLK1,		SEL_I2C0_0),
42962306a36Sopenharmony_ci	PINMUX_IPSR_MSEL(IP0SR1_3_0,	HSCK2,		SEL_I2C0_0),
43062306a36Sopenharmony_ci	PINMUX_IPSR_PHYS(IP0SR1_3_0,	SCL0,		SEL_I2C0_3),
43162306a36Sopenharmony_ci
43262306a36Sopenharmony_ci	/* GP1_01 = SDA0 */
43362306a36Sopenharmony_ci	PINMUX_IPSR_MSEL(IP0SR1_7_4,	GP1_01,		SEL_I2C0_0),
43462306a36Sopenharmony_ci	PINMUX_IPSR_MSEL(IP0SR1_7_4,	TCLK4,		SEL_I2C0_0),
43562306a36Sopenharmony_ci	PINMUX_IPSR_MSEL(IP0SR1_7_4,	HRX2,		SEL_I2C0_0),
43662306a36Sopenharmony_ci	PINMUX_IPSR_PHYS(IP0SR1_7_4,	SDA0,		SEL_I2C0_3),
43762306a36Sopenharmony_ci
43862306a36Sopenharmony_ci	/* GP1_02 = SCL1 */
43962306a36Sopenharmony_ci	PINMUX_IPSR_MSEL(IP0SR1_11_8,	GP1_02,		SEL_I2C1_0),
44062306a36Sopenharmony_ci	PINMUX_IPSR_MSEL(IP0SR1_11_8,	HTX2,		SEL_I2C1_0),
44162306a36Sopenharmony_ci	PINMUX_IPSR_MSEL(IP0SR1_11_8,	MSIOF2_SS1,	SEL_I2C1_0),
44262306a36Sopenharmony_ci	PINMUX_IPSR_MSEL(IP0SR1_11_8,	TSN2_MDC_A,	SEL_I2C1_0),
44362306a36Sopenharmony_ci	PINMUX_IPSR_PHYS(IP0SR1_11_8,	SCL1,		SEL_I2C1_3),
44462306a36Sopenharmony_ci
44562306a36Sopenharmony_ci	/* GP1_03 = SDA1 */
44662306a36Sopenharmony_ci	PINMUX_IPSR_MSEL(IP0SR1_15_12,	GP1_03,		SEL_I2C1_0),
44762306a36Sopenharmony_ci	PINMUX_IPSR_MSEL(IP0SR1_15_12,	TCLK2,		SEL_I2C1_0),
44862306a36Sopenharmony_ci	PINMUX_IPSR_MSEL(IP0SR1_15_12,	HCTS2_N,	SEL_I2C1_0),
44962306a36Sopenharmony_ci	PINMUX_IPSR_MSEL(IP0SR1_15_12,	MSIOF2_SS2,	SEL_I2C1_0),
45062306a36Sopenharmony_ci	PINMUX_IPSR_MSEL(IP0SR1_15_12,	CTS4_N,		SEL_I2C1_0),
45162306a36Sopenharmony_ci	PINMUX_IPSR_MSEL(IP0SR1_15_12,	TSN2_MDIO_A,	SEL_I2C1_0),
45262306a36Sopenharmony_ci	PINMUX_IPSR_PHYS(IP0SR1_15_12,	SDA1,		SEL_I2C1_3),
45362306a36Sopenharmony_ci
45462306a36Sopenharmony_ci	/* GP1_04 = SCL2 */
45562306a36Sopenharmony_ci	PINMUX_IPSR_MSEL(IP0SR1_19_16,	GP1_04,		SEL_I2C2_0),
45662306a36Sopenharmony_ci	PINMUX_IPSR_MSEL(IP0SR1_19_16,	TCLK3,		SEL_I2C2_0),
45762306a36Sopenharmony_ci	PINMUX_IPSR_MSEL(IP0SR1_19_16,	HRTS2_N,	SEL_I2C2_0),
45862306a36Sopenharmony_ci	PINMUX_IPSR_MSEL(IP0SR1_19_16,	MSIOF2_SYNC,	SEL_I2C2_0),
45962306a36Sopenharmony_ci	PINMUX_IPSR_MSEL(IP0SR1_19_16,	RTS4_N,		SEL_I2C2_0),
46062306a36Sopenharmony_ci	PINMUX_IPSR_PHYS(IP0SR1_19_16,	SCL2,		SEL_I2C2_3),
46162306a36Sopenharmony_ci
46262306a36Sopenharmony_ci	/* GP1_05 = SDA2 */
46362306a36Sopenharmony_ci	PINMUX_IPSR_MSEL(IP0SR1_23_20,	GP1_05,		SEL_I2C2_0),
46462306a36Sopenharmony_ci	PINMUX_IPSR_MSEL(IP0SR1_23_20,	MSIOF2_SCK,	SEL_I2C2_0),
46562306a36Sopenharmony_ci	PINMUX_IPSR_MSEL(IP0SR1_23_20,	SCK4,		SEL_I2C2_0),
46662306a36Sopenharmony_ci	PINMUX_IPSR_PHYS(IP0SR1_23_20,	SDA2,		SEL_I2C2_3),
46762306a36Sopenharmony_ci
46862306a36Sopenharmony_ci	/* GP1_06 = SCL3 */
46962306a36Sopenharmony_ci	PINMUX_IPSR_MSEL(IP0SR1_27_24,	GP1_06,		SEL_I2C3_0),
47062306a36Sopenharmony_ci	PINMUX_IPSR_MSEL(IP0SR1_27_24,	MSIOF2_RXD,	SEL_I2C3_0),
47162306a36Sopenharmony_ci	PINMUX_IPSR_MSEL(IP0SR1_27_24,	RX4,		SEL_I2C3_0),
47262306a36Sopenharmony_ci	PINMUX_IPSR_PHYS(IP0SR1_27_24,	SCL3,		SEL_I2C3_3),
47362306a36Sopenharmony_ci
47462306a36Sopenharmony_ci	/* GP1_07 = SDA3 */
47562306a36Sopenharmony_ci	PINMUX_IPSR_MSEL(IP0SR1_31_28,	GP1_07,		SEL_I2C3_0),
47662306a36Sopenharmony_ci	PINMUX_IPSR_MSEL(IP0SR1_31_28,	MSIOF2_TXD,	SEL_I2C3_0),
47762306a36Sopenharmony_ci	PINMUX_IPSR_MSEL(IP0SR1_31_28,	TX4,		SEL_I2C3_0),
47862306a36Sopenharmony_ci	PINMUX_IPSR_PHYS(IP0SR1_31_28,	SDA3,		SEL_I2C3_3),
47962306a36Sopenharmony_ci
48062306a36Sopenharmony_ci	/* GP1_08 = SCL4 */
48162306a36Sopenharmony_ci	PINMUX_IPSR_NOGM(0,		GP1_08,		SEL_I2C4_0),
48262306a36Sopenharmony_ci	PINMUX_IPSR_NOFN(GP1_08,	SCL4,		SEL_I2C4_3),
48362306a36Sopenharmony_ci
48462306a36Sopenharmony_ci	/* GP1_09 = SDA4 */
48562306a36Sopenharmony_ci	PINMUX_IPSR_NOGM(0,		GP1_09,		SEL_I2C4_0),
48662306a36Sopenharmony_ci	PINMUX_IPSR_NOFN(GP1_09,	SDA4,		SEL_I2C4_3),
48762306a36Sopenharmony_ci
48862306a36Sopenharmony_ci	/* GP1_10 = SCL5 */
48962306a36Sopenharmony_ci	PINMUX_IPSR_NOGM(0,		GP1_10,		SEL_I2C5_0),
49062306a36Sopenharmony_ci	PINMUX_IPSR_NOFN(GP1_10,	SCL5,		SEL_I2C5_3),
49162306a36Sopenharmony_ci
49262306a36Sopenharmony_ci	/* GP1_11 = SDA5 */
49362306a36Sopenharmony_ci	PINMUX_IPSR_NOGM(0,		GP1_11,		SEL_I2C5_0),
49462306a36Sopenharmony_ci	PINMUX_IPSR_NOFN(GP1_11,	SDA5,		SEL_I2C5_3),
49562306a36Sopenharmony_ci};
49662306a36Sopenharmony_ci
49762306a36Sopenharmony_ci/*
49862306a36Sopenharmony_ci * Pins not associated with a GPIO port.
49962306a36Sopenharmony_ci */
50062306a36Sopenharmony_cienum {
50162306a36Sopenharmony_ci	GP_ASSIGN_LAST(),
50262306a36Sopenharmony_ci	NOGP_ALL(),
50362306a36Sopenharmony_ci};
50462306a36Sopenharmony_ci
50562306a36Sopenharmony_cistatic const struct sh_pfc_pin pinmux_pins[] = {
50662306a36Sopenharmony_ci	PINMUX_GPIO_GP_ALL(),
50762306a36Sopenharmony_ci};
50862306a36Sopenharmony_ci
50962306a36Sopenharmony_ci/* - HSCIF0 ----------------------------------------------------------------- */
51062306a36Sopenharmony_cistatic const unsigned int hscif0_data_pins[] = {
51162306a36Sopenharmony_ci	/* HRX0, HTX0 */
51262306a36Sopenharmony_ci	RCAR_GP_PIN(0, 2), RCAR_GP_PIN(0, 3),
51362306a36Sopenharmony_ci};
51462306a36Sopenharmony_cistatic const unsigned int hscif0_data_mux[] = {
51562306a36Sopenharmony_ci	HRX0_MARK, HTX0_MARK,
51662306a36Sopenharmony_ci};
51762306a36Sopenharmony_cistatic const unsigned int hscif0_clk_pins[] = {
51862306a36Sopenharmony_ci	/* HSCK0 */
51962306a36Sopenharmony_ci	RCAR_GP_PIN(0, 1),
52062306a36Sopenharmony_ci};
52162306a36Sopenharmony_cistatic const unsigned int hscif0_clk_mux[] = {
52262306a36Sopenharmony_ci	HSCK0_MARK,
52362306a36Sopenharmony_ci};
52462306a36Sopenharmony_cistatic const unsigned int hscif0_ctrl_pins[] = {
52562306a36Sopenharmony_ci	/* HRTS0#, HCTS0# */
52662306a36Sopenharmony_ci	RCAR_GP_PIN(0, 5), RCAR_GP_PIN(0, 4),
52762306a36Sopenharmony_ci};
52862306a36Sopenharmony_cistatic const unsigned int hscif0_ctrl_mux[] = {
52962306a36Sopenharmony_ci	HRTS0_N_MARK, HCTS0_N_MARK,
53062306a36Sopenharmony_ci};
53162306a36Sopenharmony_ci
53262306a36Sopenharmony_ci/* - HSCIF1 ----------------------------------------------------------------- */
53362306a36Sopenharmony_cistatic const unsigned int hscif1_data_pins[] = {
53462306a36Sopenharmony_ci	/* HRX1, HTX1 */
53562306a36Sopenharmony_ci	RCAR_GP_PIN(0, 6), RCAR_GP_PIN(0, 7),
53662306a36Sopenharmony_ci};
53762306a36Sopenharmony_cistatic const unsigned int hscif1_data_mux[] = {
53862306a36Sopenharmony_ci	HRX1_MARK, HTX1_MARK,
53962306a36Sopenharmony_ci};
54062306a36Sopenharmony_cistatic const unsigned int hscif1_clk_pins[] = {
54162306a36Sopenharmony_ci	/* HSCK1 */
54262306a36Sopenharmony_ci	RCAR_GP_PIN(0, 8),
54362306a36Sopenharmony_ci};
54462306a36Sopenharmony_cistatic const unsigned int hscif1_clk_mux[] = {
54562306a36Sopenharmony_ci	HSCK1_MARK,
54662306a36Sopenharmony_ci};
54762306a36Sopenharmony_cistatic const unsigned int hscif1_ctrl_pins[] = {
54862306a36Sopenharmony_ci	/* HRTS1#, HCTS1# */
54962306a36Sopenharmony_ci	RCAR_GP_PIN(0, 9), RCAR_GP_PIN(0, 10),
55062306a36Sopenharmony_ci};
55162306a36Sopenharmony_cistatic const unsigned int hscif1_ctrl_mux[] = {
55262306a36Sopenharmony_ci	HRTS1_N_MARK, HCTS1_N_MARK,
55362306a36Sopenharmony_ci};
55462306a36Sopenharmony_ci
55562306a36Sopenharmony_ci/* - HSCIF2 ----------------------------------------------------------------- */
55662306a36Sopenharmony_cistatic const unsigned int hscif2_data_pins[] = {
55762306a36Sopenharmony_ci	/* HRX2, HTX2 */
55862306a36Sopenharmony_ci	RCAR_GP_PIN(1, 1), RCAR_GP_PIN(1, 2),
55962306a36Sopenharmony_ci};
56062306a36Sopenharmony_cistatic const unsigned int hscif2_data_mux[] = {
56162306a36Sopenharmony_ci	HRX2_MARK, HTX2_MARK,
56262306a36Sopenharmony_ci};
56362306a36Sopenharmony_cistatic const unsigned int hscif2_clk_pins[] = {
56462306a36Sopenharmony_ci	/* HSCK2 */
56562306a36Sopenharmony_ci	RCAR_GP_PIN(1, 0),
56662306a36Sopenharmony_ci};
56762306a36Sopenharmony_cistatic const unsigned int hscif2_clk_mux[] = {
56862306a36Sopenharmony_ci	HSCK2_MARK,
56962306a36Sopenharmony_ci};
57062306a36Sopenharmony_cistatic const unsigned int hscif2_ctrl_pins[] = {
57162306a36Sopenharmony_ci	/* HRTS2#, HCTS2# */
57262306a36Sopenharmony_ci	RCAR_GP_PIN(1, 4), RCAR_GP_PIN(1, 3),
57362306a36Sopenharmony_ci};
57462306a36Sopenharmony_cistatic const unsigned int hscif2_ctrl_mux[] = {
57562306a36Sopenharmony_ci	HRTS2_N_MARK, HCTS2_N_MARK,
57662306a36Sopenharmony_ci};
57762306a36Sopenharmony_ci
57862306a36Sopenharmony_ci/* - HSCIF3 ----------------------------------------------------------------- */
57962306a36Sopenharmony_cistatic const unsigned int hscif3_data_pins[] = {
58062306a36Sopenharmony_ci	/* HRX3, HTX3 */
58162306a36Sopenharmony_ci	RCAR_GP_PIN(0, 12), RCAR_GP_PIN(0, 13),
58262306a36Sopenharmony_ci};
58362306a36Sopenharmony_cistatic const unsigned int hscif3_data_mux[] = {
58462306a36Sopenharmony_ci	HRX3_MARK, HTX3_MARK,
58562306a36Sopenharmony_ci};
58662306a36Sopenharmony_cistatic const unsigned int hscif3_clk_pins[] = {
58762306a36Sopenharmony_ci	/* HSCK3 */
58862306a36Sopenharmony_ci	RCAR_GP_PIN(0, 14),
58962306a36Sopenharmony_ci};
59062306a36Sopenharmony_cistatic const unsigned int hscif3_clk_mux[] = {
59162306a36Sopenharmony_ci	HSCK3_MARK,
59262306a36Sopenharmony_ci};
59362306a36Sopenharmony_cistatic const unsigned int hscif3_ctrl_pins[] = {
59462306a36Sopenharmony_ci	/* HRTS3#, HCTS3# */
59562306a36Sopenharmony_ci	RCAR_GP_PIN(0, 15), RCAR_GP_PIN(0, 11),
59662306a36Sopenharmony_ci};
59762306a36Sopenharmony_cistatic const unsigned int hscif3_ctrl_mux[] = {
59862306a36Sopenharmony_ci	HRTS3_N_MARK, HCTS3_N_MARK,
59962306a36Sopenharmony_ci};
60062306a36Sopenharmony_ci
60162306a36Sopenharmony_ci/* - I2C0 ------------------------------------------------------------------- */
60262306a36Sopenharmony_cistatic const unsigned int i2c0_pins[] = {
60362306a36Sopenharmony_ci	/* SDA0, SCL0 */
60462306a36Sopenharmony_ci	RCAR_GP_PIN(1, 1), RCAR_GP_PIN(1, 0),
60562306a36Sopenharmony_ci};
60662306a36Sopenharmony_cistatic const unsigned int i2c0_mux[] = {
60762306a36Sopenharmony_ci	SDA0_MARK, SCL0_MARK,
60862306a36Sopenharmony_ci};
60962306a36Sopenharmony_ci
61062306a36Sopenharmony_ci/* - I2C1 ------------------------------------------------------------------- */
61162306a36Sopenharmony_cistatic const unsigned int i2c1_pins[] = {
61262306a36Sopenharmony_ci	/* SDA1, SCL1 */
61362306a36Sopenharmony_ci	RCAR_GP_PIN(1, 3), RCAR_GP_PIN(1, 2),
61462306a36Sopenharmony_ci};
61562306a36Sopenharmony_cistatic const unsigned int i2c1_mux[] = {
61662306a36Sopenharmony_ci	SDA1_MARK, SCL1_MARK,
61762306a36Sopenharmony_ci};
61862306a36Sopenharmony_ci
61962306a36Sopenharmony_ci/* - I2C2 ------------------------------------------------------------------- */
62062306a36Sopenharmony_cistatic const unsigned int i2c2_pins[] = {
62162306a36Sopenharmony_ci	/* SDA2, SCL2 */
62262306a36Sopenharmony_ci	RCAR_GP_PIN(1, 5), RCAR_GP_PIN(1, 4),
62362306a36Sopenharmony_ci};
62462306a36Sopenharmony_cistatic const unsigned int i2c2_mux[] = {
62562306a36Sopenharmony_ci	SDA2_MARK, SCL2_MARK,
62662306a36Sopenharmony_ci};
62762306a36Sopenharmony_ci
62862306a36Sopenharmony_ci/* - I2C3 ------------------------------------------------------------------- */
62962306a36Sopenharmony_cistatic const unsigned int i2c3_pins[] = {
63062306a36Sopenharmony_ci	/* SDA3, SCL3 */
63162306a36Sopenharmony_ci	RCAR_GP_PIN(1, 7), RCAR_GP_PIN(1, 6),
63262306a36Sopenharmony_ci};
63362306a36Sopenharmony_cistatic const unsigned int i2c3_mux[] = {
63462306a36Sopenharmony_ci	SDA3_MARK, SCL3_MARK,
63562306a36Sopenharmony_ci};
63662306a36Sopenharmony_ci
63762306a36Sopenharmony_ci/* - I2C4 ------------------------------------------------------------------- */
63862306a36Sopenharmony_cistatic const unsigned int i2c4_pins[] = {
63962306a36Sopenharmony_ci	/* SDA4, SCL4 */
64062306a36Sopenharmony_ci	RCAR_GP_PIN(1, 9), RCAR_GP_PIN(1, 8),
64162306a36Sopenharmony_ci};
64262306a36Sopenharmony_cistatic const unsigned int i2c4_mux[] = {
64362306a36Sopenharmony_ci	SDA4_MARK, SCL4_MARK,
64462306a36Sopenharmony_ci};
64562306a36Sopenharmony_ci
64662306a36Sopenharmony_ci/* - I2C5 ------------------------------------------------------------------- */
64762306a36Sopenharmony_cistatic const unsigned int i2c5_pins[] = {
64862306a36Sopenharmony_ci	/* SDA5, SCL5 */
64962306a36Sopenharmony_ci	RCAR_GP_PIN(1, 11), RCAR_GP_PIN(1, 10),
65062306a36Sopenharmony_ci};
65162306a36Sopenharmony_cistatic const unsigned int i2c5_mux[] = {
65262306a36Sopenharmony_ci	SDA5_MARK, SCL5_MARK,
65362306a36Sopenharmony_ci};
65462306a36Sopenharmony_ci
65562306a36Sopenharmony_ci
65662306a36Sopenharmony_ci/* - INTC-EX ---------------------------------------------------------------- */
65762306a36Sopenharmony_cistatic const unsigned int intc_ex_irq0_pins[] = {
65862306a36Sopenharmony_ci	/* IRQ0 */
65962306a36Sopenharmony_ci	RCAR_GP_PIN(0, 17),
66062306a36Sopenharmony_ci};
66162306a36Sopenharmony_cistatic const unsigned int intc_ex_irq0_mux[] = {
66262306a36Sopenharmony_ci	IRQ0_MARK,
66362306a36Sopenharmony_ci};
66462306a36Sopenharmony_cistatic const unsigned int intc_ex_irq1_pins[] = {
66562306a36Sopenharmony_ci	/* IRQ1 */
66662306a36Sopenharmony_ci	RCAR_GP_PIN(0, 18),
66762306a36Sopenharmony_ci};
66862306a36Sopenharmony_cistatic const unsigned int intc_ex_irq1_mux[] = {
66962306a36Sopenharmony_ci	IRQ1_MARK,
67062306a36Sopenharmony_ci};
67162306a36Sopenharmony_cistatic const unsigned int intc_ex_irq2_pins[] = {
67262306a36Sopenharmony_ci	/* IRQ2 */
67362306a36Sopenharmony_ci	RCAR_GP_PIN(0, 19),
67462306a36Sopenharmony_ci};
67562306a36Sopenharmony_cistatic const unsigned int intc_ex_irq2_mux[] = {
67662306a36Sopenharmony_ci	IRQ2_MARK,
67762306a36Sopenharmony_ci};
67862306a36Sopenharmony_cistatic const unsigned int intc_ex_irq3_pins[] = {
67962306a36Sopenharmony_ci	/* IRQ3 */
68062306a36Sopenharmony_ci	RCAR_GP_PIN(0, 20),
68162306a36Sopenharmony_ci};
68262306a36Sopenharmony_cistatic const unsigned int intc_ex_irq3_mux[] = {
68362306a36Sopenharmony_ci	IRQ3_MARK,
68462306a36Sopenharmony_ci};
68562306a36Sopenharmony_cistatic const unsigned int intc_ex_irq4_pins[] = {
68662306a36Sopenharmony_ci	/* IRQ4 */
68762306a36Sopenharmony_ci	RCAR_GP_PIN(0, 11),
68862306a36Sopenharmony_ci};
68962306a36Sopenharmony_cistatic const unsigned int intc_ex_irq4_mux[] = {
69062306a36Sopenharmony_ci	IRQ4_MARK,
69162306a36Sopenharmony_ci};
69262306a36Sopenharmony_cistatic const unsigned int intc_ex_irq5_pins[] = {
69362306a36Sopenharmony_ci	/* IRQ5 */
69462306a36Sopenharmony_ci	RCAR_GP_PIN(0, 15),
69562306a36Sopenharmony_ci};
69662306a36Sopenharmony_cistatic const unsigned int intc_ex_irq5_mux[] = {
69762306a36Sopenharmony_ci	IRQ5_MARK,
69862306a36Sopenharmony_ci};
69962306a36Sopenharmony_ci
70062306a36Sopenharmony_ci/* - MMC -------------------------------------------------------------------- */
70162306a36Sopenharmony_cistatic const unsigned int mmc_data_pins[] = {
70262306a36Sopenharmony_ci	/* MMC_SD_D[0:3], MMC_D[4:7] */
70362306a36Sopenharmony_ci	RCAR_GP_PIN(1, 13), RCAR_GP_PIN(1, 14),
70462306a36Sopenharmony_ci	RCAR_GP_PIN(1, 15), RCAR_GP_PIN(1, 16),
70562306a36Sopenharmony_ci	RCAR_GP_PIN(1, 18), RCAR_GP_PIN(1, 17),
70662306a36Sopenharmony_ci	RCAR_GP_PIN(1, 19), RCAR_GP_PIN(1, 21),
70762306a36Sopenharmony_ci};
70862306a36Sopenharmony_cistatic const unsigned int mmc_data_mux[] = {
70962306a36Sopenharmony_ci	MMC_SD_D0_MARK, MMC_SD_D1_MARK,
71062306a36Sopenharmony_ci	MMC_SD_D2_MARK, MMC_SD_D3_MARK,
71162306a36Sopenharmony_ci	MMC_D4_MARK, MMC_D5_MARK,
71262306a36Sopenharmony_ci	MMC_D6_MARK, MMC_D7_MARK,
71362306a36Sopenharmony_ci};
71462306a36Sopenharmony_cistatic const unsigned int mmc_ctrl_pins[] = {
71562306a36Sopenharmony_ci	/* MMC_SD_CLK, MMC_SD_CMD */
71662306a36Sopenharmony_ci	RCAR_GP_PIN(1, 12), RCAR_GP_PIN(1, 22),
71762306a36Sopenharmony_ci};
71862306a36Sopenharmony_cistatic const unsigned int mmc_ctrl_mux[] = {
71962306a36Sopenharmony_ci	MMC_SD_CLK_MARK, MMC_SD_CMD_MARK,
72062306a36Sopenharmony_ci};
72162306a36Sopenharmony_cistatic const unsigned int mmc_cd_pins[] = {
72262306a36Sopenharmony_ci	/* SD_CD */
72362306a36Sopenharmony_ci	RCAR_GP_PIN(1, 23),
72462306a36Sopenharmony_ci};
72562306a36Sopenharmony_cistatic const unsigned int mmc_cd_mux[] = {
72662306a36Sopenharmony_ci	SD_CD_MARK,
72762306a36Sopenharmony_ci};
72862306a36Sopenharmony_cistatic const unsigned int mmc_wp_pins[] = {
72962306a36Sopenharmony_ci	/* SD_WP */
73062306a36Sopenharmony_ci	RCAR_GP_PIN(1, 24),
73162306a36Sopenharmony_ci};
73262306a36Sopenharmony_cistatic const unsigned int mmc_wp_mux[] = {
73362306a36Sopenharmony_ci	SD_WP_MARK,
73462306a36Sopenharmony_ci};
73562306a36Sopenharmony_cistatic const unsigned int mmc_ds_pins[] = {
73662306a36Sopenharmony_ci	/* MMC_DS */
73762306a36Sopenharmony_ci	RCAR_GP_PIN(1, 20),
73862306a36Sopenharmony_ci};
73962306a36Sopenharmony_cistatic const unsigned int mmc_ds_mux[] = {
74062306a36Sopenharmony_ci	MMC_DS_MARK,
74162306a36Sopenharmony_ci};
74262306a36Sopenharmony_ci
74362306a36Sopenharmony_ci/* - MSIOF0 ----------------------------------------------------------------- */
74462306a36Sopenharmony_cistatic const unsigned int msiof0_clk_pins[] = {
74562306a36Sopenharmony_ci	/* MSIOF0_SCK */
74662306a36Sopenharmony_ci	RCAR_GP_PIN(0, 14),
74762306a36Sopenharmony_ci};
74862306a36Sopenharmony_cistatic const unsigned int msiof0_clk_mux[] = {
74962306a36Sopenharmony_ci	MSIOF0_SCK_MARK,
75062306a36Sopenharmony_ci};
75162306a36Sopenharmony_cistatic const unsigned int msiof0_sync_pins[] = {
75262306a36Sopenharmony_ci	/* MSIOF0_SYNC */
75362306a36Sopenharmony_ci	RCAR_GP_PIN(0, 11),
75462306a36Sopenharmony_ci};
75562306a36Sopenharmony_cistatic const unsigned int msiof0_sync_mux[] = {
75662306a36Sopenharmony_ci	MSIOF0_SYNC_MARK,
75762306a36Sopenharmony_ci};
75862306a36Sopenharmony_cistatic const unsigned int msiof0_ss1_pins[] = {
75962306a36Sopenharmony_ci	/* MSIOF0_SS1 */
76062306a36Sopenharmony_ci	RCAR_GP_PIN(0, 15),
76162306a36Sopenharmony_ci};
76262306a36Sopenharmony_cistatic const unsigned int msiof0_ss1_mux[] = {
76362306a36Sopenharmony_ci	MSIOF0_SS1_MARK,
76462306a36Sopenharmony_ci};
76562306a36Sopenharmony_cistatic const unsigned int msiof0_ss2_pins[] = {
76662306a36Sopenharmony_ci	/* MSIOF0_SS2 */
76762306a36Sopenharmony_ci	RCAR_GP_PIN(0, 16),
76862306a36Sopenharmony_ci};
76962306a36Sopenharmony_cistatic const unsigned int msiof0_ss2_mux[] = {
77062306a36Sopenharmony_ci	MSIOF0_SS2_MARK,
77162306a36Sopenharmony_ci};
77262306a36Sopenharmony_cistatic const unsigned int msiof0_txd_pins[] = {
77362306a36Sopenharmony_ci	/* MSIOF0_TXD */
77462306a36Sopenharmony_ci	RCAR_GP_PIN(0, 13),
77562306a36Sopenharmony_ci};
77662306a36Sopenharmony_cistatic const unsigned int msiof0_txd_mux[] = {
77762306a36Sopenharmony_ci	MSIOF0_TXD_MARK,
77862306a36Sopenharmony_ci};
77962306a36Sopenharmony_cistatic const unsigned int msiof0_rxd_pins[] = {
78062306a36Sopenharmony_ci	/* MSIOF0_RXD */
78162306a36Sopenharmony_ci	RCAR_GP_PIN(0, 12),
78262306a36Sopenharmony_ci};
78362306a36Sopenharmony_cistatic const unsigned int msiof0_rxd_mux[] = {
78462306a36Sopenharmony_ci	MSIOF0_RXD_MARK,
78562306a36Sopenharmony_ci};
78662306a36Sopenharmony_ci
78762306a36Sopenharmony_ci/* - MSIOF1 ----------------------------------------------------------------- */
78862306a36Sopenharmony_cistatic const unsigned int msiof1_clk_pins[] = {
78962306a36Sopenharmony_ci	/* MSIOF1_SCK */
79062306a36Sopenharmony_ci	RCAR_GP_PIN(0, 8),
79162306a36Sopenharmony_ci};
79262306a36Sopenharmony_cistatic const unsigned int msiof1_clk_mux[] = {
79362306a36Sopenharmony_ci	MSIOF1_SCK_MARK,
79462306a36Sopenharmony_ci};
79562306a36Sopenharmony_cistatic const unsigned int msiof1_sync_pins[] = {
79662306a36Sopenharmony_ci	/* MSIOF1_SYNC */
79762306a36Sopenharmony_ci	RCAR_GP_PIN(0, 10),
79862306a36Sopenharmony_ci};
79962306a36Sopenharmony_cistatic const unsigned int msiof1_sync_mux[] = {
80062306a36Sopenharmony_ci	MSIOF1_SYNC_MARK,
80162306a36Sopenharmony_ci};
80262306a36Sopenharmony_cistatic const unsigned int msiof1_ss1_pins[] = {
80362306a36Sopenharmony_ci	/* MSIOF1_SS1 */
80462306a36Sopenharmony_ci	RCAR_GP_PIN(0, 17),
80562306a36Sopenharmony_ci};
80662306a36Sopenharmony_cistatic const unsigned int msiof1_ss1_mux[] = {
80762306a36Sopenharmony_ci	MSIOF1_SS1_MARK,
80862306a36Sopenharmony_ci};
80962306a36Sopenharmony_cistatic const unsigned int msiof1_ss2_pins[] = {
81062306a36Sopenharmony_ci	/* MSIOF1_SS2 */
81162306a36Sopenharmony_ci	RCAR_GP_PIN(0, 18),
81262306a36Sopenharmony_ci};
81362306a36Sopenharmony_cistatic const unsigned int msiof1_ss2_mux[] = {
81462306a36Sopenharmony_ci	MSIOF1_SS2_MARK,
81562306a36Sopenharmony_ci};
81662306a36Sopenharmony_cistatic const unsigned int msiof1_txd_pins[] = {
81762306a36Sopenharmony_ci	/* MSIOF1_TXD */
81862306a36Sopenharmony_ci	RCAR_GP_PIN(0, 7),
81962306a36Sopenharmony_ci};
82062306a36Sopenharmony_cistatic const unsigned int msiof1_txd_mux[] = {
82162306a36Sopenharmony_ci	MSIOF1_TXD_MARK,
82262306a36Sopenharmony_ci};
82362306a36Sopenharmony_cistatic const unsigned int msiof1_rxd_pins[] = {
82462306a36Sopenharmony_ci	/* MSIOF1_RXD */
82562306a36Sopenharmony_ci	RCAR_GP_PIN(0, 6),
82662306a36Sopenharmony_ci};
82762306a36Sopenharmony_cistatic const unsigned int msiof1_rxd_mux[] = {
82862306a36Sopenharmony_ci	MSIOF1_RXD_MARK,
82962306a36Sopenharmony_ci};
83062306a36Sopenharmony_ci
83162306a36Sopenharmony_ci/* - MSIOF2 ----------------------------------------------------------------- */
83262306a36Sopenharmony_cistatic const unsigned int msiof2_clk_pins[] = {
83362306a36Sopenharmony_ci	/* MSIOF2_SCK */
83462306a36Sopenharmony_ci	RCAR_GP_PIN(1, 5),
83562306a36Sopenharmony_ci};
83662306a36Sopenharmony_cistatic const unsigned int msiof2_clk_mux[] = {
83762306a36Sopenharmony_ci	MSIOF2_SCK_MARK,
83862306a36Sopenharmony_ci};
83962306a36Sopenharmony_cistatic const unsigned int msiof2_sync_pins[] = {
84062306a36Sopenharmony_ci	/* MSIOF2_SYNC */
84162306a36Sopenharmony_ci	RCAR_GP_PIN(1, 4),
84262306a36Sopenharmony_ci};
84362306a36Sopenharmony_cistatic const unsigned int msiof2_sync_mux[] = {
84462306a36Sopenharmony_ci	MSIOF2_SYNC_MARK,
84562306a36Sopenharmony_ci};
84662306a36Sopenharmony_cistatic const unsigned int msiof2_ss1_pins[] = {
84762306a36Sopenharmony_ci	/* MSIOF2_SS1 */
84862306a36Sopenharmony_ci	RCAR_GP_PIN(1, 2),
84962306a36Sopenharmony_ci};
85062306a36Sopenharmony_cistatic const unsigned int msiof2_ss1_mux[] = {
85162306a36Sopenharmony_ci	MSIOF2_SS1_MARK,
85262306a36Sopenharmony_ci};
85362306a36Sopenharmony_cistatic const unsigned int msiof2_ss2_pins[] = {
85462306a36Sopenharmony_ci	/* MSIOF2_SS2 */
85562306a36Sopenharmony_ci	RCAR_GP_PIN(1, 3),
85662306a36Sopenharmony_ci};
85762306a36Sopenharmony_cistatic const unsigned int msiof2_ss2_mux[] = {
85862306a36Sopenharmony_ci	MSIOF2_SS2_MARK,
85962306a36Sopenharmony_ci};
86062306a36Sopenharmony_cistatic const unsigned int msiof2_txd_pins[] = {
86162306a36Sopenharmony_ci	/* MSIOF2_TXD */
86262306a36Sopenharmony_ci	RCAR_GP_PIN(1, 7),
86362306a36Sopenharmony_ci};
86462306a36Sopenharmony_cistatic const unsigned int msiof2_txd_mux[] = {
86562306a36Sopenharmony_ci	MSIOF2_TXD_MARK,
86662306a36Sopenharmony_ci};
86762306a36Sopenharmony_cistatic const unsigned int msiof2_rxd_pins[] = {
86862306a36Sopenharmony_ci	/* MSIOF2_RXD */
86962306a36Sopenharmony_ci	RCAR_GP_PIN(1, 6),
87062306a36Sopenharmony_ci};
87162306a36Sopenharmony_cistatic const unsigned int msiof2_rxd_mux[] = {
87262306a36Sopenharmony_ci	MSIOF2_RXD_MARK,
87362306a36Sopenharmony_ci};
87462306a36Sopenharmony_ci
87562306a36Sopenharmony_ci/* - MSIOF3 ----------------------------------------------------------------- */
87662306a36Sopenharmony_cistatic const unsigned int msiof3_clk_pins[] = {
87762306a36Sopenharmony_ci	/* MSIOF3_SCK */
87862306a36Sopenharmony_ci	RCAR_GP_PIN(0, 1),
87962306a36Sopenharmony_ci};
88062306a36Sopenharmony_cistatic const unsigned int msiof3_clk_mux[] = {
88162306a36Sopenharmony_ci	MSIOF3_SCK_MARK,
88262306a36Sopenharmony_ci};
88362306a36Sopenharmony_cistatic const unsigned int msiof3_sync_pins[] = {
88462306a36Sopenharmony_ci	/* MSIOF3_SYNC */
88562306a36Sopenharmony_ci	RCAR_GP_PIN(0, 9),
88662306a36Sopenharmony_ci};
88762306a36Sopenharmony_cistatic const unsigned int msiof3_sync_mux[] = {
88862306a36Sopenharmony_ci	MSIOF3_SYNC_MARK,
88962306a36Sopenharmony_ci};
89062306a36Sopenharmony_cistatic const unsigned int msiof3_ss1_pins[] = {
89162306a36Sopenharmony_ci	/* MSIOF3_SS1 */
89262306a36Sopenharmony_ci	RCAR_GP_PIN(0, 4),
89362306a36Sopenharmony_ci};
89462306a36Sopenharmony_cistatic const unsigned int msiof3_ss1_mux[] = {
89562306a36Sopenharmony_ci	MSIOF3_SS1_MARK,
89662306a36Sopenharmony_ci};
89762306a36Sopenharmony_cistatic const unsigned int msiof3_ss2_pins[] = {
89862306a36Sopenharmony_ci	/* MSIOF3_SS2 */
89962306a36Sopenharmony_ci	RCAR_GP_PIN(0, 5),
90062306a36Sopenharmony_ci};
90162306a36Sopenharmony_cistatic const unsigned int msiof3_ss2_mux[] = {
90262306a36Sopenharmony_ci	MSIOF3_SS2_MARK,
90362306a36Sopenharmony_ci};
90462306a36Sopenharmony_cistatic const unsigned int msiof3_txd_pins[] = {
90562306a36Sopenharmony_ci	/* MSIOF3_TXD */
90662306a36Sopenharmony_ci	RCAR_GP_PIN(0, 3),
90762306a36Sopenharmony_ci};
90862306a36Sopenharmony_cistatic const unsigned int msiof3_txd_mux[] = {
90962306a36Sopenharmony_ci	MSIOF3_TXD_MARK,
91062306a36Sopenharmony_ci};
91162306a36Sopenharmony_cistatic const unsigned int msiof3_rxd_pins[] = {
91262306a36Sopenharmony_ci	/* MSIOF3_RXD */
91362306a36Sopenharmony_ci	RCAR_GP_PIN(0, 2),
91462306a36Sopenharmony_ci};
91562306a36Sopenharmony_cistatic const unsigned int msiof3_rxd_mux[] = {
91662306a36Sopenharmony_ci	MSIOF3_RXD_MARK,
91762306a36Sopenharmony_ci};
91862306a36Sopenharmony_ci
91962306a36Sopenharmony_ci/* - PCIE ------------------------------------------------------------------- */
92062306a36Sopenharmony_cistatic const unsigned int pcie0_clkreq_n_pins[] = {
92162306a36Sopenharmony_ci	/* PCIE0_CLKREQ# */
92262306a36Sopenharmony_ci	RCAR_GP_PIN(2, 15),
92362306a36Sopenharmony_ci};
92462306a36Sopenharmony_ci
92562306a36Sopenharmony_cistatic const unsigned int pcie0_clkreq_n_mux[] = {
92662306a36Sopenharmony_ci	PCIE0_CLKREQ_N_MARK,
92762306a36Sopenharmony_ci};
92862306a36Sopenharmony_ci
92962306a36Sopenharmony_cistatic const unsigned int pcie1_clkreq_n_pins[] = {
93062306a36Sopenharmony_ci	/* PCIE1_CLKREQ# */
93162306a36Sopenharmony_ci	RCAR_GP_PIN(2, 16),
93262306a36Sopenharmony_ci};
93362306a36Sopenharmony_ci
93462306a36Sopenharmony_cistatic const unsigned int pcie1_clkreq_n_mux[] = {
93562306a36Sopenharmony_ci	PCIE1_CLKREQ_N_MARK,
93662306a36Sopenharmony_ci};
93762306a36Sopenharmony_ci
93862306a36Sopenharmony_ci/* - QSPI0 ------------------------------------------------------------------ */
93962306a36Sopenharmony_cistatic const unsigned int qspi0_ctrl_pins[] = {
94062306a36Sopenharmony_ci	/* SPCLK, SSL */
94162306a36Sopenharmony_ci	RCAR_GP_PIN(2, 10), RCAR_GP_PIN(2, 13),
94262306a36Sopenharmony_ci};
94362306a36Sopenharmony_cistatic const unsigned int qspi0_ctrl_mux[] = {
94462306a36Sopenharmony_ci	QSPI0_SPCLK_MARK, QSPI0_SSL_MARK,
94562306a36Sopenharmony_ci};
94662306a36Sopenharmony_cistatic const unsigned int qspi0_data_pins[] = {
94762306a36Sopenharmony_ci	/* MOSI_IO0, MISO_IO1, IO2, IO3 */
94862306a36Sopenharmony_ci	RCAR_GP_PIN(2, 9), RCAR_GP_PIN(2, 12),
94962306a36Sopenharmony_ci	RCAR_GP_PIN(2, 11), RCAR_GP_PIN(2, 14),
95062306a36Sopenharmony_ci};
95162306a36Sopenharmony_cistatic const unsigned int qspi0_data_mux[] = {
95262306a36Sopenharmony_ci	QSPI0_MOSI_IO0_MARK, QSPI0_MISO_IO1_MARK,
95362306a36Sopenharmony_ci	QSPI0_IO2_MARK, QSPI0_IO3_MARK
95462306a36Sopenharmony_ci};
95562306a36Sopenharmony_ci
95662306a36Sopenharmony_ci/* - QSPI1 ------------------------------------------------------------------ */
95762306a36Sopenharmony_cistatic const unsigned int qspi1_ctrl_pins[] = {
95862306a36Sopenharmony_ci	/* SPCLK, SSL */
95962306a36Sopenharmony_ci	RCAR_GP_PIN(2, 8), RCAR_GP_PIN(2, 3),
96062306a36Sopenharmony_ci};
96162306a36Sopenharmony_cistatic const unsigned int qspi1_ctrl_mux[] = {
96262306a36Sopenharmony_ci	QSPI1_SPCLK_MARK, QSPI1_SSL_MARK,
96362306a36Sopenharmony_ci};
96462306a36Sopenharmony_cistatic const unsigned int qspi1_data_pins[] = {
96562306a36Sopenharmony_ci	/* MOSI_IO0, MISO_IO1, IO2, IO3 */
96662306a36Sopenharmony_ci	RCAR_GP_PIN(2, 7), RCAR_GP_PIN(2, 5),
96762306a36Sopenharmony_ci	RCAR_GP_PIN(2, 6), RCAR_GP_PIN(2, 4),
96862306a36Sopenharmony_ci};
96962306a36Sopenharmony_cistatic const unsigned int qspi1_data_mux[] = {
97062306a36Sopenharmony_ci	QSPI1_MOSI_IO0_MARK, QSPI1_MISO_IO1_MARK,
97162306a36Sopenharmony_ci	QSPI1_IO2_MARK, QSPI1_IO3_MARK
97262306a36Sopenharmony_ci};
97362306a36Sopenharmony_ci
97462306a36Sopenharmony_ci/* - SCIF0 ------------------------------------------------------------------ */
97562306a36Sopenharmony_cistatic const unsigned int scif0_data_pins[] = {
97662306a36Sopenharmony_ci	/* RX0, TX0 */
97762306a36Sopenharmony_ci	RCAR_GP_PIN(0, 6), RCAR_GP_PIN(0, 7),
97862306a36Sopenharmony_ci};
97962306a36Sopenharmony_cistatic const unsigned int scif0_data_mux[] = {
98062306a36Sopenharmony_ci	RX0_MARK, TX0_MARK,
98162306a36Sopenharmony_ci};
98262306a36Sopenharmony_cistatic const unsigned int scif0_clk_pins[] = {
98362306a36Sopenharmony_ci	/* SCK0 */
98462306a36Sopenharmony_ci	RCAR_GP_PIN(0, 8),
98562306a36Sopenharmony_ci};
98662306a36Sopenharmony_cistatic const unsigned int scif0_clk_mux[] = {
98762306a36Sopenharmony_ci	SCK0_MARK,
98862306a36Sopenharmony_ci};
98962306a36Sopenharmony_cistatic const unsigned int scif0_ctrl_pins[] = {
99062306a36Sopenharmony_ci	/* RTS0#, CTS0# */
99162306a36Sopenharmony_ci	RCAR_GP_PIN(0, 9), RCAR_GP_PIN(0, 10),
99262306a36Sopenharmony_ci};
99362306a36Sopenharmony_cistatic const unsigned int scif0_ctrl_mux[] = {
99462306a36Sopenharmony_ci	RTS0_N_MARK, CTS0_N_MARK,
99562306a36Sopenharmony_ci};
99662306a36Sopenharmony_ci
99762306a36Sopenharmony_ci/* - SCIF1 ------------------------------------------------------------------ */
99862306a36Sopenharmony_cistatic const unsigned int scif1_data_pins[] = {
99962306a36Sopenharmony_ci	/* RX1, TX1 */
100062306a36Sopenharmony_ci	RCAR_GP_PIN(0, 12), RCAR_GP_PIN(0, 13),
100162306a36Sopenharmony_ci};
100262306a36Sopenharmony_cistatic const unsigned int scif1_data_mux[] = {
100362306a36Sopenharmony_ci	RX1_MARK, TX1_MARK,
100462306a36Sopenharmony_ci};
100562306a36Sopenharmony_cistatic const unsigned int scif1_clk_pins[] = {
100662306a36Sopenharmony_ci	/* SCK1 */
100762306a36Sopenharmony_ci	RCAR_GP_PIN(0, 14),
100862306a36Sopenharmony_ci};
100962306a36Sopenharmony_cistatic const unsigned int scif1_clk_mux[] = {
101062306a36Sopenharmony_ci	SCK1_MARK,
101162306a36Sopenharmony_ci};
101262306a36Sopenharmony_cistatic const unsigned int scif1_ctrl_pins[] = {
101362306a36Sopenharmony_ci	/* RTS1#, CTS1# */
101462306a36Sopenharmony_ci	RCAR_GP_PIN(0, 15), RCAR_GP_PIN(0, 11),
101562306a36Sopenharmony_ci};
101662306a36Sopenharmony_cistatic const unsigned int scif1_ctrl_mux[] = {
101762306a36Sopenharmony_ci	RTS1_N_MARK, CTS1_N_MARK,
101862306a36Sopenharmony_ci};
101962306a36Sopenharmony_ci
102062306a36Sopenharmony_ci/* - SCIF3 ------------------------------------------------------------------ */
102162306a36Sopenharmony_cistatic const unsigned int scif3_data_pins[] = {
102262306a36Sopenharmony_ci	/* RX3, TX3 */
102362306a36Sopenharmony_ci	RCAR_GP_PIN(0, 2), RCAR_GP_PIN(0, 3),
102462306a36Sopenharmony_ci};
102562306a36Sopenharmony_cistatic const unsigned int scif3_data_mux[] = {
102662306a36Sopenharmony_ci	RX3_MARK, TX3_MARK,
102762306a36Sopenharmony_ci};
102862306a36Sopenharmony_cistatic const unsigned int scif3_clk_pins[] = {
102962306a36Sopenharmony_ci	/* SCK3 */
103062306a36Sopenharmony_ci	RCAR_GP_PIN(0, 1),
103162306a36Sopenharmony_ci};
103262306a36Sopenharmony_cistatic const unsigned int scif3_clk_mux[] = {
103362306a36Sopenharmony_ci	SCK3_MARK,
103462306a36Sopenharmony_ci};
103562306a36Sopenharmony_cistatic const unsigned int scif3_ctrl_pins[] = {
103662306a36Sopenharmony_ci	/* RTS3#, CTS3# */
103762306a36Sopenharmony_ci	RCAR_GP_PIN(0, 5), RCAR_GP_PIN(0, 4),
103862306a36Sopenharmony_ci};
103962306a36Sopenharmony_cistatic const unsigned int scif3_ctrl_mux[] = {
104062306a36Sopenharmony_ci	RTS3_N_MARK, CTS3_N_MARK,
104162306a36Sopenharmony_ci};
104262306a36Sopenharmony_ci
104362306a36Sopenharmony_ci/* - SCIF4 ------------------------------------------------------------------ */
104462306a36Sopenharmony_cistatic const unsigned int scif4_data_pins[] = {
104562306a36Sopenharmony_ci	/* RX4, TX4 */
104662306a36Sopenharmony_ci	RCAR_GP_PIN(1, 6), RCAR_GP_PIN(1, 7),
104762306a36Sopenharmony_ci};
104862306a36Sopenharmony_cistatic const unsigned int scif4_data_mux[] = {
104962306a36Sopenharmony_ci	RX4_MARK, TX4_MARK,
105062306a36Sopenharmony_ci};
105162306a36Sopenharmony_cistatic const unsigned int scif4_clk_pins[] = {
105262306a36Sopenharmony_ci	/* SCK4 */
105362306a36Sopenharmony_ci	RCAR_GP_PIN(1, 5),
105462306a36Sopenharmony_ci};
105562306a36Sopenharmony_cistatic const unsigned int scif4_clk_mux[] = {
105662306a36Sopenharmony_ci	SCK4_MARK,
105762306a36Sopenharmony_ci};
105862306a36Sopenharmony_cistatic const unsigned int scif4_ctrl_pins[] = {
105962306a36Sopenharmony_ci	/* RTS4#, CTS4# */
106062306a36Sopenharmony_ci	RCAR_GP_PIN(1, 4), RCAR_GP_PIN(1, 3),
106162306a36Sopenharmony_ci};
106262306a36Sopenharmony_cistatic const unsigned int scif4_ctrl_mux[] = {
106362306a36Sopenharmony_ci	RTS4_N_MARK, CTS4_N_MARK,
106462306a36Sopenharmony_ci};
106562306a36Sopenharmony_ci
106662306a36Sopenharmony_ci/* - SCIF Clock ------------------------------------------------------------- */
106762306a36Sopenharmony_cistatic const unsigned int scif_clk_pins[] = {
106862306a36Sopenharmony_ci	/* SCIF_CLK */
106962306a36Sopenharmony_ci	RCAR_GP_PIN(0, 0),
107062306a36Sopenharmony_ci};
107162306a36Sopenharmony_cistatic const unsigned int scif_clk_mux[] = {
107262306a36Sopenharmony_ci	SCIF_CLK_MARK,
107362306a36Sopenharmony_ci};
107462306a36Sopenharmony_ci
107562306a36Sopenharmony_ci/* - TSN0 ------------------------------------------------ */
107662306a36Sopenharmony_cistatic const unsigned int tsn0_link_a_pins[] = {
107762306a36Sopenharmony_ci	/* TSN0_LINK_A */
107862306a36Sopenharmony_ci	RCAR_GP_PIN(0, 11),
107962306a36Sopenharmony_ci};
108062306a36Sopenharmony_cistatic const unsigned int tsn0_link_a_mux[] = {
108162306a36Sopenharmony_ci	TSN0_LINK_A_MARK,
108262306a36Sopenharmony_ci};
108362306a36Sopenharmony_cistatic const unsigned int tsn0_magic_a_pins[] = {
108462306a36Sopenharmony_ci	/* TSN0_MAGIC_A */
108562306a36Sopenharmony_ci	RCAR_GP_PIN(0, 17),
108662306a36Sopenharmony_ci};
108762306a36Sopenharmony_cistatic const unsigned int tsn0_magic_a_mux[] = {
108862306a36Sopenharmony_ci	TSN0_MAGIC_A_MARK,
108962306a36Sopenharmony_ci};
109062306a36Sopenharmony_cistatic const unsigned int tsn0_phy_int_a_pins[] = {
109162306a36Sopenharmony_ci	/* TSN0_PHY_INT_A */
109262306a36Sopenharmony_ci	RCAR_GP_PIN(0, 18),
109362306a36Sopenharmony_ci};
109462306a36Sopenharmony_cistatic const unsigned int tsn0_phy_int_a_mux[] = {
109562306a36Sopenharmony_ci	TSN0_PHY_INT_A_MARK,
109662306a36Sopenharmony_ci};
109762306a36Sopenharmony_cistatic const unsigned int tsn0_mdio_a_pins[] = {
109862306a36Sopenharmony_ci	/* TSN0_MDC_A, TSN0_MDIO_A */
109962306a36Sopenharmony_ci	RCAR_GP_PIN(0, 4), RCAR_GP_PIN(0, 5),
110062306a36Sopenharmony_ci};
110162306a36Sopenharmony_cistatic const unsigned int tsn0_mdio_a_mux[] = {
110262306a36Sopenharmony_ci	TSN0_MDC_A_MARK, TSN0_MDIO_A_MARK,
110362306a36Sopenharmony_ci};
110462306a36Sopenharmony_cistatic const unsigned int tsn0_link_b_pins[] = {
110562306a36Sopenharmony_ci	/* TSN0_LINK_B */
110662306a36Sopenharmony_ci	RCAR_GP_PIN(3, 8),
110762306a36Sopenharmony_ci};
110862306a36Sopenharmony_cistatic const unsigned int tsn0_link_b_mux[] = {
110962306a36Sopenharmony_ci	TSN0_LINK_B_MARK,
111062306a36Sopenharmony_ci};
111162306a36Sopenharmony_cistatic const unsigned int tsn0_magic_b_pins[] = {
111262306a36Sopenharmony_ci	/* TSN0_MAGIC_B */
111362306a36Sopenharmony_ci	RCAR_GP_PIN(3, 12),
111462306a36Sopenharmony_ci};
111562306a36Sopenharmony_cistatic const unsigned int tsn0_magic_b_mux[] = {
111662306a36Sopenharmony_ci	TSN0_MAGIC_B_MARK,
111762306a36Sopenharmony_ci};
111862306a36Sopenharmony_cistatic const unsigned int tsn0_phy_int_b_pins[] = {
111962306a36Sopenharmony_ci	/* TSN0_PHY_INT_B */
112062306a36Sopenharmony_ci	RCAR_GP_PIN(3, 10),
112162306a36Sopenharmony_ci};
112262306a36Sopenharmony_cistatic const unsigned int tsn0_phy_int_b_mux[] = {
112362306a36Sopenharmony_ci	TSN0_PHY_INT_B_MARK,
112462306a36Sopenharmony_ci};
112562306a36Sopenharmony_cistatic const unsigned int tsn0_mdio_b_pins[] = {
112662306a36Sopenharmony_ci	/* TSN0_MDC_B, TSN0_MDIO_B */
112762306a36Sopenharmony_ci	RCAR_GP_PIN(3, 4), RCAR_GP_PIN(3, 2),
112862306a36Sopenharmony_ci};
112962306a36Sopenharmony_cistatic const unsigned int tsn0_mdio_b_mux[] = {
113062306a36Sopenharmony_ci	TSN0_MDC_B_MARK, TSN0_MDIO_B_MARK,
113162306a36Sopenharmony_ci};
113262306a36Sopenharmony_cistatic const unsigned int tsn0_avtp_pps_pins[] = {
113362306a36Sopenharmony_ci	/* TSN0_AVTP_PPS */
113462306a36Sopenharmony_ci	RCAR_GP_PIN(3, 16),
113562306a36Sopenharmony_ci};
113662306a36Sopenharmony_cistatic const unsigned int tsn0_avtp_pps_mux[] = {
113762306a36Sopenharmony_ci	TSN0_AVTP_PPS_MARK,
113862306a36Sopenharmony_ci};
113962306a36Sopenharmony_cistatic const unsigned int tsn0_avtp_capture_a_pins[] = {
114062306a36Sopenharmony_ci	/* TSN0_AVTP_CAPTURE_A */
114162306a36Sopenharmony_ci	RCAR_GP_PIN(0, 1),
114262306a36Sopenharmony_ci};
114362306a36Sopenharmony_cistatic const unsigned int tsn0_avtp_capture_a_mux[] = {
114462306a36Sopenharmony_ci	TSN0_AVTP_CAPTURE_A_MARK,
114562306a36Sopenharmony_ci};
114662306a36Sopenharmony_cistatic const unsigned int tsn0_avtp_match_a_pins[] = {
114762306a36Sopenharmony_ci	/* TSN0_AVTP_MATCH_A */
114862306a36Sopenharmony_ci	RCAR_GP_PIN(0, 2),
114962306a36Sopenharmony_ci};
115062306a36Sopenharmony_cistatic const unsigned int tsn0_avtp_match_a_mux[] = {
115162306a36Sopenharmony_ci	TSN0_AVTP_MATCH_A_MARK,
115262306a36Sopenharmony_ci};
115362306a36Sopenharmony_cistatic const unsigned int tsn0_avtp_capture_b_pins[] = {
115462306a36Sopenharmony_ci	/* TSN0_AVTP_CAPTURE_B */
115562306a36Sopenharmony_ci	RCAR_GP_PIN(3, 18),
115662306a36Sopenharmony_ci};
115762306a36Sopenharmony_cistatic const unsigned int tsn0_avtp_capture_b_mux[] = {
115862306a36Sopenharmony_ci	TSN0_AVTP_CAPTURE_B_MARK,
115962306a36Sopenharmony_ci};
116062306a36Sopenharmony_cistatic const unsigned int tsn0_avtp_match_b_pins[] = {
116162306a36Sopenharmony_ci	/* TSN0_AVTP_MATCH_B */
116262306a36Sopenharmony_ci	RCAR_GP_PIN(3, 17),
116362306a36Sopenharmony_ci};
116462306a36Sopenharmony_cistatic const unsigned int tsn0_avtp_match_b_mux[] = {
116562306a36Sopenharmony_ci	TSN0_AVTP_MATCH_B_MARK,
116662306a36Sopenharmony_ci};
116762306a36Sopenharmony_ci
116862306a36Sopenharmony_ci/* - TSN1 ------------------------------------------------ */
116962306a36Sopenharmony_cistatic const unsigned int tsn1_link_a_pins[] = {
117062306a36Sopenharmony_ci	/* TSN1_LINK_A */
117162306a36Sopenharmony_ci	RCAR_GP_PIN(0, 15),
117262306a36Sopenharmony_ci};
117362306a36Sopenharmony_cistatic const unsigned int tsn1_link_a_mux[] = {
117462306a36Sopenharmony_ci	TSN1_LINK_A_MARK,
117562306a36Sopenharmony_ci};
117662306a36Sopenharmony_cistatic const unsigned int tsn1_phy_int_a_pins[] = {
117762306a36Sopenharmony_ci	/* TSN1_PHY_INT_A */
117862306a36Sopenharmony_ci	RCAR_GP_PIN(0, 19),
117962306a36Sopenharmony_ci};
118062306a36Sopenharmony_cistatic const unsigned int tsn1_phy_int_a_mux[] = {
118162306a36Sopenharmony_ci	TSN1_PHY_INT_A_MARK,
118262306a36Sopenharmony_ci};
118362306a36Sopenharmony_cistatic const unsigned int tsn1_mdio_a_pins[] = {
118462306a36Sopenharmony_ci	/* TSN1_MDC_A, TSN1_MDIO_A */
118562306a36Sopenharmony_ci	RCAR_GP_PIN(0, 10), RCAR_GP_PIN(0, 9),
118662306a36Sopenharmony_ci};
118762306a36Sopenharmony_cistatic const unsigned int tsn1_mdio_a_mux[] = {
118862306a36Sopenharmony_ci	TSN1_MDC_A_MARK, TSN1_MDIO_A_MARK,
118962306a36Sopenharmony_ci};
119062306a36Sopenharmony_cistatic const unsigned int tsn1_link_b_pins[] = {
119162306a36Sopenharmony_ci	/* TSN1_LINK_B */
119262306a36Sopenharmony_ci	RCAR_GP_PIN(3, 6),
119362306a36Sopenharmony_ci};
119462306a36Sopenharmony_cistatic const unsigned int tsn1_link_b_mux[] = {
119562306a36Sopenharmony_ci	TSN1_LINK_B_MARK,
119662306a36Sopenharmony_ci};
119762306a36Sopenharmony_cistatic const unsigned int tsn1_phy_int_b_pins[] = {
119862306a36Sopenharmony_ci	/* TSN1_PHY_INT_B */
119962306a36Sopenharmony_ci	RCAR_GP_PIN(3, 11),
120062306a36Sopenharmony_ci};
120162306a36Sopenharmony_cistatic const unsigned int tsn1_phy_int_b_mux[] = {
120262306a36Sopenharmony_ci	TSN1_PHY_INT_B_MARK,
120362306a36Sopenharmony_ci};
120462306a36Sopenharmony_cistatic const unsigned int tsn1_mdio_b_pins[] = {
120562306a36Sopenharmony_ci	/* TSN1_MDC_B, TSN1_MDIO_B */
120662306a36Sopenharmony_ci	RCAR_GP_PIN(3, 5), RCAR_GP_PIN(3, 0),
120762306a36Sopenharmony_ci};
120862306a36Sopenharmony_cistatic const unsigned int tsn1_mdio_b_mux[] = {
120962306a36Sopenharmony_ci	TSN1_MDC_B_MARK, TSN1_MDIO_B_MARK,
121062306a36Sopenharmony_ci};
121162306a36Sopenharmony_cistatic const unsigned int tsn1_avtp_pps_pins[] = {
121262306a36Sopenharmony_ci	/* TSN1_AVTP_PPS */
121362306a36Sopenharmony_ci	RCAR_GP_PIN(3, 13),
121462306a36Sopenharmony_ci};
121562306a36Sopenharmony_cistatic const unsigned int tsn1_avtp_pps_mux[] = {
121662306a36Sopenharmony_ci	TSN1_AVTP_PPS_MARK,
121762306a36Sopenharmony_ci};
121862306a36Sopenharmony_cistatic const unsigned int tsn1_avtp_capture_a_pins[] = {
121962306a36Sopenharmony_ci	/* TSN1_AVTP_CAPTURE_A */
122062306a36Sopenharmony_ci	RCAR_GP_PIN(0, 7),
122162306a36Sopenharmony_ci};
122262306a36Sopenharmony_cistatic const unsigned int tsn1_avtp_capture_a_mux[] = {
122362306a36Sopenharmony_ci	TSN1_AVTP_CAPTURE_A_MARK,
122462306a36Sopenharmony_ci};
122562306a36Sopenharmony_cistatic const unsigned int tsn1_avtp_match_a_pins[] = {
122662306a36Sopenharmony_ci	/* TSN1_AVTP_MATCH_A */
122762306a36Sopenharmony_ci	RCAR_GP_PIN(0, 6),
122862306a36Sopenharmony_ci};
122962306a36Sopenharmony_cistatic const unsigned int tsn1_avtp_match_a_mux[] = {
123062306a36Sopenharmony_ci	TSN1_AVTP_MATCH_A_MARK,
123162306a36Sopenharmony_ci};
123262306a36Sopenharmony_cistatic const unsigned int tsn1_avtp_capture_b_pins[] = {
123362306a36Sopenharmony_ci	/* TSN1_AVTP_CAPTURE_B */
123462306a36Sopenharmony_ci	RCAR_GP_PIN(3, 15),
123562306a36Sopenharmony_ci};
123662306a36Sopenharmony_cistatic const unsigned int tsn1_avtp_capture_b_mux[] = {
123762306a36Sopenharmony_ci	TSN1_AVTP_CAPTURE_B_MARK,
123862306a36Sopenharmony_ci};
123962306a36Sopenharmony_cistatic const unsigned int tsn1_avtp_match_b_pins[] = {
124062306a36Sopenharmony_ci	/* TSN1_AVTP_MATCH_B */
124162306a36Sopenharmony_ci	RCAR_GP_PIN(3, 14),
124262306a36Sopenharmony_ci};
124362306a36Sopenharmony_cistatic const unsigned int tsn1_avtp_match_b_mux[] = {
124462306a36Sopenharmony_ci	TSN1_AVTP_MATCH_B_MARK,
124562306a36Sopenharmony_ci};
124662306a36Sopenharmony_ci
124762306a36Sopenharmony_ci/* - TSN2 ------------------------------------------------ */
124862306a36Sopenharmony_cistatic const unsigned int tsn2_link_a_pins[] = {
124962306a36Sopenharmony_ci	/* TSN2_LINK_A */
125062306a36Sopenharmony_ci	RCAR_GP_PIN(0, 16),
125162306a36Sopenharmony_ci};
125262306a36Sopenharmony_cistatic const unsigned int tsn2_link_a_mux[] = {
125362306a36Sopenharmony_ci	TSN2_LINK_A_MARK,
125462306a36Sopenharmony_ci};
125562306a36Sopenharmony_cistatic const unsigned int tsn2_phy_int_a_pins[] = {
125662306a36Sopenharmony_ci	/* TSN2_PHY_INT_A */
125762306a36Sopenharmony_ci	RCAR_GP_PIN(0, 20),
125862306a36Sopenharmony_ci};
125962306a36Sopenharmony_cistatic const unsigned int tsn2_phy_int_a_mux[] = {
126062306a36Sopenharmony_ci	TSN2_PHY_INT_A_MARK,
126162306a36Sopenharmony_ci};
126262306a36Sopenharmony_cistatic const unsigned int tsn2_mdio_a_pins[] = {
126362306a36Sopenharmony_ci	/* TSN2_MDC_A, TSN2_MDIO_A */
126462306a36Sopenharmony_ci	RCAR_GP_PIN(1, 2), RCAR_GP_PIN(1, 3),
126562306a36Sopenharmony_ci};
126662306a36Sopenharmony_cistatic const unsigned int tsn2_mdio_a_mux[] = {
126762306a36Sopenharmony_ci	TSN2_MDC_A_MARK, TSN2_MDIO_A_MARK,
126862306a36Sopenharmony_ci};
126962306a36Sopenharmony_cistatic const unsigned int tsn2_link_b_pins[] = {
127062306a36Sopenharmony_ci	/* TSN2_LINK_B */
127162306a36Sopenharmony_ci	RCAR_GP_PIN(3, 7),
127262306a36Sopenharmony_ci};
127362306a36Sopenharmony_cistatic const unsigned int tsn2_link_b_mux[] = {
127462306a36Sopenharmony_ci	TSN2_LINK_B_MARK,
127562306a36Sopenharmony_ci};
127662306a36Sopenharmony_cistatic const unsigned int tsn2_phy_int_b_pins[] = {
127762306a36Sopenharmony_ci	/* TSN2_PHY_INT_B */
127862306a36Sopenharmony_ci	RCAR_GP_PIN(3, 9),
127962306a36Sopenharmony_ci};
128062306a36Sopenharmony_cistatic const unsigned int tsn2_phy_int_b_mux[] = {
128162306a36Sopenharmony_ci	TSN2_PHY_INT_B_MARK,
128262306a36Sopenharmony_ci};
128362306a36Sopenharmony_cistatic const unsigned int tsn2_mdio_b_pins[] = {
128462306a36Sopenharmony_ci	/* TSN2_MDC_B, TSN2_MDIO_B */
128562306a36Sopenharmony_ci	RCAR_GP_PIN(3, 3), RCAR_GP_PIN(3, 1),
128662306a36Sopenharmony_ci};
128762306a36Sopenharmony_cistatic const unsigned int tsn2_mdio_b_mux[] = {
128862306a36Sopenharmony_ci	TSN2_MDC_B_MARK, TSN2_MDIO_B_MARK,
128962306a36Sopenharmony_ci};
129062306a36Sopenharmony_ci
129162306a36Sopenharmony_cistatic const struct sh_pfc_pin_group pinmux_groups[] = {
129262306a36Sopenharmony_ci	SH_PFC_PIN_GROUP(hscif0_data),
129362306a36Sopenharmony_ci	SH_PFC_PIN_GROUP(hscif0_clk),
129462306a36Sopenharmony_ci	SH_PFC_PIN_GROUP(hscif0_ctrl),
129562306a36Sopenharmony_ci	SH_PFC_PIN_GROUP(hscif1_data),
129662306a36Sopenharmony_ci	SH_PFC_PIN_GROUP(hscif1_clk),
129762306a36Sopenharmony_ci	SH_PFC_PIN_GROUP(hscif1_ctrl),
129862306a36Sopenharmony_ci	SH_PFC_PIN_GROUP(hscif2_data),
129962306a36Sopenharmony_ci	SH_PFC_PIN_GROUP(hscif2_clk),
130062306a36Sopenharmony_ci	SH_PFC_PIN_GROUP(hscif2_ctrl),
130162306a36Sopenharmony_ci	SH_PFC_PIN_GROUP(hscif3_data),
130262306a36Sopenharmony_ci	SH_PFC_PIN_GROUP(hscif3_clk),
130362306a36Sopenharmony_ci	SH_PFC_PIN_GROUP(hscif3_ctrl),
130462306a36Sopenharmony_ci	SH_PFC_PIN_GROUP(i2c0),
130562306a36Sopenharmony_ci	SH_PFC_PIN_GROUP(i2c1),
130662306a36Sopenharmony_ci	SH_PFC_PIN_GROUP(i2c2),
130762306a36Sopenharmony_ci	SH_PFC_PIN_GROUP(i2c3),
130862306a36Sopenharmony_ci	SH_PFC_PIN_GROUP(i2c4),
130962306a36Sopenharmony_ci	SH_PFC_PIN_GROUP(i2c5),
131062306a36Sopenharmony_ci	SH_PFC_PIN_GROUP(intc_ex_irq0),
131162306a36Sopenharmony_ci	SH_PFC_PIN_GROUP(intc_ex_irq1),
131262306a36Sopenharmony_ci	SH_PFC_PIN_GROUP(intc_ex_irq2),
131362306a36Sopenharmony_ci	SH_PFC_PIN_GROUP(intc_ex_irq3),
131462306a36Sopenharmony_ci	SH_PFC_PIN_GROUP(intc_ex_irq4),
131562306a36Sopenharmony_ci	SH_PFC_PIN_GROUP(intc_ex_irq5),
131662306a36Sopenharmony_ci	BUS_DATA_PIN_GROUP(mmc_data, 1),
131762306a36Sopenharmony_ci	BUS_DATA_PIN_GROUP(mmc_data, 4),
131862306a36Sopenharmony_ci	BUS_DATA_PIN_GROUP(mmc_data, 8),
131962306a36Sopenharmony_ci	SH_PFC_PIN_GROUP(mmc_ctrl),
132062306a36Sopenharmony_ci	SH_PFC_PIN_GROUP(mmc_cd),
132162306a36Sopenharmony_ci	SH_PFC_PIN_GROUP(mmc_wp),
132262306a36Sopenharmony_ci	SH_PFC_PIN_GROUP(mmc_ds),
132362306a36Sopenharmony_ci	SH_PFC_PIN_GROUP(msiof0_clk),
132462306a36Sopenharmony_ci	SH_PFC_PIN_GROUP(msiof0_sync),
132562306a36Sopenharmony_ci	SH_PFC_PIN_GROUP(msiof0_ss1),
132662306a36Sopenharmony_ci	SH_PFC_PIN_GROUP(msiof0_ss2),
132762306a36Sopenharmony_ci	SH_PFC_PIN_GROUP(msiof0_txd),
132862306a36Sopenharmony_ci	SH_PFC_PIN_GROUP(msiof0_rxd),
132962306a36Sopenharmony_ci	SH_PFC_PIN_GROUP(msiof1_clk),
133062306a36Sopenharmony_ci	SH_PFC_PIN_GROUP(msiof1_sync),
133162306a36Sopenharmony_ci	SH_PFC_PIN_GROUP(msiof1_ss1),
133262306a36Sopenharmony_ci	SH_PFC_PIN_GROUP(msiof1_ss2),
133362306a36Sopenharmony_ci	SH_PFC_PIN_GROUP(msiof1_txd),
133462306a36Sopenharmony_ci	SH_PFC_PIN_GROUP(msiof1_rxd),
133562306a36Sopenharmony_ci	SH_PFC_PIN_GROUP(msiof2_clk),
133662306a36Sopenharmony_ci	SH_PFC_PIN_GROUP(msiof2_sync),
133762306a36Sopenharmony_ci	SH_PFC_PIN_GROUP(msiof2_ss1),
133862306a36Sopenharmony_ci	SH_PFC_PIN_GROUP(msiof2_ss2),
133962306a36Sopenharmony_ci	SH_PFC_PIN_GROUP(msiof2_txd),
134062306a36Sopenharmony_ci	SH_PFC_PIN_GROUP(msiof2_rxd),
134162306a36Sopenharmony_ci	SH_PFC_PIN_GROUP(msiof3_clk),
134262306a36Sopenharmony_ci	SH_PFC_PIN_GROUP(msiof3_sync),
134362306a36Sopenharmony_ci	SH_PFC_PIN_GROUP(msiof3_ss1),
134462306a36Sopenharmony_ci	SH_PFC_PIN_GROUP(msiof3_ss2),
134562306a36Sopenharmony_ci	SH_PFC_PIN_GROUP(msiof3_txd),
134662306a36Sopenharmony_ci	SH_PFC_PIN_GROUP(msiof3_rxd),
134762306a36Sopenharmony_ci	SH_PFC_PIN_GROUP(pcie0_clkreq_n),
134862306a36Sopenharmony_ci	SH_PFC_PIN_GROUP(pcie1_clkreq_n),
134962306a36Sopenharmony_ci	SH_PFC_PIN_GROUP(qspi0_ctrl),
135062306a36Sopenharmony_ci	BUS_DATA_PIN_GROUP(qspi0_data, 2),
135162306a36Sopenharmony_ci	BUS_DATA_PIN_GROUP(qspi0_data, 4),
135262306a36Sopenharmony_ci	SH_PFC_PIN_GROUP(qspi1_ctrl),
135362306a36Sopenharmony_ci	BUS_DATA_PIN_GROUP(qspi1_data, 2),
135462306a36Sopenharmony_ci	BUS_DATA_PIN_GROUP(qspi1_data, 4),
135562306a36Sopenharmony_ci	SH_PFC_PIN_GROUP(scif0_data),
135662306a36Sopenharmony_ci	SH_PFC_PIN_GROUP(scif0_clk),
135762306a36Sopenharmony_ci	SH_PFC_PIN_GROUP(scif0_ctrl),
135862306a36Sopenharmony_ci	SH_PFC_PIN_GROUP(scif1_data),
135962306a36Sopenharmony_ci	SH_PFC_PIN_GROUP(scif1_clk),
136062306a36Sopenharmony_ci	SH_PFC_PIN_GROUP(scif1_ctrl),
136162306a36Sopenharmony_ci	SH_PFC_PIN_GROUP(scif3_data),
136262306a36Sopenharmony_ci	SH_PFC_PIN_GROUP(scif3_clk),
136362306a36Sopenharmony_ci	SH_PFC_PIN_GROUP(scif3_ctrl),
136462306a36Sopenharmony_ci	SH_PFC_PIN_GROUP(scif4_data),
136562306a36Sopenharmony_ci	SH_PFC_PIN_GROUP(scif4_clk),
136662306a36Sopenharmony_ci	SH_PFC_PIN_GROUP(scif4_ctrl),
136762306a36Sopenharmony_ci	SH_PFC_PIN_GROUP(scif_clk),
136862306a36Sopenharmony_ci	SH_PFC_PIN_GROUP(tsn0_link_a),
136962306a36Sopenharmony_ci	SH_PFC_PIN_GROUP(tsn0_magic_a),
137062306a36Sopenharmony_ci	SH_PFC_PIN_GROUP(tsn0_phy_int_a),
137162306a36Sopenharmony_ci	SH_PFC_PIN_GROUP(tsn0_mdio_a),
137262306a36Sopenharmony_ci	SH_PFC_PIN_GROUP(tsn0_link_b),
137362306a36Sopenharmony_ci	SH_PFC_PIN_GROUP(tsn0_magic_b),
137462306a36Sopenharmony_ci	SH_PFC_PIN_GROUP(tsn0_phy_int_b),
137562306a36Sopenharmony_ci	SH_PFC_PIN_GROUP(tsn0_mdio_b),
137662306a36Sopenharmony_ci	SH_PFC_PIN_GROUP(tsn0_avtp_pps),
137762306a36Sopenharmony_ci	SH_PFC_PIN_GROUP(tsn0_avtp_capture_a),
137862306a36Sopenharmony_ci	SH_PFC_PIN_GROUP(tsn0_avtp_match_a),
137962306a36Sopenharmony_ci	SH_PFC_PIN_GROUP(tsn0_avtp_capture_b),
138062306a36Sopenharmony_ci	SH_PFC_PIN_GROUP(tsn0_avtp_match_b),
138162306a36Sopenharmony_ci	SH_PFC_PIN_GROUP(tsn1_link_a),
138262306a36Sopenharmony_ci	SH_PFC_PIN_GROUP(tsn1_phy_int_a),
138362306a36Sopenharmony_ci	SH_PFC_PIN_GROUP(tsn1_mdio_a),
138462306a36Sopenharmony_ci	SH_PFC_PIN_GROUP(tsn1_link_b),
138562306a36Sopenharmony_ci	SH_PFC_PIN_GROUP(tsn1_phy_int_b),
138662306a36Sopenharmony_ci	SH_PFC_PIN_GROUP(tsn1_mdio_b),
138762306a36Sopenharmony_ci	SH_PFC_PIN_GROUP(tsn1_avtp_pps),
138862306a36Sopenharmony_ci	SH_PFC_PIN_GROUP(tsn1_avtp_capture_a),
138962306a36Sopenharmony_ci	SH_PFC_PIN_GROUP(tsn1_avtp_match_a),
139062306a36Sopenharmony_ci	SH_PFC_PIN_GROUP(tsn1_avtp_capture_b),
139162306a36Sopenharmony_ci	SH_PFC_PIN_GROUP(tsn1_avtp_match_b),
139262306a36Sopenharmony_ci	SH_PFC_PIN_GROUP(tsn2_link_a),
139362306a36Sopenharmony_ci	SH_PFC_PIN_GROUP(tsn2_phy_int_a),
139462306a36Sopenharmony_ci	SH_PFC_PIN_GROUP(tsn2_mdio_a),
139562306a36Sopenharmony_ci	SH_PFC_PIN_GROUP(tsn2_link_b),
139662306a36Sopenharmony_ci	SH_PFC_PIN_GROUP(tsn2_phy_int_b),
139762306a36Sopenharmony_ci	SH_PFC_PIN_GROUP(tsn2_mdio_b),
139862306a36Sopenharmony_ci};
139962306a36Sopenharmony_ci
140062306a36Sopenharmony_cistatic const char * const hscif0_groups[] = {
140162306a36Sopenharmony_ci	"hscif0_data",
140262306a36Sopenharmony_ci	"hscif0_clk",
140362306a36Sopenharmony_ci	"hscif0_ctrl",
140462306a36Sopenharmony_ci};
140562306a36Sopenharmony_ci
140662306a36Sopenharmony_cistatic const char * const hscif1_groups[] = {
140762306a36Sopenharmony_ci	"hscif1_data",
140862306a36Sopenharmony_ci	"hscif1_clk",
140962306a36Sopenharmony_ci	"hscif1_ctrl",
141062306a36Sopenharmony_ci};
141162306a36Sopenharmony_ci
141262306a36Sopenharmony_cistatic const char * const hscif2_groups[] = {
141362306a36Sopenharmony_ci	"hscif2_data",
141462306a36Sopenharmony_ci	"hscif2_clk",
141562306a36Sopenharmony_ci	"hscif2_ctrl",
141662306a36Sopenharmony_ci};
141762306a36Sopenharmony_ci
141862306a36Sopenharmony_cistatic const char * const hscif3_groups[] = {
141962306a36Sopenharmony_ci	"hscif3_data",
142062306a36Sopenharmony_ci	"hscif3_clk",
142162306a36Sopenharmony_ci	"hscif3_ctrl",
142262306a36Sopenharmony_ci};
142362306a36Sopenharmony_ci
142462306a36Sopenharmony_cistatic const char * const i2c0_groups[] = {
142562306a36Sopenharmony_ci	"i2c0",
142662306a36Sopenharmony_ci};
142762306a36Sopenharmony_ci
142862306a36Sopenharmony_cistatic const char * const i2c1_groups[] = {
142962306a36Sopenharmony_ci	"i2c1",
143062306a36Sopenharmony_ci};
143162306a36Sopenharmony_ci
143262306a36Sopenharmony_cistatic const char * const i2c2_groups[] = {
143362306a36Sopenharmony_ci	"i2c2",
143462306a36Sopenharmony_ci};
143562306a36Sopenharmony_ci
143662306a36Sopenharmony_cistatic const char * const i2c3_groups[] = {
143762306a36Sopenharmony_ci	"i2c3",
143862306a36Sopenharmony_ci};
143962306a36Sopenharmony_ci
144062306a36Sopenharmony_cistatic const char * const i2c4_groups[] = {
144162306a36Sopenharmony_ci	"i2c4",
144262306a36Sopenharmony_ci};
144362306a36Sopenharmony_ci
144462306a36Sopenharmony_cistatic const char * const i2c5_groups[] = {
144562306a36Sopenharmony_ci	"i2c5",
144662306a36Sopenharmony_ci};
144762306a36Sopenharmony_ci
144862306a36Sopenharmony_cistatic const char * const intc_ex_groups[] = {
144962306a36Sopenharmony_ci	"intc_ex_irq0",
145062306a36Sopenharmony_ci	"intc_ex_irq1",
145162306a36Sopenharmony_ci	"intc_ex_irq2",
145262306a36Sopenharmony_ci	"intc_ex_irq3",
145362306a36Sopenharmony_ci	"intc_ex_irq4",
145462306a36Sopenharmony_ci	"intc_ex_irq5",
145562306a36Sopenharmony_ci};
145662306a36Sopenharmony_ci
145762306a36Sopenharmony_cistatic const char * const mmc_groups[] = {
145862306a36Sopenharmony_ci	"mmc_data1",
145962306a36Sopenharmony_ci	"mmc_data4",
146062306a36Sopenharmony_ci	"mmc_data8",
146162306a36Sopenharmony_ci	"mmc_ctrl",
146262306a36Sopenharmony_ci	"mmc_cd",
146362306a36Sopenharmony_ci	"mmc_wp",
146462306a36Sopenharmony_ci	"mmc_ds",
146562306a36Sopenharmony_ci};
146662306a36Sopenharmony_ci
146762306a36Sopenharmony_cistatic const char * const msiof0_groups[] = {
146862306a36Sopenharmony_ci	"msiof0_clk",
146962306a36Sopenharmony_ci	"msiof0_sync",
147062306a36Sopenharmony_ci	"msiof0_ss1",
147162306a36Sopenharmony_ci	"msiof0_ss2",
147262306a36Sopenharmony_ci	"msiof0_txd",
147362306a36Sopenharmony_ci	"msiof0_rxd",
147462306a36Sopenharmony_ci};
147562306a36Sopenharmony_ci
147662306a36Sopenharmony_cistatic const char * const msiof1_groups[] = {
147762306a36Sopenharmony_ci	"msiof1_clk",
147862306a36Sopenharmony_ci	"msiof1_sync",
147962306a36Sopenharmony_ci	"msiof1_ss1",
148062306a36Sopenharmony_ci	"msiof1_ss2",
148162306a36Sopenharmony_ci	"msiof1_txd",
148262306a36Sopenharmony_ci	"msiof1_rxd",
148362306a36Sopenharmony_ci};
148462306a36Sopenharmony_ci
148562306a36Sopenharmony_cistatic const char * const msiof2_groups[] = {
148662306a36Sopenharmony_ci	"msiof2_clk",
148762306a36Sopenharmony_ci	"msiof2_sync",
148862306a36Sopenharmony_ci	"msiof2_ss1",
148962306a36Sopenharmony_ci	"msiof2_ss2",
149062306a36Sopenharmony_ci	"msiof2_txd",
149162306a36Sopenharmony_ci	"msiof2_rxd",
149262306a36Sopenharmony_ci};
149362306a36Sopenharmony_ci
149462306a36Sopenharmony_cistatic const char * const msiof3_groups[] = {
149562306a36Sopenharmony_ci	"msiof3_clk",
149662306a36Sopenharmony_ci	"msiof3_sync",
149762306a36Sopenharmony_ci	"msiof3_ss1",
149862306a36Sopenharmony_ci	"msiof3_ss2",
149962306a36Sopenharmony_ci	"msiof3_txd",
150062306a36Sopenharmony_ci	"msiof3_rxd",
150162306a36Sopenharmony_ci};
150262306a36Sopenharmony_ci
150362306a36Sopenharmony_cistatic const char * const pcie_groups[] = {
150462306a36Sopenharmony_ci	"pcie0_clkreq_n",
150562306a36Sopenharmony_ci	"pcie1_clkreq_n",
150662306a36Sopenharmony_ci};
150762306a36Sopenharmony_ci
150862306a36Sopenharmony_cistatic const char * const qspi0_groups[] = {
150962306a36Sopenharmony_ci	"qspi0_ctrl",
151062306a36Sopenharmony_ci	"qspi0_data2",
151162306a36Sopenharmony_ci	"qspi0_data4",
151262306a36Sopenharmony_ci};
151362306a36Sopenharmony_ci
151462306a36Sopenharmony_cistatic const char * const qspi1_groups[] = {
151562306a36Sopenharmony_ci	"qspi1_ctrl",
151662306a36Sopenharmony_ci	"qspi1_data2",
151762306a36Sopenharmony_ci	"qspi1_data4",
151862306a36Sopenharmony_ci};
151962306a36Sopenharmony_ci
152062306a36Sopenharmony_cistatic const char * const scif0_groups[] = {
152162306a36Sopenharmony_ci	"scif0_data",
152262306a36Sopenharmony_ci	"scif0_clk",
152362306a36Sopenharmony_ci	"scif0_ctrl",
152462306a36Sopenharmony_ci};
152562306a36Sopenharmony_ci
152662306a36Sopenharmony_cistatic const char * const scif1_groups[] = {
152762306a36Sopenharmony_ci	"scif1_data",
152862306a36Sopenharmony_ci	"scif1_clk",
152962306a36Sopenharmony_ci	"scif1_ctrl",
153062306a36Sopenharmony_ci};
153162306a36Sopenharmony_ci
153262306a36Sopenharmony_cistatic const char * const scif3_groups[] = {
153362306a36Sopenharmony_ci	"scif3_data",
153462306a36Sopenharmony_ci	"scif3_clk",
153562306a36Sopenharmony_ci	"scif3_ctrl",
153662306a36Sopenharmony_ci};
153762306a36Sopenharmony_ci
153862306a36Sopenharmony_cistatic const char * const scif4_groups[] = {
153962306a36Sopenharmony_ci	"scif4_data",
154062306a36Sopenharmony_ci	"scif4_clk",
154162306a36Sopenharmony_ci	"scif4_ctrl",
154262306a36Sopenharmony_ci};
154362306a36Sopenharmony_ci
154462306a36Sopenharmony_cistatic const char * const scif_clk_groups[] = {
154562306a36Sopenharmony_ci	"scif_clk",
154662306a36Sopenharmony_ci};
154762306a36Sopenharmony_ci
154862306a36Sopenharmony_cistatic const char * const tsn0_groups[] = {
154962306a36Sopenharmony_ci	"tsn0_link_a",
155062306a36Sopenharmony_ci	"tsn0_magic_a",
155162306a36Sopenharmony_ci	"tsn0_phy_int_a",
155262306a36Sopenharmony_ci	"tsn0_mdio_a",
155362306a36Sopenharmony_ci	"tsn0_link_b",
155462306a36Sopenharmony_ci	"tsn0_magic_b",
155562306a36Sopenharmony_ci	"tsn0_phy_int_b",
155662306a36Sopenharmony_ci	"tsn0_mdio_b",
155762306a36Sopenharmony_ci	"tsn0_avtp_pps",
155862306a36Sopenharmony_ci	"tsn0_avtp_capture_a",
155962306a36Sopenharmony_ci	"tsn0_avtp_match_a",
156062306a36Sopenharmony_ci	"tsn0_avtp_capture_b",
156162306a36Sopenharmony_ci	"tsn0_avtp_match_b",
156262306a36Sopenharmony_ci};
156362306a36Sopenharmony_ci
156462306a36Sopenharmony_cistatic const char * const tsn1_groups[] = {
156562306a36Sopenharmony_ci	"tsn1_link_a",
156662306a36Sopenharmony_ci	"tsn1_phy_int_a",
156762306a36Sopenharmony_ci	"tsn1_mdio_a",
156862306a36Sopenharmony_ci	"tsn1_link_b",
156962306a36Sopenharmony_ci	"tsn1_phy_int_b",
157062306a36Sopenharmony_ci	"tsn1_mdio_b",
157162306a36Sopenharmony_ci	"tsn1_avtp_pps",
157262306a36Sopenharmony_ci	"tsn1_avtp_capture_a",
157362306a36Sopenharmony_ci	"tsn1_avtp_match_a",
157462306a36Sopenharmony_ci	"tsn1_avtp_capture_b",
157562306a36Sopenharmony_ci	"tsn1_avtp_match_b",
157662306a36Sopenharmony_ci};
157762306a36Sopenharmony_ci
157862306a36Sopenharmony_cistatic const char * const tsn2_groups[] = {
157962306a36Sopenharmony_ci	"tsn2_link_a",
158062306a36Sopenharmony_ci	"tsn2_phy_int_a",
158162306a36Sopenharmony_ci	"tsn2_mdio_a",
158262306a36Sopenharmony_ci	"tsn2_link_b",
158362306a36Sopenharmony_ci	"tsn2_phy_int_b",
158462306a36Sopenharmony_ci	"tsn2_mdio_b",
158562306a36Sopenharmony_ci};
158662306a36Sopenharmony_ci
158762306a36Sopenharmony_cistatic const struct sh_pfc_function pinmux_functions[] = {
158862306a36Sopenharmony_ci	SH_PFC_FUNCTION(hscif0),
158962306a36Sopenharmony_ci	SH_PFC_FUNCTION(hscif1),
159062306a36Sopenharmony_ci	SH_PFC_FUNCTION(hscif2),
159162306a36Sopenharmony_ci	SH_PFC_FUNCTION(hscif3),
159262306a36Sopenharmony_ci	SH_PFC_FUNCTION(i2c0),
159362306a36Sopenharmony_ci	SH_PFC_FUNCTION(i2c1),
159462306a36Sopenharmony_ci	SH_PFC_FUNCTION(i2c2),
159562306a36Sopenharmony_ci	SH_PFC_FUNCTION(i2c3),
159662306a36Sopenharmony_ci	SH_PFC_FUNCTION(i2c4),
159762306a36Sopenharmony_ci	SH_PFC_FUNCTION(i2c5),
159862306a36Sopenharmony_ci	SH_PFC_FUNCTION(intc_ex),
159962306a36Sopenharmony_ci	SH_PFC_FUNCTION(mmc),
160062306a36Sopenharmony_ci	SH_PFC_FUNCTION(msiof0),
160162306a36Sopenharmony_ci	SH_PFC_FUNCTION(msiof1),
160262306a36Sopenharmony_ci	SH_PFC_FUNCTION(msiof2),
160362306a36Sopenharmony_ci	SH_PFC_FUNCTION(msiof3),
160462306a36Sopenharmony_ci	SH_PFC_FUNCTION(pcie),
160562306a36Sopenharmony_ci	SH_PFC_FUNCTION(qspi0),
160662306a36Sopenharmony_ci	SH_PFC_FUNCTION(qspi1),
160762306a36Sopenharmony_ci	SH_PFC_FUNCTION(scif0),
160862306a36Sopenharmony_ci	SH_PFC_FUNCTION(scif1),
160962306a36Sopenharmony_ci	SH_PFC_FUNCTION(scif3),
161062306a36Sopenharmony_ci	SH_PFC_FUNCTION(scif4),
161162306a36Sopenharmony_ci	SH_PFC_FUNCTION(scif_clk),
161262306a36Sopenharmony_ci	SH_PFC_FUNCTION(tsn0),
161362306a36Sopenharmony_ci	SH_PFC_FUNCTION(tsn1),
161462306a36Sopenharmony_ci	SH_PFC_FUNCTION(tsn2),
161562306a36Sopenharmony_ci};
161662306a36Sopenharmony_ci
161762306a36Sopenharmony_cistatic const struct pinmux_cfg_reg pinmux_config_regs[] = {
161862306a36Sopenharmony_ci#define F_(x, y)	FN_##y
161962306a36Sopenharmony_ci#define FM(x)		FN_##x
162062306a36Sopenharmony_ci	{ PINMUX_CFG_REG_VAR("GPSR0", 0xe6050040, 32,
162162306a36Sopenharmony_ci			     GROUP(-11, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
162262306a36Sopenharmony_ci				   1, 1, 1, 1, 1, 1, 1, 1, 1, 1),
162362306a36Sopenharmony_ci			     GROUP(
162462306a36Sopenharmony_ci		/* GP0_31_21 RESERVED */
162562306a36Sopenharmony_ci		GP_0_20_FN,	GPSR0_20,
162662306a36Sopenharmony_ci		GP_0_19_FN,	GPSR0_19,
162762306a36Sopenharmony_ci		GP_0_18_FN,	GPSR0_18,
162862306a36Sopenharmony_ci		GP_0_17_FN,	GPSR0_17,
162962306a36Sopenharmony_ci		GP_0_16_FN,	GPSR0_16,
163062306a36Sopenharmony_ci		GP_0_15_FN,	GPSR0_15,
163162306a36Sopenharmony_ci		GP_0_14_FN,	GPSR0_14,
163262306a36Sopenharmony_ci		GP_0_13_FN,	GPSR0_13,
163362306a36Sopenharmony_ci		GP_0_12_FN,	GPSR0_12,
163462306a36Sopenharmony_ci		GP_0_11_FN,	GPSR0_11,
163562306a36Sopenharmony_ci		GP_0_10_FN,	GPSR0_10,
163662306a36Sopenharmony_ci		GP_0_9_FN,	GPSR0_9,
163762306a36Sopenharmony_ci		GP_0_8_FN,	GPSR0_8,
163862306a36Sopenharmony_ci		GP_0_7_FN,	GPSR0_7,
163962306a36Sopenharmony_ci		GP_0_6_FN,	GPSR0_6,
164062306a36Sopenharmony_ci		GP_0_5_FN,	GPSR0_5,
164162306a36Sopenharmony_ci		GP_0_4_FN,	GPSR0_4,
164262306a36Sopenharmony_ci		GP_0_3_FN,	GPSR0_3,
164362306a36Sopenharmony_ci		GP_0_2_FN,	GPSR0_2,
164462306a36Sopenharmony_ci		GP_0_1_FN,	GPSR0_1,
164562306a36Sopenharmony_ci		GP_0_0_FN,	GPSR0_0, ))
164662306a36Sopenharmony_ci	},
164762306a36Sopenharmony_ci	{ PINMUX_CFG_REG_VAR("GPSR1", 0xe6050840, 32,
164862306a36Sopenharmony_ci			     GROUP(-7, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
164962306a36Sopenharmony_ci				   1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1),
165062306a36Sopenharmony_ci			     GROUP(
165162306a36Sopenharmony_ci		/* GP1_31_25 RESERVED */
165262306a36Sopenharmony_ci		GP_1_24_FN,	GPSR1_24,
165362306a36Sopenharmony_ci		GP_1_23_FN,	GPSR1_23,
165462306a36Sopenharmony_ci		GP_1_22_FN,	GPSR1_22,
165562306a36Sopenharmony_ci		GP_1_21_FN,	GPSR1_21,
165662306a36Sopenharmony_ci		GP_1_20_FN,	GPSR1_20,
165762306a36Sopenharmony_ci		GP_1_19_FN,	GPSR1_19,
165862306a36Sopenharmony_ci		GP_1_18_FN,	GPSR1_18,
165962306a36Sopenharmony_ci		GP_1_17_FN,	GPSR1_17,
166062306a36Sopenharmony_ci		GP_1_16_FN,	GPSR1_16,
166162306a36Sopenharmony_ci		GP_1_15_FN,	GPSR1_15,
166262306a36Sopenharmony_ci		GP_1_14_FN,	GPSR1_14,
166362306a36Sopenharmony_ci		GP_1_13_FN,	GPSR1_13,
166462306a36Sopenharmony_ci		GP_1_12_FN,	GPSR1_12,
166562306a36Sopenharmony_ci		GP_1_11_FN,	GPSR1_11,
166662306a36Sopenharmony_ci		GP_1_10_FN,	GPSR1_10,
166762306a36Sopenharmony_ci		GP_1_9_FN,	GPSR1_9,
166862306a36Sopenharmony_ci		GP_1_8_FN,	GPSR1_8,
166962306a36Sopenharmony_ci		GP_1_7_FN,	GPSR1_7,
167062306a36Sopenharmony_ci		GP_1_6_FN,	GPSR1_6,
167162306a36Sopenharmony_ci		GP_1_5_FN,	GPSR1_5,
167262306a36Sopenharmony_ci		GP_1_4_FN,	GPSR1_4,
167362306a36Sopenharmony_ci		GP_1_3_FN,	GPSR1_3,
167462306a36Sopenharmony_ci		GP_1_2_FN,	GPSR1_2,
167562306a36Sopenharmony_ci		GP_1_1_FN,	GPSR1_1,
167662306a36Sopenharmony_ci		GP_1_0_FN,	GPSR1_0, ))
167762306a36Sopenharmony_ci	},
167862306a36Sopenharmony_ci	{ PINMUX_CFG_REG_VAR("GPSR2", 0xe6051040, 32,
167962306a36Sopenharmony_ci			     GROUP(-15, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
168062306a36Sopenharmony_ci				   1, 1, 1, 1, 1, 1),
168162306a36Sopenharmony_ci			     GROUP(
168262306a36Sopenharmony_ci		/* GP2_31_17 RESERVED */
168362306a36Sopenharmony_ci		GP_2_16_FN,	GPSR2_16,
168462306a36Sopenharmony_ci		GP_2_15_FN,	GPSR2_15,
168562306a36Sopenharmony_ci		GP_2_14_FN,	GPSR2_14,
168662306a36Sopenharmony_ci		GP_2_13_FN,	GPSR2_13,
168762306a36Sopenharmony_ci		GP_2_12_FN,	GPSR2_12,
168862306a36Sopenharmony_ci		GP_2_11_FN,	GPSR2_11,
168962306a36Sopenharmony_ci		GP_2_10_FN,	GPSR2_10,
169062306a36Sopenharmony_ci		GP_2_9_FN,	GPSR2_9,
169162306a36Sopenharmony_ci		GP_2_8_FN,	GPSR2_8,
169262306a36Sopenharmony_ci		GP_2_7_FN,	GPSR2_7,
169362306a36Sopenharmony_ci		GP_2_6_FN,	GPSR2_6,
169462306a36Sopenharmony_ci		GP_2_5_FN,	GPSR2_5,
169562306a36Sopenharmony_ci		GP_2_4_FN,	GPSR2_4,
169662306a36Sopenharmony_ci		GP_2_3_FN,	GPSR2_3,
169762306a36Sopenharmony_ci		GP_2_2_FN,	GPSR2_2,
169862306a36Sopenharmony_ci		GP_2_1_FN,	GPSR2_1,
169962306a36Sopenharmony_ci		GP_2_0_FN,	GPSR2_0, ))
170062306a36Sopenharmony_ci	},
170162306a36Sopenharmony_ci	{ PINMUX_CFG_REG_VAR("GPSR3", 0xe6051840, 32,
170262306a36Sopenharmony_ci			     GROUP(-13, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
170362306a36Sopenharmony_ci				   1, 1, 1, 1, 1, 1, 1, 1),
170462306a36Sopenharmony_ci			     GROUP(
170562306a36Sopenharmony_ci		/* GP3_31_19 RESERVED */
170662306a36Sopenharmony_ci		GP_3_18_FN,	GPSR3_18,
170762306a36Sopenharmony_ci		GP_3_17_FN,	GPSR3_17,
170862306a36Sopenharmony_ci		GP_3_16_FN,	GPSR3_16,
170962306a36Sopenharmony_ci		GP_3_15_FN,	GPSR3_15,
171062306a36Sopenharmony_ci		GP_3_14_FN,	GPSR3_14,
171162306a36Sopenharmony_ci		GP_3_13_FN,	GPSR3_13,
171262306a36Sopenharmony_ci		GP_3_12_FN,	GPSR3_12,
171362306a36Sopenharmony_ci		GP_3_11_FN,	GPSR3_11,
171462306a36Sopenharmony_ci		GP_3_10_FN,	GPSR3_10,
171562306a36Sopenharmony_ci		GP_3_9_FN,	GPSR3_9,
171662306a36Sopenharmony_ci		GP_3_8_FN,	GPSR3_8,
171762306a36Sopenharmony_ci		GP_3_7_FN,	GPSR3_7,
171862306a36Sopenharmony_ci		GP_3_6_FN,	GPSR3_6,
171962306a36Sopenharmony_ci		GP_3_5_FN,	GPSR3_5,
172062306a36Sopenharmony_ci		GP_3_4_FN,	GPSR3_4,
172162306a36Sopenharmony_ci		GP_3_3_FN,	GPSR3_3,
172262306a36Sopenharmony_ci		GP_3_2_FN,	GPSR3_2,
172362306a36Sopenharmony_ci		GP_3_1_FN,	GPSR3_1,
172462306a36Sopenharmony_ci		GP_3_0_FN,	GPSR3_0, ))
172562306a36Sopenharmony_ci	},
172662306a36Sopenharmony_ci#undef F_
172762306a36Sopenharmony_ci#undef FM
172862306a36Sopenharmony_ci
172962306a36Sopenharmony_ci#define F_(x, y)	x,
173062306a36Sopenharmony_ci#define FM(x)		FN_##x,
173162306a36Sopenharmony_ci	{ PINMUX_CFG_REG("IP0SR0", 0xe6050060, 32, 4, GROUP(
173262306a36Sopenharmony_ci		IP0SR0_31_28
173362306a36Sopenharmony_ci		IP0SR0_27_24
173462306a36Sopenharmony_ci		IP0SR0_23_20
173562306a36Sopenharmony_ci		IP0SR0_19_16
173662306a36Sopenharmony_ci		IP0SR0_15_12
173762306a36Sopenharmony_ci		IP0SR0_11_8
173862306a36Sopenharmony_ci		IP0SR0_7_4
173962306a36Sopenharmony_ci		IP0SR0_3_0))
174062306a36Sopenharmony_ci	},
174162306a36Sopenharmony_ci	{ PINMUX_CFG_REG("IP1SR0", 0xe6050064, 32, 4, GROUP(
174262306a36Sopenharmony_ci		IP1SR0_31_28
174362306a36Sopenharmony_ci		IP1SR0_27_24
174462306a36Sopenharmony_ci		IP1SR0_23_20
174562306a36Sopenharmony_ci		IP1SR0_19_16
174662306a36Sopenharmony_ci		IP1SR0_15_12
174762306a36Sopenharmony_ci		IP1SR0_11_8
174862306a36Sopenharmony_ci		IP1SR0_7_4
174962306a36Sopenharmony_ci		IP1SR0_3_0))
175062306a36Sopenharmony_ci	},
175162306a36Sopenharmony_ci	{ PINMUX_CFG_REG_VAR("IP2SR0", 0xe6050068, 32,
175262306a36Sopenharmony_ci			     GROUP(-12, 4, 4, 4, 4, 4),
175362306a36Sopenharmony_ci			     GROUP(
175462306a36Sopenharmony_ci		/* IP2SR0_31_20 RESERVED */
175562306a36Sopenharmony_ci		IP2SR0_19_16
175662306a36Sopenharmony_ci		IP2SR0_15_12
175762306a36Sopenharmony_ci		IP2SR0_11_8
175862306a36Sopenharmony_ci		IP2SR0_7_4
175962306a36Sopenharmony_ci		IP2SR0_3_0))
176062306a36Sopenharmony_ci	},
176162306a36Sopenharmony_ci	{ PINMUX_CFG_REG("IP0SR1", 0xe6050860, 32, 4, GROUP(
176262306a36Sopenharmony_ci		IP0SR1_31_28
176362306a36Sopenharmony_ci		IP0SR1_27_24
176462306a36Sopenharmony_ci		IP0SR1_23_20
176562306a36Sopenharmony_ci		IP0SR1_19_16
176662306a36Sopenharmony_ci		IP0SR1_15_12
176762306a36Sopenharmony_ci		IP0SR1_11_8
176862306a36Sopenharmony_ci		IP0SR1_7_4
176962306a36Sopenharmony_ci		IP0SR1_3_0))
177062306a36Sopenharmony_ci	},
177162306a36Sopenharmony_ci#undef F_
177262306a36Sopenharmony_ci#undef FM
177362306a36Sopenharmony_ci
177462306a36Sopenharmony_ci#define F_(x, y)	x,
177562306a36Sopenharmony_ci#define FM(x)		FN_##x,
177662306a36Sopenharmony_ci	{ PINMUX_CFG_REG_VAR("MOD_SEL1", 0xe6050900, 32,
177762306a36Sopenharmony_ci			     GROUP(-20, 2, 2, 2, 2, 2, 2),
177862306a36Sopenharmony_ci			     GROUP(
177962306a36Sopenharmony_ci		/* RESERVED 31-12 */
178062306a36Sopenharmony_ci		MOD_SEL1_11_10
178162306a36Sopenharmony_ci		MOD_SEL1_9_8
178262306a36Sopenharmony_ci		MOD_SEL1_7_6
178362306a36Sopenharmony_ci		MOD_SEL1_5_4
178462306a36Sopenharmony_ci		MOD_SEL1_3_2
178562306a36Sopenharmony_ci		MOD_SEL1_1_0))
178662306a36Sopenharmony_ci	},
178762306a36Sopenharmony_ci	{ /* sentinel */ }
178862306a36Sopenharmony_ci};
178962306a36Sopenharmony_ci
179062306a36Sopenharmony_cistatic const struct pinmux_drive_reg pinmux_drive_regs[] = {
179162306a36Sopenharmony_ci	{ PINMUX_DRIVE_REG("DRV0CTRL0", 0xe6050080) {
179262306a36Sopenharmony_ci		{ RCAR_GP_PIN(0,  7), 28, 3 },	/* TX0 */
179362306a36Sopenharmony_ci		{ RCAR_GP_PIN(0,  6), 24, 3 },	/* RX0 */
179462306a36Sopenharmony_ci		{ RCAR_GP_PIN(0,  5), 20, 3 },	/* HRTS0_N */
179562306a36Sopenharmony_ci		{ RCAR_GP_PIN(0,  4), 16, 3 },	/* HCTS0_N */
179662306a36Sopenharmony_ci		{ RCAR_GP_PIN(0,  3), 12, 3 },	/* HTX0 */
179762306a36Sopenharmony_ci		{ RCAR_GP_PIN(0,  2),  8, 3 },	/* HRX0 */
179862306a36Sopenharmony_ci		{ RCAR_GP_PIN(0,  1),  4, 3 },	/* HSCK0 */
179962306a36Sopenharmony_ci		{ RCAR_GP_PIN(0,  0),  0, 3 },	/* SCIF_CLK */
180062306a36Sopenharmony_ci	} },
180162306a36Sopenharmony_ci	{ PINMUX_DRIVE_REG("DRV1CTRL0", 0xe6050084) {
180262306a36Sopenharmony_ci		{ RCAR_GP_PIN(0, 15), 28, 3 },	/* MSIOF0_SS1 */
180362306a36Sopenharmony_ci		{ RCAR_GP_PIN(0, 14), 24, 3 },	/* MSIOF0_SCK */
180462306a36Sopenharmony_ci		{ RCAR_GP_PIN(0, 13), 20, 3 },	/* MSIOF0_TXD */
180562306a36Sopenharmony_ci		{ RCAR_GP_PIN(0, 12), 16, 3 },	/* MSIOF0_RXD */
180662306a36Sopenharmony_ci		{ RCAR_GP_PIN(0, 11), 12, 3 },	/* MSIOF0_SYNC */
180762306a36Sopenharmony_ci		{ RCAR_GP_PIN(0, 10),  8, 3 },	/* CTS0_N */
180862306a36Sopenharmony_ci		{ RCAR_GP_PIN(0,  9),  4, 3 },	/* RTS0_N */
180962306a36Sopenharmony_ci		{ RCAR_GP_PIN(0,  8),  0, 3 },	/* SCK0 */
181062306a36Sopenharmony_ci	} },
181162306a36Sopenharmony_ci	{ PINMUX_DRIVE_REG("DRV2CTRL0", 0xe6050088) {
181262306a36Sopenharmony_ci		{ RCAR_GP_PIN(0, 20), 16, 3 },	/* IRQ3 */
181362306a36Sopenharmony_ci		{ RCAR_GP_PIN(0, 19), 12, 3 },	/* IRQ2 */
181462306a36Sopenharmony_ci		{ RCAR_GP_PIN(0, 18),  8, 3 },	/* IRQ1 */
181562306a36Sopenharmony_ci		{ RCAR_GP_PIN(0, 17),  4, 3 },	/* IRQ0 */
181662306a36Sopenharmony_ci		{ RCAR_GP_PIN(0, 16),  0, 3 },	/* MSIOF0_SS2 */
181762306a36Sopenharmony_ci	} },
181862306a36Sopenharmony_ci	{ PINMUX_DRIVE_REG("DRV0CTRL1", 0xe6050880) {
181962306a36Sopenharmony_ci		{ RCAR_GP_PIN(1,  7), 28, 3 },	/* GP1_07 */
182062306a36Sopenharmony_ci		{ RCAR_GP_PIN(1,  6), 24, 3 },	/* GP1_06 */
182162306a36Sopenharmony_ci		{ RCAR_GP_PIN(1,  5), 20, 3 },	/* GP1_05 */
182262306a36Sopenharmony_ci		{ RCAR_GP_PIN(1,  4), 16, 3 },	/* GP1_04 */
182362306a36Sopenharmony_ci		{ RCAR_GP_PIN(1,  3), 12, 3 },	/* GP1_03 */
182462306a36Sopenharmony_ci		{ RCAR_GP_PIN(1,  2),  8, 3 },	/* GP1_02 */
182562306a36Sopenharmony_ci		{ RCAR_GP_PIN(1,  1),  4, 3 },	/* GP1_01 */
182662306a36Sopenharmony_ci		{ RCAR_GP_PIN(1,  0),  0, 3 },	/* GP1_00 */
182762306a36Sopenharmony_ci	} },
182862306a36Sopenharmony_ci	{ PINMUX_DRIVE_REG("DRV1CTRL1", 0xe6050884) {
182962306a36Sopenharmony_ci		{ RCAR_GP_PIN(1, 15), 28, 3 },	/* MMC_SD_D2 */
183062306a36Sopenharmony_ci		{ RCAR_GP_PIN(1, 14), 24, 3 },	/* MMC_SD_D1 */
183162306a36Sopenharmony_ci		{ RCAR_GP_PIN(1, 13), 20, 3 },	/* MMC_SD_D0 */
183262306a36Sopenharmony_ci		{ RCAR_GP_PIN(1, 12), 16, 3 },	/* MMC_SD_CLK */
183362306a36Sopenharmony_ci		{ RCAR_GP_PIN(1, 11), 12, 3 },	/* GP1_11 */
183462306a36Sopenharmony_ci		{ RCAR_GP_PIN(1, 10),  8, 3 },	/* GP1_10 */
183562306a36Sopenharmony_ci		{ RCAR_GP_PIN(1,  9),  4, 3 },	/* GP1_09 */
183662306a36Sopenharmony_ci		{ RCAR_GP_PIN(1,  8),  0, 3 },	/* GP1_08 */
183762306a36Sopenharmony_ci	} },
183862306a36Sopenharmony_ci	{ PINMUX_DRIVE_REG("DRV2CTRL1", 0xe6050888) {
183962306a36Sopenharmony_ci		{ RCAR_GP_PIN(1, 23), 28, 3 },	/* SD_CD */
184062306a36Sopenharmony_ci		{ RCAR_GP_PIN(1, 22), 24, 3 },	/* MMC_SD_CMD */
184162306a36Sopenharmony_ci		{ RCAR_GP_PIN(1, 21), 20, 3 },	/* MMC_D7 */
184262306a36Sopenharmony_ci		{ RCAR_GP_PIN(1, 20), 16, 3 },	/* MMC_DS */
184362306a36Sopenharmony_ci		{ RCAR_GP_PIN(1, 19), 12, 3 },	/* MMC_D6 */
184462306a36Sopenharmony_ci		{ RCAR_GP_PIN(1, 18),  8, 3 },	/* MMC_D4 */
184562306a36Sopenharmony_ci		{ RCAR_GP_PIN(1, 17),  4, 3 },	/* MMC_D5 */
184662306a36Sopenharmony_ci		{ RCAR_GP_PIN(1, 16),  0, 3 },	/* MMC_SD_D3 */
184762306a36Sopenharmony_ci	} },
184862306a36Sopenharmony_ci	{ PINMUX_DRIVE_REG("DRV3CTRL1", 0xe605088c) {
184962306a36Sopenharmony_ci		{ RCAR_GP_PIN(1, 24),  0, 3 },	/* SD_WP */
185062306a36Sopenharmony_ci	} },
185162306a36Sopenharmony_ci	{ PINMUX_DRIVE_REG("DRV0CTRL2", 0xe6051080) {
185262306a36Sopenharmony_ci		{ RCAR_GP_PIN(2,  7), 28, 2 },	/* QSPI1_MOSI_IO0 */
185362306a36Sopenharmony_ci		{ RCAR_GP_PIN(2,  6), 24, 2 },	/* QSPI1_IO2 */
185462306a36Sopenharmony_ci		{ RCAR_GP_PIN(2,  5), 20, 2 },	/* QSPI1_MISO_IO1 */
185562306a36Sopenharmony_ci		{ RCAR_GP_PIN(2,  4), 16, 2 },	/* QSPI1_IO3 */
185662306a36Sopenharmony_ci		{ RCAR_GP_PIN(2,  3), 12, 2 },	/* QSPI1_SSL */
185762306a36Sopenharmony_ci		{ RCAR_GP_PIN(2,  2),  8, 2 },	/* RPC_RESET_N */
185862306a36Sopenharmony_ci		{ RCAR_GP_PIN(2,  1),  4, 2 },	/* RPC_WP_N */
185962306a36Sopenharmony_ci		{ RCAR_GP_PIN(2,  0),  0, 2 },	/* RPC_INT_N */
186062306a36Sopenharmony_ci	} },
186162306a36Sopenharmony_ci	{ PINMUX_DRIVE_REG("DRV1CTRL2", 0xe6051084) {
186262306a36Sopenharmony_ci		{ RCAR_GP_PIN(2, 15), 28, 3 },	/* PCIE0_CLKREQ_N */
186362306a36Sopenharmony_ci		{ RCAR_GP_PIN(2, 14), 24, 2 },	/* QSPI0_IO3 */
186462306a36Sopenharmony_ci		{ RCAR_GP_PIN(2, 13), 20, 2 },	/* QSPI0_SSL */
186562306a36Sopenharmony_ci		{ RCAR_GP_PIN(2, 12), 16, 2 },	/* QSPI0_MISO_IO1 */
186662306a36Sopenharmony_ci		{ RCAR_GP_PIN(2, 11), 12, 2 },	/* QSPI0_IO2 */
186762306a36Sopenharmony_ci		{ RCAR_GP_PIN(2, 10),  8, 2 },	/* QSPI0_SPCLK */
186862306a36Sopenharmony_ci		{ RCAR_GP_PIN(2,  9),  4, 2 },	/* QSPI0_MOSI_IO0 */
186962306a36Sopenharmony_ci		{ RCAR_GP_PIN(2,  8),  0, 2 },	/* QSPI1_SPCLK */
187062306a36Sopenharmony_ci	} },
187162306a36Sopenharmony_ci	{ PINMUX_DRIVE_REG("DRV2CTRL2", 0xe6051088) {
187262306a36Sopenharmony_ci		{ RCAR_GP_PIN(2, 16),  0, 3 },	/* PCIE1_CLKREQ_N */
187362306a36Sopenharmony_ci	} },
187462306a36Sopenharmony_ci	{ PINMUX_DRIVE_REG("DRV0CTRL3", 0xe6051880) {
187562306a36Sopenharmony_ci		{ RCAR_GP_PIN(3,  7), 28, 3 },	/* TSN2_LINK_B */
187662306a36Sopenharmony_ci		{ RCAR_GP_PIN(3,  6), 24, 3 },	/* TSN1_LINK_B */
187762306a36Sopenharmony_ci		{ RCAR_GP_PIN(3,  5), 20, 3 },	/* TSN1_MDC_B */
187862306a36Sopenharmony_ci		{ RCAR_GP_PIN(3,  4), 16, 3 },	/* TSN0_MDC_B */
187962306a36Sopenharmony_ci		{ RCAR_GP_PIN(3,  3), 12, 3 },	/* TSN2_MDC_B */
188062306a36Sopenharmony_ci		{ RCAR_GP_PIN(3,  2),  8, 3 },	/* TSN0_MDIO_B */
188162306a36Sopenharmony_ci		{ RCAR_GP_PIN(3,  1),  4, 3 },	/* TSN2_MDIO_B */
188262306a36Sopenharmony_ci		{ RCAR_GP_PIN(3,  0),  0, 3 },	/* TSN1_MDIO_B */
188362306a36Sopenharmony_ci	} },
188462306a36Sopenharmony_ci	{ PINMUX_DRIVE_REG("DRV1CTRL3", 0xe6051884) {
188562306a36Sopenharmony_ci		{ RCAR_GP_PIN(3, 15), 28, 3 },	/* TSN1_AVTP_CAPTURE_B */
188662306a36Sopenharmony_ci		{ RCAR_GP_PIN(3, 14), 24, 3 },	/* TSN1_AVTP_MATCH_B */
188762306a36Sopenharmony_ci		{ RCAR_GP_PIN(3, 13), 20, 3 },	/* TSN1_AVTP_PPS */
188862306a36Sopenharmony_ci		{ RCAR_GP_PIN(3, 12), 16, 3 },	/* TSN0_MAGIC_B */
188962306a36Sopenharmony_ci		{ RCAR_GP_PIN(3, 11), 12, 3 },	/* TSN1_PHY_INT_B */
189062306a36Sopenharmony_ci		{ RCAR_GP_PIN(3, 10),  8, 3 },	/* TSN0_PHY_INT_B */
189162306a36Sopenharmony_ci		{ RCAR_GP_PIN(3,  9),  4, 3 },	/* TSN2_PHY_INT_B */
189262306a36Sopenharmony_ci		{ RCAR_GP_PIN(3,  8),  0, 3 },	/* TSN0_LINK_B */
189362306a36Sopenharmony_ci	} },
189462306a36Sopenharmony_ci	{ PINMUX_DRIVE_REG("DRV2CTRL3", 0xe6051888) {
189562306a36Sopenharmony_ci		{ RCAR_GP_PIN(3, 18),  8, 3 },	/* TSN0_AVTP_CAPTURE_B */
189662306a36Sopenharmony_ci		{ RCAR_GP_PIN(3, 17),  4, 3 },	/* TSN0_AVTP_MATCH_B */
189762306a36Sopenharmony_ci		{ RCAR_GP_PIN(3, 16),  0, 3 },	/* TSN0_AVTP_PPS */
189862306a36Sopenharmony_ci	} },
189962306a36Sopenharmony_ci	{ /* sentinel */ }
190062306a36Sopenharmony_ci};
190162306a36Sopenharmony_ci
190262306a36Sopenharmony_cienum ioctrl_regs {
190362306a36Sopenharmony_ci	POC0,
190462306a36Sopenharmony_ci	POC1,
190562306a36Sopenharmony_ci	POC3,
190662306a36Sopenharmony_ci	TD0SEL1,
190762306a36Sopenharmony_ci};
190862306a36Sopenharmony_ci
190962306a36Sopenharmony_cistatic const struct pinmux_ioctrl_reg pinmux_ioctrl_regs[] = {
191062306a36Sopenharmony_ci	[POC0] = { 0xe60500a0, },
191162306a36Sopenharmony_ci	[POC1] = { 0xe60508a0, },
191262306a36Sopenharmony_ci	[POC3] = { 0xe60518a0, },
191362306a36Sopenharmony_ci	[TD0SEL1] = { 0xe6050920, },
191462306a36Sopenharmony_ci	{ /* sentinel */ }
191562306a36Sopenharmony_ci};
191662306a36Sopenharmony_ci
191762306a36Sopenharmony_cistatic int r8a779f0_pin_to_pocctrl(unsigned int pin, u32 *pocctrl)
191862306a36Sopenharmony_ci{
191962306a36Sopenharmony_ci	int bit = pin & 0x1f;
192062306a36Sopenharmony_ci
192162306a36Sopenharmony_ci	*pocctrl = pinmux_ioctrl_regs[POC0].reg;
192262306a36Sopenharmony_ci	if (pin >= RCAR_GP_PIN(0, 0) && pin <= RCAR_GP_PIN(0, 20))
192362306a36Sopenharmony_ci		return bit;
192462306a36Sopenharmony_ci
192562306a36Sopenharmony_ci	*pocctrl = pinmux_ioctrl_regs[POC1].reg;
192662306a36Sopenharmony_ci	if (pin >= RCAR_GP_PIN(1, 0) && pin <= RCAR_GP_PIN(1, 24))
192762306a36Sopenharmony_ci		return bit;
192862306a36Sopenharmony_ci
192962306a36Sopenharmony_ci	*pocctrl = pinmux_ioctrl_regs[POC3].reg;
193062306a36Sopenharmony_ci	if (pin >= RCAR_GP_PIN(3, 0) && pin <= RCAR_GP_PIN(3, 18))
193162306a36Sopenharmony_ci		return bit;
193262306a36Sopenharmony_ci
193362306a36Sopenharmony_ci	return -EINVAL;
193462306a36Sopenharmony_ci}
193562306a36Sopenharmony_ci
193662306a36Sopenharmony_cistatic const struct pinmux_bias_reg pinmux_bias_regs[] = {
193762306a36Sopenharmony_ci	{ PINMUX_BIAS_REG("PUEN0", 0xe60500c0, "PUD0", 0xe60500e0) {
193862306a36Sopenharmony_ci		[ 0] = RCAR_GP_PIN(0,  0),	/* SCIF_CLK */
193962306a36Sopenharmony_ci		[ 1] = RCAR_GP_PIN(0,  1),	/* HSCK0 */
194062306a36Sopenharmony_ci		[ 2] = RCAR_GP_PIN(0,  2),	/* HRX0 */
194162306a36Sopenharmony_ci		[ 3] = RCAR_GP_PIN(0,  3),	/* HTX0 */
194262306a36Sopenharmony_ci		[ 4] = RCAR_GP_PIN(0,  4),	/* HCTS0_N */
194362306a36Sopenharmony_ci		[ 5] = RCAR_GP_PIN(0,  5),	/* HRTS0_N */
194462306a36Sopenharmony_ci		[ 6] = RCAR_GP_PIN(0,  6),	/* RX0 */
194562306a36Sopenharmony_ci		[ 7] = RCAR_GP_PIN(0,  7),	/* TX0 */
194662306a36Sopenharmony_ci		[ 8] = RCAR_GP_PIN(0,  8),	/* SCK0 */
194762306a36Sopenharmony_ci		[ 9] = RCAR_GP_PIN(0,  9),	/* RTS0_N */
194862306a36Sopenharmony_ci		[10] = RCAR_GP_PIN(0, 10),	/* CTS0_N */
194962306a36Sopenharmony_ci		[11] = RCAR_GP_PIN(0, 11),	/* MSIOF0_SYNC */
195062306a36Sopenharmony_ci		[12] = RCAR_GP_PIN(0, 12),	/* MSIOF0_RXD */
195162306a36Sopenharmony_ci		[13] = RCAR_GP_PIN(0, 13),	/* MSIOF0_TXD */
195262306a36Sopenharmony_ci		[14] = RCAR_GP_PIN(0, 14),	/* MSIOF0_SCK */
195362306a36Sopenharmony_ci		[15] = RCAR_GP_PIN(0, 15),	/* MSIOF0_SS1 */
195462306a36Sopenharmony_ci		[16] = RCAR_GP_PIN(0, 16),	/* MSIOF0_SS2 */
195562306a36Sopenharmony_ci		[17] = RCAR_GP_PIN(0, 17),	/* IRQ0 */
195662306a36Sopenharmony_ci		[18] = RCAR_GP_PIN(0, 18),	/* IRQ1 */
195762306a36Sopenharmony_ci		[19] = RCAR_GP_PIN(0, 19),	/* IRQ2 */
195862306a36Sopenharmony_ci		[20] = RCAR_GP_PIN(0, 20),	/* IRQ3 */
195962306a36Sopenharmony_ci		[21] = SH_PFC_PIN_NONE,
196062306a36Sopenharmony_ci		[22] = SH_PFC_PIN_NONE,
196162306a36Sopenharmony_ci		[23] = SH_PFC_PIN_NONE,
196262306a36Sopenharmony_ci		[24] = SH_PFC_PIN_NONE,
196362306a36Sopenharmony_ci		[25] = SH_PFC_PIN_NONE,
196462306a36Sopenharmony_ci		[26] = SH_PFC_PIN_NONE,
196562306a36Sopenharmony_ci		[27] = SH_PFC_PIN_NONE,
196662306a36Sopenharmony_ci		[28] = SH_PFC_PIN_NONE,
196762306a36Sopenharmony_ci		[29] = SH_PFC_PIN_NONE,
196862306a36Sopenharmony_ci		[30] = SH_PFC_PIN_NONE,
196962306a36Sopenharmony_ci		[31] = SH_PFC_PIN_NONE,
197062306a36Sopenharmony_ci	} },
197162306a36Sopenharmony_ci	{ PINMUX_BIAS_REG("PUEN1", 0xe60508c0, "PUD1", 0xe60508e0) {
197262306a36Sopenharmony_ci		[ 0] = RCAR_GP_PIN(1,  0),	/* GP1_00 */
197362306a36Sopenharmony_ci		[ 1] = RCAR_GP_PIN(1,  1),	/* GP1_01 */
197462306a36Sopenharmony_ci		[ 2] = RCAR_GP_PIN(1,  2),	/* GP1_02 */
197562306a36Sopenharmony_ci		[ 3] = RCAR_GP_PIN(1,  3),	/* GP1_03 */
197662306a36Sopenharmony_ci		[ 4] = RCAR_GP_PIN(1,  4),	/* GP1_04 */
197762306a36Sopenharmony_ci		[ 5] = RCAR_GP_PIN(1,  5),	/* GP1_05 */
197862306a36Sopenharmony_ci		[ 6] = RCAR_GP_PIN(1,  6),	/* GP1_06 */
197962306a36Sopenharmony_ci		[ 7] = RCAR_GP_PIN(1,  7),	/* GP1_07 */
198062306a36Sopenharmony_ci		[ 8] = RCAR_GP_PIN(1,  8),	/* GP1_08 */
198162306a36Sopenharmony_ci		[ 9] = RCAR_GP_PIN(1,  9),	/* GP1_09 */
198262306a36Sopenharmony_ci		[10] = RCAR_GP_PIN(1, 10),	/* GP1_10 */
198362306a36Sopenharmony_ci		[11] = RCAR_GP_PIN(1, 11),	/* GP1_11 */
198462306a36Sopenharmony_ci		[12] = RCAR_GP_PIN(1, 12),	/* MMC_SD_CLK */
198562306a36Sopenharmony_ci		[13] = RCAR_GP_PIN(1, 13),	/* MMC_SD_D0 */
198662306a36Sopenharmony_ci		[14] = RCAR_GP_PIN(1, 14),	/* MMC_SD_D1 */
198762306a36Sopenharmony_ci		[15] = RCAR_GP_PIN(1, 15),	/* MMC_SD_D2 */
198862306a36Sopenharmony_ci		[16] = RCAR_GP_PIN(1, 16),	/* MMC_SD_D3 */
198962306a36Sopenharmony_ci		[17] = RCAR_GP_PIN(1, 17),	/* MMC_D5 */
199062306a36Sopenharmony_ci		[18] = RCAR_GP_PIN(1, 18),	/* MMC_D4 */
199162306a36Sopenharmony_ci		[19] = RCAR_GP_PIN(1, 19),	/* MMC_D6 */
199262306a36Sopenharmony_ci		[20] = RCAR_GP_PIN(1, 20),	/* MMC_DS */
199362306a36Sopenharmony_ci		[21] = RCAR_GP_PIN(1, 21),	/* MMC_D7 */
199462306a36Sopenharmony_ci		[22] = RCAR_GP_PIN(1, 22),	/* MMC_SD_CMD */
199562306a36Sopenharmony_ci		[23] = RCAR_GP_PIN(1, 23),	/* SD_CD */
199662306a36Sopenharmony_ci		[24] = RCAR_GP_PIN(1, 24),	/* SD_WP */
199762306a36Sopenharmony_ci		[25] = SH_PFC_PIN_NONE,
199862306a36Sopenharmony_ci		[26] = SH_PFC_PIN_NONE,
199962306a36Sopenharmony_ci		[27] = SH_PFC_PIN_NONE,
200062306a36Sopenharmony_ci		[28] = SH_PFC_PIN_NONE,
200162306a36Sopenharmony_ci		[29] = SH_PFC_PIN_NONE,
200262306a36Sopenharmony_ci		[30] = SH_PFC_PIN_NONE,
200362306a36Sopenharmony_ci		[31] = SH_PFC_PIN_NONE,
200462306a36Sopenharmony_ci	} },
200562306a36Sopenharmony_ci	{ PINMUX_BIAS_REG("PUEN2", 0xe60510c0, "PUD2", 0xe60510e0) {
200662306a36Sopenharmony_ci		[ 0] = RCAR_GP_PIN(2,  0),	/* RPC_INT_N */
200762306a36Sopenharmony_ci		[ 1] = RCAR_GP_PIN(2,  1),	/* RPC_WP_N */
200862306a36Sopenharmony_ci		[ 2] = RCAR_GP_PIN(2,  2),	/* RPC_RESET_N */
200962306a36Sopenharmony_ci		[ 3] = RCAR_GP_PIN(2,  3),	/* QSPI1_SSL */
201062306a36Sopenharmony_ci		[ 4] = RCAR_GP_PIN(2,  4),	/* QSPI1_IO3 */
201162306a36Sopenharmony_ci		[ 5] = RCAR_GP_PIN(2,  5),	/* QSPI1_MISO_IO1 */
201262306a36Sopenharmony_ci		[ 6] = RCAR_GP_PIN(2,  6),	/* QSPI1_IO2 */
201362306a36Sopenharmony_ci		[ 7] = RCAR_GP_PIN(2,  7),	/* QSPI1_MOSI_IO0 */
201462306a36Sopenharmony_ci		[ 8] = RCAR_GP_PIN(2,  8),	/* QSPI1_SPCLK */
201562306a36Sopenharmony_ci		[ 9] = RCAR_GP_PIN(2,  9),	/* QSPI0_MOSI_IO0 */
201662306a36Sopenharmony_ci		[10] = RCAR_GP_PIN(2, 10),	/* QSPI0_SPCLK */
201762306a36Sopenharmony_ci		[11] = RCAR_GP_PIN(2, 11),	/* QSPI0_IO2 */
201862306a36Sopenharmony_ci		[12] = RCAR_GP_PIN(2, 12),	/* QSPI0_MISO_IO1 */
201962306a36Sopenharmony_ci		[13] = RCAR_GP_PIN(2, 13),	/* QSPI0_SSL */
202062306a36Sopenharmony_ci		[14] = RCAR_GP_PIN(2, 14),	/* QSPI0_IO3 */
202162306a36Sopenharmony_ci		[15] = RCAR_GP_PIN(2, 15),	/* PCIE0_CLKREQ_N */
202262306a36Sopenharmony_ci		[16] = RCAR_GP_PIN(2, 16),	/* PCIE1_CLKREQ_N */
202362306a36Sopenharmony_ci		[17] = SH_PFC_PIN_NONE,
202462306a36Sopenharmony_ci		[18] = SH_PFC_PIN_NONE,
202562306a36Sopenharmony_ci		[19] = SH_PFC_PIN_NONE,
202662306a36Sopenharmony_ci		[20] = SH_PFC_PIN_NONE,
202762306a36Sopenharmony_ci		[21] = SH_PFC_PIN_NONE,
202862306a36Sopenharmony_ci		[22] = SH_PFC_PIN_NONE,
202962306a36Sopenharmony_ci		[23] = SH_PFC_PIN_NONE,
203062306a36Sopenharmony_ci		[24] = SH_PFC_PIN_NONE,
203162306a36Sopenharmony_ci		[25] = SH_PFC_PIN_NONE,
203262306a36Sopenharmony_ci		[26] = SH_PFC_PIN_NONE,
203362306a36Sopenharmony_ci		[27] = SH_PFC_PIN_NONE,
203462306a36Sopenharmony_ci		[28] = SH_PFC_PIN_NONE,
203562306a36Sopenharmony_ci		[29] = SH_PFC_PIN_NONE,
203662306a36Sopenharmony_ci		[30] = SH_PFC_PIN_NONE,
203762306a36Sopenharmony_ci		[31] = SH_PFC_PIN_NONE,
203862306a36Sopenharmony_ci	} },
203962306a36Sopenharmony_ci	{ PINMUX_BIAS_REG("PUEN3", 0xe60518c0, "PUD3", 0xe60518e0) {
204062306a36Sopenharmony_ci		[ 0] = RCAR_GP_PIN(3,  0),	/* TSN1_MDIO_B */
204162306a36Sopenharmony_ci		[ 1] = RCAR_GP_PIN(3,  1),	/* TSN2_MDIO_B */
204262306a36Sopenharmony_ci		[ 2] = RCAR_GP_PIN(3,  2),	/* TSN0_MDIO_B */
204362306a36Sopenharmony_ci		[ 3] = RCAR_GP_PIN(3,  3),	/* TSN2_MDC_B */
204462306a36Sopenharmony_ci		[ 4] = RCAR_GP_PIN(3,  4),	/* TSN0_MDC_B */
204562306a36Sopenharmony_ci		[ 5] = RCAR_GP_PIN(3,  5),	/* TSN1_MDC_B */
204662306a36Sopenharmony_ci		[ 6] = RCAR_GP_PIN(3,  6),	/* TSN1_LINK_B */
204762306a36Sopenharmony_ci		[ 7] = RCAR_GP_PIN(3,  7),	/* TSN2_LINK_B */
204862306a36Sopenharmony_ci		[ 8] = RCAR_GP_PIN(3,  8),	/* TSN0_LINK_B */
204962306a36Sopenharmony_ci		[ 9] = RCAR_GP_PIN(3,  9),	/* TSN2_PHY_INT_B */
205062306a36Sopenharmony_ci		[10] = RCAR_GP_PIN(3, 10),	/* TSN0_PHY_INT_B */
205162306a36Sopenharmony_ci		[11] = RCAR_GP_PIN(3, 11),	/* TSN1_PHY_INT_B */
205262306a36Sopenharmony_ci		[12] = RCAR_GP_PIN(3, 12),	/* TSN0_MAGIC_B */
205362306a36Sopenharmony_ci		[13] = RCAR_GP_PIN(3, 13),	/* TSN1_AVTP_PPS */
205462306a36Sopenharmony_ci		[14] = RCAR_GP_PIN(3, 14),	/* TSN1_AVTP_MATCH_B */
205562306a36Sopenharmony_ci		[15] = RCAR_GP_PIN(3, 15),	/* TSN1_AVTP_CAPTURE_B */
205662306a36Sopenharmony_ci		[16] = RCAR_GP_PIN(3, 16),	/* TSN0_AVTP_PPS */
205762306a36Sopenharmony_ci		[17] = RCAR_GP_PIN(3, 17),	/* TSN0_AVTP_MATCH_B */
205862306a36Sopenharmony_ci		[18] = RCAR_GP_PIN(3, 18),	/* TSN0_AVTP_CAPTURE_B */
205962306a36Sopenharmony_ci		[19] = SH_PFC_PIN_NONE,
206062306a36Sopenharmony_ci		[20] = SH_PFC_PIN_NONE,
206162306a36Sopenharmony_ci		[21] = SH_PFC_PIN_NONE,
206262306a36Sopenharmony_ci		[22] = SH_PFC_PIN_NONE,
206362306a36Sopenharmony_ci		[23] = SH_PFC_PIN_NONE,
206462306a36Sopenharmony_ci		[24] = SH_PFC_PIN_NONE,
206562306a36Sopenharmony_ci		[25] = SH_PFC_PIN_NONE,
206662306a36Sopenharmony_ci		[26] = SH_PFC_PIN_NONE,
206762306a36Sopenharmony_ci		[27] = SH_PFC_PIN_NONE,
206862306a36Sopenharmony_ci		[28] = SH_PFC_PIN_NONE,
206962306a36Sopenharmony_ci		[29] = SH_PFC_PIN_NONE,
207062306a36Sopenharmony_ci		[30] = SH_PFC_PIN_NONE,
207162306a36Sopenharmony_ci		[31] = SH_PFC_PIN_NONE,
207262306a36Sopenharmony_ci	} },
207362306a36Sopenharmony_ci	{ /* sentinel */ }
207462306a36Sopenharmony_ci};
207562306a36Sopenharmony_ci
207662306a36Sopenharmony_cistatic const struct sh_pfc_soc_operations r8a779f0_pfc_ops = {
207762306a36Sopenharmony_ci	.pin_to_pocctrl = r8a779f0_pin_to_pocctrl,
207862306a36Sopenharmony_ci	.get_bias = rcar_pinmux_get_bias,
207962306a36Sopenharmony_ci	.set_bias = rcar_pinmux_set_bias,
208062306a36Sopenharmony_ci};
208162306a36Sopenharmony_ci
208262306a36Sopenharmony_ciconst struct sh_pfc_soc_info r8a779f0_pinmux_info = {
208362306a36Sopenharmony_ci	.name = "r8a779f0_pfc",
208462306a36Sopenharmony_ci	.ops = &r8a779f0_pfc_ops,
208562306a36Sopenharmony_ci	.unlock_reg = 0x1ff,	/* PMMRn mask */
208662306a36Sopenharmony_ci
208762306a36Sopenharmony_ci	.function = { PINMUX_FUNCTION_BEGIN, PINMUX_FUNCTION_END },
208862306a36Sopenharmony_ci
208962306a36Sopenharmony_ci	.pins = pinmux_pins,
209062306a36Sopenharmony_ci	.nr_pins = ARRAY_SIZE(pinmux_pins),
209162306a36Sopenharmony_ci	.groups = pinmux_groups,
209262306a36Sopenharmony_ci	.nr_groups = ARRAY_SIZE(pinmux_groups),
209362306a36Sopenharmony_ci	.functions = pinmux_functions,
209462306a36Sopenharmony_ci	.nr_functions = ARRAY_SIZE(pinmux_functions),
209562306a36Sopenharmony_ci
209662306a36Sopenharmony_ci	.cfg_regs = pinmux_config_regs,
209762306a36Sopenharmony_ci	.drive_regs = pinmux_drive_regs,
209862306a36Sopenharmony_ci	.bias_regs = pinmux_bias_regs,
209962306a36Sopenharmony_ci	.ioctrl_regs = pinmux_ioctrl_regs,
210062306a36Sopenharmony_ci
210162306a36Sopenharmony_ci	.pinmux_data = pinmux_data,
210262306a36Sopenharmony_ci	.pinmux_data_size = ARRAY_SIZE(pinmux_data),
210362306a36Sopenharmony_ci};
2104