18c2ecf20Sopenharmony_ci// SPDX-License-Identifier: GPL-2.0+ 28c2ecf20Sopenharmony_ci// 38c2ecf20Sopenharmony_ci// Exynos specific support for Samsung pinctrl/gpiolib driver with eint support. 48c2ecf20Sopenharmony_ci// 58c2ecf20Sopenharmony_ci// Copyright (c) 2012 Samsung Electronics Co., Ltd. 68c2ecf20Sopenharmony_ci// http://www.samsung.com 78c2ecf20Sopenharmony_ci// Copyright (c) 2012 Linaro Ltd 88c2ecf20Sopenharmony_ci// http://www.linaro.org 98c2ecf20Sopenharmony_ci// 108c2ecf20Sopenharmony_ci// Author: Thomas Abraham <thomas.ab@samsung.com> 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/device.h> 178c2ecf20Sopenharmony_ci#include <linux/of_address.h> 188c2ecf20Sopenharmony_ci#include <linux/slab.h> 198c2ecf20Sopenharmony_ci#include <linux/err.h> 208c2ecf20Sopenharmony_ci#include <linux/soc/samsung/exynos-regs-pmu.h> 218c2ecf20Sopenharmony_ci 228c2ecf20Sopenharmony_ci#include "pinctrl-samsung.h" 238c2ecf20Sopenharmony_ci#include "pinctrl-exynos.h" 248c2ecf20Sopenharmony_ci 258c2ecf20Sopenharmony_cistatic const struct samsung_pin_bank_type bank_type_off = { 268c2ecf20Sopenharmony_ci .fld_width = { 4, 1, 2, 2, 2, 2, }, 278c2ecf20Sopenharmony_ci .reg_offset = { 0x00, 0x04, 0x08, 0x0c, 0x10, 0x14, }, 288c2ecf20Sopenharmony_ci}; 298c2ecf20Sopenharmony_ci 308c2ecf20Sopenharmony_cistatic const struct samsung_pin_bank_type bank_type_alive = { 318c2ecf20Sopenharmony_ci .fld_width = { 4, 1, 2, 2, }, 328c2ecf20Sopenharmony_ci .reg_offset = { 0x00, 0x04, 0x08, 0x0c, }, 338c2ecf20Sopenharmony_ci}; 348c2ecf20Sopenharmony_ci 358c2ecf20Sopenharmony_ci/* Retention control for S5PV210 are located at the end of clock controller */ 368c2ecf20Sopenharmony_ci#define S5P_OTHERS 0xE000 378c2ecf20Sopenharmony_ci 388c2ecf20Sopenharmony_ci#define S5P_OTHERS_RET_IO (1 << 31) 398c2ecf20Sopenharmony_ci#define S5P_OTHERS_RET_CF (1 << 30) 408c2ecf20Sopenharmony_ci#define S5P_OTHERS_RET_MMC (1 << 29) 418c2ecf20Sopenharmony_ci#define S5P_OTHERS_RET_UART (1 << 28) 428c2ecf20Sopenharmony_ci 438c2ecf20Sopenharmony_cistatic void s5pv210_retention_disable(struct samsung_pinctrl_drv_data *drvdata) 448c2ecf20Sopenharmony_ci{ 458c2ecf20Sopenharmony_ci void __iomem *clk_base = (void __iomem *)drvdata->retention_ctrl->priv; 468c2ecf20Sopenharmony_ci u32 tmp; 478c2ecf20Sopenharmony_ci 488c2ecf20Sopenharmony_ci tmp = __raw_readl(clk_base + S5P_OTHERS); 498c2ecf20Sopenharmony_ci tmp |= (S5P_OTHERS_RET_IO | S5P_OTHERS_RET_CF | S5P_OTHERS_RET_MMC | 508c2ecf20Sopenharmony_ci S5P_OTHERS_RET_UART); 518c2ecf20Sopenharmony_ci __raw_writel(tmp, clk_base + S5P_OTHERS); 528c2ecf20Sopenharmony_ci} 538c2ecf20Sopenharmony_ci 548c2ecf20Sopenharmony_cistatic struct samsung_retention_ctrl * 558c2ecf20Sopenharmony_cis5pv210_retention_init(struct samsung_pinctrl_drv_data *drvdata, 568c2ecf20Sopenharmony_ci const struct samsung_retention_data *data) 578c2ecf20Sopenharmony_ci{ 588c2ecf20Sopenharmony_ci struct samsung_retention_ctrl *ctrl; 598c2ecf20Sopenharmony_ci struct device_node *np; 608c2ecf20Sopenharmony_ci void __iomem *clk_base; 618c2ecf20Sopenharmony_ci 628c2ecf20Sopenharmony_ci ctrl = devm_kzalloc(drvdata->dev, sizeof(*ctrl), GFP_KERNEL); 638c2ecf20Sopenharmony_ci if (!ctrl) 648c2ecf20Sopenharmony_ci return ERR_PTR(-ENOMEM); 658c2ecf20Sopenharmony_ci 668c2ecf20Sopenharmony_ci np = of_find_compatible_node(NULL, NULL, "samsung,s5pv210-clock"); 678c2ecf20Sopenharmony_ci if (!np) { 688c2ecf20Sopenharmony_ci pr_err("%s: failed to find clock controller DT node\n", 698c2ecf20Sopenharmony_ci __func__); 708c2ecf20Sopenharmony_ci return ERR_PTR(-ENODEV); 718c2ecf20Sopenharmony_ci } 728c2ecf20Sopenharmony_ci 738c2ecf20Sopenharmony_ci clk_base = of_iomap(np, 0); 748c2ecf20Sopenharmony_ci of_node_put(np); 758c2ecf20Sopenharmony_ci if (!clk_base) { 768c2ecf20Sopenharmony_ci pr_err("%s: failed to map clock registers\n", __func__); 778c2ecf20Sopenharmony_ci return ERR_PTR(-EINVAL); 788c2ecf20Sopenharmony_ci } 798c2ecf20Sopenharmony_ci 808c2ecf20Sopenharmony_ci ctrl->priv = (void __force *)clk_base; 818c2ecf20Sopenharmony_ci ctrl->disable = s5pv210_retention_disable; 828c2ecf20Sopenharmony_ci 838c2ecf20Sopenharmony_ci return ctrl; 848c2ecf20Sopenharmony_ci} 858c2ecf20Sopenharmony_ci 868c2ecf20Sopenharmony_cistatic const struct samsung_retention_data s5pv210_retention_data __initconst = { 878c2ecf20Sopenharmony_ci .init = s5pv210_retention_init, 888c2ecf20Sopenharmony_ci}; 898c2ecf20Sopenharmony_ci 908c2ecf20Sopenharmony_ci/* pin banks of s5pv210 pin-controller */ 918c2ecf20Sopenharmony_cistatic const struct samsung_pin_bank_data s5pv210_pin_bank[] __initconst = { 928c2ecf20Sopenharmony_ci /* Must start with EINTG banks, ordered by EINT group number. */ 938c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTG(8, 0x000, "gpa0", 0x00), 948c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTG(4, 0x020, "gpa1", 0x04), 958c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTG(8, 0x040, "gpb", 0x08), 968c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTG(5, 0x060, "gpc0", 0x0c), 978c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTG(5, 0x080, "gpc1", 0x10), 988c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTG(4, 0x0a0, "gpd0", 0x14), 998c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTG(6, 0x0c0, "gpd1", 0x18), 1008c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTG(8, 0x0e0, "gpe0", 0x1c), 1018c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTG(5, 0x100, "gpe1", 0x20), 1028c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTG(8, 0x120, "gpf0", 0x24), 1038c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTG(8, 0x140, "gpf1", 0x28), 1048c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTG(8, 0x160, "gpf2", 0x2c), 1058c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTG(6, 0x180, "gpf3", 0x30), 1068c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTG(7, 0x1a0, "gpg0", 0x34), 1078c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTG(7, 0x1c0, "gpg1", 0x38), 1088c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTG(7, 0x1e0, "gpg2", 0x3c), 1098c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTG(7, 0x200, "gpg3", 0x40), 1108c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTG(8, 0x240, "gpj0", 0x44), 1118c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTG(6, 0x260, "gpj1", 0x48), 1128c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTG(8, 0x280, "gpj2", 0x4c), 1138c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTG(8, 0x2a0, "gpj3", 0x50), 1148c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTG(5, 0x2c0, "gpj4", 0x54), 1158c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTN(7, 0x220, "gpi"), 1168c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTN(8, 0x2e0, "mp01"), 1178c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTN(4, 0x300, "mp02"), 1188c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTN(8, 0x320, "mp03"), 1198c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTN(8, 0x340, "mp04"), 1208c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTN(8, 0x360, "mp05"), 1218c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTN(8, 0x380, "mp06"), 1228c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTN(8, 0x3a0, "mp07"), 1238c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTW(8, 0xc00, "gph0", 0x00), 1248c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTW(8, 0xc20, "gph1", 0x04), 1258c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTW(8, 0xc40, "gph2", 0x08), 1268c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTW(8, 0xc60, "gph3", 0x0c), 1278c2ecf20Sopenharmony_ci}; 1288c2ecf20Sopenharmony_ci 1298c2ecf20Sopenharmony_cistatic const struct samsung_pin_ctrl s5pv210_pin_ctrl[] __initconst = { 1308c2ecf20Sopenharmony_ci { 1318c2ecf20Sopenharmony_ci /* pin-controller instance 0 data */ 1328c2ecf20Sopenharmony_ci .pin_banks = s5pv210_pin_bank, 1338c2ecf20Sopenharmony_ci .nr_banks = ARRAY_SIZE(s5pv210_pin_bank), 1348c2ecf20Sopenharmony_ci .eint_gpio_init = exynos_eint_gpio_init, 1358c2ecf20Sopenharmony_ci .eint_wkup_init = exynos_eint_wkup_init, 1368c2ecf20Sopenharmony_ci .suspend = exynos_pinctrl_suspend, 1378c2ecf20Sopenharmony_ci .resume = exynos_pinctrl_resume, 1388c2ecf20Sopenharmony_ci .retention_data = &s5pv210_retention_data, 1398c2ecf20Sopenharmony_ci }, 1408c2ecf20Sopenharmony_ci}; 1418c2ecf20Sopenharmony_ci 1428c2ecf20Sopenharmony_ciconst struct samsung_pinctrl_of_match_data s5pv210_of_data __initconst = { 1438c2ecf20Sopenharmony_ci .ctrl = s5pv210_pin_ctrl, 1448c2ecf20Sopenharmony_ci .num_ctrl = ARRAY_SIZE(s5pv210_pin_ctrl), 1458c2ecf20Sopenharmony_ci}; 1468c2ecf20Sopenharmony_ci 1478c2ecf20Sopenharmony_ci/* Pad retention control code for accessing PMU regmap */ 1488c2ecf20Sopenharmony_cistatic atomic_t exynos_shared_retention_refcnt; 1498c2ecf20Sopenharmony_ci 1508c2ecf20Sopenharmony_ci/* pin banks of exynos3250 pin-controller 0 */ 1518c2ecf20Sopenharmony_cistatic const struct samsung_pin_bank_data exynos3250_pin_banks0[] __initconst = { 1528c2ecf20Sopenharmony_ci /* Must start with EINTG banks, ordered by EINT group number. */ 1538c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTG(8, 0x000, "gpa0", 0x00), 1548c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTG(6, 0x020, "gpa1", 0x04), 1558c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTG(8, 0x040, "gpb", 0x08), 1568c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTG(5, 0x060, "gpc0", 0x0c), 1578c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTG(5, 0x080, "gpc1", 0x10), 1588c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTG(4, 0x0a0, "gpd0", 0x14), 1598c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTG(4, 0x0c0, "gpd1", 0x18), 1608c2ecf20Sopenharmony_ci}; 1618c2ecf20Sopenharmony_ci 1628c2ecf20Sopenharmony_ci/* pin banks of exynos3250 pin-controller 1 */ 1638c2ecf20Sopenharmony_cistatic const struct samsung_pin_bank_data exynos3250_pin_banks1[] __initconst = { 1648c2ecf20Sopenharmony_ci /* Must start with EINTG banks, ordered by EINT group number. */ 1658c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTN(8, 0x120, "gpe0"), 1668c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTN(8, 0x140, "gpe1"), 1678c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTN(3, 0x180, "gpe2"), 1688c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTG(8, 0x040, "gpk0", 0x08), 1698c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTG(7, 0x060, "gpk1", 0x0c), 1708c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTG(7, 0x080, "gpk2", 0x10), 1718c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTG(4, 0x0c0, "gpl0", 0x18), 1728c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTG(8, 0x260, "gpm0", 0x24), 1738c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTG(7, 0x280, "gpm1", 0x28), 1748c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTG(5, 0x2a0, "gpm2", 0x2c), 1758c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTG(8, 0x2c0, "gpm3", 0x30), 1768c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTG(8, 0x2e0, "gpm4", 0x34), 1778c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTW(8, 0xc00, "gpx0", 0x00), 1788c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTW(8, 0xc20, "gpx1", 0x04), 1798c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTW(8, 0xc40, "gpx2", 0x08), 1808c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTW(8, 0xc60, "gpx3", 0x0c), 1818c2ecf20Sopenharmony_ci}; 1828c2ecf20Sopenharmony_ci 1838c2ecf20Sopenharmony_ci/* 1848c2ecf20Sopenharmony_ci * PMU pad retention groups for Exynos3250 doesn't match pin banks, so handle 1858c2ecf20Sopenharmony_ci * them all together 1868c2ecf20Sopenharmony_ci */ 1878c2ecf20Sopenharmony_cistatic const u32 exynos3250_retention_regs[] = { 1888c2ecf20Sopenharmony_ci S5P_PAD_RET_MAUDIO_OPTION, 1898c2ecf20Sopenharmony_ci S5P_PAD_RET_GPIO_OPTION, 1908c2ecf20Sopenharmony_ci S5P_PAD_RET_UART_OPTION, 1918c2ecf20Sopenharmony_ci S5P_PAD_RET_MMCA_OPTION, 1928c2ecf20Sopenharmony_ci S5P_PAD_RET_MMCB_OPTION, 1938c2ecf20Sopenharmony_ci S5P_PAD_RET_EBIA_OPTION, 1948c2ecf20Sopenharmony_ci S5P_PAD_RET_EBIB_OPTION, 1958c2ecf20Sopenharmony_ci S5P_PAD_RET_MMC2_OPTION, 1968c2ecf20Sopenharmony_ci S5P_PAD_RET_SPI_OPTION, 1978c2ecf20Sopenharmony_ci}; 1988c2ecf20Sopenharmony_ci 1998c2ecf20Sopenharmony_cistatic const struct samsung_retention_data exynos3250_retention_data __initconst = { 2008c2ecf20Sopenharmony_ci .regs = exynos3250_retention_regs, 2018c2ecf20Sopenharmony_ci .nr_regs = ARRAY_SIZE(exynos3250_retention_regs), 2028c2ecf20Sopenharmony_ci .value = EXYNOS_WAKEUP_FROM_LOWPWR, 2038c2ecf20Sopenharmony_ci .refcnt = &exynos_shared_retention_refcnt, 2048c2ecf20Sopenharmony_ci .init = exynos_retention_init, 2058c2ecf20Sopenharmony_ci}; 2068c2ecf20Sopenharmony_ci 2078c2ecf20Sopenharmony_ci/* 2088c2ecf20Sopenharmony_ci * Samsung pinctrl driver data for Exynos3250 SoC. Exynos3250 SoC includes 2098c2ecf20Sopenharmony_ci * two gpio/pin-mux/pinconfig controllers. 2108c2ecf20Sopenharmony_ci */ 2118c2ecf20Sopenharmony_cistatic const struct samsung_pin_ctrl exynos3250_pin_ctrl[] __initconst = { 2128c2ecf20Sopenharmony_ci { 2138c2ecf20Sopenharmony_ci /* pin-controller instance 0 data */ 2148c2ecf20Sopenharmony_ci .pin_banks = exynos3250_pin_banks0, 2158c2ecf20Sopenharmony_ci .nr_banks = ARRAY_SIZE(exynos3250_pin_banks0), 2168c2ecf20Sopenharmony_ci .eint_gpio_init = exynos_eint_gpio_init, 2178c2ecf20Sopenharmony_ci .suspend = exynos_pinctrl_suspend, 2188c2ecf20Sopenharmony_ci .resume = exynos_pinctrl_resume, 2198c2ecf20Sopenharmony_ci .retention_data = &exynos3250_retention_data, 2208c2ecf20Sopenharmony_ci }, { 2218c2ecf20Sopenharmony_ci /* pin-controller instance 1 data */ 2228c2ecf20Sopenharmony_ci .pin_banks = exynos3250_pin_banks1, 2238c2ecf20Sopenharmony_ci .nr_banks = ARRAY_SIZE(exynos3250_pin_banks1), 2248c2ecf20Sopenharmony_ci .eint_gpio_init = exynos_eint_gpio_init, 2258c2ecf20Sopenharmony_ci .eint_wkup_init = exynos_eint_wkup_init, 2268c2ecf20Sopenharmony_ci .suspend = exynos_pinctrl_suspend, 2278c2ecf20Sopenharmony_ci .resume = exynos_pinctrl_resume, 2288c2ecf20Sopenharmony_ci .retention_data = &exynos3250_retention_data, 2298c2ecf20Sopenharmony_ci }, 2308c2ecf20Sopenharmony_ci}; 2318c2ecf20Sopenharmony_ci 2328c2ecf20Sopenharmony_ciconst struct samsung_pinctrl_of_match_data exynos3250_of_data __initconst = { 2338c2ecf20Sopenharmony_ci .ctrl = exynos3250_pin_ctrl, 2348c2ecf20Sopenharmony_ci .num_ctrl = ARRAY_SIZE(exynos3250_pin_ctrl), 2358c2ecf20Sopenharmony_ci}; 2368c2ecf20Sopenharmony_ci 2378c2ecf20Sopenharmony_ci/* pin banks of exynos4210 pin-controller 0 */ 2388c2ecf20Sopenharmony_cistatic const struct samsung_pin_bank_data exynos4210_pin_banks0[] __initconst = { 2398c2ecf20Sopenharmony_ci /* Must start with EINTG banks, ordered by EINT group number. */ 2408c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTG(8, 0x000, "gpa0", 0x00), 2418c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTG(6, 0x020, "gpa1", 0x04), 2428c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTG(8, 0x040, "gpb", 0x08), 2438c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTG(5, 0x060, "gpc0", 0x0c), 2448c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTG(5, 0x080, "gpc1", 0x10), 2458c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTG(4, 0x0A0, "gpd0", 0x14), 2468c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTG(4, 0x0C0, "gpd1", 0x18), 2478c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTG(5, 0x0E0, "gpe0", 0x1c), 2488c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTG(8, 0x100, "gpe1", 0x20), 2498c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTG(6, 0x120, "gpe2", 0x24), 2508c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTG(8, 0x140, "gpe3", 0x28), 2518c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTG(8, 0x160, "gpe4", 0x2c), 2528c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTG(8, 0x180, "gpf0", 0x30), 2538c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTG(8, 0x1A0, "gpf1", 0x34), 2548c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTG(8, 0x1C0, "gpf2", 0x38), 2558c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTG(6, 0x1E0, "gpf3", 0x3c), 2568c2ecf20Sopenharmony_ci}; 2578c2ecf20Sopenharmony_ci 2588c2ecf20Sopenharmony_ci/* pin banks of exynos4210 pin-controller 1 */ 2598c2ecf20Sopenharmony_cistatic const struct samsung_pin_bank_data exynos4210_pin_banks1[] __initconst = { 2608c2ecf20Sopenharmony_ci /* Must start with EINTG banks, ordered by EINT group number. */ 2618c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTG(8, 0x000, "gpj0", 0x00), 2628c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTG(5, 0x020, "gpj1", 0x04), 2638c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTG(7, 0x040, "gpk0", 0x08), 2648c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTG(7, 0x060, "gpk1", 0x0c), 2658c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTG(7, 0x080, "gpk2", 0x10), 2668c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTG(7, 0x0A0, "gpk3", 0x14), 2678c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTG(8, 0x0C0, "gpl0", 0x18), 2688c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTG(3, 0x0E0, "gpl1", 0x1c), 2698c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTG(8, 0x100, "gpl2", 0x20), 2708c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTN(6, 0x120, "gpy0"), 2718c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTN(4, 0x140, "gpy1"), 2728c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTN(6, 0x160, "gpy2"), 2738c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTN(8, 0x180, "gpy3"), 2748c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTN(8, 0x1A0, "gpy4"), 2758c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTN(8, 0x1C0, "gpy5"), 2768c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTN(8, 0x1E0, "gpy6"), 2778c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTW(8, 0xC00, "gpx0", 0x00), 2788c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTW(8, 0xC20, "gpx1", 0x04), 2798c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTW(8, 0xC40, "gpx2", 0x08), 2808c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTW(8, 0xC60, "gpx3", 0x0c), 2818c2ecf20Sopenharmony_ci}; 2828c2ecf20Sopenharmony_ci 2838c2ecf20Sopenharmony_ci/* pin banks of exynos4210 pin-controller 2 */ 2848c2ecf20Sopenharmony_cistatic const struct samsung_pin_bank_data exynos4210_pin_banks2[] __initconst = { 2858c2ecf20Sopenharmony_ci /* Must start with EINTG banks, ordered by EINT group number. */ 2868c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTN(7, 0x000, "gpz"), 2878c2ecf20Sopenharmony_ci}; 2888c2ecf20Sopenharmony_ci 2898c2ecf20Sopenharmony_ci/* PMU pad retention groups registers for Exynos4 (without audio) */ 2908c2ecf20Sopenharmony_cistatic const u32 exynos4_retention_regs[] = { 2918c2ecf20Sopenharmony_ci S5P_PAD_RET_GPIO_OPTION, 2928c2ecf20Sopenharmony_ci S5P_PAD_RET_UART_OPTION, 2938c2ecf20Sopenharmony_ci S5P_PAD_RET_MMCA_OPTION, 2948c2ecf20Sopenharmony_ci S5P_PAD_RET_MMCB_OPTION, 2958c2ecf20Sopenharmony_ci S5P_PAD_RET_EBIA_OPTION, 2968c2ecf20Sopenharmony_ci S5P_PAD_RET_EBIB_OPTION, 2978c2ecf20Sopenharmony_ci}; 2988c2ecf20Sopenharmony_ci 2998c2ecf20Sopenharmony_cistatic const struct samsung_retention_data exynos4_retention_data __initconst = { 3008c2ecf20Sopenharmony_ci .regs = exynos4_retention_regs, 3018c2ecf20Sopenharmony_ci .nr_regs = ARRAY_SIZE(exynos4_retention_regs), 3028c2ecf20Sopenharmony_ci .value = EXYNOS_WAKEUP_FROM_LOWPWR, 3038c2ecf20Sopenharmony_ci .refcnt = &exynos_shared_retention_refcnt, 3048c2ecf20Sopenharmony_ci .init = exynos_retention_init, 3058c2ecf20Sopenharmony_ci}; 3068c2ecf20Sopenharmony_ci 3078c2ecf20Sopenharmony_ci/* PMU retention control for audio pins can be tied to audio pin bank */ 3088c2ecf20Sopenharmony_cistatic const u32 exynos4_audio_retention_regs[] = { 3098c2ecf20Sopenharmony_ci S5P_PAD_RET_MAUDIO_OPTION, 3108c2ecf20Sopenharmony_ci}; 3118c2ecf20Sopenharmony_ci 3128c2ecf20Sopenharmony_cistatic const struct samsung_retention_data exynos4_audio_retention_data __initconst = { 3138c2ecf20Sopenharmony_ci .regs = exynos4_audio_retention_regs, 3148c2ecf20Sopenharmony_ci .nr_regs = ARRAY_SIZE(exynos4_audio_retention_regs), 3158c2ecf20Sopenharmony_ci .value = EXYNOS_WAKEUP_FROM_LOWPWR, 3168c2ecf20Sopenharmony_ci .init = exynos_retention_init, 3178c2ecf20Sopenharmony_ci}; 3188c2ecf20Sopenharmony_ci 3198c2ecf20Sopenharmony_ci/* 3208c2ecf20Sopenharmony_ci * Samsung pinctrl driver data for Exynos4210 SoC. Exynos4210 SoC includes 3218c2ecf20Sopenharmony_ci * three gpio/pin-mux/pinconfig controllers. 3228c2ecf20Sopenharmony_ci */ 3238c2ecf20Sopenharmony_cistatic const struct samsung_pin_ctrl exynos4210_pin_ctrl[] __initconst = { 3248c2ecf20Sopenharmony_ci { 3258c2ecf20Sopenharmony_ci /* pin-controller instance 0 data */ 3268c2ecf20Sopenharmony_ci .pin_banks = exynos4210_pin_banks0, 3278c2ecf20Sopenharmony_ci .nr_banks = ARRAY_SIZE(exynos4210_pin_banks0), 3288c2ecf20Sopenharmony_ci .eint_gpio_init = exynos_eint_gpio_init, 3298c2ecf20Sopenharmony_ci .suspend = exynos_pinctrl_suspend, 3308c2ecf20Sopenharmony_ci .resume = exynos_pinctrl_resume, 3318c2ecf20Sopenharmony_ci .retention_data = &exynos4_retention_data, 3328c2ecf20Sopenharmony_ci }, { 3338c2ecf20Sopenharmony_ci /* pin-controller instance 1 data */ 3348c2ecf20Sopenharmony_ci .pin_banks = exynos4210_pin_banks1, 3358c2ecf20Sopenharmony_ci .nr_banks = ARRAY_SIZE(exynos4210_pin_banks1), 3368c2ecf20Sopenharmony_ci .eint_gpio_init = exynos_eint_gpio_init, 3378c2ecf20Sopenharmony_ci .eint_wkup_init = exynos_eint_wkup_init, 3388c2ecf20Sopenharmony_ci .suspend = exynos_pinctrl_suspend, 3398c2ecf20Sopenharmony_ci .resume = exynos_pinctrl_resume, 3408c2ecf20Sopenharmony_ci .retention_data = &exynos4_retention_data, 3418c2ecf20Sopenharmony_ci }, { 3428c2ecf20Sopenharmony_ci /* pin-controller instance 2 data */ 3438c2ecf20Sopenharmony_ci .pin_banks = exynos4210_pin_banks2, 3448c2ecf20Sopenharmony_ci .nr_banks = ARRAY_SIZE(exynos4210_pin_banks2), 3458c2ecf20Sopenharmony_ci .retention_data = &exynos4_audio_retention_data, 3468c2ecf20Sopenharmony_ci }, 3478c2ecf20Sopenharmony_ci}; 3488c2ecf20Sopenharmony_ci 3498c2ecf20Sopenharmony_ciconst struct samsung_pinctrl_of_match_data exynos4210_of_data __initconst = { 3508c2ecf20Sopenharmony_ci .ctrl = exynos4210_pin_ctrl, 3518c2ecf20Sopenharmony_ci .num_ctrl = ARRAY_SIZE(exynos4210_pin_ctrl), 3528c2ecf20Sopenharmony_ci}; 3538c2ecf20Sopenharmony_ci 3548c2ecf20Sopenharmony_ci/* pin banks of exynos4x12 pin-controller 0 */ 3558c2ecf20Sopenharmony_cistatic const struct samsung_pin_bank_data exynos4x12_pin_banks0[] __initconst = { 3568c2ecf20Sopenharmony_ci /* Must start with EINTG banks, ordered by EINT group number. */ 3578c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTG(8, 0x000, "gpa0", 0x00), 3588c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTG(6, 0x020, "gpa1", 0x04), 3598c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTG(8, 0x040, "gpb", 0x08), 3608c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTG(5, 0x060, "gpc0", 0x0c), 3618c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTG(5, 0x080, "gpc1", 0x10), 3628c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTG(4, 0x0A0, "gpd0", 0x14), 3638c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTG(4, 0x0C0, "gpd1", 0x18), 3648c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTG(8, 0x180, "gpf0", 0x30), 3658c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTG(8, 0x1A0, "gpf1", 0x34), 3668c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTG(8, 0x1C0, "gpf2", 0x38), 3678c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTG(6, 0x1E0, "gpf3", 0x3c), 3688c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTG(8, 0x240, "gpj0", 0x40), 3698c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTG(5, 0x260, "gpj1", 0x44), 3708c2ecf20Sopenharmony_ci}; 3718c2ecf20Sopenharmony_ci 3728c2ecf20Sopenharmony_ci/* pin banks of exynos4x12 pin-controller 1 */ 3738c2ecf20Sopenharmony_cistatic const struct samsung_pin_bank_data exynos4x12_pin_banks1[] __initconst = { 3748c2ecf20Sopenharmony_ci /* Must start with EINTG banks, ordered by EINT group number. */ 3758c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTG(7, 0x040, "gpk0", 0x08), 3768c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTG(7, 0x060, "gpk1", 0x0c), 3778c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTG(7, 0x080, "gpk2", 0x10), 3788c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTG(7, 0x0A0, "gpk3", 0x14), 3798c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTG(7, 0x0C0, "gpl0", 0x18), 3808c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTG(2, 0x0E0, "gpl1", 0x1c), 3818c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTG(8, 0x100, "gpl2", 0x20), 3828c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTG(8, 0x260, "gpm0", 0x24), 3838c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTG(7, 0x280, "gpm1", 0x28), 3848c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTG(5, 0x2A0, "gpm2", 0x2c), 3858c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTG(8, 0x2C0, "gpm3", 0x30), 3868c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTG(8, 0x2E0, "gpm4", 0x34), 3878c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTN(6, 0x120, "gpy0"), 3888c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTN(4, 0x140, "gpy1"), 3898c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTN(6, 0x160, "gpy2"), 3908c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTN(8, 0x180, "gpy3"), 3918c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTN(8, 0x1A0, "gpy4"), 3928c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTN(8, 0x1C0, "gpy5"), 3938c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTN(8, 0x1E0, "gpy6"), 3948c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTW(8, 0xC00, "gpx0", 0x00), 3958c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTW(8, 0xC20, "gpx1", 0x04), 3968c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTW(8, 0xC40, "gpx2", 0x08), 3978c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTW(8, 0xC60, "gpx3", 0x0c), 3988c2ecf20Sopenharmony_ci}; 3998c2ecf20Sopenharmony_ci 4008c2ecf20Sopenharmony_ci/* pin banks of exynos4x12 pin-controller 2 */ 4018c2ecf20Sopenharmony_cistatic const struct samsung_pin_bank_data exynos4x12_pin_banks2[] __initconst = { 4028c2ecf20Sopenharmony_ci /* Must start with EINTG banks, ordered by EINT group number. */ 4038c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTG(7, 0x000, "gpz", 0x00), 4048c2ecf20Sopenharmony_ci}; 4058c2ecf20Sopenharmony_ci 4068c2ecf20Sopenharmony_ci/* pin banks of exynos4x12 pin-controller 3 */ 4078c2ecf20Sopenharmony_cistatic const struct samsung_pin_bank_data exynos4x12_pin_banks3[] __initconst = { 4088c2ecf20Sopenharmony_ci /* Must start with EINTG banks, ordered by EINT group number. */ 4098c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTG(8, 0x000, "gpv0", 0x00), 4108c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTG(8, 0x020, "gpv1", 0x04), 4118c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTG(8, 0x040, "gpv2", 0x08), 4128c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTG(8, 0x060, "gpv3", 0x0c), 4138c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTG(2, 0x080, "gpv4", 0x10), 4148c2ecf20Sopenharmony_ci}; 4158c2ecf20Sopenharmony_ci 4168c2ecf20Sopenharmony_ci/* 4178c2ecf20Sopenharmony_ci * Samsung pinctrl driver data for Exynos4x12 SoC. Exynos4x12 SoC includes 4188c2ecf20Sopenharmony_ci * four gpio/pin-mux/pinconfig controllers. 4198c2ecf20Sopenharmony_ci */ 4208c2ecf20Sopenharmony_cistatic const struct samsung_pin_ctrl exynos4x12_pin_ctrl[] __initconst = { 4218c2ecf20Sopenharmony_ci { 4228c2ecf20Sopenharmony_ci /* pin-controller instance 0 data */ 4238c2ecf20Sopenharmony_ci .pin_banks = exynos4x12_pin_banks0, 4248c2ecf20Sopenharmony_ci .nr_banks = ARRAY_SIZE(exynos4x12_pin_banks0), 4258c2ecf20Sopenharmony_ci .eint_gpio_init = exynos_eint_gpio_init, 4268c2ecf20Sopenharmony_ci .suspend = exynos_pinctrl_suspend, 4278c2ecf20Sopenharmony_ci .resume = exynos_pinctrl_resume, 4288c2ecf20Sopenharmony_ci .retention_data = &exynos4_retention_data, 4298c2ecf20Sopenharmony_ci }, { 4308c2ecf20Sopenharmony_ci /* pin-controller instance 1 data */ 4318c2ecf20Sopenharmony_ci .pin_banks = exynos4x12_pin_banks1, 4328c2ecf20Sopenharmony_ci .nr_banks = ARRAY_SIZE(exynos4x12_pin_banks1), 4338c2ecf20Sopenharmony_ci .eint_gpio_init = exynos_eint_gpio_init, 4348c2ecf20Sopenharmony_ci .eint_wkup_init = exynos_eint_wkup_init, 4358c2ecf20Sopenharmony_ci .suspend = exynos_pinctrl_suspend, 4368c2ecf20Sopenharmony_ci .resume = exynos_pinctrl_resume, 4378c2ecf20Sopenharmony_ci .retention_data = &exynos4_retention_data, 4388c2ecf20Sopenharmony_ci }, { 4398c2ecf20Sopenharmony_ci /* pin-controller instance 2 data */ 4408c2ecf20Sopenharmony_ci .pin_banks = exynos4x12_pin_banks2, 4418c2ecf20Sopenharmony_ci .nr_banks = ARRAY_SIZE(exynos4x12_pin_banks2), 4428c2ecf20Sopenharmony_ci .eint_gpio_init = exynos_eint_gpio_init, 4438c2ecf20Sopenharmony_ci .suspend = exynos_pinctrl_suspend, 4448c2ecf20Sopenharmony_ci .resume = exynos_pinctrl_resume, 4458c2ecf20Sopenharmony_ci .retention_data = &exynos4_audio_retention_data, 4468c2ecf20Sopenharmony_ci }, { 4478c2ecf20Sopenharmony_ci /* pin-controller instance 3 data */ 4488c2ecf20Sopenharmony_ci .pin_banks = exynos4x12_pin_banks3, 4498c2ecf20Sopenharmony_ci .nr_banks = ARRAY_SIZE(exynos4x12_pin_banks3), 4508c2ecf20Sopenharmony_ci .eint_gpio_init = exynos_eint_gpio_init, 4518c2ecf20Sopenharmony_ci .suspend = exynos_pinctrl_suspend, 4528c2ecf20Sopenharmony_ci .resume = exynos_pinctrl_resume, 4538c2ecf20Sopenharmony_ci }, 4548c2ecf20Sopenharmony_ci}; 4558c2ecf20Sopenharmony_ci 4568c2ecf20Sopenharmony_ciconst struct samsung_pinctrl_of_match_data exynos4x12_of_data __initconst = { 4578c2ecf20Sopenharmony_ci .ctrl = exynos4x12_pin_ctrl, 4588c2ecf20Sopenharmony_ci .num_ctrl = ARRAY_SIZE(exynos4x12_pin_ctrl), 4598c2ecf20Sopenharmony_ci}; 4608c2ecf20Sopenharmony_ci 4618c2ecf20Sopenharmony_ci/* pin banks of exynos5250 pin-controller 0 */ 4628c2ecf20Sopenharmony_cistatic const struct samsung_pin_bank_data exynos5250_pin_banks0[] __initconst = { 4638c2ecf20Sopenharmony_ci /* Must start with EINTG banks, ordered by EINT group number. */ 4648c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTG(8, 0x000, "gpa0", 0x00), 4658c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTG(6, 0x020, "gpa1", 0x04), 4668c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTG(8, 0x040, "gpa2", 0x08), 4678c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTG(5, 0x060, "gpb0", 0x0c), 4688c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTG(5, 0x080, "gpb1", 0x10), 4698c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTG(4, 0x0A0, "gpb2", 0x14), 4708c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTG(4, 0x0C0, "gpb3", 0x18), 4718c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTG(7, 0x0E0, "gpc0", 0x1c), 4728c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTG(4, 0x100, "gpc1", 0x20), 4738c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTG(7, 0x120, "gpc2", 0x24), 4748c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTG(7, 0x140, "gpc3", 0x28), 4758c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTG(4, 0x160, "gpd0", 0x2c), 4768c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTG(8, 0x180, "gpd1", 0x30), 4778c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTG(7, 0x2E0, "gpc4", 0x34), 4788c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTN(6, 0x1A0, "gpy0"), 4798c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTN(4, 0x1C0, "gpy1"), 4808c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTN(6, 0x1E0, "gpy2"), 4818c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTN(8, 0x200, "gpy3"), 4828c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTN(8, 0x220, "gpy4"), 4838c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTN(8, 0x240, "gpy5"), 4848c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTN(8, 0x260, "gpy6"), 4858c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTW(8, 0xC00, "gpx0", 0x00), 4868c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTW(8, 0xC20, "gpx1", 0x04), 4878c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTW(8, 0xC40, "gpx2", 0x08), 4888c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTW(8, 0xC60, "gpx3", 0x0c), 4898c2ecf20Sopenharmony_ci}; 4908c2ecf20Sopenharmony_ci 4918c2ecf20Sopenharmony_ci/* pin banks of exynos5250 pin-controller 1 */ 4928c2ecf20Sopenharmony_cistatic const struct samsung_pin_bank_data exynos5250_pin_banks1[] __initconst = { 4938c2ecf20Sopenharmony_ci /* Must start with EINTG banks, ordered by EINT group number. */ 4948c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTG(8, 0x000, "gpe0", 0x00), 4958c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTG(2, 0x020, "gpe1", 0x04), 4968c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTG(4, 0x040, "gpf0", 0x08), 4978c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTG(4, 0x060, "gpf1", 0x0c), 4988c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTG(8, 0x080, "gpg0", 0x10), 4998c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTG(8, 0x0A0, "gpg1", 0x14), 5008c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTG(2, 0x0C0, "gpg2", 0x18), 5018c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTG(4, 0x0E0, "gph0", 0x1c), 5028c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTG(8, 0x100, "gph1", 0x20), 5038c2ecf20Sopenharmony_ci}; 5048c2ecf20Sopenharmony_ci 5058c2ecf20Sopenharmony_ci/* pin banks of exynos5250 pin-controller 2 */ 5068c2ecf20Sopenharmony_cistatic const struct samsung_pin_bank_data exynos5250_pin_banks2[] __initconst = { 5078c2ecf20Sopenharmony_ci /* Must start with EINTG banks, ordered by EINT group number. */ 5088c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTG(8, 0x000, "gpv0", 0x00), 5098c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTG(8, 0x020, "gpv1", 0x04), 5108c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTG(8, 0x060, "gpv2", 0x08), 5118c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTG(8, 0x080, "gpv3", 0x0c), 5128c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTG(2, 0x0C0, "gpv4", 0x10), 5138c2ecf20Sopenharmony_ci}; 5148c2ecf20Sopenharmony_ci 5158c2ecf20Sopenharmony_ci/* pin banks of exynos5250 pin-controller 3 */ 5168c2ecf20Sopenharmony_cistatic const struct samsung_pin_bank_data exynos5250_pin_banks3[] __initconst = { 5178c2ecf20Sopenharmony_ci /* Must start with EINTG banks, ordered by EINT group number. */ 5188c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTG(7, 0x000, "gpz", 0x00), 5198c2ecf20Sopenharmony_ci}; 5208c2ecf20Sopenharmony_ci 5218c2ecf20Sopenharmony_ci/* 5228c2ecf20Sopenharmony_ci * Samsung pinctrl driver data for Exynos5250 SoC. Exynos5250 SoC includes 5238c2ecf20Sopenharmony_ci * four gpio/pin-mux/pinconfig controllers. 5248c2ecf20Sopenharmony_ci */ 5258c2ecf20Sopenharmony_cistatic const struct samsung_pin_ctrl exynos5250_pin_ctrl[] __initconst = { 5268c2ecf20Sopenharmony_ci { 5278c2ecf20Sopenharmony_ci /* pin-controller instance 0 data */ 5288c2ecf20Sopenharmony_ci .pin_banks = exynos5250_pin_banks0, 5298c2ecf20Sopenharmony_ci .nr_banks = ARRAY_SIZE(exynos5250_pin_banks0), 5308c2ecf20Sopenharmony_ci .eint_gpio_init = exynos_eint_gpio_init, 5318c2ecf20Sopenharmony_ci .eint_wkup_init = exynos_eint_wkup_init, 5328c2ecf20Sopenharmony_ci .suspend = exynos_pinctrl_suspend, 5338c2ecf20Sopenharmony_ci .resume = exynos_pinctrl_resume, 5348c2ecf20Sopenharmony_ci .retention_data = &exynos4_retention_data, 5358c2ecf20Sopenharmony_ci }, { 5368c2ecf20Sopenharmony_ci /* pin-controller instance 1 data */ 5378c2ecf20Sopenharmony_ci .pin_banks = exynos5250_pin_banks1, 5388c2ecf20Sopenharmony_ci .nr_banks = ARRAY_SIZE(exynos5250_pin_banks1), 5398c2ecf20Sopenharmony_ci .eint_gpio_init = exynos_eint_gpio_init, 5408c2ecf20Sopenharmony_ci .suspend = exynos_pinctrl_suspend, 5418c2ecf20Sopenharmony_ci .resume = exynos_pinctrl_resume, 5428c2ecf20Sopenharmony_ci .retention_data = &exynos4_retention_data, 5438c2ecf20Sopenharmony_ci }, { 5448c2ecf20Sopenharmony_ci /* pin-controller instance 2 data */ 5458c2ecf20Sopenharmony_ci .pin_banks = exynos5250_pin_banks2, 5468c2ecf20Sopenharmony_ci .nr_banks = ARRAY_SIZE(exynos5250_pin_banks2), 5478c2ecf20Sopenharmony_ci .eint_gpio_init = exynos_eint_gpio_init, 5488c2ecf20Sopenharmony_ci .suspend = exynos_pinctrl_suspend, 5498c2ecf20Sopenharmony_ci .resume = exynos_pinctrl_resume, 5508c2ecf20Sopenharmony_ci }, { 5518c2ecf20Sopenharmony_ci /* pin-controller instance 3 data */ 5528c2ecf20Sopenharmony_ci .pin_banks = exynos5250_pin_banks3, 5538c2ecf20Sopenharmony_ci .nr_banks = ARRAY_SIZE(exynos5250_pin_banks3), 5548c2ecf20Sopenharmony_ci .eint_gpio_init = exynos_eint_gpio_init, 5558c2ecf20Sopenharmony_ci .suspend = exynos_pinctrl_suspend, 5568c2ecf20Sopenharmony_ci .resume = exynos_pinctrl_resume, 5578c2ecf20Sopenharmony_ci .retention_data = &exynos4_audio_retention_data, 5588c2ecf20Sopenharmony_ci }, 5598c2ecf20Sopenharmony_ci}; 5608c2ecf20Sopenharmony_ci 5618c2ecf20Sopenharmony_ciconst struct samsung_pinctrl_of_match_data exynos5250_of_data __initconst = { 5628c2ecf20Sopenharmony_ci .ctrl = exynos5250_pin_ctrl, 5638c2ecf20Sopenharmony_ci .num_ctrl = ARRAY_SIZE(exynos5250_pin_ctrl), 5648c2ecf20Sopenharmony_ci}; 5658c2ecf20Sopenharmony_ci 5668c2ecf20Sopenharmony_ci/* pin banks of exynos5260 pin-controller 0 */ 5678c2ecf20Sopenharmony_cistatic const struct samsung_pin_bank_data exynos5260_pin_banks0[] __initconst = { 5688c2ecf20Sopenharmony_ci /* Must start with EINTG banks, ordered by EINT group number. */ 5698c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTG(4, 0x000, "gpa0", 0x00), 5708c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTG(7, 0x020, "gpa1", 0x04), 5718c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTG(8, 0x040, "gpa2", 0x08), 5728c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTG(5, 0x060, "gpb0", 0x0c), 5738c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTG(4, 0x080, "gpb1", 0x10), 5748c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTG(5, 0x0a0, "gpb2", 0x14), 5758c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTG(8, 0x0c0, "gpb3", 0x18), 5768c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTG(8, 0x0e0, "gpb4", 0x1c), 5778c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTG(8, 0x100, "gpb5", 0x20), 5788c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTG(8, 0x120, "gpd0", 0x24), 5798c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTG(7, 0x140, "gpd1", 0x28), 5808c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTG(5, 0x160, "gpd2", 0x2c), 5818c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTG(8, 0x180, "gpe0", 0x30), 5828c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTG(5, 0x1a0, "gpe1", 0x34), 5838c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTG(4, 0x1c0, "gpf0", 0x38), 5848c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTG(8, 0x1e0, "gpf1", 0x3c), 5858c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTG(2, 0x200, "gpk0", 0x40), 5868c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTW(8, 0xc00, "gpx0", 0x00), 5878c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTW(8, 0xc20, "gpx1", 0x04), 5888c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTW(8, 0xc40, "gpx2", 0x08), 5898c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTW(8, 0xc60, "gpx3", 0x0c), 5908c2ecf20Sopenharmony_ci}; 5918c2ecf20Sopenharmony_ci 5928c2ecf20Sopenharmony_ci/* pin banks of exynos5260 pin-controller 1 */ 5938c2ecf20Sopenharmony_cistatic const struct samsung_pin_bank_data exynos5260_pin_banks1[] __initconst = { 5948c2ecf20Sopenharmony_ci /* Must start with EINTG banks, ordered by EINT group number. */ 5958c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTG(7, 0x000, "gpc0", 0x00), 5968c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTG(6, 0x020, "gpc1", 0x04), 5978c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTG(7, 0x040, "gpc2", 0x08), 5988c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTG(4, 0x060, "gpc3", 0x0c), 5998c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTG(4, 0x080, "gpc4", 0x10), 6008c2ecf20Sopenharmony_ci}; 6018c2ecf20Sopenharmony_ci 6028c2ecf20Sopenharmony_ci/* pin banks of exynos5260 pin-controller 2 */ 6038c2ecf20Sopenharmony_cistatic const struct samsung_pin_bank_data exynos5260_pin_banks2[] __initconst = { 6048c2ecf20Sopenharmony_ci /* Must start with EINTG banks, ordered by EINT group number. */ 6058c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTG(7, 0x000, "gpz0", 0x00), 6068c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTG(4, 0x020, "gpz1", 0x04), 6078c2ecf20Sopenharmony_ci}; 6088c2ecf20Sopenharmony_ci 6098c2ecf20Sopenharmony_ci/* 6108c2ecf20Sopenharmony_ci * Samsung pinctrl driver data for Exynos5260 SoC. Exynos5260 SoC includes 6118c2ecf20Sopenharmony_ci * three gpio/pin-mux/pinconfig controllers. 6128c2ecf20Sopenharmony_ci */ 6138c2ecf20Sopenharmony_cistatic const struct samsung_pin_ctrl exynos5260_pin_ctrl[] __initconst = { 6148c2ecf20Sopenharmony_ci { 6158c2ecf20Sopenharmony_ci /* pin-controller instance 0 data */ 6168c2ecf20Sopenharmony_ci .pin_banks = exynos5260_pin_banks0, 6178c2ecf20Sopenharmony_ci .nr_banks = ARRAY_SIZE(exynos5260_pin_banks0), 6188c2ecf20Sopenharmony_ci .eint_gpio_init = exynos_eint_gpio_init, 6198c2ecf20Sopenharmony_ci .eint_wkup_init = exynos_eint_wkup_init, 6208c2ecf20Sopenharmony_ci .suspend = exynos_pinctrl_suspend, 6218c2ecf20Sopenharmony_ci .resume = exynos_pinctrl_resume, 6228c2ecf20Sopenharmony_ci }, { 6238c2ecf20Sopenharmony_ci /* pin-controller instance 1 data */ 6248c2ecf20Sopenharmony_ci .pin_banks = exynos5260_pin_banks1, 6258c2ecf20Sopenharmony_ci .nr_banks = ARRAY_SIZE(exynos5260_pin_banks1), 6268c2ecf20Sopenharmony_ci .eint_gpio_init = exynos_eint_gpio_init, 6278c2ecf20Sopenharmony_ci .suspend = exynos_pinctrl_suspend, 6288c2ecf20Sopenharmony_ci .resume = exynos_pinctrl_resume, 6298c2ecf20Sopenharmony_ci }, { 6308c2ecf20Sopenharmony_ci /* pin-controller instance 2 data */ 6318c2ecf20Sopenharmony_ci .pin_banks = exynos5260_pin_banks2, 6328c2ecf20Sopenharmony_ci .nr_banks = ARRAY_SIZE(exynos5260_pin_banks2), 6338c2ecf20Sopenharmony_ci .eint_gpio_init = exynos_eint_gpio_init, 6348c2ecf20Sopenharmony_ci .suspend = exynos_pinctrl_suspend, 6358c2ecf20Sopenharmony_ci .resume = exynos_pinctrl_resume, 6368c2ecf20Sopenharmony_ci }, 6378c2ecf20Sopenharmony_ci}; 6388c2ecf20Sopenharmony_ci 6398c2ecf20Sopenharmony_ciconst struct samsung_pinctrl_of_match_data exynos5260_of_data __initconst = { 6408c2ecf20Sopenharmony_ci .ctrl = exynos5260_pin_ctrl, 6418c2ecf20Sopenharmony_ci .num_ctrl = ARRAY_SIZE(exynos5260_pin_ctrl), 6428c2ecf20Sopenharmony_ci}; 6438c2ecf20Sopenharmony_ci 6448c2ecf20Sopenharmony_ci/* pin banks of exynos5410 pin-controller 0 */ 6458c2ecf20Sopenharmony_cistatic const struct samsung_pin_bank_data exynos5410_pin_banks0[] __initconst = { 6468c2ecf20Sopenharmony_ci /* Must start with EINTG banks, ordered by EINT group number. */ 6478c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTG(8, 0x000, "gpa0", 0x00), 6488c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTG(6, 0x020, "gpa1", 0x04), 6498c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTG(8, 0x040, "gpa2", 0x08), 6508c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTG(5, 0x060, "gpb0", 0x0c), 6518c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTG(5, 0x080, "gpb1", 0x10), 6528c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTG(4, 0x0A0, "gpb2", 0x14), 6538c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTG(4, 0x0C0, "gpb3", 0x18), 6548c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTG(7, 0x0E0, "gpc0", 0x1c), 6558c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTG(4, 0x100, "gpc3", 0x20), 6568c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTG(7, 0x120, "gpc1", 0x24), 6578c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTG(7, 0x140, "gpc2", 0x28), 6588c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTG(8, 0x180, "gpd1", 0x2c), 6598c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTG(8, 0x1A0, "gpe0", 0x30), 6608c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTG(2, 0x1C0, "gpe1", 0x34), 6618c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTG(6, 0x1E0, "gpf0", 0x38), 6628c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTG(8, 0x200, "gpf1", 0x3c), 6638c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTG(8, 0x220, "gpg0", 0x40), 6648c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTG(8, 0x240, "gpg1", 0x44), 6658c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTG(2, 0x260, "gpg2", 0x48), 6668c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTG(4, 0x280, "gph0", 0x4c), 6678c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTG(8, 0x2A0, "gph1", 0x50), 6688c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTN(2, 0x160, "gpm5"), 6698c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTN(8, 0x2C0, "gpm7"), 6708c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTN(6, 0x2E0, "gpy0"), 6718c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTN(4, 0x300, "gpy1"), 6728c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTN(6, 0x320, "gpy2"), 6738c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTN(8, 0x340, "gpy3"), 6748c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTN(8, 0x360, "gpy4"), 6758c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTN(8, 0x380, "gpy5"), 6768c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTN(8, 0x3A0, "gpy6"), 6778c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTN(8, 0x3C0, "gpy7"), 6788c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTW(8, 0xC00, "gpx0", 0x00), 6798c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTW(8, 0xC20, "gpx1", 0x04), 6808c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTW(8, 0xC40, "gpx2", 0x08), 6818c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTW(8, 0xC60, "gpx3", 0x0c), 6828c2ecf20Sopenharmony_ci}; 6838c2ecf20Sopenharmony_ci 6848c2ecf20Sopenharmony_ci/* pin banks of exynos5410 pin-controller 1 */ 6858c2ecf20Sopenharmony_cistatic const struct samsung_pin_bank_data exynos5410_pin_banks1[] __initconst = { 6868c2ecf20Sopenharmony_ci /* Must start with EINTG banks, ordered by EINT group number. */ 6878c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTG(5, 0x000, "gpj0", 0x00), 6888c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTG(8, 0x020, "gpj1", 0x04), 6898c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTG(8, 0x040, "gpj2", 0x08), 6908c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTG(8, 0x060, "gpj3", 0x0c), 6918c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTG(2, 0x080, "gpj4", 0x10), 6928c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTG(8, 0x0A0, "gpk0", 0x14), 6938c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTG(8, 0x0C0, "gpk1", 0x18), 6948c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTG(8, 0x0E0, "gpk2", 0x1c), 6958c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTG(7, 0x100, "gpk3", 0x20), 6968c2ecf20Sopenharmony_ci}; 6978c2ecf20Sopenharmony_ci 6988c2ecf20Sopenharmony_ci/* pin banks of exynos5410 pin-controller 2 */ 6998c2ecf20Sopenharmony_cistatic const struct samsung_pin_bank_data exynos5410_pin_banks2[] __initconst = { 7008c2ecf20Sopenharmony_ci /* Must start with EINTG banks, ordered by EINT group number. */ 7018c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTG(8, 0x000, "gpv0", 0x00), 7028c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTG(8, 0x020, "gpv1", 0x04), 7038c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTG(8, 0x060, "gpv2", 0x08), 7048c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTG(8, 0x080, "gpv3", 0x0c), 7058c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTG(2, 0x0C0, "gpv4", 0x10), 7068c2ecf20Sopenharmony_ci}; 7078c2ecf20Sopenharmony_ci 7088c2ecf20Sopenharmony_ci/* pin banks of exynos5410 pin-controller 3 */ 7098c2ecf20Sopenharmony_cistatic const struct samsung_pin_bank_data exynos5410_pin_banks3[] __initconst = { 7108c2ecf20Sopenharmony_ci /* Must start with EINTG banks, ordered by EINT group number. */ 7118c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTG(7, 0x000, "gpz", 0x00), 7128c2ecf20Sopenharmony_ci}; 7138c2ecf20Sopenharmony_ci 7148c2ecf20Sopenharmony_ci/* 7158c2ecf20Sopenharmony_ci * Samsung pinctrl driver data for Exynos5410 SoC. Exynos5410 SoC includes 7168c2ecf20Sopenharmony_ci * four gpio/pin-mux/pinconfig controllers. 7178c2ecf20Sopenharmony_ci */ 7188c2ecf20Sopenharmony_cistatic const struct samsung_pin_ctrl exynos5410_pin_ctrl[] __initconst = { 7198c2ecf20Sopenharmony_ci { 7208c2ecf20Sopenharmony_ci /* pin-controller instance 0 data */ 7218c2ecf20Sopenharmony_ci .pin_banks = exynos5410_pin_banks0, 7228c2ecf20Sopenharmony_ci .nr_banks = ARRAY_SIZE(exynos5410_pin_banks0), 7238c2ecf20Sopenharmony_ci .eint_gpio_init = exynos_eint_gpio_init, 7248c2ecf20Sopenharmony_ci .eint_wkup_init = exynos_eint_wkup_init, 7258c2ecf20Sopenharmony_ci .suspend = exynos_pinctrl_suspend, 7268c2ecf20Sopenharmony_ci .resume = exynos_pinctrl_resume, 7278c2ecf20Sopenharmony_ci }, { 7288c2ecf20Sopenharmony_ci /* pin-controller instance 1 data */ 7298c2ecf20Sopenharmony_ci .pin_banks = exynos5410_pin_banks1, 7308c2ecf20Sopenharmony_ci .nr_banks = ARRAY_SIZE(exynos5410_pin_banks1), 7318c2ecf20Sopenharmony_ci .eint_gpio_init = exynos_eint_gpio_init, 7328c2ecf20Sopenharmony_ci .suspend = exynos_pinctrl_suspend, 7338c2ecf20Sopenharmony_ci .resume = exynos_pinctrl_resume, 7348c2ecf20Sopenharmony_ci }, { 7358c2ecf20Sopenharmony_ci /* pin-controller instance 2 data */ 7368c2ecf20Sopenharmony_ci .pin_banks = exynos5410_pin_banks2, 7378c2ecf20Sopenharmony_ci .nr_banks = ARRAY_SIZE(exynos5410_pin_banks2), 7388c2ecf20Sopenharmony_ci .eint_gpio_init = exynos_eint_gpio_init, 7398c2ecf20Sopenharmony_ci .suspend = exynos_pinctrl_suspend, 7408c2ecf20Sopenharmony_ci .resume = exynos_pinctrl_resume, 7418c2ecf20Sopenharmony_ci }, { 7428c2ecf20Sopenharmony_ci /* pin-controller instance 3 data */ 7438c2ecf20Sopenharmony_ci .pin_banks = exynos5410_pin_banks3, 7448c2ecf20Sopenharmony_ci .nr_banks = ARRAY_SIZE(exynos5410_pin_banks3), 7458c2ecf20Sopenharmony_ci .eint_gpio_init = exynos_eint_gpio_init, 7468c2ecf20Sopenharmony_ci .suspend = exynos_pinctrl_suspend, 7478c2ecf20Sopenharmony_ci .resume = exynos_pinctrl_resume, 7488c2ecf20Sopenharmony_ci }, 7498c2ecf20Sopenharmony_ci}; 7508c2ecf20Sopenharmony_ci 7518c2ecf20Sopenharmony_ciconst struct samsung_pinctrl_of_match_data exynos5410_of_data __initconst = { 7528c2ecf20Sopenharmony_ci .ctrl = exynos5410_pin_ctrl, 7538c2ecf20Sopenharmony_ci .num_ctrl = ARRAY_SIZE(exynos5410_pin_ctrl), 7548c2ecf20Sopenharmony_ci}; 7558c2ecf20Sopenharmony_ci 7568c2ecf20Sopenharmony_ci/* pin banks of exynos5420 pin-controller 0 */ 7578c2ecf20Sopenharmony_cistatic const struct samsung_pin_bank_data exynos5420_pin_banks0[] __initconst = { 7588c2ecf20Sopenharmony_ci /* Must start with EINTG banks, ordered by EINT group number. */ 7598c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTG(8, 0x000, "gpy7", 0x00), 7608c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTW(8, 0xC00, "gpx0", 0x00), 7618c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTW(8, 0xC20, "gpx1", 0x04), 7628c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTW(8, 0xC40, "gpx2", 0x08), 7638c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTW(8, 0xC60, "gpx3", 0x0c), 7648c2ecf20Sopenharmony_ci}; 7658c2ecf20Sopenharmony_ci 7668c2ecf20Sopenharmony_ci/* pin banks of exynos5420 pin-controller 1 */ 7678c2ecf20Sopenharmony_cistatic const struct samsung_pin_bank_data exynos5420_pin_banks1[] __initconst = { 7688c2ecf20Sopenharmony_ci /* Must start with EINTG banks, ordered by EINT group number. */ 7698c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTG(8, 0x000, "gpc0", 0x00), 7708c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTG(8, 0x020, "gpc1", 0x04), 7718c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTG(7, 0x040, "gpc2", 0x08), 7728c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTG(4, 0x060, "gpc3", 0x0c), 7738c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTG(2, 0x080, "gpc4", 0x10), 7748c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTG(8, 0x0A0, "gpd1", 0x14), 7758c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTN(6, 0x0C0, "gpy0"), 7768c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTN(4, 0x0E0, "gpy1"), 7778c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTN(6, 0x100, "gpy2"), 7788c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTN(8, 0x120, "gpy3"), 7798c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTN(8, 0x140, "gpy4"), 7808c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTN(8, 0x160, "gpy5"), 7818c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTN(8, 0x180, "gpy6"), 7828c2ecf20Sopenharmony_ci}; 7838c2ecf20Sopenharmony_ci 7848c2ecf20Sopenharmony_ci/* pin banks of exynos5420 pin-controller 2 */ 7858c2ecf20Sopenharmony_cistatic const struct samsung_pin_bank_data exynos5420_pin_banks2[] __initconst = { 7868c2ecf20Sopenharmony_ci /* Must start with EINTG banks, ordered by EINT group number. */ 7878c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTG(8, 0x000, "gpe0", 0x00), 7888c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTG(2, 0x020, "gpe1", 0x04), 7898c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTG(6, 0x040, "gpf0", 0x08), 7908c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTG(8, 0x060, "gpf1", 0x0c), 7918c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTG(8, 0x080, "gpg0", 0x10), 7928c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTG(8, 0x0A0, "gpg1", 0x14), 7938c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTG(2, 0x0C0, "gpg2", 0x18), 7948c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTG(4, 0x0E0, "gpj4", 0x1c), 7958c2ecf20Sopenharmony_ci}; 7968c2ecf20Sopenharmony_ci 7978c2ecf20Sopenharmony_ci/* pin banks of exynos5420 pin-controller 3 */ 7988c2ecf20Sopenharmony_cistatic const struct samsung_pin_bank_data exynos5420_pin_banks3[] __initconst = { 7998c2ecf20Sopenharmony_ci /* Must start with EINTG banks, ordered by EINT group number. */ 8008c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTG(8, 0x000, "gpa0", 0x00), 8018c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTG(6, 0x020, "gpa1", 0x04), 8028c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTG(8, 0x040, "gpa2", 0x08), 8038c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTG(5, 0x060, "gpb0", 0x0c), 8048c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTG(5, 0x080, "gpb1", 0x10), 8058c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTG(4, 0x0A0, "gpb2", 0x14), 8068c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTG(8, 0x0C0, "gpb3", 0x18), 8078c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTG(2, 0x0E0, "gpb4", 0x1c), 8088c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTG(8, 0x100, "gph0", 0x20), 8098c2ecf20Sopenharmony_ci}; 8108c2ecf20Sopenharmony_ci 8118c2ecf20Sopenharmony_ci/* pin banks of exynos5420 pin-controller 4 */ 8128c2ecf20Sopenharmony_cistatic const struct samsung_pin_bank_data exynos5420_pin_banks4[] __initconst = { 8138c2ecf20Sopenharmony_ci /* Must start with EINTG banks, ordered by EINT group number. */ 8148c2ecf20Sopenharmony_ci EXYNOS_PIN_BANK_EINTG(7, 0x000, "gpz", 0x00), 8158c2ecf20Sopenharmony_ci}; 8168c2ecf20Sopenharmony_ci 8178c2ecf20Sopenharmony_ci/* PMU pad retention groups registers for Exynos5420 (without audio) */ 8188c2ecf20Sopenharmony_cistatic const u32 exynos5420_retention_regs[] = { 8198c2ecf20Sopenharmony_ci EXYNOS_PAD_RET_DRAM_OPTION, 8208c2ecf20Sopenharmony_ci EXYNOS_PAD_RET_JTAG_OPTION, 8218c2ecf20Sopenharmony_ci EXYNOS5420_PAD_RET_GPIO_OPTION, 8228c2ecf20Sopenharmony_ci EXYNOS5420_PAD_RET_UART_OPTION, 8238c2ecf20Sopenharmony_ci EXYNOS5420_PAD_RET_MMCA_OPTION, 8248c2ecf20Sopenharmony_ci EXYNOS5420_PAD_RET_MMCB_OPTION, 8258c2ecf20Sopenharmony_ci EXYNOS5420_PAD_RET_MMCC_OPTION, 8268c2ecf20Sopenharmony_ci EXYNOS5420_PAD_RET_HSI_OPTION, 8278c2ecf20Sopenharmony_ci EXYNOS_PAD_RET_EBIA_OPTION, 8288c2ecf20Sopenharmony_ci EXYNOS_PAD_RET_EBIB_OPTION, 8298c2ecf20Sopenharmony_ci EXYNOS5420_PAD_RET_SPI_OPTION, 8308c2ecf20Sopenharmony_ci EXYNOS5420_PAD_RET_DRAM_COREBLK_OPTION, 8318c2ecf20Sopenharmony_ci}; 8328c2ecf20Sopenharmony_ci 8338c2ecf20Sopenharmony_cistatic const struct samsung_retention_data exynos5420_retention_data __initconst = { 8348c2ecf20Sopenharmony_ci .regs = exynos5420_retention_regs, 8358c2ecf20Sopenharmony_ci .nr_regs = ARRAY_SIZE(exynos5420_retention_regs), 8368c2ecf20Sopenharmony_ci .value = EXYNOS_WAKEUP_FROM_LOWPWR, 8378c2ecf20Sopenharmony_ci .refcnt = &exynos_shared_retention_refcnt, 8388c2ecf20Sopenharmony_ci .init = exynos_retention_init, 8398c2ecf20Sopenharmony_ci}; 8408c2ecf20Sopenharmony_ci 8418c2ecf20Sopenharmony_ci/* 8428c2ecf20Sopenharmony_ci * Samsung pinctrl driver data for Exynos5420 SoC. Exynos5420 SoC includes 8438c2ecf20Sopenharmony_ci * four gpio/pin-mux/pinconfig controllers. 8448c2ecf20Sopenharmony_ci */ 8458c2ecf20Sopenharmony_cistatic const struct samsung_pin_ctrl exynos5420_pin_ctrl[] __initconst = { 8468c2ecf20Sopenharmony_ci { 8478c2ecf20Sopenharmony_ci /* pin-controller instance 0 data */ 8488c2ecf20Sopenharmony_ci .pin_banks = exynos5420_pin_banks0, 8498c2ecf20Sopenharmony_ci .nr_banks = ARRAY_SIZE(exynos5420_pin_banks0), 8508c2ecf20Sopenharmony_ci .eint_gpio_init = exynos_eint_gpio_init, 8518c2ecf20Sopenharmony_ci .eint_wkup_init = exynos_eint_wkup_init, 8528c2ecf20Sopenharmony_ci .suspend = exynos_pinctrl_suspend, 8538c2ecf20Sopenharmony_ci .resume = exynos_pinctrl_resume, 8548c2ecf20Sopenharmony_ci .retention_data = &exynos5420_retention_data, 8558c2ecf20Sopenharmony_ci }, { 8568c2ecf20Sopenharmony_ci /* pin-controller instance 1 data */ 8578c2ecf20Sopenharmony_ci .pin_banks = exynos5420_pin_banks1, 8588c2ecf20Sopenharmony_ci .nr_banks = ARRAY_SIZE(exynos5420_pin_banks1), 8598c2ecf20Sopenharmony_ci .eint_gpio_init = exynos_eint_gpio_init, 8608c2ecf20Sopenharmony_ci .suspend = exynos_pinctrl_suspend, 8618c2ecf20Sopenharmony_ci .resume = exynos_pinctrl_resume, 8628c2ecf20Sopenharmony_ci .retention_data = &exynos5420_retention_data, 8638c2ecf20Sopenharmony_ci }, { 8648c2ecf20Sopenharmony_ci /* pin-controller instance 2 data */ 8658c2ecf20Sopenharmony_ci .pin_banks = exynos5420_pin_banks2, 8668c2ecf20Sopenharmony_ci .nr_banks = ARRAY_SIZE(exynos5420_pin_banks2), 8678c2ecf20Sopenharmony_ci .eint_gpio_init = exynos_eint_gpio_init, 8688c2ecf20Sopenharmony_ci .suspend = exynos_pinctrl_suspend, 8698c2ecf20Sopenharmony_ci .resume = exynos_pinctrl_resume, 8708c2ecf20Sopenharmony_ci .retention_data = &exynos5420_retention_data, 8718c2ecf20Sopenharmony_ci }, { 8728c2ecf20Sopenharmony_ci /* pin-controller instance 3 data */ 8738c2ecf20Sopenharmony_ci .pin_banks = exynos5420_pin_banks3, 8748c2ecf20Sopenharmony_ci .nr_banks = ARRAY_SIZE(exynos5420_pin_banks3), 8758c2ecf20Sopenharmony_ci .eint_gpio_init = exynos_eint_gpio_init, 8768c2ecf20Sopenharmony_ci .suspend = exynos_pinctrl_suspend, 8778c2ecf20Sopenharmony_ci .resume = exynos_pinctrl_resume, 8788c2ecf20Sopenharmony_ci .retention_data = &exynos5420_retention_data, 8798c2ecf20Sopenharmony_ci }, { 8808c2ecf20Sopenharmony_ci /* pin-controller instance 4 data */ 8818c2ecf20Sopenharmony_ci .pin_banks = exynos5420_pin_banks4, 8828c2ecf20Sopenharmony_ci .nr_banks = ARRAY_SIZE(exynos5420_pin_banks4), 8838c2ecf20Sopenharmony_ci .eint_gpio_init = exynos_eint_gpio_init, 8848c2ecf20Sopenharmony_ci .suspend = exynos_pinctrl_suspend, 8858c2ecf20Sopenharmony_ci .resume = exynos_pinctrl_resume, 8868c2ecf20Sopenharmony_ci .retention_data = &exynos4_audio_retention_data, 8878c2ecf20Sopenharmony_ci }, 8888c2ecf20Sopenharmony_ci}; 8898c2ecf20Sopenharmony_ci 8908c2ecf20Sopenharmony_ciconst struct samsung_pinctrl_of_match_data exynos5420_of_data __initconst = { 8918c2ecf20Sopenharmony_ci .ctrl = exynos5420_pin_ctrl, 8928c2ecf20Sopenharmony_ci .num_ctrl = ARRAY_SIZE(exynos5420_pin_ctrl), 8938c2ecf20Sopenharmony_ci}; 894