blob: b13fc0ba632943c3c15d9ab687019adc0420bb10 [file] [log] [blame]
Tom Rini24672242018-06-01 21:10:18 -04001// SPDX-License-Identifier: GPL-2.0
Marek Vasut68a77042018-04-26 13:09:20 +02002/*
3 * R8A77990 processor support - PFC hardware block.
4 *
Eugeniu Roscaf0066b02019-07-09 18:27:11 +02005 * Copyright (C) 2018-2019 Renesas Electronics Corp.
Marek Vasut68a77042018-04-26 13:09:20 +02006 *
7 * This file is based on the drivers/pinctrl/sh-pfc/pfc-r8a7796.c
8 *
Marek Vasut88e81ec2019-03-04 22:39:51 +01009 * R8A7796 processor support - PFC hardware block.
Marek Vasut68a77042018-04-26 13:09:20 +020010 *
Marek Vasut88e81ec2019-03-04 22:39:51 +010011 * Copyright (C) 2016-2017 Renesas Electronics Corp.
Marek Vasut68a77042018-04-26 13:09:20 +020012 */
13
14#include <common.h>
15#include <dm.h>
16#include <errno.h>
17#include <dm/pinctrl.h>
Simon Glass4dcacfc2020-05-10 11:40:13 -060018#include <linux/bitops.h>
Marek Vasut68a77042018-04-26 13:09:20 +020019#include <linux/kernel.h>
20
21#include "sh_pfc.h"
22
Marek Vasuteb13e0f2018-06-10 16:05:48 +020023#define CFG_FLAGS (SH_PFC_PIN_CFG_PULL_UP | \
24 SH_PFC_PIN_CFG_PULL_DOWN)
25
Marek Vasut88e81ec2019-03-04 22:39:51 +010026#define CPU_ALL_PORT(fn, sfx) \
27 PORT_GP_CFG_18(0, fn, sfx, CFG_FLAGS), \
28 PORT_GP_CFG_23(1, fn, sfx, CFG_FLAGS), \
29 PORT_GP_CFG_26(2, fn, sfx, CFG_FLAGS), \
30 PORT_GP_CFG_12(3, fn, sfx, CFG_FLAGS | SH_PFC_PIN_CFG_IO_VOLTAGE), \
31 PORT_GP_CFG_1(3, 12, fn, sfx, CFG_FLAGS), \
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_11(4, fn, sfx, CFG_FLAGS | SH_PFC_PIN_CFG_IO_VOLTAGE), \
36 PORT_GP_CFG_20(5, fn, sfx, CFG_FLAGS), \
37 PORT_GP_CFG_9(6, fn, sfx, CFG_FLAGS), \
38 PORT_GP_CFG_1(6, 9, fn, sfx, SH_PFC_PIN_CFG_PULL_UP), \
39 PORT_GP_CFG_1(6, 10, fn, sfx, CFG_FLAGS), \
40 PORT_GP_CFG_1(6, 11, fn, sfx, CFG_FLAGS), \
41 PORT_GP_CFG_1(6, 12, fn, sfx, CFG_FLAGS), \
42 PORT_GP_CFG_1(6, 13, fn, sfx, CFG_FLAGS), \
43 PORT_GP_CFG_1(6, 14, fn, sfx, CFG_FLAGS), \
44 PORT_GP_CFG_1(6, 15, fn, sfx, CFG_FLAGS), \
45 PORT_GP_CFG_1(6, 16, fn, sfx, CFG_FLAGS), \
46 PORT_GP_CFG_1(6, 17, fn, sfx, CFG_FLAGS)
Marek Vasut68a77042018-04-26 13:09:20 +020047/*
48 * F_() : just information
49 * FM() : macro for FN_xxx / xxx_MARK
50 */
51
52/* GPSR0 */
53#define GPSR0_17 F_(SDA4, IP7_27_24)
54#define GPSR0_16 F_(SCL4, IP7_23_20)
55#define GPSR0_15 F_(D15, IP7_19_16)
56#define GPSR0_14 F_(D14, IP7_15_12)
57#define GPSR0_13 F_(D13, IP7_11_8)
58#define GPSR0_12 F_(D12, IP7_7_4)
59#define GPSR0_11 F_(D11, IP7_3_0)
60#define GPSR0_10 F_(D10, IP6_31_28)
61#define GPSR0_9 F_(D9, IP6_27_24)
62#define GPSR0_8 F_(D8, IP6_23_20)
63#define GPSR0_7 F_(D7, IP6_19_16)
64#define GPSR0_6 F_(D6, IP6_15_12)
65#define GPSR0_5 F_(D5, IP6_11_8)
66#define GPSR0_4 F_(D4, IP6_7_4)
67#define GPSR0_3 F_(D3, IP6_3_0)
68#define GPSR0_2 F_(D2, IP5_31_28)
69#define GPSR0_1 F_(D1, IP5_27_24)
70#define GPSR0_0 F_(D0, IP5_23_20)
71
72/* GPSR1 */
73#define GPSR1_22 F_(WE0_N, IP5_19_16)
74#define GPSR1_21 F_(CS0_N, IP5_15_12)
75#define GPSR1_20 FM(CLKOUT)
76#define GPSR1_19 F_(A19, IP5_11_8)
77#define GPSR1_18 F_(A18, IP5_7_4)
78#define GPSR1_17 F_(A17, IP5_3_0)
79#define GPSR1_16 F_(A16, IP4_31_28)
80#define GPSR1_15 F_(A15, IP4_27_24)
81#define GPSR1_14 F_(A14, IP4_23_20)
82#define GPSR1_13 F_(A13, IP4_19_16)
83#define GPSR1_12 F_(A12, IP4_15_12)
84#define GPSR1_11 F_(A11, IP4_11_8)
85#define GPSR1_10 F_(A10, IP4_7_4)
86#define GPSR1_9 F_(A9, IP4_3_0)
87#define GPSR1_8 F_(A8, IP3_31_28)
88#define GPSR1_7 F_(A7, IP3_27_24)
89#define GPSR1_6 F_(A6, IP3_23_20)
90#define GPSR1_5 F_(A5, IP3_19_16)
91#define GPSR1_4 F_(A4, IP3_15_12)
92#define GPSR1_3 F_(A3, IP3_11_8)
93#define GPSR1_2 F_(A2, IP3_7_4)
94#define GPSR1_1 F_(A1, IP3_3_0)
95#define GPSR1_0 F_(A0, IP2_31_28)
96
97/* GPSR2 */
98#define GPSR2_25 F_(EX_WAIT0, IP2_27_24)
99#define GPSR2_24 F_(RD_WR_N, IP2_23_20)
100#define GPSR2_23 F_(RD_N, IP2_19_16)
101#define GPSR2_22 F_(BS_N, IP2_15_12)
102#define GPSR2_21 FM(AVB_PHY_INT)
103#define GPSR2_20 F_(AVB_TXCREFCLK, IP2_3_0)
104#define GPSR2_19 FM(AVB_RD3)
105#define GPSR2_18 F_(AVB_RD2, IP1_31_28)
106#define GPSR2_17 F_(AVB_RD1, IP1_27_24)
107#define GPSR2_16 F_(AVB_RD0, IP1_23_20)
108#define GPSR2_15 FM(AVB_RXC)
109#define GPSR2_14 FM(AVB_RX_CTL)
110#define GPSR2_13 F_(RPC_RESET_N, IP1_19_16)
111#define GPSR2_12 F_(RPC_INT_N, IP1_15_12)
112#define GPSR2_11 F_(QSPI1_SSL, IP1_11_8)
113#define GPSR2_10 F_(QSPI1_IO3, IP1_7_4)
114#define GPSR2_9 F_(QSPI1_IO2, IP1_3_0)
115#define GPSR2_8 F_(QSPI1_MISO_IO1, IP0_31_28)
116#define GPSR2_7 F_(QSPI1_MOSI_IO0, IP0_27_24)
117#define GPSR2_6 F_(QSPI1_SPCLK, IP0_23_20)
118#define GPSR2_5 FM(QSPI0_SSL)
119#define GPSR2_4 F_(QSPI0_IO3, IP0_19_16)
120#define GPSR2_3 F_(QSPI0_IO2, IP0_15_12)
121#define GPSR2_2 F_(QSPI0_MISO_IO1, IP0_11_8)
122#define GPSR2_1 F_(QSPI0_MOSI_IO0, IP0_7_4)
123#define GPSR2_0 F_(QSPI0_SPCLK, IP0_3_0)
124
125/* GPSR3 */
126#define GPSR3_15 F_(SD1_WP, IP11_7_4)
127#define GPSR3_14 F_(SD1_CD, IP11_3_0)
128#define GPSR3_13 F_(SD0_WP, IP10_31_28)
129#define GPSR3_12 F_(SD0_CD, IP10_27_24)
130#define GPSR3_11 F_(SD1_DAT3, IP9_11_8)
131#define GPSR3_10 F_(SD1_DAT2, IP9_7_4)
132#define GPSR3_9 F_(SD1_DAT1, IP9_3_0)
133#define GPSR3_8 F_(SD1_DAT0, IP8_31_28)
134#define GPSR3_7 F_(SD1_CMD, IP8_27_24)
135#define GPSR3_6 F_(SD1_CLK, IP8_23_20)
136#define GPSR3_5 F_(SD0_DAT3, IP8_19_16)
137#define GPSR3_4 F_(SD0_DAT2, IP8_15_12)
138#define GPSR3_3 F_(SD0_DAT1, IP8_11_8)
139#define GPSR3_2 F_(SD0_DAT0, IP8_7_4)
140#define GPSR3_1 F_(SD0_CMD, IP8_3_0)
141#define GPSR3_0 F_(SD0_CLK, IP7_31_28)
142
143/* GPSR4 */
144#define GPSR4_10 F_(SD3_DS, IP10_23_20)
145#define GPSR4_9 F_(SD3_DAT7, IP10_19_16)
146#define GPSR4_8 F_(SD3_DAT6, IP10_15_12)
147#define GPSR4_7 F_(SD3_DAT5, IP10_11_8)
148#define GPSR4_6 F_(SD3_DAT4, IP10_7_4)
149#define GPSR4_5 F_(SD3_DAT3, IP10_3_0)
150#define GPSR4_4 F_(SD3_DAT2, IP9_31_28)
151#define GPSR4_3 F_(SD3_DAT1, IP9_27_24)
152#define GPSR4_2 F_(SD3_DAT0, IP9_23_20)
153#define GPSR4_1 F_(SD3_CMD, IP9_19_16)
154#define GPSR4_0 F_(SD3_CLK, IP9_15_12)
155
156/* GPSR5 */
157#define GPSR5_19 F_(MLB_DAT, IP13_23_20)
158#define GPSR5_18 F_(MLB_SIG, IP13_19_16)
159#define GPSR5_17 F_(MLB_CLK, IP13_15_12)
160#define GPSR5_16 F_(SSI_SDATA9, IP13_11_8)
161#define GPSR5_15 F_(MSIOF0_SS2, IP13_7_4)
162#define GPSR5_14 F_(MSIOF0_SS1, IP13_3_0)
163#define GPSR5_13 F_(MSIOF0_SYNC, IP12_31_28)
164#define GPSR5_12 F_(MSIOF0_TXD, IP12_27_24)
165#define GPSR5_11 F_(MSIOF0_RXD, IP12_23_20)
166#define GPSR5_10 F_(MSIOF0_SCK, IP12_19_16)
167#define GPSR5_9 F_(RX2_A, IP12_15_12)
168#define GPSR5_8 F_(TX2_A, IP12_11_8)
169#define GPSR5_7 F_(SCK2_A, IP12_7_4)
170#define GPSR5_6 F_(TX1, IP12_3_0)
171#define GPSR5_5 F_(RX1, IP11_31_28)
Eugeniu Roscaf0066b02019-07-09 18:27:11 +0200172#define GPSR5_4 F_(RTS0_N_A, IP11_23_20)
Marek Vasut68a77042018-04-26 13:09:20 +0200173#define GPSR5_3 F_(CTS0_N_A, IP11_19_16)
174#define GPSR5_2 F_(TX0_A, IP11_15_12)
175#define GPSR5_1 F_(RX0_A, IP11_11_8)
176#define GPSR5_0 F_(SCK0_A, IP11_27_24)
177
178/* GPSR6 */
179#define GPSR6_17 F_(USB30_PWEN, IP15_27_24)
180#define GPSR6_16 F_(SSI_SDATA6, IP15_19_16)
181#define GPSR6_15 F_(SSI_WS6, IP15_15_12)
182#define GPSR6_14 F_(SSI_SCK6, IP15_11_8)
183#define GPSR6_13 F_(SSI_SDATA5, IP15_7_4)
184#define GPSR6_12 F_(SSI_WS5, IP15_3_0)
185#define GPSR6_11 F_(SSI_SCK5, IP14_31_28)
186#define GPSR6_10 F_(SSI_SDATA4, IP14_27_24)
187#define GPSR6_9 F_(USB30_OVC, IP15_31_28)
188#define GPSR6_8 F_(AUDIO_CLKA, IP15_23_20)
189#define GPSR6_7 F_(SSI_SDATA3, IP14_23_20)
190#define GPSR6_6 F_(SSI_WS349, IP14_19_16)
191#define GPSR6_5 F_(SSI_SCK349, IP14_15_12)
192#define GPSR6_4 F_(SSI_SDATA2, IP14_11_8)
193#define GPSR6_3 F_(SSI_SDATA1, IP14_7_4)
194#define GPSR6_2 F_(SSI_SDATA0, IP14_3_0)
195#define GPSR6_1 F_(SSI_WS01239, IP13_31_28)
196#define GPSR6_0 F_(SSI_SCK01239, IP13_27_24)
197
198/* IPSRx */ /* 0 */ /* 1 */ /* 2 */ /* 3 */ /* 4 */ /* 5 */ /* 6 */ /* 7 */ /* 8 */ /* 9 - F */
199#define IP0_3_0 FM(QSPI0_SPCLK) FM(HSCK4_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)
200#define IP0_7_4 FM(QSPI0_MOSI_IO0) FM(HCTS4_N_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)
201#define IP0_11_8 FM(QSPI0_MISO_IO1) FM(HRTS4_N_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)
202#define IP0_15_12 FM(QSPI0_IO2) FM(HTX4_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)
203#define IP0_19_16 FM(QSPI0_IO3) FM(HRX4_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)
204#define IP0_23_20 FM(QSPI1_SPCLK) FM(RIF2_CLK_A) FM(HSCK4_B) FM(VI4_DATA0_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)
205#define IP0_27_24 FM(QSPI1_MOSI_IO0) FM(RIF2_SYNC_A) FM(HTX4_B) FM(VI4_DATA1_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)
206#define IP0_31_28 FM(QSPI1_MISO_IO1) FM(RIF2_D0_A) FM(HRX4_B) FM(VI4_DATA2_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)
207#define IP1_3_0 FM(QSPI1_IO2) FM(RIF2_D1_A) FM(HTX3_C) FM(VI4_DATA3_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)
208#define IP1_7_4 FM(QSPI1_IO3) FM(RIF3_CLK_A) FM(HRX3_C) FM(VI4_DATA4_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)
209#define IP1_11_8 FM(QSPI1_SSL) FM(RIF3_SYNC_A) FM(HSCK3_C) FM(VI4_DATA5_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)
210#define IP1_15_12 FM(RPC_INT_N) FM(RIF3_D0_A) FM(HCTS3_N_C) FM(VI4_DATA6_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)
211#define IP1_19_16 FM(RPC_RESET_N) FM(RIF3_D1_A) FM(HRTS3_N_C) FM(VI4_DATA7_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)
212#define IP1_23_20 FM(AVB_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) F_(0, 0)
213#define IP1_27_24 FM(AVB_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) F_(0, 0)
214#define IP1_31_28 FM(AVB_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) F_(0, 0)
215#define IP2_3_0 FM(AVB_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)
216#define IP2_7_4 FM(AVB_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)
217#define IP2_11_8 FM(AVB_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)
218#define IP2_15_12 FM(BS_N) FM(PWM0_A) FM(AVB_MAGIC) FM(VI4_CLK) F_(0, 0) FM(TX3_C) F_(0, 0) FM(VI5_CLK_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)
219#define IP2_19_16 FM(RD_N) FM(PWM1_A) FM(AVB_LINK) FM(VI4_FIELD) F_(0, 0) FM(RX3_C) FM(FSCLKST2_N_A) FM(VI5_DATA0_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)
Lad Prabhakare4db7392020-10-14 16:45:59 +0100220#define IP2_23_20 FM(RD_WR_N) FM(SCL7_A) FM(AVB_AVTP_MATCH) FM(VI4_VSYNC_N) FM(TX5_B) FM(SCK3_C) FM(PWM5_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)
221#define IP2_27_24 FM(EX_WAIT0) FM(SDA7_A) FM(AVB_AVTP_CAPTURE) FM(VI4_HSYNC_N) FM(RX5_B) FM(PWM6_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)
Marek Vasut68a77042018-04-26 13:09:20 +0200222#define IP2_31_28 FM(A0) FM(IRQ0) FM(PWM2_A) FM(MSIOF3_SS1_B) FM(VI5_CLK_A) FM(DU_CDE) FM(HRX3_D) FM(IERX) FM(QSTB_QHE) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0)
223#define IP3_3_0 FM(A1) FM(IRQ1) FM(PWM3_A) FM(DU_DOTCLKIN1) FM(VI5_DATA0_A) FM(DU_DISP_CDE) FM(SDA6_B) FM(IETX) FM(QCPV_QDE) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0)
224#define IP3_7_4 FM(A2) FM(IRQ2) FM(AVB_AVTP_PPS) FM(VI4_CLKENB) FM(VI5_DATA1_A) FM(DU_DISP) FM(SCL6_B) F_(0, 0) FM(QSTVB_QVE) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0)
225#define IP3_11_8 FM(A3) FM(CTS4_N_A) FM(PWM4_A) FM(VI4_DATA12) F_(0, 0) FM(DU_DOTCLKOUT0) FM(HTX3_D) FM(IECLK) FM(LCDOUT12) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0)
Eugeniu Roscaf0066b02019-07-09 18:27:11 +0200226#define IP3_15_12 FM(A4) FM(RTS4_N_A) FM(MSIOF3_SYNC_B) FM(VI4_DATA8) FM(PWM2_B) FM(DU_DG4) FM(RIF2_CLK_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)
Marek Vasut68a77042018-04-26 13:09:20 +0200227#define IP3_19_16 FM(A5) FM(SCK4_A) FM(MSIOF3_SCK_B) FM(VI4_DATA9) FM(PWM3_B) F_(0, 0) FM(RIF2_SYNC_B) F_(0, 0) FM(QPOLA) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0)
228#define IP3_23_20 FM(A6) FM(RX4_A) FM(MSIOF3_RXD_B) FM(VI4_DATA10) F_(0, 0) F_(0, 0) FM(RIF2_D0_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)
229#define IP3_27_24 FM(A7) FM(TX4_A) FM(MSIOF3_TXD_B) FM(VI4_DATA11) F_(0, 0) F_(0, 0) FM(RIF2_D1_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)
230#define IP3_31_28 FM(A8) FM(SDA6_A) FM(RX3_B) FM(HRX4_C) FM(VI5_HSYNC_N_A) FM(DU_HSYNC) FM(VI4_DATA0_B) F_(0, 0) FM(QSTH_QHS) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0)
231
232/* IPSRx */ /* 0 */ /* 1 */ /* 2 */ /* 3 */ /* 4 */ /* 5 */ /* 6 */ /* 7 */ /* 8 */ /* 9 - F */
233#define IP4_3_0 FM(A9) FM(TX5_A) FM(IRQ3) FM(VI4_DATA16) FM(VI5_VSYNC_N_A) FM(DU_DG7) F_(0, 0) F_(0, 0) FM(LCDOUT15) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0)
234#define IP4_7_4 FM(A10) FM(IRQ4) FM(MSIOF2_SYNC_B) FM(VI4_DATA13) FM(VI5_FIELD_A) FM(DU_DG5) FM(FSCLKST2_N_B) F_(0, 0) FM(LCDOUT13) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0)
235#define IP4_11_8 FM(A11) FM(SCL6_A) FM(TX3_B) FM(HTX4_C) F_(0, 0) FM(DU_VSYNC) FM(VI4_DATA1_B) F_(0, 0) FM(QSTVA_QVS) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0)
236#define IP4_15_12 FM(A12) FM(RX5_A) FM(MSIOF2_SS2_B) FM(VI4_DATA17) FM(VI5_DATA3_A) FM(DU_DG6) F_(0, 0) F_(0, 0) FM(LCDOUT14) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0)
237#define IP4_19_16 FM(A13) FM(SCK5_A) FM(MSIOF2_SCK_B) FM(VI4_DATA14) FM(HRX4_D) FM(DU_DB2) F_(0, 0) F_(0, 0) FM(LCDOUT2) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0)
238#define IP4_23_20 FM(A14) FM(MSIOF1_SS1) FM(MSIOF2_RXD_B) FM(VI4_DATA15) FM(HTX4_D) FM(DU_DB3) F_(0, 0) F_(0, 0) FM(LCDOUT3) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0)
239#define IP4_27_24 FM(A15) FM(MSIOF1_SS2) FM(MSIOF2_TXD_B) FM(VI4_DATA18) FM(VI5_DATA4_A) FM(DU_DB4) F_(0, 0) F_(0, 0) FM(LCDOUT4) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0)
240#define IP4_31_28 FM(A16) FM(MSIOF1_SYNC) FM(MSIOF2_SS1_B) FM(VI4_DATA19) FM(VI5_DATA5_A) FM(DU_DB5) F_(0, 0) F_(0, 0) FM(LCDOUT5) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0)
241#define IP5_3_0 FM(A17) FM(MSIOF1_RXD) F_(0, 0) FM(VI4_DATA20) FM(VI5_DATA6_A) FM(DU_DB6) F_(0, 0) F_(0, 0) FM(LCDOUT6) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0)
242#define IP5_7_4 FM(A18) FM(MSIOF1_TXD) F_(0, 0) FM(VI4_DATA21) FM(VI5_DATA7_A) FM(DU_DB0) F_(0, 0) FM(HRX4_E) FM(LCDOUT0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0)
243#define IP5_11_8 FM(A19) FM(MSIOF1_SCK) F_(0, 0) FM(VI4_DATA22) FM(VI5_DATA2_A) FM(DU_DB1) F_(0, 0) FM(HTX4_E) FM(LCDOUT1) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0)
244#define IP5_15_12 FM(CS0_N) FM(SCL5) F_(0, 0) F_(0, 0) F_(0, 0) FM(DU_DR0) FM(VI4_DATA2_B) F_(0, 0) FM(LCDOUT16) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0)
245#define IP5_19_16 FM(WE0_N) FM(SDA5) F_(0, 0) F_(0, 0) F_(0, 0) FM(DU_DR1) FM(VI4_DATA3_B) F_(0, 0) FM(LCDOUT17) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0)
246#define IP5_23_20 FM(D0) FM(MSIOF3_SCK_A) F_(0, 0) F_(0, 0) F_(0, 0) FM(DU_DR2) FM(CTS4_N_C) F_(0, 0) FM(LCDOUT18) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0)
Eugeniu Roscaf0066b02019-07-09 18:27:11 +0200247#define IP5_27_24 FM(D1) FM(MSIOF3_SYNC_A) FM(SCK3_A) FM(VI4_DATA23) FM(VI5_CLKENB_A) FM(DU_DB7) FM(RTS4_N_C) F_(0, 0) FM(LCDOUT7) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0)
Marek Vasut68a77042018-04-26 13:09:20 +0200248#define IP5_31_28 FM(D2) FM(MSIOF3_RXD_A) FM(RX5_C) F_(0, 0) FM(VI5_DATA14_A) FM(DU_DR3) FM(RX4_C) F_(0, 0) FM(LCDOUT19) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0)
249#define IP6_3_0 FM(D3) FM(MSIOF3_TXD_A) FM(TX5_C) F_(0, 0) FM(VI5_DATA15_A) FM(DU_DR4) FM(TX4_C) F_(0, 0) FM(LCDOUT20) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0)
Eugeniu Roscaf0066b02019-07-09 18:27:11 +0200250#define IP6_7_4 FM(D4) FM(CANFD1_TX) FM(HSCK3_B) FM(CAN1_TX) FM(RTS3_N_A) FM(MSIOF3_SS2_A) F_(0, 0) FM(VI5_DATA1_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)
Marek Vasut68a77042018-04-26 13:09:20 +0200251#define IP6_11_8 FM(D5) FM(RX3_A) FM(HRX3_B) F_(0, 0) F_(0, 0) FM(DU_DR5) FM(VI4_DATA4_B) F_(0, 0) FM(LCDOUT21) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0)
252#define IP6_15_12 FM(D6) FM(TX3_A) FM(HTX3_B) F_(0, 0) F_(0, 0) FM(DU_DR6) FM(VI4_DATA5_B) F_(0, 0) FM(LCDOUT22) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0)
253#define IP6_19_16 FM(D7) FM(CANFD1_RX) FM(IRQ5) FM(CAN1_RX) FM(CTS3_N_A) F_(0, 0) F_(0, 0) FM(VI5_DATA2_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)
254#define IP6_23_20 FM(D8) FM(MSIOF2_SCK_A) FM(SCK4_B) F_(0, 0) FM(VI5_DATA12_A) FM(DU_DR7) FM(RIF3_CLK_B) FM(HCTS3_N_E) FM(LCDOUT23) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0)
255#define IP6_27_24 FM(D9) FM(MSIOF2_SYNC_A) F_(0, 0) F_(0, 0) FM(VI5_DATA10_A) FM(DU_DG0) FM(RIF3_SYNC_B) FM(HRX3_E) FM(LCDOUT8) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0)
256#define IP6_31_28 FM(D10) FM(MSIOF2_RXD_A) F_(0, 0) F_(0, 0) FM(VI5_DATA13_A) FM(DU_DG1) FM(RIF3_D0_B) FM(HTX3_E) FM(LCDOUT9) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0)
257#define IP7_3_0 FM(D11) FM(MSIOF2_TXD_A) F_(0, 0) F_(0, 0) FM(VI5_DATA11_A) FM(DU_DG2) FM(RIF3_D1_B) FM(HRTS3_N_E) FM(LCDOUT10) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0)
258#define IP7_7_4 FM(D12) FM(CANFD0_TX) FM(TX4_B) FM(CAN0_TX) FM(VI5_DATA8_A) F_(0, 0) F_(0, 0) FM(VI5_DATA3_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)
259#define IP7_11_8 FM(D13) FM(CANFD0_RX) FM(RX4_B) FM(CAN0_RX) FM(VI5_DATA9_A) FM(SCL7_B) F_(0, 0) FM(VI5_DATA4_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)
260#define IP7_15_12 FM(D14) FM(CAN_CLK) FM(HRX3_A) FM(MSIOF2_SS2_A) F_(0, 0) FM(SDA7_B) F_(0, 0) FM(VI5_DATA5_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)
261#define IP7_19_16 FM(D15) FM(MSIOF2_SS1_A) FM(HTX3_A) FM(MSIOF3_SS1_A) F_(0, 0) FM(DU_DG3) F_(0, 0) F_(0, 0) FM(LCDOUT11) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0)
262#define IP7_23_20 FM(SCL4) FM(CS1_N_A26) F_(0, 0) F_(0, 0) F_(0, 0) FM(DU_DOTCLKIN0) FM(VI4_DATA6_B) FM(VI5_DATA6_B) FM(QCLK) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0)
263#define IP7_27_24 FM(SDA4) FM(WE1_N) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) FM(VI4_DATA7_B) FM(VI5_DATA7_B) FM(QPOLB) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0)
264#define IP7_31_28 FM(SD0_CLK) FM(NFDATA8) FM(SCL1_C) FM(HSCK1_B) FM(SDA2_E) FM(FMCLK_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)
265
266/* IPSRx */ /* 0 */ /* 1 */ /* 2 */ /* 3 */ /* 4 */ /* 5 */ /* 6 */ /* 7 */ /* 8 */ /* 9 - F */
267#define IP8_3_0 FM(SD0_CMD) FM(NFDATA9) F_(0, 0) FM(HRX1_B) F_(0, 0) FM(SPEEDIN_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)
268#define IP8_7_4 FM(SD0_DAT0) FM(NFDATA10) F_(0, 0) FM(HTX1_B) F_(0, 0) FM(REMOCON_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)
269#define IP8_11_8 FM(SD0_DAT1) FM(NFDATA11) FM(SDA2_C) FM(HCTS1_N_B) F_(0, 0) FM(FMIN_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)
270#define IP8_15_12 FM(SD0_DAT2) FM(NFDATA12) FM(SCL2_C) FM(HRTS1_N_B) F_(0, 0) FM(BPFCLK_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)
271#define IP8_19_16 FM(SD0_DAT3) FM(NFDATA13) FM(SDA1_C) FM(SCL2_E) FM(SPEEDIN_C) FM(REMOCON_C) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0)
272#define IP8_23_20 FM(SD1_CLK) FM(NFDATA14_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) F_(0, 0)
273#define IP8_27_24 FM(SD1_CMD) FM(NFDATA15_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) F_(0, 0)
274#define IP8_31_28 FM(SD1_DAT0) FM(NFWP_N_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) F_(0, 0)
275#define IP9_3_0 FM(SD1_DAT1) FM(NFCE_N_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) F_(0, 0)
276#define IP9_7_4 FM(SD1_DAT2) FM(NFALE_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) F_(0, 0)
277#define IP9_11_8 FM(SD1_DAT3) FM(NFRB_N_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) F_(0, 0)
278#define IP9_15_12 FM(SD3_CLK) FM(NFWE_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)
279#define IP9_19_16 FM(SD3_CMD) FM(NFRE_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)
280#define IP9_23_20 FM(SD3_DAT0) FM(NFDATA0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 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 IP9_27_24 FM(SD3_DAT1) FM(NFDATA1) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 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 IP9_31_28 FM(SD3_DAT2) FM(NFDATA2) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 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#define IP10_3_0 FM(SD3_DAT3) FM(NFDATA3) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0)
284#define IP10_7_4 FM(SD3_DAT4) FM(NFDATA4) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0)
285#define IP10_11_8 FM(SD3_DAT5) FM(NFDATA5) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 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 IP10_15_12 FM(SD3_DAT6) FM(NFDATA6) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 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 IP10_19_16 FM(SD3_DAT7) FM(NFDATA7) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 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 IP10_23_20 FM(SD3_DS) FM(NFCLE) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 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 IP10_27_24 FM(SD0_CD) FM(NFALE_A) FM(SD3_CD) FM(RIF0_CLK_B) FM(SCL2_B) FM(TCLK1_A) FM(SSI_SCK2_B) FM(TS_SCK0) 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 IP10_31_28 FM(SD0_WP) FM(NFRB_N_A) FM(SD3_WP) FM(RIF0_D0_B) FM(SDA2_B) FM(TCLK2_A) FM(SSI_WS2_B) FM(TS_SDAT0) 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 IP11_3_0 FM(SD1_CD) FM(NFCE_N_A) FM(SSI_SCK1) FM(RIF0_D1_B) F_(0, 0) F_(0, 0) F_(0, 0) FM(TS_SDEN0) 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 IP11_7_4 FM(SD1_WP) FM(NFWP_N_A) FM(SSI_WS1) FM(RIF0_SYNC_B) F_(0, 0) F_(0, 0) F_(0, 0) FM(TS_SPSYNC0) 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#define IP11_11_8 FM(RX0_A) FM(HRX1_A) FM(SSI_SCK2_A) FM(RIF1_SYNC) F_(0, 0) F_(0, 0) F_(0, 0) FM(TS_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)
294#define IP11_15_12 FM(TX0_A) FM(HTX1_A) FM(SSI_WS2_A) FM(RIF1_D0) F_(0, 0) F_(0, 0) F_(0, 0) FM(TS_SDAT1) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0)
295#define IP11_19_16 FM(CTS0_N_A) FM(NFDATA14_A) FM(AUDIO_CLKOUT_A) FM(RIF1_D1) FM(SCIF_CLK_A) FM(FMCLK_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)
Eugeniu Roscaf0066b02019-07-09 18:27:11 +0200296#define IP11_23_20 FM(RTS0_N_A) FM(NFDATA15_A) FM(AUDIO_CLKOUT1_A) FM(RIF1_CLK) FM(SCL2_A) FM(FMIN_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)
297#define IP11_27_24 FM(SCK0_A) FM(HSCK1_A) FM(USB3HS0_ID) FM(RTS1_N) FM(SDA2_A) FM(FMCLK_C) F_(0, 0) F_(0, 0) FM(USB0_ID) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0)
Marek Vasut68a77042018-04-26 13:09:20 +0200298#define IP11_31_28 FM(RX1) FM(HRX2_B) FM(SSI_SCK9_B) FM(AUDIO_CLKOUT1_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)
299
300/* IPSRx */ /* 0 */ /* 1 */ /* 2 */ /* 3 */ /* 4 */ /* 5 */ /* 6 */ /* 7 */ /* 8 */ /* 9 - F */
301#define IP12_3_0 FM(TX1) FM(HTX2_B) FM(SSI_WS9_B) FM(AUDIO_CLKOUT3_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)
302#define IP12_7_4 FM(SCK2_A) FM(HSCK0_A) FM(AUDIO_CLKB_A) FM(CTS1_N) FM(RIF0_CLK_A) FM(REMOCON_A) FM(SCIF_CLK_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)
303#define IP12_11_8 FM(TX2_A) FM(HRX0_A) FM(AUDIO_CLKOUT2_A) F_(0, 0) FM(SCL1_A) F_(0, 0) FM(FSO_CFE_0_N_A) FM(TS_SDEN1) 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 IP12_15_12 FM(RX2_A) FM(HTX0_A) FM(AUDIO_CLKOUT3_A) F_(0, 0) FM(SDA1_A) F_(0, 0) FM(FSO_CFE_1_N_A) FM(TS_SPSYNC1) 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 IP12_19_16 FM(MSIOF0_SCK) F_(0, 0) FM(SSI_SCK78) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 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 IP12_23_20 FM(MSIOF0_RXD) F_(0, 0) FM(SSI_WS78) F_(0, 0) F_(0, 0) FM(TX2_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)
307#define IP12_27_24 FM(MSIOF0_TXD) F_(0, 0) FM(SSI_SDATA7) F_(0, 0) F_(0, 0) FM(RX2_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)
308#define IP12_31_28 FM(MSIOF0_SYNC) FM(AUDIO_CLKOUT_B) FM(SSI_SDATA8) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 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#define IP13_3_0 FM(MSIOF0_SS1) FM(HRX2_A) FM(SSI_SCK4) FM(HCTS0_N_A) FM(BPFCLK_C) FM(SPEEDIN_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)
310#define IP13_7_4 FM(MSIOF0_SS2) FM(HTX2_A) FM(SSI_WS4) FM(HRTS0_N_A) FM(FMIN_C) FM(BPFCLK_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)
311#define IP13_11_8 FM(SSI_SDATA9) F_(0, 0) FM(AUDIO_CLKC_A) 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)
312#define IP13_15_12 FM(MLB_CLK) FM(RX0_B) F_(0, 0) FM(RIF0_D0_A) FM(SCL1_B) FM(TCLK1_B) F_(0, 0) F_(0, 0) FM(SIM0_RST_A) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0)
313#define IP13_19_16 FM(MLB_SIG) FM(SCK0_B) F_(0, 0) FM(RIF0_D1_A) FM(SDA1_B) FM(TCLK2_B) F_(0, 0) F_(0, 0) FM(SIM0_D_A) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0)
314#define IP13_23_20 FM(MLB_DAT) FM(TX0_B) F_(0, 0) FM(RIF0_SYNC_A) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) FM(SIM0_CLK_A) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0)
315#define IP13_27_24 FM(SSI_SCK01239) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 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 IP13_31_28 FM(SSI_WS01239) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 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 IP14_3_0 FM(SSI_SDATA0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 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 IP14_7_4 FM(SSI_SDATA1) FM(AUDIO_CLKC_B) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) FM(PWM0_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)
319#define IP14_11_8 FM(SSI_SDATA2) FM(AUDIO_CLKOUT2_B) FM(SSI_SCK9_A) F_(0, 0) F_(0, 0) F_(0, 0) FM(PWM1_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)
320#define IP14_15_12 FM(SSI_SCK349) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) FM(PWM2_C) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0)
321#define IP14_19_16 FM(SSI_WS349) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) FM(PWM3_C) F_(0, 0) 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 IP14_23_20 FM(SSI_SDATA3) FM(AUDIO_CLKOUT1_C) FM(AUDIO_CLKB_B) F_(0, 0) F_(0, 0) F_(0, 0) FM(PWM4_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)
323#define IP14_27_24 FM(SSI_SDATA4) F_(0, 0) FM(SSI_WS9_A) F_(0, 0) F_(0, 0) F_(0, 0) FM(PWM5_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)
324#define IP14_31_28 FM(SSI_SCK5) FM(HRX0_B) F_(0, 0) FM(USB0_PWEN_B) FM(SCL2_D) F_(0, 0) FM(PWM6_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)
325#define IP15_3_0 FM(SSI_WS5) FM(HTX0_B) F_(0, 0) FM(USB0_OVC_B) FM(SDA2_D) F_(0, 0) F_(0, 0) F_(0, 0) 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 IP15_7_4 FM(SSI_SDATA5) FM(HSCK0_B) FM(AUDIO_CLKB_C) FM(TPU0TO0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 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 IP15_11_8 FM(SSI_SCK6) FM(HSCK2_A) FM(AUDIO_CLKC_C) FM(TPU0TO1) F_(0, 0) F_(0, 0) FM(FSO_CFE_0_N_B) F_(0, 0) FM(SIM0_RST_B) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0)
328#define IP15_15_12 FM(SSI_WS6) FM(HCTS2_N_A) FM(AUDIO_CLKOUT2_C) FM(TPU0TO2) FM(SDA1_D) F_(0, 0) FM(FSO_CFE_1_N_B) F_(0, 0) FM(SIM0_D_B) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0)
329#define IP15_19_16 FM(SSI_SDATA6) FM(HRTS2_N_A) FM(AUDIO_CLKOUT3_C) FM(TPU0TO3) FM(SCL1_D) F_(0, 0) FM(FSO_TOE_N_B) F_(0, 0) FM(SIM0_CLK_B) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0)
330#define IP15_23_20 FM(AUDIO_CLKA) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0)
331#define IP15_27_24 FM(USB30_PWEN) FM(USB0_PWEN_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)
332#define IP15_31_28 FM(USB30_OVC) FM(USB0_OVC_A) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) FM(FSO_TOE_N_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)
333
334#define PINMUX_GPSR \
335\
336 \
337 \
338 \
339 \
340 \
341 \
342 GPSR2_25 \
343 GPSR2_24 \
344 GPSR2_23 \
345 GPSR1_22 GPSR2_22 \
346 GPSR1_21 GPSR2_21 \
347 GPSR1_20 GPSR2_20 \
348 GPSR1_19 GPSR2_19 GPSR5_19 \
349 GPSR1_18 GPSR2_18 GPSR5_18 \
350GPSR0_17 GPSR1_17 GPSR2_17 GPSR5_17 GPSR6_17 \
351GPSR0_16 GPSR1_16 GPSR2_16 GPSR5_16 GPSR6_16 \
352GPSR0_15 GPSR1_15 GPSR2_15 GPSR3_15 GPSR5_15 GPSR6_15 \
353GPSR0_14 GPSR1_14 GPSR2_14 GPSR3_14 GPSR5_14 GPSR6_14 \
354GPSR0_13 GPSR1_13 GPSR2_13 GPSR3_13 GPSR5_13 GPSR6_13 \
355GPSR0_12 GPSR1_12 GPSR2_12 GPSR3_12 GPSR5_12 GPSR6_12 \
356GPSR0_11 GPSR1_11 GPSR2_11 GPSR3_11 GPSR5_11 GPSR6_11 \
357GPSR0_10 GPSR1_10 GPSR2_10 GPSR3_10 GPSR4_10 GPSR5_10 GPSR6_10 \
358GPSR0_9 GPSR1_9 GPSR2_9 GPSR3_9 GPSR4_9 GPSR5_9 GPSR6_9 \
359GPSR0_8 GPSR1_8 GPSR2_8 GPSR3_8 GPSR4_8 GPSR5_8 GPSR6_8 \
360GPSR0_7 GPSR1_7 GPSR2_7 GPSR3_7 GPSR4_7 GPSR5_7 GPSR6_7 \
361GPSR0_6 GPSR1_6 GPSR2_6 GPSR3_6 GPSR4_6 GPSR5_6 GPSR6_6 \
362GPSR0_5 GPSR1_5 GPSR2_5 GPSR3_5 GPSR4_5 GPSR5_5 GPSR6_5 \
363GPSR0_4 GPSR1_4 GPSR2_4 GPSR3_4 GPSR4_4 GPSR5_4 GPSR6_4 \
364GPSR0_3 GPSR1_3 GPSR2_3 GPSR3_3 GPSR4_3 GPSR5_3 GPSR6_3 \
365GPSR0_2 GPSR1_2 GPSR2_2 GPSR3_2 GPSR4_2 GPSR5_2 GPSR6_2 \
366GPSR0_1 GPSR1_1 GPSR2_1 GPSR3_1 GPSR4_1 GPSR5_1 GPSR6_1 \
367GPSR0_0 GPSR1_0 GPSR2_0 GPSR3_0 GPSR4_0 GPSR5_0 GPSR6_0
368
369#define PINMUX_IPSR \
370\
371FM(IP0_3_0) IP0_3_0 FM(IP1_3_0) IP1_3_0 FM(IP2_3_0) IP2_3_0 FM(IP3_3_0) IP3_3_0 \
372FM(IP0_7_4) IP0_7_4 FM(IP1_7_4) IP1_7_4 FM(IP2_7_4) IP2_7_4 FM(IP3_7_4) IP3_7_4 \
373FM(IP0_11_8) IP0_11_8 FM(IP1_11_8) IP1_11_8 FM(IP2_11_8) IP2_11_8 FM(IP3_11_8) IP3_11_8 \
374FM(IP0_15_12) IP0_15_12 FM(IP1_15_12) IP1_15_12 FM(IP2_15_12) IP2_15_12 FM(IP3_15_12) IP3_15_12 \
375FM(IP0_19_16) IP0_19_16 FM(IP1_19_16) IP1_19_16 FM(IP2_19_16) IP2_19_16 FM(IP3_19_16) IP3_19_16 \
376FM(IP0_23_20) IP0_23_20 FM(IP1_23_20) IP1_23_20 FM(IP2_23_20) IP2_23_20 FM(IP3_23_20) IP3_23_20 \
377FM(IP0_27_24) IP0_27_24 FM(IP1_27_24) IP1_27_24 FM(IP2_27_24) IP2_27_24 FM(IP3_27_24) IP3_27_24 \
378FM(IP0_31_28) IP0_31_28 FM(IP1_31_28) IP1_31_28 FM(IP2_31_28) IP2_31_28 FM(IP3_31_28) IP3_31_28 \
379\
380FM(IP4_3_0) IP4_3_0 FM(IP5_3_0) IP5_3_0 FM(IP6_3_0) IP6_3_0 FM(IP7_3_0) IP7_3_0 \
381FM(IP4_7_4) IP4_7_4 FM(IP5_7_4) IP5_7_4 FM(IP6_7_4) IP6_7_4 FM(IP7_7_4) IP7_7_4 \
382FM(IP4_11_8) IP4_11_8 FM(IP5_11_8) IP5_11_8 FM(IP6_11_8) IP6_11_8 FM(IP7_11_8) IP7_11_8 \
383FM(IP4_15_12) IP4_15_12 FM(IP5_15_12) IP5_15_12 FM(IP6_15_12) IP6_15_12 FM(IP7_15_12) IP7_15_12 \
384FM(IP4_19_16) IP4_19_16 FM(IP5_19_16) IP5_19_16 FM(IP6_19_16) IP6_19_16 FM(IP7_19_16) IP7_19_16 \
385FM(IP4_23_20) IP4_23_20 FM(IP5_23_20) IP5_23_20 FM(IP6_23_20) IP6_23_20 FM(IP7_23_20) IP7_23_20 \
386FM(IP4_27_24) IP4_27_24 FM(IP5_27_24) IP5_27_24 FM(IP6_27_24) IP6_27_24 FM(IP7_27_24) IP7_27_24 \
387FM(IP4_31_28) IP4_31_28 FM(IP5_31_28) IP5_31_28 FM(IP6_31_28) IP6_31_28 FM(IP7_31_28) IP7_31_28 \
388\
389FM(IP8_3_0) IP8_3_0 FM(IP9_3_0) IP9_3_0 FM(IP10_3_0) IP10_3_0 FM(IP11_3_0) IP11_3_0 \
390FM(IP8_7_4) IP8_7_4 FM(IP9_7_4) IP9_7_4 FM(IP10_7_4) IP10_7_4 FM(IP11_7_4) IP11_7_4 \
391FM(IP8_11_8) IP8_11_8 FM(IP9_11_8) IP9_11_8 FM(IP10_11_8) IP10_11_8 FM(IP11_11_8) IP11_11_8 \
392FM(IP8_15_12) IP8_15_12 FM(IP9_15_12) IP9_15_12 FM(IP10_15_12) IP10_15_12 FM(IP11_15_12) IP11_15_12 \
393FM(IP8_19_16) IP8_19_16 FM(IP9_19_16) IP9_19_16 FM(IP10_19_16) IP10_19_16 FM(IP11_19_16) IP11_19_16 \
394FM(IP8_23_20) IP8_23_20 FM(IP9_23_20) IP9_23_20 FM(IP10_23_20) IP10_23_20 FM(IP11_23_20) IP11_23_20 \
395FM(IP8_27_24) IP8_27_24 FM(IP9_27_24) IP9_27_24 FM(IP10_27_24) IP10_27_24 FM(IP11_27_24) IP11_27_24 \
396FM(IP8_31_28) IP8_31_28 FM(IP9_31_28) IP9_31_28 FM(IP10_31_28) IP10_31_28 FM(IP11_31_28) IP11_31_28 \
397\
398FM(IP12_3_0) IP12_3_0 FM(IP13_3_0) IP13_3_0 FM(IP14_3_0) IP14_3_0 FM(IP15_3_0) IP15_3_0 \
399FM(IP12_7_4) IP12_7_4 FM(IP13_7_4) IP13_7_4 FM(IP14_7_4) IP14_7_4 FM(IP15_7_4) IP15_7_4 \
400FM(IP12_11_8) IP12_11_8 FM(IP13_11_8) IP13_11_8 FM(IP14_11_8) IP14_11_8 FM(IP15_11_8) IP15_11_8 \
401FM(IP12_15_12) IP12_15_12 FM(IP13_15_12) IP13_15_12 FM(IP14_15_12) IP14_15_12 FM(IP15_15_12) IP15_15_12 \
402FM(IP12_19_16) IP12_19_16 FM(IP13_19_16) IP13_19_16 FM(IP14_19_16) IP14_19_16 FM(IP15_19_16) IP15_19_16 \
403FM(IP12_23_20) IP12_23_20 FM(IP13_23_20) IP13_23_20 FM(IP14_23_20) IP14_23_20 FM(IP15_23_20) IP15_23_20 \
404FM(IP12_27_24) IP12_27_24 FM(IP13_27_24) IP13_27_24 FM(IP14_27_24) IP14_27_24 FM(IP15_27_24) IP15_27_24 \
405FM(IP12_31_28) IP12_31_28 FM(IP13_31_28) IP13_31_28 FM(IP14_31_28) IP14_31_28 FM(IP15_31_28) IP15_31_28
406
Marek Vasut88e81ec2019-03-04 22:39:51 +0100407/* The bit numbering in MOD_SEL fields is reversed */
408#define REV4(f0, f1, f2, f3) f0 f2 f1 f3
409#define REV8(f0, f1, f2, f3, f4, f5, f6, f7) f0 f4 f2 f6 f1 f5 f3 f7
410
Marek Vasut68a77042018-04-26 13:09:20 +0200411/* MOD_SEL0 */ /* 0 */ /* 1 */ /* 2 */ /* 3 */ /* 4 */ /* 5 */ /* 6 */ /* 7 */
Marek Vasut88e81ec2019-03-04 22:39:51 +0100412#define MOD_SEL0_30_29 REV4(FM(SEL_ADGB_0), FM(SEL_ADGB_1), FM(SEL_ADGB_2), F_(0, 0))
Marek Vasut68a77042018-04-26 13:09:20 +0200413#define MOD_SEL0_28 FM(SEL_DRIF0_0) FM(SEL_DRIF0_1)
Marek Vasut88e81ec2019-03-04 22:39:51 +0100414#define MOD_SEL0_27_26 REV4(FM(SEL_FM_0), FM(SEL_FM_1), FM(SEL_FM_2), F_(0, 0))
Marek Vasut68a77042018-04-26 13:09:20 +0200415#define MOD_SEL0_25 FM(SEL_FSO_0) FM(SEL_FSO_1)
416#define MOD_SEL0_24 FM(SEL_HSCIF0_0) FM(SEL_HSCIF0_1)
417#define MOD_SEL0_23 FM(SEL_HSCIF1_0) FM(SEL_HSCIF1_1)
418#define MOD_SEL0_22 FM(SEL_HSCIF2_0) FM(SEL_HSCIF2_1)
Marek Vasut88e81ec2019-03-04 22:39:51 +0100419#define MOD_SEL0_21_20 REV4(FM(SEL_I2C1_0), FM(SEL_I2C1_1), FM(SEL_I2C1_2), FM(SEL_I2C1_3))
420#define MOD_SEL0_19_18_17 REV8(FM(SEL_I2C2_0), FM(SEL_I2C2_1), FM(SEL_I2C2_2), FM(SEL_I2C2_3), FM(SEL_I2C2_4), F_(0, 0), F_(0, 0), F_(0, 0))
Eugeniu Roscaf0066b02019-07-09 18:27:11 +0200421#define MOD_SEL0_16 FM(SEL_NDF_0) FM(SEL_NDF_1)
Marek Vasut68a77042018-04-26 13:09:20 +0200422#define MOD_SEL0_15 FM(SEL_PWM0_0) FM(SEL_PWM0_1)
423#define MOD_SEL0_14 FM(SEL_PWM1_0) FM(SEL_PWM1_1)
Marek Vasut88e81ec2019-03-04 22:39:51 +0100424#define MOD_SEL0_13_12 REV4(FM(SEL_PWM2_0), FM(SEL_PWM2_1), FM(SEL_PWM2_2), F_(0, 0))
425#define MOD_SEL0_11_10 REV4(FM(SEL_PWM3_0), FM(SEL_PWM3_1), FM(SEL_PWM3_2), F_(0, 0))
Marek Vasut68a77042018-04-26 13:09:20 +0200426#define MOD_SEL0_9 FM(SEL_PWM4_0) FM(SEL_PWM4_1)
427#define MOD_SEL0_8 FM(SEL_PWM5_0) FM(SEL_PWM5_1)
428#define MOD_SEL0_7 FM(SEL_PWM6_0) FM(SEL_PWM6_1)
Marek Vasut88e81ec2019-03-04 22:39:51 +0100429#define MOD_SEL0_6_5 REV4(FM(SEL_REMOCON_0), FM(SEL_REMOCON_1), FM(SEL_REMOCON_2), F_(0, 0))
Marek Vasut68a77042018-04-26 13:09:20 +0200430#define MOD_SEL0_4 FM(SEL_SCIF_0) FM(SEL_SCIF_1)
431#define MOD_SEL0_3 FM(SEL_SCIF0_0) FM(SEL_SCIF0_1)
432#define MOD_SEL0_2 FM(SEL_SCIF2_0) FM(SEL_SCIF2_1)
Marek Vasut88e81ec2019-03-04 22:39:51 +0100433#define MOD_SEL0_1_0 REV4(FM(SEL_SPEED_PULSE_IF_0), FM(SEL_SPEED_PULSE_IF_1), FM(SEL_SPEED_PULSE_IF_2), F_(0, 0))
Marek Vasut68a77042018-04-26 13:09:20 +0200434
435/* MOD_SEL1 */ /* 0 */ /* 1 */ /* 2 */ /* 3 */ /* 4 */ /* 5 */ /* 6 */ /* 7 */
Lad Prabhakare4db7392020-10-14 16:45:59 +0100436#define MOD_SEL1_31 FM(SEL_SIMCARD_0) FM(SEL_SIMCARD_1)
437#define MOD_SEL1_30 FM(SEL_SSI2_0) FM(SEL_SSI2_1)
Marek Vasut68a77042018-04-26 13:09:20 +0200438#define MOD_SEL1_29 FM(SEL_TIMER_TMU_0) FM(SEL_TIMER_TMU_1)
439#define MOD_SEL1_28 FM(SEL_USB_20_CH0_0) FM(SEL_USB_20_CH0_1)
440#define MOD_SEL1_26 FM(SEL_DRIF2_0) FM(SEL_DRIF2_1)
441#define MOD_SEL1_25 FM(SEL_DRIF3_0) FM(SEL_DRIF3_1)
Marek Vasut88e81ec2019-03-04 22:39:51 +0100442#define MOD_SEL1_24_23_22 REV8(FM(SEL_HSCIF3_0), FM(SEL_HSCIF3_1), FM(SEL_HSCIF3_2), FM(SEL_HSCIF3_3), FM(SEL_HSCIF3_4), F_(0, 0), F_(0, 0), F_(0, 0))
443#define MOD_SEL1_21_20_19 REV8(FM(SEL_HSCIF4_0), FM(SEL_HSCIF4_1), FM(SEL_HSCIF4_2), FM(SEL_HSCIF4_3), FM(SEL_HSCIF4_4), F_(0, 0), F_(0, 0), F_(0, 0))
Marek Vasut68a77042018-04-26 13:09:20 +0200444#define MOD_SEL1_18 FM(SEL_I2C6_0) FM(SEL_I2C6_1)
445#define MOD_SEL1_17 FM(SEL_I2C7_0) FM(SEL_I2C7_1)
446#define MOD_SEL1_16 FM(SEL_MSIOF2_0) FM(SEL_MSIOF2_1)
447#define MOD_SEL1_15 FM(SEL_MSIOF3_0) FM(SEL_MSIOF3_1)
Marek Vasut88e81ec2019-03-04 22:39:51 +0100448#define MOD_SEL1_14_13 REV4(FM(SEL_SCIF3_0), FM(SEL_SCIF3_1), FM(SEL_SCIF3_2), F_(0, 0))
449#define MOD_SEL1_12_11 REV4(FM(SEL_SCIF4_0), FM(SEL_SCIF4_1), FM(SEL_SCIF4_2), F_(0, 0))
450#define MOD_SEL1_10_9 REV4(FM(SEL_SCIF5_0), FM(SEL_SCIF5_1), FM(SEL_SCIF5_2), F_(0, 0))
Marek Vasut68a77042018-04-26 13:09:20 +0200451#define MOD_SEL1_8 FM(SEL_VIN4_0) FM(SEL_VIN4_1)
452#define MOD_SEL1_7 FM(SEL_VIN5_0) FM(SEL_VIN5_1)
Marek Vasut88e81ec2019-03-04 22:39:51 +0100453#define MOD_SEL1_6_5 REV4(FM(SEL_ADGC_0), FM(SEL_ADGC_1), FM(SEL_ADGC_2), F_(0, 0))
Marek Vasut68a77042018-04-26 13:09:20 +0200454#define MOD_SEL1_4 FM(SEL_SSI9_0) FM(SEL_SSI9_1)
455
456#define PINMUX_MOD_SELS \
457\
Lad Prabhakare4db7392020-10-14 16:45:59 +0100458 MOD_SEL1_31 \
459MOD_SEL0_30_29 MOD_SEL1_30 \
Marek Vasut68a77042018-04-26 13:09:20 +0200460 MOD_SEL1_29 \
461MOD_SEL0_28 MOD_SEL1_28 \
462MOD_SEL0_27_26 \
463 MOD_SEL1_26 \
464MOD_SEL0_25 MOD_SEL1_25 \
465MOD_SEL0_24 MOD_SEL1_24_23_22 \
466MOD_SEL0_23 \
467MOD_SEL0_22 \
468MOD_SEL0_21_20 MOD_SEL1_21_20_19 \
469MOD_SEL0_19_18_17 MOD_SEL1_18 \
470 MOD_SEL1_17 \
471MOD_SEL0_16 MOD_SEL1_16 \
472MOD_SEL0_15 MOD_SEL1_15 \
473MOD_SEL0_14 MOD_SEL1_14_13 \
474MOD_SEL0_13_12 \
475 MOD_SEL1_12_11 \
476MOD_SEL0_11_10 \
477 MOD_SEL1_10_9 \
478MOD_SEL0_9 \
479MOD_SEL0_8 MOD_SEL1_8 \
480MOD_SEL0_7 MOD_SEL1_7 \
481MOD_SEL0_6_5 MOD_SEL1_6_5 \
482MOD_SEL0_4 MOD_SEL1_4 \
483MOD_SEL0_3 \
484MOD_SEL0_2 \
485MOD_SEL0_1_0
486
Marek Vasuteb13e0f2018-06-10 16:05:48 +0200487/*
488 * These pins are not able to be muxed but have other properties
489 * that can be set, such as pull-up/pull-down enable.
490 */
491#define PINMUX_STATIC \
492 FM(AVB_TX_CTL) FM(AVB_TXC) FM(AVB_TD0) FM(AVB_TD1) FM(AVB_TD2) \
493 FM(AVB_TD3) \
494 FM(PRESETOUT_N) FM(FSCLKST_N) FM(TRST_N) FM(TCK) FM(TMS) FM(TDI) \
495 FM(ASEBRK) \
496 FM(MLB_REF)
497
Marek Vasut68a77042018-04-26 13:09:20 +0200498enum {
499 PINMUX_RESERVED = 0,
500
501 PINMUX_DATA_BEGIN,
502 GP_ALL(DATA),
503 PINMUX_DATA_END,
504
505#define F_(x, y)
506#define FM(x) FN_##x,
507 PINMUX_FUNCTION_BEGIN,
508 GP_ALL(FN),
509 PINMUX_GPSR
510 PINMUX_IPSR
511 PINMUX_MOD_SELS
512 PINMUX_FUNCTION_END,
513#undef F_
514#undef FM
515
516#define F_(x, y)
517#define FM(x) x##_MARK,
518 PINMUX_MARK_BEGIN,
519 PINMUX_GPSR
520 PINMUX_IPSR
521 PINMUX_MOD_SELS
Marek Vasuteb13e0f2018-06-10 16:05:48 +0200522 PINMUX_STATIC
Marek Vasut68a77042018-04-26 13:09:20 +0200523 PINMUX_MARK_END,
524#undef F_
525#undef FM
526};
527
528static const u16 pinmux_data[] = {
529 PINMUX_DATA_GP_ALL(),
530
Marek Vasuteb13e0f2018-06-10 16:05:48 +0200531 PINMUX_SINGLE(CLKOUT),
532 PINMUX_SINGLE(AVB_PHY_INT),
533 PINMUX_SINGLE(AVB_RD3),
534 PINMUX_SINGLE(AVB_RXC),
535 PINMUX_SINGLE(AVB_RX_CTL),
536 PINMUX_SINGLE(QSPI0_SSL),
537
Marek Vasut68a77042018-04-26 13:09:20 +0200538 /* IPSR0 */
539 PINMUX_IPSR_GPSR(IP0_3_0, QSPI0_SPCLK),
540 PINMUX_IPSR_MSEL(IP0_3_0, HSCK4_A, SEL_HSCIF4_0),
541
542 PINMUX_IPSR_GPSR(IP0_7_4, QSPI0_MOSI_IO0),
543 PINMUX_IPSR_MSEL(IP0_7_4, HCTS4_N_A, SEL_HSCIF4_0),
544
545 PINMUX_IPSR_GPSR(IP0_11_8, QSPI0_MISO_IO1),
546 PINMUX_IPSR_MSEL(IP0_11_8, HRTS4_N_A, SEL_HSCIF4_0),
547
548 PINMUX_IPSR_GPSR(IP0_15_12, QSPI0_IO2),
549 PINMUX_IPSR_GPSR(IP0_15_12, HTX4_A),
550
551 PINMUX_IPSR_GPSR(IP0_19_16, QSPI0_IO3),
552 PINMUX_IPSR_MSEL(IP0_19_16, HRX4_A, SEL_HSCIF4_0),
553
554 PINMUX_IPSR_GPSR(IP0_23_20, QSPI1_SPCLK),
555 PINMUX_IPSR_MSEL(IP0_23_20, RIF2_CLK_A, SEL_DRIF2_0),
556 PINMUX_IPSR_MSEL(IP0_23_20, HSCK4_B, SEL_HSCIF4_1),
557 PINMUX_IPSR_MSEL(IP0_23_20, VI4_DATA0_A, SEL_VIN4_0),
558
559 PINMUX_IPSR_GPSR(IP0_27_24, QSPI1_MOSI_IO0),
560 PINMUX_IPSR_MSEL(IP0_27_24, RIF2_SYNC_A, SEL_DRIF2_0),
561 PINMUX_IPSR_GPSR(IP0_27_24, HTX4_B),
562 PINMUX_IPSR_MSEL(IP0_27_24, VI4_DATA1_A, SEL_VIN4_0),
563
564 PINMUX_IPSR_GPSR(IP0_31_28, QSPI1_MISO_IO1),
565 PINMUX_IPSR_MSEL(IP0_31_28, RIF2_D0_A, SEL_DRIF2_0),
566 PINMUX_IPSR_MSEL(IP0_31_28, HRX4_B, SEL_HSCIF4_1),
567 PINMUX_IPSR_MSEL(IP0_31_28, VI4_DATA2_A, SEL_VIN4_0),
568
569 /* IPSR1 */
570 PINMUX_IPSR_GPSR(IP1_3_0, QSPI1_IO2),
571 PINMUX_IPSR_MSEL(IP1_3_0, RIF2_D1_A, SEL_DRIF2_0),
572 PINMUX_IPSR_GPSR(IP1_3_0, HTX3_C),
573 PINMUX_IPSR_MSEL(IP1_3_0, VI4_DATA3_A, SEL_VIN4_0),
574
575 PINMUX_IPSR_GPSR(IP1_7_4, QSPI1_IO3),
576 PINMUX_IPSR_MSEL(IP1_7_4, RIF3_CLK_A, SEL_DRIF3_0),
577 PINMUX_IPSR_MSEL(IP1_7_4, HRX3_C, SEL_HSCIF3_2),
578 PINMUX_IPSR_MSEL(IP1_7_4, VI4_DATA4_A, SEL_VIN4_0),
579
580 PINMUX_IPSR_GPSR(IP1_11_8, QSPI1_SSL),
581 PINMUX_IPSR_MSEL(IP1_11_8, RIF3_SYNC_A, SEL_DRIF3_0),
582 PINMUX_IPSR_MSEL(IP1_11_8, HSCK3_C, SEL_HSCIF3_2),
583 PINMUX_IPSR_MSEL(IP1_11_8, VI4_DATA5_A, SEL_VIN4_0),
584
585 PINMUX_IPSR_GPSR(IP1_15_12, RPC_INT_N),
586 PINMUX_IPSR_MSEL(IP1_15_12, RIF3_D0_A, SEL_DRIF3_0),
587 PINMUX_IPSR_MSEL(IP1_15_12, HCTS3_N_C, SEL_HSCIF3_2),
588 PINMUX_IPSR_MSEL(IP1_15_12, VI4_DATA6_A, SEL_VIN4_0),
589
590 PINMUX_IPSR_GPSR(IP1_19_16, RPC_RESET_N),
591 PINMUX_IPSR_MSEL(IP1_19_16, RIF3_D1_A, SEL_DRIF3_0),
592 PINMUX_IPSR_MSEL(IP1_19_16, HRTS3_N_C, SEL_HSCIF3_2),
593 PINMUX_IPSR_MSEL(IP1_19_16, VI4_DATA7_A, SEL_VIN4_0),
594
595 PINMUX_IPSR_GPSR(IP1_23_20, AVB_RD0),
596
597 PINMUX_IPSR_GPSR(IP1_27_24, AVB_RD1),
598
599 PINMUX_IPSR_GPSR(IP1_31_28, AVB_RD2),
600
601 /* IPSR2 */
602 PINMUX_IPSR_GPSR(IP2_3_0, AVB_TXCREFCLK),
603
604 PINMUX_IPSR_GPSR(IP2_7_4, AVB_MDIO),
605
606 PINMUX_IPSR_GPSR(IP2_11_8, AVB_MDC),
607
608 PINMUX_IPSR_GPSR(IP2_15_12, BS_N),
609 PINMUX_IPSR_MSEL(IP2_15_12, PWM0_A, SEL_PWM0_0),
610 PINMUX_IPSR_GPSR(IP2_15_12, AVB_MAGIC),
611 PINMUX_IPSR_GPSR(IP2_15_12, VI4_CLK),
612 PINMUX_IPSR_GPSR(IP2_15_12, TX3_C),
613 PINMUX_IPSR_MSEL(IP2_15_12, VI5_CLK_B, SEL_VIN5_1),
614
615 PINMUX_IPSR_GPSR(IP2_19_16, RD_N),
616 PINMUX_IPSR_MSEL(IP2_19_16, PWM1_A, SEL_PWM1_0),
617 PINMUX_IPSR_GPSR(IP2_19_16, AVB_LINK),
618 PINMUX_IPSR_GPSR(IP2_19_16, VI4_FIELD),
619 PINMUX_IPSR_MSEL(IP2_19_16, RX3_C, SEL_SCIF3_2),
620 PINMUX_IPSR_GPSR(IP2_19_16, FSCLKST2_N_A),
621 PINMUX_IPSR_MSEL(IP2_19_16, VI5_DATA0_B, SEL_VIN5_1),
622
623 PINMUX_IPSR_GPSR(IP2_23_20, RD_WR_N),
624 PINMUX_IPSR_MSEL(IP2_23_20, SCL7_A, SEL_I2C7_0),
Lad Prabhakare4db7392020-10-14 16:45:59 +0100625 PINMUX_IPSR_GPSR(IP2_23_20, AVB_AVTP_MATCH),
Marek Vasut68a77042018-04-26 13:09:20 +0200626 PINMUX_IPSR_GPSR(IP2_23_20, VI4_VSYNC_N),
627 PINMUX_IPSR_GPSR(IP2_23_20, TX5_B),
628 PINMUX_IPSR_MSEL(IP2_23_20, SCK3_C, SEL_SCIF3_2),
629 PINMUX_IPSR_MSEL(IP2_23_20, PWM5_A, SEL_PWM5_0),
630
631 PINMUX_IPSR_GPSR(IP2_27_24, EX_WAIT0),
632 PINMUX_IPSR_MSEL(IP2_27_24, SDA7_A, SEL_I2C7_0),
Lad Prabhakare4db7392020-10-14 16:45:59 +0100633 PINMUX_IPSR_GPSR(IP2_27_24, AVB_AVTP_CAPTURE),
Marek Vasut68a77042018-04-26 13:09:20 +0200634 PINMUX_IPSR_GPSR(IP2_27_24, VI4_HSYNC_N),
635 PINMUX_IPSR_MSEL(IP2_27_24, RX5_B, SEL_SCIF5_1),
636 PINMUX_IPSR_MSEL(IP2_27_24, PWM6_A, SEL_PWM6_0),
637
638 PINMUX_IPSR_GPSR(IP2_31_28, A0),
639 PINMUX_IPSR_GPSR(IP2_31_28, IRQ0),
640 PINMUX_IPSR_MSEL(IP2_31_28, PWM2_A, SEL_PWM2_0),
641 PINMUX_IPSR_MSEL(IP2_31_28, MSIOF3_SS1_B, SEL_MSIOF3_1),
642 PINMUX_IPSR_MSEL(IP2_31_28, VI5_CLK_A, SEL_VIN5_0),
643 PINMUX_IPSR_GPSR(IP2_31_28, DU_CDE),
644 PINMUX_IPSR_MSEL(IP2_31_28, HRX3_D, SEL_HSCIF3_3),
645 PINMUX_IPSR_GPSR(IP2_31_28, IERX),
646 PINMUX_IPSR_GPSR(IP2_31_28, QSTB_QHE),
647
648 /* IPSR3 */
649 PINMUX_IPSR_GPSR(IP3_3_0, A1),
650 PINMUX_IPSR_GPSR(IP3_3_0, IRQ1),
651 PINMUX_IPSR_MSEL(IP3_3_0, PWM3_A, SEL_PWM3_0),
652 PINMUX_IPSR_GPSR(IP3_3_0, DU_DOTCLKIN1),
653 PINMUX_IPSR_MSEL(IP3_3_0, VI5_DATA0_A, SEL_VIN5_0),
654 PINMUX_IPSR_GPSR(IP3_3_0, DU_DISP_CDE),
655 PINMUX_IPSR_MSEL(IP3_3_0, SDA6_B, SEL_I2C6_1),
656 PINMUX_IPSR_GPSR(IP3_3_0, IETX),
657 PINMUX_IPSR_GPSR(IP3_3_0, QCPV_QDE),
658
659 PINMUX_IPSR_GPSR(IP3_7_4, A2),
660 PINMUX_IPSR_GPSR(IP3_7_4, IRQ2),
661 PINMUX_IPSR_GPSR(IP3_7_4, AVB_AVTP_PPS),
662 PINMUX_IPSR_GPSR(IP3_7_4, VI4_CLKENB),
663 PINMUX_IPSR_MSEL(IP3_7_4, VI5_DATA1_A, SEL_VIN5_0),
664 PINMUX_IPSR_GPSR(IP3_7_4, DU_DISP),
665 PINMUX_IPSR_MSEL(IP3_7_4, SCL6_B, SEL_I2C6_1),
666 PINMUX_IPSR_GPSR(IP3_7_4, QSTVB_QVE),
667
668 PINMUX_IPSR_GPSR(IP3_11_8, A3),
669 PINMUX_IPSR_MSEL(IP3_11_8, CTS4_N_A, SEL_SCIF4_0),
670 PINMUX_IPSR_MSEL(IP3_11_8, PWM4_A, SEL_PWM4_0),
671 PINMUX_IPSR_GPSR(IP3_11_8, VI4_DATA12),
672 PINMUX_IPSR_GPSR(IP3_11_8, DU_DOTCLKOUT0),
673 PINMUX_IPSR_GPSR(IP3_11_8, HTX3_D),
674 PINMUX_IPSR_GPSR(IP3_11_8, IECLK),
675 PINMUX_IPSR_GPSR(IP3_11_8, LCDOUT12),
676
677 PINMUX_IPSR_GPSR(IP3_15_12, A4),
Eugeniu Roscaf0066b02019-07-09 18:27:11 +0200678 PINMUX_IPSR_MSEL(IP3_15_12, RTS4_N_A, SEL_SCIF4_0),
Marek Vasut68a77042018-04-26 13:09:20 +0200679 PINMUX_IPSR_MSEL(IP3_15_12, MSIOF3_SYNC_B, SEL_MSIOF3_1),
680 PINMUX_IPSR_GPSR(IP3_15_12, VI4_DATA8),
681 PINMUX_IPSR_MSEL(IP3_15_12, PWM2_B, SEL_PWM2_1),
682 PINMUX_IPSR_GPSR(IP3_15_12, DU_DG4),
683 PINMUX_IPSR_MSEL(IP3_15_12, RIF2_CLK_B, SEL_DRIF2_1),
684
685 PINMUX_IPSR_GPSR(IP3_19_16, A5),
686 PINMUX_IPSR_MSEL(IP3_19_16, SCK4_A, SEL_SCIF4_0),
687 PINMUX_IPSR_MSEL(IP3_19_16, MSIOF3_SCK_B, SEL_MSIOF3_1),
688 PINMUX_IPSR_GPSR(IP3_19_16, VI4_DATA9),
689 PINMUX_IPSR_MSEL(IP3_19_16, PWM3_B, SEL_PWM3_1),
690 PINMUX_IPSR_MSEL(IP3_19_16, RIF2_SYNC_B, SEL_DRIF2_1),
691 PINMUX_IPSR_GPSR(IP3_19_16, QPOLA),
692
693 PINMUX_IPSR_GPSR(IP3_23_20, A6),
694 PINMUX_IPSR_MSEL(IP3_23_20, RX4_A, SEL_SCIF4_0),
695 PINMUX_IPSR_MSEL(IP3_23_20, MSIOF3_RXD_B, SEL_MSIOF3_1),
696 PINMUX_IPSR_GPSR(IP3_23_20, VI4_DATA10),
697 PINMUX_IPSR_MSEL(IP3_23_20, RIF2_D0_B, SEL_DRIF2_1),
698
699 PINMUX_IPSR_GPSR(IP3_27_24, A7),
700 PINMUX_IPSR_GPSR(IP3_27_24, TX4_A),
701 PINMUX_IPSR_GPSR(IP3_27_24, MSIOF3_TXD_B),
702 PINMUX_IPSR_GPSR(IP3_27_24, VI4_DATA11),
703 PINMUX_IPSR_MSEL(IP3_27_24, RIF2_D1_B, SEL_DRIF2_1),
704
705 PINMUX_IPSR_GPSR(IP3_31_28, A8),
706 PINMUX_IPSR_MSEL(IP3_31_28, SDA6_A, SEL_I2C6_0),
707 PINMUX_IPSR_MSEL(IP3_31_28, RX3_B, SEL_SCIF3_1),
708 PINMUX_IPSR_MSEL(IP3_31_28, HRX4_C, SEL_HSCIF4_2),
709 PINMUX_IPSR_MSEL(IP3_31_28, VI5_HSYNC_N_A, SEL_VIN5_0),
710 PINMUX_IPSR_GPSR(IP3_31_28, DU_HSYNC),
711 PINMUX_IPSR_MSEL(IP3_31_28, VI4_DATA0_B, SEL_VIN4_1),
712 PINMUX_IPSR_GPSR(IP3_31_28, QSTH_QHS),
713
714 /* IPSR4 */
715 PINMUX_IPSR_GPSR(IP4_3_0, A9),
716 PINMUX_IPSR_GPSR(IP4_3_0, TX5_A),
717 PINMUX_IPSR_GPSR(IP4_3_0, IRQ3),
718 PINMUX_IPSR_GPSR(IP4_3_0, VI4_DATA16),
719 PINMUX_IPSR_MSEL(IP4_3_0, VI5_VSYNC_N_A, SEL_VIN5_0),
720 PINMUX_IPSR_GPSR(IP4_3_0, DU_DG7),
721 PINMUX_IPSR_GPSR(IP4_3_0, LCDOUT15),
722
723 PINMUX_IPSR_GPSR(IP4_7_4, A10),
724 PINMUX_IPSR_GPSR(IP4_7_4, IRQ4),
725 PINMUX_IPSR_MSEL(IP4_7_4, MSIOF2_SYNC_B, SEL_MSIOF2_1),
726 PINMUX_IPSR_GPSR(IP4_7_4, VI4_DATA13),
727 PINMUX_IPSR_MSEL(IP4_7_4, VI5_FIELD_A, SEL_VIN5_0),
728 PINMUX_IPSR_GPSR(IP4_7_4, DU_DG5),
729 PINMUX_IPSR_GPSR(IP4_7_4, FSCLKST2_N_B),
730 PINMUX_IPSR_GPSR(IP4_7_4, LCDOUT13),
731
732 PINMUX_IPSR_GPSR(IP4_11_8, A11),
733 PINMUX_IPSR_MSEL(IP4_11_8, SCL6_A, SEL_I2C6_0),
734 PINMUX_IPSR_GPSR(IP4_11_8, TX3_B),
735 PINMUX_IPSR_GPSR(IP4_11_8, HTX4_C),
736 PINMUX_IPSR_GPSR(IP4_11_8, DU_VSYNC),
737 PINMUX_IPSR_MSEL(IP4_11_8, VI4_DATA1_B, SEL_VIN4_1),
738 PINMUX_IPSR_GPSR(IP4_11_8, QSTVA_QVS),
739
740 PINMUX_IPSR_GPSR(IP4_15_12, A12),
741 PINMUX_IPSR_MSEL(IP4_15_12, RX5_A, SEL_SCIF5_0),
742 PINMUX_IPSR_GPSR(IP4_15_12, MSIOF2_SS2_B),
743 PINMUX_IPSR_GPSR(IP4_15_12, VI4_DATA17),
744 PINMUX_IPSR_MSEL(IP4_15_12, VI5_DATA3_A, SEL_VIN5_0),
745 PINMUX_IPSR_GPSR(IP4_15_12, DU_DG6),
746 PINMUX_IPSR_GPSR(IP4_15_12, LCDOUT14),
747
748 PINMUX_IPSR_GPSR(IP4_19_16, A13),
749 PINMUX_IPSR_MSEL(IP4_19_16, SCK5_A, SEL_SCIF5_0),
750 PINMUX_IPSR_MSEL(IP4_19_16, MSIOF2_SCK_B, SEL_MSIOF2_1),
751 PINMUX_IPSR_GPSR(IP4_19_16, VI4_DATA14),
752 PINMUX_IPSR_MSEL(IP4_19_16, HRX4_D, SEL_HSCIF4_3),
753 PINMUX_IPSR_GPSR(IP4_19_16, DU_DB2),
754 PINMUX_IPSR_GPSR(IP4_19_16, LCDOUT2),
755
756 PINMUX_IPSR_GPSR(IP4_23_20, A14),
757 PINMUX_IPSR_GPSR(IP4_23_20, MSIOF1_SS1),
758 PINMUX_IPSR_MSEL(IP4_23_20, MSIOF2_RXD_B, SEL_MSIOF2_1),
759 PINMUX_IPSR_GPSR(IP4_23_20, VI4_DATA15),
760 PINMUX_IPSR_GPSR(IP4_23_20, HTX4_D),
761 PINMUX_IPSR_GPSR(IP4_23_20, DU_DB3),
762 PINMUX_IPSR_GPSR(IP4_23_20, LCDOUT3),
763
764 PINMUX_IPSR_GPSR(IP4_27_24, A15),
765 PINMUX_IPSR_GPSR(IP4_27_24, MSIOF1_SS2),
766 PINMUX_IPSR_GPSR(IP4_27_24, MSIOF2_TXD_B),
767 PINMUX_IPSR_GPSR(IP4_27_24, VI4_DATA18),
768 PINMUX_IPSR_MSEL(IP4_27_24, VI5_DATA4_A, SEL_VIN5_0),
769 PINMUX_IPSR_GPSR(IP4_27_24, DU_DB4),
770 PINMUX_IPSR_GPSR(IP4_27_24, LCDOUT4),
771
772 PINMUX_IPSR_GPSR(IP4_31_28, A16),
773 PINMUX_IPSR_GPSR(IP4_31_28, MSIOF1_SYNC),
774 PINMUX_IPSR_GPSR(IP4_31_28, MSIOF2_SS1_B),
775 PINMUX_IPSR_GPSR(IP4_31_28, VI4_DATA19),
776 PINMUX_IPSR_MSEL(IP4_31_28, VI5_DATA5_A, SEL_VIN5_0),
777 PINMUX_IPSR_GPSR(IP4_31_28, DU_DB5),
778 PINMUX_IPSR_GPSR(IP4_31_28, LCDOUT5),
779
780 /* IPSR5 */
781 PINMUX_IPSR_GPSR(IP5_3_0, A17),
782 PINMUX_IPSR_GPSR(IP5_3_0, MSIOF1_RXD),
783 PINMUX_IPSR_GPSR(IP5_3_0, VI4_DATA20),
784 PINMUX_IPSR_MSEL(IP5_3_0, VI5_DATA6_A, SEL_VIN5_0),
785 PINMUX_IPSR_GPSR(IP5_3_0, DU_DB6),
786 PINMUX_IPSR_GPSR(IP5_3_0, LCDOUT6),
787
788 PINMUX_IPSR_GPSR(IP5_7_4, A18),
789 PINMUX_IPSR_GPSR(IP5_7_4, MSIOF1_TXD),
790 PINMUX_IPSR_GPSR(IP5_7_4, VI4_DATA21),
791 PINMUX_IPSR_MSEL(IP5_7_4, VI5_DATA7_A, SEL_VIN5_0),
792 PINMUX_IPSR_GPSR(IP5_7_4, DU_DB0),
793 PINMUX_IPSR_MSEL(IP5_7_4, HRX4_E, SEL_HSCIF4_4),
794 PINMUX_IPSR_GPSR(IP5_7_4, LCDOUT0),
795
796 PINMUX_IPSR_GPSR(IP5_11_8, A19),
797 PINMUX_IPSR_GPSR(IP5_11_8, MSIOF1_SCK),
798 PINMUX_IPSR_GPSR(IP5_11_8, VI4_DATA22),
799 PINMUX_IPSR_MSEL(IP5_11_8, VI5_DATA2_A, SEL_VIN5_0),
800 PINMUX_IPSR_GPSR(IP5_11_8, DU_DB1),
801 PINMUX_IPSR_GPSR(IP5_11_8, HTX4_E),
802 PINMUX_IPSR_GPSR(IP5_11_8, LCDOUT1),
803
804 PINMUX_IPSR_GPSR(IP5_15_12, CS0_N),
805 PINMUX_IPSR_GPSR(IP5_15_12, SCL5),
806 PINMUX_IPSR_GPSR(IP5_15_12, DU_DR0),
807 PINMUX_IPSR_MSEL(IP5_15_12, VI4_DATA2_B, SEL_VIN4_1),
808 PINMUX_IPSR_GPSR(IP5_15_12, LCDOUT16),
809
810 PINMUX_IPSR_GPSR(IP5_19_16, WE0_N),
811 PINMUX_IPSR_GPSR(IP5_19_16, SDA5),
812 PINMUX_IPSR_GPSR(IP5_19_16, DU_DR1),
813 PINMUX_IPSR_MSEL(IP5_19_16, VI4_DATA3_B, SEL_VIN4_1),
814 PINMUX_IPSR_GPSR(IP5_19_16, LCDOUT17),
815
816 PINMUX_IPSR_GPSR(IP5_23_20, D0),
817 PINMUX_IPSR_MSEL(IP5_23_20, MSIOF3_SCK_A, SEL_MSIOF3_0),
818 PINMUX_IPSR_GPSR(IP5_23_20, DU_DR2),
819 PINMUX_IPSR_MSEL(IP5_23_20, CTS4_N_C, SEL_SCIF4_2),
820 PINMUX_IPSR_GPSR(IP5_23_20, LCDOUT18),
821
822 PINMUX_IPSR_GPSR(IP5_27_24, D1),
823 PINMUX_IPSR_MSEL(IP5_27_24, MSIOF3_SYNC_A, SEL_MSIOF3_0),
824 PINMUX_IPSR_MSEL(IP5_27_24, SCK3_A, SEL_SCIF3_0),
825 PINMUX_IPSR_GPSR(IP5_27_24, VI4_DATA23),
826 PINMUX_IPSR_MSEL(IP5_27_24, VI5_CLKENB_A, SEL_VIN5_0),
827 PINMUX_IPSR_GPSR(IP5_27_24, DU_DB7),
Eugeniu Roscaf0066b02019-07-09 18:27:11 +0200828 PINMUX_IPSR_MSEL(IP5_27_24, RTS4_N_C, SEL_SCIF4_2),
Marek Vasut68a77042018-04-26 13:09:20 +0200829 PINMUX_IPSR_GPSR(IP5_27_24, LCDOUT7),
830
831 PINMUX_IPSR_GPSR(IP5_31_28, D2),
832 PINMUX_IPSR_MSEL(IP5_31_28, MSIOF3_RXD_A, SEL_MSIOF3_0),
833 PINMUX_IPSR_MSEL(IP5_31_28, RX5_C, SEL_SCIF5_2),
834 PINMUX_IPSR_MSEL(IP5_31_28, VI5_DATA14_A, SEL_VIN5_0),
835 PINMUX_IPSR_GPSR(IP5_31_28, DU_DR3),
836 PINMUX_IPSR_MSEL(IP5_31_28, RX4_C, SEL_SCIF4_2),
837 PINMUX_IPSR_GPSR(IP5_31_28, LCDOUT19),
838
839 /* IPSR6 */
840 PINMUX_IPSR_GPSR(IP6_3_0, D3),
841 PINMUX_IPSR_GPSR(IP6_3_0, MSIOF3_TXD_A),
842 PINMUX_IPSR_GPSR(IP6_3_0, TX5_C),
843 PINMUX_IPSR_MSEL(IP6_3_0, VI5_DATA15_A, SEL_VIN5_0),
844 PINMUX_IPSR_GPSR(IP6_3_0, DU_DR4),
845 PINMUX_IPSR_GPSR(IP6_3_0, TX4_C),
846 PINMUX_IPSR_GPSR(IP6_3_0, LCDOUT20),
847
848 PINMUX_IPSR_GPSR(IP6_7_4, D4),
849 PINMUX_IPSR_GPSR(IP6_7_4, CANFD1_TX),
850 PINMUX_IPSR_MSEL(IP6_7_4, HSCK3_B, SEL_HSCIF3_1),
851 PINMUX_IPSR_GPSR(IP6_7_4, CAN1_TX),
Eugeniu Roscaf0066b02019-07-09 18:27:11 +0200852 PINMUX_IPSR_MSEL(IP6_7_4, RTS3_N_A, SEL_SCIF3_0),
Marek Vasut68a77042018-04-26 13:09:20 +0200853 PINMUX_IPSR_GPSR(IP6_7_4, MSIOF3_SS2_A),
854 PINMUX_IPSR_MSEL(IP6_7_4, VI5_DATA1_B, SEL_VIN5_1),
855
856 PINMUX_IPSR_GPSR(IP6_11_8, D5),
857 PINMUX_IPSR_MSEL(IP6_11_8, RX3_A, SEL_SCIF3_0),
858 PINMUX_IPSR_MSEL(IP6_11_8, HRX3_B, SEL_HSCIF3_1),
859 PINMUX_IPSR_GPSR(IP6_11_8, DU_DR5),
860 PINMUX_IPSR_MSEL(IP6_11_8, VI4_DATA4_B, SEL_VIN4_1),
861 PINMUX_IPSR_GPSR(IP6_11_8, LCDOUT21),
862
863 PINMUX_IPSR_GPSR(IP6_15_12, D6),
864 PINMUX_IPSR_GPSR(IP6_15_12, TX3_A),
865 PINMUX_IPSR_GPSR(IP6_15_12, HTX3_B),
866 PINMUX_IPSR_GPSR(IP6_15_12, DU_DR6),
867 PINMUX_IPSR_MSEL(IP6_15_12, VI4_DATA5_B, SEL_VIN4_1),
868 PINMUX_IPSR_GPSR(IP6_15_12, LCDOUT22),
869
870 PINMUX_IPSR_GPSR(IP6_19_16, D7),
871 PINMUX_IPSR_GPSR(IP6_19_16, CANFD1_RX),
872 PINMUX_IPSR_GPSR(IP6_19_16, IRQ5),
873 PINMUX_IPSR_GPSR(IP6_19_16, CAN1_RX),
874 PINMUX_IPSR_MSEL(IP6_19_16, CTS3_N_A, SEL_SCIF3_0),
875 PINMUX_IPSR_MSEL(IP6_19_16, VI5_DATA2_B, SEL_VIN5_1),
876
877 PINMUX_IPSR_GPSR(IP6_23_20, D8),
878 PINMUX_IPSR_MSEL(IP6_23_20, MSIOF2_SCK_A, SEL_MSIOF2_0),
879 PINMUX_IPSR_MSEL(IP6_23_20, SCK4_B, SEL_SCIF4_1),
880 PINMUX_IPSR_MSEL(IP6_23_20, VI5_DATA12_A, SEL_VIN5_0),
881 PINMUX_IPSR_GPSR(IP6_23_20, DU_DR7),
882 PINMUX_IPSR_MSEL(IP6_23_20, RIF3_CLK_B, SEL_DRIF3_1),
883 PINMUX_IPSR_MSEL(IP6_23_20, HCTS3_N_E, SEL_HSCIF3_4),
884 PINMUX_IPSR_GPSR(IP6_23_20, LCDOUT23),
885
886 PINMUX_IPSR_GPSR(IP6_27_24, D9),
887 PINMUX_IPSR_MSEL(IP6_27_24, MSIOF2_SYNC_A, SEL_MSIOF2_0),
888 PINMUX_IPSR_MSEL(IP6_27_24, VI5_DATA10_A, SEL_VIN5_0),
889 PINMUX_IPSR_GPSR(IP6_27_24, DU_DG0),
890 PINMUX_IPSR_MSEL(IP6_27_24, RIF3_SYNC_B, SEL_DRIF3_1),
891 PINMUX_IPSR_MSEL(IP6_27_24, HRX3_E, SEL_HSCIF3_4),
892 PINMUX_IPSR_GPSR(IP6_27_24, LCDOUT8),
893
894 PINMUX_IPSR_GPSR(IP6_31_28, D10),
895 PINMUX_IPSR_MSEL(IP6_31_28, MSIOF2_RXD_A, SEL_MSIOF2_0),
896 PINMUX_IPSR_MSEL(IP6_31_28, VI5_DATA13_A, SEL_VIN5_0),
897 PINMUX_IPSR_GPSR(IP6_31_28, DU_DG1),
898 PINMUX_IPSR_MSEL(IP6_31_28, RIF3_D0_B, SEL_DRIF3_1),
899 PINMUX_IPSR_GPSR(IP6_31_28, HTX3_E),
900 PINMUX_IPSR_GPSR(IP6_31_28, LCDOUT9),
901
902 /* IPSR7 */
903 PINMUX_IPSR_GPSR(IP7_3_0, D11),
904 PINMUX_IPSR_GPSR(IP7_3_0, MSIOF2_TXD_A),
905 PINMUX_IPSR_MSEL(IP7_3_0, VI5_DATA11_A, SEL_VIN5_0),
906 PINMUX_IPSR_GPSR(IP7_3_0, DU_DG2),
907 PINMUX_IPSR_MSEL(IP7_3_0, RIF3_D1_B, SEL_DRIF3_1),
908 PINMUX_IPSR_MSEL(IP7_3_0, HRTS3_N_E, SEL_HSCIF3_4),
909 PINMUX_IPSR_GPSR(IP7_3_0, LCDOUT10),
910
911 PINMUX_IPSR_GPSR(IP7_7_4, D12),
912 PINMUX_IPSR_GPSR(IP7_7_4, CANFD0_TX),
913 PINMUX_IPSR_GPSR(IP7_7_4, TX4_B),
914 PINMUX_IPSR_GPSR(IP7_7_4, CAN0_TX),
915 PINMUX_IPSR_MSEL(IP7_7_4, VI5_DATA8_A, SEL_VIN5_0),
916 PINMUX_IPSR_MSEL(IP7_7_4, VI5_DATA3_B, SEL_VIN5_1),
917
918 PINMUX_IPSR_GPSR(IP7_11_8, D13),
919 PINMUX_IPSR_GPSR(IP7_11_8, CANFD0_RX),
920 PINMUX_IPSR_MSEL(IP7_11_8, RX4_B, SEL_SCIF4_1),
921 PINMUX_IPSR_GPSR(IP7_11_8, CAN0_RX),
922 PINMUX_IPSR_MSEL(IP7_11_8, VI5_DATA9_A, SEL_VIN5_0),
923 PINMUX_IPSR_MSEL(IP7_11_8, SCL7_B, SEL_I2C7_1),
924 PINMUX_IPSR_MSEL(IP7_11_8, VI5_DATA4_B, SEL_VIN5_1),
925
926 PINMUX_IPSR_GPSR(IP7_15_12, D14),
927 PINMUX_IPSR_GPSR(IP7_15_12, CAN_CLK),
928 PINMUX_IPSR_MSEL(IP7_15_12, HRX3_A, SEL_HSCIF3_0),
929 PINMUX_IPSR_GPSR(IP7_15_12, MSIOF2_SS2_A),
930 PINMUX_IPSR_MSEL(IP7_15_12, SDA7_B, SEL_I2C7_1),
931 PINMUX_IPSR_MSEL(IP7_15_12, VI5_DATA5_B, SEL_VIN5_1),
932
933 PINMUX_IPSR_GPSR(IP7_19_16, D15),
934 PINMUX_IPSR_GPSR(IP7_19_16, MSIOF2_SS1_A),
935 PINMUX_IPSR_GPSR(IP7_19_16, HTX3_A),
936 PINMUX_IPSR_GPSR(IP7_19_16, MSIOF3_SS1_A),
937 PINMUX_IPSR_GPSR(IP7_19_16, DU_DG3),
938 PINMUX_IPSR_GPSR(IP7_19_16, LCDOUT11),
939
940 PINMUX_IPSR_GPSR(IP7_23_20, SCL4),
941 PINMUX_IPSR_GPSR(IP7_23_20, CS1_N_A26),
942 PINMUX_IPSR_GPSR(IP7_23_20, DU_DOTCLKIN0),
943 PINMUX_IPSR_MSEL(IP7_23_20, VI4_DATA6_B, SEL_VIN4_1),
944 PINMUX_IPSR_MSEL(IP7_23_20, VI5_DATA6_B, SEL_VIN5_1),
945 PINMUX_IPSR_GPSR(IP7_23_20, QCLK),
946
947 PINMUX_IPSR_GPSR(IP7_27_24, SDA4),
948 PINMUX_IPSR_GPSR(IP7_27_24, WE1_N),
949 PINMUX_IPSR_MSEL(IP7_27_24, VI4_DATA7_B, SEL_VIN4_1),
950 PINMUX_IPSR_MSEL(IP7_27_24, VI5_DATA7_B, SEL_VIN5_1),
951 PINMUX_IPSR_GPSR(IP7_27_24, QPOLB),
952
953 PINMUX_IPSR_GPSR(IP7_31_28, SD0_CLK),
954 PINMUX_IPSR_GPSR(IP7_31_28, NFDATA8),
955 PINMUX_IPSR_MSEL(IP7_31_28, SCL1_C, SEL_I2C1_2),
956 PINMUX_IPSR_MSEL(IP7_31_28, HSCK1_B, SEL_HSCIF1_1),
957 PINMUX_IPSR_MSEL(IP7_31_28, SDA2_E, SEL_I2C2_4),
958 PINMUX_IPSR_MSEL(IP7_31_28, FMCLK_B, SEL_FM_1),
959
960 /* IPSR8 */
961 PINMUX_IPSR_GPSR(IP8_3_0, SD0_CMD),
962 PINMUX_IPSR_GPSR(IP8_3_0, NFDATA9),
963 PINMUX_IPSR_MSEL(IP8_3_0, HRX1_B, SEL_HSCIF1_1),
964 PINMUX_IPSR_MSEL(IP8_3_0, SPEEDIN_B, SEL_SPEED_PULSE_IF_1),
965
966 PINMUX_IPSR_GPSR(IP8_7_4, SD0_DAT0),
967 PINMUX_IPSR_GPSR(IP8_7_4, NFDATA10),
968 PINMUX_IPSR_GPSR(IP8_7_4, HTX1_B),
969 PINMUX_IPSR_MSEL(IP8_7_4, REMOCON_B, SEL_REMOCON_1),
970
971 PINMUX_IPSR_GPSR(IP8_11_8, SD0_DAT1),
972 PINMUX_IPSR_GPSR(IP8_11_8, NFDATA11),
973 PINMUX_IPSR_MSEL(IP8_11_8, SDA2_C, SEL_I2C2_2),
974 PINMUX_IPSR_MSEL(IP8_11_8, HCTS1_N_B, SEL_HSCIF1_1),
975 PINMUX_IPSR_MSEL(IP8_11_8, FMIN_B, SEL_FM_1),
976
977 PINMUX_IPSR_GPSR(IP8_15_12, SD0_DAT2),
978 PINMUX_IPSR_GPSR(IP8_15_12, NFDATA12),
979 PINMUX_IPSR_MSEL(IP8_15_12, SCL2_C, SEL_I2C2_2),
980 PINMUX_IPSR_MSEL(IP8_15_12, HRTS1_N_B, SEL_HSCIF1_1),
981 PINMUX_IPSR_GPSR(IP8_15_12, BPFCLK_B),
982
983 PINMUX_IPSR_GPSR(IP8_19_16, SD0_DAT3),
984 PINMUX_IPSR_GPSR(IP8_19_16, NFDATA13),
985 PINMUX_IPSR_MSEL(IP8_19_16, SDA1_C, SEL_I2C1_2),
986 PINMUX_IPSR_MSEL(IP8_19_16, SCL2_E, SEL_I2C2_4),
987 PINMUX_IPSR_MSEL(IP8_19_16, SPEEDIN_C, SEL_SPEED_PULSE_IF_2),
988 PINMUX_IPSR_MSEL(IP8_19_16, REMOCON_C, SEL_REMOCON_2),
989
990 PINMUX_IPSR_GPSR(IP8_23_20, SD1_CLK),
Eugeniu Roscaf0066b02019-07-09 18:27:11 +0200991 PINMUX_IPSR_MSEL(IP8_23_20, NFDATA14_B, SEL_NDF_1),
Marek Vasut68a77042018-04-26 13:09:20 +0200992
993 PINMUX_IPSR_GPSR(IP8_27_24, SD1_CMD),
Eugeniu Roscaf0066b02019-07-09 18:27:11 +0200994 PINMUX_IPSR_MSEL(IP8_27_24, NFDATA15_B, SEL_NDF_1),
Marek Vasut68a77042018-04-26 13:09:20 +0200995
996 PINMUX_IPSR_GPSR(IP8_31_28, SD1_DAT0),
Eugeniu Roscaf0066b02019-07-09 18:27:11 +0200997 PINMUX_IPSR_MSEL(IP8_31_28, NFWP_N_B, SEL_NDF_1),
Marek Vasut68a77042018-04-26 13:09:20 +0200998
999 /* IPSR9 */
1000 PINMUX_IPSR_GPSR(IP9_3_0, SD1_DAT1),
Eugeniu Roscaf0066b02019-07-09 18:27:11 +02001001 PINMUX_IPSR_MSEL(IP9_3_0, NFCE_N_B, SEL_NDF_1),
Marek Vasut68a77042018-04-26 13:09:20 +02001002
1003 PINMUX_IPSR_GPSR(IP9_7_4, SD1_DAT2),
Eugeniu Roscaf0066b02019-07-09 18:27:11 +02001004 PINMUX_IPSR_MSEL(IP9_7_4, NFALE_B, SEL_NDF_1),
Marek Vasut68a77042018-04-26 13:09:20 +02001005
1006 PINMUX_IPSR_GPSR(IP9_11_8, SD1_DAT3),
Eugeniu Roscaf0066b02019-07-09 18:27:11 +02001007 PINMUX_IPSR_MSEL(IP9_11_8, NFRB_N_B, SEL_NDF_1),
Marek Vasut68a77042018-04-26 13:09:20 +02001008
1009 PINMUX_IPSR_GPSR(IP9_15_12, SD3_CLK),
1010 PINMUX_IPSR_GPSR(IP9_15_12, NFWE_N),
1011
1012 PINMUX_IPSR_GPSR(IP9_19_16, SD3_CMD),
1013 PINMUX_IPSR_GPSR(IP9_19_16, NFRE_N),
1014
1015 PINMUX_IPSR_GPSR(IP9_23_20, SD3_DAT0),
1016 PINMUX_IPSR_GPSR(IP9_23_20, NFDATA0),
1017
1018 PINMUX_IPSR_GPSR(IP9_27_24, SD3_DAT1),
1019 PINMUX_IPSR_GPSR(IP9_27_24, NFDATA1),
1020
1021 PINMUX_IPSR_GPSR(IP9_31_28, SD3_DAT2),
1022 PINMUX_IPSR_GPSR(IP9_31_28, NFDATA2),
1023
1024 /* IPSR10 */
1025 PINMUX_IPSR_GPSR(IP10_3_0, SD3_DAT3),
1026 PINMUX_IPSR_GPSR(IP10_3_0, NFDATA3),
1027
1028 PINMUX_IPSR_GPSR(IP10_7_4, SD3_DAT4),
1029 PINMUX_IPSR_GPSR(IP10_7_4, NFDATA4),
1030
1031 PINMUX_IPSR_GPSR(IP10_11_8, SD3_DAT5),
1032 PINMUX_IPSR_GPSR(IP10_11_8, NFDATA5),
1033
1034 PINMUX_IPSR_GPSR(IP10_15_12, SD3_DAT6),
1035 PINMUX_IPSR_GPSR(IP10_15_12, NFDATA6),
1036
1037 PINMUX_IPSR_GPSR(IP10_19_16, SD3_DAT7),
1038 PINMUX_IPSR_GPSR(IP10_19_16, NFDATA7),
1039
1040 PINMUX_IPSR_GPSR(IP10_23_20, SD3_DS),
1041 PINMUX_IPSR_GPSR(IP10_23_20, NFCLE),
1042
1043 PINMUX_IPSR_GPSR(IP10_27_24, SD0_CD),
Eugeniu Roscaf0066b02019-07-09 18:27:11 +02001044 PINMUX_IPSR_MSEL(IP10_27_24, NFALE_A, SEL_NDF_0),
Marek Vasut68a77042018-04-26 13:09:20 +02001045 PINMUX_IPSR_GPSR(IP10_27_24, SD3_CD),
1046 PINMUX_IPSR_MSEL(IP10_27_24, RIF0_CLK_B, SEL_DRIF0_1),
1047 PINMUX_IPSR_MSEL(IP10_27_24, SCL2_B, SEL_I2C2_1),
1048 PINMUX_IPSR_MSEL(IP10_27_24, TCLK1_A, SEL_TIMER_TMU_0),
Lad Prabhakare4db7392020-10-14 16:45:59 +01001049 PINMUX_IPSR_MSEL(IP10_27_24, SSI_SCK2_B, SEL_SSI2_1),
Marek Vasut68a77042018-04-26 13:09:20 +02001050 PINMUX_IPSR_GPSR(IP10_27_24, TS_SCK0),
1051
1052 PINMUX_IPSR_GPSR(IP10_31_28, SD0_WP),
Eugeniu Roscaf0066b02019-07-09 18:27:11 +02001053 PINMUX_IPSR_MSEL(IP10_31_28, NFRB_N_A, SEL_NDF_0),
Marek Vasut68a77042018-04-26 13:09:20 +02001054 PINMUX_IPSR_GPSR(IP10_31_28, SD3_WP),
1055 PINMUX_IPSR_MSEL(IP10_31_28, RIF0_D0_B, SEL_DRIF0_1),
1056 PINMUX_IPSR_MSEL(IP10_31_28, SDA2_B, SEL_I2C2_1),
1057 PINMUX_IPSR_MSEL(IP10_31_28, TCLK2_A, SEL_TIMER_TMU_0),
Lad Prabhakare4db7392020-10-14 16:45:59 +01001058 PINMUX_IPSR_MSEL(IP10_31_28, SSI_WS2_B, SEL_SSI2_1),
Marek Vasut68a77042018-04-26 13:09:20 +02001059 PINMUX_IPSR_GPSR(IP10_31_28, TS_SDAT0),
1060
1061 /* IPSR11 */
1062 PINMUX_IPSR_GPSR(IP11_3_0, SD1_CD),
Eugeniu Roscaf0066b02019-07-09 18:27:11 +02001063 PINMUX_IPSR_MSEL(IP11_3_0, NFCE_N_A, SEL_NDF_0),
Marek Vasut68a77042018-04-26 13:09:20 +02001064 PINMUX_IPSR_GPSR(IP11_3_0, SSI_SCK1),
1065 PINMUX_IPSR_MSEL(IP11_3_0, RIF0_D1_B, SEL_DRIF0_1),
1066 PINMUX_IPSR_GPSR(IP11_3_0, TS_SDEN0),
1067
1068 PINMUX_IPSR_GPSR(IP11_7_4, SD1_WP),
Eugeniu Roscaf0066b02019-07-09 18:27:11 +02001069 PINMUX_IPSR_MSEL(IP11_7_4, NFWP_N_A, SEL_NDF_0),
Marek Vasut68a77042018-04-26 13:09:20 +02001070 PINMUX_IPSR_GPSR(IP11_7_4, SSI_WS1),
1071 PINMUX_IPSR_MSEL(IP11_7_4, RIF0_SYNC_B, SEL_DRIF0_1),
1072 PINMUX_IPSR_GPSR(IP11_7_4, TS_SPSYNC0),
1073
1074 PINMUX_IPSR_MSEL(IP11_11_8, RX0_A, SEL_SCIF0_0),
1075 PINMUX_IPSR_MSEL(IP11_11_8, HRX1_A, SEL_HSCIF1_0),
Lad Prabhakare4db7392020-10-14 16:45:59 +01001076 PINMUX_IPSR_MSEL(IP11_11_8, SSI_SCK2_A, SEL_SSI2_0),
Marek Vasut68a77042018-04-26 13:09:20 +02001077 PINMUX_IPSR_GPSR(IP11_11_8, RIF1_SYNC),
1078 PINMUX_IPSR_GPSR(IP11_11_8, TS_SCK1),
1079
Hiroyuki Yokoyama174f4492019-02-13 12:41:04 +09001080 PINMUX_IPSR_MSEL(IP11_15_12, TX0_A, SEL_SCIF0_0),
Marek Vasut68a77042018-04-26 13:09:20 +02001081 PINMUX_IPSR_GPSR(IP11_15_12, HTX1_A),
Lad Prabhakare4db7392020-10-14 16:45:59 +01001082 PINMUX_IPSR_MSEL(IP11_15_12, SSI_WS2_A, SEL_SSI2_0),
Marek Vasut68a77042018-04-26 13:09:20 +02001083 PINMUX_IPSR_GPSR(IP11_15_12, RIF1_D0),
1084 PINMUX_IPSR_GPSR(IP11_15_12, TS_SDAT1),
1085
1086 PINMUX_IPSR_MSEL(IP11_19_16, CTS0_N_A, SEL_SCIF0_0),
Eugeniu Roscaf0066b02019-07-09 18:27:11 +02001087 PINMUX_IPSR_MSEL(IP11_19_16, NFDATA14_A, SEL_NDF_0),
Marek Vasut68a77042018-04-26 13:09:20 +02001088 PINMUX_IPSR_GPSR(IP11_19_16, AUDIO_CLKOUT_A),
1089 PINMUX_IPSR_GPSR(IP11_19_16, RIF1_D1),
1090 PINMUX_IPSR_MSEL(IP11_19_16, SCIF_CLK_A, SEL_SCIF_0),
1091 PINMUX_IPSR_MSEL(IP11_19_16, FMCLK_A, SEL_FM_0),
1092
Eugeniu Roscaf0066b02019-07-09 18:27:11 +02001093 PINMUX_IPSR_MSEL(IP11_23_20, RTS0_N_A, SEL_SCIF0_0),
1094 PINMUX_IPSR_MSEL(IP11_23_20, NFDATA15_A, SEL_NDF_0),
Marek Vasut68a77042018-04-26 13:09:20 +02001095 PINMUX_IPSR_GPSR(IP11_23_20, AUDIO_CLKOUT1_A),
1096 PINMUX_IPSR_GPSR(IP11_23_20, RIF1_CLK),
1097 PINMUX_IPSR_MSEL(IP11_23_20, SCL2_A, SEL_I2C2_0),
1098 PINMUX_IPSR_MSEL(IP11_23_20, FMIN_A, SEL_FM_0),
1099
1100 PINMUX_IPSR_MSEL(IP11_27_24, SCK0_A, SEL_SCIF0_0),
1101 PINMUX_IPSR_MSEL(IP11_27_24, HSCK1_A, SEL_HSCIF1_0),
1102 PINMUX_IPSR_GPSR(IP11_27_24, USB3HS0_ID),
Eugeniu Roscaf0066b02019-07-09 18:27:11 +02001103 PINMUX_IPSR_GPSR(IP11_27_24, RTS1_N),
Marek Vasut68a77042018-04-26 13:09:20 +02001104 PINMUX_IPSR_MSEL(IP11_27_24, SDA2_A, SEL_I2C2_0),
1105 PINMUX_IPSR_MSEL(IP11_27_24, FMCLK_C, SEL_FM_2),
Hiroyuki Yokoyama947e20a2019-02-13 14:23:46 +09001106 PINMUX_IPSR_GPSR(IP11_27_24, USB0_ID),
Marek Vasut68a77042018-04-26 13:09:20 +02001107
1108 PINMUX_IPSR_GPSR(IP11_31_28, RX1),
1109 PINMUX_IPSR_MSEL(IP11_31_28, HRX2_B, SEL_HSCIF2_1),
1110 PINMUX_IPSR_MSEL(IP11_31_28, SSI_SCK9_B, SEL_SSI9_1),
1111 PINMUX_IPSR_GPSR(IP11_31_28, AUDIO_CLKOUT1_B),
1112
1113 /* IPSR12 */
1114 PINMUX_IPSR_GPSR(IP12_3_0, TX1),
1115 PINMUX_IPSR_GPSR(IP12_3_0, HTX2_B),
1116 PINMUX_IPSR_MSEL(IP12_3_0, SSI_WS9_B, SEL_SSI9_1),
1117 PINMUX_IPSR_GPSR(IP12_3_0, AUDIO_CLKOUT3_B),
1118
Hiroyuki Yokoyama11a40dd2019-02-13 12:18:28 +09001119 PINMUX_IPSR_MSEL(IP12_7_4, SCK2_A, SEL_SCIF2_0),
Marek Vasut68a77042018-04-26 13:09:20 +02001120 PINMUX_IPSR_MSEL(IP12_7_4, HSCK0_A, SEL_HSCIF0_0),
1121 PINMUX_IPSR_MSEL(IP12_7_4, AUDIO_CLKB_A, SEL_ADGB_0),
1122 PINMUX_IPSR_GPSR(IP12_7_4, CTS1_N),
1123 PINMUX_IPSR_MSEL(IP12_7_4, RIF0_CLK_A, SEL_DRIF0_0),
1124 PINMUX_IPSR_MSEL(IP12_7_4, REMOCON_A, SEL_REMOCON_0),
1125 PINMUX_IPSR_MSEL(IP12_7_4, SCIF_CLK_B, SEL_SCIF_1),
1126
Hiroyuki Yokoyama11a40dd2019-02-13 12:18:28 +09001127 PINMUX_IPSR_MSEL(IP12_11_8, TX2_A, SEL_SCIF2_0),
Marek Vasut68a77042018-04-26 13:09:20 +02001128 PINMUX_IPSR_MSEL(IP12_11_8, HRX0_A, SEL_HSCIF0_0),
1129 PINMUX_IPSR_GPSR(IP12_11_8, AUDIO_CLKOUT2_A),
1130 PINMUX_IPSR_MSEL(IP12_11_8, SCL1_A, SEL_I2C1_0),
1131 PINMUX_IPSR_MSEL(IP12_11_8, FSO_CFE_0_N_A, SEL_FSO_0),
1132 PINMUX_IPSR_GPSR(IP12_11_8, TS_SDEN1),
1133
Hiroyuki Yokoyama11a40dd2019-02-13 12:18:28 +09001134 PINMUX_IPSR_MSEL(IP12_15_12, RX2_A, SEL_SCIF2_0),
Marek Vasut68a77042018-04-26 13:09:20 +02001135 PINMUX_IPSR_GPSR(IP12_15_12, HTX0_A),
1136 PINMUX_IPSR_GPSR(IP12_15_12, AUDIO_CLKOUT3_A),
1137 PINMUX_IPSR_MSEL(IP12_15_12, SDA1_A, SEL_I2C1_0),
1138 PINMUX_IPSR_MSEL(IP12_15_12, FSO_CFE_1_N_A, SEL_FSO_0),
1139 PINMUX_IPSR_GPSR(IP12_15_12, TS_SPSYNC1),
1140
1141 PINMUX_IPSR_GPSR(IP12_19_16, MSIOF0_SCK),
1142 PINMUX_IPSR_GPSR(IP12_19_16, SSI_SCK78),
1143
1144 PINMUX_IPSR_GPSR(IP12_23_20, MSIOF0_RXD),
1145 PINMUX_IPSR_GPSR(IP12_23_20, SSI_WS78),
Hiroyuki Yokoyama11a40dd2019-02-13 12:18:28 +09001146 PINMUX_IPSR_MSEL(IP12_23_20, TX2_B, SEL_SCIF2_1),
Marek Vasut68a77042018-04-26 13:09:20 +02001147
1148 PINMUX_IPSR_GPSR(IP12_27_24, MSIOF0_TXD),
1149 PINMUX_IPSR_GPSR(IP12_27_24, SSI_SDATA7),
Hiroyuki Yokoyama11a40dd2019-02-13 12:18:28 +09001150 PINMUX_IPSR_MSEL(IP12_27_24, RX2_B, SEL_SCIF2_1),
Marek Vasut68a77042018-04-26 13:09:20 +02001151
1152 PINMUX_IPSR_GPSR(IP12_31_28, MSIOF0_SYNC),
1153 PINMUX_IPSR_GPSR(IP12_31_28, AUDIO_CLKOUT_B),
1154 PINMUX_IPSR_GPSR(IP12_31_28, SSI_SDATA8),
1155
1156 /* IPSR13 */
1157 PINMUX_IPSR_GPSR(IP13_3_0, MSIOF0_SS1),
1158 PINMUX_IPSR_MSEL(IP13_3_0, HRX2_A, SEL_HSCIF2_0),
1159 PINMUX_IPSR_GPSR(IP13_3_0, SSI_SCK4),
1160 PINMUX_IPSR_MSEL(IP13_3_0, HCTS0_N_A, SEL_HSCIF0_0),
1161 PINMUX_IPSR_GPSR(IP13_3_0, BPFCLK_C),
1162 PINMUX_IPSR_MSEL(IP13_3_0, SPEEDIN_A, SEL_SPEED_PULSE_IF_0),
1163
1164 PINMUX_IPSR_GPSR(IP13_7_4, MSIOF0_SS2),
1165 PINMUX_IPSR_GPSR(IP13_7_4, HTX2_A),
1166 PINMUX_IPSR_GPSR(IP13_7_4, SSI_WS4),
1167 PINMUX_IPSR_MSEL(IP13_7_4, HRTS0_N_A, SEL_HSCIF0_0),
1168 PINMUX_IPSR_MSEL(IP13_7_4, FMIN_C, SEL_FM_2),
1169 PINMUX_IPSR_GPSR(IP13_7_4, BPFCLK_A),
1170
1171 PINMUX_IPSR_GPSR(IP13_11_8, SSI_SDATA9),
1172 PINMUX_IPSR_MSEL(IP13_11_8, AUDIO_CLKC_A, SEL_ADGC_0),
1173 PINMUX_IPSR_GPSR(IP13_11_8, SCK1),
1174
1175 PINMUX_IPSR_GPSR(IP13_15_12, MLB_CLK),
1176 PINMUX_IPSR_MSEL(IP13_15_12, RX0_B, SEL_SCIF0_1),
1177 PINMUX_IPSR_MSEL(IP13_15_12, RIF0_D0_A, SEL_DRIF0_0),
1178 PINMUX_IPSR_MSEL(IP13_15_12, SCL1_B, SEL_I2C1_1),
1179 PINMUX_IPSR_MSEL(IP13_15_12, TCLK1_B, SEL_TIMER_TMU_1),
1180 PINMUX_IPSR_GPSR(IP13_15_12, SIM0_RST_A),
1181
1182 PINMUX_IPSR_GPSR(IP13_19_16, MLB_SIG),
1183 PINMUX_IPSR_MSEL(IP13_19_16, SCK0_B, SEL_SCIF0_1),
1184 PINMUX_IPSR_MSEL(IP13_19_16, RIF0_D1_A, SEL_DRIF0_0),
1185 PINMUX_IPSR_MSEL(IP13_19_16, SDA1_B, SEL_I2C1_1),
1186 PINMUX_IPSR_MSEL(IP13_19_16, TCLK2_B, SEL_TIMER_TMU_1),
Lad Prabhakare4db7392020-10-14 16:45:59 +01001187 PINMUX_IPSR_MSEL(IP13_19_16, SIM0_D_A, SEL_SIMCARD_0),
Marek Vasut68a77042018-04-26 13:09:20 +02001188
1189 PINMUX_IPSR_GPSR(IP13_23_20, MLB_DAT),
Marek Vasut88e81ec2019-03-04 22:39:51 +01001190 PINMUX_IPSR_MSEL(IP13_23_20, TX0_B, SEL_SCIF0_1),
Marek Vasut68a77042018-04-26 13:09:20 +02001191 PINMUX_IPSR_MSEL(IP13_23_20, RIF0_SYNC_A, SEL_DRIF0_0),
1192 PINMUX_IPSR_GPSR(IP13_23_20, SIM0_CLK_A),
1193
1194 PINMUX_IPSR_GPSR(IP13_27_24, SSI_SCK01239),
1195
1196 PINMUX_IPSR_GPSR(IP13_31_28, SSI_WS01239),
1197
1198 /* IPSR14 */
1199 PINMUX_IPSR_GPSR(IP14_3_0, SSI_SDATA0),
1200
1201 PINMUX_IPSR_GPSR(IP14_7_4, SSI_SDATA1),
1202 PINMUX_IPSR_MSEL(IP14_7_4, AUDIO_CLKC_B, SEL_ADGC_1),
1203 PINMUX_IPSR_MSEL(IP14_7_4, PWM0_B, SEL_PWM0_1),
1204
1205 PINMUX_IPSR_GPSR(IP14_11_8, SSI_SDATA2),
1206 PINMUX_IPSR_GPSR(IP14_11_8, AUDIO_CLKOUT2_B),
1207 PINMUX_IPSR_MSEL(IP14_11_8, SSI_SCK9_A, SEL_SSI9_0),
1208 PINMUX_IPSR_MSEL(IP14_11_8, PWM1_B, SEL_PWM1_1),
1209
1210 PINMUX_IPSR_GPSR(IP14_15_12, SSI_SCK349),
1211 PINMUX_IPSR_MSEL(IP14_15_12, PWM2_C, SEL_PWM2_2),
1212
1213 PINMUX_IPSR_GPSR(IP14_19_16, SSI_WS349),
1214 PINMUX_IPSR_MSEL(IP14_19_16, PWM3_C, SEL_PWM3_2),
1215
1216 PINMUX_IPSR_GPSR(IP14_23_20, SSI_SDATA3),
1217 PINMUX_IPSR_GPSR(IP14_23_20, AUDIO_CLKOUT1_C),
1218 PINMUX_IPSR_MSEL(IP14_23_20, AUDIO_CLKB_B, SEL_ADGB_1),
1219 PINMUX_IPSR_MSEL(IP14_23_20, PWM4_B, SEL_PWM4_1),
1220
1221 PINMUX_IPSR_GPSR(IP14_27_24, SSI_SDATA4),
1222 PINMUX_IPSR_MSEL(IP14_27_24, SSI_WS9_A, SEL_SSI9_0),
1223 PINMUX_IPSR_MSEL(IP14_27_24, PWM5_B, SEL_PWM5_1),
1224
1225 PINMUX_IPSR_GPSR(IP14_31_28, SSI_SCK5),
1226 PINMUX_IPSR_MSEL(IP14_31_28, HRX0_B, SEL_HSCIF0_1),
1227 PINMUX_IPSR_GPSR(IP14_31_28, USB0_PWEN_B),
1228 PINMUX_IPSR_MSEL(IP14_31_28, SCL2_D, SEL_I2C2_3),
1229 PINMUX_IPSR_MSEL(IP14_31_28, PWM6_B, SEL_PWM6_1),
1230
1231 /* IPSR15 */
1232 PINMUX_IPSR_GPSR(IP15_3_0, SSI_WS5),
1233 PINMUX_IPSR_GPSR(IP15_3_0, HTX0_B),
1234 PINMUX_IPSR_MSEL(IP15_3_0, USB0_OVC_B, SEL_USB_20_CH0_1),
1235 PINMUX_IPSR_MSEL(IP15_3_0, SDA2_D, SEL_I2C2_3),
1236
1237 PINMUX_IPSR_GPSR(IP15_7_4, SSI_SDATA5),
1238 PINMUX_IPSR_MSEL(IP15_7_4, HSCK0_B, SEL_HSCIF0_1),
1239 PINMUX_IPSR_MSEL(IP15_7_4, AUDIO_CLKB_C, SEL_ADGB_2),
1240 PINMUX_IPSR_GPSR(IP15_7_4, TPU0TO0),
1241
1242 PINMUX_IPSR_GPSR(IP15_11_8, SSI_SCK6),
1243 PINMUX_IPSR_MSEL(IP15_11_8, HSCK2_A, SEL_HSCIF2_0),
1244 PINMUX_IPSR_MSEL(IP15_11_8, AUDIO_CLKC_C, SEL_ADGC_2),
1245 PINMUX_IPSR_GPSR(IP15_11_8, TPU0TO1),
1246 PINMUX_IPSR_MSEL(IP15_11_8, FSO_CFE_0_N_B, SEL_FSO_1),
1247 PINMUX_IPSR_GPSR(IP15_11_8, SIM0_RST_B),
1248
1249 PINMUX_IPSR_GPSR(IP15_15_12, SSI_WS6),
1250 PINMUX_IPSR_MSEL(IP15_15_12, HCTS2_N_A, SEL_HSCIF2_0),
1251 PINMUX_IPSR_GPSR(IP15_15_12, AUDIO_CLKOUT2_C),
1252 PINMUX_IPSR_GPSR(IP15_15_12, TPU0TO2),
1253 PINMUX_IPSR_MSEL(IP15_15_12, SDA1_D, SEL_I2C1_3),
1254 PINMUX_IPSR_MSEL(IP15_15_12, FSO_CFE_1_N_B, SEL_FSO_1),
Lad Prabhakare4db7392020-10-14 16:45:59 +01001255 PINMUX_IPSR_MSEL(IP15_15_12, SIM0_D_B, SEL_SIMCARD_1),
Marek Vasut68a77042018-04-26 13:09:20 +02001256
1257 PINMUX_IPSR_GPSR(IP15_19_16, SSI_SDATA6),
1258 PINMUX_IPSR_MSEL(IP15_19_16, HRTS2_N_A, SEL_HSCIF2_0),
1259 PINMUX_IPSR_GPSR(IP15_19_16, AUDIO_CLKOUT3_C),
1260 PINMUX_IPSR_GPSR(IP15_19_16, TPU0TO3),
1261 PINMUX_IPSR_MSEL(IP15_19_16, SCL1_D, SEL_I2C1_3),
1262 PINMUX_IPSR_MSEL(IP15_19_16, FSO_TOE_N_B, SEL_FSO_1),
1263 PINMUX_IPSR_GPSR(IP15_19_16, SIM0_CLK_B),
1264
1265 PINMUX_IPSR_GPSR(IP15_23_20, AUDIO_CLKA),
1266
1267 PINMUX_IPSR_GPSR(IP15_27_24, USB30_PWEN),
1268 PINMUX_IPSR_GPSR(IP15_27_24, USB0_PWEN_A),
1269
1270 PINMUX_IPSR_GPSR(IP15_31_28, USB30_OVC),
1271 PINMUX_IPSR_MSEL(IP15_31_28, USB0_OVC_A, SEL_USB_20_CH0_0),
Marek Vasuteb13e0f2018-06-10 16:05:48 +02001272
1273/*
1274 * Static pins can not be muxed between different functions but
Marek Vasut88e81ec2019-03-04 22:39:51 +01001275 * still need mark entries in the pinmux list. Add each static
Marek Vasuteb13e0f2018-06-10 16:05:48 +02001276 * pin to the list without an associated function. The sh-pfc
Marek Vasut88e81ec2019-03-04 22:39:51 +01001277 * core will do the right thing and skip trying to mux the pin
1278 * while still applying configuration to it.
Marek Vasuteb13e0f2018-06-10 16:05:48 +02001279 */
1280#define FM(x) PINMUX_DATA(x##_MARK, 0),
1281 PINMUX_STATIC
1282#undef FM
Marek Vasut68a77042018-04-26 13:09:20 +02001283};
1284
Marek Vasuteb13e0f2018-06-10 16:05:48 +02001285/*
1286 * R8A77990 has 7 banks with 32 GPIOs in each => 224 GPIOs.
1287 * Physical layout rows: A - AE, cols: 1 - 25.
1288 */
1289#define ROW_GROUP_A(r) ('Z' - 'A' + 1 + (r))
1290#define PIN_NUMBER(r, c) (((r) - 'A') * 25 + (c) + 300)
1291#define PIN_A_NUMBER(r, c) PIN_NUMBER(ROW_GROUP_A(r), c)
1292#define PIN_NONE U16_MAX
1293
Marek Vasut68a77042018-04-26 13:09:20 +02001294static const struct sh_pfc_pin pinmux_pins[] = {
1295 PINMUX_GPIO_GP_ALL(),
Marek Vasuteb13e0f2018-06-10 16:05:48 +02001296
1297 /*
1298 * Pins not associated with a GPIO port.
1299 *
1300 * The pin positions are different between different R8A77990
1301 * packages, all that is needed for the pfc driver is a unique
1302 * number for each pin. To this end use the pin layout from
1303 * R8A77990 to calculate a unique number for each pin.
1304 */
1305 SH_PFC_PIN_NAMED_CFG('F', 1, TRST_N, CFG_FLAGS),
1306 SH_PFC_PIN_NAMED_CFG('F', 3, TMS, CFG_FLAGS),
1307 SH_PFC_PIN_NAMED_CFG('F', 4, TCK, CFG_FLAGS),
1308 SH_PFC_PIN_NAMED_CFG('G', 2, TDI, CFG_FLAGS),
1309 SH_PFC_PIN_NAMED_CFG('G', 3, FSCLKST_N, CFG_FLAGS),
1310 SH_PFC_PIN_NAMED_CFG('H', 1, ASEBRK, CFG_FLAGS),
1311 SH_PFC_PIN_NAMED_CFG('N', 1, AVB_TXC, CFG_FLAGS),
1312 SH_PFC_PIN_NAMED_CFG('N', 2, AVB_TD0, CFG_FLAGS),
1313 SH_PFC_PIN_NAMED_CFG('N', 3, AVB_TD1, CFG_FLAGS),
1314 SH_PFC_PIN_NAMED_CFG('N', 5, AVB_TD2, CFG_FLAGS),
1315 SH_PFC_PIN_NAMED_CFG('N', 6, AVB_TD3, CFG_FLAGS),
1316 SH_PFC_PIN_NAMED_CFG('P', 3, AVB_TX_CTL, CFG_FLAGS),
1317 SH_PFC_PIN_NAMED_CFG('P', 4, AVB_MDIO, CFG_FLAGS),
1318 SH_PFC_PIN_NAMED_CFG('P', 5, AVB_MDC, CFG_FLAGS),
1319 SH_PFC_PIN_NAMED_CFG('T', 21, MLB_REF, CFG_FLAGS),
1320 SH_PFC_PIN_NAMED_CFG(ROW_GROUP_A('D'), 3, PRESETOUT_N, CFG_FLAGS),
Marek Vasut68a77042018-04-26 13:09:20 +02001321};
1322
Marek Vasuteb13e0f2018-06-10 16:05:48 +02001323/* - AUDIO CLOCK ------------------------------------------------------------ */
1324static const unsigned int audio_clk_a_pins[] = {
1325 /* CLK A */
1326 RCAR_GP_PIN(6, 8),
1327};
1328
1329static const unsigned int audio_clk_a_mux[] = {
1330 AUDIO_CLKA_MARK,
1331};
1332
1333static const unsigned int audio_clk_b_a_pins[] = {
1334 /* CLK B_A */
1335 RCAR_GP_PIN(5, 7),
1336};
1337
1338static const unsigned int audio_clk_b_a_mux[] = {
1339 AUDIO_CLKB_A_MARK,
1340};
1341
1342static const unsigned int audio_clk_b_b_pins[] = {
1343 /* CLK B_B */
1344 RCAR_GP_PIN(6, 7),
1345};
1346
1347static const unsigned int audio_clk_b_b_mux[] = {
1348 AUDIO_CLKB_B_MARK,
1349};
1350
1351static const unsigned int audio_clk_b_c_pins[] = {
1352 /* CLK B_C */
1353 RCAR_GP_PIN(6, 13),
1354};
1355
1356static const unsigned int audio_clk_b_c_mux[] = {
1357 AUDIO_CLKB_C_MARK,
1358};
1359
1360static const unsigned int audio_clk_c_a_pins[] = {
1361 /* CLK C_A */
1362 RCAR_GP_PIN(5, 16),
1363};
1364
1365static const unsigned int audio_clk_c_a_mux[] = {
1366 AUDIO_CLKC_A_MARK,
1367};
1368
1369static const unsigned int audio_clk_c_b_pins[] = {
1370 /* CLK C_B */
1371 RCAR_GP_PIN(6, 3),
1372};
1373
1374static const unsigned int audio_clk_c_b_mux[] = {
1375 AUDIO_CLKC_B_MARK,
1376};
1377
1378static const unsigned int audio_clk_c_c_pins[] = {
1379 /* CLK C_C */
1380 RCAR_GP_PIN(6, 14),
1381};
1382
1383static const unsigned int audio_clk_c_c_mux[] = {
1384 AUDIO_CLKC_C_MARK,
1385};
1386
1387static const unsigned int audio_clkout_a_pins[] = {
1388 /* CLKOUT_A */
1389 RCAR_GP_PIN(5, 3),
1390};
1391
1392static const unsigned int audio_clkout_a_mux[] = {
1393 AUDIO_CLKOUT_A_MARK,
1394};
1395
1396static const unsigned int audio_clkout_b_pins[] = {
1397 /* CLKOUT_B */
1398 RCAR_GP_PIN(5, 13),
1399};
1400
1401static const unsigned int audio_clkout_b_mux[] = {
1402 AUDIO_CLKOUT_B_MARK,
1403};
1404
1405static const unsigned int audio_clkout1_a_pins[] = {
1406 /* CLKOUT1_A */
1407 RCAR_GP_PIN(5, 4),
1408};
1409
1410static const unsigned int audio_clkout1_a_mux[] = {
1411 AUDIO_CLKOUT1_A_MARK,
1412};
1413
1414static const unsigned int audio_clkout1_b_pins[] = {
1415 /* CLKOUT1_B */
1416 RCAR_GP_PIN(5, 5),
1417};
1418
1419static const unsigned int audio_clkout1_b_mux[] = {
1420 AUDIO_CLKOUT1_B_MARK,
1421};
1422
1423static const unsigned int audio_clkout1_c_pins[] = {
1424 /* CLKOUT1_C */
1425 RCAR_GP_PIN(6, 7),
1426};
1427
1428static const unsigned int audio_clkout1_c_mux[] = {
1429 AUDIO_CLKOUT1_C_MARK,
1430};
1431
1432static const unsigned int audio_clkout2_a_pins[] = {
1433 /* CLKOUT2_A */
1434 RCAR_GP_PIN(5, 8),
1435};
1436
1437static const unsigned int audio_clkout2_a_mux[] = {
1438 AUDIO_CLKOUT2_A_MARK,
1439};
1440
1441static const unsigned int audio_clkout2_b_pins[] = {
1442 /* CLKOUT2_B */
1443 RCAR_GP_PIN(6, 4),
1444};
1445
1446static const unsigned int audio_clkout2_b_mux[] = {
1447 AUDIO_CLKOUT2_B_MARK,
1448};
1449
1450static const unsigned int audio_clkout2_c_pins[] = {
1451 /* CLKOUT2_C */
1452 RCAR_GP_PIN(6, 15),
1453};
1454
1455static const unsigned int audio_clkout2_c_mux[] = {
1456 AUDIO_CLKOUT2_C_MARK,
1457};
1458
1459static const unsigned int audio_clkout3_a_pins[] = {
1460 /* CLKOUT3_A */
1461 RCAR_GP_PIN(5, 9),
1462};
1463
1464static const unsigned int audio_clkout3_a_mux[] = {
1465 AUDIO_CLKOUT3_A_MARK,
1466};
1467
1468static const unsigned int audio_clkout3_b_pins[] = {
1469 /* CLKOUT3_B */
1470 RCAR_GP_PIN(5, 6),
1471};
1472
1473static const unsigned int audio_clkout3_b_mux[] = {
1474 AUDIO_CLKOUT3_B_MARK,
1475};
1476
1477static const unsigned int audio_clkout3_c_pins[] = {
1478 /* CLKOUT3_C */
1479 RCAR_GP_PIN(6, 16),
1480};
1481
1482static const unsigned int audio_clkout3_c_mux[] = {
1483 AUDIO_CLKOUT3_C_MARK,
1484};
1485
1486/* - EtherAVB --------------------------------------------------------------- */
1487static const unsigned int avb_link_pins[] = {
1488 /* AVB_LINK */
1489 RCAR_GP_PIN(2, 23),
1490};
1491
1492static const unsigned int avb_link_mux[] = {
1493 AVB_LINK_MARK,
1494};
1495
1496static const unsigned int avb_magic_pins[] = {
1497 /* AVB_MAGIC */
1498 RCAR_GP_PIN(2, 22),
1499};
1500
1501static const unsigned int avb_magic_mux[] = {
1502 AVB_MAGIC_MARK,
1503};
1504
1505static const unsigned int avb_phy_int_pins[] = {
1506 /* AVB_PHY_INT */
1507 RCAR_GP_PIN(2, 21),
1508};
1509
1510static const unsigned int avb_phy_int_mux[] = {
1511 AVB_PHY_INT_MARK,
1512};
1513
1514static const unsigned int avb_mii_pins[] = {
1515 /*
1516 * AVB_RX_CTL, AVB_RXC, AVB_RD0,
1517 * AVB_RD1, AVB_RD2, AVB_RD3,
1518 * AVB_TXCREFCLK
1519 */
1520 RCAR_GP_PIN(2, 14), RCAR_GP_PIN(2, 15), RCAR_GP_PIN(2, 16),
1521 RCAR_GP_PIN(2, 17), RCAR_GP_PIN(2, 18), RCAR_GP_PIN(2, 19),
1522 RCAR_GP_PIN(2, 20),
1523};
1524
1525static const unsigned int avb_mii_mux[] = {
1526 AVB_RX_CTL_MARK, AVB_RXC_MARK, AVB_RD0_MARK,
1527 AVB_RD1_MARK, AVB_RD2_MARK, AVB_RD3_MARK,
1528 AVB_TXCREFCLK_MARK,
1529};
1530
1531static const unsigned int avb_avtp_pps_pins[] = {
1532 /* AVB_AVTP_PPS */
1533 RCAR_GP_PIN(1, 2),
1534};
1535
1536static const unsigned int avb_avtp_pps_mux[] = {
1537 AVB_AVTP_PPS_MARK,
1538};
1539
Lad Prabhakare4db7392020-10-14 16:45:59 +01001540static const unsigned int avb_avtp_match_pins[] = {
1541 /* AVB_AVTP_MATCH */
Marek Vasuteb13e0f2018-06-10 16:05:48 +02001542 RCAR_GP_PIN(2, 24),
1543};
1544
Lad Prabhakare4db7392020-10-14 16:45:59 +01001545static const unsigned int avb_avtp_match_mux[] = {
1546 AVB_AVTP_MATCH_MARK,
Marek Vasuteb13e0f2018-06-10 16:05:48 +02001547};
1548
Lad Prabhakare4db7392020-10-14 16:45:59 +01001549static const unsigned int avb_avtp_capture_pins[] = {
1550 /* AVB_AVTP_CAPTURE */
Marek Vasuteb13e0f2018-06-10 16:05:48 +02001551 RCAR_GP_PIN(2, 25),
1552};
1553
Lad Prabhakare4db7392020-10-14 16:45:59 +01001554static const unsigned int avb_avtp_capture_mux[] = {
1555 AVB_AVTP_CAPTURE_MARK,
Marek Vasuteb13e0f2018-06-10 16:05:48 +02001556};
1557
1558/* - CAN ------------------------------------------------------------------ */
1559static const unsigned int can0_data_pins[] = {
1560 /* TX, RX */
1561 RCAR_GP_PIN(0, 12), RCAR_GP_PIN(0, 13),
1562};
1563
1564static const unsigned int can0_data_mux[] = {
1565 CAN0_TX_MARK, CAN0_RX_MARK,
1566};
1567
1568static const unsigned int can1_data_pins[] = {
1569 /* TX, RX */
1570 RCAR_GP_PIN(0, 4), RCAR_GP_PIN(0, 7),
1571};
1572
1573static const unsigned int can1_data_mux[] = {
1574 CAN1_TX_MARK, CAN1_RX_MARK,
1575};
1576
1577/* - CAN Clock -------------------------------------------------------------- */
1578static const unsigned int can_clk_pins[] = {
1579 /* CLK */
1580 RCAR_GP_PIN(0, 14),
1581};
1582
1583static const unsigned int can_clk_mux[] = {
1584 CAN_CLK_MARK,
1585};
1586
1587/* - CAN FD --------------------------------------------------------------- */
1588static const unsigned int canfd0_data_pins[] = {
1589 /* TX, RX */
1590 RCAR_GP_PIN(0, 12), RCAR_GP_PIN(0, 13),
1591};
1592
1593static const unsigned int canfd0_data_mux[] = {
1594 CANFD0_TX_MARK, CANFD0_RX_MARK,
1595};
1596
1597static const unsigned int canfd1_data_pins[] = {
1598 /* TX, RX */
1599 RCAR_GP_PIN(0, 4), RCAR_GP_PIN(0, 7),
1600};
1601
1602static const unsigned int canfd1_data_mux[] = {
1603 CANFD1_TX_MARK, CANFD1_RX_MARK,
1604};
1605
1606/* - DRIF0 --------------------------------------------------------------- */
1607static const unsigned int drif0_ctrl_a_pins[] = {
1608 /* CLK, SYNC */
1609 RCAR_GP_PIN(5, 7), RCAR_GP_PIN(5, 19),
1610};
1611
1612static const unsigned int drif0_ctrl_a_mux[] = {
1613 RIF0_CLK_A_MARK, RIF0_SYNC_A_MARK,
1614};
1615
1616static const unsigned int drif0_data0_a_pins[] = {
1617 /* D0 */
1618 RCAR_GP_PIN(5, 17),
1619};
1620
1621static const unsigned int drif0_data0_a_mux[] = {
1622 RIF0_D0_A_MARK,
1623};
1624
1625static const unsigned int drif0_data1_a_pins[] = {
1626 /* D1 */
1627 RCAR_GP_PIN(5, 18),
1628};
1629
1630static const unsigned int drif0_data1_a_mux[] = {
1631 RIF0_D1_A_MARK,
1632};
1633
1634static const unsigned int drif0_ctrl_b_pins[] = {
1635 /* CLK, SYNC */
1636 RCAR_GP_PIN(3, 12), RCAR_GP_PIN(3, 15),
1637};
1638
1639static const unsigned int drif0_ctrl_b_mux[] = {
1640 RIF0_CLK_B_MARK, RIF0_SYNC_B_MARK,
1641};
1642
1643static const unsigned int drif0_data0_b_pins[] = {
1644 /* D0 */
1645 RCAR_GP_PIN(3, 13),
1646};
1647
1648static const unsigned int drif0_data0_b_mux[] = {
1649 RIF0_D0_B_MARK,
1650};
1651
1652static const unsigned int drif0_data1_b_pins[] = {
1653 /* D1 */
1654 RCAR_GP_PIN(3, 14),
1655};
1656
1657static const unsigned int drif0_data1_b_mux[] = {
1658 RIF0_D1_B_MARK,
1659};
1660
1661/* - DRIF1 --------------------------------------------------------------- */
1662static const unsigned int drif1_ctrl_pins[] = {
1663 /* CLK, SYNC */
1664 RCAR_GP_PIN(5, 4), RCAR_GP_PIN(5, 1),
1665};
1666
1667static const unsigned int drif1_ctrl_mux[] = {
1668 RIF1_CLK_MARK, RIF1_SYNC_MARK,
1669};
1670
1671static const unsigned int drif1_data0_pins[] = {
1672 /* D0 */
1673 RCAR_GP_PIN(5, 2),
1674};
1675
1676static const unsigned int drif1_data0_mux[] = {
1677 RIF1_D0_MARK,
1678};
1679
1680static const unsigned int drif1_data1_pins[] = {
1681 /* D1 */
1682 RCAR_GP_PIN(5, 3),
1683};
1684
1685static const unsigned int drif1_data1_mux[] = {
1686 RIF1_D1_MARK,
1687};
1688
1689/* - DRIF2 --------------------------------------------------------------- */
1690static const unsigned int drif2_ctrl_a_pins[] = {
1691 /* CLK, SYNC */
1692 RCAR_GP_PIN(2, 6), RCAR_GP_PIN(2, 7),
1693};
1694
1695static const unsigned int drif2_ctrl_a_mux[] = {
1696 RIF2_CLK_A_MARK, RIF2_SYNC_A_MARK,
1697};
1698
1699static const unsigned int drif2_data0_a_pins[] = {
1700 /* D0 */
1701 RCAR_GP_PIN(2, 8),
1702};
1703
1704static const unsigned int drif2_data0_a_mux[] = {
1705 RIF2_D0_A_MARK,
1706};
1707
1708static const unsigned int drif2_data1_a_pins[] = {
1709 /* D1 */
1710 RCAR_GP_PIN(2, 9),
1711};
1712
1713static const unsigned int drif2_data1_a_mux[] = {
1714 RIF2_D1_A_MARK,
1715};
1716
1717static const unsigned int drif2_ctrl_b_pins[] = {
1718 /* CLK, SYNC */
1719 RCAR_GP_PIN(1, 4), RCAR_GP_PIN(1, 5),
1720};
1721
1722static const unsigned int drif2_ctrl_b_mux[] = {
1723 RIF2_CLK_B_MARK, RIF2_SYNC_B_MARK,
1724};
1725
1726static const unsigned int drif2_data0_b_pins[] = {
1727 /* D0 */
1728 RCAR_GP_PIN(1, 6),
1729};
1730
1731static const unsigned int drif2_data0_b_mux[] = {
1732 RIF2_D0_B_MARK,
1733};
1734
1735static const unsigned int drif2_data1_b_pins[] = {
1736 /* D1 */
1737 RCAR_GP_PIN(1, 7),
1738};
1739
1740static const unsigned int drif2_data1_b_mux[] = {
1741 RIF2_D1_B_MARK,
1742};
1743
1744/* - DRIF3 --------------------------------------------------------------- */
1745static const unsigned int drif3_ctrl_a_pins[] = {
1746 /* CLK, SYNC */
1747 RCAR_GP_PIN(2, 10), RCAR_GP_PIN(2, 11),
1748};
1749
1750static const unsigned int drif3_ctrl_a_mux[] = {
1751 RIF3_CLK_A_MARK, RIF3_SYNC_A_MARK,
1752};
1753
1754static const unsigned int drif3_data0_a_pins[] = {
1755 /* D0 */
1756 RCAR_GP_PIN(2, 12),
1757};
1758
1759static const unsigned int drif3_data0_a_mux[] = {
1760 RIF3_D0_A_MARK,
1761};
1762
1763static const unsigned int drif3_data1_a_pins[] = {
1764 /* D1 */
1765 RCAR_GP_PIN(2, 13),
1766};
1767
1768static const unsigned int drif3_data1_a_mux[] = {
1769 RIF3_D1_A_MARK,
1770};
1771
1772static const unsigned int drif3_ctrl_b_pins[] = {
1773 /* CLK, SYNC */
1774 RCAR_GP_PIN(0, 8), RCAR_GP_PIN(0, 9),
1775};
1776
1777static const unsigned int drif3_ctrl_b_mux[] = {
1778 RIF3_CLK_B_MARK, RIF3_SYNC_B_MARK,
1779};
1780
1781static const unsigned int drif3_data0_b_pins[] = {
1782 /* D0 */
1783 RCAR_GP_PIN(0, 10),
1784};
1785
1786static const unsigned int drif3_data0_b_mux[] = {
1787 RIF3_D0_B_MARK,
1788};
1789
1790static const unsigned int drif3_data1_b_pins[] = {
1791 /* D1 */
1792 RCAR_GP_PIN(0, 11),
1793};
1794
1795static const unsigned int drif3_data1_b_mux[] = {
1796 RIF3_D1_B_MARK,
1797};
1798
1799/* - DU --------------------------------------------------------------------- */
1800static const unsigned int du_rgb666_pins[] = {
1801 /* R[7:2], G[7:2], B[7:2] */
1802 RCAR_GP_PIN(0, 8), RCAR_GP_PIN(0, 6), RCAR_GP_PIN(0, 5),
1803 RCAR_GP_PIN(0, 3), RCAR_GP_PIN(0, 2), RCAR_GP_PIN(0, 0),
1804 RCAR_GP_PIN(1, 9), RCAR_GP_PIN(1, 12), RCAR_GP_PIN(1, 10),
1805 RCAR_GP_PIN(1, 4), RCAR_GP_PIN(0, 15), RCAR_GP_PIN(0, 11),
1806 RCAR_GP_PIN(0, 1), RCAR_GP_PIN(1, 17), RCAR_GP_PIN(1, 16),
1807 RCAR_GP_PIN(1, 15), RCAR_GP_PIN(1, 14), RCAR_GP_PIN(1, 13),
1808};
Marek Vasuteb13e0f2018-06-10 16:05:48 +02001809static const unsigned int du_rgb666_mux[] = {
1810 DU_DR7_MARK, DU_DR6_MARK, DU_DR5_MARK, DU_DR4_MARK,
1811 DU_DR3_MARK, DU_DR2_MARK,
1812 DU_DG7_MARK, DU_DG6_MARK, DU_DG5_MARK, DU_DG4_MARK,
1813 DU_DG3_MARK, DU_DG2_MARK,
1814 DU_DB7_MARK, DU_DB6_MARK, DU_DB5_MARK, DU_DB4_MARK,
1815 DU_DB3_MARK, DU_DB2_MARK,
1816};
Marek Vasuteb13e0f2018-06-10 16:05:48 +02001817static const unsigned int du_rgb888_pins[] = {
1818 /* R[7:0], G[7:0], B[7:0] */
1819 RCAR_GP_PIN(0, 8), RCAR_GP_PIN(0, 6), RCAR_GP_PIN(0, 5),
1820 RCAR_GP_PIN(0, 3), RCAR_GP_PIN(0, 2), RCAR_GP_PIN(0, 0),
1821 RCAR_GP_PIN(1, 22), RCAR_GP_PIN(1, 21),
1822 RCAR_GP_PIN(1, 9), RCAR_GP_PIN(1, 12), RCAR_GP_PIN(1, 10),
1823 RCAR_GP_PIN(1, 4), RCAR_GP_PIN(0, 15), RCAR_GP_PIN(0, 11),
1824 RCAR_GP_PIN(0, 10), RCAR_GP_PIN(0, 9),
1825 RCAR_GP_PIN(0, 1), RCAR_GP_PIN(1, 17), RCAR_GP_PIN(1, 16),
1826 RCAR_GP_PIN(1, 15), RCAR_GP_PIN(1, 14), RCAR_GP_PIN(1, 13),
Marek Vasut88e81ec2019-03-04 22:39:51 +01001827 RCAR_GP_PIN(1, 19), RCAR_GP_PIN(1, 18),
Marek Vasuteb13e0f2018-06-10 16:05:48 +02001828};
Marek Vasuteb13e0f2018-06-10 16:05:48 +02001829static const unsigned int du_rgb888_mux[] = {
1830 DU_DR7_MARK, DU_DR6_MARK, DU_DR5_MARK, DU_DR4_MARK,
1831 DU_DR3_MARK, DU_DR2_MARK, DU_DR1_MARK, DU_DR0_MARK,
1832 DU_DG7_MARK, DU_DG6_MARK, DU_DG5_MARK, DU_DG4_MARK,
1833 DU_DG3_MARK, DU_DG2_MARK, DU_DG1_MARK, DU_DG0_MARK,
1834 DU_DB7_MARK, DU_DB6_MARK, DU_DB5_MARK, DU_DB4_MARK,
1835 DU_DB3_MARK, DU_DB2_MARK, DU_DB1_MARK, DU_DB0_MARK,
1836};
Marek Vasut88e81ec2019-03-04 22:39:51 +01001837static const unsigned int du_clk_in_0_pins[] = {
1838 /* CLKIN0 */
1839 RCAR_GP_PIN(0, 16),
1840};
1841static const unsigned int du_clk_in_0_mux[] = {
1842 DU_DOTCLKIN0_MARK
1843};
1844static const unsigned int du_clk_in_1_pins[] = {
1845 /* CLKIN1 */
1846 RCAR_GP_PIN(1, 1),
1847};
1848static const unsigned int du_clk_in_1_mux[] = {
1849 DU_DOTCLKIN1_MARK
1850};
Marek Vasuteb13e0f2018-06-10 16:05:48 +02001851static const unsigned int du_clk_out_0_pins[] = {
1852 /* CLKOUT */
1853 RCAR_GP_PIN(1, 3),
1854};
Marek Vasuteb13e0f2018-06-10 16:05:48 +02001855static const unsigned int du_clk_out_0_mux[] = {
1856 DU_DOTCLKOUT0_MARK
1857};
Marek Vasuteb13e0f2018-06-10 16:05:48 +02001858static const unsigned int du_sync_pins[] = {
1859 /* VSYNC, HSYNC */
1860 RCAR_GP_PIN(1, 11), RCAR_GP_PIN(1, 8),
1861};
Marek Vasuteb13e0f2018-06-10 16:05:48 +02001862static const unsigned int du_sync_mux[] = {
1863 DU_VSYNC_MARK, DU_HSYNC_MARK
1864};
Marek Vasut88e81ec2019-03-04 22:39:51 +01001865static const unsigned int du_disp_cde_pins[] = {
1866 /* DISP_CDE */
1867 RCAR_GP_PIN(1, 1),
1868};
1869static const unsigned int du_disp_cde_mux[] = {
1870 DU_DISP_CDE_MARK,
1871};
Marek Vasuteb13e0f2018-06-10 16:05:48 +02001872static const unsigned int du_cde_pins[] = {
1873 /* CDE */
1874 RCAR_GP_PIN(1, 0),
1875};
Marek Vasuteb13e0f2018-06-10 16:05:48 +02001876static const unsigned int du_cde_mux[] = {
1877 DU_CDE_MARK,
1878};
Marek Vasuteb13e0f2018-06-10 16:05:48 +02001879static const unsigned int du_disp_pins[] = {
1880 /* DISP */
1881 RCAR_GP_PIN(1, 2),
1882};
Marek Vasuteb13e0f2018-06-10 16:05:48 +02001883static const unsigned int du_disp_mux[] = {
1884 DU_DISP_MARK,
1885};
1886
Marek Vasuteb13e0f2018-06-10 16:05:48 +02001887/* - HSCIF0 --------------------------------------------------*/
1888static const unsigned int hscif0_data_a_pins[] = {
1889 /* RX, TX */
1890 RCAR_GP_PIN(5, 8), RCAR_GP_PIN(5, 9),
1891};
1892
1893static const unsigned int hscif0_data_a_mux[] = {
1894 HRX0_A_MARK, HTX0_A_MARK,
1895};
1896
1897static const unsigned int hscif0_clk_a_pins[] = {
1898 /* SCK */
1899 RCAR_GP_PIN(5, 7),
1900};
1901
1902static const unsigned int hscif0_clk_a_mux[] = {
1903 HSCK0_A_MARK,
1904};
1905
1906static const unsigned int hscif0_ctrl_a_pins[] = {
1907 /* RTS, CTS */
1908 RCAR_GP_PIN(5, 15), RCAR_GP_PIN(5, 14),
1909};
1910
1911static const unsigned int hscif0_ctrl_a_mux[] = {
1912 HRTS0_N_A_MARK, HCTS0_N_A_MARK,
1913};
1914
1915static const unsigned int hscif0_data_b_pins[] = {
1916 /* RX, TX */
1917 RCAR_GP_PIN(6, 11), RCAR_GP_PIN(6, 12),
1918};
1919
1920static const unsigned int hscif0_data_b_mux[] = {
1921 HRX0_B_MARK, HTX0_B_MARK,
1922};
1923
1924static const unsigned int hscif0_clk_b_pins[] = {
1925 /* SCK */
1926 RCAR_GP_PIN(6, 13),
1927};
1928
1929static const unsigned int hscif0_clk_b_mux[] = {
1930 HSCK0_B_MARK,
1931};
1932
1933/* - HSCIF1 ------------------------------------------------- */
1934static const unsigned int hscif1_data_a_pins[] = {
1935 /* RX, TX */
1936 RCAR_GP_PIN(5, 1), RCAR_GP_PIN(5, 2),
1937};
1938
1939static const unsigned int hscif1_data_a_mux[] = {
1940 HRX1_A_MARK, HTX1_A_MARK,
1941};
1942
1943static const unsigned int hscif1_clk_a_pins[] = {
1944 /* SCK */
1945 RCAR_GP_PIN(5, 0),
1946};
1947
1948static const unsigned int hscif1_clk_a_mux[] = {
1949 HSCK1_A_MARK,
1950};
1951
1952static const unsigned int hscif1_data_b_pins[] = {
1953 /* RX, TX */
1954 RCAR_GP_PIN(3, 1), RCAR_GP_PIN(3, 2),
1955};
1956
1957static const unsigned int hscif1_data_b_mux[] = {
1958 HRX1_B_MARK, HTX1_B_MARK,
1959};
1960
1961static const unsigned int hscif1_clk_b_pins[] = {
1962 /* SCK */
1963 RCAR_GP_PIN(3, 0),
1964};
1965
1966static const unsigned int hscif1_clk_b_mux[] = {
1967 HSCK1_B_MARK,
1968};
1969
1970static const unsigned int hscif1_ctrl_b_pins[] = {
1971 /* RTS, CTS */
1972 RCAR_GP_PIN(3, 4), RCAR_GP_PIN(3, 3),
1973};
1974
1975static const unsigned int hscif1_ctrl_b_mux[] = {
1976 HRTS1_N_B_MARK, HCTS1_N_B_MARK,
1977};
1978
1979/* - HSCIF2 ------------------------------------------------- */
1980static const unsigned int hscif2_data_a_pins[] = {
1981 /* RX, TX */
1982 RCAR_GP_PIN(5, 14), RCAR_GP_PIN(5, 15),
1983};
1984
1985static const unsigned int hscif2_data_a_mux[] = {
1986 HRX2_A_MARK, HTX2_A_MARK,
1987};
1988
1989static const unsigned int hscif2_clk_a_pins[] = {
1990 /* SCK */
1991 RCAR_GP_PIN(6, 14),
1992};
1993
1994static const unsigned int hscif2_clk_a_mux[] = {
1995 HSCK2_A_MARK,
1996};
1997
1998static const unsigned int hscif2_ctrl_a_pins[] = {
1999 /* RTS, CTS */
2000 RCAR_GP_PIN(6, 16), RCAR_GP_PIN(6, 15),
2001};
2002
2003static const unsigned int hscif2_ctrl_a_mux[] = {
2004 HRTS2_N_A_MARK, HCTS2_N_A_MARK,
2005};
2006
2007static const unsigned int hscif2_data_b_pins[] = {
2008 /* RX, TX */
2009 RCAR_GP_PIN(5, 5), RCAR_GP_PIN(5, 6),
2010};
2011
2012static const unsigned int hscif2_data_b_mux[] = {
2013 HRX2_B_MARK, HTX2_B_MARK,
2014};
2015
2016/* - HSCIF3 ------------------------------------------------*/
2017static const unsigned int hscif3_data_a_pins[] = {
2018 /* RX, TX */
2019 RCAR_GP_PIN(0, 14), RCAR_GP_PIN(0, 15),
2020};
2021
2022static const unsigned int hscif3_data_a_mux[] = {
2023 HRX3_A_MARK, HTX3_A_MARK,
2024};
2025
2026static const unsigned int hscif3_data_b_pins[] = {
2027 /* RX, TX */
2028 RCAR_GP_PIN(0, 5), RCAR_GP_PIN(0, 6),
2029};
2030
2031static const unsigned int hscif3_data_b_mux[] = {
2032 HRX3_B_MARK, HTX3_B_MARK,
2033};
2034
2035static const unsigned int hscif3_clk_b_pins[] = {
2036 /* SCK */
2037 RCAR_GP_PIN(0, 4),
2038};
2039
2040static const unsigned int hscif3_clk_b_mux[] = {
2041 HSCK3_B_MARK,
2042};
2043
2044static const unsigned int hscif3_data_c_pins[] = {
2045 /* RX, TX */
2046 RCAR_GP_PIN(2, 10), RCAR_GP_PIN(2, 9),
2047};
2048
2049static const unsigned int hscif3_data_c_mux[] = {
2050 HRX3_C_MARK, HTX3_C_MARK,
2051};
2052
2053static const unsigned int hscif3_clk_c_pins[] = {
2054 /* SCK */
2055 RCAR_GP_PIN(2, 11),
2056};
2057
2058static const unsigned int hscif3_clk_c_mux[] = {
2059 HSCK3_C_MARK,
2060};
2061
2062static const unsigned int hscif3_ctrl_c_pins[] = {
2063 /* RTS, CTS */
2064 RCAR_GP_PIN(2, 13), RCAR_GP_PIN(2, 12),
2065};
2066
2067static const unsigned int hscif3_ctrl_c_mux[] = {
2068 HRTS3_N_C_MARK, HCTS3_N_C_MARK,
2069};
2070
2071static const unsigned int hscif3_data_d_pins[] = {
2072 /* RX, TX */
Marek Vasut88e81ec2019-03-04 22:39:51 +01002073 RCAR_GP_PIN(1, 0), RCAR_GP_PIN(1, 3),
Marek Vasuteb13e0f2018-06-10 16:05:48 +02002074};
2075
2076static const unsigned int hscif3_data_d_mux[] = {
2077 HRX3_D_MARK, HTX3_D_MARK,
2078};
2079
2080static const unsigned int hscif3_data_e_pins[] = {
2081 /* RX, TX */
2082 RCAR_GP_PIN(0, 9), RCAR_GP_PIN(0, 10),
2083};
2084
2085static const unsigned int hscif3_data_e_mux[] = {
2086 HRX3_E_MARK, HTX3_E_MARK,
2087};
2088
2089static const unsigned int hscif3_ctrl_e_pins[] = {
2090 /* RTS, CTS */
2091 RCAR_GP_PIN(0, 11), RCAR_GP_PIN(0, 8),
2092};
2093
2094static const unsigned int hscif3_ctrl_e_mux[] = {
2095 HRTS3_N_E_MARK, HCTS3_N_E_MARK,
2096};
2097
2098/* - HSCIF4 -------------------------------------------------- */
2099static const unsigned int hscif4_data_a_pins[] = {
2100 /* RX, TX */
2101 RCAR_GP_PIN(2, 4), RCAR_GP_PIN(2, 3),
2102};
2103
2104static const unsigned int hscif4_data_a_mux[] = {
2105 HRX4_A_MARK, HTX4_A_MARK,
2106};
2107
2108static const unsigned int hscif4_clk_a_pins[] = {
2109 /* SCK */
2110 RCAR_GP_PIN(2, 0),
2111};
2112
2113static const unsigned int hscif4_clk_a_mux[] = {
2114 HSCK4_A_MARK,
2115};
2116
2117static const unsigned int hscif4_ctrl_a_pins[] = {
2118 /* RTS, CTS */
2119 RCAR_GP_PIN(2, 2), RCAR_GP_PIN(2, 1),
2120};
2121
2122static const unsigned int hscif4_ctrl_a_mux[] = {
2123 HRTS4_N_A_MARK, HCTS4_N_A_MARK,
2124};
2125
2126static const unsigned int hscif4_data_b_pins[] = {
2127 /* RX, TX */
2128 RCAR_GP_PIN(2, 8), RCAR_GP_PIN(2, 7),
2129};
2130
2131static const unsigned int hscif4_data_b_mux[] = {
2132 HRX4_B_MARK, HTX4_B_MARK,
2133};
2134
2135static const unsigned int hscif4_clk_b_pins[] = {
Marek Vasut88e81ec2019-03-04 22:39:51 +01002136 /* SCK */
Marek Vasuteb13e0f2018-06-10 16:05:48 +02002137 RCAR_GP_PIN(2, 6),
2138};
2139
2140static const unsigned int hscif4_clk_b_mux[] = {
2141 HSCK4_B_MARK,
2142};
2143
2144static const unsigned int hscif4_data_c_pins[] = {
2145 /* RX, TX */
2146 RCAR_GP_PIN(1, 8), RCAR_GP_PIN(1, 11),
2147};
2148
2149static const unsigned int hscif4_data_c_mux[] = {
2150 HRX4_C_MARK, HTX4_C_MARK,
2151};
2152
2153static const unsigned int hscif4_data_d_pins[] = {
2154 /* RX, TX */
2155 RCAR_GP_PIN(1, 13), RCAR_GP_PIN(1, 14),
2156};
2157
2158static const unsigned int hscif4_data_d_mux[] = {
2159 HRX4_D_MARK, HTX4_D_MARK,
2160};
2161
2162static const unsigned int hscif4_data_e_pins[] = {
2163 /* RX, TX */
2164 RCAR_GP_PIN(1, 18), RCAR_GP_PIN(1, 19),
2165};
2166
2167static const unsigned int hscif4_data_e_mux[] = {
2168 HRX4_E_MARK, HTX4_E_MARK,
2169};
2170
2171/* - I2C -------------------------------------------------------------------- */
2172static const unsigned int i2c1_a_pins[] = {
2173 /* SCL, SDA */
2174 RCAR_GP_PIN(5, 8), RCAR_GP_PIN(5, 9),
2175};
2176
2177static const unsigned int i2c1_a_mux[] = {
2178 SCL1_A_MARK, SDA1_A_MARK,
2179};
2180
2181static const unsigned int i2c1_b_pins[] = {
2182 /* SCL, SDA */
2183 RCAR_GP_PIN(5, 17), RCAR_GP_PIN(5, 18),
2184};
2185
2186static const unsigned int i2c1_b_mux[] = {
2187 SCL1_B_MARK, SDA1_B_MARK,
2188};
2189
2190static const unsigned int i2c1_c_pins[] = {
2191 /* SCL, SDA */
2192 RCAR_GP_PIN(3, 0), RCAR_GP_PIN(3, 5),
2193};
2194
2195static const unsigned int i2c1_c_mux[] = {
2196 SCL1_C_MARK, SDA1_C_MARK,
2197};
2198
2199static const unsigned int i2c1_d_pins[] = {
2200 /* SCL, SDA */
2201 RCAR_GP_PIN(6, 16), RCAR_GP_PIN(6, 15),
2202};
2203
2204static const unsigned int i2c1_d_mux[] = {
2205 SCL1_D_MARK, SDA1_D_MARK,
2206};
2207
2208static const unsigned int i2c2_a_pins[] = {
2209 /* SCL, SDA */
2210 RCAR_GP_PIN(5, 4), RCAR_GP_PIN(5, 0),
2211};
2212
2213static const unsigned int i2c2_a_mux[] = {
2214 SCL2_A_MARK, SDA2_A_MARK,
2215};
2216
2217static const unsigned int i2c2_b_pins[] = {
2218 /* SCL, SDA */
2219 RCAR_GP_PIN(3, 12), RCAR_GP_PIN(3, 13),
2220};
2221
2222static const unsigned int i2c2_b_mux[] = {
2223 SCL2_B_MARK, SDA2_B_MARK,
2224};
2225
2226static const unsigned int i2c2_c_pins[] = {
2227 /* SCL, SDA */
2228 RCAR_GP_PIN(3, 4), RCAR_GP_PIN(3, 3),
2229};
2230
2231static const unsigned int i2c2_c_mux[] = {
2232 SCL2_C_MARK, SDA2_C_MARK,
2233};
2234
2235static const unsigned int i2c2_d_pins[] = {
2236 /* SCL, SDA */
2237 RCAR_GP_PIN(6, 11), RCAR_GP_PIN(6, 12),
2238};
2239
2240static const unsigned int i2c2_d_mux[] = {
2241 SCL2_D_MARK, SDA2_D_MARK,
2242};
2243
2244static const unsigned int i2c2_e_pins[] = {
2245 /* SCL, SDA */
2246 RCAR_GP_PIN(3, 5), RCAR_GP_PIN(3, 0),
2247};
2248
2249static const unsigned int i2c2_e_mux[] = {
2250 SCL2_E_MARK, SDA2_E_MARK,
2251};
2252
2253static const unsigned int i2c4_pins[] = {
2254 /* SCL, SDA */
2255 RCAR_GP_PIN(0, 16), RCAR_GP_PIN(0, 17),
2256};
2257
2258static const unsigned int i2c4_mux[] = {
2259 SCL4_MARK, SDA4_MARK,
2260};
2261
2262static const unsigned int i2c5_pins[] = {
2263 /* SCL, SDA */
2264 RCAR_GP_PIN(1, 21), RCAR_GP_PIN(1, 22),
2265};
2266
2267static const unsigned int i2c5_mux[] = {
2268 SCL5_MARK, SDA5_MARK,
2269};
2270
2271static const unsigned int i2c6_a_pins[] = {
2272 /* SCL, SDA */
2273 RCAR_GP_PIN(1, 11), RCAR_GP_PIN(1, 8),
2274};
2275
2276static const unsigned int i2c6_a_mux[] = {
2277 SCL6_A_MARK, SDA6_A_MARK,
2278};
2279
2280static const unsigned int i2c6_b_pins[] = {
2281 /* SCL, SDA */
2282 RCAR_GP_PIN(1, 2), RCAR_GP_PIN(1, 1),
2283};
2284
2285static const unsigned int i2c6_b_mux[] = {
2286 SCL6_B_MARK, SDA6_B_MARK,
2287};
2288
2289static const unsigned int i2c7_a_pins[] = {
2290 /* SCL, SDA */
2291 RCAR_GP_PIN(2, 24), RCAR_GP_PIN(2, 25),
2292};
2293
2294static const unsigned int i2c7_a_mux[] = {
2295 SCL7_A_MARK, SDA7_A_MARK,
2296};
2297
2298static const unsigned int i2c7_b_pins[] = {
2299 /* SCL, SDA */
2300 RCAR_GP_PIN(0, 13), RCAR_GP_PIN(0, 14),
2301};
2302
2303static const unsigned int i2c7_b_mux[] = {
2304 SCL7_B_MARK, SDA7_B_MARK,
2305};
2306
2307/* - INTC-EX ---------------------------------------------------------------- */
2308static const unsigned int intc_ex_irq0_pins[] = {
2309 /* IRQ0 */
2310 RCAR_GP_PIN(1, 0),
2311};
Marek Vasuteb13e0f2018-06-10 16:05:48 +02002312static const unsigned int intc_ex_irq0_mux[] = {
2313 IRQ0_MARK,
2314};
Marek Vasut88e81ec2019-03-04 22:39:51 +01002315static const unsigned int intc_ex_irq1_pins[] = {
2316 /* IRQ1 */
2317 RCAR_GP_PIN(1, 1),
2318};
2319static const unsigned int intc_ex_irq1_mux[] = {
2320 IRQ1_MARK,
2321};
2322static const unsigned int intc_ex_irq2_pins[] = {
2323 /* IRQ2 */
2324 RCAR_GP_PIN(1, 2),
2325};
2326static const unsigned int intc_ex_irq2_mux[] = {
2327 IRQ2_MARK,
2328};
2329static const unsigned int intc_ex_irq3_pins[] = {
2330 /* IRQ3 */
2331 RCAR_GP_PIN(1, 9),
2332};
2333static const unsigned int intc_ex_irq3_mux[] = {
2334 IRQ3_MARK,
2335};
2336static const unsigned int intc_ex_irq4_pins[] = {
2337 /* IRQ4 */
2338 RCAR_GP_PIN(1, 10),
2339};
2340static const unsigned int intc_ex_irq4_mux[] = {
2341 IRQ4_MARK,
2342};
2343static const unsigned int intc_ex_irq5_pins[] = {
2344 /* IRQ5 */
2345 RCAR_GP_PIN(0, 7),
2346};
2347static const unsigned int intc_ex_irq5_mux[] = {
2348 IRQ5_MARK,
2349};
Marek Vasuteb13e0f2018-06-10 16:05:48 +02002350
2351/* - MSIOF0 ----------------------------------------------------------------- */
2352static const unsigned int msiof0_clk_pins[] = {
2353 /* SCK */
2354 RCAR_GP_PIN(5, 10),
2355};
2356
2357static const unsigned int msiof0_clk_mux[] = {
2358 MSIOF0_SCK_MARK,
2359};
2360
2361static const unsigned int msiof0_sync_pins[] = {
2362 /* SYNC */
2363 RCAR_GP_PIN(5, 13),
2364};
2365
2366static const unsigned int msiof0_sync_mux[] = {
2367 MSIOF0_SYNC_MARK,
2368};
2369
2370static const unsigned int msiof0_ss1_pins[] = {
2371 /* SS1 */
2372 RCAR_GP_PIN(5, 14),
2373};
2374
2375static const unsigned int msiof0_ss1_mux[] = {
2376 MSIOF0_SS1_MARK,
2377};
2378
2379static const unsigned int msiof0_ss2_pins[] = {
2380 /* SS2 */
2381 RCAR_GP_PIN(5, 15),
2382};
2383
2384static const unsigned int msiof0_ss2_mux[] = {
2385 MSIOF0_SS2_MARK,
2386};
2387
2388static const unsigned int msiof0_txd_pins[] = {
2389 /* TXD */
2390 RCAR_GP_PIN(5, 12),
2391};
2392
2393static const unsigned int msiof0_txd_mux[] = {
2394 MSIOF0_TXD_MARK,
2395};
2396
2397static const unsigned int msiof0_rxd_pins[] = {
2398 /* RXD */
2399 RCAR_GP_PIN(5, 11),
2400};
2401
2402static const unsigned int msiof0_rxd_mux[] = {
2403 MSIOF0_RXD_MARK,
2404};
2405
2406/* - MSIOF1 ----------------------------------------------------------------- */
2407static const unsigned int msiof1_clk_pins[] = {
2408 /* SCK */
2409 RCAR_GP_PIN(1, 19),
2410};
2411
2412static const unsigned int msiof1_clk_mux[] = {
2413 MSIOF1_SCK_MARK,
2414};
2415
2416static const unsigned int msiof1_sync_pins[] = {
2417 /* SYNC */
2418 RCAR_GP_PIN(1, 16),
2419};
2420
2421static const unsigned int msiof1_sync_mux[] = {
2422 MSIOF1_SYNC_MARK,
2423};
2424
2425static const unsigned int msiof1_ss1_pins[] = {
2426 /* SS1 */
2427 RCAR_GP_PIN(1, 14),
2428};
2429
2430static const unsigned int msiof1_ss1_mux[] = {
2431 MSIOF1_SS1_MARK,
2432};
2433
2434static const unsigned int msiof1_ss2_pins[] = {
2435 /* SS2 */
2436 RCAR_GP_PIN(1, 15),
2437};
2438
2439static const unsigned int msiof1_ss2_mux[] = {
2440 MSIOF1_SS2_MARK,
2441};
2442
2443static const unsigned int msiof1_txd_pins[] = {
2444 /* TXD */
2445 RCAR_GP_PIN(1, 18),
2446};
2447
2448static const unsigned int msiof1_txd_mux[] = {
2449 MSIOF1_TXD_MARK,
2450};
2451
2452static const unsigned int msiof1_rxd_pins[] = {
2453 /* RXD */
2454 RCAR_GP_PIN(1, 17),
2455};
2456
2457static const unsigned int msiof1_rxd_mux[] = {
2458 MSIOF1_RXD_MARK,
2459};
2460
2461/* - MSIOF2 ----------------------------------------------------------------- */
2462static const unsigned int msiof2_clk_a_pins[] = {
2463 /* SCK */
2464 RCAR_GP_PIN(0, 8),
2465};
2466
2467static const unsigned int msiof2_clk_a_mux[] = {
2468 MSIOF2_SCK_A_MARK,
2469};
2470
2471static const unsigned int msiof2_sync_a_pins[] = {
2472 /* SYNC */
2473 RCAR_GP_PIN(0, 9),
2474};
2475
2476static const unsigned int msiof2_sync_a_mux[] = {
2477 MSIOF2_SYNC_A_MARK,
2478};
2479
2480static const unsigned int msiof2_ss1_a_pins[] = {
2481 /* SS1 */
2482 RCAR_GP_PIN(0, 15),
2483};
2484
2485static const unsigned int msiof2_ss1_a_mux[] = {
2486 MSIOF2_SS1_A_MARK,
2487};
2488
2489static const unsigned int msiof2_ss2_a_pins[] = {
2490 /* SS2 */
2491 RCAR_GP_PIN(0, 14),
2492};
2493
2494static const unsigned int msiof2_ss2_a_mux[] = {
2495 MSIOF2_SS2_A_MARK,
2496};
2497
2498static const unsigned int msiof2_txd_a_pins[] = {
2499 /* TXD */
2500 RCAR_GP_PIN(0, 11),
2501};
2502
2503static const unsigned int msiof2_txd_a_mux[] = {
2504 MSIOF2_TXD_A_MARK,
2505};
2506
2507static const unsigned int msiof2_rxd_a_pins[] = {
2508 /* RXD */
2509 RCAR_GP_PIN(0, 10),
2510};
2511
2512static const unsigned int msiof2_rxd_a_mux[] = {
2513 MSIOF2_RXD_A_MARK,
2514};
2515
2516static const unsigned int msiof2_clk_b_pins[] = {
2517 /* SCK */
2518 RCAR_GP_PIN(1, 13),
2519};
2520
2521static const unsigned int msiof2_clk_b_mux[] = {
2522 MSIOF2_SCK_B_MARK,
2523};
2524
2525static const unsigned int msiof2_sync_b_pins[] = {
2526 /* SYNC */
2527 RCAR_GP_PIN(1, 10),
2528};
2529
2530static const unsigned int msiof2_sync_b_mux[] = {
2531 MSIOF2_SYNC_B_MARK,
2532};
2533
2534static const unsigned int msiof2_ss1_b_pins[] = {
2535 /* SS1 */
2536 RCAR_GP_PIN(1, 16),
2537};
2538
2539static const unsigned int msiof2_ss1_b_mux[] = {
2540 MSIOF2_SS1_B_MARK,
2541};
2542
2543static const unsigned int msiof2_ss2_b_pins[] = {
2544 /* SS2 */
2545 RCAR_GP_PIN(1, 12),
2546};
2547
2548static const unsigned int msiof2_ss2_b_mux[] = {
2549 MSIOF2_SS2_B_MARK,
2550};
2551
2552static const unsigned int msiof2_txd_b_pins[] = {
2553 /* TXD */
2554 RCAR_GP_PIN(1, 15),
2555};
2556
2557static const unsigned int msiof2_txd_b_mux[] = {
2558 MSIOF2_TXD_B_MARK,
2559};
2560
2561static const unsigned int msiof2_rxd_b_pins[] = {
2562 /* RXD */
2563 RCAR_GP_PIN(1, 14),
2564};
2565
2566static const unsigned int msiof2_rxd_b_mux[] = {
2567 MSIOF2_RXD_B_MARK,
2568};
2569
2570/* - MSIOF3 ----------------------------------------------------------------- */
2571static const unsigned int msiof3_clk_a_pins[] = {
2572 /* SCK */
2573 RCAR_GP_PIN(0, 0),
2574};
2575
2576static const unsigned int msiof3_clk_a_mux[] = {
2577 MSIOF3_SCK_A_MARK,
2578};
2579
2580static const unsigned int msiof3_sync_a_pins[] = {
2581 /* SYNC */
2582 RCAR_GP_PIN(0, 1),
2583};
2584
2585static const unsigned int msiof3_sync_a_mux[] = {
2586 MSIOF3_SYNC_A_MARK,
2587};
2588
2589static const unsigned int msiof3_ss1_a_pins[] = {
2590 /* SS1 */
2591 RCAR_GP_PIN(0, 15),
2592};
2593
2594static const unsigned int msiof3_ss1_a_mux[] = {
2595 MSIOF3_SS1_A_MARK,
2596};
2597
2598static const unsigned int msiof3_ss2_a_pins[] = {
2599 /* SS2 */
2600 RCAR_GP_PIN(0, 4),
2601};
2602
2603static const unsigned int msiof3_ss2_a_mux[] = {
2604 MSIOF3_SS2_A_MARK,
2605};
2606
2607static const unsigned int msiof3_txd_a_pins[] = {
2608 /* TXD */
2609 RCAR_GP_PIN(0, 3),
2610};
2611
2612static const unsigned int msiof3_txd_a_mux[] = {
2613 MSIOF3_TXD_A_MARK,
2614};
2615
2616static const unsigned int msiof3_rxd_a_pins[] = {
2617 /* RXD */
2618 RCAR_GP_PIN(0, 2),
2619};
2620
2621static const unsigned int msiof3_rxd_a_mux[] = {
2622 MSIOF3_RXD_A_MARK,
2623};
2624
2625static const unsigned int msiof3_clk_b_pins[] = {
2626 /* SCK */
2627 RCAR_GP_PIN(1, 5),
2628};
2629
2630static const unsigned int msiof3_clk_b_mux[] = {
2631 MSIOF3_SCK_B_MARK,
2632};
2633
2634static const unsigned int msiof3_sync_b_pins[] = {
2635 /* SYNC */
2636 RCAR_GP_PIN(1, 4),
2637};
2638
2639static const unsigned int msiof3_sync_b_mux[] = {
2640 MSIOF3_SYNC_B_MARK,
2641};
2642
2643static const unsigned int msiof3_ss1_b_pins[] = {
2644 /* SS1 */
2645 RCAR_GP_PIN(1, 0),
2646};
2647
2648static const unsigned int msiof3_ss1_b_mux[] = {
2649 MSIOF3_SS1_B_MARK,
2650};
2651
2652static const unsigned int msiof3_txd_b_pins[] = {
2653 /* TXD */
2654 RCAR_GP_PIN(1, 7),
2655};
2656
2657static const unsigned int msiof3_txd_b_mux[] = {
2658 MSIOF3_TXD_B_MARK,
2659};
2660
2661static const unsigned int msiof3_rxd_b_pins[] = {
2662 /* RXD */
2663 RCAR_GP_PIN(1, 6),
2664};
2665
2666static const unsigned int msiof3_rxd_b_mux[] = {
2667 MSIOF3_RXD_B_MARK,
2668};
2669
2670/* - PWM0 --------------------------------------------------------------------*/
2671static const unsigned int pwm0_a_pins[] = {
2672 /* PWM */
2673 RCAR_GP_PIN(2, 22),
2674};
2675
2676static const unsigned int pwm0_a_mux[] = {
2677 PWM0_A_MARK,
2678};
2679
2680static const unsigned int pwm0_b_pins[] = {
2681 /* PWM */
2682 RCAR_GP_PIN(6, 3),
2683};
2684
2685static const unsigned int pwm0_b_mux[] = {
2686 PWM0_B_MARK,
2687};
2688
2689/* - PWM1 --------------------------------------------------------------------*/
2690static const unsigned int pwm1_a_pins[] = {
2691 /* PWM */
2692 RCAR_GP_PIN(2, 23),
2693};
2694
2695static const unsigned int pwm1_a_mux[] = {
2696 PWM1_A_MARK,
2697};
2698
2699static const unsigned int pwm1_b_pins[] = {
2700 /* PWM */
2701 RCAR_GP_PIN(6, 4),
2702};
2703
2704static const unsigned int pwm1_b_mux[] = {
2705 PWM1_B_MARK,
2706};
2707
2708/* - PWM2 --------------------------------------------------------------------*/
2709static const unsigned int pwm2_a_pins[] = {
2710 /* PWM */
2711 RCAR_GP_PIN(1, 0),
2712};
2713
2714static const unsigned int pwm2_a_mux[] = {
2715 PWM2_A_MARK,
2716};
2717
2718static const unsigned int pwm2_b_pins[] = {
2719 /* PWM */
2720 RCAR_GP_PIN(1, 4),
2721};
2722
2723static const unsigned int pwm2_b_mux[] = {
2724 PWM2_B_MARK,
2725};
2726
2727static const unsigned int pwm2_c_pins[] = {
2728 /* PWM */
2729 RCAR_GP_PIN(6, 5),
2730};
2731
2732static const unsigned int pwm2_c_mux[] = {
2733 PWM2_C_MARK,
2734};
2735
2736/* - PWM3 --------------------------------------------------------------------*/
2737static const unsigned int pwm3_a_pins[] = {
2738 /* PWM */
2739 RCAR_GP_PIN(1, 1),
2740};
2741
2742static const unsigned int pwm3_a_mux[] = {
2743 PWM3_A_MARK,
2744};
2745
2746static const unsigned int pwm3_b_pins[] = {
2747 /* PWM */
2748 RCAR_GP_PIN(1, 5),
2749};
2750
2751static const unsigned int pwm3_b_mux[] = {
2752 PWM3_B_MARK,
2753};
2754
2755static const unsigned int pwm3_c_pins[] = {
2756 /* PWM */
2757 RCAR_GP_PIN(6, 6),
2758};
2759
2760static const unsigned int pwm3_c_mux[] = {
2761 PWM3_C_MARK,
2762};
2763
2764/* - PWM4 --------------------------------------------------------------------*/
2765static const unsigned int pwm4_a_pins[] = {
2766 /* PWM */
2767 RCAR_GP_PIN(1, 3),
2768};
2769
2770static const unsigned int pwm4_a_mux[] = {
2771 PWM4_A_MARK,
2772};
2773
2774static const unsigned int pwm4_b_pins[] = {
2775 /* PWM */
2776 RCAR_GP_PIN(6, 7),
2777};
2778
2779static const unsigned int pwm4_b_mux[] = {
2780 PWM4_B_MARK,
2781};
2782
2783/* - PWM5 --------------------------------------------------------------------*/
2784static const unsigned int pwm5_a_pins[] = {
2785 /* PWM */
2786 RCAR_GP_PIN(2, 24),
2787};
2788
2789static const unsigned int pwm5_a_mux[] = {
2790 PWM5_A_MARK,
2791};
2792
2793static const unsigned int pwm5_b_pins[] = {
2794 /* PWM */
2795 RCAR_GP_PIN(6, 10),
2796};
2797
2798static const unsigned int pwm5_b_mux[] = {
2799 PWM5_B_MARK,
2800};
2801
2802/* - PWM6 --------------------------------------------------------------------*/
2803static const unsigned int pwm6_a_pins[] = {
2804 /* PWM */
2805 RCAR_GP_PIN(2, 25),
2806};
2807
2808static const unsigned int pwm6_a_mux[] = {
2809 PWM6_A_MARK,
2810};
2811
2812static const unsigned int pwm6_b_pins[] = {
2813 /* PWM */
2814 RCAR_GP_PIN(6, 11),
2815};
2816
2817static const unsigned int pwm6_b_mux[] = {
2818 PWM6_B_MARK,
2819};
2820
2821/* - SCIF0 ------------------------------------------------------------------ */
2822static const unsigned int scif0_data_a_pins[] = {
2823 /* RX, TX */
2824 RCAR_GP_PIN(5, 1), RCAR_GP_PIN(5, 2),
2825};
2826
2827static const unsigned int scif0_data_a_mux[] = {
2828 RX0_A_MARK, TX0_A_MARK,
2829};
2830
2831static const unsigned int scif0_clk_a_pins[] = {
2832 /* SCK */
2833 RCAR_GP_PIN(5, 0),
2834};
2835
2836static const unsigned int scif0_clk_a_mux[] = {
2837 SCK0_A_MARK,
2838};
2839
2840static const unsigned int scif0_ctrl_a_pins[] = {
2841 /* RTS, CTS */
2842 RCAR_GP_PIN(5, 4), RCAR_GP_PIN(5, 3),
2843};
2844
2845static const unsigned int scif0_ctrl_a_mux[] = {
Eugeniu Roscaf0066b02019-07-09 18:27:11 +02002846 RTS0_N_A_MARK, CTS0_N_A_MARK,
Marek Vasuteb13e0f2018-06-10 16:05:48 +02002847};
2848
2849static const unsigned int scif0_data_b_pins[] = {
2850 /* RX, TX */
2851 RCAR_GP_PIN(5, 17), RCAR_GP_PIN(5, 19),
2852};
2853
2854static const unsigned int scif0_data_b_mux[] = {
2855 RX0_B_MARK, TX0_B_MARK,
2856};
2857
2858static const unsigned int scif0_clk_b_pins[] = {
2859 /* SCK */
2860 RCAR_GP_PIN(5, 18),
2861};
2862
2863static const unsigned int scif0_clk_b_mux[] = {
2864 SCK0_B_MARK,
2865};
2866
2867/* - SCIF1 ------------------------------------------------------------------ */
2868static const unsigned int scif1_data_pins[] = {
2869 /* RX, TX */
2870 RCAR_GP_PIN(5, 5), RCAR_GP_PIN(5, 6),
2871};
2872
2873static const unsigned int scif1_data_mux[] = {
2874 RX1_MARK, TX1_MARK,
2875};
2876
2877static const unsigned int scif1_clk_pins[] = {
2878 /* SCK */
2879 RCAR_GP_PIN(5, 16),
2880};
2881
2882static const unsigned int scif1_clk_mux[] = {
2883 SCK1_MARK,
2884};
2885
2886static const unsigned int scif1_ctrl_pins[] = {
2887 /* RTS, CTS */
2888 RCAR_GP_PIN(5, 0), RCAR_GP_PIN(5, 7),
2889};
2890
2891static const unsigned int scif1_ctrl_mux[] = {
Eugeniu Roscaf0066b02019-07-09 18:27:11 +02002892 RTS1_N_MARK, CTS1_N_MARK,
Marek Vasuteb13e0f2018-06-10 16:05:48 +02002893};
2894
2895/* - SCIF2 ------------------------------------------------------------------ */
2896static const unsigned int scif2_data_a_pins[] = {
2897 /* RX, TX */
2898 RCAR_GP_PIN(5, 9), RCAR_GP_PIN(5, 8),
2899};
2900
2901static const unsigned int scif2_data_a_mux[] = {
2902 RX2_A_MARK, TX2_A_MARK,
2903};
2904
2905static const unsigned int scif2_clk_a_pins[] = {
2906 /* SCK */
2907 RCAR_GP_PIN(5, 7),
2908};
2909
2910static const unsigned int scif2_clk_a_mux[] = {
2911 SCK2_A_MARK,
2912};
2913
2914static const unsigned int scif2_data_b_pins[] = {
2915 /* RX, TX */
2916 RCAR_GP_PIN(5, 12), RCAR_GP_PIN(5, 11),
2917};
2918
2919static const unsigned int scif2_data_b_mux[] = {
2920 RX2_B_MARK, TX2_B_MARK,
2921};
2922
2923/* - SCIF3 ------------------------------------------------------------------ */
2924static const unsigned int scif3_data_a_pins[] = {
2925 /* RX, TX */
2926 RCAR_GP_PIN(0, 5), RCAR_GP_PIN(0, 6),
2927};
2928
2929static const unsigned int scif3_data_a_mux[] = {
2930 RX3_A_MARK, TX3_A_MARK,
2931};
2932
2933static const unsigned int scif3_clk_a_pins[] = {
2934 /* SCK */
2935 RCAR_GP_PIN(0, 1),
2936};
2937
2938static const unsigned int scif3_clk_a_mux[] = {
2939 SCK3_A_MARK,
2940};
2941
2942static const unsigned int scif3_ctrl_a_pins[] = {
2943 /* RTS, CTS */
2944 RCAR_GP_PIN(0, 4), RCAR_GP_PIN(0, 7),
2945};
2946
2947static const unsigned int scif3_ctrl_a_mux[] = {
Eugeniu Roscaf0066b02019-07-09 18:27:11 +02002948 RTS3_N_A_MARK, CTS3_N_A_MARK,
Marek Vasuteb13e0f2018-06-10 16:05:48 +02002949};
2950
2951static const unsigned int scif3_data_b_pins[] = {
2952 /* RX, TX */
2953 RCAR_GP_PIN(1, 8), RCAR_GP_PIN(1, 11),
2954};
2955
2956static const unsigned int scif3_data_b_mux[] = {
2957 RX3_B_MARK, TX3_B_MARK,
2958};
2959
2960static const unsigned int scif3_data_c_pins[] = {
2961 /* RX, TX */
2962 RCAR_GP_PIN(2, 23), RCAR_GP_PIN(2, 22),
2963};
2964
2965static const unsigned int scif3_data_c_mux[] = {
2966 RX3_C_MARK, TX3_C_MARK,
2967};
2968
2969static const unsigned int scif3_clk_c_pins[] = {
2970 /* SCK */
2971 RCAR_GP_PIN(2, 24),
2972};
2973
2974static const unsigned int scif3_clk_c_mux[] = {
2975 SCK3_C_MARK,
2976};
2977
2978/* - SCIF4 ------------------------------------------------------------------ */
2979static const unsigned int scif4_data_a_pins[] = {
2980 /* RX, TX */
2981 RCAR_GP_PIN(1, 6), RCAR_GP_PIN(1, 7),
2982};
2983
2984static const unsigned int scif4_data_a_mux[] = {
2985 RX4_A_MARK, TX4_A_MARK,
2986};
2987
2988static const unsigned int scif4_clk_a_pins[] = {
2989 /* SCK */
2990 RCAR_GP_PIN(1, 5),
2991};
2992
2993static const unsigned int scif4_clk_a_mux[] = {
2994 SCK4_A_MARK,
2995};
2996
2997static const unsigned int scif4_ctrl_a_pins[] = {
2998 /* RTS, CTS */
2999 RCAR_GP_PIN(1, 4), RCAR_GP_PIN(1, 3),
3000};
3001
3002static const unsigned int scif4_ctrl_a_mux[] = {
Eugeniu Roscaf0066b02019-07-09 18:27:11 +02003003 RTS4_N_A_MARK, CTS4_N_A_MARK,
Marek Vasuteb13e0f2018-06-10 16:05:48 +02003004};
3005
3006static const unsigned int scif4_data_b_pins[] = {
3007 /* RX, TX */
3008 RCAR_GP_PIN(0, 13), RCAR_GP_PIN(0, 12),
3009};
3010
3011static const unsigned int scif4_data_b_mux[] = {
3012 RX4_B_MARK, TX4_B_MARK,
3013};
3014
3015static const unsigned int scif4_clk_b_pins[] = {
3016 /* SCK */
3017 RCAR_GP_PIN(0, 8),
3018};
3019
3020static const unsigned int scif4_clk_b_mux[] = {
3021 SCK4_B_MARK,
3022};
3023
3024static const unsigned int scif4_data_c_pins[] = {
3025 /* RX, TX */
3026 RCAR_GP_PIN(0, 2), RCAR_GP_PIN(0, 3),
3027};
3028
3029static const unsigned int scif4_data_c_mux[] = {
3030 RX4_C_MARK, TX4_C_MARK,
3031};
3032
3033static const unsigned int scif4_ctrl_c_pins[] = {
3034 /* RTS, CTS */
3035 RCAR_GP_PIN(0, 1), RCAR_GP_PIN(0, 0),
3036};
3037
3038static const unsigned int scif4_ctrl_c_mux[] = {
Eugeniu Roscaf0066b02019-07-09 18:27:11 +02003039 RTS4_N_C_MARK, CTS4_N_C_MARK,
Marek Vasuteb13e0f2018-06-10 16:05:48 +02003040};
3041
3042/* - SCIF5 ------------------------------------------------------------------ */
3043static const unsigned int scif5_data_a_pins[] = {
3044 /* RX, TX */
3045 RCAR_GP_PIN(1, 12), RCAR_GP_PIN(1, 9),
3046};
3047
3048static const unsigned int scif5_data_a_mux[] = {
3049 RX5_A_MARK, TX5_A_MARK,
3050};
3051
3052static const unsigned int scif5_clk_a_pins[] = {
3053 /* SCK */
3054 RCAR_GP_PIN(1, 13),
3055};
3056
3057static const unsigned int scif5_clk_a_mux[] = {
3058 SCK5_A_MARK,
3059};
3060
3061static const unsigned int scif5_data_b_pins[] = {
3062 /* RX, TX */
3063 RCAR_GP_PIN(2, 25), RCAR_GP_PIN(2, 24),
3064};
3065
3066static const unsigned int scif5_data_b_mux[] = {
3067 RX5_B_MARK, TX5_B_MARK,
3068};
3069
3070static const unsigned int scif5_data_c_pins[] = {
3071 /* RX, TX */
3072 RCAR_GP_PIN(0, 2), RCAR_GP_PIN(0, 3),
3073};
3074
3075static const unsigned int scif5_data_c_mux[] = {
3076 RX5_C_MARK, TX5_C_MARK,
3077};
3078
3079/* - SCIF Clock ------------------------------------------------------------- */
3080static const unsigned int scif_clk_a_pins[] = {
3081 /* SCIF_CLK */
3082 RCAR_GP_PIN(5, 3),
3083};
3084
3085static const unsigned int scif_clk_a_mux[] = {
3086 SCIF_CLK_A_MARK,
3087};
3088
3089static const unsigned int scif_clk_b_pins[] = {
3090 /* SCIF_CLK */
3091 RCAR_GP_PIN(5, 7),
3092};
3093
3094static const unsigned int scif_clk_b_mux[] = {
3095 SCIF_CLK_B_MARK,
3096};
3097
3098/* - SDHI0 ------------------------------------------------------------------ */
3099static const unsigned int sdhi0_data1_pins[] = {
3100 /* D0 */
3101 RCAR_GP_PIN(3, 2),
3102};
3103
3104static const unsigned int sdhi0_data1_mux[] = {
3105 SD0_DAT0_MARK,
3106};
3107
3108static const unsigned int sdhi0_data4_pins[] = {
3109 /* D[0:3] */
3110 RCAR_GP_PIN(3, 2), RCAR_GP_PIN(3, 3),
3111 RCAR_GP_PIN(3, 4), RCAR_GP_PIN(3, 5),
3112};
3113
3114static const unsigned int sdhi0_data4_mux[] = {
3115 SD0_DAT0_MARK, SD0_DAT1_MARK,
3116 SD0_DAT2_MARK, SD0_DAT3_MARK,
3117};
3118
3119static const unsigned int sdhi0_ctrl_pins[] = {
3120 /* CLK, CMD */
3121 RCAR_GP_PIN(3, 0), RCAR_GP_PIN(3, 1),
3122};
3123
3124static const unsigned int sdhi0_ctrl_mux[] = {
3125 SD0_CLK_MARK, SD0_CMD_MARK,
3126};
3127
3128static const unsigned int sdhi0_cd_pins[] = {
3129 /* CD */
3130 RCAR_GP_PIN(3, 12),
3131};
3132
3133static const unsigned int sdhi0_cd_mux[] = {
3134 SD0_CD_MARK,
3135};
3136
3137static const unsigned int sdhi0_wp_pins[] = {
3138 /* WP */
3139 RCAR_GP_PIN(3, 13),
3140};
3141
3142static const unsigned int sdhi0_wp_mux[] = {
3143 SD0_WP_MARK,
3144};
3145
3146/* - SDHI1 ------------------------------------------------------------------ */
3147static const unsigned int sdhi1_data1_pins[] = {
3148 /* D0 */
3149 RCAR_GP_PIN(3, 8),
3150};
3151
3152static const unsigned int sdhi1_data1_mux[] = {
3153 SD1_DAT0_MARK,
3154};
3155
3156static const unsigned int sdhi1_data4_pins[] = {
3157 /* D[0:3] */
3158 RCAR_GP_PIN(3, 8), RCAR_GP_PIN(3, 9),
3159 RCAR_GP_PIN(3, 10), RCAR_GP_PIN(3, 11),
3160};
3161
3162static const unsigned int sdhi1_data4_mux[] = {
3163 SD1_DAT0_MARK, SD1_DAT1_MARK,
3164 SD1_DAT2_MARK, SD1_DAT3_MARK,
3165};
3166
3167static const unsigned int sdhi1_ctrl_pins[] = {
3168 /* CLK, CMD */
3169 RCAR_GP_PIN(3, 6), RCAR_GP_PIN(3, 7),
3170};
3171
3172static const unsigned int sdhi1_ctrl_mux[] = {
3173 SD1_CLK_MARK, SD1_CMD_MARK,
3174};
3175
3176static const unsigned int sdhi1_cd_pins[] = {
3177 /* CD */
3178 RCAR_GP_PIN(3, 14),
3179};
3180
3181static const unsigned int sdhi1_cd_mux[] = {
3182 SD1_CD_MARK,
3183};
3184
3185static const unsigned int sdhi1_wp_pins[] = {
3186 /* WP */
3187 RCAR_GP_PIN(3, 15),
3188};
3189
3190static const unsigned int sdhi1_wp_mux[] = {
3191 SD1_WP_MARK,
3192};
3193
3194/* - SDHI3 ------------------------------------------------------------------ */
3195static const unsigned int sdhi3_data1_pins[] = {
3196 /* D0 */
3197 RCAR_GP_PIN(4, 2),
3198};
3199
3200static const unsigned int sdhi3_data1_mux[] = {
3201 SD3_DAT0_MARK,
3202};
3203
3204static const unsigned int sdhi3_data4_pins[] = {
3205 /* D[0:3] */
3206 RCAR_GP_PIN(4, 2), RCAR_GP_PIN(4, 3),
3207 RCAR_GP_PIN(4, 4), RCAR_GP_PIN(4, 5),
3208};
3209
3210static const unsigned int sdhi3_data4_mux[] = {
3211 SD3_DAT0_MARK, SD3_DAT1_MARK,
3212 SD3_DAT2_MARK, SD3_DAT3_MARK,
3213};
3214
3215static const unsigned int sdhi3_data8_pins[] = {
3216 /* D[0:7] */
3217 RCAR_GP_PIN(4, 2), RCAR_GP_PIN(4, 3),
3218 RCAR_GP_PIN(4, 4), RCAR_GP_PIN(4, 5),
3219 RCAR_GP_PIN(4, 6), RCAR_GP_PIN(4, 7),
3220 RCAR_GP_PIN(4, 8), RCAR_GP_PIN(4, 9),
3221};
3222
3223static const unsigned int sdhi3_data8_mux[] = {
3224 SD3_DAT0_MARK, SD3_DAT1_MARK,
3225 SD3_DAT2_MARK, SD3_DAT3_MARK,
3226 SD3_DAT4_MARK, SD3_DAT5_MARK,
3227 SD3_DAT6_MARK, SD3_DAT7_MARK,
3228};
3229
3230static const unsigned int sdhi3_ctrl_pins[] = {
3231 /* CLK, CMD */
3232 RCAR_GP_PIN(4, 0), RCAR_GP_PIN(4, 1),
3233};
3234
3235static const unsigned int sdhi3_ctrl_mux[] = {
3236 SD3_CLK_MARK, SD3_CMD_MARK,
3237};
3238
3239static const unsigned int sdhi3_cd_pins[] = {
3240 /* CD */
3241 RCAR_GP_PIN(3, 12),
3242};
3243
3244static const unsigned int sdhi3_cd_mux[] = {
3245 SD3_CD_MARK,
3246};
3247
3248static const unsigned int sdhi3_wp_pins[] = {
3249 /* WP */
3250 RCAR_GP_PIN(3, 13),
3251};
3252
3253static const unsigned int sdhi3_wp_mux[] = {
3254 SD3_WP_MARK,
3255};
3256
3257static const unsigned int sdhi3_ds_pins[] = {
3258 /* DS */
3259 RCAR_GP_PIN(4, 10),
3260};
3261
3262static const unsigned int sdhi3_ds_mux[] = {
3263 SD3_DS_MARK,
3264};
3265
3266/* - SSI -------------------------------------------------------------------- */
3267static const unsigned int ssi0_data_pins[] = {
3268 /* SDATA */
3269 RCAR_GP_PIN(6, 2),
3270};
3271
3272static const unsigned int ssi0_data_mux[] = {
3273 SSI_SDATA0_MARK,
3274};
3275
3276static const unsigned int ssi01239_ctrl_pins[] = {
3277 /* SCK, WS */
3278 RCAR_GP_PIN(6, 0), RCAR_GP_PIN(6, 1),
3279};
3280
3281static const unsigned int ssi01239_ctrl_mux[] = {
3282 SSI_SCK01239_MARK, SSI_WS01239_MARK,
3283};
3284
3285static const unsigned int ssi1_data_pins[] = {
3286 /* SDATA */
3287 RCAR_GP_PIN(6, 3),
3288};
3289
3290static const unsigned int ssi1_data_mux[] = {
3291 SSI_SDATA1_MARK,
3292};
3293
3294static const unsigned int ssi1_ctrl_pins[] = {
3295 /* SCK, WS */
3296 RCAR_GP_PIN(3, 14), RCAR_GP_PIN(3, 15),
3297};
3298
3299static const unsigned int ssi1_ctrl_mux[] = {
3300 SSI_SCK1_MARK, SSI_WS1_MARK,
3301};
3302
3303static const unsigned int ssi2_data_pins[] = {
3304 /* SDATA */
3305 RCAR_GP_PIN(6, 4),
3306};
3307
3308static const unsigned int ssi2_data_mux[] = {
3309 SSI_SDATA2_MARK,
3310};
3311
3312static const unsigned int ssi2_ctrl_a_pins[] = {
3313 /* SCK, WS */
3314 RCAR_GP_PIN(5, 1), RCAR_GP_PIN(5, 2),
3315};
3316
3317static const unsigned int ssi2_ctrl_a_mux[] = {
3318 SSI_SCK2_A_MARK, SSI_WS2_A_MARK,
3319};
3320
3321static const unsigned int ssi2_ctrl_b_pins[] = {
3322 /* SCK, WS */
3323 RCAR_GP_PIN(3, 12), RCAR_GP_PIN(3, 13),
3324};
3325
3326static const unsigned int ssi2_ctrl_b_mux[] = {
3327 SSI_SCK2_B_MARK, SSI_WS2_B_MARK,
3328};
3329
3330static const unsigned int ssi3_data_pins[] = {
3331 /* SDATA */
3332 RCAR_GP_PIN(6, 7),
3333};
3334
3335static const unsigned int ssi3_data_mux[] = {
3336 SSI_SDATA3_MARK,
3337};
3338
3339static const unsigned int ssi349_ctrl_pins[] = {
3340 /* SCK, WS */
3341 RCAR_GP_PIN(6, 5), RCAR_GP_PIN(6, 6),
3342};
3343
3344static const unsigned int ssi349_ctrl_mux[] = {
3345 SSI_SCK349_MARK, SSI_WS349_MARK,
3346};
3347
3348static const unsigned int ssi4_data_pins[] = {
3349 /* SDATA */
3350 RCAR_GP_PIN(6, 10),
3351};
3352
3353static const unsigned int ssi4_data_mux[] = {
3354 SSI_SDATA4_MARK,
3355};
3356
3357static const unsigned int ssi4_ctrl_pins[] = {
3358 /* SCK, WS */
3359 RCAR_GP_PIN(5, 14), RCAR_GP_PIN(5, 15),
3360};
3361
3362static const unsigned int ssi4_ctrl_mux[] = {
3363 SSI_SCK4_MARK, SSI_WS4_MARK,
3364};
3365
3366static const unsigned int ssi5_data_pins[] = {
3367 /* SDATA */
3368 RCAR_GP_PIN(6, 13),
3369};
3370
3371static const unsigned int ssi5_data_mux[] = {
3372 SSI_SDATA5_MARK,
3373};
3374
3375static const unsigned int ssi5_ctrl_pins[] = {
3376 /* SCK, WS */
3377 RCAR_GP_PIN(6, 11), RCAR_GP_PIN(6, 12),
3378};
3379
3380static const unsigned int ssi5_ctrl_mux[] = {
3381 SSI_SCK5_MARK, SSI_WS5_MARK,
3382};
3383
3384static const unsigned int ssi6_data_pins[] = {
3385 /* SDATA */
3386 RCAR_GP_PIN(6, 16),
3387};
3388
3389static const unsigned int ssi6_data_mux[] = {
3390 SSI_SDATA6_MARK,
3391};
3392
3393static const unsigned int ssi6_ctrl_pins[] = {
3394 /* SCK, WS */
3395 RCAR_GP_PIN(6, 14), RCAR_GP_PIN(6, 15),
3396};
3397
3398static const unsigned int ssi6_ctrl_mux[] = {
3399 SSI_SCK6_MARK, SSI_WS6_MARK,
3400};
3401
3402static const unsigned int ssi7_data_pins[] = {
3403 /* SDATA */
3404 RCAR_GP_PIN(5, 12),
3405};
3406
3407static const unsigned int ssi7_data_mux[] = {
3408 SSI_SDATA7_MARK,
3409};
3410
3411static const unsigned int ssi78_ctrl_pins[] = {
3412 /* SCK, WS */
3413 RCAR_GP_PIN(5, 10), RCAR_GP_PIN(5, 11),
3414};
3415
3416static const unsigned int ssi78_ctrl_mux[] = {
3417 SSI_SCK78_MARK, SSI_WS78_MARK,
3418};
3419
3420static const unsigned int ssi8_data_pins[] = {
3421 /* SDATA */
3422 RCAR_GP_PIN(5, 13),
3423};
3424
3425static const unsigned int ssi8_data_mux[] = {
3426 SSI_SDATA8_MARK,
3427};
3428
3429static const unsigned int ssi9_data_pins[] = {
3430 /* SDATA */
3431 RCAR_GP_PIN(5, 16),
3432};
3433
3434static const unsigned int ssi9_data_mux[] = {
3435 SSI_SDATA9_MARK,
3436};
3437
3438static const unsigned int ssi9_ctrl_a_pins[] = {
3439 /* SCK, WS */
3440 RCAR_GP_PIN(6, 4), RCAR_GP_PIN(6, 10),
3441};
3442
3443static const unsigned int ssi9_ctrl_a_mux[] = {
3444 SSI_SCK9_A_MARK, SSI_WS9_A_MARK,
3445};
3446
3447static const unsigned int ssi9_ctrl_b_pins[] = {
3448 /* SCK, WS */
3449 RCAR_GP_PIN(5, 5), RCAR_GP_PIN(5, 6),
3450};
3451
3452static const unsigned int ssi9_ctrl_b_mux[] = {
3453 SSI_SCK9_B_MARK, SSI_WS9_B_MARK,
3454};
3455
3456/* - TMU -------------------------------------------------------------------- */
3457static const unsigned int tmu_tclk1_a_pins[] = {
3458 /* TCLK */
3459 RCAR_GP_PIN(3, 12),
3460};
3461
3462static const unsigned int tmu_tclk1_a_mux[] = {
3463 TCLK1_A_MARK,
3464};
3465
3466static const unsigned int tmu_tclk1_b_pins[] = {
3467 /* TCLK */
3468 RCAR_GP_PIN(5, 17),
3469};
3470
3471static const unsigned int tmu_tclk1_b_mux[] = {
3472 TCLK1_B_MARK,
3473};
3474
3475static const unsigned int tmu_tclk2_a_pins[] = {
3476 /* TCLK */
3477 RCAR_GP_PIN(3, 13),
3478};
3479
3480static const unsigned int tmu_tclk2_a_mux[] = {
3481 TCLK2_A_MARK,
3482};
3483
3484static const unsigned int tmu_tclk2_b_pins[] = {
3485 /* TCLK */
3486 RCAR_GP_PIN(5, 18),
3487};
3488
3489static const unsigned int tmu_tclk2_b_mux[] = {
3490 TCLK2_B_MARK,
3491};
3492
3493/* - USB0 ------------------------------------------------------------------- */
3494static const unsigned int usb0_a_pins[] = {
3495 /* PWEN, OVC */
3496 RCAR_GP_PIN(6, 17), RCAR_GP_PIN(6, 9),
3497};
3498
3499static const unsigned int usb0_a_mux[] = {
3500 USB0_PWEN_A_MARK, USB0_OVC_A_MARK,
3501};
3502
3503static const unsigned int usb0_b_pins[] = {
3504 /* PWEN, OVC */
3505 RCAR_GP_PIN(6, 11), RCAR_GP_PIN(6, 12),
3506};
3507
3508static const unsigned int usb0_b_mux[] = {
3509 USB0_PWEN_B_MARK, USB0_OVC_B_MARK,
3510};
3511
3512static const unsigned int usb0_id_pins[] = {
3513 /* ID */
3514 RCAR_GP_PIN(5, 0)
3515};
3516
3517static const unsigned int usb0_id_mux[] = {
Hiroyuki Yokoyama947e20a2019-02-13 14:23:46 +09003518 USB0_ID_MARK,
Marek Vasuteb13e0f2018-06-10 16:05:48 +02003519};
3520
3521/* - USB30 ------------------------------------------------------------------ */
3522static const unsigned int usb30_pins[] = {
3523 /* PWEN, OVC */
3524 RCAR_GP_PIN(6, 17), RCAR_GP_PIN(6, 9),
3525};
3526
3527static const unsigned int usb30_mux[] = {
3528 USB30_PWEN_MARK, USB30_OVC_MARK,
3529};
3530
3531static const unsigned int usb30_id_pins[] = {
3532 /* ID */
3533 RCAR_GP_PIN(5, 0),
3534};
3535
3536static const unsigned int usb30_id_mux[] = {
3537 USB3HS0_ID_MARK,
3538};
3539
3540/* - VIN4 ------------------------------------------------------------------- */
Marek Vasut88e81ec2019-03-04 22:39:51 +01003541static const unsigned int vin4_data18_a_pins[] = {
Marek Vasuteb13e0f2018-06-10 16:05:48 +02003542 RCAR_GP_PIN(2, 8), RCAR_GP_PIN(2, 9),
3543 RCAR_GP_PIN(2, 10), RCAR_GP_PIN(2, 11),
3544 RCAR_GP_PIN(2, 12), RCAR_GP_PIN(2, 13),
Marek Vasuteb13e0f2018-06-10 16:05:48 +02003545 RCAR_GP_PIN(1, 6), RCAR_GP_PIN(1, 7),
3546 RCAR_GP_PIN(1, 3), RCAR_GP_PIN(1, 10),
3547 RCAR_GP_PIN(1, 13), RCAR_GP_PIN(1, 14),
Marek Vasuteb13e0f2018-06-10 16:05:48 +02003548 RCAR_GP_PIN(1, 15), RCAR_GP_PIN(1, 16),
3549 RCAR_GP_PIN(1, 17), RCAR_GP_PIN(1, 18),
3550 RCAR_GP_PIN(1, 19), RCAR_GP_PIN(0, 1),
3551};
3552
Marek Vasut88e81ec2019-03-04 22:39:51 +01003553static const unsigned int vin4_data18_a_mux[] = {
Marek Vasuteb13e0f2018-06-10 16:05:48 +02003554 VI4_DATA2_A_MARK, VI4_DATA3_A_MARK,
3555 VI4_DATA4_A_MARK, VI4_DATA5_A_MARK,
3556 VI4_DATA6_A_MARK, VI4_DATA7_A_MARK,
Marek Vasuteb13e0f2018-06-10 16:05:48 +02003557 VI4_DATA10_MARK, VI4_DATA11_MARK,
3558 VI4_DATA12_MARK, VI4_DATA13_MARK,
3559 VI4_DATA14_MARK, VI4_DATA15_MARK,
Marek Vasuteb13e0f2018-06-10 16:05:48 +02003560 VI4_DATA18_MARK, VI4_DATA19_MARK,
3561 VI4_DATA20_MARK, VI4_DATA21_MARK,
3562 VI4_DATA22_MARK, VI4_DATA23_MARK,
3563};
3564
Marek Vasut88e81ec2019-03-04 22:39:51 +01003565static const union vin_data vin4_data_a_pins = {
3566 .data24 = {
3567 RCAR_GP_PIN(2, 6), RCAR_GP_PIN(2, 7),
3568 RCAR_GP_PIN(2, 8), RCAR_GP_PIN(2, 9),
3569 RCAR_GP_PIN(2, 10), RCAR_GP_PIN(2, 11),
3570 RCAR_GP_PIN(2, 12), RCAR_GP_PIN(2, 13),
3571 RCAR_GP_PIN(1, 4), RCAR_GP_PIN(1, 5),
3572 RCAR_GP_PIN(1, 6), RCAR_GP_PIN(1, 7),
3573 RCAR_GP_PIN(1, 3), RCAR_GP_PIN(1, 10),
3574 RCAR_GP_PIN(1, 13), RCAR_GP_PIN(1, 14),
3575 RCAR_GP_PIN(1, 9), RCAR_GP_PIN(1, 12),
3576 RCAR_GP_PIN(1, 15), RCAR_GP_PIN(1, 16),
3577 RCAR_GP_PIN(1, 17), RCAR_GP_PIN(1, 18),
3578 RCAR_GP_PIN(1, 19), RCAR_GP_PIN(0, 1),
3579 },
Marek Vasuteb13e0f2018-06-10 16:05:48 +02003580};
3581
Marek Vasut88e81ec2019-03-04 22:39:51 +01003582static const union vin_data vin4_data_a_mux = {
3583 .data24 = {
3584 VI4_DATA0_A_MARK, VI4_DATA1_A_MARK,
3585 VI4_DATA2_A_MARK, VI4_DATA3_A_MARK,
3586 VI4_DATA4_A_MARK, VI4_DATA5_A_MARK,
3587 VI4_DATA6_A_MARK, VI4_DATA7_A_MARK,
3588 VI4_DATA8_MARK, VI4_DATA9_MARK,
3589 VI4_DATA10_MARK, VI4_DATA11_MARK,
3590 VI4_DATA12_MARK, VI4_DATA13_MARK,
3591 VI4_DATA14_MARK, VI4_DATA15_MARK,
3592 VI4_DATA16_MARK, VI4_DATA17_MARK,
3593 VI4_DATA18_MARK, VI4_DATA19_MARK,
3594 VI4_DATA20_MARK, VI4_DATA21_MARK,
3595 VI4_DATA22_MARK, VI4_DATA23_MARK,
3596 },
Marek Vasuteb13e0f2018-06-10 16:05:48 +02003597};
3598
Marek Vasut88e81ec2019-03-04 22:39:51 +01003599static const unsigned int vin4_data18_b_pins[] = {
Marek Vasuteb13e0f2018-06-10 16:05:48 +02003600 RCAR_GP_PIN(1, 21), RCAR_GP_PIN(1, 22),
3601 RCAR_GP_PIN(0, 5), RCAR_GP_PIN(0, 6),
3602 RCAR_GP_PIN(0, 16), RCAR_GP_PIN(0, 17),
Marek Vasuteb13e0f2018-06-10 16:05:48 +02003603 RCAR_GP_PIN(1, 6), RCAR_GP_PIN(1, 7),
3604 RCAR_GP_PIN(1, 3), RCAR_GP_PIN(1, 10),
3605 RCAR_GP_PIN(1, 13), RCAR_GP_PIN(1, 14),
Marek Vasuteb13e0f2018-06-10 16:05:48 +02003606 RCAR_GP_PIN(1, 15), RCAR_GP_PIN(1, 16),
Marek Vasuteb13e0f2018-06-10 16:05:48 +02003607 RCAR_GP_PIN(1, 17), RCAR_GP_PIN(1, 18),
3608 RCAR_GP_PIN(1, 19), RCAR_GP_PIN(0, 1),
3609};
3610
Marek Vasut88e81ec2019-03-04 22:39:51 +01003611static const unsigned int vin4_data18_b_mux[] = {
Marek Vasuteb13e0f2018-06-10 16:05:48 +02003612 VI4_DATA2_B_MARK, VI4_DATA3_B_MARK,
3613 VI4_DATA4_B_MARK, VI4_DATA5_B_MARK,
3614 VI4_DATA6_B_MARK, VI4_DATA7_B_MARK,
Marek Vasuteb13e0f2018-06-10 16:05:48 +02003615 VI4_DATA10_MARK, VI4_DATA11_MARK,
3616 VI4_DATA12_MARK, VI4_DATA13_MARK,
3617 VI4_DATA14_MARK, VI4_DATA15_MARK,
Marek Vasuteb13e0f2018-06-10 16:05:48 +02003618 VI4_DATA18_MARK, VI4_DATA19_MARK,
3619 VI4_DATA20_MARK, VI4_DATA21_MARK,
3620 VI4_DATA22_MARK, VI4_DATA23_MARK,
3621};
3622
Marek Vasut88e81ec2019-03-04 22:39:51 +01003623static const union vin_data vin4_data_b_pins = {
3624 .data24 = {
3625 RCAR_GP_PIN(1, 8), RCAR_GP_PIN(1, 11),
3626 RCAR_GP_PIN(1, 21), RCAR_GP_PIN(1, 22),
3627 RCAR_GP_PIN(0, 5), RCAR_GP_PIN(0, 6),
3628 RCAR_GP_PIN(0, 16), RCAR_GP_PIN(0, 17),
3629 RCAR_GP_PIN(1, 4), RCAR_GP_PIN(1, 5),
3630 RCAR_GP_PIN(1, 6), RCAR_GP_PIN(1, 7),
3631 RCAR_GP_PIN(1, 3), RCAR_GP_PIN(1, 10),
3632 RCAR_GP_PIN(1, 13), RCAR_GP_PIN(1, 14),
3633 RCAR_GP_PIN(1, 9), RCAR_GP_PIN(1, 12),
3634 RCAR_GP_PIN(1, 15), RCAR_GP_PIN(1, 16),
3635 RCAR_GP_PIN(1, 17), RCAR_GP_PIN(1, 18),
3636 RCAR_GP_PIN(1, 19), RCAR_GP_PIN(0, 1),
3637 },
Marek Vasuteb13e0f2018-06-10 16:05:48 +02003638};
3639
Marek Vasut88e81ec2019-03-04 22:39:51 +01003640static const union vin_data vin4_data_b_mux = {
3641 .data24 = {
3642 VI4_DATA0_B_MARK, VI4_DATA1_B_MARK,
3643 VI4_DATA2_B_MARK, VI4_DATA3_B_MARK,
3644 VI4_DATA4_B_MARK, VI4_DATA5_B_MARK,
3645 VI4_DATA6_B_MARK, VI4_DATA7_B_MARK,
3646 VI4_DATA8_MARK, VI4_DATA9_MARK,
3647 VI4_DATA10_MARK, VI4_DATA11_MARK,
3648 VI4_DATA12_MARK, VI4_DATA13_MARK,
3649 VI4_DATA14_MARK, VI4_DATA15_MARK,
3650 VI4_DATA16_MARK, VI4_DATA17_MARK,
3651 VI4_DATA18_MARK, VI4_DATA19_MARK,
3652 VI4_DATA20_MARK, VI4_DATA21_MARK,
3653 VI4_DATA22_MARK, VI4_DATA23_MARK,
3654 },
Marek Vasuteb13e0f2018-06-10 16:05:48 +02003655};
3656
3657static const unsigned int vin4_sync_pins[] = {
3658 /* HSYNC, VSYNC */
3659 RCAR_GP_PIN(2, 25), RCAR_GP_PIN(2, 24),
3660};
3661
3662static const unsigned int vin4_sync_mux[] = {
3663 VI4_HSYNC_N_MARK, VI4_VSYNC_N_MARK,
3664};
3665
3666static const unsigned int vin4_field_pins[] = {
3667 RCAR_GP_PIN(2, 23),
3668};
3669
3670static const unsigned int vin4_field_mux[] = {
3671 VI4_FIELD_MARK,
3672};
3673
3674static const unsigned int vin4_clkenb_pins[] = {
3675 RCAR_GP_PIN(1, 2),
3676};
3677
3678static const unsigned int vin4_clkenb_mux[] = {
3679 VI4_CLKENB_MARK,
3680};
3681
3682static const unsigned int vin4_clk_pins[] = {
3683 RCAR_GP_PIN(2, 22),
3684};
3685
3686static const unsigned int vin4_clk_mux[] = {
3687 VI4_CLK_MARK,
3688};
3689
3690/* - VIN5 ------------------------------------------------------------------- */
Marek Vasut88e81ec2019-03-04 22:39:51 +01003691static const union vin_data16 vin5_data_a_pins = {
3692 .data16 = {
3693 RCAR_GP_PIN(1, 1), RCAR_GP_PIN(1, 2),
3694 RCAR_GP_PIN(1, 19), RCAR_GP_PIN(1, 12),
3695 RCAR_GP_PIN(1, 15), RCAR_GP_PIN(1, 16),
3696 RCAR_GP_PIN(1, 17), RCAR_GP_PIN(1, 18),
3697 RCAR_GP_PIN(0, 12), RCAR_GP_PIN(0, 13),
3698 RCAR_GP_PIN(0, 9), RCAR_GP_PIN(0, 11),
3699 RCAR_GP_PIN(0, 8), RCAR_GP_PIN(0, 10),
3700 RCAR_GP_PIN(0, 2), RCAR_GP_PIN(0, 3),
3701 },
Marek Vasuteb13e0f2018-06-10 16:05:48 +02003702};
3703
Marek Vasut88e81ec2019-03-04 22:39:51 +01003704static const union vin_data16 vin5_data_a_mux = {
3705 .data16 = {
3706 VI5_DATA0_A_MARK, VI5_DATA1_A_MARK,
3707 VI5_DATA2_A_MARK, VI5_DATA3_A_MARK,
3708 VI5_DATA4_A_MARK, VI5_DATA5_A_MARK,
3709 VI5_DATA6_A_MARK, VI5_DATA7_A_MARK,
3710 VI5_DATA8_A_MARK, VI5_DATA9_A_MARK,
3711 VI5_DATA10_A_MARK, VI5_DATA11_A_MARK,
3712 VI5_DATA12_A_MARK, VI5_DATA13_A_MARK,
3713 VI5_DATA14_A_MARK, VI5_DATA15_A_MARK,
3714 },
Marek Vasuteb13e0f2018-06-10 16:05:48 +02003715};
3716
3717static const unsigned int vin5_data8_b_pins[] = {
3718 RCAR_GP_PIN(2, 23), RCAR_GP_PIN(0, 4),
3719 RCAR_GP_PIN(0, 7), RCAR_GP_PIN(0, 12),
3720 RCAR_GP_PIN(0, 13), RCAR_GP_PIN(0, 14),
3721 RCAR_GP_PIN(0, 16), RCAR_GP_PIN(0, 17),
3722};
3723
3724static const unsigned int vin5_data8_b_mux[] = {
3725 VI5_DATA0_B_MARK, VI5_DATA1_B_MARK,
3726 VI5_DATA2_B_MARK, VI5_DATA3_B_MARK,
3727 VI5_DATA4_B_MARK, VI5_DATA5_B_MARK,
3728 VI5_DATA6_B_MARK, VI5_DATA7_B_MARK,
3729};
3730
3731static const unsigned int vin5_sync_a_pins[] = {
3732 /* HSYNC_N, VSYNC_N */
3733 RCAR_GP_PIN(1, 8), RCAR_GP_PIN(1, 9),
3734};
3735
3736static const unsigned int vin5_sync_a_mux[] = {
3737 VI5_HSYNC_N_A_MARK, VI5_VSYNC_N_A_MARK,
3738};
3739
3740static const unsigned int vin5_field_a_pins[] = {
3741 RCAR_GP_PIN(1, 10),
3742};
3743
3744static const unsigned int vin5_field_a_mux[] = {
3745 VI5_FIELD_A_MARK,
3746};
3747
3748static const unsigned int vin5_clkenb_a_pins[] = {
3749 RCAR_GP_PIN(0, 1),
3750};
3751
3752static const unsigned int vin5_clkenb_a_mux[] = {
3753 VI5_CLKENB_A_MARK,
3754};
3755
3756static const unsigned int vin5_clk_a_pins[] = {
3757 RCAR_GP_PIN(1, 0),
3758};
3759
3760static const unsigned int vin5_clk_a_mux[] = {
3761 VI5_CLK_A_MARK,
3762};
3763
3764static const unsigned int vin5_clk_b_pins[] = {
3765 RCAR_GP_PIN(2, 22),
3766};
3767
3768static const unsigned int vin5_clk_b_mux[] = {
3769 VI5_CLK_B_MARK,
3770};
3771
Marek Vasut88e81ec2019-03-04 22:39:51 +01003772static const struct {
Eugeniu Roscaf0066b02019-07-09 18:27:11 +02003773 struct sh_pfc_pin_group common[247];
3774 struct sh_pfc_pin_group automotive[21];
Marek Vasut88e81ec2019-03-04 22:39:51 +01003775} pinmux_groups = {
3776 .common = {
3777 SH_PFC_PIN_GROUP(audio_clk_a),
3778 SH_PFC_PIN_GROUP(audio_clk_b_a),
3779 SH_PFC_PIN_GROUP(audio_clk_b_b),
3780 SH_PFC_PIN_GROUP(audio_clk_b_c),
3781 SH_PFC_PIN_GROUP(audio_clk_c_a),
3782 SH_PFC_PIN_GROUP(audio_clk_c_b),
3783 SH_PFC_PIN_GROUP(audio_clk_c_c),
3784 SH_PFC_PIN_GROUP(audio_clkout_a),
3785 SH_PFC_PIN_GROUP(audio_clkout_b),
3786 SH_PFC_PIN_GROUP(audio_clkout1_a),
3787 SH_PFC_PIN_GROUP(audio_clkout1_b),
3788 SH_PFC_PIN_GROUP(audio_clkout1_c),
3789 SH_PFC_PIN_GROUP(audio_clkout2_a),
3790 SH_PFC_PIN_GROUP(audio_clkout2_b),
3791 SH_PFC_PIN_GROUP(audio_clkout2_c),
3792 SH_PFC_PIN_GROUP(audio_clkout3_a),
3793 SH_PFC_PIN_GROUP(audio_clkout3_b),
3794 SH_PFC_PIN_GROUP(audio_clkout3_c),
3795 SH_PFC_PIN_GROUP(avb_link),
3796 SH_PFC_PIN_GROUP(avb_magic),
3797 SH_PFC_PIN_GROUP(avb_phy_int),
3798 SH_PFC_PIN_GROUP(avb_mii),
3799 SH_PFC_PIN_GROUP(avb_avtp_pps),
Lad Prabhakare4db7392020-10-14 16:45:59 +01003800 SH_PFC_PIN_GROUP(avb_avtp_match),
3801 SH_PFC_PIN_GROUP(avb_avtp_capture),
Marek Vasut88e81ec2019-03-04 22:39:51 +01003802 SH_PFC_PIN_GROUP(can0_data),
3803 SH_PFC_PIN_GROUP(can1_data),
3804 SH_PFC_PIN_GROUP(can_clk),
Eugeniu Roscaf0066b02019-07-09 18:27:11 +02003805 SH_PFC_PIN_GROUP(canfd0_data),
3806 SH_PFC_PIN_GROUP(canfd1_data),
Marek Vasut88e81ec2019-03-04 22:39:51 +01003807 SH_PFC_PIN_GROUP(du_rgb666),
3808 SH_PFC_PIN_GROUP(du_rgb888),
3809 SH_PFC_PIN_GROUP(du_clk_in_0),
3810 SH_PFC_PIN_GROUP(du_clk_in_1),
3811 SH_PFC_PIN_GROUP(du_clk_out_0),
3812 SH_PFC_PIN_GROUP(du_sync),
3813 SH_PFC_PIN_GROUP(du_disp_cde),
3814 SH_PFC_PIN_GROUP(du_cde),
3815 SH_PFC_PIN_GROUP(du_disp),
3816 SH_PFC_PIN_GROUP(hscif0_data_a),
3817 SH_PFC_PIN_GROUP(hscif0_clk_a),
3818 SH_PFC_PIN_GROUP(hscif0_ctrl_a),
3819 SH_PFC_PIN_GROUP(hscif0_data_b),
3820 SH_PFC_PIN_GROUP(hscif0_clk_b),
3821 SH_PFC_PIN_GROUP(hscif1_data_a),
3822 SH_PFC_PIN_GROUP(hscif1_clk_a),
3823 SH_PFC_PIN_GROUP(hscif1_data_b),
3824 SH_PFC_PIN_GROUP(hscif1_clk_b),
3825 SH_PFC_PIN_GROUP(hscif1_ctrl_b),
3826 SH_PFC_PIN_GROUP(hscif2_data_a),
3827 SH_PFC_PIN_GROUP(hscif2_clk_a),
3828 SH_PFC_PIN_GROUP(hscif2_ctrl_a),
3829 SH_PFC_PIN_GROUP(hscif2_data_b),
3830 SH_PFC_PIN_GROUP(hscif3_data_a),
3831 SH_PFC_PIN_GROUP(hscif3_data_b),
3832 SH_PFC_PIN_GROUP(hscif3_clk_b),
3833 SH_PFC_PIN_GROUP(hscif3_data_c),
3834 SH_PFC_PIN_GROUP(hscif3_clk_c),
3835 SH_PFC_PIN_GROUP(hscif3_ctrl_c),
3836 SH_PFC_PIN_GROUP(hscif3_data_d),
3837 SH_PFC_PIN_GROUP(hscif3_data_e),
3838 SH_PFC_PIN_GROUP(hscif3_ctrl_e),
3839 SH_PFC_PIN_GROUP(hscif4_data_a),
3840 SH_PFC_PIN_GROUP(hscif4_clk_a),
3841 SH_PFC_PIN_GROUP(hscif4_ctrl_a),
3842 SH_PFC_PIN_GROUP(hscif4_data_b),
3843 SH_PFC_PIN_GROUP(hscif4_clk_b),
3844 SH_PFC_PIN_GROUP(hscif4_data_c),
3845 SH_PFC_PIN_GROUP(hscif4_data_d),
3846 SH_PFC_PIN_GROUP(hscif4_data_e),
3847 SH_PFC_PIN_GROUP(i2c1_a),
3848 SH_PFC_PIN_GROUP(i2c1_b),
3849 SH_PFC_PIN_GROUP(i2c1_c),
3850 SH_PFC_PIN_GROUP(i2c1_d),
3851 SH_PFC_PIN_GROUP(i2c2_a),
3852 SH_PFC_PIN_GROUP(i2c2_b),
3853 SH_PFC_PIN_GROUP(i2c2_c),
3854 SH_PFC_PIN_GROUP(i2c2_d),
3855 SH_PFC_PIN_GROUP(i2c2_e),
3856 SH_PFC_PIN_GROUP(i2c4),
3857 SH_PFC_PIN_GROUP(i2c5),
3858 SH_PFC_PIN_GROUP(i2c6_a),
3859 SH_PFC_PIN_GROUP(i2c6_b),
3860 SH_PFC_PIN_GROUP(i2c7_a),
3861 SH_PFC_PIN_GROUP(i2c7_b),
3862 SH_PFC_PIN_GROUP(intc_ex_irq0),
3863 SH_PFC_PIN_GROUP(intc_ex_irq1),
3864 SH_PFC_PIN_GROUP(intc_ex_irq2),
3865 SH_PFC_PIN_GROUP(intc_ex_irq3),
3866 SH_PFC_PIN_GROUP(intc_ex_irq4),
3867 SH_PFC_PIN_GROUP(intc_ex_irq5),
3868 SH_PFC_PIN_GROUP(msiof0_clk),
3869 SH_PFC_PIN_GROUP(msiof0_sync),
3870 SH_PFC_PIN_GROUP(msiof0_ss1),
3871 SH_PFC_PIN_GROUP(msiof0_ss2),
3872 SH_PFC_PIN_GROUP(msiof0_txd),
3873 SH_PFC_PIN_GROUP(msiof0_rxd),
3874 SH_PFC_PIN_GROUP(msiof1_clk),
3875 SH_PFC_PIN_GROUP(msiof1_sync),
3876 SH_PFC_PIN_GROUP(msiof1_ss1),
3877 SH_PFC_PIN_GROUP(msiof1_ss2),
3878 SH_PFC_PIN_GROUP(msiof1_txd),
3879 SH_PFC_PIN_GROUP(msiof1_rxd),
3880 SH_PFC_PIN_GROUP(msiof2_clk_a),
3881 SH_PFC_PIN_GROUP(msiof2_sync_a),
3882 SH_PFC_PIN_GROUP(msiof2_ss1_a),
3883 SH_PFC_PIN_GROUP(msiof2_ss2_a),
3884 SH_PFC_PIN_GROUP(msiof2_txd_a),
3885 SH_PFC_PIN_GROUP(msiof2_rxd_a),
3886 SH_PFC_PIN_GROUP(msiof2_clk_b),
3887 SH_PFC_PIN_GROUP(msiof2_sync_b),
3888 SH_PFC_PIN_GROUP(msiof2_ss1_b),
3889 SH_PFC_PIN_GROUP(msiof2_ss2_b),
3890 SH_PFC_PIN_GROUP(msiof2_txd_b),
3891 SH_PFC_PIN_GROUP(msiof2_rxd_b),
3892 SH_PFC_PIN_GROUP(msiof3_clk_a),
3893 SH_PFC_PIN_GROUP(msiof3_sync_a),
3894 SH_PFC_PIN_GROUP(msiof3_ss1_a),
3895 SH_PFC_PIN_GROUP(msiof3_ss2_a),
3896 SH_PFC_PIN_GROUP(msiof3_txd_a),
3897 SH_PFC_PIN_GROUP(msiof3_rxd_a),
3898 SH_PFC_PIN_GROUP(msiof3_clk_b),
3899 SH_PFC_PIN_GROUP(msiof3_sync_b),
3900 SH_PFC_PIN_GROUP(msiof3_ss1_b),
3901 SH_PFC_PIN_GROUP(msiof3_txd_b),
3902 SH_PFC_PIN_GROUP(msiof3_rxd_b),
3903 SH_PFC_PIN_GROUP(pwm0_a),
3904 SH_PFC_PIN_GROUP(pwm0_b),
3905 SH_PFC_PIN_GROUP(pwm1_a),
3906 SH_PFC_PIN_GROUP(pwm1_b),
3907 SH_PFC_PIN_GROUP(pwm2_a),
3908 SH_PFC_PIN_GROUP(pwm2_b),
3909 SH_PFC_PIN_GROUP(pwm2_c),
3910 SH_PFC_PIN_GROUP(pwm3_a),
3911 SH_PFC_PIN_GROUP(pwm3_b),
3912 SH_PFC_PIN_GROUP(pwm3_c),
3913 SH_PFC_PIN_GROUP(pwm4_a),
3914 SH_PFC_PIN_GROUP(pwm4_b),
3915 SH_PFC_PIN_GROUP(pwm5_a),
3916 SH_PFC_PIN_GROUP(pwm5_b),
3917 SH_PFC_PIN_GROUP(pwm6_a),
3918 SH_PFC_PIN_GROUP(pwm6_b),
3919 SH_PFC_PIN_GROUP(scif0_data_a),
3920 SH_PFC_PIN_GROUP(scif0_clk_a),
3921 SH_PFC_PIN_GROUP(scif0_ctrl_a),
3922 SH_PFC_PIN_GROUP(scif0_data_b),
3923 SH_PFC_PIN_GROUP(scif0_clk_b),
3924 SH_PFC_PIN_GROUP(scif1_data),
3925 SH_PFC_PIN_GROUP(scif1_clk),
3926 SH_PFC_PIN_GROUP(scif1_ctrl),
3927 SH_PFC_PIN_GROUP(scif2_data_a),
3928 SH_PFC_PIN_GROUP(scif2_clk_a),
3929 SH_PFC_PIN_GROUP(scif2_data_b),
3930 SH_PFC_PIN_GROUP(scif3_data_a),
3931 SH_PFC_PIN_GROUP(scif3_clk_a),
3932 SH_PFC_PIN_GROUP(scif3_ctrl_a),
3933 SH_PFC_PIN_GROUP(scif3_data_b),
3934 SH_PFC_PIN_GROUP(scif3_data_c),
3935 SH_PFC_PIN_GROUP(scif3_clk_c),
3936 SH_PFC_PIN_GROUP(scif4_data_a),
3937 SH_PFC_PIN_GROUP(scif4_clk_a),
3938 SH_PFC_PIN_GROUP(scif4_ctrl_a),
3939 SH_PFC_PIN_GROUP(scif4_data_b),
3940 SH_PFC_PIN_GROUP(scif4_clk_b),
3941 SH_PFC_PIN_GROUP(scif4_data_c),
3942 SH_PFC_PIN_GROUP(scif4_ctrl_c),
3943 SH_PFC_PIN_GROUP(scif5_data_a),
3944 SH_PFC_PIN_GROUP(scif5_clk_a),
3945 SH_PFC_PIN_GROUP(scif5_data_b),
3946 SH_PFC_PIN_GROUP(scif5_data_c),
3947 SH_PFC_PIN_GROUP(scif_clk_a),
3948 SH_PFC_PIN_GROUP(scif_clk_b),
3949 SH_PFC_PIN_GROUP(sdhi0_data1),
3950 SH_PFC_PIN_GROUP(sdhi0_data4),
3951 SH_PFC_PIN_GROUP(sdhi0_ctrl),
3952 SH_PFC_PIN_GROUP(sdhi0_cd),
3953 SH_PFC_PIN_GROUP(sdhi0_wp),
3954 SH_PFC_PIN_GROUP(sdhi1_data1),
3955 SH_PFC_PIN_GROUP(sdhi1_data4),
3956 SH_PFC_PIN_GROUP(sdhi1_ctrl),
3957 SH_PFC_PIN_GROUP(sdhi1_cd),
3958 SH_PFC_PIN_GROUP(sdhi1_wp),
3959 SH_PFC_PIN_GROUP(sdhi3_data1),
3960 SH_PFC_PIN_GROUP(sdhi3_data4),
3961 SH_PFC_PIN_GROUP(sdhi3_data8),
3962 SH_PFC_PIN_GROUP(sdhi3_ctrl),
3963 SH_PFC_PIN_GROUP(sdhi3_cd),
3964 SH_PFC_PIN_GROUP(sdhi3_wp),
3965 SH_PFC_PIN_GROUP(sdhi3_ds),
3966 SH_PFC_PIN_GROUP(ssi0_data),
3967 SH_PFC_PIN_GROUP(ssi01239_ctrl),
3968 SH_PFC_PIN_GROUP(ssi1_data),
3969 SH_PFC_PIN_GROUP(ssi1_ctrl),
3970 SH_PFC_PIN_GROUP(ssi2_data),
3971 SH_PFC_PIN_GROUP(ssi2_ctrl_a),
3972 SH_PFC_PIN_GROUP(ssi2_ctrl_b),
3973 SH_PFC_PIN_GROUP(ssi3_data),
3974 SH_PFC_PIN_GROUP(ssi349_ctrl),
3975 SH_PFC_PIN_GROUP(ssi4_data),
3976 SH_PFC_PIN_GROUP(ssi4_ctrl),
3977 SH_PFC_PIN_GROUP(ssi5_data),
3978 SH_PFC_PIN_GROUP(ssi5_ctrl),
3979 SH_PFC_PIN_GROUP(ssi6_data),
3980 SH_PFC_PIN_GROUP(ssi6_ctrl),
3981 SH_PFC_PIN_GROUP(ssi7_data),
3982 SH_PFC_PIN_GROUP(ssi78_ctrl),
3983 SH_PFC_PIN_GROUP(ssi8_data),
3984 SH_PFC_PIN_GROUP(ssi9_data),
3985 SH_PFC_PIN_GROUP(ssi9_ctrl_a),
3986 SH_PFC_PIN_GROUP(ssi9_ctrl_b),
3987 SH_PFC_PIN_GROUP(tmu_tclk1_a),
3988 SH_PFC_PIN_GROUP(tmu_tclk1_b),
3989 SH_PFC_PIN_GROUP(tmu_tclk2_a),
3990 SH_PFC_PIN_GROUP(tmu_tclk2_b),
3991 SH_PFC_PIN_GROUP(usb0_a),
3992 SH_PFC_PIN_GROUP(usb0_b),
3993 SH_PFC_PIN_GROUP(usb0_id),
3994 SH_PFC_PIN_GROUP(usb30),
3995 SH_PFC_PIN_GROUP(usb30_id),
3996 VIN_DATA_PIN_GROUP(vin4_data, 8, _a),
3997 VIN_DATA_PIN_GROUP(vin4_data, 10, _a),
3998 VIN_DATA_PIN_GROUP(vin4_data, 12, _a),
3999 VIN_DATA_PIN_GROUP(vin4_data, 16, _a),
4000 SH_PFC_PIN_GROUP(vin4_data18_a),
4001 VIN_DATA_PIN_GROUP(vin4_data, 20, _a),
4002 VIN_DATA_PIN_GROUP(vin4_data, 24, _a),
4003 VIN_DATA_PIN_GROUP(vin4_data, 8, _b),
4004 VIN_DATA_PIN_GROUP(vin4_data, 10, _b),
4005 VIN_DATA_PIN_GROUP(vin4_data, 12, _b),
4006 VIN_DATA_PIN_GROUP(vin4_data, 16, _b),
4007 SH_PFC_PIN_GROUP(vin4_data18_b),
4008 VIN_DATA_PIN_GROUP(vin4_data, 20, _b),
4009 VIN_DATA_PIN_GROUP(vin4_data, 24, _b),
4010 SH_PFC_PIN_GROUP(vin4_sync),
4011 SH_PFC_PIN_GROUP(vin4_field),
4012 SH_PFC_PIN_GROUP(vin4_clkenb),
4013 SH_PFC_PIN_GROUP(vin4_clk),
4014 VIN_DATA_PIN_GROUP(vin5_data, 8, _a),
4015 VIN_DATA_PIN_GROUP(vin5_data, 10, _a),
4016 VIN_DATA_PIN_GROUP(vin5_data, 12, _a),
4017 VIN_DATA_PIN_GROUP(vin5_data, 16, _a),
4018 SH_PFC_PIN_GROUP(vin5_data8_b),
4019 SH_PFC_PIN_GROUP(vin5_sync_a),
4020 SH_PFC_PIN_GROUP(vin5_field_a),
4021 SH_PFC_PIN_GROUP(vin5_clkenb_a),
4022 SH_PFC_PIN_GROUP(vin5_clk_a),
4023 SH_PFC_PIN_GROUP(vin5_clk_b),
4024 },
4025 .automotive = {
Marek Vasut88e81ec2019-03-04 22:39:51 +01004026 SH_PFC_PIN_GROUP(drif0_ctrl_a),
4027 SH_PFC_PIN_GROUP(drif0_data0_a),
4028 SH_PFC_PIN_GROUP(drif0_data1_a),
4029 SH_PFC_PIN_GROUP(drif0_ctrl_b),
4030 SH_PFC_PIN_GROUP(drif0_data0_b),
4031 SH_PFC_PIN_GROUP(drif0_data1_b),
4032 SH_PFC_PIN_GROUP(drif1_ctrl),
4033 SH_PFC_PIN_GROUP(drif1_data0),
4034 SH_PFC_PIN_GROUP(drif1_data1),
4035 SH_PFC_PIN_GROUP(drif2_ctrl_a),
4036 SH_PFC_PIN_GROUP(drif2_data0_a),
4037 SH_PFC_PIN_GROUP(drif2_data1_a),
4038 SH_PFC_PIN_GROUP(drif2_ctrl_b),
4039 SH_PFC_PIN_GROUP(drif2_data0_b),
4040 SH_PFC_PIN_GROUP(drif2_data1_b),
4041 SH_PFC_PIN_GROUP(drif3_ctrl_a),
4042 SH_PFC_PIN_GROUP(drif3_data0_a),
4043 SH_PFC_PIN_GROUP(drif3_data1_a),
4044 SH_PFC_PIN_GROUP(drif3_ctrl_b),
4045 SH_PFC_PIN_GROUP(drif3_data0_b),
4046 SH_PFC_PIN_GROUP(drif3_data1_b),
4047 }
Marek Vasuteb13e0f2018-06-10 16:05:48 +02004048};
4049
4050static const char * const audio_clk_groups[] = {
4051 "audio_clk_a",
4052 "audio_clk_b_a",
4053 "audio_clk_b_b",
4054 "audio_clk_b_c",
4055 "audio_clk_c_a",
4056 "audio_clk_c_b",
4057 "audio_clk_c_c",
4058 "audio_clkout_a",
4059 "audio_clkout_b",
4060 "audio_clkout1_a",
4061 "audio_clkout1_b",
4062 "audio_clkout1_c",
4063 "audio_clkout2_a",
4064 "audio_clkout2_b",
4065 "audio_clkout2_c",
4066 "audio_clkout3_a",
4067 "audio_clkout3_b",
4068 "audio_clkout3_c",
4069};
4070
4071static const char * const avb_groups[] = {
4072 "avb_link",
4073 "avb_magic",
4074 "avb_phy_int",
4075 "avb_mii",
4076 "avb_avtp_pps",
Lad Prabhakare4db7392020-10-14 16:45:59 +01004077 "avb_avtp_match",
4078 "avb_avtp_capture",
Marek Vasuteb13e0f2018-06-10 16:05:48 +02004079};
4080
4081static const char * const can0_groups[] = {
4082 "can0_data",
4083};
4084
4085static const char * const can1_groups[] = {
4086 "can1_data",
4087};
4088
4089static const char * const can_clk_groups[] = {
4090 "can_clk",
4091};
4092
4093static const char * const canfd0_groups[] = {
4094 "canfd0_data",
4095};
4096
4097static const char * const canfd1_groups[] = {
4098 "canfd1_data",
4099};
4100
4101static const char * const drif0_groups[] = {
4102 "drif0_ctrl_a",
4103 "drif0_data0_a",
4104 "drif0_data1_a",
4105 "drif0_ctrl_b",
4106 "drif0_data0_b",
4107 "drif0_data1_b",
4108};
4109
4110static const char * const drif1_groups[] = {
4111 "drif1_ctrl",
4112 "drif1_data0",
4113 "drif1_data1",
4114};
4115
4116static const char * const drif2_groups[] = {
4117 "drif2_ctrl_a",
4118 "drif2_data0_a",
4119 "drif2_data1_a",
4120 "drif2_ctrl_b",
4121 "drif2_data0_b",
4122 "drif2_data1_b",
4123};
4124
4125static const char * const drif3_groups[] = {
4126 "drif3_ctrl_a",
4127 "drif3_data0_a",
4128 "drif3_data1_a",
4129 "drif3_ctrl_b",
4130 "drif3_data0_b",
4131 "drif3_data1_b",
4132};
4133
4134static const char * const du_groups[] = {
4135 "du_rgb666",
4136 "du_rgb888",
Marek Vasut88e81ec2019-03-04 22:39:51 +01004137 "du_clk_in_0",
4138 "du_clk_in_1",
Marek Vasuteb13e0f2018-06-10 16:05:48 +02004139 "du_clk_out_0",
4140 "du_sync",
Marek Vasut88e81ec2019-03-04 22:39:51 +01004141 "du_disp_cde",
Marek Vasuteb13e0f2018-06-10 16:05:48 +02004142 "du_cde",
4143 "du_disp",
Marek Vasuteb13e0f2018-06-10 16:05:48 +02004144};
4145
4146static const char * const hscif0_groups[] = {
4147 "hscif0_data_a",
4148 "hscif0_clk_a",
4149 "hscif0_ctrl_a",
4150 "hscif0_data_b",
4151 "hscif0_clk_b",
4152};
4153
4154static const char * const hscif1_groups[] = {
4155 "hscif1_data_a",
4156 "hscif1_clk_a",
4157 "hscif1_data_b",
4158 "hscif1_clk_b",
4159 "hscif1_ctrl_b",
4160};
4161
4162static const char * const hscif2_groups[] = {
4163 "hscif2_data_a",
4164 "hscif2_clk_a",
4165 "hscif2_ctrl_a",
4166 "hscif2_data_b",
4167};
4168
4169static const char * const hscif3_groups[] = {
4170 "hscif3_data_a",
4171 "hscif3_data_b",
4172 "hscif3_clk_b",
4173 "hscif3_data_c",
4174 "hscif3_clk_c",
4175 "hscif3_ctrl_c",
4176 "hscif3_data_d",
4177 "hscif3_data_e",
4178 "hscif3_ctrl_e",
4179};
4180
4181static const char * const hscif4_groups[] = {
4182 "hscif4_data_a",
4183 "hscif4_clk_a",
4184 "hscif4_ctrl_a",
4185 "hscif4_data_b",
4186 "hscif4_clk_b",
4187 "hscif4_data_c",
4188 "hscif4_data_d",
4189 "hscif4_data_e",
4190};
4191
4192static const char * const i2c1_groups[] = {
4193 "i2c1_a",
4194 "i2c1_b",
4195 "i2c1_c",
4196 "i2c1_d",
4197};
4198
4199static const char * const i2c2_groups[] = {
4200 "i2c2_a",
4201 "i2c2_b",
4202 "i2c2_c",
4203 "i2c2_d",
4204 "i2c2_e",
4205};
4206
4207static const char * const i2c4_groups[] = {
4208 "i2c4",
4209};
4210
4211static const char * const i2c5_groups[] = {
4212 "i2c5",
4213};
4214
4215static const char * const i2c6_groups[] = {
4216 "i2c6_a",
4217 "i2c6_b",
4218};
4219
4220static const char * const i2c7_groups[] = {
4221 "i2c7_a",
4222 "i2c7_b",
4223};
4224
4225static const char * const intc_ex_groups[] = {
4226 "intc_ex_irq0",
Marek Vasut88e81ec2019-03-04 22:39:51 +01004227 "intc_ex_irq1",
4228 "intc_ex_irq2",
4229 "intc_ex_irq3",
4230 "intc_ex_irq4",
4231 "intc_ex_irq5",
Marek Vasuteb13e0f2018-06-10 16:05:48 +02004232};
4233
4234static const char * const msiof0_groups[] = {
4235 "msiof0_clk",
4236 "msiof0_sync",
4237 "msiof0_ss1",
4238 "msiof0_ss2",
4239 "msiof0_txd",
4240 "msiof0_rxd",
4241};
4242
4243static const char * const msiof1_groups[] = {
4244 "msiof1_clk",
4245 "msiof1_sync",
4246 "msiof1_ss1",
4247 "msiof1_ss2",
4248 "msiof1_txd",
4249 "msiof1_rxd",
4250};
4251
4252static const char * const msiof2_groups[] = {
4253 "msiof2_clk_a",
4254 "msiof2_sync_a",
4255 "msiof2_ss1_a",
4256 "msiof2_ss2_a",
4257 "msiof2_txd_a",
4258 "msiof2_rxd_a",
4259 "msiof2_clk_b",
4260 "msiof2_sync_b",
4261 "msiof2_ss1_b",
4262 "msiof2_ss2_b",
4263 "msiof2_txd_b",
4264 "msiof2_rxd_b",
4265};
4266
4267static const char * const msiof3_groups[] = {
4268 "msiof3_clk_a",
4269 "msiof3_sync_a",
4270 "msiof3_ss1_a",
4271 "msiof3_ss2_a",
4272 "msiof3_txd_a",
4273 "msiof3_rxd_a",
4274 "msiof3_clk_b",
4275 "msiof3_sync_b",
4276 "msiof3_ss1_b",
4277 "msiof3_txd_b",
4278 "msiof3_rxd_b",
4279};
4280
4281static const char * const pwm0_groups[] = {
4282 "pwm0_a",
4283 "pwm0_b",
4284};
4285
4286static const char * const pwm1_groups[] = {
4287 "pwm1_a",
4288 "pwm1_b",
4289};
4290
4291static const char * const pwm2_groups[] = {
4292 "pwm2_a",
4293 "pwm2_b",
4294 "pwm2_c",
4295};
4296
4297static const char * const pwm3_groups[] = {
4298 "pwm3_a",
4299 "pwm3_b",
4300 "pwm3_c",
4301};
4302
4303static const char * const pwm4_groups[] = {
4304 "pwm4_a",
4305 "pwm4_b",
4306};
4307
4308static const char * const pwm5_groups[] = {
4309 "pwm5_a",
4310 "pwm5_b",
4311};
4312
4313static const char * const pwm6_groups[] = {
4314 "pwm6_a",
4315 "pwm6_b",
4316};
4317
4318static const char * const scif0_groups[] = {
4319 "scif0_data_a",
4320 "scif0_clk_a",
4321 "scif0_ctrl_a",
4322 "scif0_data_b",
4323 "scif0_clk_b",
4324};
4325
4326static const char * const scif1_groups[] = {
4327 "scif1_data",
4328 "scif1_clk",
4329 "scif1_ctrl",
4330};
4331
4332static const char * const scif2_groups[] = {
4333 "scif2_data_a",
4334 "scif2_clk_a",
4335 "scif2_data_b",
4336};
4337
4338static const char * const scif3_groups[] = {
4339 "scif3_data_a",
4340 "scif3_clk_a",
4341 "scif3_ctrl_a",
4342 "scif3_data_b",
4343 "scif3_data_c",
4344 "scif3_clk_c",
4345};
4346
4347static const char * const scif4_groups[] = {
4348 "scif4_data_a",
4349 "scif4_clk_a",
4350 "scif4_ctrl_a",
4351 "scif4_data_b",
4352 "scif4_clk_b",
4353 "scif4_data_c",
4354 "scif4_ctrl_c",
4355};
4356
4357static const char * const scif5_groups[] = {
4358 "scif5_data_a",
4359 "scif5_clk_a",
4360 "scif5_data_b",
4361 "scif5_data_c",
4362};
4363
4364static const char * const scif_clk_groups[] = {
4365 "scif_clk_a",
4366 "scif_clk_b",
4367};
4368
4369static const char * const sdhi0_groups[] = {
4370 "sdhi0_data1",
4371 "sdhi0_data4",
4372 "sdhi0_ctrl",
4373 "sdhi0_cd",
4374 "sdhi0_wp",
4375};
4376
4377static const char * const sdhi1_groups[] = {
4378 "sdhi1_data1",
4379 "sdhi1_data4",
4380 "sdhi1_ctrl",
4381 "sdhi1_cd",
4382 "sdhi1_wp",
4383};
4384
4385static const char * const sdhi3_groups[] = {
4386 "sdhi3_data1",
4387 "sdhi3_data4",
4388 "sdhi3_data8",
4389 "sdhi3_ctrl",
4390 "sdhi3_cd",
4391 "sdhi3_wp",
4392 "sdhi3_ds",
4393};
4394
4395static const char * const ssi_groups[] = {
4396 "ssi0_data",
4397 "ssi01239_ctrl",
4398 "ssi1_data",
4399 "ssi1_ctrl",
4400 "ssi2_data",
4401 "ssi2_ctrl_a",
4402 "ssi2_ctrl_b",
4403 "ssi3_data",
4404 "ssi349_ctrl",
4405 "ssi4_data",
4406 "ssi4_ctrl",
4407 "ssi5_data",
4408 "ssi5_ctrl",
4409 "ssi6_data",
4410 "ssi6_ctrl",
4411 "ssi7_data",
4412 "ssi78_ctrl",
4413 "ssi8_data",
4414 "ssi9_data",
4415 "ssi9_ctrl_a",
4416 "ssi9_ctrl_b",
4417};
4418
4419static const char * const tmu_groups[] = {
4420 "tmu_tclk1_a",
4421 "tmu_tclk1_b",
4422 "tmu_tclk2_a",
4423 "tmu_tclk2_b",
4424};
4425
4426static const char * const usb0_groups[] = {
4427 "usb0_a",
4428 "usb0_b",
4429 "usb0_id",
4430};
4431
4432static const char * const usb30_groups[] = {
4433 "usb30",
4434 "usb30_id",
4435};
4436
4437static const char * const vin4_groups[] = {
4438 "vin4_data8_a",
4439 "vin4_data10_a",
4440 "vin4_data12_a",
4441 "vin4_data16_a",
Marek Vasut88e81ec2019-03-04 22:39:51 +01004442 "vin4_data18_a",
Marek Vasuteb13e0f2018-06-10 16:05:48 +02004443 "vin4_data20_a",
4444 "vin4_data24_a",
4445 "vin4_data8_b",
4446 "vin4_data10_b",
4447 "vin4_data12_b",
4448 "vin4_data16_b",
Marek Vasut88e81ec2019-03-04 22:39:51 +01004449 "vin4_data18_b",
Marek Vasuteb13e0f2018-06-10 16:05:48 +02004450 "vin4_data20_b",
4451 "vin4_data24_b",
Marek Vasuteb13e0f2018-06-10 16:05:48 +02004452 "vin4_sync",
4453 "vin4_field",
4454 "vin4_clkenb",
4455 "vin4_clk",
4456};
4457
4458static const char * const vin5_groups[] = {
4459 "vin5_data8_a",
Marek Vasuteb13e0f2018-06-10 16:05:48 +02004460 "vin5_data10_a",
4461 "vin5_data12_a",
4462 "vin5_data16_a",
4463 "vin5_data8_b",
4464 "vin5_sync_a",
4465 "vin5_field_a",
4466 "vin5_clkenb_a",
4467 "vin5_clk_a",
4468 "vin5_clk_b",
Marek Vasut68a77042018-04-26 13:09:20 +02004469};
4470
Marek Vasut88e81ec2019-03-04 22:39:51 +01004471static const struct {
Eugeniu Roscaf0066b02019-07-09 18:27:11 +02004472 struct sh_pfc_function common[47];
4473 struct sh_pfc_function automotive[4];
Marek Vasut88e81ec2019-03-04 22:39:51 +01004474} pinmux_functions = {
4475 .common = {
4476 SH_PFC_FUNCTION(audio_clk),
4477 SH_PFC_FUNCTION(avb),
4478 SH_PFC_FUNCTION(can0),
4479 SH_PFC_FUNCTION(can1),
4480 SH_PFC_FUNCTION(can_clk),
Eugeniu Roscaf0066b02019-07-09 18:27:11 +02004481 SH_PFC_FUNCTION(canfd0),
4482 SH_PFC_FUNCTION(canfd1),
Marek Vasut88e81ec2019-03-04 22:39:51 +01004483 SH_PFC_FUNCTION(du),
4484 SH_PFC_FUNCTION(hscif0),
4485 SH_PFC_FUNCTION(hscif1),
4486 SH_PFC_FUNCTION(hscif2),
4487 SH_PFC_FUNCTION(hscif3),
4488 SH_PFC_FUNCTION(hscif4),
4489 SH_PFC_FUNCTION(i2c1),
4490 SH_PFC_FUNCTION(i2c2),
4491 SH_PFC_FUNCTION(i2c4),
4492 SH_PFC_FUNCTION(i2c5),
4493 SH_PFC_FUNCTION(i2c6),
4494 SH_PFC_FUNCTION(i2c7),
4495 SH_PFC_FUNCTION(intc_ex),
4496 SH_PFC_FUNCTION(msiof0),
4497 SH_PFC_FUNCTION(msiof1),
4498 SH_PFC_FUNCTION(msiof2),
4499 SH_PFC_FUNCTION(msiof3),
4500 SH_PFC_FUNCTION(pwm0),
4501 SH_PFC_FUNCTION(pwm1),
4502 SH_PFC_FUNCTION(pwm2),
4503 SH_PFC_FUNCTION(pwm3),
4504 SH_PFC_FUNCTION(pwm4),
4505 SH_PFC_FUNCTION(pwm5),
4506 SH_PFC_FUNCTION(pwm6),
4507 SH_PFC_FUNCTION(scif0),
4508 SH_PFC_FUNCTION(scif1),
4509 SH_PFC_FUNCTION(scif2),
4510 SH_PFC_FUNCTION(scif3),
4511 SH_PFC_FUNCTION(scif4),
4512 SH_PFC_FUNCTION(scif5),
4513 SH_PFC_FUNCTION(scif_clk),
4514 SH_PFC_FUNCTION(sdhi0),
4515 SH_PFC_FUNCTION(sdhi1),
4516 SH_PFC_FUNCTION(sdhi3),
4517 SH_PFC_FUNCTION(ssi),
4518 SH_PFC_FUNCTION(tmu),
4519 SH_PFC_FUNCTION(usb0),
4520 SH_PFC_FUNCTION(usb30),
4521 SH_PFC_FUNCTION(vin4),
4522 SH_PFC_FUNCTION(vin5),
4523 },
4524 .automotive = {
Marek Vasut88e81ec2019-03-04 22:39:51 +01004525 SH_PFC_FUNCTION(drif0),
4526 SH_PFC_FUNCTION(drif1),
4527 SH_PFC_FUNCTION(drif2),
4528 SH_PFC_FUNCTION(drif3),
4529 }
Marek Vasut68a77042018-04-26 13:09:20 +02004530};
4531
4532static const struct pinmux_cfg_reg pinmux_config_regs[] = {
4533#define F_(x, y) FN_##y
4534#define FM(x) FN_##x
Eugeniu Roscaf0066b02019-07-09 18:27:11 +02004535 { PINMUX_CFG_REG("GPSR0", 0xe6060100, 32, 1, GROUP(
Marek Vasut68a77042018-04-26 13:09:20 +02004536 0, 0,
4537 0, 0,
4538 0, 0,
4539 0, 0,
4540 0, 0,
4541 0, 0,
4542 0, 0,
4543 0, 0,
4544 0, 0,
4545 0, 0,
4546 0, 0,
4547 0, 0,
4548 0, 0,
4549 0, 0,
4550 GP_0_17_FN, GPSR0_17,
4551 GP_0_16_FN, GPSR0_16,
4552 GP_0_15_FN, GPSR0_15,
4553 GP_0_14_FN, GPSR0_14,
4554 GP_0_13_FN, GPSR0_13,
4555 GP_0_12_FN, GPSR0_12,
4556 GP_0_11_FN, GPSR0_11,
4557 GP_0_10_FN, GPSR0_10,
4558 GP_0_9_FN, GPSR0_9,
4559 GP_0_8_FN, GPSR0_8,
4560 GP_0_7_FN, GPSR0_7,
4561 GP_0_6_FN, GPSR0_6,
4562 GP_0_5_FN, GPSR0_5,
4563 GP_0_4_FN, GPSR0_4,
4564 GP_0_3_FN, GPSR0_3,
4565 GP_0_2_FN, GPSR0_2,
4566 GP_0_1_FN, GPSR0_1,
Eugeniu Roscaf0066b02019-07-09 18:27:11 +02004567 GP_0_0_FN, GPSR0_0, ))
Marek Vasut68a77042018-04-26 13:09:20 +02004568 },
Eugeniu Roscaf0066b02019-07-09 18:27:11 +02004569 { PINMUX_CFG_REG("GPSR1", 0xe6060104, 32, 1, GROUP(
Marek Vasut68a77042018-04-26 13:09:20 +02004570 0, 0,
4571 0, 0,
4572 0, 0,
4573 0, 0,
4574 0, 0,
4575 0, 0,
4576 0, 0,
4577 0, 0,
4578 0, 0,
4579 GP_1_22_FN, GPSR1_22,
4580 GP_1_21_FN, GPSR1_21,
4581 GP_1_20_FN, GPSR1_20,
4582 GP_1_19_FN, GPSR1_19,
4583 GP_1_18_FN, GPSR1_18,
4584 GP_1_17_FN, GPSR1_17,
4585 GP_1_16_FN, GPSR1_16,
4586 GP_1_15_FN, GPSR1_15,
4587 GP_1_14_FN, GPSR1_14,
4588 GP_1_13_FN, GPSR1_13,
4589 GP_1_12_FN, GPSR1_12,
4590 GP_1_11_FN, GPSR1_11,
4591 GP_1_10_FN, GPSR1_10,
4592 GP_1_9_FN, GPSR1_9,
4593 GP_1_8_FN, GPSR1_8,
4594 GP_1_7_FN, GPSR1_7,
4595 GP_1_6_FN, GPSR1_6,
4596 GP_1_5_FN, GPSR1_5,
4597 GP_1_4_FN, GPSR1_4,
4598 GP_1_3_FN, GPSR1_3,
4599 GP_1_2_FN, GPSR1_2,
4600 GP_1_1_FN, GPSR1_1,
Eugeniu Roscaf0066b02019-07-09 18:27:11 +02004601 GP_1_0_FN, GPSR1_0, ))
Marek Vasut68a77042018-04-26 13:09:20 +02004602 },
Eugeniu Roscaf0066b02019-07-09 18:27:11 +02004603 { PINMUX_CFG_REG("GPSR2", 0xe6060108, 32, 1, GROUP(
Marek Vasut68a77042018-04-26 13:09:20 +02004604 0, 0,
4605 0, 0,
4606 0, 0,
4607 0, 0,
4608 0, 0,
4609 0, 0,
4610 GP_2_25_FN, GPSR2_25,
4611 GP_2_24_FN, GPSR2_24,
4612 GP_2_23_FN, GPSR2_23,
4613 GP_2_22_FN, GPSR2_22,
4614 GP_2_21_FN, GPSR2_21,
4615 GP_2_20_FN, GPSR2_20,
4616 GP_2_19_FN, GPSR2_19,
4617 GP_2_18_FN, GPSR2_18,
4618 GP_2_17_FN, GPSR2_17,
4619 GP_2_16_FN, GPSR2_16,
4620 GP_2_15_FN, GPSR2_15,
4621 GP_2_14_FN, GPSR2_14,
4622 GP_2_13_FN, GPSR2_13,
4623 GP_2_12_FN, GPSR2_12,
4624 GP_2_11_FN, GPSR2_11,
4625 GP_2_10_FN, GPSR2_10,
4626 GP_2_9_FN, GPSR2_9,
4627 GP_2_8_FN, GPSR2_8,
4628 GP_2_7_FN, GPSR2_7,
4629 GP_2_6_FN, GPSR2_6,
4630 GP_2_5_FN, GPSR2_5,
4631 GP_2_4_FN, GPSR2_4,
4632 GP_2_3_FN, GPSR2_3,
4633 GP_2_2_FN, GPSR2_2,
4634 GP_2_1_FN, GPSR2_1,
Eugeniu Roscaf0066b02019-07-09 18:27:11 +02004635 GP_2_0_FN, GPSR2_0, ))
Marek Vasut68a77042018-04-26 13:09:20 +02004636 },
Eugeniu Roscaf0066b02019-07-09 18:27:11 +02004637 { PINMUX_CFG_REG("GPSR3", 0xe606010c, 32, 1, GROUP(
Marek Vasut68a77042018-04-26 13:09:20 +02004638 0, 0,
4639 0, 0,
4640 0, 0,
4641 0, 0,
4642 0, 0,
4643 0, 0,
4644 0, 0,
4645 0, 0,
4646 0, 0,
4647 0, 0,
4648 0, 0,
4649 0, 0,
4650 0, 0,
4651 0, 0,
4652 0, 0,
4653 0, 0,
4654 GP_3_15_FN, GPSR3_15,
4655 GP_3_14_FN, GPSR3_14,
4656 GP_3_13_FN, GPSR3_13,
4657 GP_3_12_FN, GPSR3_12,
4658 GP_3_11_FN, GPSR3_11,
4659 GP_3_10_FN, GPSR3_10,
4660 GP_3_9_FN, GPSR3_9,
4661 GP_3_8_FN, GPSR3_8,
4662 GP_3_7_FN, GPSR3_7,
4663 GP_3_6_FN, GPSR3_6,
4664 GP_3_5_FN, GPSR3_5,
4665 GP_3_4_FN, GPSR3_4,
4666 GP_3_3_FN, GPSR3_3,
4667 GP_3_2_FN, GPSR3_2,
4668 GP_3_1_FN, GPSR3_1,
Eugeniu Roscaf0066b02019-07-09 18:27:11 +02004669 GP_3_0_FN, GPSR3_0, ))
Marek Vasut68a77042018-04-26 13:09:20 +02004670 },
Eugeniu Roscaf0066b02019-07-09 18:27:11 +02004671 { PINMUX_CFG_REG("GPSR4", 0xe6060110, 32, 1, GROUP(
Marek Vasut68a77042018-04-26 13:09:20 +02004672 0, 0,
4673 0, 0,
4674 0, 0,
4675 0, 0,
4676 0, 0,
4677 0, 0,
4678 0, 0,
4679 0, 0,
4680 0, 0,
4681 0, 0,
4682 0, 0,
4683 0, 0,
4684 0, 0,
4685 0, 0,
4686 0, 0,
4687 0, 0,
4688 0, 0,
4689 0, 0,
4690 0, 0,
4691 0, 0,
4692 0, 0,
4693 GP_4_10_FN, GPSR4_10,
4694 GP_4_9_FN, GPSR4_9,
4695 GP_4_8_FN, GPSR4_8,
4696 GP_4_7_FN, GPSR4_7,
4697 GP_4_6_FN, GPSR4_6,
4698 GP_4_5_FN, GPSR4_5,
4699 GP_4_4_FN, GPSR4_4,
4700 GP_4_3_FN, GPSR4_3,
4701 GP_4_2_FN, GPSR4_2,
4702 GP_4_1_FN, GPSR4_1,
Eugeniu Roscaf0066b02019-07-09 18:27:11 +02004703 GP_4_0_FN, GPSR4_0, ))
Marek Vasut68a77042018-04-26 13:09:20 +02004704 },
Eugeniu Roscaf0066b02019-07-09 18:27:11 +02004705 { PINMUX_CFG_REG("GPSR5", 0xe6060114, 32, 1, GROUP(
Marek Vasut68a77042018-04-26 13:09:20 +02004706 0, 0,
4707 0, 0,
4708 0, 0,
4709 0, 0,
4710 0, 0,
4711 0, 0,
4712 0, 0,
4713 0, 0,
4714 0, 0,
4715 0, 0,
4716 0, 0,
4717 0, 0,
4718 GP_5_19_FN, GPSR5_19,
4719 GP_5_18_FN, GPSR5_18,
4720 GP_5_17_FN, GPSR5_17,
4721 GP_5_16_FN, GPSR5_16,
4722 GP_5_15_FN, GPSR5_15,
4723 GP_5_14_FN, GPSR5_14,
4724 GP_5_13_FN, GPSR5_13,
4725 GP_5_12_FN, GPSR5_12,
4726 GP_5_11_FN, GPSR5_11,
4727 GP_5_10_FN, GPSR5_10,
4728 GP_5_9_FN, GPSR5_9,
4729 GP_5_8_FN, GPSR5_8,
4730 GP_5_7_FN, GPSR5_7,
4731 GP_5_6_FN, GPSR5_6,
4732 GP_5_5_FN, GPSR5_5,
4733 GP_5_4_FN, GPSR5_4,
4734 GP_5_3_FN, GPSR5_3,
4735 GP_5_2_FN, GPSR5_2,
4736 GP_5_1_FN, GPSR5_1,
Eugeniu Roscaf0066b02019-07-09 18:27:11 +02004737 GP_5_0_FN, GPSR5_0, ))
Marek Vasut68a77042018-04-26 13:09:20 +02004738 },
Eugeniu Roscaf0066b02019-07-09 18:27:11 +02004739 { PINMUX_CFG_REG("GPSR6", 0xe6060118, 32, 1, GROUP(
Marek Vasut68a77042018-04-26 13:09:20 +02004740 0, 0,
4741 0, 0,
4742 0, 0,
4743 0, 0,
4744 0, 0,
4745 0, 0,
4746 0, 0,
4747 0, 0,
4748 0, 0,
4749 0, 0,
4750 0, 0,
4751 0, 0,
4752 0, 0,
4753 0, 0,
4754 GP_6_17_FN, GPSR6_17,
4755 GP_6_16_FN, GPSR6_16,
4756 GP_6_15_FN, GPSR6_15,
4757 GP_6_14_FN, GPSR6_14,
4758 GP_6_13_FN, GPSR6_13,
4759 GP_6_12_FN, GPSR6_12,
4760 GP_6_11_FN, GPSR6_11,
4761 GP_6_10_FN, GPSR6_10,
4762 GP_6_9_FN, GPSR6_9,
4763 GP_6_8_FN, GPSR6_8,
4764 GP_6_7_FN, GPSR6_7,
4765 GP_6_6_FN, GPSR6_6,
4766 GP_6_5_FN, GPSR6_5,
4767 GP_6_4_FN, GPSR6_4,
4768 GP_6_3_FN, GPSR6_3,
4769 GP_6_2_FN, GPSR6_2,
4770 GP_6_1_FN, GPSR6_1,
Eugeniu Roscaf0066b02019-07-09 18:27:11 +02004771 GP_6_0_FN, GPSR6_0, ))
Marek Vasut68a77042018-04-26 13:09:20 +02004772 },
4773#undef F_
4774#undef FM
4775
4776#define F_(x, y) x,
4777#define FM(x) FN_##x,
Eugeniu Roscaf0066b02019-07-09 18:27:11 +02004778 { PINMUX_CFG_REG("IPSR0", 0xe6060200, 32, 4, GROUP(
Marek Vasut68a77042018-04-26 13:09:20 +02004779 IP0_31_28
4780 IP0_27_24
4781 IP0_23_20
4782 IP0_19_16
4783 IP0_15_12
4784 IP0_11_8
4785 IP0_7_4
Eugeniu Roscaf0066b02019-07-09 18:27:11 +02004786 IP0_3_0 ))
Marek Vasut68a77042018-04-26 13:09:20 +02004787 },
Eugeniu Roscaf0066b02019-07-09 18:27:11 +02004788 { PINMUX_CFG_REG("IPSR1", 0xe6060204, 32, 4, GROUP(
Marek Vasut68a77042018-04-26 13:09:20 +02004789 IP1_31_28
4790 IP1_27_24
4791 IP1_23_20
4792 IP1_19_16
4793 IP1_15_12
4794 IP1_11_8
4795 IP1_7_4
Eugeniu Roscaf0066b02019-07-09 18:27:11 +02004796 IP1_3_0 ))
Marek Vasut68a77042018-04-26 13:09:20 +02004797 },
Eugeniu Roscaf0066b02019-07-09 18:27:11 +02004798 { PINMUX_CFG_REG("IPSR2", 0xe6060208, 32, 4, GROUP(
Marek Vasut68a77042018-04-26 13:09:20 +02004799 IP2_31_28
4800 IP2_27_24
4801 IP2_23_20
4802 IP2_19_16
4803 IP2_15_12
4804 IP2_11_8
4805 IP2_7_4
Eugeniu Roscaf0066b02019-07-09 18:27:11 +02004806 IP2_3_0 ))
Marek Vasut68a77042018-04-26 13:09:20 +02004807 },
Eugeniu Roscaf0066b02019-07-09 18:27:11 +02004808 { PINMUX_CFG_REG("IPSR3", 0xe606020c, 32, 4, GROUP(
Marek Vasut68a77042018-04-26 13:09:20 +02004809 IP3_31_28
4810 IP3_27_24
4811 IP3_23_20
4812 IP3_19_16
4813 IP3_15_12
4814 IP3_11_8
4815 IP3_7_4
Eugeniu Roscaf0066b02019-07-09 18:27:11 +02004816 IP3_3_0 ))
Marek Vasut68a77042018-04-26 13:09:20 +02004817 },
Eugeniu Roscaf0066b02019-07-09 18:27:11 +02004818 { PINMUX_CFG_REG("IPSR4", 0xe6060210, 32, 4, GROUP(
Marek Vasut68a77042018-04-26 13:09:20 +02004819 IP4_31_28
4820 IP4_27_24
4821 IP4_23_20
4822 IP4_19_16
4823 IP4_15_12
4824 IP4_11_8
4825 IP4_7_4
Eugeniu Roscaf0066b02019-07-09 18:27:11 +02004826 IP4_3_0 ))
Marek Vasut68a77042018-04-26 13:09:20 +02004827 },
Eugeniu Roscaf0066b02019-07-09 18:27:11 +02004828 { PINMUX_CFG_REG("IPSR5", 0xe6060214, 32, 4, GROUP(
Marek Vasut68a77042018-04-26 13:09:20 +02004829 IP5_31_28
4830 IP5_27_24
4831 IP5_23_20
4832 IP5_19_16
4833 IP5_15_12
4834 IP5_11_8
4835 IP5_7_4
Eugeniu Roscaf0066b02019-07-09 18:27:11 +02004836 IP5_3_0 ))
Marek Vasut68a77042018-04-26 13:09:20 +02004837 },
Eugeniu Roscaf0066b02019-07-09 18:27:11 +02004838 { PINMUX_CFG_REG("IPSR6", 0xe6060218, 32, 4, GROUP(
Marek Vasut68a77042018-04-26 13:09:20 +02004839 IP6_31_28
4840 IP6_27_24
4841 IP6_23_20
4842 IP6_19_16
4843 IP6_15_12
4844 IP6_11_8
4845 IP6_7_4
Eugeniu Roscaf0066b02019-07-09 18:27:11 +02004846 IP6_3_0 ))
Marek Vasut68a77042018-04-26 13:09:20 +02004847 },
Eugeniu Roscaf0066b02019-07-09 18:27:11 +02004848 { PINMUX_CFG_REG("IPSR7", 0xe606021c, 32, 4, GROUP(
Marek Vasut68a77042018-04-26 13:09:20 +02004849 IP7_31_28
4850 IP7_27_24
4851 IP7_23_20
4852 IP7_19_16
4853 IP7_15_12
4854 IP7_11_8
4855 IP7_7_4
Eugeniu Roscaf0066b02019-07-09 18:27:11 +02004856 IP7_3_0 ))
Marek Vasut68a77042018-04-26 13:09:20 +02004857 },
Eugeniu Roscaf0066b02019-07-09 18:27:11 +02004858 { PINMUX_CFG_REG("IPSR8", 0xe6060220, 32, 4, GROUP(
Marek Vasut68a77042018-04-26 13:09:20 +02004859 IP8_31_28
4860 IP8_27_24
4861 IP8_23_20
4862 IP8_19_16
4863 IP8_15_12
4864 IP8_11_8
4865 IP8_7_4
Eugeniu Roscaf0066b02019-07-09 18:27:11 +02004866 IP8_3_0 ))
Marek Vasut68a77042018-04-26 13:09:20 +02004867 },
Eugeniu Roscaf0066b02019-07-09 18:27:11 +02004868 { PINMUX_CFG_REG("IPSR9", 0xe6060224, 32, 4, GROUP(
Marek Vasut68a77042018-04-26 13:09:20 +02004869 IP9_31_28
4870 IP9_27_24
4871 IP9_23_20
4872 IP9_19_16
4873 IP9_15_12
4874 IP9_11_8
4875 IP9_7_4
Eugeniu Roscaf0066b02019-07-09 18:27:11 +02004876 IP9_3_0 ))
Marek Vasut68a77042018-04-26 13:09:20 +02004877 },
Eugeniu Roscaf0066b02019-07-09 18:27:11 +02004878 { PINMUX_CFG_REG("IPSR10", 0xe6060228, 32, 4, GROUP(
Marek Vasut68a77042018-04-26 13:09:20 +02004879 IP10_31_28
4880 IP10_27_24
4881 IP10_23_20
4882 IP10_19_16
4883 IP10_15_12
4884 IP10_11_8
4885 IP10_7_4
Eugeniu Roscaf0066b02019-07-09 18:27:11 +02004886 IP10_3_0 ))
Marek Vasut68a77042018-04-26 13:09:20 +02004887 },
Eugeniu Roscaf0066b02019-07-09 18:27:11 +02004888 { PINMUX_CFG_REG("IPSR11", 0xe606022c, 32, 4, GROUP(
Marek Vasut68a77042018-04-26 13:09:20 +02004889 IP11_31_28
4890 IP11_27_24
4891 IP11_23_20
4892 IP11_19_16
4893 IP11_15_12
4894 IP11_11_8
4895 IP11_7_4
Eugeniu Roscaf0066b02019-07-09 18:27:11 +02004896 IP11_3_0 ))
Marek Vasut68a77042018-04-26 13:09:20 +02004897 },
Eugeniu Roscaf0066b02019-07-09 18:27:11 +02004898 { PINMUX_CFG_REG("IPSR12", 0xe6060230, 32, 4, GROUP(
Marek Vasut68a77042018-04-26 13:09:20 +02004899 IP12_31_28
4900 IP12_27_24
4901 IP12_23_20
4902 IP12_19_16
4903 IP12_15_12
4904 IP12_11_8
4905 IP12_7_4
Eugeniu Roscaf0066b02019-07-09 18:27:11 +02004906 IP12_3_0 ))
Marek Vasut68a77042018-04-26 13:09:20 +02004907 },
Eugeniu Roscaf0066b02019-07-09 18:27:11 +02004908 { PINMUX_CFG_REG("IPSR13", 0xe6060234, 32, 4, GROUP(
Marek Vasut68a77042018-04-26 13:09:20 +02004909 IP13_31_28
4910 IP13_27_24
4911 IP13_23_20
4912 IP13_19_16
4913 IP13_15_12
4914 IP13_11_8
4915 IP13_7_4
Eugeniu Roscaf0066b02019-07-09 18:27:11 +02004916 IP13_3_0 ))
Marek Vasut68a77042018-04-26 13:09:20 +02004917 },
Eugeniu Roscaf0066b02019-07-09 18:27:11 +02004918 { PINMUX_CFG_REG("IPSR14", 0xe6060238, 32, 4, GROUP(
Marek Vasut68a77042018-04-26 13:09:20 +02004919 IP14_31_28
4920 IP14_27_24
4921 IP14_23_20
4922 IP14_19_16
4923 IP14_15_12
4924 IP14_11_8
4925 IP14_7_4
Eugeniu Roscaf0066b02019-07-09 18:27:11 +02004926 IP14_3_0 ))
Marek Vasut68a77042018-04-26 13:09:20 +02004927 },
Eugeniu Roscaf0066b02019-07-09 18:27:11 +02004928 { PINMUX_CFG_REG("IPSR15", 0xe606023c, 32, 4, GROUP(
Marek Vasut68a77042018-04-26 13:09:20 +02004929 IP15_31_28
4930 IP15_27_24
4931 IP15_23_20
4932 IP15_19_16
4933 IP15_15_12
4934 IP15_11_8
4935 IP15_7_4
Eugeniu Roscaf0066b02019-07-09 18:27:11 +02004936 IP15_3_0 ))
Marek Vasut68a77042018-04-26 13:09:20 +02004937 },
4938#undef F_
4939#undef FM
4940
4941#define F_(x, y) x,
4942#define FM(x) FN_##x,
4943 { PINMUX_CFG_REG_VAR("MOD_SEL0", 0xe6060500, 32,
Eugeniu Roscaf0066b02019-07-09 18:27:11 +02004944 GROUP(1, 2, 1, 2, 1, 1, 1, 1, 2, 3, 1, 1,
4945 1, 2, 2, 1, 1, 1, 2, 1, 1, 1, 2),
4946 GROUP(
Marek Vasut68a77042018-04-26 13:09:20 +02004947 /* RESERVED 31 */
4948 0, 0,
4949 MOD_SEL0_30_29
4950 MOD_SEL0_28
4951 MOD_SEL0_27_26
4952 MOD_SEL0_25
4953 MOD_SEL0_24
4954 MOD_SEL0_23
4955 MOD_SEL0_22
4956 MOD_SEL0_21_20
4957 MOD_SEL0_19_18_17
4958 MOD_SEL0_16
4959 MOD_SEL0_15
4960 MOD_SEL0_14
4961 MOD_SEL0_13_12
4962 MOD_SEL0_11_10
4963 MOD_SEL0_9
4964 MOD_SEL0_8
4965 MOD_SEL0_7
4966 MOD_SEL0_6_5
4967 MOD_SEL0_4
4968 MOD_SEL0_3
4969 MOD_SEL0_2
Eugeniu Roscaf0066b02019-07-09 18:27:11 +02004970 MOD_SEL0_1_0 ))
Marek Vasut68a77042018-04-26 13:09:20 +02004971 },
4972 { PINMUX_CFG_REG_VAR("MOD_SEL1", 0xe6060504, 32,
Lad Prabhakare4db7392020-10-14 16:45:59 +01004973 GROUP(1, 1, 1, 1, 1, 1, 1, 3, 3, 1, 1, 1,
4974 1, 2, 2, 2, 1, 1, 2, 1, 4),
Eugeniu Roscaf0066b02019-07-09 18:27:11 +02004975 GROUP(
Lad Prabhakare4db7392020-10-14 16:45:59 +01004976 MOD_SEL1_31
4977 MOD_SEL1_30
Marek Vasut68a77042018-04-26 13:09:20 +02004978 MOD_SEL1_29
4979 MOD_SEL1_28
4980 /* RESERVED 27 */
4981 0, 0,
4982 MOD_SEL1_26
4983 MOD_SEL1_25
4984 MOD_SEL1_24_23_22
4985 MOD_SEL1_21_20_19
4986 MOD_SEL1_18
4987 MOD_SEL1_17
4988 MOD_SEL1_16
4989 MOD_SEL1_15
4990 MOD_SEL1_14_13
4991 MOD_SEL1_12_11
4992 MOD_SEL1_10_9
4993 MOD_SEL1_8
4994 MOD_SEL1_7
4995 MOD_SEL1_6_5
4996 MOD_SEL1_4
4997 /* RESERVED 3, 2, 1, 0 */
Eugeniu Roscaf0066b02019-07-09 18:27:11 +02004998 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ))
Marek Vasut68a77042018-04-26 13:09:20 +02004999 },
5000 { },
5001};
5002
Marek Vasut46991d52018-10-31 20:34:51 +01005003enum ioctrl_regs {
Eugeniu Roscaf0066b02019-07-09 18:27:11 +02005004 POCCTRL0,
5005 TDSELCTRL,
Marek Vasut46991d52018-10-31 20:34:51 +01005006};
5007
5008static const struct pinmux_ioctrl_reg pinmux_ioctrl_regs[] = {
Eugeniu Roscaf0066b02019-07-09 18:27:11 +02005009 [POCCTRL0] = { 0xe6060380, },
5010 [TDSELCTRL] = { 0xe60603c0, },
Marek Vasut46991d52018-10-31 20:34:51 +01005011 { /* sentinel */ },
5012};
5013
Marek Vasut88e81ec2019-03-04 22:39:51 +01005014static int r8a77990_pin_to_pocctrl(struct sh_pfc *pfc, unsigned int pin,
5015 u32 *pocctrl)
Marek Vasut46991d52018-10-31 20:34:51 +01005016{
5017 int bit = -EINVAL;
5018
Eugeniu Roscaf0066b02019-07-09 18:27:11 +02005019 *pocctrl = pinmux_ioctrl_regs[POCCTRL0].reg;
Marek Vasut46991d52018-10-31 20:34:51 +01005020
5021 if (pin >= RCAR_GP_PIN(3, 0) && pin <= RCAR_GP_PIN(3, 11))
5022 bit = pin & 0x1f;
5023
5024 if (pin >= RCAR_GP_PIN(4, 0) && pin <= RCAR_GP_PIN(4, 10))
5025 bit = (pin & 0x1f) + 19;
5026
5027 return bit;
5028}
5029
Marek Vasut88e81ec2019-03-04 22:39:51 +01005030static const struct pinmux_bias_reg pinmux_bias_regs[] = {
5031 { PINMUX_BIAS_REG("PUEN0", 0xe6060400, "PUD0", 0xe6060440) {
5032 [0] = RCAR_GP_PIN(2, 23), /* RD# */
5033 [1] = RCAR_GP_PIN(2, 22), /* BS# */
5034 [2] = RCAR_GP_PIN(2, 21), /* AVB_PHY_INT */
5035 [3] = PIN_NUMBER('P', 5), /* AVB_MDC */
5036 [4] = PIN_NUMBER('P', 4), /* AVB_MDIO */
5037 [5] = RCAR_GP_PIN(2, 20), /* AVB_TXCREFCLK */
5038 [6] = PIN_NUMBER('N', 6), /* AVB_TD3 */
5039 [7] = PIN_NUMBER('N', 5), /* AVB_TD2 */
5040 [8] = PIN_NUMBER('N', 3), /* AVB_TD1 */
5041 [9] = PIN_NUMBER('N', 2), /* AVB_TD0 */
5042 [10] = PIN_NUMBER('N', 1), /* AVB_TXC */
5043 [11] = PIN_NUMBER('P', 3), /* AVB_TX_CTL */
5044 [12] = RCAR_GP_PIN(2, 19), /* AVB_RD3 */
5045 [13] = RCAR_GP_PIN(2, 18), /* AVB_RD2 */
5046 [14] = RCAR_GP_PIN(2, 17), /* AVB_RD1 */
5047 [15] = RCAR_GP_PIN(2, 16), /* AVB_RD0 */
5048 [16] = RCAR_GP_PIN(2, 15), /* AVB_RXC */
5049 [17] = RCAR_GP_PIN(2, 14), /* AVB_RX_CTL */
5050 [18] = RCAR_GP_PIN(2, 13), /* RPC_RESET# */
5051 [19] = RCAR_GP_PIN(2, 12), /* RPC_INT# */
5052 [20] = RCAR_GP_PIN(2, 11), /* QSPI1_SSL */
5053 [21] = RCAR_GP_PIN(2, 10), /* QSPI1_IO3 */
5054 [22] = RCAR_GP_PIN(2, 9), /* QSPI1_IO2 */
5055 [23] = RCAR_GP_PIN(2, 8), /* QSPI1_MISO/IO1 */
5056 [24] = RCAR_GP_PIN(2, 7), /* QSPI1_MOSI/IO0 */
5057 [25] = RCAR_GP_PIN(2, 6), /* QSPI1_SPCLK */
5058 [26] = RCAR_GP_PIN(2, 5), /* QSPI0_SSL */
5059 [27] = RCAR_GP_PIN(2, 4), /* QSPI0_IO3 */
5060 [28] = RCAR_GP_PIN(2, 3), /* QSPI0_IO2 */
5061 [29] = RCAR_GP_PIN(2, 2), /* QSPI0_MISO/IO1 */
5062 [30] = RCAR_GP_PIN(2, 1), /* QSPI0_MOSI/IO0 */
5063 [31] = RCAR_GP_PIN(2, 0), /* QSPI0_SPCLK */
5064 } },
5065 { PINMUX_BIAS_REG("PUEN1", 0xe6060404, "PUD1", 0xe6060444) {
5066 [0] = RCAR_GP_PIN(0, 4), /* D4 */
5067 [1] = RCAR_GP_PIN(0, 3), /* D3 */
5068 [2] = RCAR_GP_PIN(0, 2), /* D2 */
5069 [3] = RCAR_GP_PIN(0, 1), /* D1 */
5070 [4] = RCAR_GP_PIN(0, 0), /* D0 */
5071 [5] = RCAR_GP_PIN(1, 22), /* WE0# */
5072 [6] = RCAR_GP_PIN(1, 21), /* CS0# */
5073 [7] = RCAR_GP_PIN(1, 20), /* CLKOUT */
5074 [8] = RCAR_GP_PIN(1, 19), /* A19 */
5075 [9] = RCAR_GP_PIN(1, 18), /* A18 */
5076 [10] = RCAR_GP_PIN(1, 17), /* A17 */
5077 [11] = RCAR_GP_PIN(1, 16), /* A16 */
5078 [12] = RCAR_GP_PIN(1, 15), /* A15 */
5079 [13] = RCAR_GP_PIN(1, 14), /* A14 */
5080 [14] = RCAR_GP_PIN(1, 13), /* A13 */
5081 [15] = RCAR_GP_PIN(1, 12), /* A12 */
5082 [16] = RCAR_GP_PIN(1, 11), /* A11 */
5083 [17] = RCAR_GP_PIN(1, 10), /* A10 */
5084 [18] = RCAR_GP_PIN(1, 9), /* A9 */
5085 [19] = RCAR_GP_PIN(1, 8), /* A8 */
5086 [20] = RCAR_GP_PIN(1, 7), /* A7 */
5087 [21] = RCAR_GP_PIN(1, 6), /* A6 */
5088 [22] = RCAR_GP_PIN(1, 5), /* A5 */
5089 [23] = RCAR_GP_PIN(1, 4), /* A4 */
5090 [24] = RCAR_GP_PIN(1, 3), /* A3 */
5091 [25] = RCAR_GP_PIN(1, 2), /* A2 */
5092 [26] = RCAR_GP_PIN(1, 1), /* A1 */
5093 [27] = RCAR_GP_PIN(1, 0), /* A0 */
5094 [28] = PIN_NONE,
5095 [29] = PIN_NONE,
5096 [30] = RCAR_GP_PIN(2, 25), /* PUEN_EX_WAIT0 */
5097 [31] = RCAR_GP_PIN(2, 24), /* PUEN_RD/WR# */
5098 } },
5099 { PINMUX_BIAS_REG("PUEN2", 0xe6060408, "PUD2", 0xe6060448) {
5100 [0] = RCAR_GP_PIN(3, 1), /* SD0_CMD */
5101 [1] = RCAR_GP_PIN(3, 0), /* SD0_CLK */
5102 [2] = PIN_NUMBER('H', 1), /* ASEBRK */
5103 [3] = PIN_NONE,
5104 [4] = PIN_NUMBER('G', 2), /* TDI */
5105 [5] = PIN_NUMBER('F', 3), /* TMS */
5106 [6] = PIN_NUMBER('F', 4), /* TCK */
5107 [7] = PIN_NUMBER('F', 1), /* TRST# */
5108 [8] = PIN_NONE,
5109 [9] = PIN_NONE,
5110 [10] = PIN_NONE,
5111 [11] = PIN_NONE,
5112 [12] = PIN_NONE,
5113 [13] = PIN_NONE,
5114 [14] = PIN_NONE,
5115 [15] = PIN_NUMBER('G', 3), /* FSCLKST# */
5116 [16] = RCAR_GP_PIN(0, 17), /* SDA4 */
5117 [17] = RCAR_GP_PIN(0, 16), /* SCL4 */
5118 [18] = PIN_NONE,
5119 [19] = PIN_NONE,
5120 [20] = PIN_A_NUMBER('D', 3), /* PRESETOUT# */
5121 [21] = RCAR_GP_PIN(0, 15), /* D15 */
5122 [22] = RCAR_GP_PIN(0, 14), /* D14 */
5123 [23] = RCAR_GP_PIN(0, 13), /* D13 */
5124 [24] = RCAR_GP_PIN(0, 12), /* D12 */
5125 [25] = RCAR_GP_PIN(0, 11), /* D11 */
5126 [26] = RCAR_GP_PIN(0, 10), /* D10 */
5127 [27] = RCAR_GP_PIN(0, 9), /* D9 */
5128 [28] = RCAR_GP_PIN(0, 8), /* D8 */
5129 [29] = RCAR_GP_PIN(0, 7), /* D7 */
5130 [30] = RCAR_GP_PIN(0, 6), /* D6 */
5131 [31] = RCAR_GP_PIN(0, 5), /* D5 */
5132 } },
5133 { PINMUX_BIAS_REG("PUEN3", 0xe606040c, "PUD3", 0xe606044c) {
5134 [0] = RCAR_GP_PIN(5, 0), /* SCK0_A */
Eugeniu Roscaf0066b02019-07-09 18:27:11 +02005135 [1] = RCAR_GP_PIN(5, 4), /* RTS0#_A */
Marek Vasut88e81ec2019-03-04 22:39:51 +01005136 [2] = RCAR_GP_PIN(5, 3), /* CTS0#_A */
5137 [3] = RCAR_GP_PIN(5, 2), /* TX0_A */
5138 [4] = RCAR_GP_PIN(5, 1), /* RX0_A */
5139 [5] = PIN_NONE,
5140 [6] = PIN_NONE,
5141 [7] = RCAR_GP_PIN(3, 15), /* SD1_WP */
5142 [8] = RCAR_GP_PIN(3, 14), /* SD1_CD */
5143 [9] = RCAR_GP_PIN(3, 13), /* SD0_WP */
5144 [10] = RCAR_GP_PIN(3, 12), /* SD0_CD */
5145 [11] = RCAR_GP_PIN(4, 10), /* SD3_DS */
5146 [12] = RCAR_GP_PIN(4, 9), /* SD3_DAT7 */
5147 [13] = RCAR_GP_PIN(4, 8), /* SD3_DAT6 */
5148 [14] = RCAR_GP_PIN(4, 7), /* SD3_DAT5 */
5149 [15] = RCAR_GP_PIN(4, 6), /* SD3_DAT4 */
5150 [16] = RCAR_GP_PIN(4, 5), /* SD3_DAT3 */
5151 [17] = RCAR_GP_PIN(4, 4), /* SD3_DAT2 */
5152 [18] = RCAR_GP_PIN(4, 3), /* SD3_DAT1 */
5153 [19] = RCAR_GP_PIN(4, 2), /* SD3_DAT0 */
5154 [20] = RCAR_GP_PIN(4, 1), /* SD3_CMD */
5155 [21] = RCAR_GP_PIN(4, 0), /* SD3_CLK */
5156 [22] = RCAR_GP_PIN(3, 11), /* SD1_DAT3 */
5157 [23] = RCAR_GP_PIN(3, 10), /* SD1_DAT2 */
5158 [24] = RCAR_GP_PIN(3, 9), /* SD1_DAT1 */
5159 [25] = RCAR_GP_PIN(3, 8), /* SD1_DAT0 */
5160 [26] = RCAR_GP_PIN(3, 7), /* SD1_CMD */
5161 [27] = RCAR_GP_PIN(3, 6), /* SD1_CLK */
5162 [28] = RCAR_GP_PIN(3, 5), /* SD0_DAT3 */
5163 [29] = RCAR_GP_PIN(3, 4), /* SD0_DAT2 */
5164 [30] = RCAR_GP_PIN(3, 3), /* SD0_DAT1 */
5165 [31] = RCAR_GP_PIN(3, 2), /* SD0_DAT0 */
5166 } },
5167 { PINMUX_BIAS_REG("PUEN4", 0xe6060410, "PUD4", 0xe6060450) {
5168 [0] = RCAR_GP_PIN(6, 8), /* AUDIO_CLKA */
5169 [1] = RCAR_GP_PIN(6, 16), /* SSI_SDATA6 */
5170 [2] = RCAR_GP_PIN(6, 15), /* SSI_WS6 */
5171 [3] = RCAR_GP_PIN(6, 14), /* SSI_SCK6 */
5172 [4] = RCAR_GP_PIN(6, 13), /* SSI_SDATA5 */
5173 [5] = RCAR_GP_PIN(6, 12), /* SSI_WS5 */
5174 [6] = RCAR_GP_PIN(6, 11), /* SSI_SCK5 */
5175 [7] = RCAR_GP_PIN(6, 10), /* SSI_SDATA4 */
5176 [8] = RCAR_GP_PIN(6, 7), /* SSI_SDATA3 */
5177 [9] = RCAR_GP_PIN(6, 6), /* SSI_WS349 */
5178 [10] = RCAR_GP_PIN(6, 5), /* SSI_SCK349 */
5179 [11] = RCAR_GP_PIN(6, 4), /* SSI_SDATA2 */
5180 [12] = RCAR_GP_PIN(6, 3), /* SSI_SDATA1 */
5181 [13] = RCAR_GP_PIN(6, 2), /* SSI_SDATA0 */
5182 [14] = RCAR_GP_PIN(6, 1), /* SSI_WS01239 */
5183 [15] = RCAR_GP_PIN(6, 0), /* SSI_SCK01239 */
5184 [16] = PIN_NUMBER('T', 21), /* MLB_REF */
5185 [17] = RCAR_GP_PIN(5, 19), /* MLB_DAT */
5186 [18] = RCAR_GP_PIN(5, 18), /* MLB_SIG */
5187 [19] = RCAR_GP_PIN(5, 17), /* MLB_CLK */
5188 [20] = RCAR_GP_PIN(5, 16), /* SSI_SDATA9 */
5189 [21] = RCAR_GP_PIN(5, 15), /* MSIOF0_SS2 */
5190 [22] = RCAR_GP_PIN(5, 14), /* MSIOF0_SS1 */
5191 [23] = RCAR_GP_PIN(5, 13), /* MSIOF0_SYNC */
5192 [24] = RCAR_GP_PIN(5, 12), /* MSIOF0_TXD */
5193 [25] = RCAR_GP_PIN(5, 11), /* MSIOF0_RXD */
5194 [26] = RCAR_GP_PIN(5, 10), /* MSIOF0_SCK */
5195 [27] = RCAR_GP_PIN(5, 9), /* RX2_A */
5196 [28] = RCAR_GP_PIN(5, 8), /* TX2_A */
5197 [29] = RCAR_GP_PIN(5, 7), /* SCK2_A */
5198 [30] = RCAR_GP_PIN(5, 6), /* TX1 */
5199 [31] = RCAR_GP_PIN(5, 5), /* RX1 */
5200 } },
5201 { PINMUX_BIAS_REG("PUEN5", 0xe6060414, "PUD5", 0xe6060454) {
5202 [0] = PIN_NONE,
5203 [1] = PIN_NONE,
5204 [2] = PIN_NONE,
5205 [3] = PIN_NONE,
5206 [4] = PIN_NONE,
5207 [5] = PIN_NONE,
5208 [6] = PIN_NONE,
5209 [7] = PIN_NONE,
5210 [8] = PIN_NONE,
5211 [9] = PIN_NONE,
5212 [10] = PIN_NONE,
5213 [11] = PIN_NONE,
5214 [12] = PIN_NONE,
5215 [13] = PIN_NONE,
5216 [14] = PIN_NONE,
5217 [15] = PIN_NONE,
5218 [16] = PIN_NONE,
5219 [17] = PIN_NONE,
5220 [18] = PIN_NONE,
5221 [19] = PIN_NONE,
5222 [20] = PIN_NONE,
5223 [21] = PIN_NONE,
5224 [22] = PIN_NONE,
5225 [23] = PIN_NONE,
5226 [24] = PIN_NONE,
5227 [25] = PIN_NONE,
5228 [26] = PIN_NONE,
5229 [27] = PIN_NONE,
5230 [28] = PIN_NONE,
5231 [29] = PIN_NONE,
5232 [30] = RCAR_GP_PIN(6, 9), /* PUEN_USB30_OVC */
5233 [31] = RCAR_GP_PIN(6, 17), /* PUEN_USB30_PWEN */
5234 } },
5235 { /* sentinel */ },
5236};
5237
5238static unsigned int r8a77990_pinmux_get_bias(struct sh_pfc *pfc,
5239 unsigned int pin)
5240{
5241 const struct pinmux_bias_reg *reg;
5242 unsigned int bit;
5243
5244 reg = sh_pfc_pin_to_bias_reg(pfc, pin, &bit);
5245 if (!reg)
5246 return PIN_CONFIG_BIAS_DISABLE;
5247
5248 if (!(sh_pfc_read(pfc, reg->puen) & BIT(bit)))
5249 return PIN_CONFIG_BIAS_DISABLE;
5250 else if (sh_pfc_read(pfc, reg->pud) & BIT(bit))
5251 return PIN_CONFIG_BIAS_PULL_UP;
5252 else
5253 return PIN_CONFIG_BIAS_PULL_DOWN;
5254}
5255
5256static void r8a77990_pinmux_set_bias(struct sh_pfc *pfc, unsigned int pin,
5257 unsigned int bias)
5258{
5259 const struct pinmux_bias_reg *reg;
5260 u32 enable, updown;
5261 unsigned int bit;
5262
5263 reg = sh_pfc_pin_to_bias_reg(pfc, pin, &bit);
5264 if (!reg)
5265 return;
5266
5267 enable = sh_pfc_read(pfc, reg->puen) & ~BIT(bit);
5268 if (bias != PIN_CONFIG_BIAS_DISABLE)
5269 enable |= BIT(bit);
5270
5271 updown = sh_pfc_read(pfc, reg->pud) & ~BIT(bit);
5272 if (bias == PIN_CONFIG_BIAS_PULL_UP)
5273 updown |= BIT(bit);
5274
5275 sh_pfc_write(pfc, reg->pud, updown);
5276 sh_pfc_write(pfc, reg->puen, enable);
5277}
5278
Marek Vasut46991d52018-10-31 20:34:51 +01005279static const struct sh_pfc_soc_operations r8a77990_pinmux_ops = {
5280 .pin_to_pocctrl = r8a77990_pin_to_pocctrl,
Marek Vasut88e81ec2019-03-04 22:39:51 +01005281 .get_bias = r8a77990_pinmux_get_bias,
5282 .set_bias = r8a77990_pinmux_set_bias,
5283};
5284
5285#ifdef CONFIG_PINCTRL_PFC_R8A774C0
5286const struct sh_pfc_soc_info r8a774c0_pinmux_info = {
5287 .name = "r8a774c0_pfc",
5288 .ops = &r8a77990_pinmux_ops,
5289 .unlock_reg = 0xe6060000, /* PMMR */
5290
5291 .function = { PINMUX_FUNCTION_BEGIN, PINMUX_FUNCTION_END },
5292
5293 .pins = pinmux_pins,
5294 .nr_pins = ARRAY_SIZE(pinmux_pins),
5295 .groups = pinmux_groups.common,
5296 .nr_groups = ARRAY_SIZE(pinmux_groups.common),
5297 .functions = pinmux_functions.common,
5298 .nr_functions = ARRAY_SIZE(pinmux_functions.common),
5299
5300 .cfg_regs = pinmux_config_regs,
5301 .bias_regs = pinmux_bias_regs,
5302 .ioctrl_regs = pinmux_ioctrl_regs,
5303
5304 .pinmux_data = pinmux_data,
5305 .pinmux_data_size = ARRAY_SIZE(pinmux_data),
Marek Vasut46991d52018-10-31 20:34:51 +01005306};
Marek Vasut88e81ec2019-03-04 22:39:51 +01005307#endif
Marek Vasut46991d52018-10-31 20:34:51 +01005308
Marek Vasut88e81ec2019-03-04 22:39:51 +01005309#ifdef CONFIG_PINCTRL_PFC_R8A77990
Marek Vasut68a77042018-04-26 13:09:20 +02005310const struct sh_pfc_soc_info r8a77990_pinmux_info = {
5311 .name = "r8a77990_pfc",
Marek Vasut46991d52018-10-31 20:34:51 +01005312 .ops = &r8a77990_pinmux_ops,
Marek Vasut68a77042018-04-26 13:09:20 +02005313 .unlock_reg = 0xe6060000, /* PMMR */
5314
5315 .function = { PINMUX_FUNCTION_BEGIN, PINMUX_FUNCTION_END },
5316
5317 .pins = pinmux_pins,
5318 .nr_pins = ARRAY_SIZE(pinmux_pins),
Marek Vasut88e81ec2019-03-04 22:39:51 +01005319 .groups = pinmux_groups.common,
5320 .nr_groups = ARRAY_SIZE(pinmux_groups.common) +
5321 ARRAY_SIZE(pinmux_groups.automotive),
5322 .functions = pinmux_functions.common,
5323 .nr_functions = ARRAY_SIZE(pinmux_functions.common) +
5324 ARRAY_SIZE(pinmux_functions.automotive),
Marek Vasut68a77042018-04-26 13:09:20 +02005325
5326 .cfg_regs = pinmux_config_regs,
Marek Vasut88e81ec2019-03-04 22:39:51 +01005327 .bias_regs = pinmux_bias_regs,
Marek Vasut46991d52018-10-31 20:34:51 +01005328 .ioctrl_regs = pinmux_ioctrl_regs,
Marek Vasut68a77042018-04-26 13:09:20 +02005329
5330 .pinmux_data = pinmux_data,
5331 .pinmux_data_size = ARRAY_SIZE(pinmux_data),
5332};
Marek Vasut88e81ec2019-03-04 22:39:51 +01005333#endif