xref: /linux/drivers/pinctrl/sophgo/pinctrl-sg2000.c (revision 3a39d672e7f48b8d6b91a09afa4b55352773b4b5)
1 // SPDX-License-Identifier: GPL-2.0
2 /*
3  * Sophgo SG2000 SoC pinctrl driver.
4  *
5  * Copyright (C) 2024 Inochi Amaoto <inochiama@outlook.com>
6  *
7  * This file is generated from vendor pinout definition.
8  */
9 
10 #include <linux/module.h>
11 #include <linux/platform_device.h>
12 #include <linux/of.h>
13 
14 #include <linux/pinctrl/pinctrl.h>
15 #include <linux/pinctrl/pinmux.h>
16 
17 #include <dt-bindings/pinctrl/pinctrl-sg2000.h>
18 
19 #include "pinctrl-cv18xx.h"
20 
21 enum SG2000_POWER_DOMAIN {
22 	VDD18A_EPHY		= 0,
23 	VDD18A_MIPI		= 1,
24 	VDDIO18_1		= 2,
25 	VDDIO_EMMC		= 3,
26 	VDDIO_RTC		= 4,
27 	VDDIO_SD0		= 5,
28 	VDDIO_SD1		= 6,
29 	VDDIO_VIVO		= 7
30 };
31 
32 static const char *const sg2000_power_domain_desc[] = {
33 	[VDD18A_EPHY]		= "VDD18A_EPHY",
34 	[VDD18A_MIPI]		= "VDD18A_MIPI",
35 	[VDDIO18_1]		= "VDDIO18_1",
36 	[VDDIO_EMMC]		= "VDDIO_EMMC",
37 	[VDDIO_RTC]		= "VDDIO_RTC",
38 	[VDDIO_SD0]		= "VDDIO_SD0",
39 	[VDDIO_SD1]		= "VDDIO_SD1",
40 	[VDDIO_VIVO]		= "VDDIO_VIVO",
41 };
42 
sg2000_get_pull_up(struct cv1800_pin * pin,const u32 * psmap)43 static int sg2000_get_pull_up(struct cv1800_pin *pin, const u32 *psmap)
44 {
45 	u32 pstate = psmap[pin->power_domain];
46 	enum cv1800_pin_io_type type = cv1800_pin_io_type(pin);
47 
48 	if (type == IO_TYPE_1V8_ONLY)
49 		return 79000;
50 
51 	if (type == IO_TYPE_1V8_OR_3V3) {
52 		if (pstate == PIN_POWER_STATE_1V8)
53 			return 60000;
54 		if (pstate == PIN_POWER_STATE_3V3)
55 			return 60000;
56 
57 		return -EINVAL;
58 	}
59 
60 	return -ENOTSUPP;
61 }
62 
sg2000_get_pull_down(struct cv1800_pin * pin,const u32 * psmap)63 static int sg2000_get_pull_down(struct cv1800_pin *pin, const u32 *psmap)
64 {
65 	u32 pstate = psmap[pin->power_domain];
66 	enum cv1800_pin_io_type type = cv1800_pin_io_type(pin);
67 
68 	if (type == IO_TYPE_1V8_ONLY)
69 		return 87000;
70 
71 	if (type == IO_TYPE_1V8_OR_3V3) {
72 		if (pstate == PIN_POWER_STATE_1V8)
73 			return 61000;
74 		if (pstate == PIN_POWER_STATE_3V3)
75 			return 62000;
76 
77 		return -EINVAL;
78 	}
79 
80 	return -ENOTSUPP;
81 }
82 
83 static const u32 sg2000_1v8_oc_map[] = {
84 	12800,
85 	25300,
86 	37400,
87 	49000
88 };
89 
90 static const u32 sg2000_18od33_1v8_oc_map[] = {
91 	7800,
92 	11700,
93 	15500,
94 	19200,
95 	23000,
96 	26600,
97 	30200,
98 	33700
99 };
100 
101 static const u32 sg2000_18od33_3v3_oc_map[] = {
102 	5500,
103 	8200,
104 	10800,
105 	13400,
106 	16100,
107 	18700,
108 	21200,
109 	23700
110 };
111 
112 static const u32 sg2000_eth_oc_map[] = {
113 	15700,
114 	17800
115 };
116 
sg2000_get_oc_map(struct cv1800_pin * pin,const u32 * psmap,const u32 ** map)117 static int sg2000_get_oc_map(struct cv1800_pin *pin, const u32 *psmap,
118 			     const u32 **map)
119 {
120 	enum cv1800_pin_io_type type = cv1800_pin_io_type(pin);
121 	u32 pstate = psmap[pin->power_domain];
122 
123 	if (type == IO_TYPE_1V8_ONLY) {
124 		*map = sg2000_1v8_oc_map;
125 		return ARRAY_SIZE(sg2000_1v8_oc_map);
126 	}
127 
128 	if (type == IO_TYPE_1V8_OR_3V3) {
129 		if (pstate == PIN_POWER_STATE_1V8) {
130 			*map = sg2000_18od33_1v8_oc_map;
131 			return ARRAY_SIZE(sg2000_18od33_1v8_oc_map);
132 		} else if (pstate == PIN_POWER_STATE_3V3) {
133 			*map = sg2000_18od33_3v3_oc_map;
134 			return ARRAY_SIZE(sg2000_18od33_3v3_oc_map);
135 		}
136 	}
137 
138 	if (type == IO_TYPE_ETH) {
139 		*map = sg2000_eth_oc_map;
140 		return ARRAY_SIZE(sg2000_eth_oc_map);
141 	}
142 
143 	return -ENOTSUPP;
144 }
145 
146 static const u32 sg2000_1v8_schmitt_map[] = {
147 	0,
148 	970000,
149 	1040000
150 };
151 
152 static const u32 sg2000_18od33_1v8_schmitt_map[] = {
153 	0,
154 	1070000
155 };
156 
157 static const u32 sg2000_18od33_3v3_schmitt_map[] = {
158 	0,
159 	1100000
160 };
161 
sg2000_get_schmitt_map(struct cv1800_pin * pin,const u32 * psmap,const u32 ** map)162 static int sg2000_get_schmitt_map(struct cv1800_pin *pin, const u32 *psmap,
163 				  const u32 **map)
164 {
165 	enum cv1800_pin_io_type type = cv1800_pin_io_type(pin);
166 	u32 pstate = psmap[pin->power_domain];
167 
168 	if (type == IO_TYPE_1V8_ONLY) {
169 		*map = sg2000_1v8_schmitt_map;
170 		return ARRAY_SIZE(sg2000_1v8_schmitt_map);
171 	}
172 
173 	if (type == IO_TYPE_1V8_OR_3V3) {
174 		if (pstate == PIN_POWER_STATE_1V8) {
175 			*map = sg2000_18od33_1v8_schmitt_map;
176 			return ARRAY_SIZE(sg2000_18od33_1v8_schmitt_map);
177 		} else if (pstate == PIN_POWER_STATE_3V3) {
178 			*map = sg2000_18od33_3v3_schmitt_map;
179 			return ARRAY_SIZE(sg2000_18od33_3v3_schmitt_map);
180 		}
181 	}
182 
183 	return -ENOTSUPP;
184 }
185 
186 static const struct cv1800_vddio_cfg_ops sg2000_vddio_cfg_ops = {
187 	.get_pull_up		= sg2000_get_pull_up,
188 	.get_pull_down		= sg2000_get_pull_down,
189 	.get_oc_map		= sg2000_get_oc_map,
190 	.get_schmitt_map		= sg2000_get_schmitt_map,
191 };
192 
193 static const struct pinctrl_pin_desc sg2000_pins[] = {
194 	PINCTRL_PIN(PIN_MIPI_TXM4,	"MIPI_TXM4"),
195 	PINCTRL_PIN(PIN_MIPIRX0N,	"MIPIRX0N"),
196 	PINCTRL_PIN(PIN_MIPIRX3P,	"MIPIRX3P"),
197 	PINCTRL_PIN(PIN_MIPIRX4P,	"MIPIRX4P"),
198 	PINCTRL_PIN(PIN_VIVO_D2,	"VIVO_D2"),
199 	PINCTRL_PIN(PIN_VIVO_D3,	"VIVO_D3"),
200 	PINCTRL_PIN(PIN_VIVO_D10,	"VIVO_D10"),
201 	PINCTRL_PIN(PIN_USB_VBUS_DET,	"USB_VBUS_DET"),
202 	PINCTRL_PIN(PIN_MIPI_TXP3,	"MIPI_TXP3"),
203 	PINCTRL_PIN(PIN_MIPI_TXM3,	"MIPI_TXM3"),
204 	PINCTRL_PIN(PIN_MIPI_TXP4,	"MIPI_TXP4"),
205 	PINCTRL_PIN(PIN_MIPIRX0P,	"MIPIRX0P"),
206 	PINCTRL_PIN(PIN_MIPIRX1N,	"MIPIRX1N"),
207 	PINCTRL_PIN(PIN_MIPIRX2N,	"MIPIRX2N"),
208 	PINCTRL_PIN(PIN_MIPIRX4N,	"MIPIRX4N"),
209 	PINCTRL_PIN(PIN_MIPIRX5N,	"MIPIRX5N"),
210 	PINCTRL_PIN(PIN_VIVO_D1,	"VIVO_D1"),
211 	PINCTRL_PIN(PIN_VIVO_D5,	"VIVO_D5"),
212 	PINCTRL_PIN(PIN_VIVO_D7,	"VIVO_D7"),
213 	PINCTRL_PIN(PIN_VIVO_D9,	"VIVO_D9"),
214 	PINCTRL_PIN(PIN_USB_ID,		"USB_ID"),
215 	PINCTRL_PIN(PIN_ETH_RXM,	"ETH_RXM"),
216 	PINCTRL_PIN(PIN_MIPI_TXP2,	"MIPI_TXP2"),
217 	PINCTRL_PIN(PIN_MIPI_TXM2,	"MIPI_TXM2"),
218 	PINCTRL_PIN(PIN_CAM_PD0,	"CAM_PD0"),
219 	PINCTRL_PIN(PIN_CAM_MCLK0,	"CAM_MCLK0"),
220 	PINCTRL_PIN(PIN_MIPIRX1P,	"MIPIRX1P"),
221 	PINCTRL_PIN(PIN_MIPIRX2P,	"MIPIRX2P"),
222 	PINCTRL_PIN(PIN_MIPIRX3N,	"MIPIRX3N"),
223 	PINCTRL_PIN(PIN_MIPIRX5P,	"MIPIRX5P"),
224 	PINCTRL_PIN(PIN_VIVO_CLK,	"VIVO_CLK"),
225 	PINCTRL_PIN(PIN_VIVO_D6,	"VIVO_D6"),
226 	PINCTRL_PIN(PIN_VIVO_D8,	"VIVO_D8"),
227 	PINCTRL_PIN(PIN_USB_VBUS_EN,	"USB_VBUS_EN"),
228 	PINCTRL_PIN(PIN_ETH_RXP,	"ETH_RXP"),
229 	PINCTRL_PIN(PIN_GPIO_RTX,	"GPIO_RTX"),
230 	PINCTRL_PIN(PIN_MIPI_TXP1,	"MIPI_TXP1"),
231 	PINCTRL_PIN(PIN_MIPI_TXM1,	"MIPI_TXM1"),
232 	PINCTRL_PIN(PIN_CAM_MCLK1,	"CAM_MCLK1"),
233 	PINCTRL_PIN(PIN_IIC3_SCL,	"IIC3_SCL"),
234 	PINCTRL_PIN(PIN_VIVO_D4,	"VIVO_D4"),
235 	PINCTRL_PIN(PIN_ETH_TXM,	"ETH_TXM"),
236 	PINCTRL_PIN(PIN_ETH_TXP,	"ETH_TXP"),
237 	PINCTRL_PIN(PIN_MIPI_TXP0,	"MIPI_TXP0"),
238 	PINCTRL_PIN(PIN_MIPI_TXM0,	"MIPI_TXM0"),
239 	PINCTRL_PIN(PIN_CAM_PD1,	"CAM_PD1"),
240 	PINCTRL_PIN(PIN_CAM_RST0,	"CAM_RST0"),
241 	PINCTRL_PIN(PIN_VIVO_D0,	"VIVO_D0"),
242 	PINCTRL_PIN(PIN_ADC1,		"ADC1"),
243 	PINCTRL_PIN(PIN_ADC2,		"ADC2"),
244 	PINCTRL_PIN(PIN_ADC3,		"ADC3"),
245 	PINCTRL_PIN(PIN_AUD_AOUTL,	"AUD_AOUTL"),
246 	PINCTRL_PIN(PIN_IIC3_SDA,	"IIC3_SDA"),
247 	PINCTRL_PIN(PIN_SD1_D2,		"SD1_D2"),
248 	PINCTRL_PIN(PIN_AUD_AOUTR,	"AUD_AOUTR"),
249 	PINCTRL_PIN(PIN_SD1_D3,		"SD1_D3"),
250 	PINCTRL_PIN(PIN_SD1_CLK,	"SD1_CLK"),
251 	PINCTRL_PIN(PIN_SD1_CMD,	"SD1_CMD"),
252 	PINCTRL_PIN(PIN_AUD_AINL_MIC,	"AUD_AINL_MIC"),
253 	PINCTRL_PIN(PIN_RSTN,		"RSTN"),
254 	PINCTRL_PIN(PIN_PWM0_BUCK,	"PWM0_BUCK"),
255 	PINCTRL_PIN(PIN_SD1_D1,		"SD1_D1"),
256 	PINCTRL_PIN(PIN_SD1_D0,		"SD1_D0"),
257 	PINCTRL_PIN(PIN_AUD_AINR_MIC,	"AUD_AINR_MIC"),
258 	PINCTRL_PIN(PIN_IIC2_SCL,	"IIC2_SCL"),
259 	PINCTRL_PIN(PIN_IIC2_SDA,	"IIC2_SDA"),
260 	PINCTRL_PIN(PIN_SD0_CD,		"SD0_CD"),
261 	PINCTRL_PIN(PIN_SD0_D1,		"SD0_D1"),
262 	PINCTRL_PIN(PIN_UART2_RX,	"UART2_RX"),
263 	PINCTRL_PIN(PIN_UART2_CTS,	"UART2_CTS"),
264 	PINCTRL_PIN(PIN_UART2_TX,	"UART2_TX"),
265 	PINCTRL_PIN(PIN_SD0_CLK,	"SD0_CLK"),
266 	PINCTRL_PIN(PIN_SD0_D0,		"SD0_D0"),
267 	PINCTRL_PIN(PIN_SD0_CMD,	"SD0_CMD"),
268 	PINCTRL_PIN(PIN_CLK32K,		"CLK32K"),
269 	PINCTRL_PIN(PIN_UART2_RTS,	"UART2_RTS"),
270 	PINCTRL_PIN(PIN_SD0_D3,		"SD0_D3"),
271 	PINCTRL_PIN(PIN_SD0_D2,		"SD0_D2"),
272 	PINCTRL_PIN(PIN_UART0_RX,	"UART0_RX"),
273 	PINCTRL_PIN(PIN_UART0_TX,	"UART0_TX"),
274 	PINCTRL_PIN(PIN_JTAG_CPU_TRST,	"JTAG_CPU_TRST"),
275 	PINCTRL_PIN(PIN_PWR_ON,		"PWR_ON"),
276 	PINCTRL_PIN(PIN_PWR_GPIO2,	"PWR_GPIO2"),
277 	PINCTRL_PIN(PIN_PWR_GPIO0,	"PWR_GPIO0"),
278 	PINCTRL_PIN(PIN_CLK25M,		"CLK25M"),
279 	PINCTRL_PIN(PIN_SD0_PWR_EN,	"SD0_PWR_EN"),
280 	PINCTRL_PIN(PIN_SPK_EN,		"SPK_EN"),
281 	PINCTRL_PIN(PIN_JTAG_CPU_TCK,	"JTAG_CPU_TCK"),
282 	PINCTRL_PIN(PIN_JTAG_CPU_TMS,	"JTAG_CPU_TMS"),
283 	PINCTRL_PIN(PIN_PWR_WAKEUP1,	"PWR_WAKEUP1"),
284 	PINCTRL_PIN(PIN_PWR_WAKEUP0,	"PWR_WAKEUP0"),
285 	PINCTRL_PIN(PIN_PWR_GPIO1,	"PWR_GPIO1"),
286 	PINCTRL_PIN(PIN_EMMC_DAT3,	"EMMC_DAT3"),
287 	PINCTRL_PIN(PIN_EMMC_DAT0,	"EMMC_DAT0"),
288 	PINCTRL_PIN(PIN_EMMC_DAT2,	"EMMC_DAT2"),
289 	PINCTRL_PIN(PIN_EMMC_RSTN,	"EMMC_RSTN"),
290 	PINCTRL_PIN(PIN_AUX0,		"AUX0"),
291 	PINCTRL_PIN(PIN_IIC0_SDA,	"IIC0_SDA"),
292 	PINCTRL_PIN(PIN_PWR_SEQ3,	"PWR_SEQ3"),
293 	PINCTRL_PIN(PIN_PWR_VBAT_DET,	"PWR_VBAT_DET"),
294 	PINCTRL_PIN(PIN_PWR_SEQ1,	"PWR_SEQ1"),
295 	PINCTRL_PIN(PIN_PWR_BUTTON1,	"PWR_BUTTON1"),
296 	PINCTRL_PIN(PIN_EMMC_DAT1,	"EMMC_DAT1"),
297 	PINCTRL_PIN(PIN_EMMC_CMD,	"EMMC_CMD"),
298 	PINCTRL_PIN(PIN_EMMC_CLK,	"EMMC_CLK"),
299 	PINCTRL_PIN(PIN_IIC0_SCL,	"IIC0_SCL"),
300 	PINCTRL_PIN(PIN_GPIO_ZQ,	"GPIO_ZQ"),
301 	PINCTRL_PIN(PIN_PWR_RSTN,	"PWR_RSTN"),
302 	PINCTRL_PIN(PIN_PWR_SEQ2,	"PWR_SEQ2"),
303 	PINCTRL_PIN(PIN_XTAL_XIN,	"XTAL_XIN"),
304 };
305 
306 static const struct cv1800_pin sg2000_pin_data[ARRAY_SIZE(sg2000_pins)] = {
307 	CV1800_GENERAL_PIN(PIN_MIPI_TXM4, VDD18A_MIPI,
308 			   IO_TYPE_1V8_ONLY,
309 			   CV1800_PINCONF_AREA_SYS, 0x194, 7,
310 			   CV1800_PINCONF_AREA_SYS, 0xc60),
311 	CV1800_GENERAL_PIN(PIN_MIPIRX0N, VDD18A_MIPI,
312 			   IO_TYPE_1V8_ONLY,
313 			   CV1800_PINCONF_AREA_SYS, 0x18c, 7,
314 			   CV1800_PINCONF_AREA_SYS, 0xc58),
315 	CV1800_GENERATE_PIN_MUX2(PIN_MIPIRX3P, VDD18A_MIPI,
316 				 IO_TYPE_1V8_ONLY,
317 				 CV1800_PINCONF_AREA_SYS, 0x178, 7,
318 				 CV1800_PINCONF_AREA_SYS, 0x118, 7,
319 				 CV1800_PINCONF_AREA_SYS, 0xc44),
320 	CV1800_GENERATE_PIN_MUX2(PIN_MIPIRX4P, VDD18A_MIPI,
321 				 IO_TYPE_1V8_ONLY,
322 				 CV1800_PINCONF_AREA_SYS, 0x170, 7,
323 				 CV1800_PINCONF_AREA_SYS, 0x11c, 7,
324 				 CV1800_PINCONF_AREA_SYS, 0xc3c),
325 	CV1800_GENERAL_PIN(PIN_VIVO_D2, VDDIO_VIVO,
326 			   IO_TYPE_1V8_OR_3V3,
327 			   CV1800_PINCONF_AREA_SYS, 0x154, 7,
328 			   CV1800_PINCONF_AREA_SYS, 0xc20),
329 	CV1800_GENERAL_PIN(PIN_VIVO_D3, VDDIO_VIVO,
330 			   IO_TYPE_1V8_OR_3V3,
331 			   CV1800_PINCONF_AREA_SYS, 0x150, 7,
332 			   CV1800_PINCONF_AREA_SYS, 0xc1c),
333 	CV1800_GENERAL_PIN(PIN_VIVO_D10, VDDIO_VIVO,
334 			   IO_TYPE_1V8_OR_3V3,
335 			   CV1800_PINCONF_AREA_SYS, 0x134, 7,
336 			   CV1800_PINCONF_AREA_SYS, 0xc00),
337 	CV1800_GENERAL_PIN(PIN_USB_VBUS_DET, VDDIO18_1,
338 			   IO_TYPE_1V8_ONLY,
339 			   CV1800_PINCONF_AREA_SYS, 0x108, 5,
340 			   CV1800_PINCONF_AREA_SYS, 0x820),
341 	CV1800_GENERAL_PIN(PIN_MIPI_TXP3, VDD18A_MIPI,
342 			   IO_TYPE_1V8_ONLY,
343 			   CV1800_PINCONF_AREA_SYS, 0x1a0, 7,
344 			   CV1800_PINCONF_AREA_SYS, 0xc6c),
345 	CV1800_GENERAL_PIN(PIN_MIPI_TXM3, VDD18A_MIPI,
346 			   IO_TYPE_1V8_ONLY,
347 			   CV1800_PINCONF_AREA_SYS, 0x19c, 7,
348 			   CV1800_PINCONF_AREA_SYS, 0xc68),
349 	CV1800_GENERAL_PIN(PIN_MIPI_TXP4, VDD18A_MIPI,
350 			   IO_TYPE_1V8_ONLY,
351 			   CV1800_PINCONF_AREA_SYS, 0x198, 7,
352 			   CV1800_PINCONF_AREA_SYS, 0xc64),
353 	CV1800_GENERAL_PIN(PIN_MIPIRX0P, VDD18A_MIPI,
354 			   IO_TYPE_1V8_ONLY,
355 			   CV1800_PINCONF_AREA_SYS, 0x190, 7,
356 			   CV1800_PINCONF_AREA_SYS, 0xc5c),
357 	CV1800_GENERAL_PIN(PIN_MIPIRX1N, VDD18A_MIPI,
358 			   IO_TYPE_1V8_ONLY,
359 			   CV1800_PINCONF_AREA_SYS, 0x184, 7,
360 			   CV1800_PINCONF_AREA_SYS, 0xc50),
361 	CV1800_GENERAL_PIN(PIN_MIPIRX2N, VDD18A_MIPI,
362 			   IO_TYPE_1V8_ONLY,
363 			   CV1800_PINCONF_AREA_SYS, 0x17c, 7,
364 			   CV1800_PINCONF_AREA_SYS, 0xc48),
365 	CV1800_GENERATE_PIN_MUX2(PIN_MIPIRX4N, VDD18A_MIPI,
366 				 IO_TYPE_1V8_ONLY,
367 				 CV1800_PINCONF_AREA_SYS, 0x16c, 7,
368 				 CV1800_PINCONF_AREA_SYS, 0x120, 7,
369 				 CV1800_PINCONF_AREA_SYS, 0xc38),
370 	CV1800_GENERAL_PIN(PIN_MIPIRX5N, VDD18A_MIPI,
371 			   IO_TYPE_1V8_ONLY,
372 			   CV1800_PINCONF_AREA_SYS, 0x164, 7,
373 			   CV1800_PINCONF_AREA_SYS, 0xc30),
374 	CV1800_GENERAL_PIN(PIN_VIVO_D1, VDDIO_VIVO,
375 			   IO_TYPE_1V8_OR_3V3,
376 			   CV1800_PINCONF_AREA_SYS, 0x158, 7,
377 			   CV1800_PINCONF_AREA_SYS, 0xc24),
378 	CV1800_GENERAL_PIN(PIN_VIVO_D5, VDDIO_VIVO,
379 			   IO_TYPE_1V8_OR_3V3,
380 			   CV1800_PINCONF_AREA_SYS, 0x148, 7,
381 			   CV1800_PINCONF_AREA_SYS, 0xc14),
382 	CV1800_GENERAL_PIN(PIN_VIVO_D7, VDDIO_VIVO,
383 			   IO_TYPE_1V8_OR_3V3,
384 			   CV1800_PINCONF_AREA_SYS, 0x140, 7,
385 			   CV1800_PINCONF_AREA_SYS, 0xc0c),
386 	CV1800_GENERAL_PIN(PIN_VIVO_D9, VDDIO_VIVO,
387 			   IO_TYPE_1V8_OR_3V3,
388 			   CV1800_PINCONF_AREA_SYS, 0x138, 7,
389 			   CV1800_PINCONF_AREA_SYS, 0xc04),
390 	CV1800_GENERAL_PIN(PIN_USB_ID, VDDIO18_1,
391 			   IO_TYPE_1V8_ONLY,
392 			   CV1800_PINCONF_AREA_SYS, 0x0fc, 3,
393 			   CV1800_PINCONF_AREA_SYS, 0x814),
394 	CV1800_FUNC_PIN(PIN_ETH_RXM, VDD18A_EPHY,
395 			IO_TYPE_ETH,
396 			CV1800_PINCONF_AREA_SYS, 0x130, 7),
397 	CV1800_GENERAL_PIN(PIN_MIPI_TXP2, VDD18A_MIPI,
398 			   IO_TYPE_1V8_ONLY,
399 			   CV1800_PINCONF_AREA_SYS, 0x1a8, 7,
400 			   CV1800_PINCONF_AREA_SYS, 0xc74),
401 	CV1800_GENERAL_PIN(PIN_MIPI_TXM2, VDD18A_MIPI,
402 			   IO_TYPE_1V8_ONLY,
403 			   CV1800_PINCONF_AREA_SYS, 0x1a4, 7,
404 			   CV1800_PINCONF_AREA_SYS, 0xc70),
405 	CV1800_GENERAL_PIN(PIN_CAM_PD0, VDD18A_MIPI,
406 			   IO_TYPE_1V8_ONLY,
407 			   CV1800_PINCONF_AREA_SYS, 0x004, 4,
408 			   CV1800_PINCONF_AREA_SYS, 0xb04),
409 	CV1800_GENERAL_PIN(PIN_CAM_MCLK0, VDD18A_MIPI,
410 			   IO_TYPE_1V8_ONLY,
411 			   CV1800_PINCONF_AREA_SYS, 0x000, 3,
412 			   CV1800_PINCONF_AREA_SYS, 0xb00),
413 	CV1800_GENERAL_PIN(PIN_MIPIRX1P, VDD18A_MIPI,
414 			   IO_TYPE_1V8_ONLY,
415 			   CV1800_PINCONF_AREA_SYS, 0x188, 7,
416 			   CV1800_PINCONF_AREA_SYS, 0xc54),
417 	CV1800_GENERAL_PIN(PIN_MIPIRX2P, VDD18A_MIPI,
418 			   IO_TYPE_1V8_ONLY,
419 			   CV1800_PINCONF_AREA_SYS, 0x180, 7,
420 			   CV1800_PINCONF_AREA_SYS, 0xc4c),
421 	CV1800_GENERATE_PIN_MUX2(PIN_MIPIRX3N, VDD18A_MIPI,
422 				 IO_TYPE_1V8_ONLY,
423 				 CV1800_PINCONF_AREA_SYS, 0x174, 7,
424 				 CV1800_PINCONF_AREA_SYS, 0x114, 7,
425 				 CV1800_PINCONF_AREA_SYS, 0xc40),
426 	CV1800_GENERAL_PIN(PIN_MIPIRX5P, VDD18A_MIPI,
427 			   IO_TYPE_1V8_ONLY,
428 			   CV1800_PINCONF_AREA_SYS, 0x168, 7,
429 			   CV1800_PINCONF_AREA_SYS, 0xc34),
430 	CV1800_GENERAL_PIN(PIN_VIVO_CLK, VDDIO_VIVO,
431 			   IO_TYPE_1V8_OR_3V3,
432 			   CV1800_PINCONF_AREA_SYS, 0x160, 7,
433 			   CV1800_PINCONF_AREA_SYS, 0xc2c),
434 	CV1800_GENERAL_PIN(PIN_VIVO_D6, VDDIO_VIVO,
435 			   IO_TYPE_1V8_OR_3V3,
436 			   CV1800_PINCONF_AREA_SYS, 0x144, 7,
437 			   CV1800_PINCONF_AREA_SYS, 0xc10),
438 	CV1800_GENERAL_PIN(PIN_VIVO_D8, VDDIO_VIVO,
439 			   IO_TYPE_1V8_OR_3V3,
440 			   CV1800_PINCONF_AREA_SYS, 0x13c, 7,
441 			   CV1800_PINCONF_AREA_SYS, 0xc08),
442 	CV1800_GENERAL_PIN(PIN_USB_VBUS_EN, VDDIO18_1,
443 			   IO_TYPE_1V8_ONLY,
444 			   CV1800_PINCONF_AREA_SYS, 0x100, 3,
445 			   CV1800_PINCONF_AREA_SYS, 0x818),
446 	CV1800_FUNC_PIN(PIN_ETH_RXP, VDD18A_EPHY,
447 			IO_TYPE_ETH,
448 			CV1800_PINCONF_AREA_SYS, 0x12c, 7),
449 	CV1800_GENERAL_PIN(PIN_GPIO_RTX, VDDIO18_1,
450 			   IO_TYPE_1V8_ONLY,
451 			   CV1800_PINCONF_AREA_SYS, 0x1cc, 5,
452 			   CV1800_PINCONF_AREA_SYS, 0xc8c),
453 	CV1800_GENERAL_PIN(PIN_MIPI_TXP1, VDD18A_MIPI,
454 			   IO_TYPE_1V8_ONLY,
455 			   CV1800_PINCONF_AREA_SYS, 0x1b0, 7,
456 			   CV1800_PINCONF_AREA_SYS, 0xc7c),
457 	CV1800_GENERAL_PIN(PIN_MIPI_TXM1, VDD18A_MIPI,
458 			   IO_TYPE_1V8_ONLY,
459 			   CV1800_PINCONF_AREA_SYS, 0x1ac, 7,
460 			   CV1800_PINCONF_AREA_SYS, 0xc78),
461 	CV1800_GENERAL_PIN(PIN_CAM_MCLK1, VDD18A_MIPI,
462 			   IO_TYPE_1V8_ONLY,
463 			   CV1800_PINCONF_AREA_SYS, 0x00c, 4,
464 			   CV1800_PINCONF_AREA_SYS, 0xb0c),
465 	CV1800_GENERAL_PIN(PIN_IIC3_SCL, VDD18A_MIPI,
466 			   IO_TYPE_1V8_ONLY,
467 			   CV1800_PINCONF_AREA_SYS, 0x014, 3,
468 			   CV1800_PINCONF_AREA_SYS, 0xb14),
469 	CV1800_GENERAL_PIN(PIN_VIVO_D4, VDDIO_VIVO,
470 			   IO_TYPE_1V8_OR_3V3,
471 			   CV1800_PINCONF_AREA_SYS, 0x14c, 7,
472 			   CV1800_PINCONF_AREA_SYS, 0xc18),
473 	CV1800_FUNC_PIN(PIN_ETH_TXM, VDD18A_EPHY,
474 			IO_TYPE_ETH,
475 			CV1800_PINCONF_AREA_SYS, 0x128, 7),
476 	CV1800_FUNC_PIN(PIN_ETH_TXP, VDD18A_EPHY,
477 			IO_TYPE_ETH,
478 			CV1800_PINCONF_AREA_SYS, 0x124, 7),
479 	CV1800_GENERAL_PIN(PIN_MIPI_TXP0, VDD18A_MIPI,
480 			   IO_TYPE_1V8_ONLY,
481 			   CV1800_PINCONF_AREA_SYS, 0x1b8, 7,
482 			   CV1800_PINCONF_AREA_SYS, 0xc84),
483 	CV1800_GENERAL_PIN(PIN_MIPI_TXM0, VDD18A_MIPI,
484 			   IO_TYPE_1V8_ONLY,
485 			   CV1800_PINCONF_AREA_SYS, 0x1b4, 7,
486 			   CV1800_PINCONF_AREA_SYS, 0xc80),
487 	CV1800_GENERAL_PIN(PIN_CAM_PD1, VDD18A_MIPI,
488 			   IO_TYPE_1V8_ONLY,
489 			   CV1800_PINCONF_AREA_SYS, 0x010, 6,
490 			   CV1800_PINCONF_AREA_SYS, 0xb10),
491 	CV1800_GENERAL_PIN(PIN_CAM_RST0, VDD18A_MIPI,
492 			   IO_TYPE_1V8_ONLY,
493 			   CV1800_PINCONF_AREA_SYS, 0x008, 6,
494 			   CV1800_PINCONF_AREA_SYS, 0xb08),
495 	CV1800_GENERAL_PIN(PIN_VIVO_D0, VDDIO_VIVO,
496 			   IO_TYPE_1V8_OR_3V3,
497 			   CV1800_PINCONF_AREA_SYS, 0x15c, 7,
498 			   CV1800_PINCONF_AREA_SYS, 0xc28),
499 	CV1800_GENERAL_PIN(PIN_ADC1, VDDIO18_1,
500 			   IO_TYPE_1V8_ONLY,
501 			   CV1800_PINCONF_AREA_SYS, 0x0f8, 4,
502 			   CV1800_PINCONF_AREA_SYS, 0x810),
503 	CV1800_GENERAL_PIN(PIN_ADC2, VDDIO18_1,
504 			   IO_TYPE_1V8_ONLY,
505 			   CV1800_PINCONF_AREA_SYS, 0x0f4, 7,
506 			   CV1800_PINCONF_AREA_SYS, 0x80c),
507 	CV1800_GENERAL_PIN(PIN_ADC3, VDDIO18_1,
508 			   IO_TYPE_1V8_ONLY,
509 			   CV1800_PINCONF_AREA_SYS, 0x0f0, 7,
510 			   CV1800_PINCONF_AREA_SYS, 0x808),
511 	CV1800_FUNC_PIN(PIN_AUD_AOUTL, VDD18A_MIPI,
512 			IO_TYPE_AUDIO,
513 			CV1800_PINCONF_AREA_SYS, 0x1c4, 5),
514 	CV1800_GENERAL_PIN(PIN_IIC3_SDA, VDD18A_MIPI,
515 			   IO_TYPE_1V8_ONLY,
516 			   CV1800_PINCONF_AREA_SYS, 0x018, 3,
517 			   CV1800_PINCONF_AREA_SYS, 0xb18),
518 	CV1800_GENERAL_PIN(PIN_SD1_D2, VDDIO_SD1,
519 			   IO_TYPE_1V8_OR_3V3,
520 			   CV1800_PINCONF_AREA_SYS, 0x0d4, 7,
521 			   CV1800_PINCONF_AREA_RTC, 0x05c),
522 	CV1800_FUNC_PIN(PIN_AUD_AOUTR, VDD18A_MIPI,
523 			IO_TYPE_AUDIO,
524 			CV1800_PINCONF_AREA_SYS, 0x1c8, 6),
525 	CV1800_GENERAL_PIN(PIN_SD1_D3, VDDIO_SD1,
526 			   IO_TYPE_1V8_OR_3V3,
527 			   CV1800_PINCONF_AREA_SYS, 0x0d0, 7,
528 			   CV1800_PINCONF_AREA_RTC, 0x058),
529 	CV1800_GENERAL_PIN(PIN_SD1_CLK, VDDIO_SD1,
530 			   IO_TYPE_1V8_OR_3V3,
531 			   CV1800_PINCONF_AREA_SYS, 0x0e4, 7,
532 			   CV1800_PINCONF_AREA_RTC, 0x06c),
533 	CV1800_GENERAL_PIN(PIN_SD1_CMD, VDDIO_SD1,
534 			   IO_TYPE_1V8_OR_3V3,
535 			   CV1800_PINCONF_AREA_SYS, 0x0e0, 7,
536 			   CV1800_PINCONF_AREA_RTC, 0x068),
537 	CV1800_FUNC_PIN(PIN_AUD_AINL_MIC, VDD18A_MIPI,
538 			IO_TYPE_AUDIO,
539 			CV1800_PINCONF_AREA_SYS, 0x1bc, 5),
540 	CV1800_GENERAL_PIN(PIN_RSTN, VDDIO18_1,
541 			   IO_TYPE_1V8_ONLY,
542 			   CV1800_PINCONF_AREA_SYS, 0x0e8, 0,
543 			   CV1800_PINCONF_AREA_SYS, 0x800),
544 	CV1800_GENERAL_PIN(PIN_PWM0_BUCK, VDDIO18_1,
545 			   IO_TYPE_1V8_ONLY,
546 			   CV1800_PINCONF_AREA_SYS, 0x0ec, 3,
547 			   CV1800_PINCONF_AREA_SYS, 0x804),
548 	CV1800_GENERAL_PIN(PIN_SD1_D1, VDDIO_SD1,
549 			   IO_TYPE_1V8_OR_3V3,
550 			   CV1800_PINCONF_AREA_SYS, 0x0d8, 7,
551 			   CV1800_PINCONF_AREA_RTC, 0x060),
552 	CV1800_GENERAL_PIN(PIN_SD1_D0, VDDIO_SD1,
553 			   IO_TYPE_1V8_OR_3V3,
554 			   CV1800_PINCONF_AREA_SYS, 0x0dc, 7,
555 			   CV1800_PINCONF_AREA_RTC, 0x064),
556 	CV1800_FUNC_PIN(PIN_AUD_AINR_MIC, VDD18A_MIPI,
557 			IO_TYPE_AUDIO,
558 			CV1800_PINCONF_AREA_SYS, 0x1c0, 6),
559 	CV1800_GENERAL_PIN(PIN_IIC2_SCL, VDDIO_RTC,
560 			   IO_TYPE_1V8_ONLY,
561 			   CV1800_PINCONF_AREA_SYS, 0x0b8, 7,
562 			   CV1800_PINCONF_AREA_RTC, 0x040),
563 	CV1800_GENERAL_PIN(PIN_IIC2_SDA, VDDIO_RTC,
564 			   IO_TYPE_1V8_ONLY,
565 			   CV1800_PINCONF_AREA_SYS, 0x0bc, 7,
566 			   CV1800_PINCONF_AREA_RTC, 0x044),
567 	CV1800_GENERAL_PIN(PIN_SD0_CD, VDDIO_EMMC,
568 			   IO_TYPE_1V8_OR_3V3,
569 			   CV1800_PINCONF_AREA_SYS, 0x034, 3,
570 			   CV1800_PINCONF_AREA_SYS, 0x900),
571 	CV1800_GENERAL_PIN(PIN_SD0_D1, VDDIO_SD0,
572 			   IO_TYPE_1V8_OR_3V3,
573 			   CV1800_PINCONF_AREA_SYS, 0x028, 7,
574 			   CV1800_PINCONF_AREA_SYS, 0xa0c),
575 	CV1800_GENERAL_PIN(PIN_UART2_RX, VDDIO_RTC,
576 			   IO_TYPE_1V8_ONLY,
577 			   CV1800_PINCONF_AREA_SYS, 0x0c8, 7,
578 			   CV1800_PINCONF_AREA_RTC, 0x050),
579 	CV1800_GENERAL_PIN(PIN_UART2_CTS, VDDIO_RTC,
580 			   IO_TYPE_1V8_ONLY,
581 			   CV1800_PINCONF_AREA_SYS, 0x0cc, 7,
582 			   CV1800_PINCONF_AREA_RTC, 0x054),
583 	CV1800_GENERAL_PIN(PIN_UART2_TX, VDDIO_RTC,
584 			   IO_TYPE_1V8_ONLY,
585 			   CV1800_PINCONF_AREA_SYS, 0x0c0, 7,
586 			   CV1800_PINCONF_AREA_RTC, 0x048),
587 	CV1800_GENERAL_PIN(PIN_SD0_CLK, VDDIO_SD0,
588 			   IO_TYPE_1V8_OR_3V3,
589 			   CV1800_PINCONF_AREA_SYS, 0x01c, 7,
590 			   CV1800_PINCONF_AREA_SYS, 0xa00),
591 	CV1800_GENERAL_PIN(PIN_SD0_D0, VDDIO_SD0,
592 			   IO_TYPE_1V8_OR_3V3,
593 			   CV1800_PINCONF_AREA_SYS, 0x024, 7,
594 			   CV1800_PINCONF_AREA_SYS, 0xa08),
595 	CV1800_GENERAL_PIN(PIN_SD0_CMD, VDDIO_SD0,
596 			   IO_TYPE_1V8_OR_3V3,
597 			   CV1800_PINCONF_AREA_SYS, 0x020, 7,
598 			   CV1800_PINCONF_AREA_SYS, 0xa04),
599 	CV1800_GENERAL_PIN(PIN_CLK32K, VDDIO_RTC,
600 			   IO_TYPE_1V8_ONLY,
601 			   CV1800_PINCONF_AREA_SYS, 0x0b0, 7,
602 			   CV1800_PINCONF_AREA_RTC, 0x038),
603 	CV1800_GENERAL_PIN(PIN_UART2_RTS, VDDIO_RTC,
604 			   IO_TYPE_1V8_ONLY,
605 			   CV1800_PINCONF_AREA_SYS, 0x0c4, 7,
606 			   CV1800_PINCONF_AREA_RTC, 0x04c),
607 	CV1800_GENERAL_PIN(PIN_SD0_D3, VDDIO_SD0,
608 			   IO_TYPE_1V8_OR_3V3,
609 			   CV1800_PINCONF_AREA_SYS, 0x030, 7,
610 			   CV1800_PINCONF_AREA_SYS, 0xa14),
611 	CV1800_GENERAL_PIN(PIN_SD0_D2, VDDIO_SD0,
612 			   IO_TYPE_1V8_OR_3V3,
613 			   CV1800_PINCONF_AREA_SYS, 0x02c, 7,
614 			   CV1800_PINCONF_AREA_SYS, 0xa10),
615 	CV1800_GENERAL_PIN(PIN_UART0_RX, VDDIO_EMMC,
616 			   IO_TYPE_1V8_OR_3V3,
617 			   CV1800_PINCONF_AREA_SYS, 0x044, 7,
618 			   CV1800_PINCONF_AREA_SYS, 0x910),
619 	CV1800_GENERAL_PIN(PIN_UART0_TX, VDDIO_EMMC,
620 			   IO_TYPE_1V8_OR_3V3,
621 			   CV1800_PINCONF_AREA_SYS, 0x040, 7,
622 			   CV1800_PINCONF_AREA_SYS, 0x90c),
623 	CV1800_GENERAL_PIN(PIN_JTAG_CPU_TRST, VDDIO_EMMC,
624 			   IO_TYPE_1V8_OR_3V3,
625 			   CV1800_PINCONF_AREA_SYS, 0x06c, 6,
626 			   CV1800_PINCONF_AREA_SYS, 0x938),
627 	CV1800_GENERAL_PIN(PIN_PWR_ON, VDDIO_RTC,
628 			   IO_TYPE_1V8_ONLY,
629 			   CV1800_PINCONF_AREA_SYS, 0x09c, 7,
630 			   CV1800_PINCONF_AREA_RTC, 0x024),
631 	CV1800_GENERAL_PIN(PIN_PWR_GPIO2, VDDIO_RTC,
632 			   IO_TYPE_1V8_ONLY,
633 			   CV1800_PINCONF_AREA_SYS, 0x0ac, 7,
634 			   CV1800_PINCONF_AREA_RTC, 0x034),
635 	CV1800_GENERAL_PIN(PIN_PWR_GPIO0, VDDIO_RTC,
636 			   IO_TYPE_1V8_ONLY,
637 			   CV1800_PINCONF_AREA_SYS, 0x0a4, 4,
638 			   CV1800_PINCONF_AREA_RTC, 0x02c),
639 	CV1800_GENERAL_PIN(PIN_CLK25M, VDDIO_RTC,
640 			   IO_TYPE_1V8_ONLY,
641 			   CV1800_PINCONF_AREA_SYS, 0x0b4, 7,
642 			   CV1800_PINCONF_AREA_RTC, 0x03c),
643 	CV1800_GENERAL_PIN(PIN_SD0_PWR_EN, VDDIO_EMMC,
644 			   IO_TYPE_1V8_OR_3V3,
645 			   CV1800_PINCONF_AREA_SYS, 0x038, 3,
646 			   CV1800_PINCONF_AREA_SYS, 0x904),
647 	CV1800_GENERAL_PIN(PIN_SPK_EN, VDDIO_EMMC,
648 			   IO_TYPE_1V8_OR_3V3,
649 			   CV1800_PINCONF_AREA_SYS, 0x03c, 3,
650 			   CV1800_PINCONF_AREA_SYS, 0x908),
651 	CV1800_GENERAL_PIN(PIN_JTAG_CPU_TCK, VDDIO_EMMC,
652 			   IO_TYPE_1V8_OR_3V3,
653 			   CV1800_PINCONF_AREA_SYS, 0x068, 7,
654 			   CV1800_PINCONF_AREA_SYS, 0x934),
655 	CV1800_GENERAL_PIN(PIN_JTAG_CPU_TMS, VDDIO_EMMC,
656 			   IO_TYPE_1V8_OR_3V3,
657 			   CV1800_PINCONF_AREA_SYS, 0x064, 7,
658 			   CV1800_PINCONF_AREA_SYS, 0x930),
659 	CV1800_GENERAL_PIN(PIN_PWR_WAKEUP1, VDDIO_RTC,
660 			   IO_TYPE_1V8_ONLY,
661 			   CV1800_PINCONF_AREA_SYS, 0x094, 7,
662 			   CV1800_PINCONF_AREA_RTC, 0x01c),
663 	CV1800_GENERAL_PIN(PIN_PWR_WAKEUP0, VDDIO_RTC,
664 			   IO_TYPE_1V8_ONLY,
665 			   CV1800_PINCONF_AREA_SYS, 0x090, 7,
666 			   CV1800_PINCONF_AREA_RTC, 0x018),
667 	CV1800_GENERAL_PIN(PIN_PWR_GPIO1, VDDIO_RTC,
668 			   IO_TYPE_1V8_ONLY,
669 			   CV1800_PINCONF_AREA_SYS, 0x0a8, 7,
670 			   CV1800_PINCONF_AREA_RTC, 0x030),
671 	CV1800_GENERAL_PIN(PIN_EMMC_DAT3, VDDIO_EMMC,
672 			   IO_TYPE_1V8_OR_3V3,
673 			   CV1800_PINCONF_AREA_SYS, 0x058, 3,
674 			   CV1800_PINCONF_AREA_SYS, 0x924),
675 	CV1800_GENERAL_PIN(PIN_EMMC_DAT0, VDDIO_EMMC,
676 			   IO_TYPE_1V8_OR_3V3,
677 			   CV1800_PINCONF_AREA_SYS, 0x054, 3,
678 			   CV1800_PINCONF_AREA_SYS, 0x920),
679 	CV1800_GENERAL_PIN(PIN_EMMC_DAT2, VDDIO_EMMC,
680 			   IO_TYPE_1V8_OR_3V3,
681 			   CV1800_PINCONF_AREA_SYS, 0x04c, 3,
682 			   CV1800_PINCONF_AREA_SYS, 0x918),
683 	CV1800_GENERAL_PIN(PIN_EMMC_RSTN, VDDIO_EMMC,
684 			   IO_TYPE_1V8_OR_3V3,
685 			   CV1800_PINCONF_AREA_SYS, 0x048, 4,
686 			   CV1800_PINCONF_AREA_SYS, 0x914),
687 	CV1800_GENERAL_PIN(PIN_AUX0, VDDIO_EMMC,
688 			   IO_TYPE_1V8_OR_3V3,
689 			   CV1800_PINCONF_AREA_SYS, 0x078, 7,
690 			   CV1800_PINCONF_AREA_SYS, 0x944),
691 	CV1800_GENERAL_PIN(PIN_IIC0_SDA, VDDIO_EMMC,
692 			   IO_TYPE_1V8_OR_3V3,
693 			   CV1800_PINCONF_AREA_SYS, 0x074, 7,
694 			   CV1800_PINCONF_AREA_SYS, 0x940),
695 	CV1800_GENERAL_PIN(PIN_PWR_SEQ3, VDDIO_RTC,
696 			   IO_TYPE_1V8_ONLY,
697 			   CV1800_PINCONF_AREA_SYS, 0x08c, 3,
698 			   CV1800_PINCONF_AREA_RTC, 0x010),
699 	CV1800_GENERAL_PIN(PIN_PWR_VBAT_DET, VDDIO_RTC,
700 			   IO_TYPE_1V8_ONLY,
701 			   CV1800_PINCONF_AREA_SYS, 0x07c, 0,
702 			   CV1800_PINCONF_AREA_RTC, 0x000),
703 	CV1800_GENERAL_PIN(PIN_PWR_SEQ1, VDDIO_RTC,
704 			   IO_TYPE_1V8_ONLY,
705 			   CV1800_PINCONF_AREA_SYS, 0x084, 3,
706 			   CV1800_PINCONF_AREA_RTC, 0x008),
707 	CV1800_GENERAL_PIN(PIN_PWR_BUTTON1, VDDIO_RTC,
708 			   IO_TYPE_1V8_ONLY,
709 			   CV1800_PINCONF_AREA_SYS, 0x098, 7,
710 			   CV1800_PINCONF_AREA_RTC, 0x020),
711 	CV1800_GENERAL_PIN(PIN_EMMC_DAT1, VDDIO_EMMC,
712 			   IO_TYPE_1V8_OR_3V3,
713 			   CV1800_PINCONF_AREA_SYS, 0x060, 3,
714 			   CV1800_PINCONF_AREA_SYS, 0x92c),
715 	CV1800_GENERAL_PIN(PIN_EMMC_CMD, VDDIO_EMMC,
716 			   IO_TYPE_1V8_OR_3V3,
717 			   CV1800_PINCONF_AREA_SYS, 0x05c, 3,
718 			   CV1800_PINCONF_AREA_SYS, 0x928),
719 	CV1800_GENERAL_PIN(PIN_EMMC_CLK, VDDIO_EMMC,
720 			   IO_TYPE_1V8_OR_3V3,
721 			   CV1800_PINCONF_AREA_SYS, 0x050, 3,
722 			   CV1800_PINCONF_AREA_SYS, 0x91c),
723 	CV1800_GENERAL_PIN(PIN_IIC0_SCL, VDDIO_EMMC,
724 			   IO_TYPE_1V8_OR_3V3,
725 			   CV1800_PINCONF_AREA_SYS, 0x070, 7,
726 			   CV1800_PINCONF_AREA_SYS, 0x93c),
727 	CV1800_GENERAL_PIN(PIN_GPIO_ZQ, VDDIO_RTC,
728 			   IO_TYPE_1V8_ONLY,
729 			   CV1800_PINCONF_AREA_SYS, 0x1d0, 4,
730 			   CV1800_PINCONF_AREA_RTC, 0x0e0),
731 	CV1800_GENERAL_PIN(PIN_PWR_RSTN, VDDIO_RTC,
732 			   IO_TYPE_1V8_ONLY,
733 			   CV1800_PINCONF_AREA_SYS, 0x080, 0,
734 			   CV1800_PINCONF_AREA_RTC, 0x004),
735 	CV1800_GENERAL_PIN(PIN_PWR_SEQ2, VDDIO_RTC,
736 			   IO_TYPE_1V8_ONLY,
737 			   CV1800_PINCONF_AREA_SYS, 0x088, 3,
738 			   CV1800_PINCONF_AREA_RTC, 0x00c),
739 	CV1800_GENERAL_PIN(PIN_XTAL_XIN, VDDIO_RTC,
740 			   IO_TYPE_1V8_ONLY,
741 			   CV1800_PINCONF_AREA_SYS, 0x0a0, 0,
742 			   CV1800_PINCONF_AREA_RTC, 0x028),
743 };
744 
745 static const struct cv1800_pinctrl_data sg2000_pindata = {
746 	.pins		= sg2000_pins,
747 	.pindata	= sg2000_pin_data,
748 	.pdnames	= sg2000_power_domain_desc,
749 	.vddio_ops	= &sg2000_vddio_cfg_ops,
750 	.npins		= ARRAY_SIZE(sg2000_pins),
751 	.npd		= ARRAY_SIZE(sg2000_power_domain_desc),
752 };
753 
754 static const struct of_device_id sg2000_pinctrl_ids[] = {
755 	{ .compatible = "sophgo,sg2000-pinctrl", .data = &sg2000_pindata },
756 	{ }
757 };
758 MODULE_DEVICE_TABLE(of, sg2000_pinctrl_ids);
759 
760 static struct platform_driver sg2000_pinctrl_driver = {
761 	.probe	= cv1800_pinctrl_probe,
762 	.driver	= {
763 		.name			= "sg2000-pinctrl",
764 		.suppress_bind_attrs	= true,
765 		.of_match_table		= sg2000_pinctrl_ids,
766 	},
767 };
768 module_platform_driver(sg2000_pinctrl_driver);
769 
770 MODULE_DESCRIPTION("Pinctrl driver for the SG2000 series SoC");
771 MODULE_LICENSE("GPL");
772