18c2ecf20Sopenharmony_ci// SPDX-License-Identifier: GPL-2.0+ 28c2ecf20Sopenharmony_ci// 38c2ecf20Sopenharmony_ci// Exynos ARMv8 specific support for Samsung pinctrl/gpiolib driver 48c2ecf20Sopenharmony_ci// with eint support. 58c2ecf20Sopenharmony_ci// 68c2ecf20Sopenharmony_ci// Copyright (c) 2012 Samsung Electronics Co., Ltd. 78c2ecf20Sopenharmony_ci// http://www.samsung.com 88c2ecf20Sopenharmony_ci// Copyright (c) 2012 Linaro Ltd 98c2ecf20Sopenharmony_ci// http://www.linaro.org 108c2ecf20Sopenharmony_ci// Copyright (c) 2017 Krzysztof Kozlowski <krzk@kernel.org> 118c2ecf20Sopenharmony_ci// 128c2ecf20Sopenharmony_ci// This file contains the Samsung Exynos specific information required by the 138c2ecf20Sopenharmony_ci// the Samsung pinctrl/gpiolib driver. It also includes the implementation of 148c2ecf20Sopenharmony_ci// external gpio and wakeup interrupt support. 158c2ecf20Sopenharmony_ci 168c2ecf20Sopenharmony_ci#include <linux/slab.h> 178c2ecf20Sopenharmony_ci#include <linux/soc/samsung/exynos-regs-pmu.h> 188c2ecf20Sopenharmony_ci 198c2ecf20Sopenharmony_ci#include "pinctrl-samsung.h" 208c2ecf20Sopenharmony_ci#include "pinctrl-exynos.h" 218c2ecf20Sopenharmony_ci 228c2ecf20Sopenharmony_cistatic const struct samsung_pin_bank_type bank_type_off = { 238c2ecf20Sopenharmony_ci .fld_width = { 4, 1, 2, 2, 2, 2, }, 248c2ecf20Sopenharmony_ci .reg_offset = { 0x00, 0x04, 0x08, 0x0c, 0x10, 0x14, }, 258c2ecf20Sopenharmony_ci}; 268c2ecf20Sopenharmony_ci 278c2ecf20Sopenharmony_cistatic const struct samsung_pin_bank_type bank_type_alive = { 288c2ecf20Sopenharmony_ci .fld_width = { 4, 1, 2, 2, }, 298c2ecf20Sopenharmony_ci .reg_offset = { 0x00, 0x04, 0x08, 0x0c, }, 308c2ecf20Sopenharmony_ci}; 318c2ecf20Sopenharmony_ci 328c2ecf20Sopenharmony_ci/* Exynos5433 has the 4bit widths for PINCFG_TYPE_DRV bitfields. */ 338c2ecf20Sopenharmony_cistatic const struct samsung_pin_bank_type exynos5433_bank_type_off = { 348c2ecf20Sopenharmony_ci .fld_width = { 4, 1, 2, 4, 2, 2, }, 358c2ecf20Sopenharmony_ci .reg_offset = { 0x00, 0x04, 0x08, 0x0c, 0x10, 0x14, }, 368c2ecf20Sopenharmony_ci}; 378c2ecf20Sopenharmony_ci 388c2ecf20Sopenharmony_cistatic const struct samsung_pin_bank_type exynos5433_bank_type_alive = { 398c2ecf20Sopenharmony_ci .fld_width = { 4, 1, 2, 4, }, 408c2ecf20Sopenharmony_ci .reg_offset = { 0x00, 0x04, 0x08, 0x0c, }, 418c2ecf20Sopenharmony_ci}; 428c2ecf20Sopenharmony_ci 438c2ecf20Sopenharmony_ci/* Pad retention control code for accessing PMU regmap */ 448c2ecf20Sopenharmony_cistatic atomic_t exynos_shared_retention_refcnt; 458c2ecf20Sopenharmony_ci 468c2ecf20Sopenharmony_ci/* pin banks of exynos5433 pin-controller - ALIVE */ 478c2ecf20Sopenharmony_cistatic const struct samsung_pin_bank_data exynos5433_pin_banks0[] __initconst = { 488c2ecf20Sopenharmony_ci /* Must start with EINTG banks, ordered by EINT group number. */ 498c2ecf20Sopenharmony_ci EXYNOS5433_PIN_BANK_EINTW(8, 0x000, "gpa0", 0x00), 508c2ecf20Sopenharmony_ci EXYNOS5433_PIN_BANK_EINTW(8, 0x020, "gpa1", 0x04), 518c2ecf20Sopenharmony_ci EXYNOS5433_PIN_BANK_EINTW(8, 0x040, "gpa2", 0x08), 528c2ecf20Sopenharmony_ci EXYNOS5433_PIN_BANK_EINTW(8, 0x060, "gpa3", 0x0c), 538c2ecf20Sopenharmony_ci EXYNOS5433_PIN_BANK_EINTW_EXT(8, 0x020, "gpf1", 0x1004, 1), 548c2ecf20Sopenharmony_ci EXYNOS5433_PIN_BANK_EINTW_EXT(4, 0x040, "gpf2", 0x1008, 1), 558c2ecf20Sopenharmony_ci EXYNOS5433_PIN_BANK_EINTW_EXT(4, 0x060, "gpf3", 0x100c, 1), 568c2ecf20Sopenharmony_ci EXYNOS5433_PIN_BANK_EINTW_EXT(8, 0x080, "gpf4", 0x1010, 1), 578c2ecf20Sopenharmony_ci EXYNOS5433_PIN_BANK_EINTW_EXT(8, 0x0a0, "gpf5", 0x1014, 1), 588c2ecf20Sopenharmony_ci}; 598c2ecf20Sopenharmony_ci 608c2ecf20Sopenharmony_ci/* pin banks of exynos5433 pin-controller - AUD */ 618c2ecf20Sopenharmony_cistatic const struct samsung_pin_bank_data exynos5433_pin_banks1[] __initconst = { 628c2ecf20Sopenharmony_ci /* Must start with EINTG banks, ordered by EINT group number. */ 638c2ecf20Sopenharmony_ci EXYNOS5433_PIN_BANK_EINTG(7, 0x000, "gpz0", 0x00), 648c2ecf20Sopenharmony_ci EXYNOS5433_PIN_BANK_EINTG(4, 0x020, "gpz1", 0x04), 658c2ecf20Sopenharmony_ci}; 668c2ecf20Sopenharmony_ci 678c2ecf20Sopenharmony_ci/* pin banks of exynos5433 pin-controller - CPIF */ 688c2ecf20Sopenharmony_cistatic const struct samsung_pin_bank_data exynos5433_pin_banks2[] __initconst = { 698c2ecf20Sopenharmony_ci /* Must start with EINTG banks, ordered by EINT group number. */ 708c2ecf20Sopenharmony_ci EXYNOS5433_PIN_BANK_EINTG(2, 0x000, "gpv6", 0x00), 718c2ecf20Sopenharmony_ci}; 728c2ecf20Sopenharmony_ci 738c2ecf20Sopenharmony_ci/* pin banks of exynos5433 pin-controller - eSE */ 748c2ecf20Sopenharmony_cistatic const struct samsung_pin_bank_data exynos5433_pin_banks3[] __initconst = { 758c2ecf20Sopenharmony_ci /* Must start with EINTG banks, ordered by EINT group number. */ 768c2ecf20Sopenharmony_ci EXYNOS5433_PIN_BANK_EINTG(3, 0x000, "gpj2", 0x00), 778c2ecf20Sopenharmony_ci}; 788c2ecf20Sopenharmony_ci 798c2ecf20Sopenharmony_ci/* pin banks of exynos5433 pin-controller - FINGER */ 808c2ecf20Sopenharmony_cistatic const struct samsung_pin_bank_data exynos5433_pin_banks4[] __initconst = { 818c2ecf20Sopenharmony_ci /* Must start with EINTG banks, ordered by EINT group number. */ 828c2ecf20Sopenharmony_ci EXYNOS5433_PIN_BANK_EINTG(4, 0x000, "gpd5", 0x00), 838c2ecf20Sopenharmony_ci}; 848c2ecf20Sopenharmony_ci 858c2ecf20Sopenharmony_ci/* pin banks of exynos5433 pin-controller - FSYS */ 868c2ecf20Sopenharmony_cistatic const struct samsung_pin_bank_data exynos5433_pin_banks5[] __initconst = { 878c2ecf20Sopenharmony_ci /* Must start with EINTG banks, ordered by EINT group number. */ 888c2ecf20Sopenharmony_ci EXYNOS5433_PIN_BANK_EINTG(6, 0x000, "gph1", 0x00), 898c2ecf20Sopenharmony_ci EXYNOS5433_PIN_BANK_EINTG(7, 0x020, "gpr4", 0x04), 908c2ecf20Sopenharmony_ci EXYNOS5433_PIN_BANK_EINTG(5, 0x040, "gpr0", 0x08), 918c2ecf20Sopenharmony_ci EXYNOS5433_PIN_BANK_EINTG(8, 0x060, "gpr1", 0x0c), 928c2ecf20Sopenharmony_ci EXYNOS5433_PIN_BANK_EINTG(2, 0x080, "gpr2", 0x10), 938c2ecf20Sopenharmony_ci EXYNOS5433_PIN_BANK_EINTG(8, 0x0a0, "gpr3", 0x14), 948c2ecf20Sopenharmony_ci}; 958c2ecf20Sopenharmony_ci 968c2ecf20Sopenharmony_ci/* pin banks of exynos5433 pin-controller - IMEM */ 978c2ecf20Sopenharmony_cistatic const struct samsung_pin_bank_data exynos5433_pin_banks6[] __initconst = { 988c2ecf20Sopenharmony_ci /* Must start with EINTG banks, ordered by EINT group number. */ 998c2ecf20Sopenharmony_ci EXYNOS5433_PIN_BANK_EINTG(8, 0x000, "gpf0", 0x00), 1008c2ecf20Sopenharmony_ci}; 1018c2ecf20Sopenharmony_ci 1028c2ecf20Sopenharmony_ci/* pin banks of exynos5433 pin-controller - NFC */ 1038c2ecf20Sopenharmony_cistatic const struct samsung_pin_bank_data exynos5433_pin_banks7[] __initconst = { 1048c2ecf20Sopenharmony_ci /* Must start with EINTG banks, ordered by EINT group number. */ 1058c2ecf20Sopenharmony_ci EXYNOS5433_PIN_BANK_EINTG(3, 0x000, "gpj0", 0x00), 1068c2ecf20Sopenharmony_ci}; 1078c2ecf20Sopenharmony_ci 1088c2ecf20Sopenharmony_ci/* pin banks of exynos5433 pin-controller - PERIC */ 1098c2ecf20Sopenharmony_cistatic const struct samsung_pin_bank_data exynos5433_pin_banks8[] __initconst = { 1108c2ecf20Sopenharmony_ci /* Must start with EINTG banks, ordered by EINT group number. */ 1118c2ecf20Sopenharmony_ci EXYNOS5433_PIN_BANK_EINTG(6, 0x000, "gpv7", 0x00), 1128c2ecf20Sopenharmony_ci EXYNOS5433_PIN_BANK_EINTG(5, 0x020, "gpb0", 0x04), 1138c2ecf20Sopenharmony_ci EXYNOS5433_PIN_BANK_EINTG(8, 0x040, "gpc0", 0x08), 1148c2ecf20Sopenharmony_ci EXYNOS5433_PIN_BANK_EINTG(2, 0x060, "gpc1", 0x0c), 1158c2ecf20Sopenharmony_ci EXYNOS5433_PIN_BANK_EINTG(6, 0x080, "gpc2", 0x10), 1168c2ecf20Sopenharmony_ci EXYNOS5433_PIN_BANK_EINTG(8, 0x0a0, "gpc3", 0x14), 1178c2ecf20Sopenharmony_ci EXYNOS5433_PIN_BANK_EINTG(2, 0x0c0, "gpg0", 0x18), 1188c2ecf20Sopenharmony_ci EXYNOS5433_PIN_BANK_EINTG(4, 0x0e0, "gpd0", 0x1c), 1198c2ecf20Sopenharmony_ci EXYNOS5433_PIN_BANK_EINTG(6, 0x100, "gpd1", 0x20), 1208c2ecf20Sopenharmony_ci EXYNOS5433_PIN_BANK_EINTG(8, 0x120, "gpd2", 0x24), 1218c2ecf20Sopenharmony_ci EXYNOS5433_PIN_BANK_EINTG(5, 0x140, "gpd4", 0x28), 1228c2ecf20Sopenharmony_ci EXYNOS5433_PIN_BANK_EINTG(2, 0x160, "gpd8", 0x2c), 1238c2ecf20Sopenharmony_ci EXYNOS5433_PIN_BANK_EINTG(7, 0x180, "gpd6", 0x30), 1248c2ecf20Sopenharmony_ci EXYNOS5433_PIN_BANK_EINTG(3, 0x1a0, "gpd7", 0x34), 1258c2ecf20Sopenharmony_ci EXYNOS5433_PIN_BANK_EINTG(5, 0x1c0, "gpg1", 0x38), 1268c2ecf20Sopenharmony_ci EXYNOS5433_PIN_BANK_EINTG(2, 0x1e0, "gpg2", 0x3c), 1278c2ecf20Sopenharmony_ci EXYNOS5433_PIN_BANK_EINTG(8, 0x200, "gpg3", 0x40), 1288c2ecf20Sopenharmony_ci}; 1298c2ecf20Sopenharmony_ci 1308c2ecf20Sopenharmony_ci/* pin banks of exynos5433 pin-controller - TOUCH */ 1318c2ecf20Sopenharmony_cistatic const struct samsung_pin_bank_data exynos5433_pin_banks9[] __initconst = { 1328c2ecf20Sopenharmony_ci /* Must start with EINTG banks, ordered by EINT group number. */ 1338c2ecf20Sopenharmony_ci EXYNOS5433_PIN_BANK_EINTG(3, 0x000, "gpj1", 0x00), 1348c2ecf20Sopenharmony_ci}; 1358c2ecf20Sopenharmony_ci 1368c2ecf20Sopenharmony_ci/* PMU pin retention groups registers for Exynos5433 (without audio & fsys) */ 1378c2ecf20Sopenharmony_cistatic const u32 exynos5433_retention_regs[] = { 1388c2ecf20Sopenharmony_ci EXYNOS5433_PAD_RETENTION_TOP_OPTION, 1398c2ecf20Sopenharmony_ci EXYNOS5433_PAD_RETENTION_UART_OPTION, 1408c2ecf20Sopenharmony_ci EXYNOS5433_PAD_RETENTION_EBIA_OPTION, 1418c2ecf20Sopenharmony_ci EXYNOS5433_PAD_RETENTION_EBIB_OPTION, 1428c2ecf20Sopenharmony_ci EXYNOS5433_PAD_RETENTION_SPI_OPTION, 1438c2ecf20Sopenharmony_ci EXYNOS5433_PAD_RETENTION_MIF_OPTION, 1448c2ecf20Sopenharmony_ci EXYNOS5433_PAD_RETENTION_USBXTI_OPTION, 1458c2ecf20Sopenharmony_ci EXYNOS5433_PAD_RETENTION_BOOTLDO_OPTION, 1468c2ecf20Sopenharmony_ci EXYNOS5433_PAD_RETENTION_UFS_OPTION, 1478c2ecf20Sopenharmony_ci EXYNOS5433_PAD_RETENTION_FSYSGENIO_OPTION, 1488c2ecf20Sopenharmony_ci}; 1498c2ecf20Sopenharmony_ci 1508c2ecf20Sopenharmony_cistatic const struct samsung_retention_data exynos5433_retention_data __initconst = { 1518c2ecf20Sopenharmony_ci .regs = exynos5433_retention_regs, 1528c2ecf20Sopenharmony_ci .nr_regs = ARRAY_SIZE(exynos5433_retention_regs), 1538c2ecf20Sopenharmony_ci .value = EXYNOS_WAKEUP_FROM_LOWPWR, 1548c2ecf20Sopenharmony_ci .refcnt = &exynos_shared_retention_refcnt, 1558c2ecf20Sopenharmony_ci .init = exynos_retention_init, 1568c2ecf20Sopenharmony_ci}; 1578c2ecf20Sopenharmony_ci 1588c2ecf20Sopenharmony_ci/* PMU retention control for audio pins can be tied to audio pin bank */ 1598c2ecf20Sopenharmony_cistatic const u32 exynos5433_audio_retention_regs[] = { 1608c2ecf20Sopenharmony_ci EXYNOS5433_PAD_RETENTION_AUD_OPTION, 1618c2ecf20Sopenharmony_ci}; 1628c2ecf20Sopenharmony_ci 1638c2ecf20Sopenharmony_cistatic const struct samsung_retention_data exynos5433_audio_retention_data __initconst = { 1648c2ecf20Sopenharmony_ci .regs = exynos5433_audio_retention_regs, 1658c2ecf20Sopenharmony_ci .nr_regs = ARRAY_SIZE(exynos5433_audio_retention_regs), 1668c2ecf20Sopenharmony_ci .value = EXYNOS_WAKEUP_FROM_LOWPWR, 1678c2ecf20Sopenharmony_ci .init = exynos_retention_init, 1688c2ecf20Sopenharmony_ci}; 1698c2ecf20Sopenharmony_ci 1708c2ecf20Sopenharmony_ci/* PMU retention control for mmc pins can be tied to fsys pin bank */ 1718c2ecf20Sopenharmony_cistatic const u32 exynos5433_fsys_retention_regs[] = { 1728c2ecf20Sopenharmony_ci EXYNOS5433_PAD_RETENTION_MMC0_OPTION, 1738c2ecf20Sopenharmony_ci EXYNOS5433_PAD_RETENTION_MMC1_OPTION, 1748c2ecf20Sopenharmony_ci EXYNOS5433_PAD_RETENTION_MMC2_OPTION, 1758c2ecf20Sopenharmony_ci}; 1768c2ecf20Sopenharmony_ci 1778c2ecf20Sopenharmony_cistatic const struct samsung_retention_data exynos5433_fsys_retention_data __initconst = { 1788c2ecf20Sopenharmony_ci .regs = exynos5433_fsys_retention_regs, 1798c2ecf20Sopenharmony_ci .nr_regs = ARRAY_SIZE(exynos5433_fsys_retention_regs), 1808c2ecf20Sopenharmony_ci .value = EXYNOS_WAKEUP_FROM_LOWPWR, 1818c2ecf20Sopenharmony_ci .init = exynos_retention_init, 1828c2ecf20Sopenharmony_ci}; 1838c2ecf20Sopenharmony_ci 1848c2ecf20Sopenharmony_ci/* 1858c2ecf20Sopenharmony_ci * Samsung pinctrl driver data for Exynos5433 SoC. Exynos5433 SoC includes 1868c2ecf20Sopenharmony_ci * ten gpio/pin-mux/pinconfig controllers. 1878c2ecf20Sopenharmony_ci */ 1888c2ecf20Sopenharmony_cistatic const struct samsung_pin_ctrl exynos5433_pin_ctrl[] __initconst = { 1898c2ecf20Sopenharmony_ci { 1908c2ecf20Sopenharmony_ci /* pin-controller instance 0 data */ 1918c2ecf20Sopenharmony_ci .pin_banks = exynos5433_pin_banks0, 1928c2ecf20Sopenharmony_ci .nr_banks = ARRAY_SIZE(exynos5433_pin_banks0), 1938c2ecf20Sopenharmony_ci .eint_wkup_init = exynos_eint_wkup_init, 1948c2ecf20Sopenharmony_ci .suspend = exynos_pinctrl_suspend, 1958c2ecf20Sopenharmony_ci .resume = exynos_pinctrl_resume, 1968c2ecf20Sopenharmony_ci .nr_ext_resources = 1, 1978c2ecf20Sopenharmony_ci .retention_data = &exynos5433_retention_data, 1988c2ecf20Sopenharmony_ci }, { 1998c2ecf20Sopenharmony_ci /* pin-controller instance 1 data */ 2008c2ecf20Sopenharmony_ci .pin_banks = exynos5433_pin_banks1, 2018c2ecf20Sopenharmony_ci .nr_banks = ARRAY_SIZE(exynos5433_pin_banks1), 2028c2ecf20Sopenharmony_ci .eint_gpio_init = exynos_eint_gpio_init, 2038c2ecf20Sopenharmony_ci .suspend = exynos_pinctrl_suspend, 2048c2ecf20Sopenharmony_ci .resume = exynos_pinctrl_resume, 2058c2ecf20Sopenharmony_ci .retention_data = &exynos5433_audio_retention_data, 2068c2ecf20Sopenharmony_ci }, { 2078c2ecf20Sopenharmony_ci /* pin-controller instance 2 data */ 2088c2ecf20Sopenharmony_ci .pin_banks = exynos5433_pin_banks2, 2098c2ecf20Sopenharmony_ci .nr_banks = ARRAY_SIZE(exynos5433_pin_banks2), 2108c2ecf20Sopenharmony_ci .eint_gpio_init = exynos_eint_gpio_init, 2118c2ecf20Sopenharmony_ci .suspend = exynos_pinctrl_suspend, 2128c2ecf20Sopenharmony_ci .resume = exynos_pinctrl_resume, 2138c2ecf20Sopenharmony_ci .retention_data = &exynos5433_retention_data, 2148c2ecf20Sopenharmony_ci }, { 2158c2ecf20Sopenharmony_ci /* pin-controller instance 3 data */ 2168c2ecf20Sopenharmony_ci .pin_banks = exynos5433_pin_banks3, 2178c2ecf20Sopenharmony_ci .nr_banks = ARRAY_SIZE(exynos5433_pin_banks3), 2188c2ecf20Sopenharmony_ci .eint_gpio_init = exynos_eint_gpio_init, 2198c2ecf20Sopenharmony_ci .suspend = exynos_pinctrl_suspend, 2208c2ecf20Sopenharmony_ci .resume = exynos_pinctrl_resume, 2218c2ecf20Sopenharmony_ci .retention_data = &exynos5433_retention_data, 2228c2ecf20Sopenharmony_ci }, { 2238c2ecf20Sopenharmony_ci /* pin-controller instance 4 data */ 2248c2ecf20Sopenharmony_ci .pin_banks = exynos5433_pin_banks4, 2258c2ecf20Sopenharmony_ci .nr_banks = ARRAY_SIZE(exynos5433_pin_banks4), 2268c2ecf20Sopenharmony_ci .eint_gpio_init = exynos_eint_gpio_init, 2278c2ecf20Sopenharmony_ci .suspend = exynos_pinctrl_suspend, 2288c2ecf20Sopenharmony_ci .resume = exynos_pinctrl_resume, 2298c2ecf20Sopenharmony_ci .retention_data = &exynos5433_retention_data, 2308c2ecf20Sopenharmony_ci }, { 2318c2ecf20Sopenharmony_ci /* pin-controller instance 5 data */ 2328c2ecf20Sopenharmony_ci .pin_banks = exynos5433_pin_banks5, 2338c2ecf20Sopenharmony_ci .nr_banks = ARRAY_SIZE(exynos5433_pin_banks5), 2348c2ecf20Sopenharmony_ci .eint_gpio_init = exynos_eint_gpio_init, 2358c2ecf20Sopenharmony_ci .suspend = exynos_pinctrl_suspend, 2368c2ecf20Sopenharmony_ci .resume = exynos_pinctrl_resume, 2378c2ecf20Sopenharmony_ci .retention_data = &exynos5433_fsys_retention_data, 2388c2ecf20Sopenharmony_ci }, { 2398c2ecf20Sopenharmony_ci /* pin-controller instance 6 data */ 2408c2ecf20Sopenharmony_ci .pin_banks = exynos5433_pin_banks6, 2418c2ecf20Sopenharmony_ci .nr_banks = ARRAY_SIZE(exynos5433_pin_banks6), 2428c2ecf20Sopenharmony_ci .eint_gpio_init = exynos_eint_gpio_init, 2438c2ecf20Sopenharmony_ci .suspend = exynos_pinctrl_suspend, 2448c2ecf20Sopenharmony_ci .resume = exynos_pinctrl_resume, 2458c2ecf20Sopenharmony_ci .retention_data = &exynos5433_retention_data, 2468c2ecf20Sopenharmony_ci }, { 2478c2ecf20Sopenharmony_ci /* pin-controller instance 7 data */ 2488c2ecf20Sopenharmony_ci .pin_banks = exynos5433_pin_banks7, 2498c2ecf20Sopenharmony_ci .nr_banks = ARRAY_SIZE(exynos5433_pin_banks7), 2508c2ecf20Sopenharmony_ci .eint_gpio_init = exynos_eint_gpio_init, 2518c2ecf20Sopenharmony_ci .suspend = exynos_pinctrl_suspend, 2528c2ecf20Sopenharmony_ci .resume = exynos_pinctrl_resume, 2538c2ecf20Sopenharmony_ci .retention_data = &exynos5433_retention_data, 2548c2ecf20Sopenharmony_ci }, { 2558c2ecf20Sopenharmony_ci /* pin-controller instance 8 data */ 2568c2ecf20Sopenharmony_ci .pin_banks = exynos5433_pin_banks8, 2578c2ecf20Sopenharmony_ci .nr_banks = ARRAY_SIZE(exynos5433_pin_banks8), 2588c2ecf20Sopenharmony_ci .eint_gpio_init = exynos_eint_gpio_init, 2598c2ecf20Sopenharmony_ci .suspend = exynos_pinctrl_suspend, 2608c2ecf20Sopenharmony_ci .resume = exynos_pinctrl_resume, 2618c2ecf20Sopenharmony_ci .retention_data = &exynos5433_retention_data, 2628c2ecf20Sopenharmony_ci }, { 2638c2ecf20Sopenharmony_ci /* pin-controller instance 9 data */ 2648c2ecf20Sopenharmony_ci .pin_banks = exynos5433_pin_banks9, 2658c2ecf20Sopenharmony_ci .nr_banks = ARRAY_SIZE(exynos5433_pin_banks9), 2668c2ecf20Sopenharmony_ci .eint_gpio_init = exynos_eint_gpio_init, 2678c2ecf20Sopenharmony_ci .suspend = exynos_pinctrl_suspend, 2688c2ecf20Sopenharmony_ci .resume = exynos_pinctrl_resume, 2698c2ecf20Sopenharmony_ci .retention_data = &exynos5433_retention_data, 2708c2ecf20Sopenharmony_ci }, 2718c2ecf20Sopenharmony_ci}; 2728c2ecf20Sopenharmony_ci 2738c2ecf20Sopenharmony_ciconst struct samsung_pinctrl_of_match_data exynos5433_of_data __initconst = { 2748c2ecf20Sopenharmony_ci .ctrl = exynos5433_pin_ctrl, 2758c2ecf20Sopenharmony_ci .num_ctrl = ARRAY_SIZE(exynos5433_pin_ctrl), 2768c2ecf20Sopenharmony_ci}; 2778c2ecf20Sopenharmony_ci 2788c2ecf20Sopenharmony_ci/* pin banks of exynos7 pin-controller - ALIVE */ 2798c2ecf20Sopenharmony_cistatic const struct samsung_pin_bank_data exynos7_pin_banks0[] __initconst = { 2808c2ecf20Sopenharmony_ci /* Must start with EINTG banks, ordered by EINT group number. */ 2818c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTW(8, 0x000, "gpa0", 0x00), 2828c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTW(8, 0x020, "gpa1", 0x04), 2838c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTW(8, 0x040, "gpa2", 0x08), 2848c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTW(8, 0x060, "gpa3", 0x0c), 2858c2ecf20Sopenharmony_ci}; 2868c2ecf20Sopenharmony_ci 2878c2ecf20Sopenharmony_ci/* pin banks of exynos7 pin-controller - BUS0 */ 2888c2ecf20Sopenharmony_cistatic const struct samsung_pin_bank_data exynos7_pin_banks1[] __initconst = { 2898c2ecf20Sopenharmony_ci /* Must start with EINTG banks, ordered by EINT group number. */ 2908c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTG(5, 0x000, "gpb0", 0x00), 2918c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTG(8, 0x020, "gpc0", 0x04), 2928c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTG(2, 0x040, "gpc1", 0x08), 2938c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTG(6, 0x060, "gpc2", 0x0c), 2948c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTG(8, 0x080, "gpc3", 0x10), 2958c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTG(4, 0x0a0, "gpd0", 0x14), 2968c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTG(6, 0x0c0, "gpd1", 0x18), 2978c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTG(8, 0x0e0, "gpd2", 0x1c), 2988c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTG(5, 0x100, "gpd4", 0x20), 2998c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTG(4, 0x120, "gpd5", 0x24), 3008c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTG(6, 0x140, "gpd6", 0x28), 3018c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTG(3, 0x160, "gpd7", 0x2c), 3028c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTG(2, 0x180, "gpd8", 0x30), 3038c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTG(2, 0x1a0, "gpg0", 0x34), 3048c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTG(4, 0x1c0, "gpg3", 0x38), 3058c2ecf20Sopenharmony_ci}; 3068c2ecf20Sopenharmony_ci 3078c2ecf20Sopenharmony_ci/* pin banks of exynos7 pin-controller - NFC */ 3088c2ecf20Sopenharmony_cistatic const struct samsung_pin_bank_data exynos7_pin_banks2[] __initconst = { 3098c2ecf20Sopenharmony_ci /* Must start with EINTG banks, ordered by EINT group number. */ 3108c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTG(3, 0x000, "gpj0", 0x00), 3118c2ecf20Sopenharmony_ci}; 3128c2ecf20Sopenharmony_ci 3138c2ecf20Sopenharmony_ci/* pin banks of exynos7 pin-controller - TOUCH */ 3148c2ecf20Sopenharmony_cistatic const struct samsung_pin_bank_data exynos7_pin_banks3[] __initconst = { 3158c2ecf20Sopenharmony_ci /* Must start with EINTG banks, ordered by EINT group number. */ 3168c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTG(3, 0x000, "gpj1", 0x00), 3178c2ecf20Sopenharmony_ci}; 3188c2ecf20Sopenharmony_ci 3198c2ecf20Sopenharmony_ci/* pin banks of exynos7 pin-controller - FF */ 3208c2ecf20Sopenharmony_cistatic const struct samsung_pin_bank_data exynos7_pin_banks4[] __initconst = { 3218c2ecf20Sopenharmony_ci /* Must start with EINTG banks, ordered by EINT group number. */ 3228c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTG(4, 0x000, "gpg4", 0x00), 3238c2ecf20Sopenharmony_ci}; 3248c2ecf20Sopenharmony_ci 3258c2ecf20Sopenharmony_ci/* pin banks of exynos7 pin-controller - ESE */ 3268c2ecf20Sopenharmony_cistatic const struct samsung_pin_bank_data exynos7_pin_banks5[] __initconst = { 3278c2ecf20Sopenharmony_ci /* Must start with EINTG banks, ordered by EINT group number. */ 3288c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTG(5, 0x000, "gpv7", 0x00), 3298c2ecf20Sopenharmony_ci}; 3308c2ecf20Sopenharmony_ci 3318c2ecf20Sopenharmony_ci/* pin banks of exynos7 pin-controller - FSYS0 */ 3328c2ecf20Sopenharmony_cistatic const struct samsung_pin_bank_data exynos7_pin_banks6[] __initconst = { 3338c2ecf20Sopenharmony_ci /* Must start with EINTG banks, ordered by EINT group number. */ 3348c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTG(7, 0x000, "gpr4", 0x00), 3358c2ecf20Sopenharmony_ci}; 3368c2ecf20Sopenharmony_ci 3378c2ecf20Sopenharmony_ci/* pin banks of exynos7 pin-controller - FSYS1 */ 3388c2ecf20Sopenharmony_cistatic const struct samsung_pin_bank_data exynos7_pin_banks7[] __initconst = { 3398c2ecf20Sopenharmony_ci /* Must start with EINTG banks, ordered by EINT group number. */ 3408c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTG(4, 0x000, "gpr0", 0x00), 3418c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTG(8, 0x020, "gpr1", 0x04), 3428c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTG(5, 0x040, "gpr2", 0x08), 3438c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTG(8, 0x060, "gpr3", 0x0c), 3448c2ecf20Sopenharmony_ci}; 3458c2ecf20Sopenharmony_ci 3468c2ecf20Sopenharmony_ci/* pin banks of exynos7 pin-controller - BUS1 */ 3478c2ecf20Sopenharmony_cistatic const struct samsung_pin_bank_data exynos7_pin_banks8[] __initconst = { 3488c2ecf20Sopenharmony_ci /* Must start with EINTG banks, ordered by EINT group number. */ 3498c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTG(8, 0x020, "gpf0", 0x00), 3508c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTG(8, 0x040, "gpf1", 0x04), 3518c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTG(4, 0x060, "gpf2", 0x08), 3528c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTG(5, 0x080, "gpf3", 0x0c), 3538c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTG(8, 0x0a0, "gpf4", 0x10), 3548c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTG(8, 0x0c0, "gpf5", 0x14), 3558c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTG(5, 0x0e0, "gpg1", 0x18), 3568c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTG(5, 0x100, "gpg2", 0x1c), 3578c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTG(6, 0x120, "gph1", 0x20), 3588c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTG(3, 0x140, "gpv6", 0x24), 3598c2ecf20Sopenharmony_ci}; 3608c2ecf20Sopenharmony_ci 3618c2ecf20Sopenharmony_cistatic const struct samsung_pin_bank_data exynos7_pin_banks9[] __initconst = { 3628c2ecf20Sopenharmony_ci /* Must start with EINTG banks, ordered by EINT group number. */ 3638c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTG(7, 0x000, "gpz0", 0x00), 3648c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTG(4, 0x020, "gpz1", 0x04), 3658c2ecf20Sopenharmony_ci}; 3668c2ecf20Sopenharmony_ci 3678c2ecf20Sopenharmony_cistatic const struct samsung_pin_ctrl exynos7_pin_ctrl[] __initconst = { 3688c2ecf20Sopenharmony_ci { 3698c2ecf20Sopenharmony_ci /* pin-controller instance 0 Alive data */ 3708c2ecf20Sopenharmony_ci .pin_banks = exynos7_pin_banks0, 3718c2ecf20Sopenharmony_ci .nr_banks = ARRAY_SIZE(exynos7_pin_banks0), 3728c2ecf20Sopenharmony_ci .eint_wkup_init = exynos_eint_wkup_init, 3738c2ecf20Sopenharmony_ci }, { 3748c2ecf20Sopenharmony_ci /* pin-controller instance 1 BUS0 data */ 3758c2ecf20Sopenharmony_ci .pin_banks = exynos7_pin_banks1, 3768c2ecf20Sopenharmony_ci .nr_banks = ARRAY_SIZE(exynos7_pin_banks1), 3778c2ecf20Sopenharmony_ci .eint_gpio_init = exynos_eint_gpio_init, 3788c2ecf20Sopenharmony_ci }, { 3798c2ecf20Sopenharmony_ci /* pin-controller instance 2 NFC data */ 3808c2ecf20Sopenharmony_ci .pin_banks = exynos7_pin_banks2, 3818c2ecf20Sopenharmony_ci .nr_banks = ARRAY_SIZE(exynos7_pin_banks2), 3828c2ecf20Sopenharmony_ci .eint_gpio_init = exynos_eint_gpio_init, 3838c2ecf20Sopenharmony_ci }, { 3848c2ecf20Sopenharmony_ci /* pin-controller instance 3 TOUCH data */ 3858c2ecf20Sopenharmony_ci .pin_banks = exynos7_pin_banks3, 3868c2ecf20Sopenharmony_ci .nr_banks = ARRAY_SIZE(exynos7_pin_banks3), 3878c2ecf20Sopenharmony_ci .eint_gpio_init = exynos_eint_gpio_init, 3888c2ecf20Sopenharmony_ci }, { 3898c2ecf20Sopenharmony_ci /* pin-controller instance 4 FF data */ 3908c2ecf20Sopenharmony_ci .pin_banks = exynos7_pin_banks4, 3918c2ecf20Sopenharmony_ci .nr_banks = ARRAY_SIZE(exynos7_pin_banks4), 3928c2ecf20Sopenharmony_ci .eint_gpio_init = exynos_eint_gpio_init, 3938c2ecf20Sopenharmony_ci }, { 3948c2ecf20Sopenharmony_ci /* pin-controller instance 5 ESE data */ 3958c2ecf20Sopenharmony_ci .pin_banks = exynos7_pin_banks5, 3968c2ecf20Sopenharmony_ci .nr_banks = ARRAY_SIZE(exynos7_pin_banks5), 3978c2ecf20Sopenharmony_ci .eint_gpio_init = exynos_eint_gpio_init, 3988c2ecf20Sopenharmony_ci }, { 3998c2ecf20Sopenharmony_ci /* pin-controller instance 6 FSYS0 data */ 4008c2ecf20Sopenharmony_ci .pin_banks = exynos7_pin_banks6, 4018c2ecf20Sopenharmony_ci .nr_banks = ARRAY_SIZE(exynos7_pin_banks6), 4028c2ecf20Sopenharmony_ci .eint_gpio_init = exynos_eint_gpio_init, 4038c2ecf20Sopenharmony_ci }, { 4048c2ecf20Sopenharmony_ci /* pin-controller instance 7 FSYS1 data */ 4058c2ecf20Sopenharmony_ci .pin_banks = exynos7_pin_banks7, 4068c2ecf20Sopenharmony_ci .nr_banks = ARRAY_SIZE(exynos7_pin_banks7), 4078c2ecf20Sopenharmony_ci .eint_gpio_init = exynos_eint_gpio_init, 4088c2ecf20Sopenharmony_ci }, { 4098c2ecf20Sopenharmony_ci /* pin-controller instance 8 BUS1 data */ 4108c2ecf20Sopenharmony_ci .pin_banks = exynos7_pin_banks8, 4118c2ecf20Sopenharmony_ci .nr_banks = ARRAY_SIZE(exynos7_pin_banks8), 4128c2ecf20Sopenharmony_ci .eint_gpio_init = exynos_eint_gpio_init, 4138c2ecf20Sopenharmony_ci }, { 4148c2ecf20Sopenharmony_ci /* pin-controller instance 9 AUD data */ 4158c2ecf20Sopenharmony_ci .pin_banks = exynos7_pin_banks9, 4168c2ecf20Sopenharmony_ci .nr_banks = ARRAY_SIZE(exynos7_pin_banks9), 4178c2ecf20Sopenharmony_ci .eint_gpio_init = exynos_eint_gpio_init, 4188c2ecf20Sopenharmony_ci }, 4198c2ecf20Sopenharmony_ci}; 4208c2ecf20Sopenharmony_ci 4218c2ecf20Sopenharmony_ciconst struct samsung_pinctrl_of_match_data exynos7_of_data __initconst = { 4228c2ecf20Sopenharmony_ci .ctrl = exynos7_pin_ctrl, 4238c2ecf20Sopenharmony_ci .num_ctrl = ARRAY_SIZE(exynos7_pin_ctrl), 4248c2ecf20Sopenharmony_ci}; 425