xref: /linux/drivers/pinctrl/sophgo/pinctrl-sg2002.c (revision 3a39d672e7f48b8d6b91a09afa4b55352773b4b5)
1*e7a4141fSInochi Amaoto // SPDX-License-Identifier: GPL-2.0
2*e7a4141fSInochi Amaoto /*
3*e7a4141fSInochi Amaoto  * Sophgo SG2002 SoC pinctrl driver.
4*e7a4141fSInochi Amaoto  *
5*e7a4141fSInochi Amaoto  * Copyright (C) 2024 Inochi Amaoto <inochiama@outlook.com>
6*e7a4141fSInochi Amaoto  *
7*e7a4141fSInochi Amaoto  * This file is generated from vendor pinout definition.
8*e7a4141fSInochi Amaoto  */
9*e7a4141fSInochi Amaoto 
10*e7a4141fSInochi Amaoto #include <linux/module.h>
11*e7a4141fSInochi Amaoto #include <linux/platform_device.h>
12*e7a4141fSInochi Amaoto #include <linux/of.h>
13*e7a4141fSInochi Amaoto 
14*e7a4141fSInochi Amaoto #include <linux/pinctrl/pinctrl.h>
15*e7a4141fSInochi Amaoto #include <linux/pinctrl/pinmux.h>
16*e7a4141fSInochi Amaoto 
17*e7a4141fSInochi Amaoto #include <dt-bindings/pinctrl/pinctrl-sg2002.h>
18*e7a4141fSInochi Amaoto 
19*e7a4141fSInochi Amaoto #include "pinctrl-cv18xx.h"
20*e7a4141fSInochi Amaoto 
21*e7a4141fSInochi Amaoto enum SG2002_POWER_DOMAIN {
22*e7a4141fSInochi Amaoto 	VDD18A_MIPI		= 0,
23*e7a4141fSInochi Amaoto 	VDD18A_USB_PLL_ETH	= 1,
24*e7a4141fSInochi Amaoto 	VDDIO_RTC		= 2,
25*e7a4141fSInochi Amaoto 	VDDIO_SD0_EMMC		= 3,
26*e7a4141fSInochi Amaoto 	VDDIO_SD1		= 4
27*e7a4141fSInochi Amaoto };
28*e7a4141fSInochi Amaoto 
29*e7a4141fSInochi Amaoto static const char *const sg2002_power_domain_desc[] = {
30*e7a4141fSInochi Amaoto 	[VDD18A_MIPI]		= "VDD18A_MIPI",
31*e7a4141fSInochi Amaoto 	[VDD18A_USB_PLL_ETH]	= "VDD18A_USB_PLL_ETH",
32*e7a4141fSInochi Amaoto 	[VDDIO_RTC]		= "VDDIO_RTC",
33*e7a4141fSInochi Amaoto 	[VDDIO_SD0_EMMC]	= "VDDIO_SD0_EMMC",
34*e7a4141fSInochi Amaoto 	[VDDIO_SD1]		= "VDDIO_SD1",
35*e7a4141fSInochi Amaoto };
36*e7a4141fSInochi Amaoto 
sg2002_get_pull_up(struct cv1800_pin * pin,const u32 * psmap)37*e7a4141fSInochi Amaoto static int sg2002_get_pull_up(struct cv1800_pin *pin, const u32 *psmap)
38*e7a4141fSInochi Amaoto {
39*e7a4141fSInochi Amaoto 	u32 pstate = psmap[pin->power_domain];
40*e7a4141fSInochi Amaoto 	enum cv1800_pin_io_type type = cv1800_pin_io_type(pin);
41*e7a4141fSInochi Amaoto 
42*e7a4141fSInochi Amaoto 	if (type == IO_TYPE_1V8_ONLY)
43*e7a4141fSInochi Amaoto 		return 79000;
44*e7a4141fSInochi Amaoto 
45*e7a4141fSInochi Amaoto 	if (type == IO_TYPE_1V8_OR_3V3) {
46*e7a4141fSInochi Amaoto 		if (pstate == PIN_POWER_STATE_1V8)
47*e7a4141fSInochi Amaoto 			return 60000;
48*e7a4141fSInochi Amaoto 		if (pstate == PIN_POWER_STATE_3V3)
49*e7a4141fSInochi Amaoto 			return 60000;
50*e7a4141fSInochi Amaoto 
51*e7a4141fSInochi Amaoto 		return -EINVAL;
52*e7a4141fSInochi Amaoto 	}
53*e7a4141fSInochi Amaoto 
54*e7a4141fSInochi Amaoto 	return -ENOTSUPP;
55*e7a4141fSInochi Amaoto }
56*e7a4141fSInochi Amaoto 
sg2002_get_pull_down(struct cv1800_pin * pin,const u32 * psmap)57*e7a4141fSInochi Amaoto static int sg2002_get_pull_down(struct cv1800_pin *pin, const u32 *psmap)
58*e7a4141fSInochi Amaoto {
59*e7a4141fSInochi Amaoto 	u32 pstate = psmap[pin->power_domain];
60*e7a4141fSInochi Amaoto 	enum cv1800_pin_io_type type = cv1800_pin_io_type(pin);
61*e7a4141fSInochi Amaoto 
62*e7a4141fSInochi Amaoto 	if (type == IO_TYPE_1V8_ONLY)
63*e7a4141fSInochi Amaoto 		return 87000;
64*e7a4141fSInochi Amaoto 
65*e7a4141fSInochi Amaoto 	if (type == IO_TYPE_1V8_OR_3V3) {
66*e7a4141fSInochi Amaoto 		if (pstate == PIN_POWER_STATE_1V8)
67*e7a4141fSInochi Amaoto 			return 61000;
68*e7a4141fSInochi Amaoto 		if (pstate == PIN_POWER_STATE_3V3)
69*e7a4141fSInochi Amaoto 			return 62000;
70*e7a4141fSInochi Amaoto 
71*e7a4141fSInochi Amaoto 		return -EINVAL;
72*e7a4141fSInochi Amaoto 	}
73*e7a4141fSInochi Amaoto 
74*e7a4141fSInochi Amaoto 	return -ENOTSUPP;
75*e7a4141fSInochi Amaoto }
76*e7a4141fSInochi Amaoto 
77*e7a4141fSInochi Amaoto static const u32 sg2002_1v8_oc_map[] = {
78*e7a4141fSInochi Amaoto 	12800,
79*e7a4141fSInochi Amaoto 	25300,
80*e7a4141fSInochi Amaoto 	37400,
81*e7a4141fSInochi Amaoto 	49000
82*e7a4141fSInochi Amaoto };
83*e7a4141fSInochi Amaoto 
84*e7a4141fSInochi Amaoto static const u32 sg2002_18od33_1v8_oc_map[] = {
85*e7a4141fSInochi Amaoto 	7800,
86*e7a4141fSInochi Amaoto 	11700,
87*e7a4141fSInochi Amaoto 	15500,
88*e7a4141fSInochi Amaoto 	19200,
89*e7a4141fSInochi Amaoto 	23000,
90*e7a4141fSInochi Amaoto 	26600,
91*e7a4141fSInochi Amaoto 	30200,
92*e7a4141fSInochi Amaoto 	33700
93*e7a4141fSInochi Amaoto };
94*e7a4141fSInochi Amaoto 
95*e7a4141fSInochi Amaoto static const u32 sg2002_18od33_3v3_oc_map[] = {
96*e7a4141fSInochi Amaoto 	5500,
97*e7a4141fSInochi Amaoto 	8200,
98*e7a4141fSInochi Amaoto 	10800,
99*e7a4141fSInochi Amaoto 	13400,
100*e7a4141fSInochi Amaoto 	16100,
101*e7a4141fSInochi Amaoto 	18700,
102*e7a4141fSInochi Amaoto 	21200,
103*e7a4141fSInochi Amaoto 	23700
104*e7a4141fSInochi Amaoto };
105*e7a4141fSInochi Amaoto 
106*e7a4141fSInochi Amaoto static const u32 sg2002_eth_oc_map[] = {
107*e7a4141fSInochi Amaoto 	15700,
108*e7a4141fSInochi Amaoto 	17800
109*e7a4141fSInochi Amaoto };
110*e7a4141fSInochi Amaoto 
sg2002_get_oc_map(struct cv1800_pin * pin,const u32 * psmap,const u32 ** map)111*e7a4141fSInochi Amaoto static int sg2002_get_oc_map(struct cv1800_pin *pin, const u32 *psmap,
112*e7a4141fSInochi Amaoto 			     const u32 **map)
113*e7a4141fSInochi Amaoto {
114*e7a4141fSInochi Amaoto 	enum cv1800_pin_io_type type = cv1800_pin_io_type(pin);
115*e7a4141fSInochi Amaoto 	u32 pstate = psmap[pin->power_domain];
116*e7a4141fSInochi Amaoto 
117*e7a4141fSInochi Amaoto 	if (type == IO_TYPE_1V8_ONLY) {
118*e7a4141fSInochi Amaoto 		*map = sg2002_1v8_oc_map;
119*e7a4141fSInochi Amaoto 		return ARRAY_SIZE(sg2002_1v8_oc_map);
120*e7a4141fSInochi Amaoto 	}
121*e7a4141fSInochi Amaoto 
122*e7a4141fSInochi Amaoto 	if (type == IO_TYPE_1V8_OR_3V3) {
123*e7a4141fSInochi Amaoto 		if (pstate == PIN_POWER_STATE_1V8) {
124*e7a4141fSInochi Amaoto 			*map = sg2002_18od33_1v8_oc_map;
125*e7a4141fSInochi Amaoto 			return ARRAY_SIZE(sg2002_18od33_1v8_oc_map);
126*e7a4141fSInochi Amaoto 		} else if (pstate == PIN_POWER_STATE_3V3) {
127*e7a4141fSInochi Amaoto 			*map = sg2002_18od33_3v3_oc_map;
128*e7a4141fSInochi Amaoto 			return ARRAY_SIZE(sg2002_18od33_3v3_oc_map);
129*e7a4141fSInochi Amaoto 		}
130*e7a4141fSInochi Amaoto 	}
131*e7a4141fSInochi Amaoto 
132*e7a4141fSInochi Amaoto 	if (type == IO_TYPE_ETH) {
133*e7a4141fSInochi Amaoto 		*map = sg2002_eth_oc_map;
134*e7a4141fSInochi Amaoto 		return ARRAY_SIZE(sg2002_eth_oc_map);
135*e7a4141fSInochi Amaoto 	}
136*e7a4141fSInochi Amaoto 
137*e7a4141fSInochi Amaoto 	return -ENOTSUPP;
138*e7a4141fSInochi Amaoto }
139*e7a4141fSInochi Amaoto 
140*e7a4141fSInochi Amaoto static const u32 sg2002_1v8_schmitt_map[] = {
141*e7a4141fSInochi Amaoto 	0,
142*e7a4141fSInochi Amaoto 	970000,
143*e7a4141fSInochi Amaoto 	1040000
144*e7a4141fSInochi Amaoto };
145*e7a4141fSInochi Amaoto 
146*e7a4141fSInochi Amaoto static const u32 sg2002_18od33_1v8_schmitt_map[] = {
147*e7a4141fSInochi Amaoto 	0,
148*e7a4141fSInochi Amaoto 	1070000
149*e7a4141fSInochi Amaoto };
150*e7a4141fSInochi Amaoto 
151*e7a4141fSInochi Amaoto static const u32 sg2002_18od33_3v3_schmitt_map[] = {
152*e7a4141fSInochi Amaoto 	0,
153*e7a4141fSInochi Amaoto 	1100000
154*e7a4141fSInochi Amaoto };
155*e7a4141fSInochi Amaoto 
sg2002_get_schmitt_map(struct cv1800_pin * pin,const u32 * psmap,const u32 ** map)156*e7a4141fSInochi Amaoto static int sg2002_get_schmitt_map(struct cv1800_pin *pin, const u32 *psmap,
157*e7a4141fSInochi Amaoto 				  const u32 **map)
158*e7a4141fSInochi Amaoto {
159*e7a4141fSInochi Amaoto 	enum cv1800_pin_io_type type = cv1800_pin_io_type(pin);
160*e7a4141fSInochi Amaoto 	u32 pstate = psmap[pin->power_domain];
161*e7a4141fSInochi Amaoto 
162*e7a4141fSInochi Amaoto 	if (type == IO_TYPE_1V8_ONLY) {
163*e7a4141fSInochi Amaoto 		*map = sg2002_1v8_schmitt_map;
164*e7a4141fSInochi Amaoto 		return ARRAY_SIZE(sg2002_1v8_schmitt_map);
165*e7a4141fSInochi Amaoto 	}
166*e7a4141fSInochi Amaoto 
167*e7a4141fSInochi Amaoto 	if (type == IO_TYPE_1V8_OR_3V3) {
168*e7a4141fSInochi Amaoto 		if (pstate == PIN_POWER_STATE_1V8) {
169*e7a4141fSInochi Amaoto 			*map = sg2002_18od33_1v8_schmitt_map;
170*e7a4141fSInochi Amaoto 			return ARRAY_SIZE(sg2002_18od33_1v8_schmitt_map);
171*e7a4141fSInochi Amaoto 		} else if (pstate == PIN_POWER_STATE_3V3) {
172*e7a4141fSInochi Amaoto 			*map = sg2002_18od33_3v3_schmitt_map;
173*e7a4141fSInochi Amaoto 			return ARRAY_SIZE(sg2002_18od33_3v3_schmitt_map);
174*e7a4141fSInochi Amaoto 		}
175*e7a4141fSInochi Amaoto 	}
176*e7a4141fSInochi Amaoto 
177*e7a4141fSInochi Amaoto 	return -ENOTSUPP;
178*e7a4141fSInochi Amaoto }
179*e7a4141fSInochi Amaoto 
180*e7a4141fSInochi Amaoto static const struct cv1800_vddio_cfg_ops sg2002_vddio_cfg_ops = {
181*e7a4141fSInochi Amaoto 	.get_pull_up		= sg2002_get_pull_up,
182*e7a4141fSInochi Amaoto 	.get_pull_down		= sg2002_get_pull_down,
183*e7a4141fSInochi Amaoto 	.get_oc_map		= sg2002_get_oc_map,
184*e7a4141fSInochi Amaoto 	.get_schmitt_map		= sg2002_get_schmitt_map,
185*e7a4141fSInochi Amaoto };
186*e7a4141fSInochi Amaoto 
187*e7a4141fSInochi Amaoto static const struct pinctrl_pin_desc sg2002_pins[] = {
188*e7a4141fSInochi Amaoto 	PINCTRL_PIN(PIN_AUD_AINL_MIC,	"AUD_AINL_MIC"),
189*e7a4141fSInochi Amaoto 	PINCTRL_PIN(PIN_AUD_AOUTR,	"AUD_AOUTR"),
190*e7a4141fSInochi Amaoto 	PINCTRL_PIN(PIN_SD0_CLK,	"SD0_CLK"),
191*e7a4141fSInochi Amaoto 	PINCTRL_PIN(PIN_SD0_CMD,	"SD0_CMD"),
192*e7a4141fSInochi Amaoto 	PINCTRL_PIN(PIN_SD0_D0,		"SD0_D0"),
193*e7a4141fSInochi Amaoto 	PINCTRL_PIN(PIN_SD0_D1,		"SD0_D1"),
194*e7a4141fSInochi Amaoto 	PINCTRL_PIN(PIN_SD0_D2,		"SD0_D2"),
195*e7a4141fSInochi Amaoto 	PINCTRL_PIN(PIN_SD0_D3,		"SD0_D3"),
196*e7a4141fSInochi Amaoto 	PINCTRL_PIN(PIN_SD0_CD,		"SD0_CD"),
197*e7a4141fSInochi Amaoto 	PINCTRL_PIN(PIN_SD0_PWR_EN,	"SD0_PWR_EN"),
198*e7a4141fSInochi Amaoto 	PINCTRL_PIN(PIN_SPK_EN,		"SPK_EN"),
199*e7a4141fSInochi Amaoto 	PINCTRL_PIN(PIN_UART0_TX,	"UART0_TX"),
200*e7a4141fSInochi Amaoto 	PINCTRL_PIN(PIN_UART0_RX,	"UART0_RX"),
201*e7a4141fSInochi Amaoto 	PINCTRL_PIN(PIN_EMMC_DAT2,	"EMMC_DAT2"),
202*e7a4141fSInochi Amaoto 	PINCTRL_PIN(PIN_EMMC_CLK,	"EMMC_CLK"),
203*e7a4141fSInochi Amaoto 	PINCTRL_PIN(PIN_EMMC_DAT0,	"EMMC_DAT0"),
204*e7a4141fSInochi Amaoto 	PINCTRL_PIN(PIN_EMMC_DAT3,	"EMMC_DAT3"),
205*e7a4141fSInochi Amaoto 	PINCTRL_PIN(PIN_EMMC_CMD,	"EMMC_CMD"),
206*e7a4141fSInochi Amaoto 	PINCTRL_PIN(PIN_EMMC_DAT1,	"EMMC_DAT1"),
207*e7a4141fSInochi Amaoto 	PINCTRL_PIN(PIN_JTAG_CPU_TMS,	"JTAG_CPU_TMS"),
208*e7a4141fSInochi Amaoto 	PINCTRL_PIN(PIN_JTAG_CPU_TCK,	"JTAG_CPU_TCK"),
209*e7a4141fSInochi Amaoto 	PINCTRL_PIN(PIN_IIC0_SCL,	"IIC0_SCL"),
210*e7a4141fSInochi Amaoto 	PINCTRL_PIN(PIN_IIC0_SDA,	"IIC0_SDA"),
211*e7a4141fSInochi Amaoto 	PINCTRL_PIN(PIN_AUX0,		"AUX0"),
212*e7a4141fSInochi Amaoto 	PINCTRL_PIN(PIN_GPIO_ZQ,	"GPIO_ZQ"),
213*e7a4141fSInochi Amaoto 	PINCTRL_PIN(PIN_PWR_VBAT_DET,	"PWR_VBAT_DET"),
214*e7a4141fSInochi Amaoto 	PINCTRL_PIN(PIN_PWR_RSTN,	"PWR_RSTN"),
215*e7a4141fSInochi Amaoto 	PINCTRL_PIN(PIN_PWR_SEQ1,	"PWR_SEQ1"),
216*e7a4141fSInochi Amaoto 	PINCTRL_PIN(PIN_PWR_SEQ2,	"PWR_SEQ2"),
217*e7a4141fSInochi Amaoto 	PINCTRL_PIN(PIN_PWR_WAKEUP0,	"PWR_WAKEUP0"),
218*e7a4141fSInochi Amaoto 	PINCTRL_PIN(PIN_PWR_BUTTON1,	"PWR_BUTTON1"),
219*e7a4141fSInochi Amaoto 	PINCTRL_PIN(PIN_XTAL_XIN,	"XTAL_XIN"),
220*e7a4141fSInochi Amaoto 	PINCTRL_PIN(PIN_PWR_GPIO0,	"PWR_GPIO0"),
221*e7a4141fSInochi Amaoto 	PINCTRL_PIN(PIN_PWR_GPIO1,	"PWR_GPIO1"),
222*e7a4141fSInochi Amaoto 	PINCTRL_PIN(PIN_PWR_GPIO2,	"PWR_GPIO2"),
223*e7a4141fSInochi Amaoto 	PINCTRL_PIN(PIN_SD1_D3,		"SD1_D3"),
224*e7a4141fSInochi Amaoto 	PINCTRL_PIN(PIN_SD1_D2,		"SD1_D2"),
225*e7a4141fSInochi Amaoto 	PINCTRL_PIN(PIN_SD1_D1,		"SD1_D1"),
226*e7a4141fSInochi Amaoto 	PINCTRL_PIN(PIN_SD1_D0,		"SD1_D0"),
227*e7a4141fSInochi Amaoto 	PINCTRL_PIN(PIN_SD1_CMD,	"SD1_CMD"),
228*e7a4141fSInochi Amaoto 	PINCTRL_PIN(PIN_SD1_CLK,	"SD1_CLK"),
229*e7a4141fSInochi Amaoto 	PINCTRL_PIN(PIN_PWM0_BUCK,	"PWM0_BUCK"),
230*e7a4141fSInochi Amaoto 	PINCTRL_PIN(PIN_ADC1,		"ADC1"),
231*e7a4141fSInochi Amaoto 	PINCTRL_PIN(PIN_USB_VBUS_DET,	"USB_VBUS_DET"),
232*e7a4141fSInochi Amaoto 	PINCTRL_PIN(PIN_ETH_TXP,	"ETH_TXP"),
233*e7a4141fSInochi Amaoto 	PINCTRL_PIN(PIN_ETH_TXM,	"ETH_TXM"),
234*e7a4141fSInochi Amaoto 	PINCTRL_PIN(PIN_ETH_RXP,	"ETH_RXP"),
235*e7a4141fSInochi Amaoto 	PINCTRL_PIN(PIN_ETH_RXM,	"ETH_RXM"),
236*e7a4141fSInochi Amaoto 	PINCTRL_PIN(PIN_GPIO_RTX,	"GPIO_RTX"),
237*e7a4141fSInochi Amaoto 	PINCTRL_PIN(PIN_MIPIRX4N,	"MIPIRX4N"),
238*e7a4141fSInochi Amaoto 	PINCTRL_PIN(PIN_MIPIRX4P,	"MIPIRX4P"),
239*e7a4141fSInochi Amaoto 	PINCTRL_PIN(PIN_MIPIRX3N,	"MIPIRX3N"),
240*e7a4141fSInochi Amaoto 	PINCTRL_PIN(PIN_MIPIRX3P,	"MIPIRX3P"),
241*e7a4141fSInochi Amaoto 	PINCTRL_PIN(PIN_MIPIRX2N,	"MIPIRX2N"),
242*e7a4141fSInochi Amaoto 	PINCTRL_PIN(PIN_MIPIRX2P,	"MIPIRX2P"),
243*e7a4141fSInochi Amaoto 	PINCTRL_PIN(PIN_MIPIRX1N,	"MIPIRX1N"),
244*e7a4141fSInochi Amaoto 	PINCTRL_PIN(PIN_MIPIRX1P,	"MIPIRX1P"),
245*e7a4141fSInochi Amaoto 	PINCTRL_PIN(PIN_MIPIRX0N,	"MIPIRX0N"),
246*e7a4141fSInochi Amaoto 	PINCTRL_PIN(PIN_MIPIRX0P,	"MIPIRX0P"),
247*e7a4141fSInochi Amaoto 	PINCTRL_PIN(PIN_MIPI_TXM2,	"MIPI_TXM2"),
248*e7a4141fSInochi Amaoto 	PINCTRL_PIN(PIN_MIPI_TXP2,	"MIPI_TXP2"),
249*e7a4141fSInochi Amaoto 	PINCTRL_PIN(PIN_MIPI_TXM1,	"MIPI_TXM1"),
250*e7a4141fSInochi Amaoto 	PINCTRL_PIN(PIN_MIPI_TXP1,	"MIPI_TXP1"),
251*e7a4141fSInochi Amaoto 	PINCTRL_PIN(PIN_MIPI_TXM0,	"MIPI_TXM0"),
252*e7a4141fSInochi Amaoto 	PINCTRL_PIN(PIN_MIPI_TXP0,	"MIPI_TXP0"),
253*e7a4141fSInochi Amaoto };
254*e7a4141fSInochi Amaoto 
255*e7a4141fSInochi Amaoto static const struct cv1800_pin sg2002_pin_data[ARRAY_SIZE(sg2002_pins)] = {
256*e7a4141fSInochi Amaoto 	CV1800_FUNC_PIN(PIN_AUD_AINL_MIC, VDD18A_MIPI,
257*e7a4141fSInochi Amaoto 			IO_TYPE_AUDIO,
258*e7a4141fSInochi Amaoto 			CV1800_PINCONF_AREA_SYS, 0x1bc, 5),
259*e7a4141fSInochi Amaoto 	CV1800_FUNC_PIN(PIN_AUD_AOUTR, VDD18A_MIPI,
260*e7a4141fSInochi Amaoto 			IO_TYPE_AUDIO,
261*e7a4141fSInochi Amaoto 			CV1800_PINCONF_AREA_SYS, 0x1c8, 6),
262*e7a4141fSInochi Amaoto 	CV1800_GENERAL_PIN(PIN_SD0_CLK, VDDIO_SD0_EMMC,
263*e7a4141fSInochi Amaoto 			   IO_TYPE_1V8_OR_3V3,
264*e7a4141fSInochi Amaoto 			   CV1800_PINCONF_AREA_SYS, 0x01c, 7,
265*e7a4141fSInochi Amaoto 			   CV1800_PINCONF_AREA_SYS, 0xa00),
266*e7a4141fSInochi Amaoto 	CV1800_GENERAL_PIN(PIN_SD0_CMD, VDDIO_SD0_EMMC,
267*e7a4141fSInochi Amaoto 			   IO_TYPE_1V8_OR_3V3,
268*e7a4141fSInochi Amaoto 			   CV1800_PINCONF_AREA_SYS, 0x020, 7,
269*e7a4141fSInochi Amaoto 			   CV1800_PINCONF_AREA_SYS, 0xa04),
270*e7a4141fSInochi Amaoto 	CV1800_GENERAL_PIN(PIN_SD0_D0, VDDIO_SD0_EMMC,
271*e7a4141fSInochi Amaoto 			   IO_TYPE_1V8_OR_3V3,
272*e7a4141fSInochi Amaoto 			   CV1800_PINCONF_AREA_SYS, 0x024, 7,
273*e7a4141fSInochi Amaoto 			   CV1800_PINCONF_AREA_SYS, 0xa08),
274*e7a4141fSInochi Amaoto 	CV1800_GENERAL_PIN(PIN_SD0_D1, VDDIO_SD0_EMMC,
275*e7a4141fSInochi Amaoto 			   IO_TYPE_1V8_OR_3V3,
276*e7a4141fSInochi Amaoto 			   CV1800_PINCONF_AREA_SYS, 0x028, 7,
277*e7a4141fSInochi Amaoto 			   CV1800_PINCONF_AREA_SYS, 0xa0c),
278*e7a4141fSInochi Amaoto 	CV1800_GENERAL_PIN(PIN_SD0_D2, VDDIO_SD0_EMMC,
279*e7a4141fSInochi Amaoto 			   IO_TYPE_1V8_OR_3V3,
280*e7a4141fSInochi Amaoto 			   CV1800_PINCONF_AREA_SYS, 0x02c, 7,
281*e7a4141fSInochi Amaoto 			   CV1800_PINCONF_AREA_SYS, 0xa10),
282*e7a4141fSInochi Amaoto 	CV1800_GENERAL_PIN(PIN_SD0_D3, VDDIO_SD0_EMMC,
283*e7a4141fSInochi Amaoto 			   IO_TYPE_1V8_OR_3V3,
284*e7a4141fSInochi Amaoto 			   CV1800_PINCONF_AREA_SYS, 0x030, 7,
285*e7a4141fSInochi Amaoto 			   CV1800_PINCONF_AREA_SYS, 0xa14),
286*e7a4141fSInochi Amaoto 	CV1800_GENERAL_PIN(PIN_SD0_CD, VDDIO_SD0_EMMC,
287*e7a4141fSInochi Amaoto 			   IO_TYPE_1V8_OR_3V3,
288*e7a4141fSInochi Amaoto 			   CV1800_PINCONF_AREA_SYS, 0x034, 3,
289*e7a4141fSInochi Amaoto 			   CV1800_PINCONF_AREA_SYS, 0x900),
290*e7a4141fSInochi Amaoto 	CV1800_GENERAL_PIN(PIN_SD0_PWR_EN, VDDIO_SD0_EMMC,
291*e7a4141fSInochi Amaoto 			   IO_TYPE_1V8_OR_3V3,
292*e7a4141fSInochi Amaoto 			   CV1800_PINCONF_AREA_SYS, 0x038, 3,
293*e7a4141fSInochi Amaoto 			   CV1800_PINCONF_AREA_SYS, 0x904),
294*e7a4141fSInochi Amaoto 	CV1800_GENERAL_PIN(PIN_SPK_EN, VDDIO_SD0_EMMC,
295*e7a4141fSInochi Amaoto 			   IO_TYPE_1V8_OR_3V3,
296*e7a4141fSInochi Amaoto 			   CV1800_PINCONF_AREA_SYS, 0x03c, 3,
297*e7a4141fSInochi Amaoto 			   CV1800_PINCONF_AREA_SYS, 0x908),
298*e7a4141fSInochi Amaoto 	CV1800_GENERAL_PIN(PIN_UART0_TX, VDDIO_SD0_EMMC,
299*e7a4141fSInochi Amaoto 			   IO_TYPE_1V8_OR_3V3,
300*e7a4141fSInochi Amaoto 			   CV1800_PINCONF_AREA_SYS, 0x040, 7,
301*e7a4141fSInochi Amaoto 			   CV1800_PINCONF_AREA_SYS, 0x90c),
302*e7a4141fSInochi Amaoto 	CV1800_GENERAL_PIN(PIN_UART0_RX, VDDIO_SD0_EMMC,
303*e7a4141fSInochi Amaoto 			   IO_TYPE_1V8_OR_3V3,
304*e7a4141fSInochi Amaoto 			   CV1800_PINCONF_AREA_SYS, 0x044, 7,
305*e7a4141fSInochi Amaoto 			   CV1800_PINCONF_AREA_SYS, 0x910),
306*e7a4141fSInochi Amaoto 	CV1800_GENERAL_PIN(PIN_EMMC_DAT2, VDDIO_SD0_EMMC,
307*e7a4141fSInochi Amaoto 			   IO_TYPE_1V8_OR_3V3,
308*e7a4141fSInochi Amaoto 			   CV1800_PINCONF_AREA_SYS, 0x04c, 3,
309*e7a4141fSInochi Amaoto 			   CV1800_PINCONF_AREA_SYS, 0x918),
310*e7a4141fSInochi Amaoto 	CV1800_GENERAL_PIN(PIN_EMMC_CLK, VDDIO_SD0_EMMC,
311*e7a4141fSInochi Amaoto 			   IO_TYPE_1V8_OR_3V3,
312*e7a4141fSInochi Amaoto 			   CV1800_PINCONF_AREA_SYS, 0x050, 3,
313*e7a4141fSInochi Amaoto 			   CV1800_PINCONF_AREA_SYS, 0x91c),
314*e7a4141fSInochi Amaoto 	CV1800_GENERAL_PIN(PIN_EMMC_DAT0, VDDIO_SD0_EMMC,
315*e7a4141fSInochi Amaoto 			   IO_TYPE_1V8_OR_3V3,
316*e7a4141fSInochi Amaoto 			   CV1800_PINCONF_AREA_SYS, 0x054, 3,
317*e7a4141fSInochi Amaoto 			   CV1800_PINCONF_AREA_SYS, 0x920),
318*e7a4141fSInochi Amaoto 	CV1800_GENERAL_PIN(PIN_EMMC_DAT3, VDDIO_SD0_EMMC,
319*e7a4141fSInochi Amaoto 			   IO_TYPE_1V8_OR_3V3,
320*e7a4141fSInochi Amaoto 			   CV1800_PINCONF_AREA_SYS, 0x058, 3,
321*e7a4141fSInochi Amaoto 			   CV1800_PINCONF_AREA_SYS, 0x924),
322*e7a4141fSInochi Amaoto 	CV1800_GENERAL_PIN(PIN_EMMC_CMD, VDDIO_SD0_EMMC,
323*e7a4141fSInochi Amaoto 			   IO_TYPE_1V8_OR_3V3,
324*e7a4141fSInochi Amaoto 			   CV1800_PINCONF_AREA_SYS, 0x05c, 3,
325*e7a4141fSInochi Amaoto 			   CV1800_PINCONF_AREA_SYS, 0x928),
326*e7a4141fSInochi Amaoto 	CV1800_GENERAL_PIN(PIN_EMMC_DAT1, VDDIO_SD0_EMMC,
327*e7a4141fSInochi Amaoto 			   IO_TYPE_1V8_OR_3V3,
328*e7a4141fSInochi Amaoto 			   CV1800_PINCONF_AREA_SYS, 0x060, 3,
329*e7a4141fSInochi Amaoto 			   CV1800_PINCONF_AREA_SYS, 0x92c),
330*e7a4141fSInochi Amaoto 	CV1800_GENERAL_PIN(PIN_JTAG_CPU_TMS, VDDIO_SD0_EMMC,
331*e7a4141fSInochi Amaoto 			   IO_TYPE_1V8_OR_3V3,
332*e7a4141fSInochi Amaoto 			   CV1800_PINCONF_AREA_SYS, 0x064, 7,
333*e7a4141fSInochi Amaoto 			   CV1800_PINCONF_AREA_SYS, 0x930),
334*e7a4141fSInochi Amaoto 	CV1800_GENERAL_PIN(PIN_JTAG_CPU_TCK, VDDIO_SD0_EMMC,
335*e7a4141fSInochi Amaoto 			   IO_TYPE_1V8_OR_3V3,
336*e7a4141fSInochi Amaoto 			   CV1800_PINCONF_AREA_SYS, 0x068, 7,
337*e7a4141fSInochi Amaoto 			   CV1800_PINCONF_AREA_SYS, 0x934),
338*e7a4141fSInochi Amaoto 	CV1800_GENERAL_PIN(PIN_IIC0_SCL, VDDIO_SD0_EMMC,
339*e7a4141fSInochi Amaoto 			   IO_TYPE_1V8_OR_3V3,
340*e7a4141fSInochi Amaoto 			   CV1800_PINCONF_AREA_SYS, 0x070, 7,
341*e7a4141fSInochi Amaoto 			   CV1800_PINCONF_AREA_SYS, 0x93c),
342*e7a4141fSInochi Amaoto 	CV1800_GENERAL_PIN(PIN_IIC0_SDA, VDDIO_SD0_EMMC,
343*e7a4141fSInochi Amaoto 			   IO_TYPE_1V8_OR_3V3,
344*e7a4141fSInochi Amaoto 			   CV1800_PINCONF_AREA_SYS, 0x074, 7,
345*e7a4141fSInochi Amaoto 			   CV1800_PINCONF_AREA_SYS, 0x940),
346*e7a4141fSInochi Amaoto 	CV1800_GENERAL_PIN(PIN_AUX0, VDDIO_SD0_EMMC,
347*e7a4141fSInochi Amaoto 			   IO_TYPE_1V8_OR_3V3,
348*e7a4141fSInochi Amaoto 			   CV1800_PINCONF_AREA_SYS, 0x078, 7,
349*e7a4141fSInochi Amaoto 			   CV1800_PINCONF_AREA_SYS, 0x944),
350*e7a4141fSInochi Amaoto 	CV1800_GENERAL_PIN(PIN_GPIO_ZQ, VDDIO_RTC,
351*e7a4141fSInochi Amaoto 			   IO_TYPE_1V8_ONLY,
352*e7a4141fSInochi Amaoto 			   CV1800_PINCONF_AREA_SYS, 0x1d0, 4,
353*e7a4141fSInochi Amaoto 			   CV1800_PINCONF_AREA_RTC, 0x0e0),
354*e7a4141fSInochi Amaoto 	CV1800_GENERAL_PIN(PIN_PWR_VBAT_DET, VDDIO_RTC,
355*e7a4141fSInochi Amaoto 			   IO_TYPE_1V8_ONLY,
356*e7a4141fSInochi Amaoto 			   CV1800_PINCONF_AREA_SYS, 0x07c, 0,
357*e7a4141fSInochi Amaoto 			   CV1800_PINCONF_AREA_RTC, 0x000),
358*e7a4141fSInochi Amaoto 	CV1800_GENERAL_PIN(PIN_PWR_RSTN, VDDIO_RTC,
359*e7a4141fSInochi Amaoto 			   IO_TYPE_1V8_ONLY,
360*e7a4141fSInochi Amaoto 			   CV1800_PINCONF_AREA_SYS, 0x080, 0,
361*e7a4141fSInochi Amaoto 			   CV1800_PINCONF_AREA_RTC, 0x004),
362*e7a4141fSInochi Amaoto 	CV1800_GENERAL_PIN(PIN_PWR_SEQ1, VDDIO_RTC,
363*e7a4141fSInochi Amaoto 			   IO_TYPE_1V8_ONLY,
364*e7a4141fSInochi Amaoto 			   CV1800_PINCONF_AREA_SYS, 0x084, 3,
365*e7a4141fSInochi Amaoto 			   CV1800_PINCONF_AREA_RTC, 0x008),
366*e7a4141fSInochi Amaoto 	CV1800_GENERAL_PIN(PIN_PWR_SEQ2, VDDIO_RTC,
367*e7a4141fSInochi Amaoto 			   IO_TYPE_1V8_ONLY,
368*e7a4141fSInochi Amaoto 			   CV1800_PINCONF_AREA_SYS, 0x088, 3,
369*e7a4141fSInochi Amaoto 			   CV1800_PINCONF_AREA_RTC, 0x00c),
370*e7a4141fSInochi Amaoto 	CV1800_GENERAL_PIN(PIN_PWR_WAKEUP0, VDDIO_RTC,
371*e7a4141fSInochi Amaoto 			   IO_TYPE_1V8_ONLY,
372*e7a4141fSInochi Amaoto 			   CV1800_PINCONF_AREA_SYS, 0x090, 7,
373*e7a4141fSInochi Amaoto 			   CV1800_PINCONF_AREA_RTC, 0x018),
374*e7a4141fSInochi Amaoto 	CV1800_GENERAL_PIN(PIN_PWR_BUTTON1, VDDIO_RTC,
375*e7a4141fSInochi Amaoto 			   IO_TYPE_1V8_ONLY,
376*e7a4141fSInochi Amaoto 			   CV1800_PINCONF_AREA_SYS, 0x098, 7,
377*e7a4141fSInochi Amaoto 			   CV1800_PINCONF_AREA_RTC, 0x020),
378*e7a4141fSInochi Amaoto 	CV1800_GENERAL_PIN(PIN_XTAL_XIN, VDDIO_RTC,
379*e7a4141fSInochi Amaoto 			   IO_TYPE_1V8_ONLY,
380*e7a4141fSInochi Amaoto 			   CV1800_PINCONF_AREA_SYS, 0x0a0, 0,
381*e7a4141fSInochi Amaoto 			   CV1800_PINCONF_AREA_RTC, 0x028),
382*e7a4141fSInochi Amaoto 	CV1800_GENERAL_PIN(PIN_PWR_GPIO0, VDDIO_RTC,
383*e7a4141fSInochi Amaoto 			   IO_TYPE_1V8_ONLY,
384*e7a4141fSInochi Amaoto 			   CV1800_PINCONF_AREA_SYS, 0x0a4, 4,
385*e7a4141fSInochi Amaoto 			   CV1800_PINCONF_AREA_RTC, 0x02c),
386*e7a4141fSInochi Amaoto 	CV1800_GENERAL_PIN(PIN_PWR_GPIO1, VDDIO_RTC,
387*e7a4141fSInochi Amaoto 			   IO_TYPE_1V8_ONLY,
388*e7a4141fSInochi Amaoto 			   CV1800_PINCONF_AREA_SYS, 0x0a8, 7,
389*e7a4141fSInochi Amaoto 			   CV1800_PINCONF_AREA_RTC, 0x030),
390*e7a4141fSInochi Amaoto 	CV1800_GENERAL_PIN(PIN_PWR_GPIO2, VDDIO_RTC,
391*e7a4141fSInochi Amaoto 			   IO_TYPE_1V8_ONLY,
392*e7a4141fSInochi Amaoto 			   CV1800_PINCONF_AREA_SYS, 0x0ac, 7,
393*e7a4141fSInochi Amaoto 			   CV1800_PINCONF_AREA_RTC, 0x034),
394*e7a4141fSInochi Amaoto 	CV1800_GENERAL_PIN(PIN_SD1_D3, VDDIO_SD1,
395*e7a4141fSInochi Amaoto 			   IO_TYPE_1V8_OR_3V3,
396*e7a4141fSInochi Amaoto 			   CV1800_PINCONF_AREA_SYS, 0x0d0, 7,
397*e7a4141fSInochi Amaoto 			   CV1800_PINCONF_AREA_RTC, 0x058),
398*e7a4141fSInochi Amaoto 	CV1800_GENERAL_PIN(PIN_SD1_D2, VDDIO_SD1,
399*e7a4141fSInochi Amaoto 			   IO_TYPE_1V8_OR_3V3,
400*e7a4141fSInochi Amaoto 			   CV1800_PINCONF_AREA_SYS, 0x0d4, 7,
401*e7a4141fSInochi Amaoto 			   CV1800_PINCONF_AREA_RTC, 0x05c),
402*e7a4141fSInochi Amaoto 	CV1800_GENERAL_PIN(PIN_SD1_D1, VDDIO_SD1,
403*e7a4141fSInochi Amaoto 			   IO_TYPE_1V8_OR_3V3,
404*e7a4141fSInochi Amaoto 			   CV1800_PINCONF_AREA_SYS, 0x0d8, 7,
405*e7a4141fSInochi Amaoto 			   CV1800_PINCONF_AREA_RTC, 0x060),
406*e7a4141fSInochi Amaoto 	CV1800_GENERAL_PIN(PIN_SD1_D0, VDDIO_SD1,
407*e7a4141fSInochi Amaoto 			   IO_TYPE_1V8_OR_3V3,
408*e7a4141fSInochi Amaoto 			   CV1800_PINCONF_AREA_SYS, 0x0dc, 7,
409*e7a4141fSInochi Amaoto 			   CV1800_PINCONF_AREA_RTC, 0x064),
410*e7a4141fSInochi Amaoto 	CV1800_GENERAL_PIN(PIN_SD1_CMD, VDDIO_SD1,
411*e7a4141fSInochi Amaoto 			   IO_TYPE_1V8_OR_3V3,
412*e7a4141fSInochi Amaoto 			   CV1800_PINCONF_AREA_SYS, 0x0e0, 7,
413*e7a4141fSInochi Amaoto 			   CV1800_PINCONF_AREA_RTC, 0x068),
414*e7a4141fSInochi Amaoto 	CV1800_GENERAL_PIN(PIN_SD1_CLK, VDDIO_SD1,
415*e7a4141fSInochi Amaoto 			   IO_TYPE_1V8_OR_3V3,
416*e7a4141fSInochi Amaoto 			   CV1800_PINCONF_AREA_SYS, 0x0e4, 7,
417*e7a4141fSInochi Amaoto 			   CV1800_PINCONF_AREA_RTC, 0x06c),
418*e7a4141fSInochi Amaoto 	CV1800_GENERAL_PIN(PIN_PWM0_BUCK, VDD18A_USB_PLL_ETH,
419*e7a4141fSInochi Amaoto 			   IO_TYPE_1V8_ONLY,
420*e7a4141fSInochi Amaoto 			   CV1800_PINCONF_AREA_SYS, 0x0ec, 3,
421*e7a4141fSInochi Amaoto 			   CV1800_PINCONF_AREA_SYS, 0x804),
422*e7a4141fSInochi Amaoto 	CV1800_GENERAL_PIN(PIN_ADC1, VDD18A_USB_PLL_ETH,
423*e7a4141fSInochi Amaoto 			   IO_TYPE_1V8_ONLY,
424*e7a4141fSInochi Amaoto 			   CV1800_PINCONF_AREA_SYS, 0x0f8, 4,
425*e7a4141fSInochi Amaoto 			   CV1800_PINCONF_AREA_SYS, 0x810),
426*e7a4141fSInochi Amaoto 	CV1800_GENERAL_PIN(PIN_USB_VBUS_DET, VDD18A_USB_PLL_ETH,
427*e7a4141fSInochi Amaoto 			   IO_TYPE_1V8_ONLY,
428*e7a4141fSInochi Amaoto 			   CV1800_PINCONF_AREA_SYS, 0x108, 5,
429*e7a4141fSInochi Amaoto 			   CV1800_PINCONF_AREA_SYS, 0x820),
430*e7a4141fSInochi Amaoto 	CV1800_FUNC_PIN(PIN_ETH_TXP, VDD18A_USB_PLL_ETH,
431*e7a4141fSInochi Amaoto 			IO_TYPE_ETH,
432*e7a4141fSInochi Amaoto 			CV1800_PINCONF_AREA_SYS, 0x124, 7),
433*e7a4141fSInochi Amaoto 	CV1800_FUNC_PIN(PIN_ETH_TXM, VDD18A_USB_PLL_ETH,
434*e7a4141fSInochi Amaoto 			IO_TYPE_ETH,
435*e7a4141fSInochi Amaoto 			CV1800_PINCONF_AREA_SYS, 0x128, 7),
436*e7a4141fSInochi Amaoto 	CV1800_FUNC_PIN(PIN_ETH_RXP, VDD18A_USB_PLL_ETH,
437*e7a4141fSInochi Amaoto 			IO_TYPE_ETH,
438*e7a4141fSInochi Amaoto 			CV1800_PINCONF_AREA_SYS, 0x12c, 7),
439*e7a4141fSInochi Amaoto 	CV1800_FUNC_PIN(PIN_ETH_RXM, VDD18A_USB_PLL_ETH,
440*e7a4141fSInochi Amaoto 			IO_TYPE_ETH,
441*e7a4141fSInochi Amaoto 			CV1800_PINCONF_AREA_SYS, 0x130, 7),
442*e7a4141fSInochi Amaoto 	CV1800_GENERAL_PIN(PIN_GPIO_RTX, VDD18A_USB_PLL_ETH,
443*e7a4141fSInochi Amaoto 			   IO_TYPE_1V8_ONLY,
444*e7a4141fSInochi Amaoto 			   CV1800_PINCONF_AREA_SYS, 0x1cc, 5,
445*e7a4141fSInochi Amaoto 			   CV1800_PINCONF_AREA_SYS, 0xc8c),
446*e7a4141fSInochi Amaoto 	CV1800_GENERATE_PIN_MUX2(PIN_MIPIRX4N, VDD18A_MIPI,
447*e7a4141fSInochi Amaoto 				 IO_TYPE_1V8_ONLY,
448*e7a4141fSInochi Amaoto 				 CV1800_PINCONF_AREA_SYS, 0x16c, 7,
449*e7a4141fSInochi Amaoto 				 CV1800_PINCONF_AREA_SYS, 0x120, 7,
450*e7a4141fSInochi Amaoto 				 CV1800_PINCONF_AREA_SYS, 0xc38),
451*e7a4141fSInochi Amaoto 	CV1800_GENERATE_PIN_MUX2(PIN_MIPIRX4P, VDD18A_MIPI,
452*e7a4141fSInochi Amaoto 				 IO_TYPE_1V8_ONLY,
453*e7a4141fSInochi Amaoto 				 CV1800_PINCONF_AREA_SYS, 0x170, 7,
454*e7a4141fSInochi Amaoto 				 CV1800_PINCONF_AREA_SYS, 0x11c, 7,
455*e7a4141fSInochi Amaoto 				 CV1800_PINCONF_AREA_SYS, 0xc3c),
456*e7a4141fSInochi Amaoto 	CV1800_GENERATE_PIN_MUX2(PIN_MIPIRX3N, VDD18A_MIPI,
457*e7a4141fSInochi Amaoto 				 IO_TYPE_1V8_ONLY,
458*e7a4141fSInochi Amaoto 				 CV1800_PINCONF_AREA_SYS, 0x174, 7,
459*e7a4141fSInochi Amaoto 				 CV1800_PINCONF_AREA_SYS, 0x114, 7,
460*e7a4141fSInochi Amaoto 				 CV1800_PINCONF_AREA_SYS, 0xc40),
461*e7a4141fSInochi Amaoto 	CV1800_GENERATE_PIN_MUX2(PIN_MIPIRX3P, VDD18A_MIPI,
462*e7a4141fSInochi Amaoto 				 IO_TYPE_1V8_ONLY,
463*e7a4141fSInochi Amaoto 				 CV1800_PINCONF_AREA_SYS, 0x178, 7,
464*e7a4141fSInochi Amaoto 				 CV1800_PINCONF_AREA_SYS, 0x118, 7,
465*e7a4141fSInochi Amaoto 				 CV1800_PINCONF_AREA_SYS, 0xc44),
466*e7a4141fSInochi Amaoto 	CV1800_GENERAL_PIN(PIN_MIPIRX2N, VDD18A_MIPI,
467*e7a4141fSInochi Amaoto 			   IO_TYPE_1V8_ONLY,
468*e7a4141fSInochi Amaoto 			   CV1800_PINCONF_AREA_SYS, 0x17c, 7,
469*e7a4141fSInochi Amaoto 			   CV1800_PINCONF_AREA_SYS, 0xc48),
470*e7a4141fSInochi Amaoto 	CV1800_GENERAL_PIN(PIN_MIPIRX2P, VDD18A_MIPI,
471*e7a4141fSInochi Amaoto 			   IO_TYPE_1V8_ONLY,
472*e7a4141fSInochi Amaoto 			   CV1800_PINCONF_AREA_SYS, 0x180, 7,
473*e7a4141fSInochi Amaoto 			   CV1800_PINCONF_AREA_SYS, 0xc4c),
474*e7a4141fSInochi Amaoto 	CV1800_GENERAL_PIN(PIN_MIPIRX1N, VDD18A_MIPI,
475*e7a4141fSInochi Amaoto 			   IO_TYPE_1V8_ONLY,
476*e7a4141fSInochi Amaoto 			   CV1800_PINCONF_AREA_SYS, 0x184, 7,
477*e7a4141fSInochi Amaoto 			   CV1800_PINCONF_AREA_SYS, 0xc50),
478*e7a4141fSInochi Amaoto 	CV1800_GENERAL_PIN(PIN_MIPIRX1P, VDD18A_MIPI,
479*e7a4141fSInochi Amaoto 			   IO_TYPE_1V8_ONLY,
480*e7a4141fSInochi Amaoto 			   CV1800_PINCONF_AREA_SYS, 0x188, 7,
481*e7a4141fSInochi Amaoto 			   CV1800_PINCONF_AREA_SYS, 0xc54),
482*e7a4141fSInochi Amaoto 	CV1800_GENERAL_PIN(PIN_MIPIRX0N, VDD18A_MIPI,
483*e7a4141fSInochi Amaoto 			   IO_TYPE_1V8_ONLY,
484*e7a4141fSInochi Amaoto 			   CV1800_PINCONF_AREA_SYS, 0x18c, 7,
485*e7a4141fSInochi Amaoto 			   CV1800_PINCONF_AREA_SYS, 0xc58),
486*e7a4141fSInochi Amaoto 	CV1800_GENERAL_PIN(PIN_MIPIRX0P, VDD18A_MIPI,
487*e7a4141fSInochi Amaoto 			   IO_TYPE_1V8_ONLY,
488*e7a4141fSInochi Amaoto 			   CV1800_PINCONF_AREA_SYS, 0x190, 7,
489*e7a4141fSInochi Amaoto 			   CV1800_PINCONF_AREA_SYS, 0xc5c),
490*e7a4141fSInochi Amaoto 	CV1800_GENERAL_PIN(PIN_MIPI_TXM2, VDD18A_MIPI,
491*e7a4141fSInochi Amaoto 			   IO_TYPE_1V8_ONLY,
492*e7a4141fSInochi Amaoto 			   CV1800_PINCONF_AREA_SYS, 0x1a4, 7,
493*e7a4141fSInochi Amaoto 			   CV1800_PINCONF_AREA_SYS, 0xc70),
494*e7a4141fSInochi Amaoto 	CV1800_GENERAL_PIN(PIN_MIPI_TXP2, VDD18A_MIPI,
495*e7a4141fSInochi Amaoto 			   IO_TYPE_1V8_ONLY,
496*e7a4141fSInochi Amaoto 			   CV1800_PINCONF_AREA_SYS, 0x1a8, 7,
497*e7a4141fSInochi Amaoto 			   CV1800_PINCONF_AREA_SYS, 0xc74),
498*e7a4141fSInochi Amaoto 	CV1800_GENERAL_PIN(PIN_MIPI_TXM1, VDD18A_MIPI,
499*e7a4141fSInochi Amaoto 			   IO_TYPE_1V8_ONLY,
500*e7a4141fSInochi Amaoto 			   CV1800_PINCONF_AREA_SYS, 0x1ac, 7,
501*e7a4141fSInochi Amaoto 			   CV1800_PINCONF_AREA_SYS, 0xc78),
502*e7a4141fSInochi Amaoto 	CV1800_GENERAL_PIN(PIN_MIPI_TXP1, VDD18A_MIPI,
503*e7a4141fSInochi Amaoto 			   IO_TYPE_1V8_ONLY,
504*e7a4141fSInochi Amaoto 			   CV1800_PINCONF_AREA_SYS, 0x1b0, 7,
505*e7a4141fSInochi Amaoto 			   CV1800_PINCONF_AREA_SYS, 0xc7c),
506*e7a4141fSInochi Amaoto 	CV1800_GENERAL_PIN(PIN_MIPI_TXM0, VDD18A_MIPI,
507*e7a4141fSInochi Amaoto 			   IO_TYPE_1V8_ONLY,
508*e7a4141fSInochi Amaoto 			   CV1800_PINCONF_AREA_SYS, 0x1b4, 7,
509*e7a4141fSInochi Amaoto 			   CV1800_PINCONF_AREA_SYS, 0xc80),
510*e7a4141fSInochi Amaoto 	CV1800_GENERAL_PIN(PIN_MIPI_TXP0, VDD18A_MIPI,
511*e7a4141fSInochi Amaoto 			   IO_TYPE_1V8_ONLY,
512*e7a4141fSInochi Amaoto 			   CV1800_PINCONF_AREA_SYS, 0x1b8, 7,
513*e7a4141fSInochi Amaoto 			   CV1800_PINCONF_AREA_SYS, 0xc84),
514*e7a4141fSInochi Amaoto };
515*e7a4141fSInochi Amaoto 
516*e7a4141fSInochi Amaoto static const struct cv1800_pinctrl_data sg2002_pindata = {
517*e7a4141fSInochi Amaoto 	.pins		= sg2002_pins,
518*e7a4141fSInochi Amaoto 	.pindata	= sg2002_pin_data,
519*e7a4141fSInochi Amaoto 	.pdnames	= sg2002_power_domain_desc,
520*e7a4141fSInochi Amaoto 	.vddio_ops	= &sg2002_vddio_cfg_ops,
521*e7a4141fSInochi Amaoto 	.npins		= ARRAY_SIZE(sg2002_pins),
522*e7a4141fSInochi Amaoto 	.npd		= ARRAY_SIZE(sg2002_power_domain_desc),
523*e7a4141fSInochi Amaoto };
524*e7a4141fSInochi Amaoto 
525*e7a4141fSInochi Amaoto static const struct of_device_id sg2002_pinctrl_ids[] = {
526*e7a4141fSInochi Amaoto 	{ .compatible = "sophgo,sg2002-pinctrl", .data = &sg2002_pindata },
527*e7a4141fSInochi Amaoto 	{ }
528*e7a4141fSInochi Amaoto };
529*e7a4141fSInochi Amaoto MODULE_DEVICE_TABLE(of, sg2002_pinctrl_ids);
530*e7a4141fSInochi Amaoto 
531*e7a4141fSInochi Amaoto static struct platform_driver sg2002_pinctrl_driver = {
532*e7a4141fSInochi Amaoto 	.probe	= cv1800_pinctrl_probe,
533*e7a4141fSInochi Amaoto 	.driver	= {
534*e7a4141fSInochi Amaoto 		.name			= "sg2002-pinctrl",
535*e7a4141fSInochi Amaoto 		.suppress_bind_attrs	= true,
536*e7a4141fSInochi Amaoto 		.of_match_table		= sg2002_pinctrl_ids,
537*e7a4141fSInochi Amaoto 	},
538*e7a4141fSInochi Amaoto };
539*e7a4141fSInochi Amaoto module_platform_driver(sg2002_pinctrl_driver);
540*e7a4141fSInochi Amaoto 
541*e7a4141fSInochi Amaoto MODULE_DESCRIPTION("Pinctrl driver for the SG2002 series SoC");
542*e7a4141fSInochi Amaoto MODULE_LICENSE("GPL");
543