blob: 78a91f426d97087a6554daf489ac3ba548d8abc3 [file] [log] [blame]
Hai Pham9a8aaa32023-02-28 22:37:03 +01001// SPDX-License-Identifier: GPL-2.0
2/*
3 * R8A779A0 processor support - PFC hardware block.
4 *
5 * Copyright (C) 2021 Renesas Electronics Corp.
6 *
7 * This file is based on the drivers/pinctrl/renesas/pfc-r8a779a0.c
8 */
9
10#include <common.h>
11#include <dm.h>
12#include <errno.h>
13#include <dm/pinctrl.h>
14#include <linux/bitops.h>
15#include <linux/kernel.h>
16
17#include "sh_pfc.h"
18
19#define CFG_FLAGS (SH_PFC_PIN_CFG_DRIVE_STRENGTH | SH_PFC_PIN_CFG_PULL_UP_DOWN)
20
21#define CPU_ALL_GP(fn, sfx) \
22 PORT_GP_CFG_19(0, fn, sfx, CFG_FLAGS | SH_PFC_PIN_CFG_IO_VOLTAGE_18_33), \
23 PORT_GP_CFG_23(1, fn, sfx, CFG_FLAGS | SH_PFC_PIN_CFG_IO_VOLTAGE_18_33), \
24 PORT_GP_CFG_1(1, 23, fn, sfx, CFG_FLAGS), \
25 PORT_GP_CFG_1(1, 24, fn, sfx, CFG_FLAGS), \
26 PORT_GP_CFG_1(1, 25, fn, sfx, CFG_FLAGS), \
27 PORT_GP_CFG_1(1, 26, fn, sfx, CFG_FLAGS), \
28 PORT_GP_CFG_1(1, 27, fn, sfx, CFG_FLAGS), \
29 PORT_GP_CFG_1(1, 28, fn, sfx, CFG_FLAGS), \
30 PORT_GP_CFG_20(2, fn, sfx, CFG_FLAGS), \
31 PORT_GP_CFG_13(3, fn, sfx, CFG_FLAGS | SH_PFC_PIN_CFG_IO_VOLTAGE_18_33), \
32 PORT_GP_CFG_1(3, 13, fn, sfx, CFG_FLAGS), \
33 PORT_GP_CFG_1(3, 14, fn, sfx, CFG_FLAGS), \
34 PORT_GP_CFG_1(3, 15, fn, sfx, CFG_FLAGS), \
35 PORT_GP_CFG_1(3, 16, fn, sfx, CFG_FLAGS), \
36 PORT_GP_CFG_1(3, 17, fn, sfx, CFG_FLAGS), \
37 PORT_GP_CFG_1(3, 18, fn, sfx, CFG_FLAGS), \
38 PORT_GP_CFG_1(3, 19, fn, sfx, CFG_FLAGS), \
39 PORT_GP_CFG_1(3, 20, fn, sfx, CFG_FLAGS), \
40 PORT_GP_CFG_1(3, 21, fn, sfx, CFG_FLAGS), \
41 PORT_GP_CFG_1(3, 22, fn, sfx, CFG_FLAGS), \
42 PORT_GP_CFG_1(3, 23, fn, sfx, CFG_FLAGS), \
43 PORT_GP_CFG_1(3, 24, fn, sfx, CFG_FLAGS), \
44 PORT_GP_CFG_1(3, 25, fn, sfx, CFG_FLAGS), \
45 PORT_GP_CFG_1(3, 26, fn, sfx, CFG_FLAGS), \
46 PORT_GP_CFG_1(3, 27, fn, sfx, CFG_FLAGS), \
47 PORT_GP_CFG_1(3, 28, fn, sfx, CFG_FLAGS), \
48 PORT_GP_CFG_1(3, 29, fn, sfx, CFG_FLAGS), \
49 PORT_GP_CFG_25(4, fn, sfx, CFG_FLAGS), \
50 PORT_GP_CFG_21(5, fn, sfx, CFG_FLAGS), \
51 PORT_GP_CFG_21(6, fn, sfx, CFG_FLAGS), \
52 PORT_GP_CFG_21(7, fn, sfx, CFG_FLAGS), \
53 PORT_GP_CFG_14(8, fn, sfx, CFG_FLAGS | SH_PFC_PIN_CFG_IO_VOLTAGE_18_33)
54
55/* GPSR0 */
56#define GPSR0_18 F_(MSIOF2_RXD, IP2SR0_11_8)
57#define GPSR0_17 F_(MSIOF2_SCK, IP2SR0_7_4)
58#define GPSR0_16 F_(MSIOF2_TXD, IP2SR0_3_0)
59#define GPSR0_15 F_(MSIOF2_SYNC, IP1SR0_31_28)
60#define GPSR0_14 F_(MSIOF2_SS1, IP1SR0_27_24)
61#define GPSR0_13 F_(MSIOF2_SS2, IP1SR0_23_20)
62#define GPSR0_12 F_(MSIOF5_RXD, IP1SR0_19_16)
63#define GPSR0_11 F_(MSIOF5_SCK, IP1SR0_15_12)
64#define GPSR0_10 F_(MSIOF5_TXD, IP1SR0_11_8)
65#define GPSR0_9 F_(MSIOF5_SYNC, IP1SR0_7_4)
66#define GPSR0_8 F_(MSIOF5_SS1, IP1SR0_3_0)
67#define GPSR0_7 F_(MSIOF5_SS2, IP0SR0_31_28)
68#define GPSR0_6 F_(IRQ0, IP0SR0_27_24)
69#define GPSR0_5 F_(IRQ1, IP0SR0_23_20)
70#define GPSR0_4 F_(IRQ2, IP0SR0_19_16)
71#define GPSR0_3 F_(IRQ3, IP0SR0_15_12)
72#define GPSR0_2 F_(GP0_02, IP0SR0_11_8)
73#define GPSR0_1 F_(GP0_01, IP0SR0_7_4)
74#define GPSR0_0 F_(GP0_00, IP0SR0_3_0)
75
76/* GPSR1 */
77#define GPSR1_28 F_(HTX3, IP3SR1_19_16)
78#define GPSR1_27 F_(HCTS3_N, IP3SR1_15_12)
79#define GPSR1_26 F_(HRTS3_N, IP3SR1_11_8)
80#define GPSR1_25 F_(HSCK3, IP3SR1_7_4)
81#define GPSR1_24 F_(HRX3, IP3SR1_3_0)
82#define GPSR1_23 F_(GP1_23, IP2SR1_31_28)
83#define GPSR1_22 F_(AUDIO_CLKIN, IP2SR1_27_24)
84#define GPSR1_21 F_(AUDIO_CLKOUT, IP2SR1_23_20)
85#define GPSR1_20 F_(SSI_SD, IP2SR1_19_16)
86#define GPSR1_19 F_(SSI_WS, IP2SR1_15_12)
87#define GPSR1_18 F_(SSI_SCK, IP2SR1_11_8)
88#define GPSR1_17 F_(SCIF_CLK, IP2SR1_7_4)
89#define GPSR1_16 F_(HRX0, IP2SR1_3_0)
90#define GPSR1_15 F_(HSCK0, IP1SR1_31_28)
91#define GPSR1_14 F_(HRTS0_N, IP1SR1_27_24)
92#define GPSR1_13 F_(HCTS0_N, IP1SR1_23_20)
93#define GPSR1_12 F_(HTX0, IP1SR1_19_16)
94#define GPSR1_11 F_(MSIOF0_RXD, IP1SR1_15_12)
95#define GPSR1_10 F_(MSIOF0_SCK, IP1SR1_11_8)
96#define GPSR1_9 F_(MSIOF0_TXD, IP1SR1_7_4)
97#define GPSR1_8 F_(MSIOF0_SYNC, IP1SR1_3_0)
98#define GPSR1_7 F_(MSIOF0_SS1, IP0SR1_31_28)
99#define GPSR1_6 F_(MSIOF0_SS2, IP0SR1_27_24)
100#define GPSR1_5 F_(MSIOF1_RXD, IP0SR1_23_20)
101#define GPSR1_4 F_(MSIOF1_TXD, IP0SR1_19_16)
102#define GPSR1_3 F_(MSIOF1_SCK, IP0SR1_15_12)
103#define GPSR1_2 F_(MSIOF1_SYNC, IP0SR1_11_8)
104#define GPSR1_1 F_(MSIOF1_SS1, IP0SR1_7_4)
105#define GPSR1_0 F_(MSIOF1_SS2, IP0SR1_3_0)
106
107/* GPSR2 */
108#define GPSR2_19 F_(CANFD7_RX, IP2SR2_15_12)
109#define GPSR2_18 F_(CANFD7_TX, IP2SR2_11_8)
110#define GPSR2_17 F_(CANFD4_RX, IP2SR2_7_4)
111#define GPSR2_16 F_(CANFD4_TX, IP2SR2_3_0)
112#define GPSR2_15 F_(CANFD3_RX, IP1SR2_31_28)
113#define GPSR2_14 F_(CANFD3_TX, IP1SR2_27_24)
114#define GPSR2_13 F_(CANFD2_RX, IP1SR2_23_20)
115#define GPSR2_12 F_(CANFD2_TX, IP1SR2_19_16)
116#define GPSR2_11 F_(CANFD0_RX, IP1SR2_15_12)
117#define GPSR2_10 F_(CANFD0_TX, IP1SR2_11_8)
118#define GPSR2_9 F_(CAN_CLK, IP1SR2_7_4)
119#define GPSR2_8 F_(TPU0TO0, IP1SR2_3_0)
120#define GPSR2_7 F_(TPU0TO1, IP0SR2_31_28)
121#define GPSR2_6 F_(FXR_TXDB, IP0SR2_27_24)
122#define GPSR2_5 F_(FXR_TXENB_N, IP0SR2_23_20)
123#define GPSR2_4 F_(RXDB_EXTFXR, IP0SR2_19_16)
124#define GPSR2_3 F_(CLK_EXTFXR, IP0SR2_15_12)
125#define GPSR2_2 F_(RXDA_EXTFXR, IP0SR2_11_8)
126#define GPSR2_1 F_(FXR_TXENA_N, IP0SR2_7_4)
127#define GPSR2_0 F_(FXR_TXDA, IP0SR2_3_0)
128
129/* GPSR3 */
130#define GPSR3_29 F_(RPC_INT_N, IP3SR3_23_20)
131#define GPSR3_28 F_(RPC_WP_N, IP3SR3_19_16)
132#define GPSR3_27 F_(RPC_RESET_N, IP3SR3_15_12)
133#define GPSR3_26 F_(QSPI1_IO3, IP3SR3_11_8)
134#define GPSR3_25 F_(QSPI1_SSL, IP3SR3_7_4)
135#define GPSR3_24 F_(QSPI1_IO2, IP3SR3_3_0)
136#define GPSR3_23 F_(QSPI1_MISO_IO1, IP2SR3_31_28)
137#define GPSR3_22 F_(QSPI1_SPCLK, IP2SR3_27_24)
138#define GPSR3_21 F_(QSPI1_MOSI_IO0, IP2SR3_23_20)
139#define GPSR3_20 F_(QSPI0_SPCLK, IP2SR3_19_16)
140#define GPSR3_19 F_(QSPI0_MOSI_IO0, IP2SR3_15_12)
141#define GPSR3_18 F_(QSPI0_MISO_IO1, IP2SR3_11_8)
142#define GPSR3_17 F_(QSPI0_IO2, IP2SR3_7_4)
143#define GPSR3_16 F_(QSPI0_IO3, IP2SR3_3_0)
144#define GPSR3_15 F_(QSPI0_SSL, IP1SR3_31_28)
145#define GPSR3_14 F_(IPC_CLKOUT, IP1SR3_27_24)
146#define GPSR3_13 F_(IPC_CLKIN, IP1SR3_23_20)
147#define GPSR3_12 F_(SD_WP, IP1SR3_19_16)
148#define GPSR3_11 F_(SD_CD, IP1SR3_15_12)
149#define GPSR3_10 F_(MMC_SD_CMD, IP1SR3_11_8)
150#define GPSR3_9 F_(MMC_D6, IP1SR3_7_4)
151#define GPSR3_8 F_(MMC_D7, IP1SR3_3_0)
152#define GPSR3_7 F_(MMC_D4, IP0SR3_31_28)
153#define GPSR3_6 F_(MMC_D5, IP0SR3_27_24)
154#define GPSR3_5 F_(MMC_SD_D3, IP0SR3_23_20)
155#define GPSR3_4 F_(MMC_DS, IP0SR3_19_16)
156#define GPSR3_3 F_(MMC_SD_CLK, IP0SR3_15_12)
157#define GPSR3_2 F_(MMC_SD_D2, IP0SR3_11_8)
158#define GPSR3_1 F_(MMC_SD_D0, IP0SR3_7_4)
159#define GPSR3_0 F_(MMC_SD_D1, IP0SR3_3_0)
160
161/* GPSR4 */
162#define GPSR4_24 FM(AVS1)
163#define GPSR4_23 FM(AVS0)
164#define GPSR4_22 FM(PCIE1_CLKREQ_N)
165#define GPSR4_21 FM(PCIE0_CLKREQ_N)
166#define GPSR4_20 FM(TSN0_TXCREFCLK)
167#define GPSR4_19 FM(TSN0_TD2)
168#define GPSR4_18 FM(TSN0_TD3)
169#define GPSR4_17 FM(TSN0_RD2)
170#define GPSR4_16 FM(TSN0_RD3)
171#define GPSR4_15 FM(TSN0_TD0)
172#define GPSR4_14 FM(TSN0_TD1)
173#define GPSR4_13 FM(TSN0_RD1)
174#define GPSR4_12 FM(TSN0_TXC)
175#define GPSR4_11 FM(TSN0_RXC)
176#define GPSR4_10 FM(TSN0_RD0)
177#define GPSR4_9 FM(TSN0_TX_CTL)
178#define GPSR4_8 FM(TSN0_AVTP_PPS0)
179#define GPSR4_7 FM(TSN0_RX_CTL)
180#define GPSR4_6 FM(TSN0_AVTP_CAPTURE)
181#define GPSR4_5 FM(TSN0_AVTP_MATCH)
182#define GPSR4_4 FM(TSN0_LINK)
183#define GPSR4_3 FM(TSN0_PHY_INT)
184#define GPSR4_2 FM(TSN0_AVTP_PPS1)
185#define GPSR4_1 FM(TSN0_MDC)
186#define GPSR4_0 FM(TSN0_MDIO)
187
188/* GPSR 5 */
189#define GPSR5_20 FM(AVB2_RX_CTL)
190#define GPSR5_19 FM(AVB2_TX_CTL)
191#define GPSR5_18 FM(AVB2_RXC)
192#define GPSR5_17 FM(AVB2_RD0)
193#define GPSR5_16 FM(AVB2_TXC)
194#define GPSR5_15 FM(AVB2_TD0)
195#define GPSR5_14 FM(AVB2_RD1)
196#define GPSR5_13 FM(AVB2_RD2)
197#define GPSR5_12 FM(AVB2_TD1)
198#define GPSR5_11 FM(AVB2_TD2)
199#define GPSR5_10 FM(AVB2_MDIO)
200#define GPSR5_9 FM(AVB2_RD3)
201#define GPSR5_8 FM(AVB2_TD3)
202#define GPSR5_7 FM(AVB2_TXCREFCLK)
203#define GPSR5_6 FM(AVB2_MDC)
204#define GPSR5_5 FM(AVB2_MAGIC)
205#define GPSR5_4 FM(AVB2_PHY_INT)
206#define GPSR5_3 FM(AVB2_LINK)
207#define GPSR5_2 FM(AVB2_AVTP_MATCH)
208#define GPSR5_1 FM(AVB2_AVTP_CAPTURE)
209#define GPSR5_0 FM(AVB2_AVTP_PPS)
210
211/* GPSR 6 */
212#define GPSR6_20 F_(AVB1_TXCREFCLK, IP2SR6_19_16)
213#define GPSR6_19 F_(AVB1_RD3, IP2SR6_15_12)
214#define GPSR6_18 F_(AVB1_TD3, IP2SR6_11_8)
215#define GPSR6_17 F_(AVB1_RD2, IP2SR6_7_4)
216#define GPSR6_16 F_(AVB1_TD2, IP2SR6_3_0)
217#define GPSR6_15 F_(AVB1_RD0, IP1SR6_31_28)
218#define GPSR6_14 F_(AVB1_RD1, IP1SR6_27_24)
219#define GPSR6_13 F_(AVB1_TD0, IP1SR6_23_20)
220#define GPSR6_12 F_(AVB1_TD1, IP1SR6_19_16)
221#define GPSR6_11 F_(AVB1_AVTP_CAPTURE, IP1SR6_15_12)
222#define GPSR6_10 F_(AVB1_AVTP_PPS, IP1SR6_11_8)
223#define GPSR6_9 F_(AVB1_RX_CTL, IP1SR6_7_4)
224#define GPSR6_8 F_(AVB1_RXC, IP1SR6_3_0)
225#define GPSR6_7 F_(AVB1_TX_CTL, IP0SR6_31_28)
226#define GPSR6_6 F_(AVB1_TXC, IP0SR6_27_24)
227#define GPSR6_5 F_(AVB1_AVTP_MATCH, IP0SR6_23_20)
228#define GPSR6_4 F_(AVB1_LINK, IP0SR6_19_16)
229#define GPSR6_3 F_(AVB1_PHY_INT, IP0SR6_15_12)
230#define GPSR6_2 F_(AVB1_MDC, IP0SR6_11_8)
231#define GPSR6_1 F_(AVB1_MAGIC, IP0SR6_7_4)
232#define GPSR6_0 F_(AVB1_MDIO, IP0SR6_3_0)
233
234/* GPSR7 */
235#define GPSR7_20 F_(AVB0_RX_CTL, IP2SR7_19_16)
236#define GPSR7_19 F_(AVB0_RXC, IP2SR7_15_12)
237#define GPSR7_18 F_(AVB0_RD0, IP2SR7_11_8)
238#define GPSR7_17 F_(AVB0_RD1, IP2SR7_7_4)
239#define GPSR7_16 F_(AVB0_TX_CTL, IP2SR7_3_0)
240#define GPSR7_15 F_(AVB0_TXC, IP1SR7_31_28)
241#define GPSR7_14 F_(AVB0_MDIO, IP1SR7_27_24)
242#define GPSR7_13 F_(AVB0_MDC, IP1SR7_23_20)
243#define GPSR7_12 F_(AVB0_RD2, IP1SR7_19_16)
244#define GPSR7_11 F_(AVB0_TD0, IP1SR7_15_12)
245#define GPSR7_10 F_(AVB0_MAGIC, IP1SR7_11_8)
246#define GPSR7_9 F_(AVB0_TXCREFCLK, IP1SR7_7_4)
247#define GPSR7_8 F_(AVB0_RD3, IP1SR7_3_0)
248#define GPSR7_7 F_(AVB0_TD1, IP0SR7_31_28)
249#define GPSR7_6 F_(AVB0_TD2, IP0SR7_27_24)
250#define GPSR7_5 F_(AVB0_PHY_INT, IP0SR7_23_20)
251#define GPSR7_4 F_(AVB0_LINK, IP0SR7_19_16)
252#define GPSR7_3 F_(AVB0_TD3, IP0SR7_15_12)
253#define GPSR7_2 F_(AVB0_AVTP_MATCH, IP0SR7_11_8)
254#define GPSR7_1 F_(AVB0_AVTP_CAPTURE, IP0SR7_7_4)
255#define GPSR7_0 F_(AVB0_AVTP_PPS, IP0SR7_3_0)
256
257/* GPSR8 */
258#define GPSR8_13 F_(GP8_13, IP1SR8_23_20)
259#define GPSR8_12 F_(GP8_12, IP1SR8_19_16)
260#define GPSR8_11 F_(SDA5, IP1SR8_15_12)
261#define GPSR8_10 F_(SCL5, IP1SR8_11_8)
262#define GPSR8_9 F_(SDA4, IP1SR8_7_4)
263#define GPSR8_8 F_(SCL4, IP1SR8_3_0)
264#define GPSR8_7 F_(SDA3, IP0SR8_31_28)
265#define GPSR8_6 F_(SCL3, IP0SR8_27_24)
266#define GPSR8_5 F_(SDA2, IP0SR8_23_20)
267#define GPSR8_4 F_(SCL2, IP0SR8_19_16)
268#define GPSR8_3 F_(SDA1, IP0SR8_15_12)
269#define GPSR8_2 F_(SCL1, IP0SR8_11_8)
270#define GPSR8_1 F_(SDA0, IP0SR8_7_4)
271#define GPSR8_0 F_(SCL0, IP0SR8_3_0)
272
273/* SR0 */
274/* IP0SR0 */ /* 0 */ /* 1 */ /* 2 */ /* 3 4 5 6 7 8 9 A B C D E F */
275#define IP0SR0_3_0 F_(0, 0) FM(ERROROUTC_B) FM(TCLK2_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) F_(0, 0) F_(0, 0) F_(0, 0)
276#define IP0SR0_7_4 F_(0, 0) FM(MSIOF3_SS1) 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)
277#define IP0SR0_11_8 F_(0, 0) FM(MSIOF3_SS2) 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)
278#define IP0SR0_15_12 FM(IRQ3) FM(MSIOF3_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) F_(0, 0) F_(0, 0)
279#define IP0SR0_19_16 FM(IRQ2) 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) F_(0, 0)
280#define IP0SR0_23_20 FM(IRQ1) FM(MSIOF3_RXD) 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)
281#define IP0SR0_27_24 FM(IRQ0) FM(MSIOF3_SYNC) 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)
282#define IP0SR0_31_28 FM(MSIOF5_SS2) 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)
283
284/* IP1SR0 */ /* 0 */ /* 1 */ /* 2 */ /* 3 4 5 6 7 8 9 A B C D E F */
285#define IP1SR0_3_0 FM(MSIOF5_SS1) 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)
286#define IP1SR0_7_4 FM(MSIOF5_SYNC) 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)
287#define IP1SR0_11_8 FM(MSIOF5_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) F_(0, 0) F_(0, 0)
288#define IP1SR0_15_12 FM(MSIOF5_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) F_(0, 0) F_(0, 0) F_(0, 0)
289#define IP1SR0_19_16 FM(MSIOF5_RXD) 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)
290#define IP1SR0_23_20 FM(MSIOF2_SS2) FM(TCLK1) FM(IRQ2_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) F_(0, 0) F_(0, 0) F_(0, 0)
291#define IP1SR0_27_24 FM(MSIOF2_SS1) FM(HTX1) 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)
292#define IP1SR0_31_28 FM(MSIOF2_SYNC) FM(HRX1) 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)
293
294/* IP2SR0 */ /* 0 */ /* 1 */ /* 2 */ /* 3 4 5 6 7 8 9 A B C D E F */
295#define IP2SR0_3_0 FM(MSIOF2_TXD) FM(HCTS1_N) FM(CTS1_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) F_(0, 0) F_(0, 0)
296#define IP2SR0_7_4 FM(MSIOF2_SCK) FM(HRTS1_N) FM(RTS1_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) F_(0, 0) F_(0, 0)
297#define IP2SR0_11_8 FM(MSIOF2_RXD) FM(HSCK1) 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)
298
299/* SR1 */
300/* IP0SR1 */ /* 0 */ /* 1 */ /* 2 */ /* 3 4 5 6 7 8 9 A B C D E F */
301#define IP0SR1_3_0 FM(MSIOF1_SS2) FM(HTX3_A) FM(TX3) 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)
302#define IP0SR1_7_4 FM(MSIOF1_SS1) FM(HCTS3_N_A) FM(RX3) 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)
303#define IP0SR1_11_8 FM(MSIOF1_SYNC) FM(HRTS3_N_A) FM(RTS3_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) F_(0, 0) F_(0, 0)
304#define IP0SR1_15_12 FM(MSIOF1_SCK) FM(HSCK3_A) FM(CTS3_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) F_(0, 0) F_(0, 0)
305#define IP0SR1_19_16 FM(MSIOF1_TXD) FM(HRX3_A) FM(SCK3) 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)
306#define IP0SR1_23_20 FM(MSIOF1_RXD) 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)
307#define IP0SR1_27_24 FM(MSIOF0_SS2) FM(HTX1_X) FM(TX1_X) 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)
308#define IP0SR1_31_28 FM(MSIOF0_SS1) FM(HRX1_X) FM(RX1_X) 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)
309
310/* IP1SR1 */ /* 0 */ /* 1 */ /* 2 */ /* 3 4 5 6 7 8 9 A B C D E F */
311#define IP1SR1_3_0 FM(MSIOF0_SYNC) FM(HCTS1_N_X) FM(CTS1_N_X) FM(CANFD5_TX_B) 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)
312#define IP1SR1_7_4 FM(MSIOF0_TXD) FM(HRTS1_N_X) FM(RTS1_N_X) FM(CANFD5_RX_B) 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)
313#define IP1SR1_11_8 FM(MSIOF0_SCK) FM(HSCK1_X) FM(SCK1_X) 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)
314#define IP1SR1_15_12 FM(MSIOF0_RXD) 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)
315#define IP1SR1_19_16 FM(HTX0) FM(TX0) 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)
316#define IP1SR1_23_20 FM(HCTS0_N) FM(CTS0_N) FM(PWM8_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) F_(0, 0) F_(0, 0) F_(0, 0)
317#define IP1SR1_27_24 FM(HRTS0_N) FM(RTS0_N) FM(PWM9_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) F_(0, 0) F_(0, 0) F_(0, 0)
318#define IP1SR1_31_28 FM(HSCK0) FM(SCK0) FM(PWM0_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) F_(0, 0) F_(0, 0) F_(0, 0)
319
320/* IP2SR1 */ /* 0 */ /* 1 */ /* 2 */ /* 3 4 5 6 7 8 9 A B C D E F */
321#define IP2SR1_3_0 FM(HRX0) FM(RX0) 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)
322#define IP2SR1_7_4 FM(SCIF_CLK) FM(IRQ4_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) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0)
323#define IP2SR1_11_8 FM(SSI_SCK) FM(TCLK3) 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)
324#define IP2SR1_15_12 FM(SSI_WS) FM(TCLK4) 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)
325#define IP2SR1_19_16 FM(SSI_SD) FM(IRQ0_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) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0)
326#define IP2SR1_23_20 FM(AUDIO_CLKOUT) FM(IRQ1_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) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0)
327#define IP2SR1_27_24 FM(AUDIO_CLKIN) FM(PWM3_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) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0)
328#define IP2SR1_31_28 F_(0, 0) FM(TCLK2) FM(MSIOF4_SS1) FM(IRQ3_B) 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)
329
330/* IP3SR1 */ /* 0 */ /* 1 */ /* 2 */ /* 3 4 5 6 7 8 9 A B C D E F */
331#define IP3SR1_3_0 FM(HRX3) FM(SCK3_A) FM(MSIOF4_SS2) 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)
332#define IP3SR1_7_4 FM(HSCK3) FM(CTS3_N_A) FM(MSIOF4_SCK) FM(TPU0TO0_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) F_(0, 0) F_(0, 0)
333#define IP3SR1_11_8 FM(HRTS3_N) FM(RTS3_N_A) FM(MSIOF4_TXD) FM(TPU0TO1_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) F_(0, 0) F_(0, 0)
334#define IP3SR1_15_12 FM(HCTS3_N) FM(RX3_A) FM(MSIOF4_RXD) 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)
335#define IP3SR1_19_16 FM(HTX3) FM(TX3_A) FM(MSIOF4_SYNC) 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)
336
337/* SR2 */
338/* IP0SR2 */ /* 0 */ /* 1 */ /* 2 */ /* 3 4 5 6 7 8 9 A B C D E F */
339#define IP0SR2_3_0 FM(FXR_TXDA) FM(CANFD1_TX) FM(TPU0TO2_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) F_(0, 0) F_(0, 0) F_(0, 0)
340#define IP0SR2_7_4 FM(FXR_TXENA_N) FM(CANFD1_RX) FM(TPU0TO3_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) F_(0, 0) F_(0, 0) F_(0, 0)
341#define IP0SR2_11_8 FM(RXDA_EXTFXR) FM(CANFD5_TX) FM(IRQ5) 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)
342#define IP0SR2_15_12 FM(CLK_EXTFXR) FM(CANFD5_RX) FM(IRQ4_B) 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)
343#define IP0SR2_19_16 FM(RXDB_EXTFXR) 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)
344#define IP0SR2_23_20 FM(FXR_TXENB_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) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0)
345#define IP0SR2_27_24 FM(FXR_TXDB) 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)
346#define IP0SR2_31_28 FM(TPU0TO1) FM(CANFD6_TX) F_(0, 0) FM(TCLK2_B) 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)
347
348/* IP1SR2 */ /* 0 */ /* 1 */ /* 2 */ /* 3 4 5 6 7 8 9 A B C D E F */
349#define IP1SR2_3_0 FM(TPU0TO0) FM(CANFD6_RX) F_(0, 0) FM(TCLK1_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) F_(0, 0) F_(0, 0)
350#define IP1SR2_7_4 FM(CAN_CLK) FM(FXR_TXENA_N_X) 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)
351#define IP1SR2_11_8 FM(CANFD0_TX) FM(FXR_TXENB_N_X) 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)
352#define IP1SR2_15_12 FM(CANFD0_RX) FM(STPWT_EXTFXR) 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)
353#define IP1SR2_19_16 FM(CANFD2_TX) FM(TPU0TO2) F_(0, 0) FM(TCLK3_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) F_(0, 0) F_(0, 0)
354#define IP1SR2_23_20 FM(CANFD2_RX) FM(TPU0TO3) FM(PWM1_B) FM(TCLK4_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) F_(0, 0) F_(0, 0)
355#define IP1SR2_27_24 FM(CANFD3_TX) F_(0, 0) FM(PWM2_B) 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)
356#define IP1SR2_31_28 FM(CANFD3_RX) F_(0, 0) FM(PWM3_B) 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)
357
358/* IP2SR2 */ /* 0 */ /* 1 */ /* 2 */ /* 3 4 5 6 7 8 9 A B C D E F */
359#define IP2SR2_3_0 FM(CANFD4_TX) F_(0, 0) FM(PWM4) 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)
360#define IP2SR2_7_4 FM(CANFD4_RX) F_(0, 0) FM(PWM5) 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)
361#define IP2SR2_11_8 FM(CANFD7_TX) F_(0, 0) FM(PWM6) 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)
362#define IP2SR2_15_12 FM(CANFD7_RX) F_(0, 0) FM(PWM7) 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)
363
364/* SR3 */
365/* IP0SR3 */ /* 0 */ /* 1 */ /* 2 */ /* 3 4 5 6 7 8 9 A B C D E F */
366#define IP0SR3_3_0 FM(MMC_SD_D1) 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)
367#define IP0SR3_7_4 FM(MMC_SD_D0) 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)
368#define IP0SR3_11_8 FM(MMC_SD_D2) 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)
369#define IP0SR3_15_12 FM(MMC_SD_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)
370#define IP0SR3_19_16 FM(MMC_DS) 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)
371#define IP0SR3_23_20 FM(MMC_SD_D3) 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)
372#define IP0SR3_27_24 FM(MMC_D5) 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)
373#define IP0SR3_31_28 FM(MMC_D4) 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)
374
375/* IP1SR3 */ /* 0 */ /* 1 */ /* 2 */ /* 3 4 5 6 7 8 9 A B C D E F */
376#define IP1SR3_3_0 FM(MMC_D7) 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)
377#define IP1SR3_7_4 FM(MMC_D6) 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)
378#define IP1SR3_11_8 FM(MMC_SD_CMD) 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)
379#define IP1SR3_15_12 FM(SD_CD) 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)
380#define IP1SR3_19_16 FM(SD_WP) 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)
381#define IP1SR3_23_20 FM(IPC_CLKIN) FM(IPC_CLKEN_IN) FM(PWM1_A) FM(TCLK3_X) 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)
382#define IP1SR3_27_24 FM(IPC_CLKOUT) FM(IPC_CLKEN_OUT) FM(ERROROUTC_A) FM(TCLK4_X) 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)
383#define IP1SR3_31_28 FM(QSPI0_SSL) 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)
384
385/* IP2SR3 */ /* 0 */ /* 1 */ /* 2 */ /* 3 4 5 6 7 8 9 A B C D E F */
386#define IP2SR3_3_0 FM(QSPI0_IO3) 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)
387#define IP2SR3_7_4 FM(QSPI0_IO2) 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)
388#define IP2SR3_11_8 FM(QSPI0_MISO_IO1) 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)
389#define IP2SR3_15_12 FM(QSPI0_MOSI_IO0) 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)
390#define IP2SR3_19_16 FM(QSPI0_SPCLK) 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)
391#define IP2SR3_23_20 FM(QSPI1_MOSI_IO0) 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)
392#define IP2SR3_27_24 FM(QSPI1_SPCLK) 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)
393#define IP2SR3_31_28 FM(QSPI1_MISO_IO1) 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)
394
395/* IP3SR3 */ /* 0 */ /* 1 */ /* 2 */ /* 3 4 5 6 7 8 9 A B C D E F */
396#define IP3SR3_3_0 FM(QSPI1_IO2) 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)
397#define IP3SR3_7_4 FM(QSPI1_SSL) 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)
398#define IP3SR3_11_8 FM(QSPI1_IO3) 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)
399#define IP3SR3_15_12 FM(RPC_RESET_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) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0)
400#define IP3SR3_19_16 FM(RPC_WP_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) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0)
401#define IP3SR3_23_20 FM(RPC_INT_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) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0)
402
403/* SR6 */
404/* IP0SR6 */ /* 0 */ /* 1 */ /* 2 */ /* 3 4 5 6 7 8 9 A B C D E F */
405#define IP0SR6_3_0 FM(AVB1_MDIO) 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)
406#define IP0SR6_7_4 FM(AVB1_MAGIC) 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)
407#define IP0SR6_11_8 FM(AVB1_MDC) 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)
408#define IP0SR6_15_12 FM(AVB1_PHY_INT) 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)
409#define IP0SR6_19_16 FM(AVB1_LINK) FM(AVB1_MII_TX_ER) 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)
410#define IP0SR6_23_20 FM(AVB1_AVTP_MATCH) FM(AVB1_MII_RX_ER) 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)
411#define IP0SR6_27_24 FM(AVB1_TXC) FM(AVB1_MII_TXC) 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)
412#define IP0SR6_31_28 FM(AVB1_TX_CTL) FM(AVB1_MII_TX_EN) 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)
413
414/* IP1SR6 */ /* 0 */ /* 1 */ /* 2 */ /* 3 4 5 6 7 8 9 A B C D E F */
415#define IP1SR6_3_0 FM(AVB1_RXC) FM(AVB1_MII_RXC) 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)
416#define IP1SR6_7_4 FM(AVB1_RX_CTL) FM(AVB1_MII_RX_DV) 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)
417#define IP1SR6_11_8 FM(AVB1_AVTP_PPS) FM(AVB1_MII_COL) 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)
418#define IP1SR6_15_12 FM(AVB1_AVTP_CAPTURE) FM(AVB1_MII_CRS) 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)
419#define IP1SR6_19_16 FM(AVB1_TD1) FM(AVB1_MII_TD1) 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)
420#define IP1SR6_23_20 FM(AVB1_TD0) FM(AVB1_MII_TD0) 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)
421#define IP1SR6_27_24 FM(AVB1_RD1) FM(AVB1_MII_RD1) 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)
422#define IP1SR6_31_28 FM(AVB1_RD0) FM(AVB1_MII_RD0) 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)
423
424/* IP2SR6 */ /* 0 */ /* 1 */ /* 2 */ /* 3 4 5 6 7 8 9 A B C D E F */
425#define IP2SR6_3_0 FM(AVB1_TD2) FM(AVB1_MII_TD2) 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)
426#define IP2SR6_7_4 FM(AVB1_RD2) FM(AVB1_MII_RD2) 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)
427#define IP2SR6_11_8 FM(AVB1_TD3) FM(AVB1_MII_TD3) 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)
428#define IP2SR6_15_12 FM(AVB1_RD3) FM(AVB1_MII_RD3) 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)
429#define IP2SR6_19_16 FM(AVB1_TXCREFCLK) 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)
430
431/* SR7 */
432/* IP0SR7 */ /* 0 */ /* 1 */ /* 2 */ /* 3 4 5 6 7 8 9 A B C D E F */
433#define IP0SR7_3_0 FM(AVB0_AVTP_PPS) FM(AVB0_MII_COL) 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)
434#define IP0SR7_7_4 FM(AVB0_AVTP_CAPTURE) FM(AVB0_MII_CRS) 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)
435#define IP0SR7_11_8 FM(AVB0_AVTP_MATCH) FM(AVB0_MII_RX_ER) FM(CC5_OSCOUT) 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)
436#define IP0SR7_15_12 FM(AVB0_TD3) FM(AVB0_MII_TD3) 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)
437#define IP0SR7_19_16 FM(AVB0_LINK) FM(AVB0_MII_TX_ER) 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)
438#define IP0SR7_23_20 FM(AVB0_PHY_INT) 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)
439#define IP0SR7_27_24 FM(AVB0_TD2) FM(AVB0_MII_TD2) 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)
440#define IP0SR7_31_28 FM(AVB0_TD1) FM(AVB0_MII_TD1) 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)
441
442/* IP1SR7 */ /* 0 */ /* 1 */ /* 2 */ /* 3 4 5 6 7 8 9 A B C D E F */
443#define IP1SR7_3_0 FM(AVB0_RD3) FM(AVB0_MII_RD3) 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)
444#define IP1SR7_7_4 FM(AVB0_TXCREFCLK) 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)
445#define IP1SR7_11_8 FM(AVB0_MAGIC) 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)
446#define IP1SR7_15_12 FM(AVB0_TD0) FM(AVB0_MII_TD0) 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)
447#define IP1SR7_19_16 FM(AVB0_RD2) FM(AVB0_MII_RD2) 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)
448#define IP1SR7_23_20 FM(AVB0_MDC) 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)
449#define IP1SR7_27_24 FM(AVB0_MDIO) 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)
450#define IP1SR7_31_28 FM(AVB0_TXC) FM(AVB0_MII_TXC) 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)
451
452/* IP2SR7 */ /* 0 */ /* 1 */ /* 2 */ /* 3 4 5 6 7 8 9 A B C D E F */
453#define IP2SR7_3_0 FM(AVB0_TX_CTL) FM(AVB0_MII_TX_EN) 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)
454#define IP2SR7_7_4 FM(AVB0_RD1) FM(AVB0_MII_RD1) 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)
455#define IP2SR7_11_8 FM(AVB0_RD0) FM(AVB0_MII_RD0) 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)
456#define IP2SR7_15_12 FM(AVB0_RXC) FM(AVB0_MII_RXC) 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)
457#define IP2SR7_19_16 FM(AVB0_RX_CTL) FM(AVB0_MII_RX_DV) 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)
458
459/* SR8 */
460/* IP0SR8 */ /* 0 */ /* 1 */ /* 2 */ /* 3 4 5 6 7 8 9 A B C D E F */
461#define IP0SR8_3_0 FM(SCL0) 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)
462#define IP0SR8_7_4 FM(SDA0) 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)
463#define IP0SR8_11_8 FM(SCL1) 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)
464#define IP0SR8_15_12 FM(SDA1) 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)
465#define IP0SR8_19_16 FM(SCL2) 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)
466#define IP0SR8_23_20 FM(SDA2) 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)
467#define IP0SR8_27_24 FM(SCL3) 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)
468#define IP0SR8_31_28 FM(SDA3) 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)
469
470/* IP1SR8 */ /* 0 */ /* 1 */ /* 2 */ /* 3 4 5 6 7 8 9 A B C D E F */
471#define IP1SR8_3_0 FM(SCL4) FM(HRX2) 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)
472#define IP1SR8_7_4 FM(SDA4) FM(HTX2) FM(CTS4_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) F_(0, 0) F_(0, 0)
473#define IP1SR8_11_8 FM(SCL5) FM(HRTS2_N) 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) F_(0, 0) F_(0, 0)
474#define IP1SR8_15_12 FM(SDA5) FM(SCIF_CLK2) 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)
475#define IP1SR8_19_16 F_(0, 0) FM(HCTS2_N) 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)
476#define IP1SR8_23_20 F_(0, 0) FM(HSCK2) 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)
477
478#define PINMUX_GPSR \
479 GPSR3_29 \
480 GPSR1_28 GPSR3_28 \
481 GPSR1_27 GPSR3_27 \
482 GPSR1_26 GPSR3_26 \
483 GPSR1_25 GPSR3_25 \
484 GPSR1_24 GPSR3_24 GPSR4_24 \
485 GPSR1_23 GPSR3_23 GPSR4_23 \
486 GPSR1_22 GPSR3_22 GPSR4_22 \
487 GPSR1_21 GPSR3_21 GPSR4_21 \
488 GPSR1_20 GPSR3_20 GPSR4_20 GPSR5_20 GPSR6_20 GPSR7_20 \
489 GPSR1_19 GPSR2_19 GPSR3_19 GPSR4_19 GPSR5_19 GPSR6_19 GPSR7_19 \
490GPSR0_18 GPSR1_18 GPSR2_18 GPSR3_18 GPSR4_18 GPSR5_18 GPSR6_18 GPSR7_18 \
491GPSR0_17 GPSR1_17 GPSR2_17 GPSR3_17 GPSR4_17 GPSR5_17 GPSR6_17 GPSR7_17 \
492GPSR0_16 GPSR1_16 GPSR2_16 GPSR3_16 GPSR4_16 GPSR5_16 GPSR6_16 GPSR7_16 \
493GPSR0_15 GPSR1_15 GPSR2_15 GPSR3_15 GPSR4_15 GPSR5_15 GPSR6_15 GPSR7_15 \
494GPSR0_14 GPSR1_14 GPSR2_14 GPSR3_14 GPSR4_14 GPSR5_14 GPSR6_14 GPSR7_14 \
495GPSR0_13 GPSR1_13 GPSR2_13 GPSR3_13 GPSR4_13 GPSR5_13 GPSR6_13 GPSR7_13 GPSR8_13 \
496GPSR0_12 GPSR1_12 GPSR2_12 GPSR3_12 GPSR4_12 GPSR5_12 GPSR6_12 GPSR7_12 GPSR8_12 \
497GPSR0_11 GPSR1_11 GPSR2_11 GPSR3_11 GPSR4_11 GPSR5_11 GPSR6_11 GPSR7_11 GPSR8_11 \
498GPSR0_10 GPSR1_10 GPSR2_10 GPSR3_10 GPSR4_10 GPSR5_10 GPSR6_10 GPSR7_10 GPSR8_10 \
499GPSR0_9 GPSR1_9 GPSR2_9 GPSR3_9 GPSR4_9 GPSR5_9 GPSR6_9 GPSR7_9 GPSR8_9 \
500GPSR0_8 GPSR1_8 GPSR2_8 GPSR3_8 GPSR4_8 GPSR5_8 GPSR6_8 GPSR7_8 GPSR8_8 \
501GPSR0_7 GPSR1_7 GPSR2_7 GPSR3_7 GPSR4_7 GPSR5_7 GPSR6_7 GPSR7_7 GPSR8_7 \
502GPSR0_6 GPSR1_6 GPSR2_6 GPSR3_6 GPSR4_6 GPSR5_6 GPSR6_6 GPSR7_6 GPSR8_6 \
503GPSR0_5 GPSR1_5 GPSR2_5 GPSR3_5 GPSR4_5 GPSR5_5 GPSR6_5 GPSR7_5 GPSR8_5 \
504GPSR0_4 GPSR1_4 GPSR2_4 GPSR3_4 GPSR4_4 GPSR5_4 GPSR6_4 GPSR7_4 GPSR8_4 \
505GPSR0_3 GPSR1_3 GPSR2_3 GPSR3_3 GPSR4_3 GPSR5_3 GPSR6_3 GPSR7_3 GPSR8_3 \
506GPSR0_2 GPSR1_2 GPSR2_2 GPSR3_2 GPSR4_2 GPSR5_2 GPSR6_2 GPSR7_2 GPSR8_2 \
507GPSR0_1 GPSR1_1 GPSR2_1 GPSR3_1 GPSR4_1 GPSR5_1 GPSR6_1 GPSR7_1 GPSR8_1 \
508GPSR0_0 GPSR1_0 GPSR2_0 GPSR3_0 GPSR4_0 GPSR5_0 GPSR6_0 GPSR7_0 GPSR8_0
509
510#define PINMUX_IPSR \
511\
512FM(IP0SR0_3_0) IP0SR0_3_0 FM(IP1SR0_3_0) IP1SR0_3_0 FM(IP2SR0_3_0) IP2SR0_3_0 \
513FM(IP0SR0_7_4) IP0SR0_7_4 FM(IP1SR0_7_4) IP1SR0_7_4 FM(IP2SR0_7_4) IP2SR0_7_4 \
514FM(IP0SR0_11_8) IP0SR0_11_8 FM(IP1SR0_11_8) IP1SR0_11_8 FM(IP2SR0_11_8) IP2SR0_11_8 \
515FM(IP0SR0_15_12) IP0SR0_15_12 FM(IP1SR0_15_12) IP1SR0_15_12 \
516FM(IP0SR0_19_16) IP0SR0_19_16 FM(IP1SR0_19_16) IP1SR0_19_16 \
517FM(IP0SR0_23_20) IP0SR0_23_20 FM(IP1SR0_23_20) IP1SR0_23_20 \
518FM(IP0SR0_27_24) IP0SR0_27_24 FM(IP1SR0_27_24) IP1SR0_27_24 \
519FM(IP0SR0_31_28) IP0SR0_31_28 FM(IP1SR0_31_28) IP1SR0_31_28 \
520\
521FM(IP0SR1_3_0) IP0SR1_3_0 FM(IP1SR1_3_0) IP1SR1_3_0 FM(IP2SR1_3_0) IP2SR1_3_0 FM(IP3SR1_3_0) IP3SR1_3_0 \
522FM(IP0SR1_7_4) IP0SR1_7_4 FM(IP1SR1_7_4) IP1SR1_7_4 FM(IP2SR1_7_4) IP2SR1_7_4 FM(IP3SR1_7_4) IP3SR1_7_4 \
523FM(IP0SR1_11_8) IP0SR1_11_8 FM(IP1SR1_11_8) IP1SR1_11_8 FM(IP2SR1_11_8) IP2SR1_11_8 FM(IP3SR1_11_8) IP3SR1_11_8 \
524FM(IP0SR1_15_12) IP0SR1_15_12 FM(IP1SR1_15_12) IP1SR1_15_12 FM(IP2SR1_15_12) IP2SR1_15_12 FM(IP3SR1_15_12) IP3SR1_15_12 \
525FM(IP0SR1_19_16) IP0SR1_19_16 FM(IP1SR1_19_16) IP1SR1_19_16 FM(IP2SR1_19_16) IP2SR1_19_16 FM(IP3SR1_19_16) IP3SR1_19_16 \
526FM(IP0SR1_23_20) IP0SR1_23_20 FM(IP1SR1_23_20) IP1SR1_23_20 FM(IP2SR1_23_20) IP2SR1_23_20 \
527FM(IP0SR1_27_24) IP0SR1_27_24 FM(IP1SR1_27_24) IP1SR1_27_24 FM(IP2SR1_27_24) IP2SR1_27_24 \
528FM(IP0SR1_31_28) IP0SR1_31_28 FM(IP1SR1_31_28) IP1SR1_31_28 FM(IP2SR1_31_28) IP2SR1_31_28 \
529\
530FM(IP0SR2_3_0) IP0SR2_3_0 FM(IP1SR2_3_0) IP1SR2_3_0 FM(IP2SR2_3_0) IP2SR2_3_0 \
531FM(IP0SR2_7_4) IP0SR2_7_4 FM(IP1SR2_7_4) IP1SR2_7_4 FM(IP2SR2_7_4) IP2SR2_7_4 \
532FM(IP0SR2_11_8) IP0SR2_11_8 FM(IP1SR2_11_8) IP1SR2_11_8 FM(IP2SR2_11_8) IP2SR2_11_8 \
533FM(IP0SR2_15_12) IP0SR2_15_12 FM(IP1SR2_15_12) IP1SR2_15_12 FM(IP2SR2_15_12) IP2SR2_15_12 \
534FM(IP0SR2_19_16) IP0SR2_19_16 FM(IP1SR2_19_16) IP1SR2_19_16 \
535FM(IP0SR2_23_20) IP0SR2_23_20 FM(IP1SR2_23_20) IP1SR2_23_20 \
536FM(IP0SR2_27_24) IP0SR2_27_24 FM(IP1SR2_27_24) IP1SR2_27_24 \
537FM(IP0SR2_31_28) IP0SR2_31_28 FM(IP1SR2_31_28) IP1SR2_31_28 \
538\
539FM(IP0SR3_3_0) IP0SR3_3_0 FM(IP1SR3_3_0) IP1SR3_3_0 FM(IP2SR3_3_0) IP2SR3_3_0 FM(IP3SR3_3_0) IP3SR3_3_0 \
540FM(IP0SR3_7_4) IP0SR3_7_4 FM(IP1SR3_7_4) IP1SR3_7_4 FM(IP2SR3_7_4) IP2SR3_7_4 FM(IP3SR3_7_4) IP3SR3_7_4 \
541FM(IP0SR3_11_8) IP0SR3_11_8 FM(IP1SR3_11_8) IP1SR3_11_8 FM(IP2SR3_11_8) IP2SR3_11_8 FM(IP3SR3_11_8) IP3SR3_11_8 \
542FM(IP0SR3_15_12) IP0SR3_15_12 FM(IP1SR3_15_12) IP1SR3_15_12 FM(IP2SR3_15_12) IP2SR3_15_12 FM(IP3SR3_15_12) IP3SR3_15_12 \
543FM(IP0SR3_19_16) IP0SR3_19_16 FM(IP1SR3_19_16) IP1SR3_19_16 FM(IP2SR3_19_16) IP2SR3_19_16 FM(IP3SR3_19_16) IP3SR3_19_16 \
544FM(IP0SR3_23_20) IP0SR3_23_20 FM(IP1SR3_23_20) IP1SR3_23_20 FM(IP2SR3_23_20) IP2SR3_23_20 FM(IP3SR3_23_20) IP3SR3_23_20 \
545FM(IP0SR3_27_24) IP0SR3_27_24 FM(IP1SR3_27_24) IP1SR3_27_24 FM(IP2SR3_27_24) IP2SR3_27_24 \
546FM(IP0SR3_31_28) IP0SR3_31_28 FM(IP1SR3_31_28) IP1SR3_31_28 FM(IP2SR3_31_28) IP2SR3_31_28 \
547\
548FM(IP0SR6_3_0) IP0SR6_3_0 FM(IP1SR6_3_0) IP1SR6_3_0 FM(IP2SR6_3_0) IP2SR6_3_0 \
549FM(IP0SR6_7_4) IP0SR6_7_4 FM(IP1SR6_7_4) IP1SR6_7_4 FM(IP2SR6_7_4) IP2SR6_7_4 \
550FM(IP0SR6_11_8) IP0SR6_11_8 FM(IP1SR6_11_8) IP1SR6_11_8 FM(IP2SR6_11_8) IP2SR6_11_8 \
551FM(IP0SR6_15_12) IP0SR6_15_12 FM(IP1SR6_15_12) IP1SR6_15_12 FM(IP2SR6_15_12) IP2SR6_15_12 \
552FM(IP0SR6_19_16) IP0SR6_19_16 FM(IP1SR6_19_16) IP1SR6_19_16 FM(IP2SR6_19_16) IP2SR6_19_16 \
553FM(IP0SR6_23_20) IP0SR6_23_20 FM(IP1SR6_23_20) IP1SR6_23_20 \
554FM(IP0SR6_27_24) IP0SR6_27_24 FM(IP1SR6_27_24) IP1SR6_27_24 \
555FM(IP0SR6_31_28) IP0SR6_31_28 FM(IP1SR6_31_28) IP1SR6_31_28 \
556\
557FM(IP0SR7_3_0) IP0SR7_3_0 FM(IP1SR7_3_0) IP1SR7_3_0 FM(IP2SR7_3_0) IP2SR7_3_0 \
558FM(IP0SR7_7_4) IP0SR7_7_4 FM(IP1SR7_7_4) IP1SR7_7_4 FM(IP2SR7_7_4) IP2SR7_7_4 \
559FM(IP0SR7_11_8) IP0SR7_11_8 FM(IP1SR7_11_8) IP1SR7_11_8 FM(IP2SR7_11_8) IP2SR7_11_8 \
560FM(IP0SR7_15_12) IP0SR7_15_12 FM(IP1SR7_15_12) IP1SR7_15_12 FM(IP2SR7_15_12) IP2SR7_15_12 \
561FM(IP0SR7_19_16) IP0SR7_19_16 FM(IP1SR7_19_16) IP1SR7_19_16 FM(IP2SR7_19_16) IP2SR7_19_16 \
562FM(IP0SR7_23_20) IP0SR7_23_20 FM(IP1SR7_23_20) IP1SR7_23_20 \
563FM(IP0SR7_27_24) IP0SR7_27_24 FM(IP1SR7_27_24) IP1SR7_27_24 \
564FM(IP0SR7_31_28) IP0SR7_31_28 FM(IP1SR7_31_28) IP1SR7_31_28 \
565\
566FM(IP0SR8_3_0) IP0SR8_3_0 FM(IP1SR8_3_0) IP1SR8_3_0 \
567FM(IP0SR8_7_4) IP0SR8_7_4 FM(IP1SR8_7_4) IP1SR8_7_4 \
568FM(IP0SR8_11_8) IP0SR8_11_8 FM(IP1SR8_11_8) IP1SR8_11_8 \
569FM(IP0SR8_15_12) IP0SR8_15_12 FM(IP1SR8_15_12) IP1SR8_15_12 \
570FM(IP0SR8_19_16) IP0SR8_19_16 FM(IP1SR8_19_16) IP1SR8_19_16 \
571FM(IP0SR8_23_20) IP0SR8_23_20 FM(IP1SR8_23_20) IP1SR8_23_20 \
572FM(IP0SR8_27_24) IP0SR8_27_24 \
573FM(IP0SR8_31_28) IP0SR8_31_28
574
575/* MOD_SEL4 */ /* 0 */ /* 1 */
576#define MOD_SEL4_19 FM(SEL_TSN0_TD2_0) FM(SEL_TSN0_TD2_1)
577#define MOD_SEL4_18 FM(SEL_TSN0_TD3_0) FM(SEL_TSN0_TD3_1)
578#define MOD_SEL4_15 FM(SEL_TSN0_TD0_0) FM(SEL_TSN0_TD0_1)
579#define MOD_SEL4_14 FM(SEL_TSN0_TD1_0) FM(SEL_TSN0_TD1_1)
580#define MOD_SEL4_12 FM(SEL_TSN0_TXC_0) FM(SEL_TSN0_TXC_1)
581#define MOD_SEL4_9 FM(SEL_TSN0_TX_CTL_0) FM(SEL_TSN0_TX_CTL_1)
582#define MOD_SEL4_8 FM(SEL_TSN0_AVTP_PPS0_0) FM(SEL_TSN0_AVTP_PPS0_1)
583#define MOD_SEL4_5 FM(SEL_TSN0_AVTP_MATCH_0) FM(SEL_TSN0_AVTP_MATCH_1)
584#define MOD_SEL4_2 FM(SEL_TSN0_AVTP_PPS1_0) FM(SEL_TSN0_AVTP_PPS1_1)
585#define MOD_SEL4_1 FM(SEL_TSN0_MDC_0) FM(SEL_TSN0_MDC_1)
586
587/* MOD_SEL5 */ /* 0 */ /* 1 */
588#define MOD_SEL5_19 FM(SEL_AVB2_TX_CTL_0) FM(SEL_AVB2_TX_CTL_1)
589#define MOD_SEL5_16 FM(SEL_AVB2_TXC_0) FM(SEL_AVB2_TXC_1)
590#define MOD_SEL5_15 FM(SEL_AVB2_TD0_0) FM(SEL_AVB2_TD0_1)
591#define MOD_SEL5_12 FM(SEL_AVB2_TD1_0) FM(SEL_AVB2_TD1_1)
592#define MOD_SEL5_11 FM(SEL_AVB2_TD2_0) FM(SEL_AVB2_TD2_1)
593#define MOD_SEL5_8 FM(SEL_AVB2_TD3_0) FM(SEL_AVB2_TD3_1)
594#define MOD_SEL5_6 FM(SEL_AVB2_MDC_0) FM(SEL_AVB2_MDC_1)
595#define MOD_SEL5_5 FM(SEL_AVB2_MAGIC_0) FM(SEL_AVB2_MAGIC_1)
596#define MOD_SEL5_2 FM(SEL_AVB2_AVTP_MATCH_0) FM(SEL_AVB2_AVTP_MATCH_1)
597#define MOD_SEL5_0 FM(SEL_AVB2_AVTP_PPS_0) FM(SEL_AVB2_AVTP_PPS_1)
598
599/* MOD_SEL6 */ /* 0 */ /* 1 */
600#define MOD_SEL6_18 FM(SEL_AVB1_TD3_0) FM(SEL_AVB1_TD3_1)
601#define MOD_SEL6_16 FM(SEL_AVB1_TD2_0) FM(SEL_AVB1_TD2_1)
602#define MOD_SEL6_13 FM(SEL_AVB1_TD0_0) FM(SEL_AVB1_TD0_1)
603#define MOD_SEL6_12 FM(SEL_AVB1_TD1_0) FM(SEL_AVB1_TD1_1)
604#define MOD_SEL6_10 FM(SEL_AVB1_AVTP_PPS_0) FM(SEL_AVB1_AVTP_PPS_1)
605#define MOD_SEL6_7 FM(SEL_AVB1_TX_CTL_0) FM(SEL_AVB1_TX_CTL_1)
606#define MOD_SEL6_6 FM(SEL_AVB1_TXC_0) FM(SEL_AVB1_TXC_1)
607#define MOD_SEL6_5 FM(SEL_AVB1_AVTP_MATCH_0) FM(SEL_AVB1_AVTP_MATCH_1)
608#define MOD_SEL6_2 FM(SEL_AVB1_MDC_0) FM(SEL_AVB1_MDC_1)
609#define MOD_SEL6_1 FM(SEL_AVB1_MAGIC_0) FM(SEL_AVB1_MAGIC_1)
610
611/* MOD_SEL7 */ /* 0 */ /* 1 */
612#define MOD_SEL7_16 FM(SEL_AVB0_TX_CTL_0) FM(SEL_AVB0_TX_CTL_1)
613#define MOD_SEL7_15 FM(SEL_AVB0_TXC_0) FM(SEL_AVB0_TXC_1)
614#define MOD_SEL7_13 FM(SEL_AVB0_MDC_0) FM(SEL_AVB0_MDC_1)
615#define MOD_SEL7_11 FM(SEL_AVB0_TD0_0) FM(SEL_AVB0_TD0_1)
616#define MOD_SEL7_10 FM(SEL_AVB0_MAGIC_0) FM(SEL_AVB0_MAGIC_1)
617#define MOD_SEL7_7 FM(SEL_AVB0_TD1_0) FM(SEL_AVB0_TD1_1)
618#define MOD_SEL7_6 FM(SEL_AVB0_TD2_0) FM(SEL_AVB0_TD2_1)
619#define MOD_SEL7_3 FM(SEL_AVB0_TD3_0) FM(SEL_AVB0_TD3_1)
620#define MOD_SEL7_2 FM(SEL_AVB0_AVTP_MATCH_0) FM(SEL_AVB0_AVTP_MATCH_1)
621#define MOD_SEL7_0 FM(SEL_AVB0_AVTP_PPS_0) FM(SEL_AVB0_AVTP_PPS_1)
622
623/* MOD_SEL8 */ /* 0 */ /* 1 */
624#define MOD_SEL8_11 FM(SEL_SDA5_0) FM(SEL_SDA5_1)
625#define MOD_SEL8_10 FM(SEL_SCL5_0) FM(SEL_SCL5_1)
626#define MOD_SEL8_9 FM(SEL_SDA4_0) FM(SEL_SDA4_1)
627#define MOD_SEL8_8 FM(SEL_SCL4_0) FM(SEL_SCL4_1)
628#define MOD_SEL8_7 FM(SEL_SDA3_0) FM(SEL_SDA3_1)
629#define MOD_SEL8_6 FM(SEL_SCL3_0) FM(SEL_SCL3_1)
630#define MOD_SEL8_5 FM(SEL_SDA2_0) FM(SEL_SDA2_1)
631#define MOD_SEL8_4 FM(SEL_SCL2_0) FM(SEL_SCL2_1)
632#define MOD_SEL8_3 FM(SEL_SDA1_0) FM(SEL_SDA1_1)
633#define MOD_SEL8_2 FM(SEL_SCL1_0) FM(SEL_SCL1_1)
634#define MOD_SEL8_1 FM(SEL_SDA0_0) FM(SEL_SDA0_1)
635#define MOD_SEL8_0 FM(SEL_SCL0_0) FM(SEL_SCL0_1)
636
637#define PINMUX_MOD_SELS \
638\
639MOD_SEL4_19 MOD_SEL5_19 \
640MOD_SEL4_18 MOD_SEL6_18 \
641 \
642 MOD_SEL5_16 MOD_SEL6_16 MOD_SEL7_16 \
643MOD_SEL4_15 MOD_SEL5_15 MOD_SEL7_15 \
644MOD_SEL4_14 \
645 MOD_SEL6_13 MOD_SEL7_13 \
646MOD_SEL4_12 MOD_SEL5_12 MOD_SEL6_12 \
647 MOD_SEL5_11 MOD_SEL7_11 MOD_SEL8_11 \
648 MOD_SEL6_10 MOD_SEL7_10 MOD_SEL8_10 \
649MOD_SEL4_9 MOD_SEL8_9 \
650MOD_SEL4_8 MOD_SEL5_8 MOD_SEL8_8 \
651 MOD_SEL6_7 MOD_SEL7_7 MOD_SEL8_7 \
652 MOD_SEL5_6 MOD_SEL6_6 MOD_SEL7_6 MOD_SEL8_6 \
653MOD_SEL4_5 MOD_SEL5_5 MOD_SEL6_5 MOD_SEL8_5 \
654 MOD_SEL8_4 \
655 MOD_SEL7_3 MOD_SEL8_3 \
656MOD_SEL4_2 MOD_SEL5_2 MOD_SEL6_2 MOD_SEL7_2 MOD_SEL8_2 \
657MOD_SEL4_1 MOD_SEL6_1 MOD_SEL8_1 \
658 MOD_SEL5_0 MOD_SEL7_0 MOD_SEL8_0
659
660enum {
661 PINMUX_RESERVED = 0,
662
663 PINMUX_DATA_BEGIN,
664 GP_ALL(DATA),
665 PINMUX_DATA_END,
666
667#define F_(x, y)
668#define FM(x) FN_##x,
669 PINMUX_FUNCTION_BEGIN,
670 GP_ALL(FN),
671 PINMUX_GPSR
672 PINMUX_IPSR
673 PINMUX_MOD_SELS
674 PINMUX_FUNCTION_END,
675#undef F_
676#undef FM
677
678#define F_(x, y)
679#define FM(x) x##_MARK,
680 PINMUX_MARK_BEGIN,
681 PINMUX_GPSR
682 PINMUX_IPSR
683 PINMUX_MOD_SELS
684 PINMUX_MARK_END,
685#undef F_
686#undef FM
687};
688
689static const u16 pinmux_data[] = {
690 PINMUX_DATA_GP_ALL(),
691
692 PINMUX_SINGLE(AVS1),
693 PINMUX_SINGLE(AVS0),
694 PINMUX_SINGLE(PCIE1_CLKREQ_N),
695 PINMUX_SINGLE(PCIE0_CLKREQ_N),
696
697 /* TSN0 without MODSEL4 */
698 PINMUX_SINGLE(TSN0_TXCREFCLK),
699 PINMUX_SINGLE(TSN0_RD2),
700 PINMUX_SINGLE(TSN0_RD3),
701 PINMUX_SINGLE(TSN0_RD1),
702 PINMUX_SINGLE(TSN0_RXC),
703 PINMUX_SINGLE(TSN0_RD0),
704 PINMUX_SINGLE(TSN0_RX_CTL),
705 PINMUX_SINGLE(TSN0_AVTP_CAPTURE),
706 PINMUX_SINGLE(TSN0_LINK),
707 PINMUX_SINGLE(TSN0_PHY_INT),
708 PINMUX_SINGLE(TSN0_MDIO),
709 /* TSN0 with MODSEL4 */
710 PINMUX_IPSR_NOGM(0, TSN0_TD2, SEL_TSN0_TD2_1),
711 PINMUX_IPSR_NOGM(0, TSN0_TD3, SEL_TSN0_TD3_1),
712 PINMUX_IPSR_NOGM(0, TSN0_TD0, SEL_TSN0_TD0_1),
713 PINMUX_IPSR_NOGM(0, TSN0_TD1, SEL_TSN0_TD1_1),
714 PINMUX_IPSR_NOGM(0, TSN0_TXC, SEL_TSN0_TXC_1),
715 PINMUX_IPSR_NOGM(0, TSN0_TX_CTL, SEL_TSN0_TX_CTL_1),
716 PINMUX_IPSR_NOGM(0, TSN0_AVTP_PPS0, SEL_TSN0_AVTP_PPS0_1),
717 PINMUX_IPSR_NOGM(0, TSN0_AVTP_MATCH, SEL_TSN0_AVTP_MATCH_1),
718 PINMUX_IPSR_NOGM(0, TSN0_AVTP_PPS1, SEL_TSN0_AVTP_PPS1_1),
719 PINMUX_IPSR_NOGM(0, TSN0_MDC, SEL_TSN0_MDC_1),
720
721 /* TSN0 without MODSEL5 */
722 PINMUX_SINGLE(AVB2_RX_CTL),
723 PINMUX_SINGLE(AVB2_RXC),
724 PINMUX_SINGLE(AVB2_RD0),
725 PINMUX_SINGLE(AVB2_RD1),
726 PINMUX_SINGLE(AVB2_RD2),
727 PINMUX_SINGLE(AVB2_MDIO),
728 PINMUX_SINGLE(AVB2_RD3),
729 PINMUX_SINGLE(AVB2_TXCREFCLK),
730 PINMUX_SINGLE(AVB2_PHY_INT),
731 PINMUX_SINGLE(AVB2_LINK),
732 PINMUX_SINGLE(AVB2_AVTP_CAPTURE),
733 /* TSN0 with MODSEL5 */
734 PINMUX_IPSR_NOGM(0, AVB2_TX_CTL, SEL_AVB2_TX_CTL_1),
735 PINMUX_IPSR_NOGM(0, AVB2_TXC, SEL_AVB2_TXC_1),
736 PINMUX_IPSR_NOGM(0, AVB2_TD0, SEL_AVB2_TD0_1),
737 PINMUX_IPSR_NOGM(0, AVB2_TD1, SEL_AVB2_TD1_1),
738 PINMUX_IPSR_NOGM(0, AVB2_TD2, SEL_AVB2_TD2_1),
739 PINMUX_IPSR_NOGM(0, AVB2_TD3, SEL_AVB2_TD3_1),
740 PINMUX_IPSR_NOGM(0, AVB2_MDC, SEL_AVB2_MDC_1),
741 PINMUX_IPSR_NOGM(0, AVB2_MAGIC, SEL_AVB2_MAGIC_1),
742 PINMUX_IPSR_NOGM(0, AVB2_AVTP_MATCH, SEL_AVB2_AVTP_MATCH_1),
743 PINMUX_IPSR_NOGM(0, AVB2_AVTP_PPS, SEL_AVB2_AVTP_PPS_1),
744
745 /* IP0SR0 */
746 PINMUX_IPSR_GPSR(IP0SR0_3_0, ERROROUTC_B),
747 PINMUX_IPSR_GPSR(IP0SR0_3_0, TCLK2_A),
748
749 PINMUX_IPSR_GPSR(IP0SR0_7_4, MSIOF3_SS1),
750
751 PINMUX_IPSR_GPSR(IP0SR0_11_8, MSIOF3_SS2),
752
753 PINMUX_IPSR_GPSR(IP0SR0_15_12, IRQ3),
754 PINMUX_IPSR_GPSR(IP0SR0_15_12, MSIOF3_SCK),
755
756 PINMUX_IPSR_GPSR(IP0SR0_19_16, IRQ2),
757 PINMUX_IPSR_GPSR(IP0SR0_19_16, MSIOF3_TXD),
758
759 PINMUX_IPSR_GPSR(IP0SR0_23_20, IRQ1),
760 PINMUX_IPSR_GPSR(IP0SR0_23_20, MSIOF3_RXD),
761
762 PINMUX_IPSR_GPSR(IP0SR0_27_24, IRQ0),
763 PINMUX_IPSR_GPSR(IP0SR0_27_24, MSIOF3_SYNC),
764
765 PINMUX_IPSR_GPSR(IP0SR0_31_28, MSIOF5_SS2),
766
767 /* IP1SR0 */
768 PINMUX_IPSR_GPSR(IP1SR0_3_0, MSIOF5_SS1),
769
770 PINMUX_IPSR_GPSR(IP1SR0_7_4, MSIOF5_SYNC),
771
772 PINMUX_IPSR_GPSR(IP1SR0_11_8, MSIOF5_TXD),
773
774 PINMUX_IPSR_GPSR(IP1SR0_15_12, MSIOF5_SCK),
775
776 PINMUX_IPSR_GPSR(IP1SR0_19_16, MSIOF5_RXD),
777
778 PINMUX_IPSR_GPSR(IP1SR0_23_20, MSIOF2_SS2),
779 PINMUX_IPSR_GPSR(IP1SR0_23_20, TCLK1),
780 PINMUX_IPSR_GPSR(IP1SR0_23_20, IRQ2_A),
781
782 PINMUX_IPSR_GPSR(IP1SR0_27_24, MSIOF2_SS1),
783 PINMUX_IPSR_GPSR(IP1SR0_27_24, HTX1),
784 PINMUX_IPSR_GPSR(IP1SR0_27_24, TX1),
785
786 PINMUX_IPSR_GPSR(IP1SR0_31_28, MSIOF2_SYNC),
787 PINMUX_IPSR_GPSR(IP1SR0_31_28, HRX1),
788 PINMUX_IPSR_GPSR(IP1SR0_31_28, RX1),
789
790 /* IP2SR0 */
791 PINMUX_IPSR_GPSR(IP2SR0_3_0, MSIOF2_TXD),
792 PINMUX_IPSR_GPSR(IP2SR0_3_0, HCTS1_N),
793 PINMUX_IPSR_GPSR(IP2SR0_3_0, CTS1_N),
794
795 PINMUX_IPSR_GPSR(IP2SR0_7_4, MSIOF2_SCK),
796 PINMUX_IPSR_GPSR(IP2SR0_7_4, HRTS1_N),
797 PINMUX_IPSR_GPSR(IP2SR0_7_4, RTS1_N),
798
799 PINMUX_IPSR_GPSR(IP2SR0_11_8, MSIOF2_RXD),
800 PINMUX_IPSR_GPSR(IP2SR0_11_8, HSCK1),
801 PINMUX_IPSR_GPSR(IP2SR0_11_8, SCK1),
802
803 /* IP0SR1 */
804 PINMUX_IPSR_GPSR(IP0SR1_3_0, MSIOF1_SS2),
805 PINMUX_IPSR_GPSR(IP0SR1_3_0, HTX3_A),
806 PINMUX_IPSR_GPSR(IP0SR1_3_0, TX3),
807
808 PINMUX_IPSR_GPSR(IP0SR1_7_4, MSIOF1_SS1),
809 PINMUX_IPSR_GPSR(IP0SR1_7_4, HCTS3_N_A),
810 PINMUX_IPSR_GPSR(IP0SR1_7_4, RX3),
811
812 PINMUX_IPSR_GPSR(IP0SR1_11_8, MSIOF1_SYNC),
813 PINMUX_IPSR_GPSR(IP0SR1_11_8, HRTS3_N_A),
814 PINMUX_IPSR_GPSR(IP0SR1_11_8, RTS3_N),
815
816 PINMUX_IPSR_GPSR(IP0SR1_15_12, MSIOF1_SCK),
817 PINMUX_IPSR_GPSR(IP0SR1_15_12, HSCK3_A),
818 PINMUX_IPSR_GPSR(IP0SR1_15_12, CTS3_N),
819
820 PINMUX_IPSR_GPSR(IP0SR1_19_16, MSIOF1_TXD),
821 PINMUX_IPSR_GPSR(IP0SR1_19_16, HRX3_A),
822 PINMUX_IPSR_GPSR(IP0SR1_19_16, SCK3),
823
824 PINMUX_IPSR_GPSR(IP0SR1_23_20, MSIOF1_RXD),
825
826 PINMUX_IPSR_GPSR(IP0SR1_27_24, MSIOF0_SS2),
827 PINMUX_IPSR_GPSR(IP0SR1_27_24, HTX1_X),
828 PINMUX_IPSR_GPSR(IP0SR1_27_24, TX1_X),
829
830 PINMUX_IPSR_GPSR(IP0SR1_31_28, MSIOF0_SS1),
831 PINMUX_IPSR_GPSR(IP0SR1_31_28, HRX1_X),
832 PINMUX_IPSR_GPSR(IP0SR1_31_28, RX1_X),
833
834 /* IP1SR1 */
835 PINMUX_IPSR_GPSR(IP1SR1_3_0, MSIOF0_SYNC),
836 PINMUX_IPSR_GPSR(IP1SR1_3_0, HCTS1_N_X),
837 PINMUX_IPSR_GPSR(IP1SR1_3_0, CTS1_N_X),
838 PINMUX_IPSR_GPSR(IP1SR1_3_0, CANFD5_TX_B),
839
840 PINMUX_IPSR_GPSR(IP1SR1_7_4, MSIOF0_TXD),
841 PINMUX_IPSR_GPSR(IP1SR1_7_4, HRTS1_N_X),
842 PINMUX_IPSR_GPSR(IP1SR1_7_4, RTS1_N_X),
843 PINMUX_IPSR_GPSR(IP1SR1_7_4, CANFD5_RX_B),
844
845 PINMUX_IPSR_GPSR(IP1SR1_11_8, MSIOF0_SCK),
846 PINMUX_IPSR_GPSR(IP1SR1_11_8, HSCK1_X),
847 PINMUX_IPSR_GPSR(IP1SR1_11_8, SCK1_X),
848
849 PINMUX_IPSR_GPSR(IP1SR1_15_12, MSIOF0_RXD),
850
851 PINMUX_IPSR_GPSR(IP1SR1_19_16, HTX0),
852 PINMUX_IPSR_GPSR(IP1SR1_19_16, TX0),
853
854 PINMUX_IPSR_GPSR(IP1SR1_23_20, HCTS0_N),
855 PINMUX_IPSR_GPSR(IP1SR1_23_20, CTS0_N),
856 PINMUX_IPSR_GPSR(IP1SR1_23_20, PWM8_A),
857
858 PINMUX_IPSR_GPSR(IP1SR1_27_24, HRTS0_N),
859 PINMUX_IPSR_GPSR(IP1SR1_27_24, RTS0_N),
860 PINMUX_IPSR_GPSR(IP1SR1_27_24, PWM9_A),
861
862 PINMUX_IPSR_GPSR(IP1SR1_31_28, HSCK0),
863 PINMUX_IPSR_GPSR(IP1SR1_31_28, SCK0),
864 PINMUX_IPSR_GPSR(IP1SR1_31_28, PWM0_A),
865
866 /* IP2SR1 */
867 PINMUX_IPSR_GPSR(IP2SR1_3_0, HRX0),
868 PINMUX_IPSR_GPSR(IP2SR1_3_0, RX0),
869
870 PINMUX_IPSR_GPSR(IP2SR1_7_4, SCIF_CLK),
871 PINMUX_IPSR_GPSR(IP2SR1_7_4, IRQ4_A),
872
873 PINMUX_IPSR_GPSR(IP2SR1_11_8, SSI_SCK),
874 PINMUX_IPSR_GPSR(IP2SR1_11_8, TCLK3),
875
876 PINMUX_IPSR_GPSR(IP2SR1_15_12, SSI_WS),
877 PINMUX_IPSR_GPSR(IP2SR1_15_12, TCLK4),
878
879 PINMUX_IPSR_GPSR(IP2SR1_19_16, SSI_SD),
880 PINMUX_IPSR_GPSR(IP2SR1_19_16, IRQ0_A),
881
882 PINMUX_IPSR_GPSR(IP2SR1_23_20, AUDIO_CLKOUT),
883 PINMUX_IPSR_GPSR(IP2SR1_23_20, IRQ1_A),
884
885 PINMUX_IPSR_GPSR(IP2SR1_27_24, AUDIO_CLKIN),
886 PINMUX_IPSR_GPSR(IP2SR1_27_24, PWM3_A),
887
888 PINMUX_IPSR_GPSR(IP2SR1_31_28, TCLK2),
889 PINMUX_IPSR_GPSR(IP2SR1_31_28, MSIOF4_SS1),
890 PINMUX_IPSR_GPSR(IP2SR1_31_28, IRQ3_B),
891
892 /* IP3SR1 */
893 PINMUX_IPSR_GPSR(IP3SR1_3_0, HRX3),
894 PINMUX_IPSR_GPSR(IP3SR1_3_0, SCK3_A),
895 PINMUX_IPSR_GPSR(IP3SR1_3_0, MSIOF4_SS2),
896
897 PINMUX_IPSR_GPSR(IP3SR1_7_4, HSCK3),
898 PINMUX_IPSR_GPSR(IP3SR1_7_4, CTS3_N_A),
899 PINMUX_IPSR_GPSR(IP3SR1_7_4, MSIOF4_SCK),
900 PINMUX_IPSR_GPSR(IP3SR1_7_4, TPU0TO0_A),
901
902 PINMUX_IPSR_GPSR(IP3SR1_11_8, HRTS3_N),
903 PINMUX_IPSR_GPSR(IP3SR1_11_8, RTS3_N_A),
904 PINMUX_IPSR_GPSR(IP3SR1_11_8, MSIOF4_TXD),
905 PINMUX_IPSR_GPSR(IP3SR1_11_8, TPU0TO1_A),
906
907 PINMUX_IPSR_GPSR(IP3SR1_15_12, HCTS3_N),
908 PINMUX_IPSR_GPSR(IP3SR1_15_12, RX3_A),
909 PINMUX_IPSR_GPSR(IP3SR1_15_12, MSIOF4_RXD),
910
911 PINMUX_IPSR_GPSR(IP3SR1_19_16, HTX3),
912 PINMUX_IPSR_GPSR(IP3SR1_19_16, TX3_A),
913 PINMUX_IPSR_GPSR(IP3SR1_19_16, MSIOF4_SYNC),
914
915 /* IP0SR2 */
916 PINMUX_IPSR_GPSR(IP0SR2_3_0, FXR_TXDA),
917 PINMUX_IPSR_GPSR(IP0SR2_3_0, CANFD1_TX),
918 PINMUX_IPSR_GPSR(IP0SR2_3_0, TPU0TO2_A),
919
920 PINMUX_IPSR_GPSR(IP0SR2_7_4, FXR_TXENA_N),
921 PINMUX_IPSR_GPSR(IP0SR2_7_4, CANFD1_RX),
922 PINMUX_IPSR_GPSR(IP0SR2_7_4, TPU0TO3_A),
923
924 PINMUX_IPSR_GPSR(IP0SR2_11_8, RXDA_EXTFXR),
925 PINMUX_IPSR_GPSR(IP0SR2_11_8, CANFD5_TX),
926 PINMUX_IPSR_GPSR(IP0SR2_11_8, IRQ5),
927
928 PINMUX_IPSR_GPSR(IP0SR2_15_12, CLK_EXTFXR),
929 PINMUX_IPSR_GPSR(IP0SR2_15_12, CANFD5_RX),
930 PINMUX_IPSR_GPSR(IP0SR2_15_12, IRQ4_B),
931
932 PINMUX_IPSR_GPSR(IP0SR2_19_16, RXDB_EXTFXR),
933
934 PINMUX_IPSR_GPSR(IP0SR2_23_20, FXR_TXENB_N),
935
936 PINMUX_IPSR_GPSR(IP0SR2_27_24, FXR_TXDB),
937
938 PINMUX_IPSR_GPSR(IP0SR2_31_28, TPU0TO1),
939 PINMUX_IPSR_GPSR(IP0SR2_31_28, CANFD6_TX),
940 PINMUX_IPSR_GPSR(IP0SR2_31_28, TCLK2_B),
941
942 /* IP1SR2 */
943 PINMUX_IPSR_GPSR(IP1SR2_3_0, TPU0TO0),
944 PINMUX_IPSR_GPSR(IP1SR2_3_0, CANFD6_RX),
945 PINMUX_IPSR_GPSR(IP1SR2_3_0, TCLK1_A),
946
947 PINMUX_IPSR_GPSR(IP1SR2_7_4, CAN_CLK),
948 PINMUX_IPSR_GPSR(IP1SR2_7_4, FXR_TXENA_N_X),
949
950 PINMUX_IPSR_GPSR(IP1SR2_11_8, CANFD0_TX),
951 PINMUX_IPSR_GPSR(IP1SR2_11_8, FXR_TXENB_N_X),
952
953 PINMUX_IPSR_GPSR(IP1SR2_15_12, CANFD0_RX),
954 PINMUX_IPSR_GPSR(IP1SR2_15_12, STPWT_EXTFXR),
955
956 PINMUX_IPSR_GPSR(IP1SR2_19_16, CANFD2_TX),
957 PINMUX_IPSR_GPSR(IP1SR2_19_16, TPU0TO2),
958 PINMUX_IPSR_GPSR(IP1SR2_19_16, TCLK3_A),
959
960 PINMUX_IPSR_GPSR(IP1SR2_23_20, CANFD2_RX),
961 PINMUX_IPSR_GPSR(IP1SR2_23_20, TPU0TO3),
962 PINMUX_IPSR_GPSR(IP1SR2_23_20, PWM1_B),
963 PINMUX_IPSR_GPSR(IP1SR2_23_20, TCLK4_A),
964
965 PINMUX_IPSR_GPSR(IP1SR2_27_24, CANFD3_TX),
966 PINMUX_IPSR_GPSR(IP1SR2_27_24, PWM2_B),
967
968 PINMUX_IPSR_GPSR(IP1SR2_31_28, CANFD3_RX),
969 PINMUX_IPSR_GPSR(IP1SR2_31_28, PWM3_B),
970
971 /* IP2SR2 */
972 PINMUX_IPSR_GPSR(IP2SR2_3_0, CANFD4_TX),
973 PINMUX_IPSR_GPSR(IP2SR2_3_0, PWM4),
974
975 PINMUX_IPSR_GPSR(IP2SR2_7_4, CANFD4_RX),
976 PINMUX_IPSR_GPSR(IP2SR2_7_4, PWM5),
977
978 PINMUX_IPSR_GPSR(IP2SR2_11_8, CANFD7_TX),
979 PINMUX_IPSR_GPSR(IP2SR2_11_8, PWM6),
980
981 PINMUX_IPSR_GPSR(IP2SR2_15_12, CANFD7_RX),
982 PINMUX_IPSR_GPSR(IP2SR2_15_12, PWM7),
983
984 /* IP0SR3 */
985 PINMUX_IPSR_GPSR(IP0SR3_3_0, MMC_SD_D1),
986 PINMUX_IPSR_GPSR(IP0SR3_7_4, MMC_SD_D0),
987 PINMUX_IPSR_GPSR(IP0SR3_11_8, MMC_SD_D2),
988 PINMUX_IPSR_GPSR(IP0SR3_15_12, MMC_SD_CLK),
989 PINMUX_IPSR_GPSR(IP0SR3_19_16, MMC_DS),
990 PINMUX_IPSR_GPSR(IP0SR3_23_20, MMC_SD_D3),
991 PINMUX_IPSR_GPSR(IP0SR3_27_24, MMC_D5),
992 PINMUX_IPSR_GPSR(IP0SR3_31_28, MMC_D4),
993
994 /* IP1SR3 */
995 PINMUX_IPSR_GPSR(IP1SR3_3_0, MMC_D7),
996
997 PINMUX_IPSR_GPSR(IP1SR3_7_4, MMC_D6),
998
999 PINMUX_IPSR_GPSR(IP1SR3_11_8, MMC_SD_CMD),
1000
1001 PINMUX_IPSR_GPSR(IP1SR3_15_12, SD_CD),
1002
1003 PINMUX_IPSR_GPSR(IP1SR3_19_16, SD_WP),
1004
1005 PINMUX_IPSR_GPSR(IP1SR3_23_20, IPC_CLKIN),
1006 PINMUX_IPSR_GPSR(IP1SR3_23_20, IPC_CLKEN_IN),
1007 PINMUX_IPSR_GPSR(IP1SR3_23_20, PWM1_A),
1008 PINMUX_IPSR_GPSR(IP1SR3_23_20, TCLK3_X),
1009
1010 PINMUX_IPSR_GPSR(IP1SR3_27_24, IPC_CLKOUT),
1011 PINMUX_IPSR_GPSR(IP1SR3_27_24, IPC_CLKEN_OUT),
1012 PINMUX_IPSR_GPSR(IP1SR3_27_24, ERROROUTC_A),
1013 PINMUX_IPSR_GPSR(IP1SR3_27_24, TCLK4_X),
1014
1015 PINMUX_IPSR_GPSR(IP1SR3_31_28, QSPI0_SSL),
1016
1017 /* IP2SR3 */
1018 PINMUX_IPSR_GPSR(IP2SR3_3_0, QSPI0_IO3),
1019 PINMUX_IPSR_GPSR(IP2SR3_7_4, QSPI0_IO2),
1020 PINMUX_IPSR_GPSR(IP2SR3_11_8, QSPI0_MISO_IO1),
1021 PINMUX_IPSR_GPSR(IP2SR3_15_12, QSPI0_MOSI_IO0),
1022 PINMUX_IPSR_GPSR(IP2SR3_19_16, QSPI0_SPCLK),
1023 PINMUX_IPSR_GPSR(IP2SR3_23_20, QSPI1_MOSI_IO0),
1024 PINMUX_IPSR_GPSR(IP2SR3_27_24, QSPI1_SPCLK),
1025 PINMUX_IPSR_GPSR(IP2SR3_31_28, QSPI1_MISO_IO1),
1026
1027 /* IP3SR3 */
1028 PINMUX_IPSR_GPSR(IP3SR3_3_0, QSPI1_IO2),
1029 PINMUX_IPSR_GPSR(IP3SR3_7_4, QSPI1_SSL),
1030 PINMUX_IPSR_GPSR(IP3SR3_11_8, QSPI1_IO3),
1031 PINMUX_IPSR_GPSR(IP3SR3_15_12, RPC_RESET_N),
1032 PINMUX_IPSR_GPSR(IP3SR3_19_16, RPC_WP_N),
1033 PINMUX_IPSR_GPSR(IP3SR3_23_20, RPC_INT_N),
1034
1035 /* IP0SR6 */
1036 PINMUX_IPSR_GPSR(IP0SR6_3_0, AVB1_MDIO),
1037
1038 PINMUX_IPSR_MSEL(IP0SR6_7_4, AVB1_MAGIC, SEL_AVB1_MAGIC_1),
1039
1040 PINMUX_IPSR_MSEL(IP0SR6_11_8, AVB1_MDC, SEL_AVB1_MDC_1),
1041
1042 PINMUX_IPSR_GPSR(IP0SR6_15_12, AVB1_PHY_INT),
1043
1044 PINMUX_IPSR_GPSR(IP0SR6_19_16, AVB1_LINK),
1045 PINMUX_IPSR_GPSR(IP0SR6_19_16, AVB1_MII_TX_ER),
1046
1047 PINMUX_IPSR_MSEL(IP0SR6_23_20, AVB1_AVTP_MATCH, SEL_AVB1_AVTP_MATCH_1),
1048 PINMUX_IPSR_MSEL(IP0SR6_23_20, AVB1_MII_RX_ER, SEL_AVB1_AVTP_MATCH_0),
1049
1050 PINMUX_IPSR_MSEL(IP0SR6_27_24, AVB1_TXC, SEL_AVB1_TXC_1),
1051 PINMUX_IPSR_MSEL(IP0SR6_27_24, AVB1_MII_TXC, SEL_AVB1_TXC_0),
1052
1053 PINMUX_IPSR_MSEL(IP0SR6_31_28, AVB1_TX_CTL, SEL_AVB1_TX_CTL_1),
1054 PINMUX_IPSR_MSEL(IP0SR6_31_28, AVB1_MII_TX_EN, SEL_AVB1_TX_CTL_0),
1055
1056 /* IP1SR6 */
1057 PINMUX_IPSR_GPSR(IP1SR6_3_0, AVB1_RXC),
1058 PINMUX_IPSR_GPSR(IP1SR6_3_0, AVB1_MII_RXC),
1059
1060 PINMUX_IPSR_GPSR(IP1SR6_7_4, AVB1_RX_CTL),
1061 PINMUX_IPSR_GPSR(IP1SR6_7_4, AVB1_MII_RX_DV),
1062
1063 PINMUX_IPSR_MSEL(IP1SR6_11_8, AVB1_AVTP_PPS, SEL_AVB1_AVTP_PPS_1),
1064 PINMUX_IPSR_MSEL(IP1SR6_11_8, AVB1_MII_COL, SEL_AVB1_AVTP_PPS_0),
1065
1066 PINMUX_IPSR_GPSR(IP1SR6_15_12, AVB1_AVTP_CAPTURE),
1067 PINMUX_IPSR_GPSR(IP1SR6_15_12, AVB1_MII_CRS),
1068
1069 PINMUX_IPSR_MSEL(IP1SR6_19_16, AVB1_TD1, SEL_AVB1_TD1_1),
1070 PINMUX_IPSR_MSEL(IP1SR6_19_16, AVB1_MII_TD1, SEL_AVB1_TD1_0),
1071
1072 PINMUX_IPSR_MSEL(IP1SR6_23_20, AVB1_TD0, SEL_AVB1_TD0_1),
1073 PINMUX_IPSR_MSEL(IP1SR6_23_20, AVB1_MII_TD0, SEL_AVB1_TD0_0),
1074
1075 PINMUX_IPSR_GPSR(IP1SR6_27_24, AVB1_RD1),
1076 PINMUX_IPSR_GPSR(IP1SR6_27_24, AVB1_MII_RD1),
1077
1078 PINMUX_IPSR_GPSR(IP1SR6_31_28, AVB1_RD0),
1079 PINMUX_IPSR_GPSR(IP1SR6_31_28, AVB1_MII_RD0),
1080
1081 /* IP2SR6 */
1082 PINMUX_IPSR_MSEL(IP2SR6_3_0, AVB1_TD2, SEL_AVB1_TD2_1),
1083 PINMUX_IPSR_MSEL(IP2SR6_3_0, AVB1_MII_TD2, SEL_AVB1_TD2_0),
1084
1085 PINMUX_IPSR_GPSR(IP2SR6_7_4, AVB1_RD2),
1086 PINMUX_IPSR_GPSR(IP2SR6_7_4, AVB1_MII_RD2),
1087
1088 PINMUX_IPSR_MSEL(IP2SR6_11_8, AVB1_TD3, SEL_AVB1_TD3_1),
1089 PINMUX_IPSR_MSEL(IP2SR6_11_8, AVB1_MII_TD3, SEL_AVB1_TD3_0),
1090
1091 PINMUX_IPSR_GPSR(IP2SR6_15_12, AVB1_RD3),
1092 PINMUX_IPSR_GPSR(IP2SR6_15_12, AVB1_MII_RD3),
1093
1094 PINMUX_IPSR_GPSR(IP2SR6_19_16, AVB1_TXCREFCLK),
1095
1096 /* IP0SR7 */
1097 PINMUX_IPSR_MSEL(IP0SR7_3_0, AVB0_AVTP_PPS, SEL_AVB0_AVTP_PPS_1),
1098 PINMUX_IPSR_MSEL(IP0SR7_3_0, AVB0_MII_COL, SEL_AVB0_AVTP_PPS_0),
1099
1100 PINMUX_IPSR_GPSR(IP0SR7_7_4, AVB0_AVTP_CAPTURE),
1101 PINMUX_IPSR_GPSR(IP0SR7_7_4, AVB0_MII_CRS),
1102
1103 PINMUX_IPSR_MSEL(IP0SR7_11_8, AVB0_AVTP_MATCH, SEL_AVB0_AVTP_MATCH_1),
1104 PINMUX_IPSR_MSEL(IP0SR7_11_8, AVB0_MII_RX_ER, SEL_AVB0_AVTP_MATCH_0),
1105 PINMUX_IPSR_MSEL(IP0SR7_11_8, CC5_OSCOUT, SEL_AVB0_AVTP_MATCH_0),
1106
1107 PINMUX_IPSR_MSEL(IP0SR7_15_12, AVB0_TD3, SEL_AVB0_TD3_1),
1108 PINMUX_IPSR_MSEL(IP0SR7_15_12, AVB0_MII_TD3, SEL_AVB0_TD3_0),
1109
1110 PINMUX_IPSR_GPSR(IP0SR7_19_16, AVB0_LINK),
1111 PINMUX_IPSR_GPSR(IP0SR7_19_16, AVB0_MII_TX_ER),
1112
1113 PINMUX_IPSR_GPSR(IP0SR7_23_20, AVB0_PHY_INT),
1114
1115 PINMUX_IPSR_MSEL(IP0SR7_27_24, AVB0_TD2, SEL_AVB0_TD2_1),
1116 PINMUX_IPSR_MSEL(IP0SR7_27_24, AVB0_MII_TD2, SEL_AVB0_TD2_0),
1117
1118 PINMUX_IPSR_MSEL(IP0SR7_31_28, AVB0_TD1, SEL_AVB0_TD1_1),
1119 PINMUX_IPSR_MSEL(IP0SR7_31_28, AVB0_MII_TD1, SEL_AVB0_TD1_0),
1120
1121 /* IP1SR7 */
1122 PINMUX_IPSR_GPSR(IP1SR7_3_0, AVB0_RD3),
1123 PINMUX_IPSR_GPSR(IP1SR7_3_0, AVB0_MII_RD3),
1124
1125 PINMUX_IPSR_GPSR(IP1SR7_7_4, AVB0_TXCREFCLK),
1126
1127 PINMUX_IPSR_MSEL(IP1SR7_11_8, AVB0_MAGIC, SEL_AVB0_MAGIC_1),
1128
1129 PINMUX_IPSR_MSEL(IP1SR7_15_12, AVB0_TD0, SEL_AVB0_TD0_1),
1130 PINMUX_IPSR_MSEL(IP1SR7_15_12, AVB0_MII_TD0, SEL_AVB0_TD0_0),
1131
1132 PINMUX_IPSR_GPSR(IP1SR7_19_16, AVB0_RD2),
1133 PINMUX_IPSR_GPSR(IP1SR7_19_16, AVB0_MII_RD2),
1134
1135 PINMUX_IPSR_MSEL(IP1SR7_23_20, AVB0_MDC, SEL_AVB0_MDC_1),
1136
1137 PINMUX_IPSR_GPSR(IP1SR7_27_24, AVB0_MDIO),
1138
1139 PINMUX_IPSR_MSEL(IP1SR7_31_28, AVB0_TXC, SEL_AVB0_TXC_1),
1140 PINMUX_IPSR_MSEL(IP1SR7_31_28, AVB0_MII_TXC, SEL_AVB0_TXC_0),
1141
1142 /* IP2SR7 */
1143 PINMUX_IPSR_MSEL(IP2SR7_3_0, AVB0_TX_CTL, SEL_AVB0_TX_CTL_1),
1144 PINMUX_IPSR_MSEL(IP2SR7_3_0, AVB0_MII_TX_EN, SEL_AVB0_TX_CTL_0),
1145
1146 PINMUX_IPSR_GPSR(IP2SR7_7_4, AVB0_RD1),
1147 PINMUX_IPSR_GPSR(IP2SR7_7_4, AVB0_MII_RD1),
1148
1149 PINMUX_IPSR_GPSR(IP2SR7_11_8, AVB0_RD0),
1150 PINMUX_IPSR_GPSR(IP2SR7_11_8, AVB0_MII_RD0),
1151
1152 PINMUX_IPSR_GPSR(IP2SR7_15_12, AVB0_RXC),
1153 PINMUX_IPSR_GPSR(IP2SR7_15_12, AVB0_MII_RXC),
1154
1155 PINMUX_IPSR_GPSR(IP2SR7_19_16, AVB0_RX_CTL),
1156 PINMUX_IPSR_GPSR(IP2SR7_19_16, AVB0_MII_RX_DV),
1157
1158 /* IP0SR8 */
1159 PINMUX_IPSR_MSEL(IP0SR8_3_0, SCL0, SEL_SCL0_0),
1160 PINMUX_IPSR_MSEL(IP0SR8_7_4, SDA0, SEL_SDA0_0),
1161 PINMUX_IPSR_MSEL(IP0SR8_11_8, SCL1, SEL_SCL1_0),
1162 PINMUX_IPSR_MSEL(IP0SR8_15_12, SDA1, SEL_SDA1_0),
1163 PINMUX_IPSR_MSEL(IP0SR8_19_16, SCL2, SEL_SCL2_0),
1164 PINMUX_IPSR_MSEL(IP0SR8_23_20, SDA2, SEL_SDA2_0),
1165 PINMUX_IPSR_MSEL(IP0SR8_27_24, SCL3, SEL_SCL3_0),
1166 PINMUX_IPSR_MSEL(IP0SR8_31_28, SDA3, SEL_SDA3_0),
1167
1168 /* IP1SR8 */
1169 PINMUX_IPSR_MSEL(IP1SR8_3_0, SCL4, SEL_SCL4_0),
1170 PINMUX_IPSR_MSEL(IP1SR8_3_0, HRX2, SEL_SCL4_0),
1171 PINMUX_IPSR_MSEL(IP1SR8_3_0, SCK4, SEL_SCL4_0),
1172
1173 PINMUX_IPSR_MSEL(IP1SR8_7_4, SDA4, SEL_SDA4_0),
1174 PINMUX_IPSR_MSEL(IP1SR8_7_4, HTX2, SEL_SDA4_0),
1175 PINMUX_IPSR_MSEL(IP1SR8_7_4, CTS4_N, SEL_SDA4_0),
1176
1177 PINMUX_IPSR_MSEL(IP1SR8_11_8, SCL5, SEL_SCL5_0),
1178 PINMUX_IPSR_MSEL(IP1SR8_11_8, HRTS2_N, SEL_SCL5_0),
1179 PINMUX_IPSR_MSEL(IP1SR8_11_8, RTS4_N, SEL_SCL5_0),
1180
1181 PINMUX_IPSR_MSEL(IP1SR8_15_12, SDA5, SEL_SDA5_0),
1182 PINMUX_IPSR_MSEL(IP1SR8_15_12, SCIF_CLK2, SEL_SDA5_0),
1183
1184 PINMUX_IPSR_GPSR(IP1SR8_19_16, HCTS2_N),
1185 PINMUX_IPSR_GPSR(IP1SR8_19_16, TX4),
1186
1187 PINMUX_IPSR_GPSR(IP1SR8_23_20, HSCK2),
1188 PINMUX_IPSR_GPSR(IP1SR8_23_20, RX4),
1189};
1190
1191/*
1192 * Pins not associated with a GPIO port.
1193 */
1194enum {
1195 GP_ASSIGN_LAST(),
1196};
1197
1198static const struct sh_pfc_pin pinmux_pins[] = {
1199 PINMUX_GPIO_GP_ALL(),
1200};
1201
1202/* - AVB0 ------------------------------------------------ */
1203static const unsigned int avb0_link_pins[] = {
1204 /* AVB0_LINK */
1205 RCAR_GP_PIN(7, 4),
1206};
1207static const unsigned int avb0_link_mux[] = {
1208 AVB0_LINK_MARK,
1209};
1210static const unsigned int avb0_magic_pins[] = {
1211 /* AVB0_MAGIC */
1212 RCAR_GP_PIN(7, 10),
1213};
1214static const unsigned int avb0_magic_mux[] = {
1215 AVB0_MAGIC_MARK,
1216};
1217static const unsigned int avb0_phy_int_pins[] = {
1218 /* AVB0_PHY_INT */
1219 RCAR_GP_PIN(7, 5),
1220};
1221static const unsigned int avb0_phy_int_mux[] = {
1222 AVB0_PHY_INT_MARK,
1223};
1224static const unsigned int avb0_mdio_pins[] = {
1225 /* AVB0_MDC, AVB0_MDIO */
1226 RCAR_GP_PIN(7, 13), RCAR_GP_PIN(7, 14),
1227};
1228static const unsigned int avb0_mdio_mux[] = {
1229 AVB0_MDC_MARK, AVB0_MDIO_MARK,
1230};
1231static const unsigned int avb0_rgmii_pins[] = {
1232 /*
1233 * AVB0_TX_CTL, AVB0_TXC, AVB0_TD0, AVB0_TD1, AVB0_TD2, AVB0_TD3,
1234 * AVB0_RX_CTL, AVB0_RXC, AVB0_RD0, AVB0_RD1, AVB0_RD2, AVB0_RD3,
1235 */
1236 RCAR_GP_PIN(7, 16), RCAR_GP_PIN(7, 15),
1237 RCAR_GP_PIN(7, 11), RCAR_GP_PIN(7, 7),
1238 RCAR_GP_PIN(7, 6), RCAR_GP_PIN(7, 3),
1239 RCAR_GP_PIN(7, 20), RCAR_GP_PIN(7, 19),
1240 RCAR_GP_PIN(7, 18), RCAR_GP_PIN(7, 17),
1241 RCAR_GP_PIN(7, 12), RCAR_GP_PIN(7, 8),
1242};
1243static const unsigned int avb0_rgmii_mux[] = {
1244 AVB0_TX_CTL_MARK, AVB0_TXC_MARK,
1245 AVB0_TD0_MARK, AVB0_TD1_MARK,
1246 AVB0_TD2_MARK, AVB0_TD3_MARK,
1247 AVB0_RX_CTL_MARK, AVB0_RXC_MARK,
1248 AVB0_RD0_MARK, AVB0_RD1_MARK,
1249 AVB0_RD2_MARK, AVB0_RD3_MARK,
1250};
1251static const unsigned int avb0_txcrefclk_pins[] = {
1252 /* AVB0_TXCREFCLK */
1253 RCAR_GP_PIN(7, 9),
1254};
1255static const unsigned int avb0_txcrefclk_mux[] = {
1256 AVB0_TXCREFCLK_MARK,
1257};
1258static const unsigned int avb0_avtp_pps_pins[] = {
1259 /* AVB0_AVTP_PPS */
1260 RCAR_GP_PIN(7, 0),
1261};
1262static const unsigned int avb0_avtp_pps_mux[] = {
1263 AVB0_AVTP_PPS_MARK,
1264};
1265static const unsigned int avb0_avtp_capture_pins[] = {
1266 /* AVB0_AVTP_CAPTURE */
1267 RCAR_GP_PIN(7, 1),
1268};
1269static const unsigned int avb0_avtp_capture_mux[] = {
1270 AVB0_AVTP_CAPTURE_MARK,
1271};
1272static const unsigned int avb0_avtp_match_pins[] = {
1273 /* AVB0_AVTP_MATCH */
1274 RCAR_GP_PIN(7, 2),
1275};
1276static const unsigned int avb0_avtp_match_mux[] = {
1277 AVB0_AVTP_MATCH_MARK,
1278};
1279
1280/* - AVB1 ------------------------------------------------ */
1281static const unsigned int avb1_link_pins[] = {
1282 /* AVB1_LINK */
1283 RCAR_GP_PIN(6, 4),
1284};
1285static const unsigned int avb1_link_mux[] = {
1286 AVB1_LINK_MARK,
1287};
1288static const unsigned int avb1_magic_pins[] = {
1289 /* AVB1_MAGIC */
1290 RCAR_GP_PIN(6, 1),
1291};
1292static const unsigned int avb1_magic_mux[] = {
1293 AVB1_MAGIC_MARK,
1294};
1295static const unsigned int avb1_phy_int_pins[] = {
1296 /* AVB1_PHY_INT */
1297 RCAR_GP_PIN(6, 3),
1298};
1299static const unsigned int avb1_phy_int_mux[] = {
1300 AVB1_PHY_INT_MARK,
1301};
1302static const unsigned int avb1_mdio_pins[] = {
1303 /* AVB1_MDC, AVB1_MDIO */
1304 RCAR_GP_PIN(6, 2), RCAR_GP_PIN(6, 0),
1305};
1306static const unsigned int avb1_mdio_mux[] = {
1307 AVB1_MDC_MARK, AVB1_MDIO_MARK,
1308};
1309static const unsigned int avb1_rgmii_pins[] = {
1310 /*
1311 * AVB1_TX_CTL, AVB1_TXC, AVB1_TD0, AVB1_TD1, AVB1_TD2, AVB1_TD3,
1312 * AVB1_RX_CTL, AVB1_RXC, AVB1_RD0, AVB1_RD1, AVB1_RD2, AVB1_RD3,
1313 */
1314 RCAR_GP_PIN(6, 7), RCAR_GP_PIN(6, 6),
1315 RCAR_GP_PIN(6, 13), RCAR_GP_PIN(6, 12),
1316 RCAR_GP_PIN(6, 16), RCAR_GP_PIN(6, 18),
1317 RCAR_GP_PIN(6, 9), RCAR_GP_PIN(6, 8),
1318 RCAR_GP_PIN(6, 15), RCAR_GP_PIN(6, 14),
1319 RCAR_GP_PIN(6, 17), RCAR_GP_PIN(6, 19),
1320};
1321static const unsigned int avb1_rgmii_mux[] = {
1322 AVB1_TX_CTL_MARK, AVB1_TXC_MARK,
1323 AVB1_TD0_MARK, AVB1_TD1_MARK,
1324 AVB1_TD2_MARK, AVB1_TD3_MARK,
1325 AVB1_RX_CTL_MARK, AVB1_RXC_MARK,
1326 AVB1_RD0_MARK, AVB1_RD1_MARK,
1327 AVB1_RD2_MARK, AVB1_RD3_MARK,
1328};
1329static const unsigned int avb1_txcrefclk_pins[] = {
1330 /* AVB1_TXCREFCLK */
1331 RCAR_GP_PIN(6, 20),
1332};
1333static const unsigned int avb1_txcrefclk_mux[] = {
1334 AVB1_TXCREFCLK_MARK,
1335};
1336static const unsigned int avb1_avtp_pps_pins[] = {
1337 /* AVB1_AVTP_PPS */
1338 RCAR_GP_PIN(6, 10),
1339};
1340static const unsigned int avb1_avtp_pps_mux[] = {
1341 AVB1_AVTP_PPS_MARK,
1342};
1343static const unsigned int avb1_avtp_capture_pins[] = {
1344 /* AVB1_AVTP_CAPTURE */
1345 RCAR_GP_PIN(6, 11),
1346};
1347static const unsigned int avb1_avtp_capture_mux[] = {
1348 AVB1_AVTP_CAPTURE_MARK,
1349};
1350static const unsigned int avb1_avtp_match_pins[] = {
1351 /* AVB1_AVTP_MATCH */
1352 RCAR_GP_PIN(6, 5),
1353};
1354static const unsigned int avb1_avtp_match_mux[] = {
1355 AVB1_AVTP_MATCH_MARK,
1356};
1357
1358/* - AVB2 ------------------------------------------------ */
1359static const unsigned int avb2_link_pins[] = {
1360 /* AVB2_LINK */
1361 RCAR_GP_PIN(5, 3),
1362};
1363static const unsigned int avb2_link_mux[] = {
1364 AVB2_LINK_MARK,
1365};
1366static const unsigned int avb2_magic_pins[] = {
1367 /* AVB2_MAGIC */
1368 RCAR_GP_PIN(5, 5),
1369};
1370static const unsigned int avb2_magic_mux[] = {
1371 AVB2_MAGIC_MARK,
1372};
1373static const unsigned int avb2_phy_int_pins[] = {
1374 /* AVB2_PHY_INT */
1375 RCAR_GP_PIN(5, 4),
1376};
1377static const unsigned int avb2_phy_int_mux[] = {
1378 AVB2_PHY_INT_MARK,
1379};
1380static const unsigned int avb2_mdio_pins[] = {
1381 /* AVB2_MDC, AVB2_MDIO */
1382 RCAR_GP_PIN(5, 6), RCAR_GP_PIN(5, 10),
1383};
1384static const unsigned int avb2_mdio_mux[] = {
1385 AVB2_MDC_MARK, AVB2_MDIO_MARK,
1386};
1387static const unsigned int avb2_rgmii_pins[] = {
1388 /*
1389 * AVB2_TX_CTL, AVB2_TXC, AVB2_TD0, AVB2_TD1, AVB2_TD2, AVB2_TD3,
1390 * AVB2_RX_CTL, AVB2_RXC, AVB2_RD0, AVB2_RD1, AVB2_RD2, AVB2_RD3,
1391 */
1392 RCAR_GP_PIN(5, 19), RCAR_GP_PIN(5, 16),
1393 RCAR_GP_PIN(5, 15), RCAR_GP_PIN(5, 12),
1394 RCAR_GP_PIN(5, 11), RCAR_GP_PIN(5, 8),
1395 RCAR_GP_PIN(5, 20), RCAR_GP_PIN(5, 18),
1396 RCAR_GP_PIN(5, 17), RCAR_GP_PIN(5, 14),
1397 RCAR_GP_PIN(5, 13), RCAR_GP_PIN(5, 9),
1398};
1399static const unsigned int avb2_rgmii_mux[] = {
1400 AVB2_TX_CTL_MARK, AVB2_TXC_MARK,
1401 AVB2_TD0_MARK, AVB2_TD1_MARK,
1402 AVB2_TD2_MARK, AVB2_TD3_MARK,
1403 AVB2_RX_CTL_MARK, AVB2_RXC_MARK,
1404 AVB2_RD0_MARK, AVB2_RD1_MARK,
1405 AVB2_RD2_MARK, AVB2_RD3_MARK,
1406};
1407static const unsigned int avb2_txcrefclk_pins[] = {
1408 /* AVB2_TXCREFCLK */
1409 RCAR_GP_PIN(5, 7),
1410};
1411static const unsigned int avb2_txcrefclk_mux[] = {
1412 AVB2_TXCREFCLK_MARK,
1413};
1414static const unsigned int avb2_avtp_pps_pins[] = {
1415 /* AVB2_AVTP_PPS */
1416 RCAR_GP_PIN(5, 0),
1417};
1418static const unsigned int avb2_avtp_pps_mux[] = {
1419 AVB2_AVTP_PPS_MARK,
1420};
1421static const unsigned int avb2_avtp_capture_pins[] = {
1422 /* AVB2_AVTP_CAPTURE */
1423 RCAR_GP_PIN(5, 1),
1424};
1425static const unsigned int avb2_avtp_capture_mux[] = {
1426 AVB2_AVTP_CAPTURE_MARK,
1427};
1428static const unsigned int avb2_avtp_match_pins[] = {
1429 /* AVB2_AVTP_MATCH */
1430 RCAR_GP_PIN(5, 2),
1431};
1432static const unsigned int avb2_avtp_match_mux[] = {
1433 AVB2_AVTP_MATCH_MARK,
1434};
1435
1436/* - CANFD0 ----------------------------------------------------------------- */
1437static const unsigned int canfd0_data_pins[] = {
1438 /* CANFD0_TX, CANFD0_RX */
1439 RCAR_GP_PIN(2, 10), RCAR_GP_PIN(2, 11),
1440};
1441static const unsigned int canfd0_data_mux[] = {
1442 CANFD0_TX_MARK, CANFD0_RX_MARK,
1443};
1444
1445/* - CANFD1 ----------------------------------------------------------------- */
1446static const unsigned int canfd1_data_pins[] = {
1447 /* CANFD1_TX, CANFD1_RX */
1448 RCAR_GP_PIN(2, 0), RCAR_GP_PIN(2, 1),
1449};
1450static const unsigned int canfd1_data_mux[] = {
1451 CANFD1_TX_MARK, CANFD1_RX_MARK,
1452};
1453
1454/* - CANFD2 ----------------------------------------------------------------- */
1455static const unsigned int canfd2_data_pins[] = {
1456 /* CANFD2_TX, CANFD2_RX */
1457 RCAR_GP_PIN(2, 12), RCAR_GP_PIN(2, 13),
1458};
1459static const unsigned int canfd2_data_mux[] = {
1460 CANFD2_TX_MARK, CANFD2_RX_MARK,
1461};
1462
1463/* - CANFD3 ----------------------------------------------------------------- */
1464static const unsigned int canfd3_data_pins[] = {
1465 /* CANFD3_TX, CANFD3_RX */
1466 RCAR_GP_PIN(2, 14), RCAR_GP_PIN(2, 15),
1467};
1468static const unsigned int canfd3_data_mux[] = {
1469 CANFD3_TX_MARK, CANFD3_RX_MARK,
1470};
1471
1472/* - CANFD4 ----------------------------------------------------------------- */
1473static const unsigned int canfd4_data_pins[] = {
1474 /* CANFD4_TX, CANFD4_RX */
1475 RCAR_GP_PIN(2, 16), RCAR_GP_PIN(2, 17),
1476};
1477static const unsigned int canfd4_data_mux[] = {
1478 CANFD4_TX_MARK, CANFD4_RX_MARK,
1479};
1480
1481/* - CANFD5 ----------------------------------------------------------------- */
1482static const unsigned int canfd5_data_pins[] = {
1483 /* CANFD5_TX, CANFD5_RX */
1484 RCAR_GP_PIN(2, 2), RCAR_GP_PIN(2, 3),
1485};
1486static const unsigned int canfd5_data_mux[] = {
1487 CANFD5_TX_MARK, CANFD5_RX_MARK,
1488};
1489
1490/* - CANFD5_B ----------------------------------------------------------------- */
1491static const unsigned int canfd5_data_b_pins[] = {
1492 /* CANFD5_TX_B, CANFD5_RX_B */
1493 RCAR_GP_PIN(1, 8), RCAR_GP_PIN(1, 9),
1494};
1495static const unsigned int canfd5_data_b_mux[] = {
1496 CANFD5_TX_B_MARK, CANFD5_RX_B_MARK,
1497};
1498
1499/* - CANFD6 ----------------------------------------------------------------- */
1500static const unsigned int canfd6_data_pins[] = {
1501 /* CANFD6_TX, CANFD6_RX */
1502 RCAR_GP_PIN(2, 7), RCAR_GP_PIN(2, 8),
1503};
1504static const unsigned int canfd6_data_mux[] = {
1505 CANFD6_TX_MARK, CANFD6_RX_MARK,
1506};
1507
1508/* - CANFD7 ----------------------------------------------------------------- */
1509static const unsigned int canfd7_data_pins[] = {
1510 /* CANFD7_TX, CANFD7_RX */
1511 RCAR_GP_PIN(2, 18), RCAR_GP_PIN(2, 19),
1512};
1513static const unsigned int canfd7_data_mux[] = {
1514 CANFD7_TX_MARK, CANFD7_RX_MARK,
1515};
1516
1517/* - CANFD Clock ------------------------------------------------------------ */
1518static const unsigned int can_clk_pins[] = {
1519 /* CAN_CLK */
1520 RCAR_GP_PIN(2, 9),
1521};
1522static const unsigned int can_clk_mux[] = {
1523 CAN_CLK_MARK,
1524};
1525
1526/* - HSCIF0 ----------------------------------------------------------------- */
1527static const unsigned int hscif0_data_pins[] = {
1528 /* HRX0, HTX0 */
1529 RCAR_GP_PIN(1, 16), RCAR_GP_PIN(1, 12),
1530};
1531static const unsigned int hscif0_data_mux[] = {
1532 HRX0_MARK, HTX0_MARK,
1533};
1534static const unsigned int hscif0_clk_pins[] = {
1535 /* HSCK0 */
1536 RCAR_GP_PIN(1, 15),
1537};
1538static const unsigned int hscif0_clk_mux[] = {
1539 HSCK0_MARK,
1540};
1541static const unsigned int hscif0_ctrl_pins[] = {
1542 /* HRTS0_N, HCTS0_N */
1543 RCAR_GP_PIN(1, 14), RCAR_GP_PIN(1, 13),
1544};
1545static const unsigned int hscif0_ctrl_mux[] = {
1546 HRTS0_N_MARK, HCTS0_N_MARK,
1547};
1548
1549/* - HSCIF1 ----------------------------------------------------------------- */
1550static const unsigned int hscif1_data_pins[] = {
1551 /* HRX1, HTX1 */
1552 RCAR_GP_PIN(0, 15), RCAR_GP_PIN(0, 14),
1553};
1554static const unsigned int hscif1_data_mux[] = {
1555 HRX1_MARK, HTX1_MARK,
1556};
1557static const unsigned int hscif1_clk_pins[] = {
1558 /* HSCK1 */
1559 RCAR_GP_PIN(0, 18),
1560};
1561static const unsigned int hscif1_clk_mux[] = {
1562 HSCK1_MARK,
1563};
1564static const unsigned int hscif1_ctrl_pins[] = {
1565 /* HRTS1_N, HCTS1_N */
1566 RCAR_GP_PIN(0, 17), RCAR_GP_PIN(0, 16),
1567};
1568static const unsigned int hscif1_ctrl_mux[] = {
1569 HRTS1_N_MARK, HCTS1_N_MARK,
1570};
1571
1572/* - HSCIF1_X---------------------------------------------------------------- */
1573static const unsigned int hscif1_data_x_pins[] = {
1574 /* HRX1_X, HTX1_X */
1575 RCAR_GP_PIN(1, 7), RCAR_GP_PIN(1, 6),
1576};
1577static const unsigned int hscif1_data_x_mux[] = {
1578 HRX1_X_MARK, HTX1_X_MARK,
1579};
1580static const unsigned int hscif1_clk_x_pins[] = {
1581 /* HSCK1_X */
1582 RCAR_GP_PIN(1, 10),
1583};
1584static const unsigned int hscif1_clk_x_mux[] = {
1585 HSCK1_X_MARK,
1586};
1587static const unsigned int hscif1_ctrl_x_pins[] = {
1588 /* HRTS1_N_X, HCTS1_N_X */
1589 RCAR_GP_PIN(1, 9), RCAR_GP_PIN(1, 8),
1590};
1591static const unsigned int hscif1_ctrl_x_mux[] = {
1592 HRTS1_N_X_MARK, HCTS1_N_X_MARK,
1593};
1594
1595/* - HSCIF2 ----------------------------------------------------------------- */
1596static const unsigned int hscif2_data_pins[] = {
1597 /* HRX2, HTX2 */
1598 RCAR_GP_PIN(8, 8), RCAR_GP_PIN(8, 9),
1599};
1600static const unsigned int hscif2_data_mux[] = {
1601 HRX2_MARK, HTX2_MARK,
1602};
1603static const unsigned int hscif2_clk_pins[] = {
1604 /* HSCK2 */
1605 RCAR_GP_PIN(8, 13),
1606};
1607static const unsigned int hscif2_clk_mux[] = {
1608 HSCK2_MARK,
1609};
1610static const unsigned int hscif2_ctrl_pins[] = {
1611 /* HRTS2_N, HCTS2_N */
1612 RCAR_GP_PIN(8, 10), RCAR_GP_PIN(8, 12),
1613};
1614static const unsigned int hscif2_ctrl_mux[] = {
1615 HRTS2_N_MARK, HCTS2_N_MARK,
1616};
1617
1618/* - HSCIF3 ----------------------------------------------------------------- */
1619static const unsigned int hscif3_data_pins[] = {
1620 /* HRX3, HTX3 */
1621 RCAR_GP_PIN(1, 24), RCAR_GP_PIN(1, 28),
1622};
1623static const unsigned int hscif3_data_mux[] = {
1624 HRX3_MARK, HTX3_MARK,
1625};
1626static const unsigned int hscif3_clk_pins[] = {
1627 /* HSCK3 */
1628 RCAR_GP_PIN(1, 25),
1629};
1630static const unsigned int hscif3_clk_mux[] = {
1631 HSCK3_MARK,
1632};
1633static const unsigned int hscif3_ctrl_pins[] = {
1634 /* HRTS3_N, HCTS3_N */
1635 RCAR_GP_PIN(1, 26), RCAR_GP_PIN(1, 27),
1636};
1637static const unsigned int hscif3_ctrl_mux[] = {
1638 HRTS3_N_MARK, HCTS3_N_MARK,
1639};
1640
1641/* - HSCIF3_A ----------------------------------------------------------------- */
1642static const unsigned int hscif3_data_a_pins[] = {
1643 /* HRX3_A, HTX3_A */
1644 RCAR_GP_PIN(1, 4), RCAR_GP_PIN(1, 0),
1645};
1646static const unsigned int hscif3_data_a_mux[] = {
1647 HRX3_A_MARK, HTX3_A_MARK,
1648};
1649static const unsigned int hscif3_clk_a_pins[] = {
1650 /* HSCK3_A */
1651 RCAR_GP_PIN(1, 3),
1652};
1653static const unsigned int hscif3_clk_a_mux[] = {
1654 HSCK3_A_MARK,
1655};
1656static const unsigned int hscif3_ctrl_a_pins[] = {
1657 /* HRTS3_N_A, HCTS3_N_A */
1658 RCAR_GP_PIN(1, 2), RCAR_GP_PIN(1, 1),
1659};
1660static const unsigned int hscif3_ctrl_a_mux[] = {
1661 HRTS3_N_A_MARK, HCTS3_N_A_MARK,
1662};
1663
1664/* - I2C0 ------------------------------------------------------------------- */
1665static const unsigned int i2c0_pins[] = {
1666 /* SDA0, SCL0 */
1667 RCAR_GP_PIN(8, 1), RCAR_GP_PIN(8, 0),
1668};
1669static const unsigned int i2c0_mux[] = {
1670 SDA0_MARK, SCL0_MARK,
1671};
1672
1673/* - I2C1 ------------------------------------------------------------------- */
1674static const unsigned int i2c1_pins[] = {
1675 /* SDA1, SCL1 */
1676 RCAR_GP_PIN(8, 3), RCAR_GP_PIN(8, 2),
1677};
1678static const unsigned int i2c1_mux[] = {
1679 SDA1_MARK, SCL1_MARK,
1680};
1681
1682/* - I2C2 ------------------------------------------------------------------- */
1683static const unsigned int i2c2_pins[] = {
1684 /* SDA2, SCL2 */
1685 RCAR_GP_PIN(8, 5), RCAR_GP_PIN(8, 4),
1686};
1687static const unsigned int i2c2_mux[] = {
1688 SDA2_MARK, SCL2_MARK,
1689};
1690
1691/* - I2C3 ------------------------------------------------------------------- */
1692static const unsigned int i2c3_pins[] = {
1693 /* SDA3, SCL3 */
1694 RCAR_GP_PIN(8, 7), RCAR_GP_PIN(8, 6),
1695};
1696static const unsigned int i2c3_mux[] = {
1697 SDA3_MARK, SCL3_MARK,
1698};
1699
1700/* - I2C4 ------------------------------------------------------------------- */
1701static const unsigned int i2c4_pins[] = {
1702 /* SDA4, SCL4 */
1703 RCAR_GP_PIN(8, 9), RCAR_GP_PIN(8, 8),
1704};
1705static const unsigned int i2c4_mux[] = {
1706 SDA4_MARK, SCL4_MARK,
1707};
1708
1709/* - I2C5 ------------------------------------------------------------------- */
1710static const unsigned int i2c5_pins[] = {
1711 /* SDA5, SCL5 */
1712 RCAR_GP_PIN(8, 11), RCAR_GP_PIN(8, 10),
1713};
1714static const unsigned int i2c5_mux[] = {
1715 SDA5_MARK, SCL5_MARK,
1716};
1717
1718/* - MMC -------------------------------------------------------------------- */
1719static const unsigned int mmc_data_pins[] = {
1720 /* MMC_SD_D[0:3], MMC_D[4:7] */
1721 RCAR_GP_PIN(3, 1), RCAR_GP_PIN(3, 0),
1722 RCAR_GP_PIN(3, 2), RCAR_GP_PIN(3, 5),
1723 RCAR_GP_PIN(3, 7), RCAR_GP_PIN(3, 6),
1724 RCAR_GP_PIN(3, 9), RCAR_GP_PIN(3, 8),
1725};
1726static const unsigned int mmc_data_mux[] = {
1727 MMC_SD_D0_MARK, MMC_SD_D1_MARK,
1728 MMC_SD_D2_MARK, MMC_SD_D3_MARK,
1729 MMC_D4_MARK, MMC_D5_MARK,
1730 MMC_D6_MARK, MMC_D7_MARK,
1731};
1732static const unsigned int mmc_ctrl_pins[] = {
1733 /* MMC_SD_CLK, MMC_SD_CMD */
1734 RCAR_GP_PIN(3, 3), RCAR_GP_PIN(3, 10),
1735};
1736static const unsigned int mmc_ctrl_mux[] = {
1737 MMC_SD_CLK_MARK, MMC_SD_CMD_MARK,
1738};
1739static const unsigned int mmc_cd_pins[] = {
1740 /* SD_CD */
1741 RCAR_GP_PIN(3, 11),
1742};
1743static const unsigned int mmc_cd_mux[] = {
1744 SD_CD_MARK,
1745};
1746static const unsigned int mmc_wp_pins[] = {
1747 /* SD_WP */
1748 RCAR_GP_PIN(3, 12),
1749};
1750static const unsigned int mmc_wp_mux[] = {
1751 SD_WP_MARK,
1752};
1753static const unsigned int mmc_ds_pins[] = {
1754 /* MMC_DS */
1755 RCAR_GP_PIN(3, 4),
1756};
1757static const unsigned int mmc_ds_mux[] = {
1758 MMC_DS_MARK,
1759};
1760
1761/* - MSIOF0 ----------------------------------------------------------------- */
1762static const unsigned int msiof0_clk_pins[] = {
1763 /* MSIOF0_SCK */
1764 RCAR_GP_PIN(1, 10),
1765};
1766static const unsigned int msiof0_clk_mux[] = {
1767 MSIOF0_SCK_MARK,
1768};
1769static const unsigned int msiof0_sync_pins[] = {
1770 /* MSIOF0_SYNC */
1771 RCAR_GP_PIN(1, 8),
1772};
1773static const unsigned int msiof0_sync_mux[] = {
1774 MSIOF0_SYNC_MARK,
1775};
1776static const unsigned int msiof0_ss1_pins[] = {
1777 /* MSIOF0_SS1 */
1778 RCAR_GP_PIN(1, 7),
1779};
1780static const unsigned int msiof0_ss1_mux[] = {
1781 MSIOF0_SS1_MARK,
1782};
1783static const unsigned int msiof0_ss2_pins[] = {
1784 /* MSIOF0_SS2 */
1785 RCAR_GP_PIN(1, 6),
1786};
1787static const unsigned int msiof0_ss2_mux[] = {
1788 MSIOF0_SS2_MARK,
1789};
1790static const unsigned int msiof0_txd_pins[] = {
1791 /* MSIOF0_TXD */
1792 RCAR_GP_PIN(1, 9),
1793};
1794static const unsigned int msiof0_txd_mux[] = {
1795 MSIOF0_TXD_MARK,
1796};
1797static const unsigned int msiof0_rxd_pins[] = {
1798 /* MSIOF0_RXD */
1799 RCAR_GP_PIN(1, 11),
1800};
1801static const unsigned int msiof0_rxd_mux[] = {
1802 MSIOF0_RXD_MARK,
1803};
1804
1805/* - MSIOF1 ----------------------------------------------------------------- */
1806static const unsigned int msiof1_clk_pins[] = {
1807 /* MSIOF1_SCK */
1808 RCAR_GP_PIN(1, 3),
1809};
1810static const unsigned int msiof1_clk_mux[] = {
1811 MSIOF1_SCK_MARK,
1812};
1813static const unsigned int msiof1_sync_pins[] = {
1814 /* MSIOF1_SYNC */
1815 RCAR_GP_PIN(1, 2),
1816};
1817static const unsigned int msiof1_sync_mux[] = {
1818 MSIOF1_SYNC_MARK,
1819};
1820static const unsigned int msiof1_ss1_pins[] = {
1821 /* MSIOF1_SS1 */
1822 RCAR_GP_PIN(1, 1),
1823};
1824static const unsigned int msiof1_ss1_mux[] = {
1825 MSIOF1_SS1_MARK,
1826};
1827static const unsigned int msiof1_ss2_pins[] = {
1828 /* MSIOF1_SS2 */
1829 RCAR_GP_PIN(1, 0),
1830};
1831static const unsigned int msiof1_ss2_mux[] = {
1832 MSIOF1_SS2_MARK,
1833};
1834static const unsigned int msiof1_txd_pins[] = {
1835 /* MSIOF1_TXD */
1836 RCAR_GP_PIN(1, 4),
1837};
1838static const unsigned int msiof1_txd_mux[] = {
1839 MSIOF1_TXD_MARK,
1840};
1841static const unsigned int msiof1_rxd_pins[] = {
1842 /* MSIOF1_RXD */
1843 RCAR_GP_PIN(1, 5),
1844};
1845static const unsigned int msiof1_rxd_mux[] = {
1846 MSIOF1_RXD_MARK,
1847};
1848
1849/* - MSIOF2 ----------------------------------------------------------------- */
1850static const unsigned int msiof2_clk_pins[] = {
1851 /* MSIOF2_SCK */
1852 RCAR_GP_PIN(0, 17),
1853};
1854static const unsigned int msiof2_clk_mux[] = {
1855 MSIOF2_SCK_MARK,
1856};
1857static const unsigned int msiof2_sync_pins[] = {
1858 /* MSIOF2_SYNC */
1859 RCAR_GP_PIN(0, 15),
1860};
1861static const unsigned int msiof2_sync_mux[] = {
1862 MSIOF2_SYNC_MARK,
1863};
1864static const unsigned int msiof2_ss1_pins[] = {
1865 /* MSIOF2_SS1 */
1866 RCAR_GP_PIN(0, 14),
1867};
1868static const unsigned int msiof2_ss1_mux[] = {
1869 MSIOF2_SS1_MARK,
1870};
1871static const unsigned int msiof2_ss2_pins[] = {
1872 /* MSIOF2_SS2 */
1873 RCAR_GP_PIN(0, 13),
1874};
1875static const unsigned int msiof2_ss2_mux[] = {
1876 MSIOF2_SS2_MARK,
1877};
1878static const unsigned int msiof2_txd_pins[] = {
1879 /* MSIOF2_TXD */
1880 RCAR_GP_PIN(0, 16),
1881};
1882static const unsigned int msiof2_txd_mux[] = {
1883 MSIOF2_TXD_MARK,
1884};
1885static const unsigned int msiof2_rxd_pins[] = {
1886 /* MSIOF2_RXD */
1887 RCAR_GP_PIN(0, 18),
1888};
1889static const unsigned int msiof2_rxd_mux[] = {
1890 MSIOF2_RXD_MARK,
1891};
1892
1893/* - MSIOF3 ----------------------------------------------------------------- */
1894static const unsigned int msiof3_clk_pins[] = {
1895 /* MSIOF3_SCK */
1896 RCAR_GP_PIN(0, 3),
1897};
1898static const unsigned int msiof3_clk_mux[] = {
1899 MSIOF3_SCK_MARK,
1900};
1901static const unsigned int msiof3_sync_pins[] = {
1902 /* MSIOF3_SYNC */
1903 RCAR_GP_PIN(0, 6),
1904};
1905static const unsigned int msiof3_sync_mux[] = {
1906 MSIOF3_SYNC_MARK,
1907};
1908static const unsigned int msiof3_ss1_pins[] = {
1909 /* MSIOF3_SS1 */
1910 RCAR_GP_PIN(0, 1),
1911};
1912static const unsigned int msiof3_ss1_mux[] = {
1913 MSIOF3_SS1_MARK,
1914};
1915static const unsigned int msiof3_ss2_pins[] = {
1916 /* MSIOF3_SS2 */
1917 RCAR_GP_PIN(0, 2),
1918};
1919static const unsigned int msiof3_ss2_mux[] = {
1920 MSIOF3_SS2_MARK,
1921};
1922static const unsigned int msiof3_txd_pins[] = {
1923 /* MSIOF3_TXD */
1924 RCAR_GP_PIN(0, 4),
1925};
1926static const unsigned int msiof3_txd_mux[] = {
1927 MSIOF3_TXD_MARK,
1928};
1929static const unsigned int msiof3_rxd_pins[] = {
1930 /* MSIOF3_RXD */
1931 RCAR_GP_PIN(0, 5),
1932};
1933static const unsigned int msiof3_rxd_mux[] = {
1934 MSIOF3_RXD_MARK,
1935};
1936
1937/* - MSIOF4 ----------------------------------------------------------------- */
1938static const unsigned int msiof4_clk_pins[] = {
1939 /* MSIOF4_SCK */
1940 RCAR_GP_PIN(1, 25),
1941};
1942static const unsigned int msiof4_clk_mux[] = {
1943 MSIOF4_SCK_MARK,
1944};
1945static const unsigned int msiof4_sync_pins[] = {
1946 /* MSIOF4_SYNC */
1947 RCAR_GP_PIN(1, 28),
1948};
1949static const unsigned int msiof4_sync_mux[] = {
1950 MSIOF4_SYNC_MARK,
1951};
1952static const unsigned int msiof4_ss1_pins[] = {
1953 /* MSIOF4_SS1 */
1954 RCAR_GP_PIN(1, 23),
1955};
1956static const unsigned int msiof4_ss1_mux[] = {
1957 MSIOF4_SS1_MARK,
1958};
1959static const unsigned int msiof4_ss2_pins[] = {
1960 /* MSIOF4_SS2 */
1961 RCAR_GP_PIN(1, 24),
1962};
1963static const unsigned int msiof4_ss2_mux[] = {
1964 MSIOF4_SS2_MARK,
1965};
1966static const unsigned int msiof4_txd_pins[] = {
1967 /* MSIOF4_TXD */
1968 RCAR_GP_PIN(1, 26),
1969};
1970static const unsigned int msiof4_txd_mux[] = {
1971 MSIOF4_TXD_MARK,
1972};
1973static const unsigned int msiof4_rxd_pins[] = {
1974 /* MSIOF4_RXD */
1975 RCAR_GP_PIN(1, 27),
1976};
1977static const unsigned int msiof4_rxd_mux[] = {
1978 MSIOF4_RXD_MARK,
1979};
1980
1981/* - MSIOF5 ----------------------------------------------------------------- */
1982static const unsigned int msiof5_clk_pins[] = {
1983 /* MSIOF5_SCK */
1984 RCAR_GP_PIN(0, 11),
1985};
1986static const unsigned int msiof5_clk_mux[] = {
1987 MSIOF5_SCK_MARK,
1988};
1989static const unsigned int msiof5_sync_pins[] = {
1990 /* MSIOF5_SYNC */
1991 RCAR_GP_PIN(0, 9),
1992};
1993static const unsigned int msiof5_sync_mux[] = {
1994 MSIOF5_SYNC_MARK,
1995};
1996static const unsigned int msiof5_ss1_pins[] = {
1997 /* MSIOF5_SS1 */
1998 RCAR_GP_PIN(0, 8),
1999};
2000static const unsigned int msiof5_ss1_mux[] = {
2001 MSIOF5_SS1_MARK,
2002};
2003static const unsigned int msiof5_ss2_pins[] = {
2004 /* MSIOF5_SS2 */
2005 RCAR_GP_PIN(0, 7),
2006};
2007static const unsigned int msiof5_ss2_mux[] = {
2008 MSIOF5_SS2_MARK,
2009};
2010static const unsigned int msiof5_txd_pins[] = {
2011 /* MSIOF5_TXD */
2012 RCAR_GP_PIN(0, 10),
2013};
2014static const unsigned int msiof5_txd_mux[] = {
2015 MSIOF5_TXD_MARK,
2016};
2017static const unsigned int msiof5_rxd_pins[] = {
2018 /* MSIOF5_RXD */
2019 RCAR_GP_PIN(0, 12),
2020};
2021static const unsigned int msiof5_rxd_mux[] = {
2022 MSIOF5_RXD_MARK,
2023};
2024
2025/* - PCIE ------------------------------------------------------------------- */
2026static const unsigned int pcie0_clkreq_n_pins[] = {
2027 /* PCIE0_CLKREQ_N */
2028 RCAR_GP_PIN(4, 21),
2029};
2030
2031static const unsigned int pcie0_clkreq_n_mux[] = {
2032 PCIE0_CLKREQ_N_MARK,
2033};
2034
2035static const unsigned int pcie1_clkreq_n_pins[] = {
2036 /* PCIE1_CLKREQ_N */
2037 RCAR_GP_PIN(4, 22),
2038};
2039
2040static const unsigned int pcie1_clkreq_n_mux[] = {
2041 PCIE1_CLKREQ_N_MARK,
2042};
2043
2044/* - PWM0_A ------------------------------------------------------------------- */
2045static const unsigned int pwm0_a_pins[] = {
2046 /* PWM0_A */
2047 RCAR_GP_PIN(1, 15),
2048};
2049static const unsigned int pwm0_a_mux[] = {
2050 PWM0_A_MARK,
2051};
2052
2053/* - PWM1_A ------------------------------------------------------------------- */
2054static const unsigned int pwm1_a_pins[] = {
2055 /* PWM1_A */
2056 RCAR_GP_PIN(3, 13),
2057};
2058static const unsigned int pwm1_a_mux[] = {
2059 PWM1_A_MARK,
2060};
2061
2062/* - PWM1_B ------------------------------------------------------------------- */
2063static const unsigned int pwm1_b_pins[] = {
2064 /* PWM1_B */
2065 RCAR_GP_PIN(2, 13),
2066};
2067static const unsigned int pwm1_b_mux[] = {
2068 PWM1_B_MARK,
2069};
2070
2071/* - PWM2_B ------------------------------------------------------------------- */
2072static const unsigned int pwm2_b_pins[] = {
2073 /* PWM2_B */
2074 RCAR_GP_PIN(2, 14),
2075};
2076static const unsigned int pwm2_b_mux[] = {
2077 PWM2_B_MARK,
2078};
2079
2080/* - PWM3_A ------------------------------------------------------------------- */
2081static const unsigned int pwm3_a_pins[] = {
2082 /* PWM3_A */
2083 RCAR_GP_PIN(1, 22),
2084};
2085static const unsigned int pwm3_a_mux[] = {
2086 PWM3_A_MARK,
2087};
2088
2089/* - PWM3_B ------------------------------------------------------------------- */
2090static const unsigned int pwm3_b_pins[] = {
2091 /* PWM3_B */
2092 RCAR_GP_PIN(2, 15),
2093};
2094static const unsigned int pwm3_b_mux[] = {
2095 PWM3_B_MARK,
2096};
2097
2098/* - PWM4 ------------------------------------------------------------------- */
2099static const unsigned int pwm4_pins[] = {
2100 /* PWM4 */
2101 RCAR_GP_PIN(2, 16),
2102};
2103static const unsigned int pwm4_mux[] = {
2104 PWM4_MARK,
2105};
2106
2107/* - PWM5 ------------------------------------------------------------------- */
2108static const unsigned int pwm5_pins[] = {
2109 /* PWM5 */
2110 RCAR_GP_PIN(2, 17),
2111};
2112static const unsigned int pwm5_mux[] = {
2113 PWM5_MARK,
2114};
2115
2116/* - PWM6 ------------------------------------------------------------------- */
2117static const unsigned int pwm6_pins[] = {
2118 /* PWM6 */
2119 RCAR_GP_PIN(2, 18),
2120};
2121static const unsigned int pwm6_mux[] = {
2122 PWM6_MARK,
2123};
2124
2125/* - PWM7 ------------------------------------------------------------------- */
2126static const unsigned int pwm7_pins[] = {
2127 /* PWM7 */
2128 RCAR_GP_PIN(2, 19),
2129};
2130static const unsigned int pwm7_mux[] = {
2131 PWM7_MARK,
2132};
2133
2134/* - PWM8_A ------------------------------------------------------------------- */
2135static const unsigned int pwm8_a_pins[] = {
2136 /* PWM8_A */
2137 RCAR_GP_PIN(1, 13),
2138};
2139static const unsigned int pwm8_a_mux[] = {
2140 PWM8_A_MARK,
2141};
2142
2143/* - PWM9_A ------------------------------------------------------------------- */
2144static const unsigned int pwm9_a_pins[] = {
2145 /* PWM9_A */
2146 RCAR_GP_PIN(1, 14),
2147};
2148static const unsigned int pwm9_a_mux[] = {
2149 PWM9_A_MARK,
2150};
2151
2152/* - QSPI0 ------------------------------------------------------------------ */
2153static const unsigned int qspi0_ctrl_pins[] = {
2154 /* SPCLK, SSL */
2155 RCAR_GP_PIN(3, 20), RCAR_GP_PIN(3, 15),
2156};
2157static const unsigned int qspi0_ctrl_mux[] = {
2158 QSPI0_SPCLK_MARK, QSPI0_SSL_MARK,
2159};
2160static const unsigned int qspi0_data_pins[] = {
2161 /* MOSI_IO0, MISO_IO1, IO2, IO3 */
2162 RCAR_GP_PIN(3, 19), RCAR_GP_PIN(3, 18),
2163 RCAR_GP_PIN(3, 17), RCAR_GP_PIN(3, 16),
2164};
2165static const unsigned int qspi0_data_mux[] = {
2166 QSPI0_MOSI_IO0_MARK, QSPI0_MISO_IO1_MARK,
2167 QSPI0_IO2_MARK, QSPI0_IO3_MARK
2168};
2169
2170/* - QSPI1 ------------------------------------------------------------------ */
2171static const unsigned int qspi1_ctrl_pins[] = {
2172 /* SPCLK, SSL */
2173 RCAR_GP_PIN(3, 22), RCAR_GP_PIN(3, 25),
2174};
2175static const unsigned int qspi1_ctrl_mux[] = {
2176 QSPI1_SPCLK_MARK, QSPI1_SSL_MARK,
2177};
2178static const unsigned int qspi1_data_pins[] = {
2179 /* MOSI_IO0, MISO_IO1, IO2, IO3 */
2180 RCAR_GP_PIN(3, 21), RCAR_GP_PIN(3, 23),
2181 RCAR_GP_PIN(3, 24), RCAR_GP_PIN(3, 26),
2182};
2183static const unsigned int qspi1_data_mux[] = {
2184 QSPI1_MOSI_IO0_MARK, QSPI1_MISO_IO1_MARK,
2185 QSPI1_IO2_MARK, QSPI1_IO3_MARK
2186};
2187
2188/* - SCIF0 ------------------------------------------------------------------ */
2189static const unsigned int scif0_data_pins[] = {
2190 /* RX0, TX0 */
2191 RCAR_GP_PIN(1, 16), RCAR_GP_PIN(1, 12),
2192};
2193static const unsigned int scif0_data_mux[] = {
2194 RX0_MARK, TX0_MARK,
2195};
2196static const unsigned int scif0_clk_pins[] = {
2197 /* SCK0 */
2198 RCAR_GP_PIN(1, 15),
2199};
2200static const unsigned int scif0_clk_mux[] = {
2201 SCK0_MARK,
2202};
2203static const unsigned int scif0_ctrl_pins[] = {
2204 /* RTS0_N, CTS0_N */
2205 RCAR_GP_PIN(1, 14), RCAR_GP_PIN(1, 13),
2206};
2207static const unsigned int scif0_ctrl_mux[] = {
2208 RTS0_N_MARK, CTS0_N_MARK,
2209};
2210
2211/* - SCIF1 ------------------------------------------------------------------ */
2212static const unsigned int scif1_data_pins[] = {
2213 /* RX1, TX1 */
2214 RCAR_GP_PIN(0, 15), RCAR_GP_PIN(0, 14),
2215};
2216static const unsigned int scif1_data_mux[] = {
2217 RX1_MARK, TX1_MARK,
2218};
2219static const unsigned int scif1_clk_pins[] = {
2220 /* SCK1 */
2221 RCAR_GP_PIN(0, 18),
2222};
2223static const unsigned int scif1_clk_mux[] = {
2224 SCK1_MARK,
2225};
2226static const unsigned int scif1_ctrl_pins[] = {
2227 /* RTS1_N, CTS1_N */
2228 RCAR_GP_PIN(0, 17), RCAR_GP_PIN(0, 16),
2229};
2230static const unsigned int scif1_ctrl_mux[] = {
2231 RTS1_N_MARK, CTS1_N_MARK,
2232};
2233
2234/* - SCIF1_X ------------------------------------------------------------------ */
2235static const unsigned int scif1_data_x_pins[] = {
2236 /* RX1_X, TX1_X */
2237 RCAR_GP_PIN(1, 7), RCAR_GP_PIN(1, 6),
2238};
2239static const unsigned int scif1_data_x_mux[] = {
2240 RX1_X_MARK, TX1_X_MARK,
2241};
2242static const unsigned int scif1_clk_x_pins[] = {
2243 /* SCK1_X */
2244 RCAR_GP_PIN(1, 10),
2245};
2246static const unsigned int scif1_clk_x_mux[] = {
2247 SCK1_X_MARK,
2248};
2249static const unsigned int scif1_ctrl_x_pins[] = {
2250 /* RTS1_N_X, CTS1_N_X */
2251 RCAR_GP_PIN(1, 9), RCAR_GP_PIN(1, 8),
2252};
2253static const unsigned int scif1_ctrl_x_mux[] = {
2254 RTS1_N_X_MARK, CTS1_N_X_MARK,
2255};
2256
2257/* - SCIF3 ------------------------------------------------------------------ */
2258static const unsigned int scif3_data_pins[] = {
2259 /* RX3, TX3 */
2260 RCAR_GP_PIN(1, 1), RCAR_GP_PIN(1, 0),
2261};
2262static const unsigned int scif3_data_mux[] = {
2263 RX3_MARK, TX3_MARK,
2264};
2265static const unsigned int scif3_clk_pins[] = {
2266 /* SCK3 */
2267 RCAR_GP_PIN(1, 4),
2268};
2269static const unsigned int scif3_clk_mux[] = {
2270 SCK3_MARK,
2271};
2272static const unsigned int scif3_ctrl_pins[] = {
2273 /* RTS3_N, CTS3_N */
2274 RCAR_GP_PIN(1, 2), RCAR_GP_PIN(1, 3),
2275};
2276static const unsigned int scif3_ctrl_mux[] = {
2277 RTS3_N_MARK, CTS3_N_MARK,
2278};
2279
2280/* - SCIF3_A ------------------------------------------------------------------ */
2281static const unsigned int scif3_data_a_pins[] = {
2282 /* RX3_A, TX3_A */
2283 RCAR_GP_PIN(1, 27), RCAR_GP_PIN(1, 28),
2284};
2285static const unsigned int scif3_data_a_mux[] = {
2286 RX3_A_MARK, TX3_A_MARK,
2287};
2288static const unsigned int scif3_clk_a_pins[] = {
2289 /* SCK3_A */
2290 RCAR_GP_PIN(1, 24),
2291};
2292static const unsigned int scif3_clk_a_mux[] = {
2293 SCK3_A_MARK,
2294};
2295static const unsigned int scif3_ctrl_a_pins[] = {
2296 /* RTS3_N_A, CTS3_N_A */
2297 RCAR_GP_PIN(1, 26), RCAR_GP_PIN(1, 25),
2298};
2299static const unsigned int scif3_ctrl_a_mux[] = {
2300 RTS3_N_A_MARK, CTS3_N_A_MARK,
2301};
2302
2303/* - SCIF4 ------------------------------------------------------------------ */
2304static const unsigned int scif4_data_pins[] = {
2305 /* RX4, TX4 */
2306 RCAR_GP_PIN(8, 13), RCAR_GP_PIN(8, 12),
2307};
2308static const unsigned int scif4_data_mux[] = {
2309 RX4_MARK, TX4_MARK,
2310};
2311static const unsigned int scif4_clk_pins[] = {
2312 /* SCK4 */
2313 RCAR_GP_PIN(8, 8),
2314};
2315static const unsigned int scif4_clk_mux[] = {
2316 SCK4_MARK,
2317};
2318static const unsigned int scif4_ctrl_pins[] = {
2319 /* RTS4_N, CTS4_N */
2320 RCAR_GP_PIN(8, 10), RCAR_GP_PIN(8, 9),
2321};
2322static const unsigned int scif4_ctrl_mux[] = {
2323 RTS4_N_MARK, CTS4_N_MARK,
2324};
2325
2326/* - SCIF Clock ------------------------------------------------------------- */
2327static const unsigned int scif_clk_pins[] = {
2328 /* SCIF_CLK */
2329 RCAR_GP_PIN(1, 17),
2330};
2331static const unsigned int scif_clk_mux[] = {
2332 SCIF_CLK_MARK,
2333};
2334
2335/* - TPU ------------------------------------------------------------------- */
2336static const unsigned int tpu_to0_pins[] = {
2337 /* TPU0TO0 */
2338 RCAR_GP_PIN(2, 8),
2339};
2340static const unsigned int tpu_to0_mux[] = {
2341 TPU0TO0_MARK,
2342};
2343static const unsigned int tpu_to1_pins[] = {
2344 /* TPU0TO1 */
2345 RCAR_GP_PIN(2, 7),
2346};
2347static const unsigned int tpu_to1_mux[] = {
2348 TPU0TO1_MARK,
2349};
2350static const unsigned int tpu_to2_pins[] = {
2351 /* TPU0TO2 */
2352 RCAR_GP_PIN(2, 12),
2353};
2354static const unsigned int tpu_to2_mux[] = {
2355 TPU0TO2_MARK,
2356};
2357static const unsigned int tpu_to3_pins[] = {
2358 /* TPU0TO3 */
2359 RCAR_GP_PIN(2, 13),
2360};
2361static const unsigned int tpu_to3_mux[] = {
2362 TPU0TO3_MARK,
2363};
2364
2365/* - TPU_A ------------------------------------------------------------------- */
2366static const unsigned int tpu_to0_a_pins[] = {
2367 /* TPU0TO0_A */
2368 RCAR_GP_PIN(1, 25),
2369};
2370static const unsigned int tpu_to0_a_mux[] = {
2371 TPU0TO0_A_MARK,
2372};
2373static const unsigned int tpu_to1_a_pins[] = {
2374 /* TPU0TO1_A */
2375 RCAR_GP_PIN(1, 26),
2376};
2377static const unsigned int tpu_to1_a_mux[] = {
2378 TPU0TO1_A_MARK,
2379};
2380static const unsigned int tpu_to2_a_pins[] = {
2381 /* TPU0TO2_A */
2382 RCAR_GP_PIN(2, 0),
2383};
2384static const unsigned int tpu_to2_a_mux[] = {
2385 TPU0TO2_A_MARK,
2386};
2387static const unsigned int tpu_to3_a_pins[] = {
2388 /* TPU0TO3_A */
2389 RCAR_GP_PIN(2, 1),
2390};
2391static const unsigned int tpu_to3_a_mux[] = {
2392 TPU0TO3_A_MARK,
2393};
2394
2395/* - TSN0 ------------------------------------------------ */
2396static const unsigned int tsn0_link_pins[] = {
2397 /* TSN0_LINK */
2398 RCAR_GP_PIN(4, 4),
2399};
2400static const unsigned int tsn0_link_mux[] = {
2401 TSN0_LINK_MARK,
2402};
2403static const unsigned int tsn0_phy_int_pins[] = {
2404 /* TSN0_PHY_INT */
2405 RCAR_GP_PIN(4, 3),
2406};
2407static const unsigned int tsn0_phy_int_mux[] = {
2408 TSN0_PHY_INT_MARK,
2409};
2410static const unsigned int tsn0_mdio_pins[] = {
2411 /* TSN0_MDC, TSN0_MDIO */
2412 RCAR_GP_PIN(4, 1), RCAR_GP_PIN(4, 0),
2413};
2414static const unsigned int tsn0_mdio_mux[] = {
2415 TSN0_MDC_MARK, TSN0_MDIO_MARK,
2416};
2417static const unsigned int tsn0_rgmii_pins[] = {
2418 /*
2419 * TSN0_TX_CTL, TSN0_TXC, TSN0_TD0, TSN0_TD1, TSN0_TD2, TSN0_TD3,
2420 * TSN0_RX_CTL, TSN0_RXC, TSN0_RD0, TSN0_RD1, TSN0_RD2, TSN0_RD3,
2421 */
2422 RCAR_GP_PIN(4, 9), RCAR_GP_PIN(4, 12),
2423 RCAR_GP_PIN(4, 15), RCAR_GP_PIN(4, 14),
2424 RCAR_GP_PIN(4, 19), RCAR_GP_PIN(4, 18),
2425 RCAR_GP_PIN(4, 7), RCAR_GP_PIN(4, 11),
2426 RCAR_GP_PIN(4, 10), RCAR_GP_PIN(4, 13),
2427 RCAR_GP_PIN(4, 17), RCAR_GP_PIN(4, 16),
2428};
2429static const unsigned int tsn0_rgmii_mux[] = {
2430 TSN0_TX_CTL_MARK, TSN0_TXC_MARK,
2431 TSN0_TD0_MARK, TSN0_TD1_MARK,
2432 TSN0_TD2_MARK, TSN0_TD3_MARK,
2433 TSN0_RX_CTL_MARK, TSN0_RXC_MARK,
2434 TSN0_RD0_MARK, TSN0_RD1_MARK,
2435 TSN0_RD2_MARK, TSN0_RD3_MARK,
2436};
2437static const unsigned int tsn0_txcrefclk_pins[] = {
2438 /* TSN0_TXCREFCLK */
2439 RCAR_GP_PIN(4, 20),
2440};
2441static const unsigned int tsn0_txcrefclk_mux[] = {
2442 TSN0_TXCREFCLK_MARK,
2443};
2444static const unsigned int tsn0_avtp_pps_pins[] = {
2445 /* TSN0_AVTP_PPS0, TSN0_AVTP_PPS1 */
2446 RCAR_GP_PIN(4, 8), RCAR_GP_PIN(4, 2),
2447};
2448static const unsigned int tsn0_avtp_pps_mux[] = {
2449 TSN0_AVTP_PPS0_MARK, TSN0_AVTP_PPS1_MARK,
2450};
2451static const unsigned int tsn0_avtp_capture_pins[] = {
2452 /* TSN0_AVTP_CAPTURE */
2453 RCAR_GP_PIN(4, 6),
2454};
2455static const unsigned int tsn0_avtp_capture_mux[] = {
2456 TSN0_AVTP_CAPTURE_MARK,
2457};
2458static const unsigned int tsn0_avtp_match_pins[] = {
2459 /* TSN0_AVTP_MATCH */
2460 RCAR_GP_PIN(4, 5),
2461};
2462static const unsigned int tsn0_avtp_match_mux[] = {
2463 TSN0_AVTP_MATCH_MARK,
2464};
2465
2466static const struct sh_pfc_pin_group pinmux_groups[] = {
2467 SH_PFC_PIN_GROUP(avb0_link),
2468 SH_PFC_PIN_GROUP(avb0_magic),
2469 SH_PFC_PIN_GROUP(avb0_phy_int),
2470 SH_PFC_PIN_GROUP(avb0_mdio),
2471 SH_PFC_PIN_GROUP(avb0_rgmii),
2472 SH_PFC_PIN_GROUP(avb0_txcrefclk),
2473 SH_PFC_PIN_GROUP(avb0_avtp_pps),
2474 SH_PFC_PIN_GROUP(avb0_avtp_capture),
2475 SH_PFC_PIN_GROUP(avb0_avtp_match),
2476
2477 SH_PFC_PIN_GROUP(avb1_link),
2478 SH_PFC_PIN_GROUP(avb1_magic),
2479 SH_PFC_PIN_GROUP(avb1_phy_int),
2480 SH_PFC_PIN_GROUP(avb1_mdio),
2481 SH_PFC_PIN_GROUP(avb1_rgmii),
2482 SH_PFC_PIN_GROUP(avb1_txcrefclk),
2483 SH_PFC_PIN_GROUP(avb1_avtp_pps),
2484 SH_PFC_PIN_GROUP(avb1_avtp_capture),
2485 SH_PFC_PIN_GROUP(avb1_avtp_match),
2486
2487 SH_PFC_PIN_GROUP(avb2_link),
2488 SH_PFC_PIN_GROUP(avb2_magic),
2489 SH_PFC_PIN_GROUP(avb2_phy_int),
2490 SH_PFC_PIN_GROUP(avb2_mdio),
2491 SH_PFC_PIN_GROUP(avb2_rgmii),
2492 SH_PFC_PIN_GROUP(avb2_txcrefclk),
2493 SH_PFC_PIN_GROUP(avb2_avtp_pps),
2494 SH_PFC_PIN_GROUP(avb2_avtp_capture),
2495 SH_PFC_PIN_GROUP(avb2_avtp_match),
2496
2497 SH_PFC_PIN_GROUP(canfd0_data),
2498 SH_PFC_PIN_GROUP(canfd1_data),
2499 SH_PFC_PIN_GROUP(canfd2_data),
2500 SH_PFC_PIN_GROUP(canfd3_data),
2501 SH_PFC_PIN_GROUP(canfd4_data),
2502 SH_PFC_PIN_GROUP(canfd5_data), /* suffix might be updated */
2503 SH_PFC_PIN_GROUP(canfd5_data_b), /* suffix might be updated */
2504 SH_PFC_PIN_GROUP(canfd6_data),
2505 SH_PFC_PIN_GROUP(canfd7_data),
2506 SH_PFC_PIN_GROUP(can_clk),
2507
2508 SH_PFC_PIN_GROUP(hscif0_data),
2509 SH_PFC_PIN_GROUP(hscif0_clk),
2510 SH_PFC_PIN_GROUP(hscif0_ctrl),
2511 SH_PFC_PIN_GROUP(hscif1_data), /* suffix might be updated */
2512 SH_PFC_PIN_GROUP(hscif1_clk), /* suffix might be updated */
2513 SH_PFC_PIN_GROUP(hscif1_ctrl), /* suffix might be updated */
2514 SH_PFC_PIN_GROUP(hscif1_data_x), /* suffix might be updated */
2515 SH_PFC_PIN_GROUP(hscif1_clk_x), /* suffix might be updated */
2516 SH_PFC_PIN_GROUP(hscif1_ctrl_x), /* suffix might be updated */
2517 SH_PFC_PIN_GROUP(hscif2_data),
2518 SH_PFC_PIN_GROUP(hscif2_clk),
2519 SH_PFC_PIN_GROUP(hscif2_ctrl),
2520 SH_PFC_PIN_GROUP(hscif3_data), /* suffix might be updated */
2521 SH_PFC_PIN_GROUP(hscif3_clk), /* suffix might be updated */
2522 SH_PFC_PIN_GROUP(hscif3_ctrl), /* suffix might be updated */
2523 SH_PFC_PIN_GROUP(hscif3_data_a), /* suffix might be updated */
2524 SH_PFC_PIN_GROUP(hscif3_clk_a), /* suffix might be updated */
2525 SH_PFC_PIN_GROUP(hscif3_ctrl_a), /* suffix might be updated */
2526
2527 SH_PFC_PIN_GROUP(i2c0),
2528 SH_PFC_PIN_GROUP(i2c1),
2529 SH_PFC_PIN_GROUP(i2c2),
2530 SH_PFC_PIN_GROUP(i2c3),
2531 SH_PFC_PIN_GROUP(i2c4),
2532 SH_PFC_PIN_GROUP(i2c5),
2533
2534 BUS_DATA_PIN_GROUP(mmc_data, 1),
2535 BUS_DATA_PIN_GROUP(mmc_data, 4),
2536 BUS_DATA_PIN_GROUP(mmc_data, 8),
2537 SH_PFC_PIN_GROUP(mmc_ctrl),
2538 SH_PFC_PIN_GROUP(mmc_cd),
2539 SH_PFC_PIN_GROUP(mmc_wp),
2540 SH_PFC_PIN_GROUP(mmc_ds),
2541
2542 SH_PFC_PIN_GROUP(msiof0_clk),
2543 SH_PFC_PIN_GROUP(msiof0_sync),
2544 SH_PFC_PIN_GROUP(msiof0_ss1),
2545 SH_PFC_PIN_GROUP(msiof0_ss2),
2546 SH_PFC_PIN_GROUP(msiof0_txd),
2547 SH_PFC_PIN_GROUP(msiof0_rxd),
2548
2549 SH_PFC_PIN_GROUP(msiof1_clk),
2550 SH_PFC_PIN_GROUP(msiof1_sync),
2551 SH_PFC_PIN_GROUP(msiof1_ss1),
2552 SH_PFC_PIN_GROUP(msiof1_ss2),
2553 SH_PFC_PIN_GROUP(msiof1_txd),
2554 SH_PFC_PIN_GROUP(msiof1_rxd),
2555
2556 SH_PFC_PIN_GROUP(msiof2_clk),
2557 SH_PFC_PIN_GROUP(msiof2_sync),
2558 SH_PFC_PIN_GROUP(msiof2_ss1),
2559 SH_PFC_PIN_GROUP(msiof2_ss2),
2560 SH_PFC_PIN_GROUP(msiof2_txd),
2561 SH_PFC_PIN_GROUP(msiof2_rxd),
2562
2563 SH_PFC_PIN_GROUP(msiof3_clk),
2564 SH_PFC_PIN_GROUP(msiof3_sync),
2565 SH_PFC_PIN_GROUP(msiof3_ss1),
2566 SH_PFC_PIN_GROUP(msiof3_ss2),
2567 SH_PFC_PIN_GROUP(msiof3_txd),
2568 SH_PFC_PIN_GROUP(msiof3_rxd),
2569
2570 SH_PFC_PIN_GROUP(msiof4_clk),
2571 SH_PFC_PIN_GROUP(msiof4_sync),
2572 SH_PFC_PIN_GROUP(msiof4_ss1),
2573 SH_PFC_PIN_GROUP(msiof4_ss2),
2574 SH_PFC_PIN_GROUP(msiof4_txd),
2575 SH_PFC_PIN_GROUP(msiof4_rxd),
2576
2577 SH_PFC_PIN_GROUP(msiof5_clk),
2578 SH_PFC_PIN_GROUP(msiof5_sync),
2579 SH_PFC_PIN_GROUP(msiof5_ss1),
2580 SH_PFC_PIN_GROUP(msiof5_ss2),
2581 SH_PFC_PIN_GROUP(msiof5_txd),
2582 SH_PFC_PIN_GROUP(msiof5_rxd),
2583
2584 SH_PFC_PIN_GROUP(pcie0_clkreq_n),
2585 SH_PFC_PIN_GROUP(pcie1_clkreq_n),
2586
2587 SH_PFC_PIN_GROUP(pwm0_a), /* suffix might be updated */
2588 SH_PFC_PIN_GROUP(pwm1_a),
2589 SH_PFC_PIN_GROUP(pwm1_b),
2590 SH_PFC_PIN_GROUP(pwm2_b), /* suffix might be updated */
2591 SH_PFC_PIN_GROUP(pwm3_a),
2592 SH_PFC_PIN_GROUP(pwm3_b),
2593 SH_PFC_PIN_GROUP(pwm4),
2594 SH_PFC_PIN_GROUP(pwm5),
2595 SH_PFC_PIN_GROUP(pwm6),
2596 SH_PFC_PIN_GROUP(pwm7),
2597 SH_PFC_PIN_GROUP(pwm8_a), /* suffix might be updated */
2598 SH_PFC_PIN_GROUP(pwm9_a), /* suffix might be updated */
2599
2600 SH_PFC_PIN_GROUP(qspi0_ctrl),
2601 BUS_DATA_PIN_GROUP(qspi0_data, 2),
2602 BUS_DATA_PIN_GROUP(qspi0_data, 4),
2603 SH_PFC_PIN_GROUP(qspi1_ctrl),
2604 BUS_DATA_PIN_GROUP(qspi1_data, 2),
2605 BUS_DATA_PIN_GROUP(qspi1_data, 4),
2606
2607 SH_PFC_PIN_GROUP(scif0_data),
2608 SH_PFC_PIN_GROUP(scif0_clk),
2609 SH_PFC_PIN_GROUP(scif0_ctrl),
2610 SH_PFC_PIN_GROUP(scif1_data), /* suffix might be updated */
2611 SH_PFC_PIN_GROUP(scif1_clk), /* suffix might be updated */
2612 SH_PFC_PIN_GROUP(scif1_ctrl), /* suffix might be updated */
2613 SH_PFC_PIN_GROUP(scif1_data_x), /* suffix might be updated */
2614 SH_PFC_PIN_GROUP(scif1_clk_x), /* suffix might be updated */
2615 SH_PFC_PIN_GROUP(scif1_ctrl_x), /* suffix might be updated */
2616 SH_PFC_PIN_GROUP(scif3_data), /* suffix might be updated */
2617 SH_PFC_PIN_GROUP(scif3_clk), /* suffix might be updated */
2618 SH_PFC_PIN_GROUP(scif3_ctrl), /* suffix might be updated */
2619 SH_PFC_PIN_GROUP(scif3_data_a), /* suffix might be updated */
2620 SH_PFC_PIN_GROUP(scif3_clk_a), /* suffix might be updated */
2621 SH_PFC_PIN_GROUP(scif3_ctrl_a), /* suffix might be updated */
2622 SH_PFC_PIN_GROUP(scif4_data),
2623 SH_PFC_PIN_GROUP(scif4_clk),
2624 SH_PFC_PIN_GROUP(scif4_ctrl),
2625 SH_PFC_PIN_GROUP(scif_clk),
2626
2627 SH_PFC_PIN_GROUP(tpu_to0), /* suffix might be updated */
2628 SH_PFC_PIN_GROUP(tpu_to0_a), /* suffix might be updated */
2629 SH_PFC_PIN_GROUP(tpu_to1), /* suffix might be updated */
2630 SH_PFC_PIN_GROUP(tpu_to1_a), /* suffix might be updated */
2631 SH_PFC_PIN_GROUP(tpu_to2), /* suffix might be updated */
2632 SH_PFC_PIN_GROUP(tpu_to2_a), /* suffix might be updated */
2633 SH_PFC_PIN_GROUP(tpu_to3), /* suffix might be updated */
2634 SH_PFC_PIN_GROUP(tpu_to3_a), /* suffix might be updated */
2635
2636 SH_PFC_PIN_GROUP(tsn0_link),
2637 SH_PFC_PIN_GROUP(tsn0_phy_int),
2638 SH_PFC_PIN_GROUP(tsn0_mdio),
2639 SH_PFC_PIN_GROUP(tsn0_rgmii),
2640 SH_PFC_PIN_GROUP(tsn0_txcrefclk),
2641 SH_PFC_PIN_GROUP(tsn0_avtp_pps),
2642 SH_PFC_PIN_GROUP(tsn0_avtp_capture),
2643 SH_PFC_PIN_GROUP(tsn0_avtp_match),
2644};
2645
2646static const char * const avb0_groups[] = {
2647 "avb0_link",
2648 "avb0_magic",
2649 "avb0_phy_int",
2650 "avb0_mdio",
2651 "avb0_rgmii",
2652 "avb0_txcrefclk",
2653 "avb0_avtp_pps",
2654 "avb0_avtp_capture",
2655 "avb0_avtp_match",
2656};
2657
2658static const char * const avb1_groups[] = {
2659 "avb1_link",
2660 "avb1_magic",
2661 "avb1_phy_int",
2662 "avb1_mdio",
2663 "avb1_rgmii",
2664 "avb1_txcrefclk",
2665 "avb1_avtp_pps",
2666 "avb1_avtp_capture",
2667 "avb1_avtp_match",
2668};
2669
2670static const char * const avb2_groups[] = {
2671 "avb2_link",
2672 "avb2_magic",
2673 "avb2_phy_int",
2674 "avb2_mdio",
2675 "avb2_rgmii",
2676 "avb2_txcrefclk",
2677 "avb2_avtp_pps",
2678 "avb2_avtp_capture",
2679 "avb2_avtp_match",
2680};
2681
2682static const char * const canfd0_groups[] = {
2683 "canfd0_data",
2684};
2685
2686static const char * const canfd1_groups[] = {
2687 "canfd1_data",
2688};
2689
2690static const char * const canfd2_groups[] = {
2691 "canfd2_data",
2692};
2693
2694static const char * const canfd3_groups[] = {
2695 "canfd3_data",
2696};
2697
2698static const char * const canfd4_groups[] = {
2699 "canfd4_data",
2700};
2701
2702static const char * const canfd5_groups[] = {
2703 /* suffix might be updated */
2704 "canfd5_data",
2705 "canfd5_data_b",
2706};
2707
2708static const char * const canfd6_groups[] = {
2709 "canfd6_data",
2710};
2711
2712static const char * const canfd7_groups[] = {
2713 "canfd7_data",
2714};
2715
2716static const char * const can_clk_groups[] = {
2717 "can_clk",
2718};
2719
2720static const char * const hscif0_groups[] = {
2721 "hscif0_data",
2722 "hscif0_clk",
2723 "hscif0_ctrl",
2724};
2725
2726static const char * const hscif1_groups[] = {
2727 /* suffix might be updated */
2728 "hscif1_data",
2729 "hscif1_clk",
2730 "hscif1_ctrl",
2731 "hscif1_data_x",
2732 "hscif1_clk_x",
2733 "hscif1_ctrl_x",
2734};
2735
2736static const char * const hscif2_groups[] = {
2737 "hscif2_data",
2738 "hscif2_clk",
2739 "hscif2_ctrl",
2740};
2741
2742static const char * const hscif3_groups[] = {
2743 /* suffix might be updated */
2744 "hscif3_data",
2745 "hscif3_clk",
2746 "hscif3_ctrl",
2747 "hscif3_data_a",
2748 "hscif3_clk_a",
2749 "hscif3_ctrl_a",
2750};
2751
2752static const char * const i2c0_groups[] = {
2753 "i2c0",
2754};
2755
2756static const char * const i2c1_groups[] = {
2757 "i2c1",
2758};
2759
2760static const char * const i2c2_groups[] = {
2761 "i2c2",
2762};
2763
2764static const char * const i2c3_groups[] = {
2765 "i2c3",
2766};
2767
2768static const char * const i2c4_groups[] = {
2769 "i2c4",
2770};
2771
2772static const char * const i2c5_groups[] = {
2773 "i2c5",
2774};
2775
2776static const char * const mmc_groups[] = {
2777 "mmc_data1",
2778 "mmc_data4",
2779 "mmc_data8",
2780 "mmc_ctrl",
2781 "mmc_cd",
2782 "mmc_wp",
2783 "mmc_ds",
2784};
2785
2786static const char * const msiof0_groups[] = {
2787 "msiof0_clk",
2788 "msiof0_sync",
2789 "msiof0_ss1",
2790 "msiof0_ss2",
2791 "msiof0_txd",
2792 "msiof0_rxd",
2793};
2794
2795static const char * const msiof1_groups[] = {
2796 "msiof1_clk",
2797 "msiof1_sync",
2798 "msiof1_ss1",
2799 "msiof1_ss2",
2800 "msiof1_txd",
2801 "msiof1_rxd",
2802};
2803
2804static const char * const msiof2_groups[] = {
2805 "msiof2_clk",
2806 "msiof2_sync",
2807 "msiof2_ss1",
2808 "msiof2_ss2",
2809 "msiof2_txd",
2810 "msiof2_rxd",
2811};
2812
2813static const char * const msiof3_groups[] = {
2814 "msiof3_clk",
2815 "msiof3_sync",
2816 "msiof3_ss1",
2817 "msiof3_ss2",
2818 "msiof3_txd",
2819 "msiof3_rxd",
2820};
2821
2822static const char * const msiof4_groups[] = {
2823 "msiof4_clk",
2824 "msiof4_sync",
2825 "msiof4_ss1",
2826 "msiof4_ss2",
2827 "msiof4_txd",
2828 "msiof4_rxd",
2829};
2830
2831static const char * const msiof5_groups[] = {
2832 "msiof5_clk",
2833 "msiof5_sync",
2834 "msiof5_ss1",
2835 "msiof5_ss2",
2836 "msiof5_txd",
2837 "msiof5_rxd",
2838};
2839
2840static const char * const pcie_groups[] = {
2841 "pcie0_clkreq_n",
2842 "pcie1_clkreq_n",
2843};
2844
2845static const char * const pwm0_groups[] = {
2846 /* suffix might be updated */
2847 "pwm0_a",
2848};
2849
2850static const char * const pwm1_groups[] = {
2851 "pwm1_a",
2852 "pwm1_b",
2853};
2854
2855static const char * const pwm2_groups[] = {
2856 /* suffix might be updated */
2857 "pwm2_b",
2858};
2859
2860static const char * const pwm3_groups[] = {
2861 "pwm3_a",
2862 "pwm3_b",
2863};
2864
2865static const char * const pwm4_groups[] = {
2866 "pwm4",
2867};
2868
2869static const char * const pwm5_groups[] = {
2870 "pwm5",
2871};
2872
2873static const char * const pwm6_groups[] = {
2874 "pwm6",
2875};
2876
2877static const char * const pwm7_groups[] = {
2878 "pwm7",
2879};
2880
2881static const char * const pwm8_groups[] = {
2882 /* suffix might be updated */
2883 "pwm8_a",
2884};
2885
2886static const char * const pwm9_groups[] = {
2887 /* suffix might be updated */
2888 "pwm9_a",
2889};
2890
2891static const char * const qspi0_groups[] = {
2892 "qspi0_ctrl",
2893 "qspi0_data2",
2894 "qspi0_data4",
2895};
2896
2897static const char * const qspi1_groups[] = {
2898 "qspi1_ctrl",
2899 "qspi1_data2",
2900 "qspi1_data4",
2901};
2902
2903static const char * const scif0_groups[] = {
2904 "scif0_data",
2905 "scif0_clk",
2906 "scif0_ctrl",
2907};
2908
2909static const char * const scif1_groups[] = {
2910 /* suffix might be updated */
2911 "scif1_data",
2912 "scif1_clk",
2913 "scif1_ctrl",
2914 "scif1_data_x",
2915 "scif1_clk_x",
2916 "scif1_ctrl_x",
2917};
2918
2919static const char * const scif3_groups[] = {
2920 /* suffix might be updated */
2921 "scif3_data",
2922 "scif3_clk",
2923 "scif3_ctrl",
2924 "scif3_data_a",
2925 "scif3_clk_a",
2926 "scif3_ctrl_a",
2927};
2928
2929static const char * const scif4_groups[] = {
2930 "scif4_data",
2931 "scif4_clk",
2932 "scif4_ctrl",
2933};
2934
2935static const char * const scif_clk_groups[] = {
2936 "scif_clk",
2937};
2938
2939static const char * const tpu_groups[] = {
2940 /* suffix might be updated */
2941 "tpu_to0",
2942 "tpu_to0_a",
2943 "tpu_to1",
2944 "tpu_to1_a",
2945 "tpu_to2",
2946 "tpu_to2_a",
2947 "tpu_to3",
2948 "tpu_to3_a",
2949};
2950
2951static const char * const tsn0_groups[] = {
2952 "tsn0_link",
2953 "tsn0_phy_int",
2954 "tsn0_mdio",
2955 "tsn0_rgmii",
2956 "tsn0_txcrefclk",
2957 "tsn0_avtp_pps",
2958 "tsn0_avtp_capture",
2959 "tsn0_avtp_match",
2960};
2961
2962static const struct sh_pfc_function pinmux_functions[] = {
2963 SH_PFC_FUNCTION(avb0),
2964 SH_PFC_FUNCTION(avb1),
2965 SH_PFC_FUNCTION(avb2),
2966
2967 SH_PFC_FUNCTION(canfd0),
2968 SH_PFC_FUNCTION(canfd1),
2969 SH_PFC_FUNCTION(canfd2),
2970 SH_PFC_FUNCTION(canfd3),
2971 SH_PFC_FUNCTION(canfd4),
2972 SH_PFC_FUNCTION(canfd5),
2973 SH_PFC_FUNCTION(canfd6),
2974 SH_PFC_FUNCTION(canfd7),
2975 SH_PFC_FUNCTION(can_clk),
2976
2977 SH_PFC_FUNCTION(hscif0),
2978 SH_PFC_FUNCTION(hscif1),
2979 SH_PFC_FUNCTION(hscif2),
2980 SH_PFC_FUNCTION(hscif3),
2981
2982 SH_PFC_FUNCTION(i2c0),
2983 SH_PFC_FUNCTION(i2c1),
2984 SH_PFC_FUNCTION(i2c2),
2985 SH_PFC_FUNCTION(i2c3),
2986 SH_PFC_FUNCTION(i2c4),
2987 SH_PFC_FUNCTION(i2c5),
2988
2989 SH_PFC_FUNCTION(mmc),
2990
2991 SH_PFC_FUNCTION(msiof0),
2992 SH_PFC_FUNCTION(msiof1),
2993 SH_PFC_FUNCTION(msiof2),
2994 SH_PFC_FUNCTION(msiof3),
2995 SH_PFC_FUNCTION(msiof4),
2996 SH_PFC_FUNCTION(msiof5),
2997
2998 SH_PFC_FUNCTION(pcie),
2999
3000 SH_PFC_FUNCTION(pwm0),
3001 SH_PFC_FUNCTION(pwm1),
3002 SH_PFC_FUNCTION(pwm2),
3003 SH_PFC_FUNCTION(pwm3),
3004 SH_PFC_FUNCTION(pwm4),
3005 SH_PFC_FUNCTION(pwm5),
3006 SH_PFC_FUNCTION(pwm6),
3007 SH_PFC_FUNCTION(pwm7),
3008 SH_PFC_FUNCTION(pwm8),
3009 SH_PFC_FUNCTION(pwm9),
3010
3011 SH_PFC_FUNCTION(qspi0),
3012 SH_PFC_FUNCTION(qspi1),
3013
3014 SH_PFC_FUNCTION(scif0),
3015 SH_PFC_FUNCTION(scif1),
3016 SH_PFC_FUNCTION(scif3),
3017 SH_PFC_FUNCTION(scif4),
3018 SH_PFC_FUNCTION(scif_clk),
3019
3020 SH_PFC_FUNCTION(tpu),
3021
3022 SH_PFC_FUNCTION(tsn0),
3023};
3024
3025static const struct pinmux_cfg_reg pinmux_config_regs[] = {
3026#define F_(x, y) FN_##y
3027#define FM(x) FN_##x
3028 { PINMUX_CFG_REG_VAR("GPSR0", 0xE6050040, 32,
3029 GROUP(-13, 1, 1, 1, 1, 1, 1, 1, 1, 1,
3030 1, 1, 1, 1, 1, 1, 1, 1, 1, 1),
3031 GROUP(
3032 /* GP0_31_19 RESERVED */
3033 GP_0_18_FN, GPSR0_18,
3034 GP_0_17_FN, GPSR0_17,
3035 GP_0_16_FN, GPSR0_16,
3036 GP_0_15_FN, GPSR0_15,
3037 GP_0_14_FN, GPSR0_14,
3038 GP_0_13_FN, GPSR0_13,
3039 GP_0_12_FN, GPSR0_12,
3040 GP_0_11_FN, GPSR0_11,
3041 GP_0_10_FN, GPSR0_10,
3042 GP_0_9_FN, GPSR0_9,
3043 GP_0_8_FN, GPSR0_8,
3044 GP_0_7_FN, GPSR0_7,
3045 GP_0_6_FN, GPSR0_6,
3046 GP_0_5_FN, GPSR0_5,
3047 GP_0_4_FN, GPSR0_4,
3048 GP_0_3_FN, GPSR0_3,
3049 GP_0_2_FN, GPSR0_2,
3050 GP_0_1_FN, GPSR0_1,
3051 GP_0_0_FN, GPSR0_0, ))
3052 },
3053 { PINMUX_CFG_REG("GPSR1", 0xE6050840, 32, 1, GROUP(
3054 0, 0,
3055 0, 0,
3056 0, 0,
3057 GP_1_28_FN, GPSR1_28,
3058 GP_1_27_FN, GPSR1_27,
3059 GP_1_26_FN, GPSR1_26,
3060 GP_1_25_FN, GPSR1_25,
3061 GP_1_24_FN, GPSR1_24,
3062 GP_1_23_FN, GPSR1_23,
3063 GP_1_22_FN, GPSR1_22,
3064 GP_1_21_FN, GPSR1_21,
3065 GP_1_20_FN, GPSR1_20,
3066 GP_1_19_FN, GPSR1_19,
3067 GP_1_18_FN, GPSR1_18,
3068 GP_1_17_FN, GPSR1_17,
3069 GP_1_16_FN, GPSR1_16,
3070 GP_1_15_FN, GPSR1_15,
3071 GP_1_14_FN, GPSR1_14,
3072 GP_1_13_FN, GPSR1_13,
3073 GP_1_12_FN, GPSR1_12,
3074 GP_1_11_FN, GPSR1_11,
3075 GP_1_10_FN, GPSR1_10,
3076 GP_1_9_FN, GPSR1_9,
3077 GP_1_8_FN, GPSR1_8,
3078 GP_1_7_FN, GPSR1_7,
3079 GP_1_6_FN, GPSR1_6,
3080 GP_1_5_FN, GPSR1_5,
3081 GP_1_4_FN, GPSR1_4,
3082 GP_1_3_FN, GPSR1_3,
3083 GP_1_2_FN, GPSR1_2,
3084 GP_1_1_FN, GPSR1_1,
3085 GP_1_0_FN, GPSR1_0, ))
3086 },
3087 { PINMUX_CFG_REG_VAR("GPSR2", 0xE6058040, 32,
3088 GROUP(-12, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
3089 1, 1, 1, 1, 1, 1, 1, 1, 1, 1),
3090 GROUP(
3091 /* GP2_31_20 RESERVED */
3092 GP_2_19_FN, GPSR2_19,
3093 GP_2_18_FN, GPSR2_18,
3094 GP_2_17_FN, GPSR2_17,
3095 GP_2_16_FN, GPSR2_16,
3096 GP_2_15_FN, GPSR2_15,
3097 GP_2_14_FN, GPSR2_14,
3098 GP_2_13_FN, GPSR2_13,
3099 GP_2_12_FN, GPSR2_12,
3100 GP_2_11_FN, GPSR2_11,
3101 GP_2_10_FN, GPSR2_10,
3102 GP_2_9_FN, GPSR2_9,
3103 GP_2_8_FN, GPSR2_8,
3104 GP_2_7_FN, GPSR2_7,
3105 GP_2_6_FN, GPSR2_6,
3106 GP_2_5_FN, GPSR2_5,
3107 GP_2_4_FN, GPSR2_4,
3108 GP_2_3_FN, GPSR2_3,
3109 GP_2_2_FN, GPSR2_2,
3110 GP_2_1_FN, GPSR2_1,
3111 GP_2_0_FN, GPSR2_0, ))
3112 },
3113 { PINMUX_CFG_REG("GPSR3", 0xE6058840, 32, 1, GROUP(
3114 0, 0,
3115 0, 0,
3116 GP_3_29_FN, GPSR3_29,
3117 GP_3_28_FN, GPSR3_28,
3118 GP_3_27_FN, GPSR3_27,
3119 GP_3_26_FN, GPSR3_26,
3120 GP_3_25_FN, GPSR3_25,
3121 GP_3_24_FN, GPSR3_24,
3122 GP_3_23_FN, GPSR3_23,
3123 GP_3_22_FN, GPSR3_22,
3124 GP_3_21_FN, GPSR3_21,
3125 GP_3_20_FN, GPSR3_20,
3126 GP_3_19_FN, GPSR3_19,
3127 GP_3_18_FN, GPSR3_18,
3128 GP_3_17_FN, GPSR3_17,
3129 GP_3_16_FN, GPSR3_16,
3130 GP_3_15_FN, GPSR3_15,
3131 GP_3_14_FN, GPSR3_14,
3132 GP_3_13_FN, GPSR3_13,
3133 GP_3_12_FN, GPSR3_12,
3134 GP_3_11_FN, GPSR3_11,
3135 GP_3_10_FN, GPSR3_10,
3136 GP_3_9_FN, GPSR3_9,
3137 GP_3_8_FN, GPSR3_8,
3138 GP_3_7_FN, GPSR3_7,
3139 GP_3_6_FN, GPSR3_6,
3140 GP_3_5_FN, GPSR3_5,
3141 GP_3_4_FN, GPSR3_4,
3142 GP_3_3_FN, GPSR3_3,
3143 GP_3_2_FN, GPSR3_2,
3144 GP_3_1_FN, GPSR3_1,
3145 GP_3_0_FN, GPSR3_0, ))
3146 },
3147 { PINMUX_CFG_REG("GPSR4", 0xE6060040, 32, 1, GROUP(
3148 0, 0,
3149 0, 0,
3150 0, 0,
3151 0, 0,
3152 0, 0,
3153 0, 0,
3154 0, 0,
3155 GP_4_24_FN, GPSR4_24,
3156 GP_4_23_FN, GPSR4_23,
3157 GP_4_22_FN, GPSR4_22,
3158 GP_4_21_FN, GPSR4_21,
3159 GP_4_20_FN, GPSR4_20,
3160 GP_4_19_FN, GPSR4_19,
3161 GP_4_18_FN, GPSR4_18,
3162 GP_4_17_FN, GPSR4_17,
3163 GP_4_16_FN, GPSR4_16,
3164 GP_4_15_FN, GPSR4_15,
3165 GP_4_14_FN, GPSR4_14,
3166 GP_4_13_FN, GPSR4_13,
3167 GP_4_12_FN, GPSR4_12,
3168 GP_4_11_FN, GPSR4_11,
3169 GP_4_10_FN, GPSR4_10,
3170 GP_4_9_FN, GPSR4_9,
3171 GP_4_8_FN, GPSR4_8,
3172 GP_4_7_FN, GPSR4_7,
3173 GP_4_6_FN, GPSR4_6,
3174 GP_4_5_FN, GPSR4_5,
3175 GP_4_4_FN, GPSR4_4,
3176 GP_4_3_FN, GPSR4_3,
3177 GP_4_2_FN, GPSR4_2,
3178 GP_4_1_FN, GPSR4_1,
3179 GP_4_0_FN, GPSR4_0, ))
3180 },
3181 { PINMUX_CFG_REG_VAR("GPSR5", 0xE6060840, 32,
3182 GROUP(-11, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
3183 1, 1, 1, 1, 1, 1, 1, 1, 1, 1),
3184 GROUP(
3185 /* GP5_31_21 RESERVED */
3186 GP_5_20_FN, GPSR5_20,
3187 GP_5_19_FN, GPSR5_19,
3188 GP_5_18_FN, GPSR5_18,
3189 GP_5_17_FN, GPSR5_17,
3190 GP_5_16_FN, GPSR5_16,
3191 GP_5_15_FN, GPSR5_15,
3192 GP_5_14_FN, GPSR5_14,
3193 GP_5_13_FN, GPSR5_13,
3194 GP_5_12_FN, GPSR5_12,
3195 GP_5_11_FN, GPSR5_11,
3196 GP_5_10_FN, GPSR5_10,
3197 GP_5_9_FN, GPSR5_9,
3198 GP_5_8_FN, GPSR5_8,
3199 GP_5_7_FN, GPSR5_7,
3200 GP_5_6_FN, GPSR5_6,
3201 GP_5_5_FN, GPSR5_5,
3202 GP_5_4_FN, GPSR5_4,
3203 GP_5_3_FN, GPSR5_3,
3204 GP_5_2_FN, GPSR5_2,
3205 GP_5_1_FN, GPSR5_1,
3206 GP_5_0_FN, GPSR5_0, ))
3207 },
3208 { PINMUX_CFG_REG_VAR("GPSR6", 0xE6061040, 32,
3209 GROUP(-11, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
3210 1, 1, 1, 1, 1, 1, 1, 1, 1, 1),
3211 GROUP(
3212 /* GP6_31_21 RESERVED */
3213 GP_6_20_FN, GPSR6_20,
3214 GP_6_19_FN, GPSR6_19,
3215 GP_6_18_FN, GPSR6_18,
3216 GP_6_17_FN, GPSR6_17,
3217 GP_6_16_FN, GPSR6_16,
3218 GP_6_15_FN, GPSR6_15,
3219 GP_6_14_FN, GPSR6_14,
3220 GP_6_13_FN, GPSR6_13,
3221 GP_6_12_FN, GPSR6_12,
3222 GP_6_11_FN, GPSR6_11,
3223 GP_6_10_FN, GPSR6_10,
3224 GP_6_9_FN, GPSR6_9,
3225 GP_6_8_FN, GPSR6_8,
3226 GP_6_7_FN, GPSR6_7,
3227 GP_6_6_FN, GPSR6_6,
3228 GP_6_5_FN, GPSR6_5,
3229 GP_6_4_FN, GPSR6_4,
3230 GP_6_3_FN, GPSR6_3,
3231 GP_6_2_FN, GPSR6_2,
3232 GP_6_1_FN, GPSR6_1,
3233 GP_6_0_FN, GPSR6_0, ))
3234 },
3235 { PINMUX_CFG_REG_VAR("GPSR7", 0xE6061840, 32,
3236 GROUP(-11, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
3237 1, 1, 1, 1, 1, 1, 1, 1, 1, 1),
3238 GROUP(
3239 /* GP7_31_21 RESERVED */
3240 GP_7_20_FN, GPSR7_20,
3241 GP_7_19_FN, GPSR7_19,
3242 GP_7_18_FN, GPSR7_18,
3243 GP_7_17_FN, GPSR7_17,
3244 GP_7_16_FN, GPSR7_16,
3245 GP_7_15_FN, GPSR7_15,
3246 GP_7_14_FN, GPSR7_14,
3247 GP_7_13_FN, GPSR7_13,
3248 GP_7_12_FN, GPSR7_12,
3249 GP_7_11_FN, GPSR7_11,
3250 GP_7_10_FN, GPSR7_10,
3251 GP_7_9_FN, GPSR7_9,
3252 GP_7_8_FN, GPSR7_8,
3253 GP_7_7_FN, GPSR7_7,
3254 GP_7_6_FN, GPSR7_6,
3255 GP_7_5_FN, GPSR7_5,
3256 GP_7_4_FN, GPSR7_4,
3257 GP_7_3_FN, GPSR7_3,
3258 GP_7_2_FN, GPSR7_2,
3259 GP_7_1_FN, GPSR7_1,
3260 GP_7_0_FN, GPSR7_0, ))
3261 },
3262 { PINMUX_CFG_REG_VAR("GPSR8", 0xE6068040, 32,
3263 GROUP(-18, 1, 1, 1, 1,
3264 1, 1, 1, 1, 1, 1, 1, 1, 1, 1),
3265 GROUP(
3266 /* GP8_31_14 RESERVED */
3267 GP_8_13_FN, GPSR8_13,
3268 GP_8_12_FN, GPSR8_12,
3269 GP_8_11_FN, GPSR8_11,
3270 GP_8_10_FN, GPSR8_10,
3271 GP_8_9_FN, GPSR8_9,
3272 GP_8_8_FN, GPSR8_8,
3273 GP_8_7_FN, GPSR8_7,
3274 GP_8_6_FN, GPSR8_6,
3275 GP_8_5_FN, GPSR8_5,
3276 GP_8_4_FN, GPSR8_4,
3277 GP_8_3_FN, GPSR8_3,
3278 GP_8_2_FN, GPSR8_2,
3279 GP_8_1_FN, GPSR8_1,
3280 GP_8_0_FN, GPSR8_0, ))
3281 },
3282#undef F_
3283#undef FM
3284
3285#define F_(x, y) x,
3286#define FM(x) FN_##x,
3287 { PINMUX_CFG_REG("IP0SR0", 0xE6050060, 32, 4, GROUP(
3288 IP0SR0_31_28
3289 IP0SR0_27_24
3290 IP0SR0_23_20
3291 IP0SR0_19_16
3292 IP0SR0_15_12
3293 IP0SR0_11_8
3294 IP0SR0_7_4
3295 IP0SR0_3_0))
3296 },
3297 { PINMUX_CFG_REG("IP1SR0", 0xE6050064, 32, 4, GROUP(
3298 IP1SR0_31_28
3299 IP1SR0_27_24
3300 IP1SR0_23_20
3301 IP1SR0_19_16
3302 IP1SR0_15_12
3303 IP1SR0_11_8
3304 IP1SR0_7_4
3305 IP1SR0_3_0))
3306 },
3307 { PINMUX_CFG_REG_VAR("IP2SR0", 0xE6050068, 32,
3308 GROUP(-20, 4, 4, 4),
3309 GROUP(
3310 /* IP2SR0_31_12 RESERVED */
3311 IP2SR0_11_8
3312 IP2SR0_7_4
3313 IP2SR0_3_0))
3314 },
3315 { PINMUX_CFG_REG("IP0SR1", 0xE6050860, 32, 4, GROUP(
3316 IP0SR1_31_28
3317 IP0SR1_27_24
3318 IP0SR1_23_20
3319 IP0SR1_19_16
3320 IP0SR1_15_12
3321 IP0SR1_11_8
3322 IP0SR1_7_4
3323 IP0SR1_3_0))
3324 },
3325 { PINMUX_CFG_REG("IP1SR1", 0xE6050864, 32, 4, GROUP(
3326 IP1SR1_31_28
3327 IP1SR1_27_24
3328 IP1SR1_23_20
3329 IP1SR1_19_16
3330 IP1SR1_15_12
3331 IP1SR1_11_8
3332 IP1SR1_7_4
3333 IP1SR1_3_0))
3334 },
3335 { PINMUX_CFG_REG("IP2SR1", 0xE6050868, 32, 4, GROUP(
3336 IP2SR1_31_28
3337 IP2SR1_27_24
3338 IP2SR1_23_20
3339 IP2SR1_19_16
3340 IP2SR1_15_12
3341 IP2SR1_11_8
3342 IP2SR1_7_4
3343 IP2SR1_3_0))
3344 },
3345 { PINMUX_CFG_REG_VAR("IP3SR1", 0xE605086C, 32,
3346 GROUP(-12, 4, 4, 4, 4, 4),
3347 GROUP(
3348 /* IP3SR1_31_20 RESERVED */
3349 IP3SR1_19_16
3350 IP3SR1_15_12
3351 IP3SR1_11_8
3352 IP3SR1_7_4
3353 IP3SR1_3_0))
3354 },
3355 { PINMUX_CFG_REG("IP0SR2", 0xE6058060, 32, 4, GROUP(
3356 IP0SR2_31_28
3357 IP0SR2_27_24
3358 IP0SR2_23_20
3359 IP0SR2_19_16
3360 IP0SR2_15_12
3361 IP0SR2_11_8
3362 IP0SR2_7_4
3363 IP0SR2_3_0))
3364 },
3365 { PINMUX_CFG_REG("IP1SR2", 0xE6058064, 32, 4, GROUP(
3366 IP1SR2_31_28
3367 IP1SR2_27_24
3368 IP1SR2_23_20
3369 IP1SR2_19_16
3370 IP1SR2_15_12
3371 IP1SR2_11_8
3372 IP1SR2_7_4
3373 IP1SR2_3_0))
3374 },
3375 { PINMUX_CFG_REG_VAR("IP2SR2", 0xE6058068, 32,
3376 GROUP(-16, 4, 4, 4, 4),
3377 GROUP(
3378 /* IP2SR2_31_16 RESERVED */
3379 IP2SR2_15_12
3380 IP2SR2_11_8
3381 IP2SR2_7_4
3382 IP2SR2_3_0))
3383 },
3384 { PINMUX_CFG_REG("IP0SR3", 0xE6058860, 32, 4, GROUP(
3385 IP0SR3_31_28
3386 IP0SR3_27_24
3387 IP0SR3_23_20
3388 IP0SR3_19_16
3389 IP0SR3_15_12
3390 IP0SR3_11_8
3391 IP0SR3_7_4
3392 IP0SR3_3_0))
3393 },
3394 { PINMUX_CFG_REG("IP1SR3", 0xE6058864, 32, 4, GROUP(
3395 IP1SR3_31_28
3396 IP1SR3_27_24
3397 IP1SR3_23_20
3398 IP1SR3_19_16
3399 IP1SR3_15_12
3400 IP1SR3_11_8
3401 IP1SR3_7_4
3402 IP1SR3_3_0))
3403 },
3404 { PINMUX_CFG_REG("IP2SR3", 0xE6058868, 32, 4, GROUP(
3405 IP2SR3_31_28
3406 IP2SR3_27_24
3407 IP2SR3_23_20
3408 IP2SR3_19_16
3409 IP2SR3_15_12
3410 IP2SR3_11_8
3411 IP2SR3_7_4
3412 IP2SR3_3_0))
3413 },
3414 { PINMUX_CFG_REG_VAR("IP3SR3", 0xE605886C, 32,
3415 GROUP(-8, 4, 4, 4, 4, 4, 4),
3416 GROUP(
3417 /* IP3SR3_31_24 RESERVED */
3418 IP3SR3_23_20
3419 IP3SR3_19_16
3420 IP3SR3_15_12
3421 IP3SR3_11_8
3422 IP3SR3_7_4
3423 IP3SR3_3_0))
3424 },
3425 { PINMUX_CFG_REG("IP0SR6", 0xE6061060, 32, 4, GROUP(
3426 IP0SR6_31_28
3427 IP0SR6_27_24
3428 IP0SR6_23_20
3429 IP0SR6_19_16
3430 IP0SR6_15_12
3431 IP0SR6_11_8
3432 IP0SR6_7_4
3433 IP0SR6_3_0))
3434 },
3435 { PINMUX_CFG_REG("IP1SR6", 0xE6061064, 32, 4, GROUP(
3436 IP1SR6_31_28
3437 IP1SR6_27_24
3438 IP1SR6_23_20
3439 IP1SR6_19_16
3440 IP1SR6_15_12
3441 IP1SR6_11_8
3442 IP1SR6_7_4
3443 IP1SR6_3_0))
3444 },
3445 { PINMUX_CFG_REG_VAR("IP2SR6", 0xE6061068, 32,
3446 GROUP(-12, 4, 4, 4, 4, 4),
3447 GROUP(
3448 /* IP2SR6_31_20 RESERVED */
3449 IP2SR6_19_16
3450 IP2SR6_15_12
3451 IP2SR6_11_8
3452 IP2SR6_7_4
3453 IP2SR6_3_0))
3454 },
3455 { PINMUX_CFG_REG("IP0SR7", 0xE6061860, 32, 4, GROUP(
3456 IP0SR7_31_28
3457 IP0SR7_27_24
3458 IP0SR7_23_20
3459 IP0SR7_19_16
3460 IP0SR7_15_12
3461 IP0SR7_11_8
3462 IP0SR7_7_4
3463 IP0SR7_3_0))
3464 },
3465 { PINMUX_CFG_REG("IP1SR7", 0xE6061864, 32, 4, GROUP(
3466 IP1SR7_31_28
3467 IP1SR7_27_24
3468 IP1SR7_23_20
3469 IP1SR7_19_16
3470 IP1SR7_15_12
3471 IP1SR7_11_8
3472 IP1SR7_7_4
3473 IP1SR7_3_0))
3474 },
3475 { PINMUX_CFG_REG_VAR("IP2SR7", 0xE6061868, 32,
3476 GROUP(-12, 4, 4, 4, 4, 4),
3477 GROUP(
3478 /* IP2SR7_31_20 RESERVED */
3479 IP2SR7_19_16
3480 IP2SR7_15_12
3481 IP2SR7_11_8
3482 IP2SR7_7_4
3483 IP2SR7_3_0))
3484 },
3485 { PINMUX_CFG_REG("IP0SR8", 0xE6068060, 32, 4, GROUP(
3486 IP0SR8_31_28
3487 IP0SR8_27_24
3488 IP0SR8_23_20
3489 IP0SR8_19_16
3490 IP0SR8_15_12
3491 IP0SR8_11_8
3492 IP0SR8_7_4
3493 IP0SR8_3_0))
3494 },
3495 { PINMUX_CFG_REG_VAR("IP1SR8", 0xE6068064, 32,
3496 GROUP(-8, 4, 4, 4, 4, 4, 4),
3497 GROUP(
3498 /* IP1SR8_31_24 RESERVED */
3499 IP1SR8_23_20
3500 IP1SR8_19_16
3501 IP1SR8_15_12
3502 IP1SR8_11_8
3503 IP1SR8_7_4
3504 IP1SR8_3_0))
3505 },
3506#undef F_
3507#undef FM
3508
3509#define F_(x, y) x,
3510#define FM(x) FN_##x,
3511 { PINMUX_CFG_REG_VAR("MOD_SEL4", 0xE6060100, 32,
3512 GROUP(-12, 1, 1, -2, 1, 1, -1, 1, -2, 1, 1, -2, 1,
3513 -2, 1, 1, -1),
3514 GROUP(
3515 /* RESERVED 31-20 */
3516 MOD_SEL4_19
3517 MOD_SEL4_18
3518 /* RESERVED 17-16 */
3519 MOD_SEL4_15
3520 MOD_SEL4_14
3521 /* RESERVED 13 */
3522 MOD_SEL4_12
3523 /* RESERVED 11-10 */
3524 MOD_SEL4_9
3525 MOD_SEL4_8
3526 /* RESERVED 7-6 */
3527 MOD_SEL4_5
3528 /* RESERVED 4-3 */
3529 MOD_SEL4_2
3530 MOD_SEL4_1
3531 /* RESERVED 0 */
3532 ))
3533 },
3534 { PINMUX_CFG_REG_VAR("MOD_SEL5", 0xE6060900, 32,
3535 GROUP(-12, 1, -2, 1, 1, -2, 1, 1, -2, 1, -1,
3536 1, 1, -2, 1, -1, 1),
3537 GROUP(
3538 /* RESERVED 31-20 */
3539 MOD_SEL5_19
3540 /* RESERVED 18-17 */
3541 MOD_SEL5_16
3542 MOD_SEL5_15
3543 /* RESERVED 14-13 */
3544 MOD_SEL5_12
3545 MOD_SEL5_11
3546 /* RESERVED 10-9 */
3547 MOD_SEL5_8
3548 /* RESERVED 7 */
3549 MOD_SEL5_6
3550 MOD_SEL5_5
3551 /* RESERVED 4-3 */
3552 MOD_SEL5_2
3553 /* RESERVED 1 */
3554 MOD_SEL5_0))
3555 },
3556 { PINMUX_CFG_REG_VAR("MOD_SEL6", 0xE6061100, 32,
3557 GROUP(-13, 1, -1, 1, -2, 1, 1,
3558 -1, 1, -2, 1, 1, 1, -2, 1, 1, -1),
3559 GROUP(
3560 /* RESERVED 31-19 */
3561 MOD_SEL6_18
3562 /* RESERVED 17 */
3563 MOD_SEL6_16
3564 /* RESERVED 15-14 */
3565 MOD_SEL6_13
3566 MOD_SEL6_12
3567 /* RESERVED 11 */
3568 MOD_SEL6_10
3569 /* RESERVED 9-8 */
3570 MOD_SEL6_7
3571 MOD_SEL6_6
3572 MOD_SEL6_5
3573 /* RESERVED 4-3 */
3574 MOD_SEL6_2
3575 MOD_SEL6_1
3576 /* RESERVED 0 */
3577 ))
3578 },
3579 { PINMUX_CFG_REG_VAR("MOD_SEL7", 0xE6061900, 32,
3580 GROUP(-15, 1, 1, -1, 1, -1, 1, 1, -2, 1, 1,
3581 -2, 1, 1, -1, 1),
3582 GROUP(
3583 /* RESERVED 31-17 */
3584 MOD_SEL7_16
3585 MOD_SEL7_15
3586 /* RESERVED 14 */
3587 MOD_SEL7_13
3588 /* RESERVED 12 */
3589 MOD_SEL7_11
3590 MOD_SEL7_10
3591 /* RESERVED 9-8 */
3592 MOD_SEL7_7
3593 MOD_SEL7_6
3594 /* RESERVED 5-4 */
3595 MOD_SEL7_3
3596 MOD_SEL7_2
3597 /* RESERVED 1 */
3598 MOD_SEL7_0))
3599 },
3600 { PINMUX_CFG_REG_VAR("MOD_SEL8", 0xE6068100, 32,
3601 GROUP(-20, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1),
3602 GROUP(
3603 /* RESERVED 31-12 */
3604 MOD_SEL8_11
3605 MOD_SEL8_10
3606 MOD_SEL8_9
3607 MOD_SEL8_8
3608 MOD_SEL8_7
3609 MOD_SEL8_6
3610 MOD_SEL8_5
3611 MOD_SEL8_4
3612 MOD_SEL8_3
3613 MOD_SEL8_2
3614 MOD_SEL8_1
3615 MOD_SEL8_0))
3616 },
3617 { },
3618};
3619
3620static const struct pinmux_drive_reg pinmux_drive_regs[] = {
3621 { PINMUX_DRIVE_REG("DRV0CTRL0", 0xE6050080) {
3622 { RCAR_GP_PIN(0, 7), 28, 3 }, /* MSIOF5_SS2 */
3623 { RCAR_GP_PIN(0, 6), 24, 3 }, /* IRQ0 */
3624 { RCAR_GP_PIN(0, 5), 20, 3 }, /* IRQ1 */
3625 { RCAR_GP_PIN(0, 4), 16, 3 }, /* IRQ2 */
3626 { RCAR_GP_PIN(0, 3), 12, 3 }, /* IRQ3 */
3627 { RCAR_GP_PIN(0, 2), 8, 3 }, /* GP0_02 */
3628 { RCAR_GP_PIN(0, 1), 4, 3 }, /* GP0_01 */
3629 { RCAR_GP_PIN(0, 0), 0, 3 }, /* GP0_00 */
3630 } },
3631 { PINMUX_DRIVE_REG("DRV1CTRL0", 0xE6050084) {
3632 { RCAR_GP_PIN(0, 15), 28, 3 }, /* MSIOF2_SYNC */
3633 { RCAR_GP_PIN(0, 14), 24, 3 }, /* MSIOF2_SS1 */
3634 { RCAR_GP_PIN(0, 13), 20, 3 }, /* MSIOF2_SS2 */
3635 { RCAR_GP_PIN(0, 12), 16, 3 }, /* MSIOF5_RXD */
3636 { RCAR_GP_PIN(0, 11), 12, 3 }, /* MSIOF5_SCK */
3637 { RCAR_GP_PIN(0, 10), 8, 3 }, /* MSIOF5_TXD */
3638 { RCAR_GP_PIN(0, 9), 4, 3 }, /* MSIOF5_SYNC */
3639 { RCAR_GP_PIN(0, 8), 0, 3 }, /* MSIOF5_SS1 */
3640 } },
3641 { PINMUX_DRIVE_REG("DRV2CTRL0", 0xE6050088) {
3642 { RCAR_GP_PIN(0, 18), 8, 3 }, /* MSIOF2_RXD */
3643 { RCAR_GP_PIN(0, 17), 4, 3 }, /* MSIOF2_SCK */
3644 { RCAR_GP_PIN(0, 16), 0, 3 }, /* MSIOF2_TXD */
3645 } },
3646 { PINMUX_DRIVE_REG("DRV0CTRL1", 0xE6050880) {
3647 { RCAR_GP_PIN(1, 7), 28, 3 }, /* MSIOF0_SS1 */
3648 { RCAR_GP_PIN(1, 6), 24, 3 }, /* MSIOF0_SS2 */
3649 { RCAR_GP_PIN(1, 5), 20, 3 }, /* MSIOF1_RXD */
3650 { RCAR_GP_PIN(1, 4), 16, 3 }, /* MSIOF1_TXD */
3651 { RCAR_GP_PIN(1, 3), 12, 3 }, /* MSIOF1_SCK */
3652 { RCAR_GP_PIN(1, 2), 8, 3 }, /* MSIOF1_SYNC */
3653 { RCAR_GP_PIN(1, 1), 4, 3 }, /* MSIOF1_SS1 */
3654 { RCAR_GP_PIN(1, 0), 0, 3 }, /* MSIOF1_SS2 */
3655 } },
3656 { PINMUX_DRIVE_REG("DRV1CTRL1", 0xE6050884) {
3657 { RCAR_GP_PIN(1, 15), 28, 3 }, /* HSCK0 */
3658 { RCAR_GP_PIN(1, 14), 24, 3 }, /* HRTS0_N */
3659 { RCAR_GP_PIN(1, 13), 20, 3 }, /* HCTS0_N */
3660 { RCAR_GP_PIN(1, 12), 16, 3 }, /* HTX0 */
3661 { RCAR_GP_PIN(1, 11), 12, 3 }, /* MSIOF0_RXD */
3662 { RCAR_GP_PIN(1, 10), 8, 3 }, /* MSIOF0_SCK */
3663 { RCAR_GP_PIN(1, 9), 4, 3 }, /* MSIOF0_TXD */
3664 { RCAR_GP_PIN(1, 8), 0, 3 }, /* MSIOF0_SYNC */
3665 } },
3666 { PINMUX_DRIVE_REG("DRV2CTRL1", 0xE6050888) {
3667 { RCAR_GP_PIN(1, 23), 28, 3 }, /* GP1_23 */
3668 { RCAR_GP_PIN(1, 22), 24, 3 }, /* AUDIO_CLKIN */
3669 { RCAR_GP_PIN(1, 21), 20, 3 }, /* AUDIO_CLKOUT */
3670 { RCAR_GP_PIN(1, 20), 16, 3 }, /* SSI_SD */
3671 { RCAR_GP_PIN(1, 19), 12, 3 }, /* SSI_WS */
3672 { RCAR_GP_PIN(1, 18), 8, 3 }, /* SSI_SCK */
3673 { RCAR_GP_PIN(1, 17), 4, 3 }, /* SCIF_CLK */
3674 { RCAR_GP_PIN(1, 16), 0, 3 }, /* HRX0 */
3675 } },
3676 { PINMUX_DRIVE_REG("DRV3CTRL1", 0xE605088C) {
3677 { RCAR_GP_PIN(1, 28), 16, 3 }, /* HTX3 */
3678 { RCAR_GP_PIN(1, 27), 12, 3 }, /* HCTS3_N */
3679 { RCAR_GP_PIN(1, 26), 8, 3 }, /* HRTS3_N */
3680 { RCAR_GP_PIN(1, 25), 4, 3 }, /* HSCK3 */
3681 { RCAR_GP_PIN(1, 24), 0, 3 }, /* HRX3 */
3682 } },
3683 { PINMUX_DRIVE_REG("DRV0CTRL2", 0xE6058080) {
3684 { RCAR_GP_PIN(2, 7), 28, 3 }, /* TPU0TO1 */
3685 { RCAR_GP_PIN(2, 6), 24, 3 }, /* FXR_TXDB */
3686 { RCAR_GP_PIN(2, 5), 20, 3 }, /* FXR_TXENB_N */
3687 { RCAR_GP_PIN(2, 4), 16, 3 }, /* RXDB_EXTFXR */
3688 { RCAR_GP_PIN(2, 3), 12, 3 }, /* CLK_EXTFXR */
3689 { RCAR_GP_PIN(2, 2), 8, 3 }, /* RXDA_EXTFXR */
3690 { RCAR_GP_PIN(2, 1), 4, 3 }, /* FXR_TXENA_N */
3691 { RCAR_GP_PIN(2, 0), 0, 3 }, /* FXR_TXDA */
3692 } },
3693 { PINMUX_DRIVE_REG("DRV1CTRL2", 0xE6058084) {
3694 { RCAR_GP_PIN(2, 15), 28, 3 }, /* CANFD3_RX */
3695 { RCAR_GP_PIN(2, 14), 24, 3 }, /* CANFD3_TX */
3696 { RCAR_GP_PIN(2, 13), 20, 3 }, /* CANFD2_RX */
3697 { RCAR_GP_PIN(2, 12), 16, 3 }, /* CANFD2_TX */
3698 { RCAR_GP_PIN(2, 11), 12, 3 }, /* CANFD0_RX */
3699 { RCAR_GP_PIN(2, 10), 8, 3 }, /* CANFD0_TX */
3700 { RCAR_GP_PIN(2, 9), 4, 3 }, /* CAN_CLK */
3701 { RCAR_GP_PIN(2, 8), 0, 3 }, /* TPU0TO0 */
3702 } },
3703 { PINMUX_DRIVE_REG("DRV2CTRL2", 0xE6058088) {
3704 { RCAR_GP_PIN(2, 19), 12, 3 }, /* CANFD7_RX */
3705 { RCAR_GP_PIN(2, 18), 8, 3 }, /* CANFD7_TX */
3706 { RCAR_GP_PIN(2, 17), 4, 3 }, /* CANFD4_RX */
3707 { RCAR_GP_PIN(2, 16), 0, 3 }, /* CANFD4_TX */
3708 } },
3709 { PINMUX_DRIVE_REG("DRV0CTRL3", 0xE6058880) {
3710 { RCAR_GP_PIN(3, 7), 28, 3 }, /* MMC_D4 */
3711 { RCAR_GP_PIN(3, 6), 24, 3 }, /* MMC_D5 */
3712 { RCAR_GP_PIN(3, 5), 20, 3 }, /* MMC_SD_D3 */
3713 { RCAR_GP_PIN(3, 4), 16, 3 }, /* MMC_DS */
3714 { RCAR_GP_PIN(3, 3), 12, 3 }, /* MMC_SD_CLK */
3715 { RCAR_GP_PIN(3, 2), 8, 3 }, /* MMC_SD_D2 */
3716 { RCAR_GP_PIN(3, 1), 4, 3 }, /* MMC_SD_D0 */
3717 { RCAR_GP_PIN(3, 0), 0, 3 }, /* MMC_SD_D1 */
3718 } },
3719 { PINMUX_DRIVE_REG("DRV1CTRL3", 0xE6058884) {
3720 { RCAR_GP_PIN(3, 15), 28, 2 }, /* QSPI0_SSL */
3721 { RCAR_GP_PIN(3, 14), 24, 2 }, /* IPC_CLKOUT */
3722 { RCAR_GP_PIN(3, 13), 20, 2 }, /* IPC_CLKIN */
3723 { RCAR_GP_PIN(3, 12), 16, 3 }, /* SD_WP */
3724 { RCAR_GP_PIN(3, 11), 12, 3 }, /* SD_CD */
3725 { RCAR_GP_PIN(3, 10), 8, 3 }, /* MMC_SD_CMD */
3726 { RCAR_GP_PIN(3, 9), 4, 3 }, /* MMC_D6*/
3727 { RCAR_GP_PIN(3, 8), 0, 3 }, /* MMC_D7 */
3728 } },
3729 { PINMUX_DRIVE_REG("DRV2CTRL3", 0xE6058888) {
3730 { RCAR_GP_PIN(3, 23), 28, 2 }, /* QSPI1_MISO_IO1 */
3731 { RCAR_GP_PIN(3, 22), 24, 2 }, /* QSPI1_SPCLK */
3732 { RCAR_GP_PIN(3, 21), 20, 2 }, /* QSPI1_MOSI_IO0 */
3733 { RCAR_GP_PIN(3, 20), 16, 2 }, /* QSPI0_SPCLK */
3734 { RCAR_GP_PIN(3, 19), 12, 2 }, /* QSPI0_MOSI_IO0 */
3735 { RCAR_GP_PIN(3, 18), 8, 2 }, /* QSPI0_MISO_IO1 */
3736 { RCAR_GP_PIN(3, 17), 4, 2 }, /* QSPI0_IO2 */
3737 { RCAR_GP_PIN(3, 16), 0, 2 }, /* QSPI0_IO3 */
3738 } },
3739 { PINMUX_DRIVE_REG("DRV3CTRL3", 0xE605888C) {
3740 { RCAR_GP_PIN(3, 29), 20, 2 }, /* RPC_INT_N */
3741 { RCAR_GP_PIN(3, 28), 16, 2 }, /* RPC_WP_N */
3742 { RCAR_GP_PIN(3, 27), 12, 2 }, /* RPC_RESET_N */
3743 { RCAR_GP_PIN(3, 26), 8, 2 }, /* QSPI1_IO3 */
3744 { RCAR_GP_PIN(3, 25), 4, 2 }, /* QSPI1_SSL */
3745 { RCAR_GP_PIN(3, 24), 0, 2 }, /* QSPI1_IO2 */
3746 } },
3747 { PINMUX_DRIVE_REG("DRV0CTRL4", 0xE6060080) {
3748 { RCAR_GP_PIN(4, 7), 28, 3 }, /* TSN0_RX_CTL */
3749 { RCAR_GP_PIN(4, 6), 24, 3 }, /* TSN0_AVTP_CAPTURE */
3750 { RCAR_GP_PIN(4, 5), 20, 3 }, /* TSN0_AVTP_MATCH */
3751 { RCAR_GP_PIN(4, 4), 16, 3 }, /* TSN0_LINK */
3752 { RCAR_GP_PIN(4, 3), 12, 3 }, /* TSN0_PHY_INT */
3753 { RCAR_GP_PIN(4, 2), 8, 3 }, /* TSN0_AVTP_PPS1 */
3754 { RCAR_GP_PIN(4, 1), 4, 3 }, /* TSN0_MDC */
3755 { RCAR_GP_PIN(4, 0), 0, 3 }, /* TSN0_MDIO */
3756 } },
3757 { PINMUX_DRIVE_REG("DRV1CTRL4", 0xE6060084) {
3758 { RCAR_GP_PIN(4, 15), 28, 3 }, /* TSN0_TD0 */
3759 { RCAR_GP_PIN(4, 14), 24, 3 }, /* TSN0_TD1 */
3760 { RCAR_GP_PIN(4, 13), 20, 3 }, /* TSN0_RD1 */
3761 { RCAR_GP_PIN(4, 12), 16, 3 }, /* TSN0_TXC */
3762 { RCAR_GP_PIN(4, 11), 12, 3 }, /* TSN0_RXC */
3763 { RCAR_GP_PIN(4, 10), 8, 3 }, /* TSN0_RD0 */
3764 { RCAR_GP_PIN(4, 9), 4, 3 }, /* TSN0_TX_CTL */
3765 { RCAR_GP_PIN(4, 8), 0, 3 }, /* TSN0_AVTP_PPS0 */
3766 } },
3767 { PINMUX_DRIVE_REG("DRV2CTRL4", 0xE6060088) {
3768 { RCAR_GP_PIN(4, 23), 28, 3 }, /* AVS0 */
3769 { RCAR_GP_PIN(4, 22), 24, 3 }, /* PCIE1_CLKREQ_N */
3770 { RCAR_GP_PIN(4, 21), 20, 3 }, /* PCIE0_CLKREQ_N */
3771 { RCAR_GP_PIN(4, 20), 16, 3 }, /* TSN0_TXCREFCLK */
3772 { RCAR_GP_PIN(4, 19), 12, 3 }, /* TSN0_TD2 */
3773 { RCAR_GP_PIN(4, 18), 8, 3 }, /* TSN0_TD3 */
3774 { RCAR_GP_PIN(4, 17), 4, 3 }, /* TSN0_RD2 */
3775 { RCAR_GP_PIN(4, 16), 0, 3 }, /* TSN0_RD3 */
3776 } },
3777 { PINMUX_DRIVE_REG("DRV3CTRL4", 0xE606008C) {
3778 { RCAR_GP_PIN(4, 24), 0, 3 }, /* AVS1 */
3779 } },
3780 { PINMUX_DRIVE_REG("DRV0CTRL5", 0xE6060880) {
3781 { RCAR_GP_PIN(5, 7), 28, 3 }, /* AVB2_TXCREFCLK */
3782 { RCAR_GP_PIN(5, 6), 24, 3 }, /* AVB2_MDC */
3783 { RCAR_GP_PIN(5, 5), 20, 3 }, /* AVB2_MAGIC */
3784 { RCAR_GP_PIN(5, 4), 16, 3 }, /* AVB2_PHY_INT */
3785 { RCAR_GP_PIN(5, 3), 12, 3 }, /* AVB2_LINK */
3786 { RCAR_GP_PIN(5, 2), 8, 3 }, /* AVB2_AVTP_MATCH */
3787 { RCAR_GP_PIN(5, 1), 4, 3 }, /* AVB2_AVTP_CAPTURE */
3788 { RCAR_GP_PIN(5, 0), 0, 3 }, /* AVB2_AVTP_PPS */
3789 } },
3790 { PINMUX_DRIVE_REG("DRV1CTRL5", 0xE6060884) {
3791 { RCAR_GP_PIN(5, 15), 28, 3 }, /* AVB2_TD0 */
3792 { RCAR_GP_PIN(5, 14), 24, 3 }, /* AVB2_RD1 */
3793 { RCAR_GP_PIN(5, 13), 20, 3 }, /* AVB2_RD2 */
3794 { RCAR_GP_PIN(5, 12), 16, 3 }, /* AVB2_TD1 */
3795 { RCAR_GP_PIN(5, 11), 12, 3 }, /* AVB2_TD2 */
3796 { RCAR_GP_PIN(5, 10), 8, 3 }, /* AVB2_MDIO */
3797 { RCAR_GP_PIN(5, 9), 4, 3 }, /* AVB2_RD3 */
3798 { RCAR_GP_PIN(5, 8), 0, 3 }, /* AVB2_TD3 */
3799 } },
3800 { PINMUX_DRIVE_REG("DRV2CTRL5", 0xE6060888) {
3801 { RCAR_GP_PIN(5, 20), 16, 3 }, /* AVB2_RX_CTL */
3802 { RCAR_GP_PIN(5, 19), 12, 3 }, /* AVB2_TX_CTL */
3803 { RCAR_GP_PIN(5, 18), 8, 3 }, /* AVB2_RXC */
3804 { RCAR_GP_PIN(5, 17), 4, 3 }, /* AVB2_RD0 */
3805 { RCAR_GP_PIN(5, 16), 0, 3 }, /* AVB2_TXC */
3806 } },
3807 { PINMUX_DRIVE_REG("DRV0CTRL6", 0xE6061080) {
3808 { RCAR_GP_PIN(6, 7), 28, 3 }, /* AVB1_TX_CTL */
3809 { RCAR_GP_PIN(6, 6), 24, 3 }, /* AVB1_TXC */
3810 { RCAR_GP_PIN(6, 5), 20, 3 }, /* AVB1_AVTP_MATCH */
3811 { RCAR_GP_PIN(6, 4), 16, 3 }, /* AVB1_LINK */
3812 { RCAR_GP_PIN(6, 3), 12, 3 }, /* AVB1_PHY_INT */
3813 { RCAR_GP_PIN(6, 2), 8, 3 }, /* AVB1_MDC */
3814 { RCAR_GP_PIN(6, 1), 4, 3 }, /* AVB1_MAGIC */
3815 { RCAR_GP_PIN(6, 0), 0, 3 }, /* AVB1_MDIO */
3816 } },
3817 { PINMUX_DRIVE_REG("DRV1CTRL6", 0xE6061084) {
3818 { RCAR_GP_PIN(6, 15), 28, 3 }, /* AVB1_RD0 */
3819 { RCAR_GP_PIN(6, 14), 24, 3 }, /* AVB1_RD1 */
3820 { RCAR_GP_PIN(6, 13), 20, 3 }, /* AVB1_TD0 */
3821 { RCAR_GP_PIN(6, 12), 16, 3 }, /* AVB1_TD1 */
3822 { RCAR_GP_PIN(6, 11), 12, 3 }, /* AVB1_AVTP_CAPTURE */
3823 { RCAR_GP_PIN(6, 10), 8, 3 }, /* AVB1_AVTP_PPS */
3824 { RCAR_GP_PIN(6, 9), 4, 3 }, /* AVB1_RX_CTL */
3825 { RCAR_GP_PIN(6, 8), 0, 3 }, /* AVB1_RXC */
3826 } },
3827 { PINMUX_DRIVE_REG("DRV2CTRL6", 0xE6061088) {
3828 { RCAR_GP_PIN(6, 20), 16, 3 }, /* AVB1_TXCREFCLK */
3829 { RCAR_GP_PIN(6, 19), 12, 3 }, /* AVB1_RD3 */
3830 { RCAR_GP_PIN(6, 18), 8, 3 }, /* AVB1_TD3 */
3831 { RCAR_GP_PIN(6, 17), 4, 3 }, /* AVB1_RD2 */
3832 { RCAR_GP_PIN(6, 16), 0, 3 }, /* AVB1_TD2 */
3833 } },
3834 { PINMUX_DRIVE_REG("DRV0CTRL7", 0xE6061880) {
3835 { RCAR_GP_PIN(7, 7), 28, 3 }, /* AVB0_TD1 */
3836 { RCAR_GP_PIN(7, 6), 24, 3 }, /* AVB0_TD2 */
3837 { RCAR_GP_PIN(7, 5), 20, 3 }, /* AVB0_PHY_INT */
3838 { RCAR_GP_PIN(7, 4), 16, 3 }, /* AVB0_LINK */
3839 { RCAR_GP_PIN(7, 3), 12, 3 }, /* AVB0_TD3 */
3840 { RCAR_GP_PIN(7, 2), 8, 3 }, /* AVB0_AVTP_MATCH */
3841 { RCAR_GP_PIN(7, 1), 4, 3 }, /* AVB0_AVTP_CAPTURE */
3842 { RCAR_GP_PIN(7, 0), 0, 3 }, /* AVB0_AVTP_PPS */
3843 } },
3844 { PINMUX_DRIVE_REG("DRV1CTRL7", 0xE6061884) {
3845 { RCAR_GP_PIN(7, 15), 28, 3 }, /* AVB0_TXC */
3846 { RCAR_GP_PIN(7, 14), 24, 3 }, /* AVB0_MDIO */
3847 { RCAR_GP_PIN(7, 13), 20, 3 }, /* AVB0_MDC */
3848 { RCAR_GP_PIN(7, 12), 16, 3 }, /* AVB0_RD2 */
3849 { RCAR_GP_PIN(7, 11), 12, 3 }, /* AVB0_TD0 */
3850 { RCAR_GP_PIN(7, 10), 8, 3 }, /* AVB0_MAGIC */
3851 { RCAR_GP_PIN(7, 9), 4, 3 }, /* AVB0_TXCREFCLK */
3852 { RCAR_GP_PIN(7, 8), 0, 3 }, /* AVB0_RD3 */
3853 } },
3854 { PINMUX_DRIVE_REG("DRV2CTRL7", 0xE6061888) {
3855 { RCAR_GP_PIN(7, 20), 16, 3 }, /* AVB0_RX_CTL */
3856 { RCAR_GP_PIN(7, 19), 12, 3 }, /* AVB0_RXC */
3857 { RCAR_GP_PIN(7, 18), 8, 3 }, /* AVB0_RD0 */
3858 { RCAR_GP_PIN(7, 17), 4, 3 }, /* AVB0_RD1 */
3859 { RCAR_GP_PIN(7, 16), 0, 3 }, /* AVB0_TX_CTL */
3860 } },
3861 { PINMUX_DRIVE_REG("DRV0CTRL8", 0xE6068080) {
3862 { RCAR_GP_PIN(8, 7), 28, 3 }, /* SDA3 */
3863 { RCAR_GP_PIN(8, 6), 24, 3 }, /* SCL3 */
3864 { RCAR_GP_PIN(8, 5), 20, 3 }, /* SDA2 */
3865 { RCAR_GP_PIN(8, 4), 16, 3 }, /* SCL2 */
3866 { RCAR_GP_PIN(8, 3), 12, 3 }, /* SDA1 */
3867 { RCAR_GP_PIN(8, 2), 8, 3 }, /* SCL1 */
3868 { RCAR_GP_PIN(8, 1), 4, 3 }, /* SDA0 */
3869 { RCAR_GP_PIN(8, 0), 0, 3 }, /* SCL0 */
3870 } },
3871 { PINMUX_DRIVE_REG("DRV1CTRL8", 0xE6068084) {
3872 { RCAR_GP_PIN(8, 13), 20, 3 }, /* GP8_13 */
3873 { RCAR_GP_PIN(8, 12), 16, 3 }, /* GP8_12 */
3874 { RCAR_GP_PIN(8, 11), 12, 3 }, /* SDA5 */
3875 { RCAR_GP_PIN(8, 10), 8, 3 }, /* SCL5 */
3876 { RCAR_GP_PIN(8, 9), 4, 3 }, /* SDA4 */
3877 { RCAR_GP_PIN(8, 8), 0, 3 }, /* SCL4 */
3878 } },
3879 { },
3880};
3881
3882enum ioctrl_regs {
3883 POC0,
3884 POC1,
3885 POC3,
3886 POC4,
3887 POC5,
3888 POC6,
3889 POC7,
3890 POC8,
3891};
3892
3893static const struct pinmux_ioctrl_reg pinmux_ioctrl_regs[] = {
3894 [POC0] = { 0xE60500A0, },
3895 [POC1] = { 0xE60508A0, },
3896 [POC3] = { 0xE60588A0, },
3897 [POC4] = { 0xE60600A0, },
3898 [POC5] = { 0xE60608A0, },
3899 [POC6] = { 0xE60610A0, },
3900 [POC7] = { 0xE60618A0, },
3901 [POC8] = { 0xE60680A0, },
3902 { /* sentinel */ },
3903};
3904
3905static int r8a779g0_pin_to_pocctrl(unsigned int pin, u32 *pocctrl)
3906{
3907 int bit = pin & 0x1f;
3908
3909 *pocctrl = pinmux_ioctrl_regs[POC0].reg;
3910 if (pin >= RCAR_GP_PIN(0, 0) && pin <= RCAR_GP_PIN(0, 18))
3911 return bit;
3912
3913 *pocctrl = pinmux_ioctrl_regs[POC1].reg;
3914 if (pin >= RCAR_GP_PIN(1, 0) && pin <= RCAR_GP_PIN(1, 22))
3915 return bit;
3916
3917 *pocctrl = pinmux_ioctrl_regs[POC3].reg;
3918 if (pin >= RCAR_GP_PIN(3, 0) && pin <= RCAR_GP_PIN(3, 12))
3919 return bit;
3920
3921 *pocctrl = pinmux_ioctrl_regs[POC8].reg;
3922 if (pin >= RCAR_GP_PIN(8, 0) && pin <= RCAR_GP_PIN(8, 13))
3923 return bit;
3924
3925 return -EINVAL;
3926}
3927
3928static const struct pinmux_bias_reg pinmux_bias_regs[] = {
3929 { PINMUX_BIAS_REG("PUEN0", 0xE60500C0, "PUD0", 0xE60500E0) {
3930 [ 0] = RCAR_GP_PIN(0, 0), /* GP0_00 */
3931 [ 1] = RCAR_GP_PIN(0, 1), /* GP0_01 */
3932 [ 2] = RCAR_GP_PIN(0, 2), /* GP0_02 */
3933 [ 3] = RCAR_GP_PIN(0, 3), /* IRQ3 */
3934 [ 4] = RCAR_GP_PIN(0, 4), /* IRQ2 */
3935 [ 5] = RCAR_GP_PIN(0, 5), /* IRQ1 */
3936 [ 6] = RCAR_GP_PIN(0, 6), /* IRQ0 */
3937 [ 7] = RCAR_GP_PIN(0, 7), /* MSIOF5_SS2 */
3938 [ 8] = RCAR_GP_PIN(0, 8), /* MSIOF5_SS1 */
3939 [ 9] = RCAR_GP_PIN(0, 9), /* MSIOF5_SYNC */
3940 [10] = RCAR_GP_PIN(0, 10), /* MSIOF5_TXD */
3941 [11] = RCAR_GP_PIN(0, 11), /* MSIOF5_SCK */
3942 [12] = RCAR_GP_PIN(0, 12), /* MSIOF5_RXD */
3943 [13] = RCAR_GP_PIN(0, 13), /* MSIOF2_SS2 */
3944 [14] = RCAR_GP_PIN(0, 14), /* MSIOF2_SS1 */
3945 [15] = RCAR_GP_PIN(0, 15), /* MSIOF2_SYNC */
3946 [16] = RCAR_GP_PIN(0, 16), /* MSIOF2_TXD */
3947 [17] = RCAR_GP_PIN(0, 17), /* MSIOF2_SCK */
3948 [18] = RCAR_GP_PIN(0, 18), /* MSIOF2_RXD */
3949 [19] = SH_PFC_PIN_NONE,
3950 [20] = SH_PFC_PIN_NONE,
3951 [21] = SH_PFC_PIN_NONE,
3952 [22] = SH_PFC_PIN_NONE,
3953 [23] = SH_PFC_PIN_NONE,
3954 [24] = SH_PFC_PIN_NONE,
3955 [25] = SH_PFC_PIN_NONE,
3956 [26] = SH_PFC_PIN_NONE,
3957 [27] = SH_PFC_PIN_NONE,
3958 [28] = SH_PFC_PIN_NONE,
3959 [29] = SH_PFC_PIN_NONE,
3960 [30] = SH_PFC_PIN_NONE,
3961 [31] = SH_PFC_PIN_NONE,
3962 } },
3963 { PINMUX_BIAS_REG("PUEN1", 0xE60508C0, "PUD1", 0xE60508E0) {
3964 [ 0] = RCAR_GP_PIN(1, 0), /* MSIOF1_SS2 */
3965 [ 1] = RCAR_GP_PIN(1, 1), /* MSIOF1_SS1 */
3966 [ 2] = RCAR_GP_PIN(1, 2), /* MSIOF1_SYNC */
3967 [ 3] = RCAR_GP_PIN(1, 3), /* MSIOF1_SCK */
3968 [ 4] = RCAR_GP_PIN(1, 4), /* MSIOF1_TXD */
3969 [ 5] = RCAR_GP_PIN(1, 5), /* MSIOF1_RXD */
3970 [ 6] = RCAR_GP_PIN(1, 6), /* MSIOF0_SS2 */
3971 [ 7] = RCAR_GP_PIN(1, 7), /* MSIOF0_SS1 */
3972 [ 8] = RCAR_GP_PIN(1, 8), /* MSIOF0_SYNC */
3973 [ 9] = RCAR_GP_PIN(1, 9), /* MSIOF0_TXD */
3974 [10] = RCAR_GP_PIN(1, 10), /* MSIOF0_SCK */
3975 [11] = RCAR_GP_PIN(1, 11), /* MSIOF0_RXD */
3976 [12] = RCAR_GP_PIN(1, 12), /* HTX0 */
3977 [13] = RCAR_GP_PIN(1, 13), /* HCTS0_N */
3978 [14] = RCAR_GP_PIN(1, 14), /* HRTS0_N */
3979 [15] = RCAR_GP_PIN(1, 15), /* HSCK0 */
3980 [16] = RCAR_GP_PIN(1, 16), /* HRX0 */
3981 [17] = RCAR_GP_PIN(1, 17), /* SCIF_CLK */
3982 [18] = RCAR_GP_PIN(1, 18), /* SSI_SCK */
3983 [19] = RCAR_GP_PIN(1, 19), /* SSI_WS */
3984 [20] = RCAR_GP_PIN(1, 20), /* SSI_SD */
3985 [21] = RCAR_GP_PIN(1, 21), /* AUDIO_CLKOUT */
3986 [22] = RCAR_GP_PIN(1, 22), /* AUDIO_CLKIN */
3987 [23] = RCAR_GP_PIN(1, 23), /* GP1_23 */
3988 [24] = RCAR_GP_PIN(1, 24), /* HRX3 */
3989 [25] = RCAR_GP_PIN(1, 25), /* HSCK3 */
3990 [26] = RCAR_GP_PIN(1, 26), /* HRTS3_N */
3991 [27] = RCAR_GP_PIN(1, 27), /* HCTS3_N */
3992 [28] = RCAR_GP_PIN(1, 28), /* HTX3 */
3993 [29] = SH_PFC_PIN_NONE,
3994 [30] = SH_PFC_PIN_NONE,
3995 [31] = SH_PFC_PIN_NONE,
3996 } },
3997 { PINMUX_BIAS_REG("PUEN2", 0xE60580C0, "PUD2", 0xE60580E0) {
3998 [ 0] = RCAR_GP_PIN(2, 0), /* FXR_TXDA */
3999 [ 1] = RCAR_GP_PIN(2, 1), /* FXR_TXENA_N */
4000 [ 2] = RCAR_GP_PIN(2, 2), /* RXDA_EXTFXR */
4001 [ 3] = RCAR_GP_PIN(2, 3), /* CLK_EXTFXR */
4002 [ 4] = RCAR_GP_PIN(2, 4), /* RXDB_EXTFXR */
4003 [ 5] = RCAR_GP_PIN(2, 5), /* FXR_TXENB_N */
4004 [ 6] = RCAR_GP_PIN(2, 6), /* FXR_TXDB */
4005 [ 7] = RCAR_GP_PIN(2, 7), /* TPU0TO1 */
4006 [ 8] = RCAR_GP_PIN(2, 8), /* TPU0TO0 */
4007 [ 9] = RCAR_GP_PIN(2, 9), /* CAN_CLK */
4008 [10] = RCAR_GP_PIN(2, 10), /* CANFD0_TX */
4009 [11] = RCAR_GP_PIN(2, 11), /* CANFD0_RX */
4010 [12] = RCAR_GP_PIN(2, 12), /* CANFD2_TX */
4011 [13] = RCAR_GP_PIN(2, 13), /* CANFD2_RX */
4012 [14] = RCAR_GP_PIN(2, 14), /* CANFD3_TX */
4013 [15] = RCAR_GP_PIN(2, 15), /* CANFD3_RX */
4014 [16] = RCAR_GP_PIN(2, 16), /* CANFD4_TX */
4015 [17] = RCAR_GP_PIN(2, 17), /* CANFD4_RX */
4016 [18] = RCAR_GP_PIN(2, 18), /* CANFD7_TX */
4017 [19] = RCAR_GP_PIN(2, 19), /* CANFD7_RX */
4018 [20] = SH_PFC_PIN_NONE,
4019 [21] = SH_PFC_PIN_NONE,
4020 [22] = SH_PFC_PIN_NONE,
4021 [23] = SH_PFC_PIN_NONE,
4022 [24] = SH_PFC_PIN_NONE,
4023 [25] = SH_PFC_PIN_NONE,
4024 [26] = SH_PFC_PIN_NONE,
4025 [27] = SH_PFC_PIN_NONE,
4026 [28] = SH_PFC_PIN_NONE,
4027 [29] = SH_PFC_PIN_NONE,
4028 [30] = SH_PFC_PIN_NONE,
4029 [31] = SH_PFC_PIN_NONE,
4030 } },
4031 { PINMUX_BIAS_REG("PUEN3", 0xE60588C0, "PUD3", 0xE60588E0) {
4032 [ 0] = RCAR_GP_PIN(3, 0), /* MMC_SD_D1 */
4033 [ 1] = RCAR_GP_PIN(3, 1), /* MMC_SD_D0 */
4034 [ 2] = RCAR_GP_PIN(3, 2), /* MMC_SD_D2 */
4035 [ 3] = RCAR_GP_PIN(3, 3), /* MMC_SD_CLK */
4036 [ 4] = RCAR_GP_PIN(3, 4), /* MMC_DS */
4037 [ 5] = RCAR_GP_PIN(3, 5), /* MMC_SD_D3 */
4038 [ 6] = RCAR_GP_PIN(3, 6), /* MMC_D5 */
4039 [ 7] = RCAR_GP_PIN(3, 7), /* MMC_D4 */
4040 [ 8] = RCAR_GP_PIN(3, 8), /* MMC_D7 */
4041 [ 9] = RCAR_GP_PIN(3, 9), /* MMC_D6 */
4042 [10] = RCAR_GP_PIN(3, 10), /* MMC_SD_CMD */
4043 [11] = RCAR_GP_PIN(3, 11), /* SD_CD */
4044 [12] = RCAR_GP_PIN(3, 12), /* SD_WP */
4045 [13] = RCAR_GP_PIN(3, 13), /* IPC_CLKIN */
4046 [14] = RCAR_GP_PIN(3, 14), /* IPC_CLKOUT */
4047 [15] = RCAR_GP_PIN(3, 15), /* QSPI0_SSL */
4048 [16] = RCAR_GP_PIN(3, 16), /* QSPI0_IO3 */
4049 [17] = RCAR_GP_PIN(3, 17), /* QSPI0_IO2 */
4050 [18] = RCAR_GP_PIN(3, 18), /* QSPI0_MISO_IO1 */
4051 [19] = RCAR_GP_PIN(3, 19), /* QSPI0_MOSI_IO0 */
4052 [20] = RCAR_GP_PIN(3, 20), /* QSPI0_SPCLK */
4053 [21] = RCAR_GP_PIN(3, 21), /* QSPI1_MOSI_IO0 */
4054 [22] = RCAR_GP_PIN(3, 22), /* QSPI1_SPCLK */
4055 [23] = RCAR_GP_PIN(3, 23), /* QSPI1_MISO_IO1 */
4056 [24] = RCAR_GP_PIN(3, 24), /* QSPI1_IO2 */
4057 [25] = RCAR_GP_PIN(3, 25), /* QSPI1_SSL */
4058 [26] = RCAR_GP_PIN(3, 26), /* QSPI1_IO3 */
4059 [27] = RCAR_GP_PIN(3, 27), /* RPC_RESET_N */
4060 [28] = RCAR_GP_PIN(3, 28), /* RPC_WP_N */
4061 [29] = RCAR_GP_PIN(3, 29), /* RPC_INT_N */
4062 [30] = SH_PFC_PIN_NONE,
4063 [31] = SH_PFC_PIN_NONE,
4064 } },
4065 { PINMUX_BIAS_REG("PUEN4", 0xE60600C0, "PUD4", 0xE60600E0) {
4066 [ 0] = RCAR_GP_PIN(4, 0), /* TSN0_MDIO */
4067 [ 1] = RCAR_GP_PIN(4, 1), /* TSN0_MDC */
4068 [ 2] = RCAR_GP_PIN(4, 2), /* TSN0_AVTP_PPS1 */
4069 [ 3] = RCAR_GP_PIN(4, 3), /* TSN0_PHY_INT */
4070 [ 4] = RCAR_GP_PIN(4, 4), /* TSN0_LINK */
4071 [ 5] = RCAR_GP_PIN(4, 5), /* TSN0_AVTP_MATCH */
4072 [ 6] = RCAR_GP_PIN(4, 6), /* TSN0_AVTP_CAPTURE */
4073 [ 7] = RCAR_GP_PIN(4, 7), /* TSN0_RX_CTL */
4074 [ 8] = RCAR_GP_PIN(4, 8), /* TSN0_AVTP_PPS0 */
4075 [ 9] = RCAR_GP_PIN(4, 9), /* TSN0_TX_CTL */
4076 [10] = RCAR_GP_PIN(4, 10), /* TSN0_RD0 */
4077 [11] = RCAR_GP_PIN(4, 11), /* TSN0_RXC */
4078 [12] = RCAR_GP_PIN(4, 12), /* TSN0_TXC */
4079 [13] = RCAR_GP_PIN(4, 13), /* TSN0_RD1 */
4080 [14] = RCAR_GP_PIN(4, 14), /* TSN0_TD1 */
4081 [15] = RCAR_GP_PIN(4, 15), /* TSN0_TD0 */
4082 [16] = RCAR_GP_PIN(4, 16), /* TSN0_RD3 */
4083 [17] = RCAR_GP_PIN(4, 17), /* TSN0_RD2 */
4084 [18] = RCAR_GP_PIN(4, 18), /* TSN0_TD3 */
4085 [19] = RCAR_GP_PIN(4, 19), /* TSN0_TD2 */
4086 [20] = RCAR_GP_PIN(4, 20), /* TSN0_TXCREFCLK */
4087 [21] = RCAR_GP_PIN(4, 21), /* PCIE0_CLKREQ_N */
4088 [22] = RCAR_GP_PIN(4, 22), /* PCIE1_CLKREQ_N */
4089 [23] = RCAR_GP_PIN(4, 23), /* AVS0 */
4090 [24] = RCAR_GP_PIN(4, 24), /* AVS1 */
4091 [25] = SH_PFC_PIN_NONE,
4092 [26] = SH_PFC_PIN_NONE,
4093 [27] = SH_PFC_PIN_NONE,
4094 [28] = SH_PFC_PIN_NONE,
4095 [29] = SH_PFC_PIN_NONE,
4096 [30] = SH_PFC_PIN_NONE,
4097 [31] = SH_PFC_PIN_NONE,
4098 } },
4099 { PINMUX_BIAS_REG("PUEN5", 0xE60608C0, "PUD5", 0xE60608E0) {
4100 [ 0] = RCAR_GP_PIN(5, 0), /* AVB2_AVTP_PPS */
4101 [ 1] = RCAR_GP_PIN(5, 1), /* AVB0_AVTP_CAPTURE */
4102 [ 2] = RCAR_GP_PIN(5, 2), /* AVB2_AVTP_MATCH */
4103 [ 3] = RCAR_GP_PIN(5, 3), /* AVB2_LINK */
4104 [ 4] = RCAR_GP_PIN(5, 4), /* AVB2_PHY_INT */
4105 [ 5] = RCAR_GP_PIN(5, 5), /* AVB2_MAGIC */
4106 [ 6] = RCAR_GP_PIN(5, 6), /* AVB2_MDC */
4107 [ 7] = RCAR_GP_PIN(5, 7), /* AVB2_TXCREFCLK */
4108 [ 8] = RCAR_GP_PIN(5, 8), /* AVB2_TD3 */
4109 [ 9] = RCAR_GP_PIN(5, 9), /* AVB2_RD3 */
4110 [10] = RCAR_GP_PIN(5, 10), /* AVB2_MDIO */
4111 [11] = RCAR_GP_PIN(5, 11), /* AVB2_TD2 */
4112 [12] = RCAR_GP_PIN(5, 12), /* AVB2_TD1 */
4113 [13] = RCAR_GP_PIN(5, 13), /* AVB2_RD2 */
4114 [14] = RCAR_GP_PIN(5, 14), /* AVB2_RD1 */
4115 [15] = RCAR_GP_PIN(5, 15), /* AVB2_TD0 */
4116 [16] = RCAR_GP_PIN(5, 16), /* AVB2_TXC */
4117 [17] = RCAR_GP_PIN(5, 17), /* AVB2_RD0 */
4118 [18] = RCAR_GP_PIN(5, 18), /* AVB2_RXC */
4119 [19] = RCAR_GP_PIN(5, 19), /* AVB2_TX_CTL */
4120 [20] = RCAR_GP_PIN(5, 20), /* AVB2_RX_CTL */
4121 [21] = SH_PFC_PIN_NONE,
4122 [22] = SH_PFC_PIN_NONE,
4123 [23] = SH_PFC_PIN_NONE,
4124 [24] = SH_PFC_PIN_NONE,
4125 [25] = SH_PFC_PIN_NONE,
4126 [26] = SH_PFC_PIN_NONE,
4127 [27] = SH_PFC_PIN_NONE,
4128 [28] = SH_PFC_PIN_NONE,
4129 [29] = SH_PFC_PIN_NONE,
4130 [30] = SH_PFC_PIN_NONE,
4131 [31] = SH_PFC_PIN_NONE,
4132 } },
4133 { PINMUX_BIAS_REG("PUEN6", 0xE60610C0, "PUD6", 0xE60610E0) {
4134 [ 0] = RCAR_GP_PIN(6, 0), /* AVB1_MDIO */
4135 [ 1] = RCAR_GP_PIN(6, 1), /* AVB1_MAGIC */
4136 [ 2] = RCAR_GP_PIN(6, 2), /* AVB1_MDC */
4137 [ 3] = RCAR_GP_PIN(6, 3), /* AVB1_PHY_INT */
4138 [ 4] = RCAR_GP_PIN(6, 4), /* AVB1_LINK */
4139 [ 5] = RCAR_GP_PIN(6, 5), /* AVB1_AVTP_MATCH */
4140 [ 6] = RCAR_GP_PIN(6, 6), /* AVB1_TXC */
4141 [ 7] = RCAR_GP_PIN(6, 7), /* AVB1_TX_CTL */
4142 [ 8] = RCAR_GP_PIN(6, 8), /* AVB1_RXC */
4143 [ 9] = RCAR_GP_PIN(6, 9), /* AVB1_RX_CTL */
4144 [10] = RCAR_GP_PIN(6, 10), /* AVB1_AVTP_PPS */
4145 [11] = RCAR_GP_PIN(6, 11), /* AVB1_AVTP_CAPTURE */
4146 [12] = RCAR_GP_PIN(6, 12), /* AVB1_TD1 */
4147 [13] = RCAR_GP_PIN(6, 13), /* AVB1_TD0 */
4148 [14] = RCAR_GP_PIN(6, 14), /* AVB1_RD1*/
4149 [15] = RCAR_GP_PIN(6, 15), /* AVB1_RD0 */
4150 [16] = RCAR_GP_PIN(6, 16), /* AVB1_TD2 */
4151 [17] = RCAR_GP_PIN(6, 17), /* AVB1_RD2 */
4152 [18] = RCAR_GP_PIN(6, 18), /* AVB1_TD3 */
4153 [19] = RCAR_GP_PIN(6, 19), /* AVB1_RD3 */
4154 [20] = RCAR_GP_PIN(6, 20), /* AVB1_TXCREFCLK */
4155 [21] = SH_PFC_PIN_NONE,
4156 [22] = SH_PFC_PIN_NONE,
4157 [23] = SH_PFC_PIN_NONE,
4158 [24] = SH_PFC_PIN_NONE,
4159 [25] = SH_PFC_PIN_NONE,
4160 [26] = SH_PFC_PIN_NONE,
4161 [27] = SH_PFC_PIN_NONE,
4162 [28] = SH_PFC_PIN_NONE,
4163 [29] = SH_PFC_PIN_NONE,
4164 [30] = SH_PFC_PIN_NONE,
4165 [31] = SH_PFC_PIN_NONE,
4166 } },
4167 { PINMUX_BIAS_REG("PUEN7", 0xE60618C0, "PUD7", 0xE60618E0) {
4168 [ 0] = RCAR_GP_PIN(7, 0), /* AVB0_AVTP_PPS */
4169 [ 1] = RCAR_GP_PIN(7, 1), /* AVB0_AVTP_CAPTURE */
4170 [ 2] = RCAR_GP_PIN(7, 2), /* AVB0_AVTP_MATCH */
4171 [ 3] = RCAR_GP_PIN(7, 3), /* AVB0_TD3 */
4172 [ 4] = RCAR_GP_PIN(7, 4), /* AVB0_LINK */
4173 [ 5] = RCAR_GP_PIN(7, 5), /* AVB0_PHY_INT */
4174 [ 6] = RCAR_GP_PIN(7, 6), /* AVB0_TD2 */
4175 [ 7] = RCAR_GP_PIN(7, 7), /* AVB0_TD1 */
4176 [ 8] = RCAR_GP_PIN(7, 8), /* AVB0_RD3 */
4177 [ 9] = RCAR_GP_PIN(7, 9), /* AVB0_TXCREFCLK */
4178 [10] = RCAR_GP_PIN(7, 10), /* AVB0_MAGIC */
4179 [11] = RCAR_GP_PIN(7, 11), /* AVB0_TD0 */
4180 [12] = RCAR_GP_PIN(7, 12), /* AVB0_RD2 */
4181 [13] = RCAR_GP_PIN(7, 13), /* AVB0_MDC */
4182 [14] = RCAR_GP_PIN(7, 14), /* AVB0_MDIO */
4183 [15] = RCAR_GP_PIN(7, 15), /* AVB0_TXC */
4184 [16] = RCAR_GP_PIN(7, 16), /* AVB0_TX_CTL */
4185 [17] = RCAR_GP_PIN(7, 17), /* AVB0_RD1 */
4186 [18] = RCAR_GP_PIN(7, 18), /* AVB0_RD0 */
4187 [19] = RCAR_GP_PIN(7, 19), /* AVB0_RXC */
4188 [20] = RCAR_GP_PIN(7, 20), /* AVB0_RX_CTL */
4189 [21] = SH_PFC_PIN_NONE,
4190 [22] = SH_PFC_PIN_NONE,
4191 [23] = SH_PFC_PIN_NONE,
4192 [24] = SH_PFC_PIN_NONE,
4193 [25] = SH_PFC_PIN_NONE,
4194 [26] = SH_PFC_PIN_NONE,
4195 [27] = SH_PFC_PIN_NONE,
4196 [28] = SH_PFC_PIN_NONE,
4197 [29] = SH_PFC_PIN_NONE,
4198 [30] = SH_PFC_PIN_NONE,
4199 [31] = SH_PFC_PIN_NONE,
4200 } },
4201 { PINMUX_BIAS_REG("PUEN8", 0xE60680C0, "PUD8", 0xE60680E0) {
4202 [ 0] = RCAR_GP_PIN(8, 0), /* SCL0 */
4203 [ 1] = RCAR_GP_PIN(8, 1), /* SDA0 */
4204 [ 2] = RCAR_GP_PIN(8, 2), /* SCL1 */
4205 [ 3] = RCAR_GP_PIN(8, 3), /* SDA1 */
4206 [ 4] = RCAR_GP_PIN(8, 4), /* SCL2 */
4207 [ 5] = RCAR_GP_PIN(8, 5), /* SDA2 */
4208 [ 6] = RCAR_GP_PIN(8, 6), /* SCL3 */
4209 [ 7] = RCAR_GP_PIN(8, 7), /* SDA3 */
4210 [ 8] = RCAR_GP_PIN(8, 8), /* SCL4 */
4211 [ 9] = RCAR_GP_PIN(8, 9), /* SDA4 */
4212 [10] = RCAR_GP_PIN(8, 10), /* SCL5 */
4213 [11] = RCAR_GP_PIN(8, 11), /* SDA5 */
4214 [12] = RCAR_GP_PIN(8, 12), /* GP8_12 */
4215 [13] = RCAR_GP_PIN(8, 13), /* GP8_13 */
4216 [14] = SH_PFC_PIN_NONE,
4217 [15] = SH_PFC_PIN_NONE,
4218 [16] = SH_PFC_PIN_NONE,
4219 [17] = SH_PFC_PIN_NONE,
4220 [18] = SH_PFC_PIN_NONE,
4221 [19] = SH_PFC_PIN_NONE,
4222 [20] = SH_PFC_PIN_NONE,
4223 [21] = SH_PFC_PIN_NONE,
4224 [22] = SH_PFC_PIN_NONE,
4225 [23] = SH_PFC_PIN_NONE,
4226 [24] = SH_PFC_PIN_NONE,
4227 [25] = SH_PFC_PIN_NONE,
4228 [26] = SH_PFC_PIN_NONE,
4229 [27] = SH_PFC_PIN_NONE,
4230 [28] = SH_PFC_PIN_NONE,
4231 [29] = SH_PFC_PIN_NONE,
4232 [30] = SH_PFC_PIN_NONE,
4233 [31] = SH_PFC_PIN_NONE,
4234 } },
4235 { /* sentinel */ },
4236};
4237
4238static const struct sh_pfc_soc_operations r8a779g0_pin_ops = {
4239 .pin_to_pocctrl = r8a779g0_pin_to_pocctrl,
4240 .get_bias = rcar_pinmux_get_bias,
4241 .set_bias = rcar_pinmux_set_bias,
4242};
4243
4244const struct sh_pfc_soc_info r8a779g0_pinmux_info = {
4245 .name = "r8a779g0_pfc",
4246 .ops = &r8a779g0_pin_ops,
4247 .unlock_reg = 0x1ff, /* PMMRn mask */
4248
4249 .function = { PINMUX_FUNCTION_BEGIN, PINMUX_FUNCTION_END },
4250
4251 .pins = pinmux_pins,
4252 .nr_pins = ARRAY_SIZE(pinmux_pins),
4253 .groups = pinmux_groups,
4254 .nr_groups = ARRAY_SIZE(pinmux_groups),
4255 .functions = pinmux_functions,
4256 .nr_functions = ARRAY_SIZE(pinmux_functions),
4257
4258 .cfg_regs = pinmux_config_regs,
4259 .drive_regs = pinmux_drive_regs,
4260 .bias_regs = pinmux_bias_regs,
4261 .ioctrl_regs = pinmux_ioctrl_regs,
4262
4263 .pinmux_data = pinmux_data,
4264 .pinmux_data_size = ARRAY_SIZE(pinmux_data),
4265};