diff options
Diffstat (limited to 'drivers/pinctrl/uniphier')
-rw-r--r-- | drivers/pinctrl/uniphier/Kconfig | 4 | ||||
-rw-r--r-- | drivers/pinctrl/uniphier/Makefile | 1 | ||||
-rw-r--r-- | drivers/pinctrl/uniphier/pinctrl-uniphier-core.c | 279 | ||||
-rw-r--r-- | drivers/pinctrl/uniphier/pinctrl-uniphier-ld11.c | 665 | ||||
-rw-r--r-- | drivers/pinctrl/uniphier/pinctrl-uniphier-ld20.c | 714 | ||||
-rw-r--r-- | drivers/pinctrl/uniphier/pinctrl-uniphier-ld4.c | 273 | ||||
-rw-r--r-- | drivers/pinctrl/uniphier/pinctrl-uniphier-ld6b.c | 386 | ||||
-rw-r--r-- | drivers/pinctrl/uniphier/pinctrl-uniphier-pro4.c | 453 | ||||
-rw-r--r-- | drivers/pinctrl/uniphier/pinctrl-uniphier-pro5.c | 458 | ||||
-rw-r--r-- | drivers/pinctrl/uniphier/pinctrl-uniphier-pxs2.c | 386 | ||||
-rw-r--r-- | drivers/pinctrl/uniphier/pinctrl-uniphier-pxs3.c | 989 | ||||
-rw-r--r-- | drivers/pinctrl/uniphier/pinctrl-uniphier-sld8.c | 273 | ||||
-rw-r--r-- | drivers/pinctrl/uniphier/pinctrl-uniphier.h | 40 |
13 files changed, 1821 insertions, 3100 deletions
diff --git a/drivers/pinctrl/uniphier/Kconfig b/drivers/pinctrl/uniphier/Kconfig index e5826eaa7170..9f2a1c666def 100644 --- a/drivers/pinctrl/uniphier/Kconfig +++ b/drivers/pinctrl/uniphier/Kconfig @@ -40,4 +40,8 @@ config PINCTRL_UNIPHIER_LD20 bool "UniPhier LD20 SoC pinctrl driver" default ARM64 +config PINCTRL_UNIPHIER_PXS3 + bool "UniPhier PXs3 SoC pinctrl driver" + default ARM64 + endif diff --git a/drivers/pinctrl/uniphier/Makefile b/drivers/pinctrl/uniphier/Makefile index 9f4bc8aa6f68..d592ff77d60f 100644 --- a/drivers/pinctrl/uniphier/Makefile +++ b/drivers/pinctrl/uniphier/Makefile @@ -8,3 +8,4 @@ obj-$(CONFIG_PINCTRL_UNIPHIER_PXS2) += pinctrl-uniphier-pxs2.o obj-$(CONFIG_PINCTRL_UNIPHIER_LD6B) += pinctrl-uniphier-ld6b.o obj-$(CONFIG_PINCTRL_UNIPHIER_LD11) += pinctrl-uniphier-ld11.o obj-$(CONFIG_PINCTRL_UNIPHIER_LD20) += pinctrl-uniphier-ld20.o +obj-$(CONFIG_PINCTRL_UNIPHIER_PXS3) += pinctrl-uniphier-pxs3.o diff --git a/drivers/pinctrl/uniphier/pinctrl-uniphier-core.c b/drivers/pinctrl/uniphier/pinctrl-uniphier-core.c index 30dec0ee7f35..f9267fabe6b0 100644 --- a/drivers/pinctrl/uniphier/pinctrl-uniphier-core.c +++ b/drivers/pinctrl/uniphier/pinctrl-uniphier-core.c @@ -13,7 +13,7 @@ * GNU General Public License for more details. */ -#include <linux/export.h> +#include <linux/list.h> #include <linux/mfd/syscon.h> #include <linux/of.h> #include <linux/pinctrl/pinconf.h> @@ -33,13 +33,21 @@ #define UNIPHIER_PINCTRL_DRV2CTRL_BASE 0x1900 #define UNIPHIER_PINCTRL_DRV3CTRL_BASE 0x1980 #define UNIPHIER_PINCTRL_PUPDCTRL_BASE 0x1a00 -#define UNIPHIER_PINCTRL_IECTRL 0x1d00 +#define UNIPHIER_PINCTRL_IECTRL_BASE 0x1d00 + +struct uniphier_pinctrl_reg_region { + struct list_head node; + unsigned int base; + unsigned int nregs; + u32 vals[0]; +}; struct uniphier_pinctrl_priv { struct pinctrl_desc pctldesc; struct pinctrl_dev *pctldev; struct regmap *regmap; struct uniphier_pinctrl_socdata *socdata; + struct list_head reg_regions; }; static int uniphier_pctl_get_groups_count(struct pinctrl_dev *pctldev) @@ -139,10 +147,11 @@ static const struct pinctrl_ops uniphier_pctlops = { }; static int uniphier_conf_pin_bias_get(struct pinctrl_dev *pctldev, - const struct pin_desc *desc, + unsigned int pin, enum pin_config_param param) { struct uniphier_pinctrl_priv *priv = pinctrl_dev_get_drvdata(pctldev); + const struct pin_desc *desc = pin_desc_get(pctldev, pin); enum uniphier_pin_pull_dir pull_dir = uniphier_pin_get_pull_dir(desc->drv_data); unsigned int pupdctrl, reg, shift, val; @@ -189,10 +198,10 @@ static int uniphier_conf_pin_bias_get(struct pinctrl_dev *pctldev, } static int uniphier_conf_pin_drive_get(struct pinctrl_dev *pctldev, - const struct pin_desc *desc, - u16 *strength) + unsigned int pin, u32 *strength) { struct uniphier_pinctrl_priv *priv = pinctrl_dev_get_drvdata(pctldev); + const struct pin_desc *desc = pin_desc_get(pctldev, pin); enum uniphier_pin_drv_type type = uniphier_pin_get_drv_type(desc->drv_data); const unsigned int strength_1bit[] = {4, 8}; @@ -249,46 +258,52 @@ static int uniphier_conf_pin_drive_get(struct pinctrl_dev *pctldev, } static int uniphier_conf_pin_input_enable_get(struct pinctrl_dev *pctldev, - const struct pin_desc *desc) + unsigned int pin) { struct uniphier_pinctrl_priv *priv = pinctrl_dev_get_drvdata(pctldev); + const struct pin_desc *desc = pin_desc_get(pctldev, pin); unsigned int iectrl = uniphier_pin_get_iectrl(desc->drv_data); - unsigned int val; + unsigned int reg, mask, val; int ret; if (iectrl == UNIPHIER_PIN_IECTRL_NONE) /* This pin is always input-enabled. */ return 0; - ret = regmap_read(priv->regmap, UNIPHIER_PINCTRL_IECTRL, &val); + if (priv->socdata->caps & UNIPHIER_PINCTRL_CAPS_PERPIN_IECTRL) + iectrl = pin; + + reg = UNIPHIER_PINCTRL_IECTRL_BASE + iectrl / 32 * 4; + mask = BIT(iectrl % 32); + + ret = regmap_read(priv->regmap, reg, &val); if (ret) return ret; - return val & BIT(iectrl) ? 0 : -EINVAL; + return val & mask ? 0 : -EINVAL; } static int uniphier_conf_pin_config_get(struct pinctrl_dev *pctldev, unsigned pin, unsigned long *configs) { - const struct pin_desc *desc = pin_desc_get(pctldev, pin); enum pin_config_param param = pinconf_to_config_param(*configs); bool has_arg = false; - u16 arg; + u32 arg; int ret; switch (param) { case PIN_CONFIG_BIAS_DISABLE: case PIN_CONFIG_BIAS_PULL_UP: case PIN_CONFIG_BIAS_PULL_DOWN: - ret = uniphier_conf_pin_bias_get(pctldev, desc, param); + ret = uniphier_conf_pin_bias_get(pctldev, pin, param); break; case PIN_CONFIG_DRIVE_STRENGTH: - ret = uniphier_conf_pin_drive_get(pctldev, desc, &arg); + ret = uniphier_conf_pin_drive_get(pctldev, pin, &arg); has_arg = true; break; case PIN_CONFIG_INPUT_ENABLE: - ret = uniphier_conf_pin_input_enable_get(pctldev, desc); + ret = uniphier_conf_pin_input_enable_get(pctldev, pin); break; default: /* unsupported parameter */ @@ -303,10 +318,11 @@ static int uniphier_conf_pin_config_get(struct pinctrl_dev *pctldev, } static int uniphier_conf_pin_bias_set(struct pinctrl_dev *pctldev, - const struct pin_desc *desc, + unsigned int pin, enum pin_config_param param, u32 arg) { struct uniphier_pinctrl_priv *priv = pinctrl_dev_get_drvdata(pctldev); + const struct pin_desc *desc = pin_desc_get(pctldev, pin); enum uniphier_pin_pull_dir pull_dir = uniphier_pin_get_pull_dir(desc->drv_data); unsigned int pupdctrl, reg, shift; @@ -377,10 +393,10 @@ static int uniphier_conf_pin_bias_set(struct pinctrl_dev *pctldev, } static int uniphier_conf_pin_drive_set(struct pinctrl_dev *pctldev, - const struct pin_desc *desc, - u16 strength) + unsigned int pin, u32 strength) { struct uniphier_pinctrl_priv *priv = pinctrl_dev_get_drvdata(pctldev); + const struct pin_desc *desc = pin_desc_get(pctldev, pin); enum uniphier_pin_drv_type type = uniphier_pin_get_drv_type(desc->drv_data); const unsigned int strength_1bit[] = {4, 8, -1}; @@ -438,10 +454,10 @@ static int uniphier_conf_pin_drive_set(struct pinctrl_dev *pctldev, } static int uniphier_conf_pin_input_enable(struct pinctrl_dev *pctldev, - const struct pin_desc *desc, - u16 enable) + unsigned int pin, u32 enable) { struct uniphier_pinctrl_priv *priv = pinctrl_dev_get_drvdata(pctldev); + const struct pin_desc *desc = pin_desc_get(pctldev, pin); unsigned int iectrl = uniphier_pin_get_iectrl(desc->drv_data); unsigned int reg, mask; @@ -457,7 +473,10 @@ static int uniphier_conf_pin_input_enable(struct pinctrl_dev *pctldev, if (iectrl == UNIPHIER_PIN_IECTRL_NONE) return enable ? 0 : -EINVAL; - reg = UNIPHIER_PINCTRL_IECTRL + iectrl / 32 * 4; + if (priv->socdata->caps & UNIPHIER_PINCTRL_CAPS_PERPIN_IECTRL) + iectrl = pin; + + reg = UNIPHIER_PINCTRL_IECTRL_BASE + iectrl / 32 * 4; mask = BIT(iectrl % 32); return regmap_update_bits(priv->regmap, reg, mask, enable ? mask : 0); @@ -468,7 +487,6 @@ static int uniphier_conf_pin_config_set(struct pinctrl_dev *pctldev, unsigned long *configs, unsigned num_configs) { - const struct pin_desc *desc = pin_desc_get(pctldev, pin); int i, ret; for (i = 0; i < num_configs; i++) { @@ -481,15 +499,14 @@ static int uniphier_conf_pin_config_set(struct pinctrl_dev *pctldev, case PIN_CONFIG_BIAS_PULL_UP: case PIN_CONFIG_BIAS_PULL_DOWN: case PIN_CONFIG_BIAS_PULL_PIN_DEFAULT: - ret = uniphier_conf_pin_bias_set(pctldev, desc, + ret = uniphier_conf_pin_bias_set(pctldev, pin, param, arg); break; case PIN_CONFIG_DRIVE_STRENGTH: - ret = uniphier_conf_pin_drive_set(pctldev, desc, arg); + ret = uniphier_conf_pin_drive_set(pctldev, pin, arg); break; case PIN_CONFIG_INPUT_ENABLE: - ret = uniphier_conf_pin_input_enable(pctldev, desc, - arg); + ret = uniphier_conf_pin_input_enable(pctldev, pin, arg); break; default: dev_err(pctldev->dev, @@ -569,8 +586,7 @@ static int uniphier_pmx_set_one_mux(struct pinctrl_dev *pctldev, unsigned pin, int ret; /* some pins need input-enabling */ - ret = uniphier_conf_pin_input_enable(pctldev, - pin_desc_get(pctldev, pin), 1); + ret = uniphier_conf_pin_input_enable(pctldev, pin, 1); if (ret) return ret; @@ -649,30 +665,27 @@ static int uniphier_pmx_gpio_request_enable(struct pinctrl_dev *pctldev, unsigned offset) { struct uniphier_pinctrl_priv *priv = pinctrl_dev_get_drvdata(pctldev); - const struct uniphier_pinctrl_group *groups = priv->socdata->groups; - int groups_count = priv->socdata->groups_count; - enum uniphier_pinmux_gpio_range_type range_type; - int i, j; - - if (strstr(range->name, "irq")) - range_type = UNIPHIER_PINMUX_GPIO_RANGE_IRQ; - else - range_type = UNIPHIER_PINMUX_GPIO_RANGE_PORT; - - for (i = 0; i < groups_count; i++) { - if (groups[i].range_type != range_type) - continue; - - for (j = 0; j < groups[i].num_pins; j++) - if (groups[i].pins[j] == offset) - goto found; + unsigned int gpio_offset; + int muxval, i; + + if (range->pins) { + for (i = 0; i < range->npins; i++) + if (range->pins[i] == offset) + break; + + if (WARN_ON(i == range->npins)) + return -EINVAL; + + gpio_offset = i; + } else { + gpio_offset = offset - range->pin_base; } - dev_err(pctldev->dev, "pin %u does not support GPIO\n", offset); - return -EINVAL; + gpio_offset += range->id; + + muxval = priv->socdata->get_gpio_muxval(offset, gpio_offset); -found: - return uniphier_pmx_set_one_mux(pctldev, offset, groups[i].muxvals[j]); + return uniphier_pmx_set_one_mux(pctldev, offset, muxval); } static const struct pinmux_ops uniphier_pmxops = { @@ -684,12 +697,177 @@ static const struct pinmux_ops uniphier_pmxops = { .strict = true, }; +#ifdef CONFIG_PM_SLEEP +static int uniphier_pinctrl_suspend(struct device *dev) +{ + struct uniphier_pinctrl_priv *priv = dev_get_drvdata(dev); + struct uniphier_pinctrl_reg_region *r; + int ret; + + list_for_each_entry(r, &priv->reg_regions, node) { + ret = regmap_bulk_read(priv->regmap, r->base, r->vals, + r->nregs); + if (ret) + return ret; + } + + return 0; +} + +static int uniphier_pinctrl_resume(struct device *dev) +{ + struct uniphier_pinctrl_priv *priv = dev_get_drvdata(dev); + struct uniphier_pinctrl_reg_region *r; + int ret; + + list_for_each_entry(r, &priv->reg_regions, node) { + ret = regmap_bulk_write(priv->regmap, r->base, r->vals, + r->nregs); + if (ret) + return ret; + } + + if (priv->socdata->caps & UNIPHIER_PINCTRL_CAPS_DBGMUX_SEPARATE) { + ret = regmap_write(priv->regmap, + UNIPHIER_PINCTRL_LOAD_PINMUX, 1); + if (ret) + return ret; + } + + return 0; +} + +static int uniphier_pinctrl_add_reg_region(struct device *dev, + struct uniphier_pinctrl_priv *priv, + unsigned int base, + unsigned int count, + unsigned int width) +{ + struct uniphier_pinctrl_reg_region *region; + unsigned int nregs; + + if (!count) + return 0; + + nregs = DIV_ROUND_UP(count * width, 32); + + region = devm_kzalloc(dev, + sizeof(*region) + sizeof(region->vals[0]) * nregs, + GFP_KERNEL); + if (!region) + return -ENOMEM; + + region->base = base; + region->nregs = nregs; + + list_add_tail(®ion->node, &priv->reg_regions); + + return 0; +} +#endif + +static int uniphier_pinctrl_pm_init(struct device *dev, + struct uniphier_pinctrl_priv *priv) +{ +#ifdef CONFIG_PM_SLEEP + const struct uniphier_pinctrl_socdata *socdata = priv->socdata; + unsigned int num_drvctrl = 0; + unsigned int num_drv2ctrl = 0; + unsigned int num_drv3ctrl = 0; + unsigned int num_pupdctrl = 0; + unsigned int num_iectrl = 0; + unsigned int iectrl, drvctrl, pupdctrl; + enum uniphier_pin_drv_type drv_type; + enum uniphier_pin_pull_dir pull_dir; + int i, ret; + + for (i = 0; i < socdata->npins; i++) { + void *drv_data = socdata->pins[i].drv_data; + + drvctrl = uniphier_pin_get_drvctrl(drv_data); + drv_type = uniphier_pin_get_drv_type(drv_data); + pupdctrl = uniphier_pin_get_pupdctrl(drv_data); + pull_dir = uniphier_pin_get_pull_dir(drv_data); + iectrl = uniphier_pin_get_iectrl(drv_data); + + switch (drv_type) { + case UNIPHIER_PIN_DRV_1BIT: + num_drvctrl = max(num_drvctrl, drvctrl + 1); + break; + case UNIPHIER_PIN_DRV_2BIT: + num_drv2ctrl = max(num_drv2ctrl, drvctrl + 1); + break; + case UNIPHIER_PIN_DRV_3BIT: + num_drv3ctrl = max(num_drv3ctrl, drvctrl + 1); + break; + default: + break; + } + + if (pull_dir == UNIPHIER_PIN_PULL_UP || + pull_dir == UNIPHIER_PIN_PULL_DOWN) + num_pupdctrl = max(num_pupdctrl, pupdctrl + 1); + + if (iectrl != UNIPHIER_PIN_IECTRL_NONE) { + if (socdata->caps & UNIPHIER_PINCTRL_CAPS_PERPIN_IECTRL) + iectrl = i; + num_iectrl = max(num_iectrl, iectrl + 1); + } + } + + INIT_LIST_HEAD(&priv->reg_regions); + + ret = uniphier_pinctrl_add_reg_region(dev, priv, + UNIPHIER_PINCTRL_PINMUX_BASE, + socdata->npins, 8); + if (ret) + return ret; + + ret = uniphier_pinctrl_add_reg_region(dev, priv, + UNIPHIER_PINCTRL_DRVCTRL_BASE, + num_drvctrl, 1); + if (ret) + return ret; + + ret = uniphier_pinctrl_add_reg_region(dev, priv, + UNIPHIER_PINCTRL_DRV2CTRL_BASE, + num_drv2ctrl, 2); + if (ret) + return ret; + + ret = uniphier_pinctrl_add_reg_region(dev, priv, + UNIPHIER_PINCTRL_DRV3CTRL_BASE, + num_drv3ctrl, 3); + if (ret) + return ret; + + ret = uniphier_pinctrl_add_reg_region(dev, priv, + UNIPHIER_PINCTRL_PUPDCTRL_BASE, + num_pupdctrl, 1); + if (ret) + return ret; + + ret = uniphier_pinctrl_add_reg_region(dev, priv, + UNIPHIER_PINCTRL_IECTRL_BASE, + num_iectrl, 1); + if (ret) + return ret; +#endif + return 0; +} + +const struct dev_pm_ops uniphier_pinctrl_pm_ops = { + SET_LATE_SYSTEM_SLEEP_PM_OPS(uniphier_pinctrl_suspend, + uniphier_pinctrl_resume) +}; + int uniphier_pinctrl_probe(struct platform_device *pdev, struct uniphier_pinctrl_socdata *socdata) { struct device *dev = &pdev->dev; struct uniphier_pinctrl_priv *priv; struct device_node *parent; + int ret; if (!socdata || !socdata->pins || !socdata->npins || @@ -721,6 +899,10 @@ int uniphier_pinctrl_probe(struct platform_device *pdev, priv->pctldesc.confops = &uniphier_confops; priv->pctldesc.owner = dev->driver->owner; + ret = uniphier_pinctrl_pm_init(dev, priv); + if (ret) + return ret; + priv->pctldev = devm_pinctrl_register(dev, &priv->pctldesc, priv); if (IS_ERR(priv->pctldev)) { dev_err(dev, "failed to register UniPhier pinctrl driver\n"); @@ -731,4 +913,3 @@ int uniphier_pinctrl_probe(struct platform_device *pdev, return 0; } -EXPORT_SYMBOL_GPL(uniphier_pinctrl_probe); diff --git a/drivers/pinctrl/uniphier/pinctrl-uniphier-ld11.c b/drivers/pinctrl/uniphier/pinctrl-uniphier-ld11.c index ad73db8d067b..9c5e359a63de 100644 --- a/drivers/pinctrl/uniphier/pinctrl-uniphier-ld11.c +++ b/drivers/pinctrl/uniphier/pinctrl-uniphier-ld11.c @@ -21,7 +21,7 @@ #include "pinctrl-uniphier.h" static const struct pinctrl_pin_desc uniphier_ld11_pins[] = { - UNIPHIER_PINCTRL_PIN(0, "XECS1", 0, + UNIPHIER_PINCTRL_PIN(0, "XECS1", UNIPHIER_PIN_IECTRL_EXIST, 0, UNIPHIER_PIN_DRV_1BIT, 0, UNIPHIER_PIN_PULL_UP), UNIPHIER_PINCTRL_PIN(1, "ERXW", UNIPHIER_PIN_IECTRL_NONE, @@ -30,13 +30,13 @@ static const struct pinctrl_pin_desc uniphier_ld11_pins[] = { UNIPHIER_PINCTRL_PIN(2, "XERWE1", UNIPHIER_PIN_IECTRL_NONE, 2, UNIPHIER_PIN_DRV_1BIT, 2, UNIPHIER_PIN_PULL_UP), - UNIPHIER_PINCTRL_PIN(3, "XNFWP", 3, + UNIPHIER_PINCTRL_PIN(3, "XNFWP", UNIPHIER_PIN_IECTRL_EXIST, 3, UNIPHIER_PIN_DRV_1BIT, 3, UNIPHIER_PIN_PULL_DOWN), - UNIPHIER_PINCTRL_PIN(4, "XNFCE0", 4, + UNIPHIER_PINCTRL_PIN(4, "XNFCE0", UNIPHIER_PIN_IECTRL_EXIST, 4, UNIPHIER_PIN_DRV_1BIT, 4, UNIPHIER_PIN_PULL_UP), - UNIPHIER_PINCTRL_PIN(5, "NFRYBY0", 5, + UNIPHIER_PINCTRL_PIN(5, "NFRYBY0", UNIPHIER_PIN_IECTRL_EXIST, 5, UNIPHIER_PIN_DRV_1BIT, 5, UNIPHIER_PIN_PULL_UP), UNIPHIER_PINCTRL_PIN(6, "XNFRE", UNIPHIER_PIN_IECTRL_NONE, @@ -51,425 +51,427 @@ static const struct pinctrl_pin_desc uniphier_ld11_pins[] = { UNIPHIER_PINCTRL_PIN(9, "NFCLE", UNIPHIER_PIN_IECTRL_NONE, 9, UNIPHIER_PIN_DRV_1BIT, 9, UNIPHIER_PIN_PULL_UP), - UNIPHIER_PINCTRL_PIN(10, "NFD0", 10, + UNIPHIER_PINCTRL_PIN(10, "NFD0", UNIPHIER_PIN_IECTRL_EXIST, 10, UNIPHIER_PIN_DRV_1BIT, 10, UNIPHIER_PIN_PULL_UP), - UNIPHIER_PINCTRL_PIN(11, "NFD1", 11, + UNIPHIER_PINCTRL_PIN(11, "NFD1", UNIPHIER_PIN_IECTRL_EXIST, 11, UNIPHIER_PIN_DRV_1BIT, 11, UNIPHIER_PIN_PULL_UP), - UNIPHIER_PINCTRL_PIN(12, "NFD2", 12, + UNIPHIER_PINCTRL_PIN(12, "NFD2", UNIPHIER_PIN_IECTRL_EXIST, 12, UNIPHIER_PIN_DRV_1BIT, 12, UNIPHIER_PIN_PULL_UP), - UNIPHIER_PINCTRL_PIN(13, "NFD3", 13, + UNIPHIER_PINCTRL_PIN(13, "NFD3", UNIPHIER_PIN_IECTRL_EXIST, 13, UNIPHIER_PIN_DRV_1BIT, 13, UNIPHIER_PIN_PULL_UP), - UNIPHIER_PINCTRL_PIN(14, "NFD4", 14, + UNIPHIER_PINCTRL_PIN(14, "NFD4", UNIPHIER_PIN_IECTRL_EXIST, 14, UNIPHIER_PIN_DRV_1BIT, 14, UNIPHIER_PIN_PULL_UP), - UNIPHIER_PINCTRL_PIN(15, "NFD5", 15, + UNIPHIER_PINCTRL_PIN(15, "NFD5", UNIPHIER_PIN_IECTRL_EXIST, 15, UNIPHIER_PIN_DRV_1BIT, 15, UNIPHIER_PIN_PULL_UP), - UNIPHIER_PINCTRL_PIN(16, "NFD6", 16, + UNIPHIER_PINCTRL_PIN(16, "NFD6", UNIPHIER_PIN_IECTRL_EXIST, 16, UNIPHIER_PIN_DRV_1BIT, 16, UNIPHIER_PIN_PULL_UP), - UNIPHIER_PINCTRL_PIN(17, "NFD7", 17, + UNIPHIER_PINCTRL_PIN(17, "NFD7", UNIPHIER_PIN_IECTRL_EXIST, 17, UNIPHIER_PIN_DRV_1BIT, 17, UNIPHIER_PIN_PULL_UP), - UNIPHIER_PINCTRL_PIN(18, "XERST", 18, + UNIPHIER_PINCTRL_PIN(18, "XERST", UNIPHIER_PIN_IECTRL_EXIST, 0, UNIPHIER_PIN_DRV_2BIT, 18, UNIPHIER_PIN_PULL_UP), - UNIPHIER_PINCTRL_PIN(19, "MMCCLK", 19, + UNIPHIER_PINCTRL_PIN(19, "MMCCLK", UNIPHIER_PIN_IECTRL_EXIST, 1, UNIPHIER_PIN_DRV_2BIT, 19, UNIPHIER_PIN_PULL_UP), - UNIPHIER_PINCTRL_PIN(20, "MMCCMD", 20, + UNIPHIER_PINCTRL_PIN(20, "MMCCMD", UNIPHIER_PIN_IECTRL_EXIST, 2, UNIPHIER_PIN_DRV_2BIT, 20, UNIPHIER_PIN_PULL_UP), - UNIPHIER_PINCTRL_PIN(21, "MMCDS", 21, + UNIPHIER_PINCTRL_PIN(21, "MMCDS", UNIPHIER_PIN_IECTRL_EXIST, 3, UNIPHIER_PIN_DRV_2BIT, 21, UNIPHIER_PIN_PULL_UP), - UNIPHIER_PINCTRL_PIN(22, "MMCDAT0", 22, + UNIPHIER_PINCTRL_PIN(22, "MMCDAT0", UNIPHIER_PIN_IECTRL_EXIST, 4, UNIPHIER_PIN_DRV_2BIT, 22, UNIPHIER_PIN_PULL_UP), - UNIPHIER_PINCTRL_PIN(23, "MMCDAT1", 23, + UNIPHIER_PINCTRL_PIN(23, "MMCDAT1", UNIPHIER_PIN_IECTRL_EXIST, 5, UNIPHIER_PIN_DRV_2BIT, 23, UNIPHIER_PIN_PULL_UP), - UNIPHIER_PINCTRL_PIN(24, "MMCDAT2", 24, + UNIPHIER_PINCTRL_PIN(24, "MMCDAT2", UNIPHIER_PIN_IECTRL_EXIST, 6, UNIPHIER_PIN_DRV_2BIT, 24, UNIPHIER_PIN_PULL_UP), - UNIPHIER_PINCTRL_PIN(25, "MMCDAT3", 25, + UNIPHIER_PINCTRL_PIN(25, "MMCDAT3", UNIPHIER_PIN_IECTRL_EXIST, 7, UNIPHIER_PIN_DRV_2BIT, 25, UNIPHIER_PIN_PULL_UP), - UNIPHIER_PINCTRL_PIN(26, "MMCDAT4", 26, + UNIPHIER_PINCTRL_PIN(26, "MMCDAT4", UNIPHIER_PIN_IECTRL_EXIST, 8, UNIPHIER_PIN_DRV_2BIT, 26, UNIPHIER_PIN_PULL_UP), - UNIPHIER_PINCTRL_PIN(27, "MMCDAT5", 27, + UNIPHIER_PINCTRL_PIN(27, "MMCDAT5", UNIPHIER_PIN_IECTRL_EXIST, 9, UNIPHIER_PIN_DRV_2BIT, 27, UNIPHIER_PIN_PULL_UP), - UNIPHIER_PINCTRL_PIN(28, "MMCDAT6", 28, + UNIPHIER_PINCTRL_PIN(28, "MMCDAT6", UNIPHIER_PIN_IECTRL_EXIST, 10, UNIPHIER_PIN_DRV_2BIT, 28, UNIPHIER_PIN_PULL_UP), - UNIPHIER_PINCTRL_PIN(29, "MMCDAT7", 29, + UNIPHIER_PINCTRL_PIN(29, "MMCDAT7", UNIPHIER_PIN_IECTRL_EXIST, 11, UNIPHIER_PIN_DRV_2BIT, 29, UNIPHIER_PIN_PULL_UP), - UNIPHIER_PINCTRL_PIN(46, "USB0VBUS", 46, + UNIPHIER_PINCTRL_PIN(46, "USB0VBUS", UNIPHIER_PIN_IECTRL_EXIST, 46, UNIPHIER_PIN_DRV_1BIT, 46, UNIPHIER_PIN_PULL_DOWN), UNIPHIER_PINCTRL_PIN(47, "USB0OD", UNIPHIER_PIN_IECTRL_NONE, 47, UNIPHIER_PIN_DRV_1BIT, 47, UNIPHIER_PIN_PULL_UP), - UNIPHIER_PINCTRL_PIN(48, "USB1VBUS", 48, + UNIPHIER_PINCTRL_PIN(48, "USB1VBUS", UNIPHIER_PIN_IECTRL_EXIST, 48, UNIPHIER_PIN_DRV_1BIT, 48, UNIPHIER_PIN_PULL_DOWN), - UNIPHIER_PINCTRL_PIN(49, "USB1OD", 49, + UNIPHIER_PINCTRL_PIN(49, "USB1OD", UNIPHIER_PIN_IECTRL_EXIST, 49, UNIPHIER_PIN_DRV_1BIT, 49, UNIPHIER_PIN_PULL_UP), - UNIPHIER_PINCTRL_PIN(50, "USB2VBUS", 50, + UNIPHIER_PINCTRL_PIN(50, "USB2VBUS", UNIPHIER_PIN_IECTRL_EXIST, 50, UNIPHIER_PIN_DRV_1BIT, 50, UNIPHIER_PIN_PULL_DOWN), - UNIPHIER_PINCTRL_PIN(51, "USB2OD", 51, + UNIPHIER_PINCTRL_PIN(51, "USB2OD", UNIPHIER_PIN_IECTRL_EXIST, 51, UNIPHIER_PIN_DRV_1BIT, 51, UNIPHIER_PIN_PULL_UP), - UNIPHIER_PINCTRL_PIN(54, "TXD0", 54, + UNIPHIER_PINCTRL_PIN(54, "TXD0", UNIPHIER_PIN_IECTRL_EXIST, 54, UNIPHIER_PIN_DRV_1BIT, 54, UNIPHIER_PIN_PULL_UP), - UNIPHIER_PINCTRL_PIN(55, "RXD0", 55, + UNIPHIER_PINCTRL_PIN(55, "RXD0", UNIPHIER_PIN_IECTRL_EXIST, 55, UNIPHIER_PIN_DRV_1BIT, 55, UNIPHIER_PIN_PULL_UP), - UNIPHIER_PINCTRL_PIN(56, "SPISYNC0", 56, + UNIPHIER_PINCTRL_PIN(56, "SPISYNC0", UNIPHIER_PIN_IECTRL_EXIST, 56, UNIPHIER_PIN_DRV_1BIT, 56, UNIPHIER_PIN_PULL_DOWN), - UNIPHIER_PINCTRL_PIN(57, "SPISCLK0", 57, + UNIPHIER_PINCTRL_PIN(57, "SPISCLK0", UNIPHIER_PIN_IECTRL_EXIST, 57, UNIPHIER_PIN_DRV_1BIT, 57, UNIPHIER_PIN_PULL_DOWN), - UNIPHIER_PINCTRL_PIN(58, "SPITXD0", 58, + UNIPHIER_PINCTRL_PIN(58, "SPITXD0", UNIPHIER_PIN_IECTRL_EXIST, 58, UNIPHIER_PIN_DRV_1BIT, 58, UNIPHIER_PIN_PULL_DOWN), - UNIPHIER_PINCTRL_PIN(59, "SPIRXD0", 59, + UNIPHIER_PINCTRL_PIN(59, "SPIRXD0", UNIPHIER_PIN_IECTRL_EXIST, 59, UNIPHIER_PIN_DRV_1BIT, 59, UNIPHIER_PIN_PULL_DOWN), - UNIPHIER_PINCTRL_PIN(60, "AGCI", 60, + UNIPHIER_PINCTRL_PIN(60, "AGCI", UNIPHIER_PIN_IECTRL_EXIST, 60, UNIPHIER_PIN_DRV_1BIT, 60, UNIPHIER_PIN_PULL_DOWN), - UNIPHIER_PINCTRL_PIN(61, "DMDSDA0", 61, + UNIPHIER_PINCTRL_PIN(61, "DMDSDA0", UNIPHIER_PIN_IECTRL_EXIST, -1, UNIPHIER_PIN_DRV_FIXED4, -1, UNIPHIER_PIN_PULL_NONE), - UNIPHIER_PINCTRL_PIN(62, "DMDSCL0", 62, + UNIPHIER_PINCTRL_PIN(62, "DMDSCL0", UNIPHIER_PIN_IECTRL_EXIST, -1, UNIPHIER_PIN_DRV_FIXED4, -1, UNIPHIER_PIN_PULL_NONE), - UNIPHIER_PINCTRL_PIN(63, "SDA0", 63, + UNIPHIER_PINCTRL_PIN(63, "SDA0", UNIPHIER_PIN_IECTRL_EXIST, -1, UNIPHIER_PIN_DRV_FIXED4, -1, UNIPHIER_PIN_PULL_NONE), - UNIPHIER_PINCTRL_PIN(64, "SCL0", 64, + UNIPHIER_PINCTRL_PIN(64, "SCL0", UNIPHIER_PIN_IECTRL_EXIST, -1, UNIPHIER_PIN_DRV_FIXED4, -1, UNIPHIER_PIN_PULL_NONE), - UNIPHIER_PINCTRL_PIN(65, "SDA1", 65, + UNIPHIER_PINCTRL_PIN(65, "SDA1", UNIPHIER_PIN_IECTRL_EXIST, -1, UNIPHIER_PIN_DRV_FIXED4, -1, UNIPHIER_PIN_PULL_NONE), - UNIPHIER_PINCTRL_PIN(66, "SCL1", 66, + UNIPHIER_PINCTRL_PIN(66, "SCL1", UNIPHIER_PIN_IECTRL_EXIST, -1, UNIPHIER_PIN_DRV_FIXED4, -1, UNIPHIER_PIN_PULL_NONE), - UNIPHIER_PINCTRL_PIN(67, "HIN", 67, + UNIPHIER_PINCTRL_PIN(67, "HIN", UNIPHIER_PIN_IECTRL_EXIST, -1, UNIPHIER_PIN_DRV_FIXED5, -1, UNIPHIER_PIN_PULL_NONE), - UNIPHIER_PINCTRL_PIN(68, "VIN", 68, + UNIPHIER_PINCTRL_PIN(68, "VIN", UNIPHIER_PIN_IECTRL_EXIST, -1, UNIPHIER_PIN_DRV_FIXED5, -1, UNIPHIER_PIN_PULL_NONE), - UNIPHIER_PINCTRL_PIN(69, "PCA00", 69, + UNIPHIER_PINCTRL_PIN(69, "PCA00", UNIPHIER_PIN_IECTRL_EXIST, 69, UNIPHIER_PIN_DRV_1BIT, 69, UNIPHIER_PIN_PULL_DOWN), - UNIPHIER_PINCTRL_PIN(70, "PCA01", 70, + UNIPHIER_PINCTRL_PIN(70, "PCA01", UNIPHIER_PIN_IECTRL_EXIST, 70, UNIPHIER_PIN_DRV_1BIT, 70, UNIPHIER_PIN_PULL_DOWN), - UNIPHIER_PINCTRL_PIN(71, "PCA02", 71, + UNIPHIER_PINCTRL_PIN(71, "PCA02", UNIPHIER_PIN_IECTRL_EXIST, 71, UNIPHIER_PIN_DRV_1BIT, 71, UNIPHIER_PIN_PULL_DOWN), - UNIPHIER_PINCTRL_PIN(72, "PCA03", 72, + UNIPHIER_PINCTRL_PIN(72, "PCA03", UNIPHIER_PIN_IECTRL_EXIST, 72, UNIPHIER_PIN_DRV_1BIT, 72, UNIPHIER_PIN_PULL_DOWN), - UNIPHIER_PINCTRL_PIN(73, "PCA04", 73, + UNIPHIER_PINCTRL_PIN(73, "PCA04", UNIPHIER_PIN_IECTRL_EXIST, 73, UNIPHIER_PIN_DRV_1BIT, 73, UNIPHIER_PIN_PULL_DOWN), - UNIPHIER_PINCTRL_PIN(74, "PCA05", 74, + UNIPHIER_PINCTRL_PIN(74, "PCA05", UNIPHIER_PIN_IECTRL_EXIST, 74, UNIPHIER_PIN_DRV_1BIT, 74, UNIPHIER_PIN_PULL_DOWN), - UNIPHIER_PINCTRL_PIN(75, "PCA06", 75, + UNIPHIER_PINCTRL_PIN(75, "PCA06", UNIPHIER_PIN_IECTRL_EXIST, 75, UNIPHIER_PIN_DRV_1BIT, 75, UNIPHIER_PIN_PULL_DOWN), - UNIPHIER_PINCTRL_PIN(76, "PCA07", 76, + UNIPHIER_PINCTRL_PIN(76, "PCA07", UNIPHIER_PIN_IECTRL_EXIST, 76, UNIPHIER_PIN_DRV_1BIT, 76, UNIPHIER_PIN_PULL_DOWN), - UNIPHIER_PINCTRL_PIN(77, "PCA08", 77, + UNIPHIER_PINCTRL_PIN(77, "PCA08", UNIPHIER_PIN_IECTRL_EXIST, 77, UNIPHIER_PIN_DRV_1BIT, 77, UNIPHIER_PIN_PULL_DOWN), - UNIPHIER_PINCTRL_PIN(78, "PCA09", 78, + UNIPHIER_PINCTRL_PIN(78, "PCA09", UNIPHIER_PIN_IECTRL_EXIST, 78, UNIPHIER_PIN_DRV_1BIT, 78, UNIPHIER_PIN_PULL_DOWN), - UNIPHIER_PINCTRL_PIN(79, "PCA10", 79, + UNIPHIER_PINCTRL_PIN(79, "PCA10", UNIPHIER_PIN_IECTRL_EXIST, 79, UNIPHIER_PIN_DRV_1BIT, 79, UNIPHIER_PIN_PULL_DOWN), - UNIPHIER_PINCTRL_PIN(80, "PCA11", 80, + UNIPHIER_PINCTRL_PIN(80, "PCA11", UNIPHIER_PIN_IECTRL_EXIST, 80, UNIPHIER_PIN_DRV_1BIT, 80, UNIPHIER_PIN_PULL_DOWN), - UNIPHIER_PINCTRL_PIN(81, "PCA12", 81, + UNIPHIER_PINCTRL_PIN(81, "PCA12", UNIPHIER_PIN_IECTRL_EXIST, 81, UNIPHIER_PIN_DRV_1BIT, 81, UNIPHIER_PIN_PULL_DOWN), - UNIPHIER_PINCTRL_PIN(82, "PCA13", 82, + UNIPHIER_PINCTRL_PIN(82, "PCA13", UNIPHIER_PIN_IECTRL_EXIST, 82, UNIPHIER_PIN_DRV_1BIT, 82, UNIPHIER_PIN_PULL_DOWN), - UNIPHIER_PINCTRL_PIN(83, "PCA14", 83, + UNIPHIER_PINCTRL_PIN(83, "PCA14", UNIPHIER_PIN_IECTRL_EXIST, 83, UNIPHIER_PIN_DRV_1BIT, 83, UNIPHIER_PIN_PULL_DOWN), - UNIPHIER_PINCTRL_PIN(84, "PC0READY", 84, + UNIPHIER_PINCTRL_PIN(84, "PC0READY", UNIPHIER_PIN_IECTRL_EXIST, 84, UNIPHIER_PIN_DRV_1BIT, 84, UNIPHIER_PIN_PULL_DOWN), - UNIPHIER_PINCTRL_PIN(85, "PC0CD1", 85, + UNIPHIER_PINCTRL_PIN(85, "PC0CD1", UNIPHIER_PIN_IECTRL_EXIST, 85, UNIPHIER_PIN_DRV_1BIT, 85, UNIPHIER_PIN_PULL_DOWN), - UNIPHIER_PINCTRL_PIN(86, "PC0CD2", 86, + UNIPHIER_PINCTRL_PIN(86, "PC0CD2", UNIPHIER_PIN_IECTRL_EXIST, 86, UNIPHIER_PIN_DRV_1BIT, 86, UNIPHIER_PIN_PULL_DOWN), - UNIPHIER_PINCTRL_PIN(87, "PC0WAIT", 87, + UNIPHIER_PINCTRL_PIN(87, "PC0WAIT", UNIPHIER_PIN_IECTRL_EXIST, 87, UNIPHIER_PIN_DRV_1BIT, 87, UNIPHIER_PIN_PULL_DOWN), - UNIPHIER_PINCTRL_PIN(88, "PC0RESET", 88, + UNIPHIER_PINCTRL_PIN(88, "PC0RESET", UNIPHIER_PIN_IECTRL_EXIST, 88, UNIPHIER_PIN_DRV_1BIT, 88, UNIPHIER_PIN_PULL_DOWN), - UNIPHIER_PINCTRL_PIN(89, "PC0CE1", 89, + UNIPHIER_PINCTRL_PIN(89, "PC0CE1", UNIPHIER_PIN_IECTRL_EXIST, 89, UNIPHIER_PIN_DRV_1BIT, 89, UNIPHIER_PIN_PULL_DOWN), - UNIPHIER_PINCTRL_PIN(90, "PC0WE", 90, + UNIPHIER_PINCTRL_PIN(90, "PC0WE", UNIPHIER_PIN_IECTRL_EXIST, 90, UNIPHIER_PIN_DRV_1BIT, 90, UNIPHIER_PIN_PULL_DOWN), - UNIPHIER_PINCTRL_PIN(91, "PC0OE", 91, + UNIPHIER_PINCTRL_PIN(91, "PC0OE", UNIPHIER_PIN_IECTRL_EXIST, 91, UNIPHIER_PIN_DRV_1BIT, 91, UNIPHIER_PIN_PULL_DOWN), - UNIPHIER_PINCTRL_PIN(92, "PC0IOWR", 92, + UNIPHIER_PINCTRL_PIN(92, "PC0IOWR", UNIPHIER_PIN_IECTRL_EXIST, 92, UNIPHIER_PIN_DRV_1BIT, 92, UNIPHIER_PIN_PULL_DOWN), - UNIPHIER_PINCTRL_PIN(93, "PC0IORD", 93, + UNIPHIER_PINCTRL_PIN(93, "PC0IORD", UNIPHIER_PIN_IECTRL_EXIST, 93, UNIPHIER_PIN_DRV_1BIT, 93, UNIPHIER_PIN_PULL_DOWN), - UNIPHIER_PINCTRL_PIN(94, "PCD00", 94, + UNIPHIER_PINCTRL_PIN(94, "PCD00", UNIPHIER_PIN_IECTRL_EXIST, 94, UNIPHIER_PIN_DRV_1BIT, 94, UNIPHIER_PIN_PULL_DOWN), - UNIPHIER_PINCTRL_PIN(95, "PCD01", 95, + UNIPHIER_PINCTRL_PIN(95, "PCD01", UNIPHIER_PIN_IECTRL_EXIST, 95, UNIPHIER_PIN_DRV_1BIT, 95, UNIPHIER_PIN_PULL_DOWN), - UNIPHIER_PINCTRL_PIN(96, "PCD02", 96, + UNIPHIER_PINCTRL_PIN(96, "PCD02", UNIPHIER_PIN_IECTRL_EXIST, 96, UNIPHIER_PIN_DRV_1BIT, 96, UNIPHIER_PIN_PULL_DOWN), - UNIPHIER_PINCTRL_PIN(97, "PCD03", 97, + UNIPHIER_PINCTRL_PIN(97, "PCD03", UNIPHIER_PIN_IECTRL_EXIST, 97, UNIPHIER_PIN_DRV_1BIT, 97, UNIPHIER_PIN_PULL_DOWN), - UNIPHIER_PINCTRL_PIN(98, "PCD04", 98, + UNIPHIER_PINCTRL_PIN(98, "PCD04", UNIPHIER_PIN_IECTRL_EXIST, 98, UNIPHIER_PIN_DRV_1BIT, 98, UNIPHIER_PIN_PULL_DOWN), - UNIPHIER_PINCTRL_PIN(99, "PCD05", 99, + UNIPHIER_PINCTRL_PIN(99, "PCD05", UNIPHIER_PIN_IECTRL_EXIST, 99, UNIPHIER_PIN_DRV_1BIT, 99, UNIPHIER_PIN_PULL_DOWN), - UNIPHIER_PINCTRL_PIN(100, "PCD06", 100, + UNIPHIER_PINCTRL_PIN(100, "PCD06", UNIPHIER_PIN_IECTRL_EXIST, 100, UNIPHIER_PIN_DRV_1BIT, 100, UNIPHIER_PIN_PULL_DOWN), - UNIPHIER_PINCTRL_PIN(101, "PCD07", 101, + UNIPHIER_PINCTRL_PIN(101, "PCD07", UNIPHIER_PIN_IECTRL_EXIST, 101, UNIPHIER_PIN_DRV_1BIT, 101, UNIPHIER_PIN_PULL_DOWN), - UNIPHIER_PINCTRL_PIN(102, "HS0BCLKIN", 102, + UNIPHIER_PINCTRL_PIN(102, "HS0BCLKIN", UNIPHIER_PIN_IECTRL_EXIST, 102, UNIPHIER_PIN_DRV_1BIT, 102, UNIPHIER_PIN_PULL_DOWN), - UNIPHIER_PINCTRL_PIN(103, "HS0SYNCIN", 103, + UNIPHIER_PINCTRL_PIN(103, "HS0SYNCIN", UNIPHIER_PIN_IECTRL_EXIST, 103, UNIPHIER_PIN_DRV_1BIT, 103, UNIPHIER_PIN_PULL_DOWN), - UNIPHIER_PINCTRL_PIN(104, "HS0VALIN", 104, + UNIPHIER_PINCTRL_PIN(104, "HS0VALIN", UNIPHIER_PIN_IECTRL_EXIST, 104, UNIPHIER_PIN_DRV_1BIT, 104, UNIPHIER_PIN_PULL_DOWN), - UNIPHIER_PINCTRL_PIN(105, "HS0DIN0", 105, + UNIPHIER_PINCTRL_PIN(105, "HS0DIN0", UNIPHIER_PIN_IECTRL_EXIST, 105, UNIPHIER_PIN_DRV_1BIT, 105, UNIPHIER_PIN_PULL_DOWN), - UNIPHIER_PINCTRL_PIN(106, "HS0DIN1", 106, + UNIPHIER_PINCTRL_PIN(106, "HS0DIN1", UNIPHIER_PIN_IECTRL_EXIST, 106, UNIPHIER_PIN_DRV_1BIT, 106, UNIPHIER_PIN_PULL_DOWN), - UNIPHIER_PINCTRL_PIN(107, "HS0DIN2", 107, + UNIPHIER_PINCTRL_PIN(107, "HS0DIN2", UNIPHIER_PIN_IECTRL_EXIST, 107, UNIPHIER_PIN_DRV_1BIT, 107, UNIPHIER_PIN_PULL_DOWN), - UNIPHIER_PINCTRL_PIN(108, "HS0DIN3", 108, + UNIPHIER_PINCTRL_PIN(108, "HS0DIN3", UNIPHIER_PIN_IECTRL_EXIST, 108, UNIPHIER_PIN_DRV_1BIT, 108, UNIPHIER_PIN_PULL_DOWN), - UNIPHIER_PINCTRL_PIN(109, "HS0DIN4", 109, + UNIPHIER_PINCTRL_PIN(109, "HS0DIN4", UNIPHIER_PIN_IECTRL_EXIST, 109, UNIPHIER_PIN_DRV_1BIT, 109, UNIPHIER_PIN_PULL_DOWN), - UNIPHIER_PINCTRL_PIN(110, "HS0DIN5", 110, + UNIPHIER_PINCTRL_PIN(110, "HS0DIN5", UNIPHIER_PIN_IECTRL_EXIST, 110, UNIPHIER_PIN_DRV_1BIT, 110, UNIPHIER_PIN_PULL_DOWN), - UNIPHIER_PINCTRL_PIN(111, "HS0DIN6", 111, + UNIPHIER_PINCTRL_PIN(111, "HS0DIN6", UNIPHIER_PIN_IECTRL_EXIST, 111, UNIPHIER_PIN_DRV_1BIT, 111, UNIPHIER_PIN_PULL_DOWN), - UNIPHIER_PINCTRL_PIN(112, "HS0DIN7", 112, + UNIPHIER_PINCTRL_PIN(112, "HS0DIN7", UNIPHIER_PIN_IECTRL_EXIST, 112, UNIPHIER_PIN_DRV_1BIT, 112, UNIPHIER_PIN_PULL_DOWN), - UNIPHIER_PINCTRL_PIN(113, "HS0BCLKOUT", 113, + UNIPHIER_PINCTRL_PIN(113, "HS0BCLKOUT", UNIPHIER_PIN_IECTRL_EXIST, 113, UNIPHIER_PIN_DRV_1BIT, 113, UNIPHIER_PIN_PULL_DOWN), - UNIPHIER_PINCTRL_PIN(114, "HS0SYNCOUT", 114, + UNIPHIER_PINCTRL_PIN(114, "HS0SYNCOUT", UNIPHIER_PIN_IECTRL_EXIST, 114, UNIPHIER_PIN_DRV_1BIT, 114, UNIPHIER_PIN_PULL_DOWN), - UNIPHIER_PINCTRL_PIN(115, "HS0VALOUT", 115, + UNIPHIER_PINCTRL_PIN(115, "HS0VALOUT", UNIPHIER_PIN_IECTRL_EXIST, 115, UNIPHIER_PIN_DRV_1BIT, 115, UNIPHIER_PIN_PULL_DOWN), - UNIPHIER_PINCTRL_PIN(116, "HS0DOUT0", 116, + UNIPHIER_PINCTRL_PIN(116, "HS0DOUT0", UNIPHIER_PIN_IECTRL_EXIST, 116, UNIPHIER_PIN_DRV_1BIT, 116, UNIPHIER_PIN_PULL_DOWN), - UNIPHIER_PINCTRL_PIN(117, "HS0DOUT1", 117, + UNIPHIER_PINCTRL_PIN(117, "HS0DOUT1", UNIPHIER_PIN_IECTRL_EXIST, 117, UNIPHIER_PIN_DRV_1BIT, 117, UNIPHIER_PIN_PULL_DOWN), - UNIPHIER_PINCTRL_PIN(118, "HS0DOUT2", 118, + UNIPHIER_PINCTRL_PIN(118, "HS0DOUT2", UNIPHIER_PIN_IECTRL_EXIST, 118, UNIPHIER_PIN_DRV_1BIT, 118, UNIPHIER_PIN_PULL_DOWN), - UNIPHIER_PINCTRL_PIN(119, "HS0DOUT3", 119, + UNIPHIER_PINCTRL_PIN(119, "HS0DOUT3", UNIPHIER_PIN_IECTRL_EXIST, 119, UNIPHIER_PIN_DRV_1BIT, 119, UNIPHIER_PIN_PULL_DOWN), - UNIPHIER_PINCTRL_PIN(120, "HS0DOUT4", 120, + UNIPHIER_PINCTRL_PIN(120, "HS0DOUT4", UNIPHIER_PIN_IECTRL_EXIST, 120, UNIPHIER_PIN_DRV_1BIT, 120, UNIPHIER_PIN_PULL_DOWN), - UNIPHIER_PINCTRL_PIN(121, "HS0DOUT5", 121, + UNIPHIER_PINCTRL_PIN(121, "HS0DOUT5", UNIPHIER_PIN_IECTRL_EXIST, 121, UNIPHIER_PIN_DRV_1BIT, 121, UNIPHIER_PIN_PULL_DOWN), - UNIPHIER_PINCTRL_PIN(122, "HS0DOUT6", 122, + UNIPHIER_PINCTRL_PIN(122, "HS0DOUT6", UNIPHIER_PIN_IECTRL_EXIST, 122, UNIPHIER_PIN_DRV_1BIT, 122, UNIPHIER_PIN_PULL_DOWN), - UNIPHIER_PINCTRL_PIN(123, "HS0DOUT7", 123, + UNIPHIER_PINCTRL_PIN(123, "HS0DOUT7", UNIPHIER_PIN_IECTRL_EXIST, 123, UNIPHIER_PIN_DRV_1BIT, 123, UNIPHIER_PIN_PULL_DOWN), - UNIPHIER_PINCTRL_PIN(124, "HS1BCLKIN", 124, + UNIPHIER_PINCTRL_PIN(124, "HS1BCLKIN", UNIPHIER_PIN_IECTRL_EXIST, 124, UNIPHIER_PIN_DRV_1BIT, 124, UNIPHIER_PIN_PULL_DOWN), - UNIPHIER_PINCTRL_PIN(125, "HS1SYNCIN", 125, + UNIPHIER_PINCTRL_PIN(125, "HS1SYNCIN", UNIPHIER_PIN_IECTRL_EXIST, 125, UNIPHIER_PIN_DRV_1BIT, 125, UNIPHIER_PIN_PULL_DOWN), - UNIPHIER_PINCTRL_PIN(126, "HS1VALIN", 126, + UNIPHIER_PINCTRL_PIN(126, "HS1VALIN", UNIPHIER_PIN_IECTRL_EXIST, 126, UNIPHIER_PIN_DRV_1BIT, 126, UNIPHIER_PIN_PULL_DOWN), - UNIPHIER_PINCTRL_PIN(127, "HS1DIN0", 127, + UNIPHIER_PINCTRL_PIN(127, "HS1DIN0", UNIPHIER_PIN_IECTRL_EXIST, 127, UNIPHIER_PIN_DRV_1BIT, 127, UNIPHIER_PIN_PULL_DOWN), - UNIPHIER_PINCTRL_PIN(128, "HS1DIN1", 128, + UNIPHIER_PINCTRL_PIN(128, "HS1DIN1", UNIPHIER_PIN_IECTRL_EXIST, 128, UNIPHIER_PIN_DRV_1BIT, 128, UNIPHIER_PIN_PULL_DOWN), - UNIPHIER_PINCTRL_PIN(129, "HS1DIN2", 129, + UNIPHIER_PINCTRL_PIN(129, "HS1DIN2", UNIPHIER_PIN_IECTRL_EXIST, 129, UNIPHIER_PIN_DRV_1BIT, 129, UNIPHIER_PIN_PULL_DOWN), - UNIPHIER_PINCTRL_PIN(130, "HS1DIN3", 130, + UNIPHIER_PINCTRL_PIN(130, "HS1DIN3", UNIPHIER_PIN_IECTRL_EXIST, 130, UNIPHIER_PIN_DRV_1BIT, 130, UNIPHIER_PIN_PULL_DOWN), - UNIPHIER_PINCTRL_PIN(131, "HS1DIN4", 131, + UNIPHIER_PINCTRL_PIN(131, "HS1DIN4", UNIPHIER_PIN_IECTRL_EXIST, 131, UNIPHIER_PIN_DRV_1BIT, 131, UNIPHIER_PIN_PULL_DOWN), - UNIPHIER_PINCTRL_PIN(132, "HS1DIN5", 132, + UNIPHIER_PINCTRL_PIN(132, "HS1DIN5", UNIPHIER_PIN_IECTRL_EXIST, 132, UNIPHIER_PIN_DRV_1BIT, 132, UNIPHIER_PIN_PULL_DOWN), - UNIPHIER_PINCTRL_PIN(133, "HS1DIN6", 133, + UNIPHIER_PINCTRL_PIN(133, "HS1DIN6", UNIPHIER_PIN_IECTRL_EXIST, 133, UNIPHIER_PIN_DRV_1BIT, 133, UNIPHIER_PIN_PULL_DOWN), - UNIPHIER_PINCTRL_PIN(134, "HS1DIN7", 134, + UNIPHIER_PINCTRL_PIN(134, "HS1DIN7", UNIPHIER_PIN_IECTRL_EXIST, 134, UNIPHIER_PIN_DRV_1BIT, 134, UNIPHIER_PIN_PULL_DOWN), - UNIPHIER_PINCTRL_PIN(135, "AO1IEC", 135, + UNIPHIER_PINCTRL_PIN(135, "AO1IEC", UNIPHIER_PIN_IECTRL_EXIST, 135, UNIPHIER_PIN_DRV_1BIT, 135, UNIPHIER_PIN_PULL_DOWN), - UNIPHIER_PINCTRL_PIN(136, "AO1ARC", 136, + UNIPHIER_PINCTRL_PIN(136, "AO1ARC", UNIPHIER_PIN_IECTRL_EXIST, 136, UNIPHIER_PIN_DRV_1BIT, 136, UNIPHIER_PIN_PULL_DOWN), - UNIPHIER_PINCTRL_PIN(137, "AO1DACCK", 137, + UNIPHIER_PINCTRL_PIN(137, "AO1DACCK", UNIPHIER_PIN_IECTRL_EXIST, 137, UNIPHIER_PIN_DRV_1BIT, 137, UNIPHIER_PIN_PULL_DOWN), - UNIPHIER_PINCTRL_PIN(138, "AO1BCK", 138, + UNIPHIER_PINCTRL_PIN(138, "AO1BCK", UNIPHIER_PIN_IECTRL_EXIST, 138, UNIPHIER_PIN_DRV_1BIT, 138, UNIPHIER_PIN_PULL_DOWN), - UNIPHIER_PINCTRL_PIN(139, "AO1LRCK", 139, + UNIPHIER_PINCTRL_PIN(139, "AO1LRCK", UNIPHIER_PIN_IECTRL_EXIST, 139, UNIPHIER_PIN_DRV_1BIT, 139, UNIPHIER_PIN_PULL_DOWN), - UNIPHIER_PINCTRL_PIN(140, "AO1D0", 140, + UNIPHIER_PINCTRL_PIN(140, "AO1D0", UNIPHIER_PIN_IECTRL_EXIST, 140, UNIPHIER_PIN_DRV_1BIT, 140, UNIPHIER_PIN_PULL_DOWN), - UNIPHIER_PINCTRL_PIN(141, "AO1D1", 141, + UNIPHIER_PINCTRL_PIN(141, "AO1D1", UNIPHIER_PIN_IECTRL_EXIST, 141, UNIPHIER_PIN_DRV_1BIT, 141, UNIPHIER_PIN_PULL_DOWN), - UNIPHIER_PINCTRL_PIN(142, "AO1D2", 142, + UNIPHIER_PINCTRL_PIN(142, "AO1D2", UNIPHIER_PIN_IECTRL_EXIST, 142, UNIPHIER_PIN_DRV_1BIT, 142, UNIPHIER_PIN_PULL_DOWN), - UNIPHIER_PINCTRL_PIN(143, "XIRQ9", 143, + UNIPHIER_PINCTRL_PIN(143, "XIRQ9", UNIPHIER_PIN_IECTRL_EXIST, 143, UNIPHIER_PIN_DRV_1BIT, 143, UNIPHIER_PIN_PULL_DOWN), - UNIPHIER_PINCTRL_PIN(144, "XIRQ10", 144, + UNIPHIER_PINCTRL_PIN(144, "XIRQ10", UNIPHIER_PIN_IECTRL_EXIST, 144, UNIPHIER_PIN_DRV_1BIT, 144, UNIPHIER_PIN_PULL_DOWN), - UNIPHIER_PINCTRL_PIN(145, "XIRQ11", 145, + UNIPHIER_PINCTRL_PIN(145, "XIRQ11", UNIPHIER_PIN_IECTRL_EXIST, 145, UNIPHIER_PIN_DRV_1BIT, 145, UNIPHIER_PIN_PULL_DOWN), - UNIPHIER_PINCTRL_PIN(146, "XIRQ13", 146, + UNIPHIER_PINCTRL_PIN(146, "XIRQ13", UNIPHIER_PIN_IECTRL_EXIST, 146, UNIPHIER_PIN_DRV_1BIT, 146, UNIPHIER_PIN_PULL_DOWN), - UNIPHIER_PINCTRL_PIN(147, "PWMA", 147, + UNIPHIER_PINCTRL_PIN(147, "PWMA", UNIPHIER_PIN_IECTRL_EXIST, 147, UNIPHIER_PIN_DRV_1BIT, 147, UNIPHIER_PIN_PULL_DOWN), - UNIPHIER_PINCTRL_PIN(148, "LR_GOUT", 148, + UNIPHIER_PINCTRL_PIN(148, "LR_GOUT", UNIPHIER_PIN_IECTRL_EXIST, 148, UNIPHIER_PIN_DRV_1BIT, 148, UNIPHIER_PIN_PULL_DOWN), - UNIPHIER_PINCTRL_PIN(149, "XIRQ0", 149, + UNIPHIER_PINCTRL_PIN(149, "XIRQ0", UNIPHIER_PIN_IECTRL_EXIST, 149, UNIPHIER_PIN_DRV_1BIT, 149, UNIPHIER_PIN_PULL_DOWN), - UNIPHIER_PINCTRL_PIN(150, "XIRQ1", 150, + UNIPHIER_PINCTRL_PIN(150, "XIRQ1", UNIPHIER_PIN_IECTRL_EXIST, 150, UNIPHIER_PIN_DRV_1BIT, 150, UNIPHIER_PIN_PULL_DOWN), - UNIPHIER_PINCTRL_PIN(151, "XIRQ2", 151, + UNIPHIER_PINCTRL_PIN(151, "XIRQ2", UNIPHIER_PIN_IECTRL_EXIST, 151, UNIPHIER_PIN_DRV_1BIT, 151, UNIPHIER_PIN_PULL_DOWN), - UNIPHIER_PINCTRL_PIN(152, "XIRQ3", 152, + UNIPHIER_PINCTRL_PIN(152, "XIRQ3", UNIPHIER_PIN_IECTRL_EXIST, 152, UNIPHIER_PIN_DRV_1BIT, 152, UNIPHIER_PIN_PULL_DOWN), - UNIPHIER_PINCTRL_PIN(153, "XIRQ4", 153, + UNIPHIER_PINCTRL_PIN(153, "XIRQ4", UNIPHIER_PIN_IECTRL_EXIST, 153, UNIPHIER_PIN_DRV_1BIT, 153, UNIPHIER_PIN_PULL_DOWN), - UNIPHIER_PINCTRL_PIN(154, "XIRQ5", 154, + UNIPHIER_PINCTRL_PIN(154, "XIRQ5", UNIPHIER_PIN_IECTRL_EXIST, 154, UNIPHIER_PIN_DRV_1BIT, 154, UNIPHIER_PIN_PULL_DOWN), - UNIPHIER_PINCTRL_PIN(155, "XIRQ6", 155, + UNIPHIER_PINCTRL_PIN(155, "XIRQ6", UNIPHIER_PIN_IECTRL_EXIST, 155, UNIPHIER_PIN_DRV_1BIT, 155, UNIPHIER_PIN_PULL_DOWN), - UNIPHIER_PINCTRL_PIN(156, "XIRQ7", 156, + UNIPHIER_PINCTRL_PIN(156, "XIRQ7", UNIPHIER_PIN_IECTRL_EXIST, 156, UNIPHIER_PIN_DRV_1BIT, 156, UNIPHIER_PIN_PULL_DOWN), - UNIPHIER_PINCTRL_PIN(157, "XIRQ8", 157, + UNIPHIER_PINCTRL_PIN(157, "XIRQ8", UNIPHIER_PIN_IECTRL_EXIST, 157, UNIPHIER_PIN_DRV_1BIT, 157, UNIPHIER_PIN_PULL_DOWN), - UNIPHIER_PINCTRL_PIN(158, "AGCBS", 158, + UNIPHIER_PINCTRL_PIN(158, "AGCBS", UNIPHIER_PIN_IECTRL_EXIST, 158, UNIPHIER_PIN_DRV_1BIT, 158, UNIPHIER_PIN_PULL_DOWN), - UNIPHIER_PINCTRL_PIN(159, "XIRQ21", 159, + UNIPHIER_PINCTRL_PIN(159, "XIRQ21", UNIPHIER_PIN_IECTRL_EXIST, 159, UNIPHIER_PIN_DRV_1BIT, 159, UNIPHIER_PIN_PULL_DOWN), - UNIPHIER_PINCTRL_PIN(160, "XIRQ22", 160, + UNIPHIER_PINCTRL_PIN(160, "XIRQ22", UNIPHIER_PIN_IECTRL_EXIST, 160, UNIPHIER_PIN_DRV_1BIT, 160, UNIPHIER_PIN_PULL_DOWN), - UNIPHIER_PINCTRL_PIN(161, "XIRQ23", 161, + UNIPHIER_PINCTRL_PIN(161, "XIRQ23", UNIPHIER_PIN_IECTRL_EXIST, 161, UNIPHIER_PIN_DRV_1BIT, 161, UNIPHIER_PIN_PULL_DOWN), - UNIPHIER_PINCTRL_PIN(162, "CH2CLK", 162, + UNIPHIER_PINCTRL_PIN(162, "CH2CLK", UNIPHIER_PIN_IECTRL_EXIST, 162, UNIPHIER_PIN_DRV_1BIT, 162, UNIPHIER_PIN_PULL_DOWN), - UNIPHIER_PINCTRL_PIN(163, "CH2PSYNC", 163, + UNIPHIER_PINCTRL_PIN(163, "CH2PSYNC", UNIPHIER_PIN_IECTRL_EXIST, 163, UNIPHIER_PIN_DRV_1BIT, 163, UNIPHIER_PIN_PULL_DOWN), - UNIPHIER_PINCTRL_PIN(164, "CH2VAL", 164, + UNIPHIER_PINCTRL_PIN(164, "CH2VAL", UNIPHIER_PIN_IECTRL_EXIST, 164, UNIPHIER_PIN_DRV_1BIT, 164, UNIPHIER_PIN_PULL_DOWN), - UNIPHIER_PINCTRL_PIN(165, "CH2DATA", 165, + UNIPHIER_PINCTRL_PIN(165, "CH2DATA", UNIPHIER_PIN_IECTRL_EXIST, 165, UNIPHIER_PIN_DRV_1BIT, 165, UNIPHIER_PIN_PULL_DOWN), - UNIPHIER_PINCTRL_PIN(166, "CK25O", 166, + UNIPHIER_PINCTRL_PIN(166, "CK25O", UNIPHIER_PIN_IECTRL_EXIST, 166, UNIPHIER_PIN_DRV_1BIT, 166, UNIPHIER_PIN_PULL_DOWN), }; +static const unsigned aout_pins[] = {135, 136, 137, 138, 139, 140, 141, 142}; +static const int aout_muxvals[] = {0, 0, 0, 0, 0, 0, 0, 0}; static const unsigned emmc_pins[] = {18, 19, 20, 21, 22, 23, 24, 25}; static const int emmc_muxvals[] = {0, 0, 0, 0, 0, 0, 0, 0}; static const unsigned emmc_dat8_pins[] = {26, 27, 28, 29}; @@ -508,102 +510,44 @@ static const unsigned usb1_pins[] = {48, 49}; static const int usb1_muxvals[] = {0, 0}; static const unsigned usb2_pins[] = {50, 51}; static const int usb2_muxvals[] = {0, 0}; -static const unsigned port_range0_pins[] = { +static const unsigned int gpio_range0_pins[] = { 159, 160, 161, 162, 163, 164, 165, 166, /* PORT0x */ 0, 1, 2, 3, 4, 5, 6, 7, /* PORT1x */ 8, 9, 10, 11, 12, 13, 14, 15, /* PORT2x */ 16, 17, 18, /* PORT30-32 */ }; -static const int port_range0_muxvals[] = { - 15, 15, 15, 15, 15, 15, 15, 15, /* PORT0x */ - 15, 15, 15, 15, 15, 15, 15, 15, /* PORT1x */ - 15, 15, 15, 15, 15, 15, 15, 15, /* PORT2x */ - 15, 15, 15, /* PORT30-32 */ -}; -static const unsigned port_range1_pins[] = { +static const unsigned int gpio_range1_pins[] = { 46, 47, 48, 49, 50, /* PORT53-57 */ 51, /* PORT60 */ }; -static const int port_range1_muxvals[] = { - 15, 15, 15, 15, 15, /* PORT53-57 */ - 15, /* PORT60 */ -}; -static const unsigned port_range2_pins[] = { +static const unsigned int gpio_range2_pins[] = { 54, 55, 56, 57, 58, /* PORT63-67 */ 59, 60, 69, 70, 71, 72, 73, 74, /* PORT7x */ 75, 76, 77, 78, 79, 80, 81, 82, /* PORT8x */ 83, 84, 85, 86, 87, 88, 89, 90, /* PORT9x */ 91, 92, 93, 94, 95, 96, 97, 98, /* PORT10x */ }; -static const int port_range2_muxvals[] = { - 15, 15, 15, 15, 15, /* PORT63-67 */ - 15, 15, 15, 15, 15, 15, 15, 15, /* PORT7x */ - 15, 15, 15, 15, 15, 15, 15, 15, /* PORT8x */ - 15, 15, 15, 15, 15, 15, 15, 15, /* PORT9x */ - 15, 15, 15, 15, 15, 15, 15, 15, /* PORT10x */ -}; -static const unsigned port_range3_pins[] = { +static const unsigned int gpio_range3_pins[] = { 99, 100, 101, 102, 103, 104, 105, 106, /* PORT12x */ 107, 108, 109, 110, 111, 112, 113, 114, /* PORT13x */ 115, 116, 117, 118, 119, 120, 121, 122, /* PORT14x */ -}; -static const int port_range3_muxvals[] = { - 15, 15, 15, 15, 15, 15, 15, 15, /* PORT12x */ - 15, 15, 15, 15, 15, 15, 15, 15, /* PORT13x */ - 15, 15, 15, 15, 15, 15, 15, 15, /* PORT14x */ -}; -static const unsigned port_range4_pins[] = { + 149, 150, 151, 152, 153, 154, 155, 156, /* XIRQ0-7 */ + 157, 143, 144, 145, 85, 146, 158, 84, /* XIRQ8-15 */ + 141, 142, 148, 50, 51, 159, 160, 161, /* XIRQ16-23 */ 61, 62, 63, 64, 65, 66, 67, 68, /* PORT18x */ }; -static const int port_range4_muxvals[] = { - 15, 15, 15, 15, 15, 15, 15, 15, /* PORT18x */ -}; -static const unsigned port_range5_pins[] = { +static const unsigned int gpio_range4_pins[] = { 123, 124, 125, 126, 127, 128, 129, 130, /* PORT20x */ 131, 132, 133, 134, 135, 136, 137, 138, /* PORT21x */ 139, 140, 141, 142, /* PORT220-223 */ }; -static const int port_range5_muxvals[] = { - 15, 15, 15, 15, 15, 15, 15, 15, /* PORT20x */ - 15, 15, 15, 15, 15, 15, 15, 15, /* PORT21x */ - 15, 15, 15, 15, /* PORT220-223 */ -}; -static const unsigned port_range6_pins[] = { +static const unsigned int gpio_range5_pins[] = { 147, 148, 149, 150, 151, 152, 153, 154, /* PORT23x */ 155, 156, 157, 143, 144, 145, 146, 158, /* PORT24x */ }; -static const int port_range6_muxvals[] = { - 15, 15, 15, 15, 15, 15, 15, 15, /* PORT23x */ - 15, 15, 15, 15, 15, 15, 15, 15, /* PORT24x */ -}; -static const unsigned xirq_pins[] = { - 149, 150, 151, 152, 153, 154, 155, 156, /* XIRQ0-7 */ - 157, 143, 144, 145, 85, 146, 158, 84, /* XIRQ8-15 */ - 141, 142, 148, 50, 51, 159, 160, 161, /* XIRQ16-23 */ -}; -static const int xirq_muxvals[] = { - 14, 14, 14, 14, 14, 14, 14, 14, /* XIRQ0-7 */ - 14, 14, 14, 14, 13, 14, 14, 13, /* XIRQ8-15 */ - 14, 14, 14, 14, 14, 14, 14, 14, /* XIRQ16-23 */ -}; -static const unsigned xirq_alternatives_pins[] = { - 94, 95, 96, 97, 98, 99, 100, 101, /* XIRQ0-7 */ - 102, 103, 104, 105, 106, 107, /* XIRQ8-11,13,14 */ - 108, 109, 110, 111, 112, 113, 114, 115, /* XIRQ16-23 */ - 9, 10, 11, 12, 13, 14, 15, 16, /* XIRQ4-11 */ - 17, 0, 1, 2, 3, 4, 5, 6, 7, 8, /* XIRQ13,14,16-23 */ - 139, 140, 135, 147, /* XIRQ17,18,21,22 */ -}; -static const int xirq_alternatives_muxvals[] = { - 14, 14, 14, 14, 14, 14, 14, 14, /* XIRQ0-7 */ - 14, 14, 14, 14, 14, 14, /* XIRQ8-11,13,14 */ - 14, 14, 14, 14, 14, 14, 14, 14, /* XIRQ16-23 */ - 14, 14, 14, 14, 14, 14, 14, 14, /* XIRQ4-11 */ - 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, /* XIRQ13,14,16-23 */ - 14, 14, 14, 14, /* XIRQ17,18,21,22 */ -}; static const struct uniphier_pinctrl_group uniphier_ld11_groups[] = { + UNIPHIER_PINCTRL_GROUP(aout), UNIPHIER_PINCTRL_GROUP(emmc), UNIPHIER_PINCTRL_GROUP(emmc_dat8), UNIPHIER_PINCTRL_GROUP(ether_rmii), @@ -621,223 +565,15 @@ static const struct uniphier_pinctrl_group uniphier_ld11_groups[] = { UNIPHIER_PINCTRL_GROUP(usb0), UNIPHIER_PINCTRL_GROUP(usb1), UNIPHIER_PINCTRL_GROUP(usb2), - UNIPHIER_PINCTRL_GROUP_GPIO_RANGE_PORT(port_range0), - UNIPHIER_PINCTRL_GROUP_GPIO_RANGE_PORT(port_range1), - UNIPHIER_PINCTRL_GROUP_GPIO_RANGE_PORT(port_range2), - UNIPHIER_PINCTRL_GROUP_GPIO_RANGE_PORT(port_range3), - UNIPHIER_PINCTRL_GROUP_GPIO_RANGE_PORT(port_range4), - UNIPHIER_PINCTRL_GROUP_GPIO_RANGE_PORT(port_range5), - UNIPHIER_PINCTRL_GROUP_GPIO_RANGE_PORT(port_range6), - UNIPHIER_PINCTRL_GROUP_GPIO_RANGE_IRQ(xirq), - UNIPHIER_PINCTRL_GROUP_GPIO_RANGE_IRQ(xirq_alternatives), - UNIPHIER_PINCTRL_GROUP_SINGLE(port00, port_range0, 0), - UNIPHIER_PINCTRL_GROUP_SINGLE(port01, port_range0, 1), - UNIPHIER_PINCTRL_GROUP_SINGLE(port02, port_range0, 2), - UNIPHIER_PINCTRL_GROUP_SINGLE(port03, port_range0, 3), - UNIPHIER_PINCTRL_GROUP_SINGLE(port04, port_range0, 4), - UNIPHIER_PINCTRL_GROUP_SINGLE(port05, port_range0, 5), - UNIPHIER_PINCTRL_GROUP_SINGLE(port06, port_range0, 6), - UNIPHIER_PINCTRL_GROUP_SINGLE(port07, port_range0, 7), - UNIPHIER_PINCTRL_GROUP_SINGLE(port10, port_range0, 8), - UNIPHIER_PINCTRL_GROUP_SINGLE(port11, port_range0, 9), - UNIPHIER_PINCTRL_GROUP_SINGLE(port12, port_range0, 10), - UNIPHIER_PINCTRL_GROUP_SINGLE(port13, port_range0, 11), - UNIPHIER_PINCTRL_GROUP_SINGLE(port14, port_range0, 12), - UNIPHIER_PINCTRL_GROUP_SINGLE(port15, port_range0, 13), - UNIPHIER_PINCTRL_GROUP_SINGLE(port16, port_range0, 14), - UNIPHIER_PINCTRL_GROUP_SINGLE(port17, port_range0, 15), - UNIPHIER_PINCTRL_GROUP_SINGLE(port20, port_range0, 16), - UNIPHIER_PINCTRL_GROUP_SINGLE(port21, port_range0, 17), - UNIPHIER_PINCTRL_GROUP_SINGLE(port22, port_range0, 18), - UNIPHIER_PINCTRL_GROUP_SINGLE(port23, port_range0, 19), - UNIPHIER_PINCTRL_GROUP_SINGLE(port24, port_range0, 20), - UNIPHIER_PINCTRL_GROUP_SINGLE(port25, port_range0, 21), - UNIPHIER_PINCTRL_GROUP_SINGLE(port26, port_range0, 22), - UNIPHIER_PINCTRL_GROUP_SINGLE(port27, port_range0, 23), - UNIPHIER_PINCTRL_GROUP_SINGLE(port30, port_range0, 24), - UNIPHIER_PINCTRL_GROUP_SINGLE(port31, port_range0, 25), - UNIPHIER_PINCTRL_GROUP_SINGLE(port32, port_range0, 26), - UNIPHIER_PINCTRL_GROUP_SINGLE(port53, port_range1, 0), - UNIPHIER_PINCTRL_GROUP_SINGLE(port54, port_range1, 1), - UNIPHIER_PINCTRL_GROUP_SINGLE(port55, port_range1, 2), - UNIPHIER_PINCTRL_GROUP_SINGLE(port56, port_range1, 3), - UNIPHIER_PINCTRL_GROUP_SINGLE(port57, port_range1, 4), - UNIPHIER_PINCTRL_GROUP_SINGLE(port60, port_range1, 5), - UNIPHIER_PINCTRL_GROUP_SINGLE(port63, port_range2, 0), - UNIPHIER_PINCTRL_GROUP_SINGLE(port64, port_range2, 1), - UNIPHIER_PINCTRL_GROUP_SINGLE(port65, port_range2, 2), - UNIPHIER_PINCTRL_GROUP_SINGLE(port66, port_range2, 3), - UNIPHIER_PINCTRL_GROUP_SINGLE(port67, port_range2, 4), - UNIPHIER_PINCTRL_GROUP_SINGLE(port70, port_range2, 5), - UNIPHIER_PINCTRL_GROUP_SINGLE(port71, port_range2, 6), - UNIPHIER_PINCTRL_GROUP_SINGLE(port72, port_range2, 7), - UNIPHIER_PINCTRL_GROUP_SINGLE(port73, port_range2, 8), - UNIPHIER_PINCTRL_GROUP_SINGLE(port74, port_range2, 9), - UNIPHIER_PINCTRL_GROUP_SINGLE(port75, port_range2, 10), - UNIPHIER_PINCTRL_GROUP_SINGLE(port76, port_range2, 11), - UNIPHIER_PINCTRL_GROUP_SINGLE(port77, port_range2, 12), - UNIPHIER_PINCTRL_GROUP_SINGLE(port80, port_range2, 13), - UNIPHIER_PINCTRL_GROUP_SINGLE(port81, port_range2, 14), - UNIPHIER_PINCTRL_GROUP_SINGLE(port82, port_range2, 15), - UNIPHIER_PINCTRL_GROUP_SINGLE(port83, port_range2, 16), - UNIPHIER_PINCTRL_GROUP_SINGLE(port84, port_range2, 17), - UNIPHIER_PINCTRL_GROUP_SINGLE(port85, port_range2, 18), - UNIPHIER_PINCTRL_GROUP_SINGLE(port86, port_range2, 19), - UNIPHIER_PINCTRL_GROUP_SINGLE(port87, port_range2, 20), - UNIPHIER_PINCTRL_GROUP_SINGLE(port90, port_range2, 21), - UNIPHIER_PINCTRL_GROUP_SINGLE(port91, port_range2, 22), - UNIPHIER_PINCTRL_GROUP_SINGLE(port92, port_range2, 23), - UNIPHIER_PINCTRL_GROUP_SINGLE(port93, port_range2, 24), - UNIPHIER_PINCTRL_GROUP_SINGLE(port94, port_range2, 25), - UNIPHIER_PINCTRL_GROUP_SINGLE(port95, port_range2, 26), - UNIPHIER_PINCTRL_GROUP_SINGLE(port96, port_range2, 27), - UNIPHIER_PINCTRL_GROUP_SINGLE(port97, port_range2, 28), - UNIPHIER_PINCTRL_GROUP_SINGLE(port100, port_range2, 29), - UNIPHIER_PINCTRL_GROUP_SINGLE(port101, port_range2, 30), - UNIPHIER_PINCTRL_GROUP_SINGLE(port102, port_range2, 31), - UNIPHIER_PINCTRL_GROUP_SINGLE(port103, port_range2, 32), - UNIPHIER_PINCTRL_GROUP_SINGLE(port104, port_range2, 33), - UNIPHIER_PINCTRL_GROUP_SINGLE(port105, port_range2, 34), - UNIPHIER_PINCTRL_GROUP_SINGLE(port106, port_range2, 35), - UNIPHIER_PINCTRL_GROUP_SINGLE(port107, port_range2, 36), - UNIPHIER_PINCTRL_GROUP_SINGLE(port120, port_range3, 0), - UNIPHIER_PINCTRL_GROUP_SINGLE(port121, port_range3, 1), - UNIPHIER_PINCTRL_GROUP_SINGLE(port122, port_range3, 2), - UNIPHIER_PINCTRL_GROUP_SINGLE(port123, port_range3, 3), - UNIPHIER_PINCTRL_GROUP_SINGLE(port124, port_range3, 4), - UNIPHIER_PINCTRL_GROUP_SINGLE(port125, port_range3, 5), - UNIPHIER_PINCTRL_GROUP_SINGLE(port126, port_range3, 6), - UNIPHIER_PINCTRL_GROUP_SINGLE(port127, port_range3, 7), - UNIPHIER_PINCTRL_GROUP_SINGLE(port130, port_range3, 8), - UNIPHIER_PINCTRL_GROUP_SINGLE(port131, port_range3, 9), - UNIPHIER_PINCTRL_GROUP_SINGLE(port132, port_range3, 10), - UNIPHIER_PINCTRL_GROUP_SINGLE(port133, port_range3, 11), - UNIPHIER_PINCTRL_GROUP_SINGLE(port134, port_range3, 12), - UNIPHIER_PINCTRL_GROUP_SINGLE(port135, port_range3, 13), - UNIPHIER_PINCTRL_GROUP_SINGLE(port136, port_range3, 14), - UNIPHIER_PINCTRL_GROUP_SINGLE(port137, port_range3, 15), - UNIPHIER_PINCTRL_GROUP_SINGLE(port140, port_range3, 16), - UNIPHIER_PINCTRL_GROUP_SINGLE(port141, port_range3, 17), - UNIPHIER_PINCTRL_GROUP_SINGLE(port142, port_range3, 18), - UNIPHIER_PINCTRL_GROUP_SINGLE(port143, port_range3, 19), - UNIPHIER_PINCTRL_GROUP_SINGLE(port144, port_range3, 20), - UNIPHIER_PINCTRL_GROUP_SINGLE(port145, port_range3, 21), - UNIPHIER_PINCTRL_GROUP_SINGLE(port146, port_range3, 22), - UNIPHIER_PINCTRL_GROUP_SINGLE(port147, port_range3, 23), - UNIPHIER_PINCTRL_GROUP_SINGLE(port180, port_range4, 0), - UNIPHIER_PINCTRL_GROUP_SINGLE(port181, port_range4, 1), - UNIPHIER_PINCTRL_GROUP_SINGLE(port182, port_range4, 2), - UNIPHIER_PINCTRL_GROUP_SINGLE(port183, port_range4, 3), - UNIPHIER_PINCTRL_GROUP_SINGLE(port184, port_range4, 4), - UNIPHIER_PINCTRL_GROUP_SINGLE(port185, port_range4, 5), - UNIPHIER_PINCTRL_GROUP_SINGLE(port186, port_range4, 6), - UNIPHIER_PINCTRL_GROUP_SINGLE(port187, port_range4, 7), - UNIPHIER_PINCTRL_GROUP_SINGLE(port200, port_range5, 0), - UNIPHIER_PINCTRL_GROUP_SINGLE(port201, port_range5, 1), - UNIPHIER_PINCTRL_GROUP_SINGLE(port202, port_range5, 2), - UNIPHIER_PINCTRL_GROUP_SINGLE(port203, port_range5, 3), - UNIPHIER_PINCTRL_GROUP_SINGLE(port204, port_range5, 4), - UNIPHIER_PINCTRL_GROUP_SINGLE(port205, port_range5, 5), - UNIPHIER_PINCTRL_GROUP_SINGLE(port206, port_range5, 6), - UNIPHIER_PINCTRL_GROUP_SINGLE(port207, port_range5, 7), - UNIPHIER_PINCTRL_GROUP_SINGLE(port210, port_range5, 8), - UNIPHIER_PINCTRL_GROUP_SINGLE(port211, port_range5, 9), - UNIPHIER_PINCTRL_GROUP_SINGLE(port212, port_range5, 10), - UNIPHIER_PINCTRL_GROUP_SINGLE(port213, port_range5, 11), - UNIPHIER_PINCTRL_GROUP_SINGLE(port214, port_range5, 12), - UNIPHIER_PINCTRL_GROUP_SINGLE(port215, port_range5, 13), - UNIPHIER_PINCTRL_GROUP_SINGLE(port216, port_range5, 14), - UNIPHIER_PINCTRL_GROUP_SINGLE(port217, port_range5, 15), - UNIPHIER_PINCTRL_GROUP_SINGLE(port220, port_range5, 16), - UNIPHIER_PINCTRL_GROUP_SINGLE(port221, port_range5, 17), - UNIPHIER_PINCTRL_GROUP_SINGLE(port222, port_range5, 18), - UNIPHIER_PINCTRL_GROUP_SINGLE(port223, port_range5, 19), - UNIPHIER_PINCTRL_GROUP_SINGLE(port230, port_range6, 0), - UNIPHIER_PINCTRL_GROUP_SINGLE(port231, port_range6, 1), - UNIPHIER_PINCTRL_GROUP_SINGLE(port232, port_range6, 2), - UNIPHIER_PINCTRL_GROUP_SINGLE(port233, port_range6, 3), - UNIPHIER_PINCTRL_GROUP_SINGLE(port234, port_range6, 4), - UNIPHIER_PINCTRL_GROUP_SINGLE(port235, port_range6, 5), - UNIPHIER_PINCTRL_GROUP_SINGLE(port236, port_range6, 6), - UNIPHIER_PINCTRL_GROUP_SINGLE(port237, port_range6, 7), - UNIPHIER_PINCTRL_GROUP_SINGLE(port240, port_range6, 8), - UNIPHIER_PINCTRL_GROUP_SINGLE(port241, port_range6, 9), - UNIPHIER_PINCTRL_GROUP_SINGLE(port242, port_range6, 10), - UNIPHIER_PINCTRL_GROUP_SINGLE(port243, port_range6, 11), - UNIPHIER_PINCTRL_GROUP_SINGLE(port244, port_range6, 12), - UNIPHIER_PINCTRL_GROUP_SINGLE(port245, port_range6, 13), - UNIPHIER_PINCTRL_GROUP_SINGLE(port246, port_range6, 14), - UNIPHIER_PINCTRL_GROUP_SINGLE(port247, port_range6, 15), - UNIPHIER_PINCTRL_GROUP_SINGLE(xirq0, xirq, 0), - UNIPHIER_PINCTRL_GROUP_SINGLE(xirq1, xirq, 1), - UNIPHIER_PINCTRL_GROUP_SINGLE(xirq2, xirq, 2), - UNIPHIER_PINCTRL_GROUP_SINGLE(xirq3, xirq, 3), - UNIPHIER_PINCTRL_GROUP_SINGLE(xirq4, xirq, 4), - UNIPHIER_PINCTRL_GROUP_SINGLE(xirq5, xirq, 5), - UNIPHIER_PINCTRL_GROUP_SINGLE(xirq6, xirq, 6), - UNIPHIER_PINCTRL_GROUP_SINGLE(xirq7, xirq, 7), - UNIPHIER_PINCTRL_GROUP_SINGLE(xirq8, xirq, 8), - UNIPHIER_PINCTRL_GROUP_SINGLE(xirq9, xirq, 9), - UNIPHIER_PINCTRL_GROUP_SINGLE(xirq10, xirq, 10), - UNIPHIER_PINCTRL_GROUP_SINGLE(xirq11, xirq, 11), - UNIPHIER_PINCTRL_GROUP_SINGLE(xirq12, xirq, 12), - UNIPHIER_PINCTRL_GROUP_SINGLE(xirq13, xirq, 13), - UNIPHIER_PINCTRL_GROUP_SINGLE(xirq14, xirq, 14), - UNIPHIER_PINCTRL_GROUP_SINGLE(xirq15, xirq, 15), - UNIPHIER_PINCTRL_GROUP_SINGLE(xirq16, xirq, 16), - UNIPHIER_PINCTRL_GROUP_SINGLE(xirq17, xirq, 17), - UNIPHIER_PINCTRL_GROUP_SINGLE(xirq18, xirq, 18), - UNIPHIER_PINCTRL_GROUP_SINGLE(xirq19, xirq, 19), - UNIPHIER_PINCTRL_GROUP_SINGLE(xirq20, xirq, 20), - UNIPHIER_PINCTRL_GROUP_SINGLE(xirq21, xirq, 21), - UNIPHIER_PINCTRL_GROUP_SINGLE(xirq22, xirq, 22), - UNIPHIER_PINCTRL_GROUP_SINGLE(xirq23, xirq, 23), - UNIPHIER_PINCTRL_GROUP_SINGLE(xirq0b, xirq_alternatives, 0), - UNIPHIER_PINCTRL_GROUP_SINGLE(xirq1b, xirq_alternatives, 1), - UNIPHIER_PINCTRL_GROUP_SINGLE(xirq2b, xirq_alternatives, 2), - UNIPHIER_PINCTRL_GROUP_SINGLE(xirq3b, xirq_alternatives, 3), - UNIPHIER_PINCTRL_GROUP_SINGLE(xirq4b, xirq_alternatives, 4), - UNIPHIER_PINCTRL_GROUP_SINGLE(xirq5b, xirq_alternatives, 5), - UNIPHIER_PINCTRL_GROUP_SINGLE(xirq6b, xirq_alternatives, 6), - UNIPHIER_PINCTRL_GROUP_SINGLE(xirq7b, xirq_alternatives, 7), - UNIPHIER_PINCTRL_GROUP_SINGLE(xirq8b, xirq_alternatives, 8), - UNIPHIER_PINCTRL_GROUP_SINGLE(xirq9b, xirq_alternatives, 9), - UNIPHIER_PINCTRL_GROUP_SINGLE(xirq10b, xirq_alternatives, 10), - UNIPHIER_PINCTRL_GROUP_SINGLE(xirq11b, xirq_alternatives, 11), - UNIPHIER_PINCTRL_GROUP_SINGLE(xirq13b, xirq_alternatives, 12), - UNIPHIER_PINCTRL_GROUP_SINGLE(xirq14b, xirq_alternatives, 13), - UNIPHIER_PINCTRL_GROUP_SINGLE(xirq16b, xirq_alternatives, 14), - UNIPHIER_PINCTRL_GROUP_SINGLE(xirq17b, xirq_alternatives, 15), - UNIPHIER_PINCTRL_GROUP_SINGLE(xirq18b, xirq_alternatives, 16), - UNIPHIER_PINCTRL_GROUP_SINGLE(xirq19b, xirq_alternatives, 17), - UNIPHIER_PINCTRL_GROUP_SINGLE(xirq20b, xirq_alternatives, 18), - UNIPHIER_PINCTRL_GROUP_SINGLE(xirq21b, xirq_alternatives, 19), - UNIPHIER_PINCTRL_GROUP_SINGLE(xirq22b, xirq_alternatives, 20), - UNIPHIER_PINCTRL_GROUP_SINGLE(xirq23b, xirq_alternatives, 21), - UNIPHIER_PINCTRL_GROUP_SINGLE(xirq4c, xirq_alternatives, 22), - UNIPHIER_PINCTRL_GROUP_SINGLE(xirq5c, xirq_alternatives, 23), - UNIPHIER_PINCTRL_GROUP_SINGLE(xirq6c, xirq_alternatives, 24), - UNIPHIER_PINCTRL_GROUP_SINGLE(xirq7c, xirq_alternatives, 25), - UNIPHIER_PINCTRL_GROUP_SINGLE(xirq8c, xirq_alternatives, 26), - UNIPHIER_PINCTRL_GROUP_SINGLE(xirq9c, xirq_alternatives, 27), - UNIPHIER_PINCTRL_GROUP_SINGLE(xirq10c, xirq_alternatives, 28), - UNIPHIER_PINCTRL_GROUP_SINGLE(xirq11c, xirq_alternatives, 29), - UNIPHIER_PINCTRL_GROUP_SINGLE(xirq13c, xirq_alternatives, 30), - UNIPHIER_PINCTRL_GROUP_SINGLE(xirq14c, xirq_alternatives, 31), - UNIPHIER_PINCTRL_GROUP_SINGLE(xirq16c, xirq_alternatives, 32), - UNIPHIER_PINCTRL_GROUP_SINGLE(xirq17c, xirq_alternatives, 33), - UNIPHIER_PINCTRL_GROUP_SINGLE(xirq18c, xirq_alternatives, 34), - UNIPHIER_PINCTRL_GROUP_SINGLE(xirq19c, xirq_alternatives, 35), - UNIPHIER_PINCTRL_GROUP_SINGLE(xirq20c, xirq_alternatives, 36), - UNIPHIER_PINCTRL_GROUP_SINGLE(xirq21c, xirq_alternatives, 37), - UNIPHIER_PINCTRL_GROUP_SINGLE(xirq22c, xirq_alternatives, 38), - UNIPHIER_PINCTRL_GROUP_SINGLE(xirq23c, xirq_alternatives, 39), - UNIPHIER_PINCTRL_GROUP_SINGLE(xirq17d, xirq_alternatives, 40), - UNIPHIER_PINCTRL_GROUP_SINGLE(xirq18d, xirq_alternatives, 41), - UNIPHIER_PINCTRL_GROUP_SINGLE(xirq21d, xirq_alternatives, 42), - UNIPHIER_PINCTRL_GROUP_SINGLE(xirq22d, xirq_alternatives, 43), + UNIPHIER_PINCTRL_GROUP_GPIO(gpio_range0), + UNIPHIER_PINCTRL_GROUP_GPIO(gpio_range1), + UNIPHIER_PINCTRL_GROUP_GPIO(gpio_range2), + UNIPHIER_PINCTRL_GROUP_GPIO(gpio_range3), + UNIPHIER_PINCTRL_GROUP_GPIO(gpio_range4), + UNIPHIER_PINCTRL_GROUP_GPIO(gpio_range5), }; +static const char * const aout_groups[] = {"aout"}; static const char * const emmc_groups[] = {"emmc", "emmc_dat8"}; static const char * const ether_rmii_groups[] = {"ether_rmii"}; static const char * const i2c0_groups[] = {"i2c0"}; @@ -854,70 +590,9 @@ static const char * const uart3_groups[] = {"uart3"}; static const char * const usb0_groups[] = {"usb0"}; static const char * const usb1_groups[] = {"usb1"}; static const char * const usb2_groups[] = {"usb2"}; -static const char * const port_groups[] = { - "port00", "port01", "port02", "port03", - "port04", "port05", "port06", "port07", - "port10", "port11", "port12", "port13", - "port14", "port15", "port16", "port17", - "port20", "port21", "port22", "port23", - "port24", "port25", "port26", "port27", - "port30", "port31", "port32", - /* port33-52 missing */ "port53", - "port54", "port55", "port56", "port57", - "port60", /* port61-62 missing*/ "port63", - "port64", "port65", "port66", "port67", - "port70", "port71", "port72", "port73", - "port74", "port75", "port76", "port77", - "port80", "port81", "port82", "port83", - "port84", "port85", "port86", "port87", - "port90", "port91", "port92", "port93", - "port94", "port95", "port96", "port97", - "port100", "port101", "port102", "port103", - "port104", "port105", "port106", "port107", - /* port110-117 missing */ - "port120", "port121", "port122", "port123", - "port124", "port125", "port126", "port127", - "port130", "port131", "port132", "port133", - "port134", "port135", "port136", "port137", - "port140", "port141", "port142", "port143", - "port144", "port145", "port146", "port147", - /* port150-177 missing */ - "port180", "port181", "port182", "port183", - "port184", "port185", "port186", "port187", - /* port190-197 missing */ - "port200", "port201", "port202", "port203", - "port204", "port205", "port206", "port207", - "port210", "port211", "port212", "port213", - "port214", "port215", "port216", "port217", - "port220", "port221", "port222", "port223", - /* port224-227 missing */ - "port230", "port231", "port232", "port233", - "port234", "port235", "port236", "port237", - "port240", "port241", "port242", "port243", - "port244", "port245", "port246", "port247", -}; -static const char * const xirq_groups[] = { - "xirq0", "xirq1", "xirq2", "xirq3", - "xirq4", "xirq5", "xirq6", "xirq7", - "xirq8", "xirq9", "xirq10", "xirq11", - "xirq12", "xirq13", "xirq14", "xirq15", - "xirq16", "xirq17", "xirq18", "xirq19", - "xirq20", "xirq21", "xirq22", "xirq23", - "xirq0b", "xirq1b", "xirq2b", "xirq3b", - "xirq4b", "xirq5b", "xirq6b", "xirq7b", - "xirq8b", "xirq9b", "xirq10b", "xirq11b", - /* none */ "xirq13b", "xirq14b", /* none */ - "xirq16b", "xirq17b", "xirq18b", "xirq19b", - "xirq20b", "xirq21b", "xirq22b", "xirq23b", - "xirq4c", "xirq5c", "xirq6c", "xirq7c", - "xirq8c", "xirq9c", "xirq10c", "xirq11c", - /* none */ "xirq13c", "xirq14c", /* none */ - "xirq16c", "xirq17c", "xirq18c", "xirq19c", - "xirq20c", "xirq21c", "xirq22c", "xirq23c", - "xirq17d", "xirq18d", "xirq21d", "xirq22d", -}; static const struct uniphier_pinmux_function uniphier_ld11_functions[] = { + UNIPHIER_PINMUX_FUNCTION(aout), UNIPHIER_PINMUX_FUNCTION(emmc), UNIPHIER_PINMUX_FUNCTION(ether_rmii), UNIPHIER_PINMUX_FUNCTION(i2c0), @@ -933,10 +608,20 @@ static const struct uniphier_pinmux_function uniphier_ld11_functions[] = { UNIPHIER_PINMUX_FUNCTION(usb0), UNIPHIER_PINMUX_FUNCTION(usb1), UNIPHIER_PINMUX_FUNCTION(usb2), - UNIPHIER_PINMUX_FUNCTION(port), - UNIPHIER_PINMUX_FUNCTION(xirq), }; +static int uniphier_ld11_get_gpio_muxval(unsigned int pin, + unsigned int gpio_offset) +{ + if (gpio_offset == 132 || gpio_offset == 135) /* XIRQ12, 15 */ + return 13; + + if (gpio_offset >= 120 && gpio_offset <= 143) /* XIRQx */ + return 14; + + return 15; +} + static struct uniphier_pinctrl_socdata uniphier_ld11_pindata = { .pins = uniphier_ld11_pins, .npins = ARRAY_SIZE(uniphier_ld11_pins), @@ -944,6 +629,7 @@ static struct uniphier_pinctrl_socdata uniphier_ld11_pindata = { .groups_count = ARRAY_SIZE(uniphier_ld11_groups), .functions = uniphier_ld11_functions, .functions_count = ARRAY_SIZE(uniphier_ld11_functions), + .get_gpio_muxval = uniphier_ld11_get_gpio_muxval, .caps = UNIPHIER_PINCTRL_CAPS_PERPIN_IECTRL, }; @@ -962,6 +648,7 @@ static struct platform_driver uniphier_ld11_pinctrl_driver = { .driver = { .name = "uniphier-ld11-pinctrl", .of_match_table = uniphier_ld11_pinctrl_match, + .pm = &uniphier_pinctrl_pm_ops, }, }; builtin_platform_driver(uniphier_ld11_pinctrl_driver); diff --git a/drivers/pinctrl/uniphier/pinctrl-uniphier-ld20.c b/drivers/pinctrl/uniphier/pinctrl-uniphier-ld20.c index 93006626028d..83341284dc44 100644 --- a/drivers/pinctrl/uniphier/pinctrl-uniphier-ld20.c +++ b/drivers/pinctrl/uniphier/pinctrl-uniphier-ld20.c @@ -21,536 +21,538 @@ #include "pinctrl-uniphier.h" static const struct pinctrl_pin_desc uniphier_ld20_pins[] = { - UNIPHIER_PINCTRL_PIN(0, "XECS1", 0, + UNIPHIER_PINCTRL_PIN(0, "XECS1", UNIPHIER_PIN_IECTRL_EXIST, 0, UNIPHIER_PIN_DRV_3BIT, 0, UNIPHIER_PIN_PULL_UP), - UNIPHIER_PINCTRL_PIN(1, "ERXW", 1, + UNIPHIER_PINCTRL_PIN(1, "ERXW", UNIPHIER_PIN_IECTRL_EXIST, 1, UNIPHIER_PIN_DRV_3BIT, 1, UNIPHIER_PIN_PULL_UP), - UNIPHIER_PINCTRL_PIN(2, "XERWE1", 2, + UNIPHIER_PINCTRL_PIN(2, "XERWE1", UNIPHIER_PIN_IECTRL_EXIST, 2, UNIPHIER_PIN_DRV_3BIT, 2, UNIPHIER_PIN_PULL_UP), - UNIPHIER_PINCTRL_PIN(3, "XNFWP", 3, + UNIPHIER_PINCTRL_PIN(3, "XNFWP", UNIPHIER_PIN_IECTRL_EXIST, 3, UNIPHIER_PIN_DRV_3BIT, 3, UNIPHIER_PIN_PULL_DOWN), - UNIPHIER_PINCTRL_PIN(4, "XNFCE0", 4, + UNIPHIER_PINCTRL_PIN(4, "XNFCE0", UNIPHIER_PIN_IECTRL_EXIST, 4, UNIPHIER_PIN_DRV_3BIT, 4, UNIPHIER_PIN_PULL_UP), - UNIPHIER_PINCTRL_PIN(5, "NFRYBY0", 5, + UNIPHIER_PINCTRL_PIN(5, "NFRYBY0", UNIPHIER_PIN_IECTRL_EXIST, 5, UNIPHIER_PIN_DRV_3BIT, 5, UNIPHIER_PIN_PULL_UP), - UNIPHIER_PINCTRL_PIN(6, "XNFRE", 6, + UNIPHIER_PINCTRL_PIN(6, "XNFRE", UNIPHIER_PIN_IECTRL_EXIST, 6, UNIPHIER_PIN_DRV_3BIT, 6, UNIPHIER_PIN_PULL_UP), - UNIPHIER_PINCTRL_PIN(7, "XNFWE", 7, + UNIPHIER_PINCTRL_PIN(7, "XNFWE", UNIPHIER_PIN_IECTRL_EXIST, 7, UNIPHIER_PIN_DRV_3BIT, 7, UNIPHIER_PIN_PULL_UP), - UNIPHIER_PINCTRL_PIN(8, "NFALE", 8, + UNIPHIER_PINCTRL_PIN(8, "NFALE", UNIPHIER_PIN_IECTRL_EXIST, 8, UNIPHIER_PIN_DRV_3BIT, 8, UNIPHIER_PIN_PULL_UP), - UNIPHIER_PINCTRL_PIN(9, "NFCLE", 9, + UNIPHIER_PINCTRL_PIN(9, "NFCLE", UNIPHIER_PIN_IECTRL_EXIST, 9, UNIPHIER_PIN_DRV_3BIT, 9, UNIPHIER_PIN_PULL_UP), - UNIPHIER_PINCTRL_PIN(10, "NFD0", 10, + UNIPHIER_PINCTRL_PIN(10, "NFD0", UNIPHIER_PIN_IECTRL_EXIST, 10, UNIPHIER_PIN_DRV_3BIT, 10, UNIPHIER_PIN_PULL_UP), - UNIPHIER_PINCTRL_PIN(11, "NFD1", 11, + UNIPHIER_PINCTRL_PIN(11, "NFD1", UNIPHIER_PIN_IECTRL_EXIST, 11, UNIPHIER_PIN_DRV_3BIT, 11, UNIPHIER_PIN_PULL_UP), - UNIPHIER_PINCTRL_PIN(12, "NFD2", 12, + UNIPHIER_PINCTRL_PIN(12, "NFD2", UNIPHIER_PIN_IECTRL_EXIST, 12, UNIPHIER_PIN_DRV_3BIT, 12, UNIPHIER_PIN_PULL_UP), - UNIPHIER_PINCTRL_PIN(13, "NFD3", 13, + UNIPHIER_PINCTRL_PIN(13, "NFD3", UNIPHIER_PIN_IECTRL_EXIST, 13, UNIPHIER_PIN_DRV_3BIT, 13, UNIPHIER_PIN_PULL_UP), - UNIPHIER_PINCTRL_PIN(14, "NFD4", 14, + UNIPHIER_PINCTRL_PIN(14, "NFD4", UNIPHIER_PIN_IECTRL_EXIST, 14, UNIPHIER_PIN_DRV_3BIT, 14, UNIPHIER_PIN_PULL_UP), - UNIPHIER_PINCTRL_PIN(15, "NFD5", 15, + UNIPHIER_PINCTRL_PIN(15, "NFD5", UNIPHIER_PIN_IECTRL_EXIST, 15, UNIPHIER_PIN_DRV_3BIT, 15, UNIPHIER_PIN_PULL_UP), - UNIPHIER_PINCTRL_PIN(16, "NFD6", 16, + UNIPHIER_PINCTRL_PIN(16, "NFD6", UNIPHIER_PIN_IECTRL_EXIST, 16, UNIPHIER_PIN_DRV_3BIT, 16, UNIPHIER_PIN_PULL_UP), - UNIPHIER_PINCTRL_PIN(17, "NFD7", 17, + UNIPHIER_PINCTRL_PIN(17, "NFD7", UNIPHIER_PIN_IECTRL_EXIST, 17, UNIPHIER_PIN_DRV_3BIT, 17, UNIPHIER_PIN_PULL_UP), - UNIPHIER_PINCTRL_PIN(18, "XERST", 18, + UNIPHIER_PINCTRL_PIN(18, "XERST", UNIPHIER_PIN_IECTRL_EXIST, 0, UNIPHIER_PIN_DRV_2BIT, 18, UNIPHIER_PIN_PULL_UP), - UNIPHIER_PINCTRL_PIN(19, "MMCCLK", 19, + UNIPHIER_PINCTRL_PIN(19, "MMCCLK", UNIPHIER_PIN_IECTRL_EXIST, 1, UNIPHIER_PIN_DRV_2BIT, 19, UNIPHIER_PIN_PULL_UP), - UNIPHIER_PINCTRL_PIN(20, "MMCCMD", 20, + UNIPHIER_PINCTRL_PIN(20, "MMCCMD", UNIPHIER_PIN_IECTRL_EXIST, 2, UNIPHIER_PIN_DRV_2BIT, 20, UNIPHIER_PIN_PULL_UP), - UNIPHIER_PINCTRL_PIN(21, "MMCDS", 21, + UNIPHIER_PINCTRL_PIN(21, "MMCDS", UNIPHIER_PIN_IECTRL_EXIST, 3, UNIPHIER_PIN_DRV_2BIT, 21, UNIPHIER_PIN_PULL_UP), - UNIPHIER_PINCTRL_PIN(22, "MMCDAT0", 22, + UNIPHIER_PINCTRL_PIN(22, "MMCDAT0", UNIPHIER_PIN_IECTRL_EXIST, 4, UNIPHIER_PIN_DRV_2BIT, 22, UNIPHIER_PIN_PULL_UP), - UNIPHIER_PINCTRL_PIN(23, "MMCDAT1", 23, + UNIPHIER_PINCTRL_PIN(23, "MMCDAT1", UNIPHIER_PIN_IECTRL_EXIST, 5, UNIPHIER_PIN_DRV_2BIT, 23, UNIPHIER_PIN_PULL_UP), - UNIPHIER_PINCTRL_PIN(24, "MMCDAT2", 24, + UNIPHIER_PINCTRL_PIN(24, "MMCDAT2", UNIPHIER_PIN_IECTRL_EXIST, 6, UNIPHIER_PIN_DRV_2BIT, 24, UNIPHIER_PIN_PULL_UP), - UNIPHIER_PINCTRL_PIN(25, "MMCDAT3", 25, + UNIPHIER_PINCTRL_PIN(25, "MMCDAT3", UNIPHIER_PIN_IECTRL_EXIST, 7, UNIPHIER_PIN_DRV_2BIT, 25, UNIPHIER_PIN_PULL_UP), - UNIPHIER_PINCTRL_PIN(26, "MMCDAT4", 26, + UNIPHIER_PINCTRL_PIN(26, "MMCDAT4", UNIPHIER_PIN_IECTRL_EXIST, 8, UNIPHIER_PIN_DRV_2BIT, 26, UNIPHIER_PIN_PULL_UP), - UNIPHIER_PINCTRL_PIN(27, "MMCDAT5", 27, + UNIPHIER_PINCTRL_PIN(27, "MMCDAT5", UNIPHIER_PIN_IECTRL_EXIST, 9, UNIPHIER_PIN_DRV_2BIT, 27, UNIPHIER_PIN_PULL_UP), - UNIPHIER_PINCTRL_PIN(28, "MMCDAT6", 28, + UNIPHIER_PINCTRL_PIN(28, "MMCDAT6", UNIPHIER_PIN_IECTRL_EXIST, 10, UNIPHIER_PIN_DRV_2BIT, 28, UNIPHIER_PIN_PULL_UP), - UNIPHIER_PINCTRL_PIN(29, "MMCDAT7", 29, + UNIPHIER_PINCTRL_PIN(29, "MMCDAT7", UNIPHIER_PIN_IECTRL_EXIST, 11, UNIPHIER_PIN_DRV_2BIT, 29, UNIPHIER_PIN_PULL_UP), - UNIPHIER_PINCTRL_PIN(30, "MDC", 30, + UNIPHIER_PINCTRL_PIN(30, "MDC", UNIPHIER_PIN_IECTRL_EXIST, 18, UNIPHIER_PIN_DRV_3BIT, 30, UNIPHIER_PIN_PULL_DOWN), - UNIPHIER_PINCTRL_PIN(31, "MDIO", 31, + UNIPHIER_PINCTRL_PIN(31, "MDIO", UNIPHIER_PIN_IECTRL_EXIST, 19, UNIPHIER_PIN_DRV_3BIT, 31, UNIPHIER_PIN_PULL_DOWN), - UNIPHIER_PINCTRL_PIN(32, "MDIO_INTL", 32, + UNIPHIER_PINCTRL_PIN(32, "MDIO_INTL", UNIPHIER_PIN_IECTRL_EXIST, 20, UNIPHIER_PIN_DRV_3BIT, 32, UNIPHIER_PIN_PULL_DOWN), - UNIPHIER_PINCTRL_PIN(33, "PHYRSTL", 33, + UNIPHIER_PINCTRL_PIN(33, "PHYRSTL", UNIPHIER_PIN_IECTRL_EXIST, 21, UNIPHIER_PIN_DRV_3BIT, 33, UNIPHIER_PIN_PULL_DOWN), - UNIPHIER_PINCTRL_PIN(34, "RGMII_RXCLK", 34, + UNIPHIER_PINCTRL_PIN(34, "RGMII_RXCLK", UNIPHIER_PIN_IECTRL_EXIST, 22, UNIPHIER_PIN_DRV_3BIT, 34, UNIPHIER_PIN_PULL_DOWN), - UNIPHIER_PINCTRL_PIN(35, "RGMII_RXD0", 35, + UNIPHIER_PINCTRL_PIN(35, "RGMII_RXD0", UNIPHIER_PIN_IECTRL_EXIST, 23, UNIPHIER_PIN_DRV_3BIT, 35, UNIPHIER_PIN_PULL_DOWN), - UNIPHIER_PINCTRL_PIN(36, "RGMII_RXD1", 36, + UNIPHIER_PINCTRL_PIN(36, "RGMII_RXD1", UNIPHIER_PIN_IECTRL_EXIST, 24, UNIPHIER_PIN_DRV_3BIT, 36, UNIPHIER_PIN_PULL_DOWN), - UNIPHIER_PINCTRL_PIN(37, "RGMII_RXD2", 37, + UNIPHIER_PINCTRL_PIN(37, "RGMII_RXD2", UNIPHIER_PIN_IECTRL_EXIST, 25, UNIPHIER_PIN_DRV_3BIT, 37, UNIPHIER_PIN_PULL_DOWN), - UNIPHIER_PINCTRL_PIN(38, "RGMII_RXD3", 38, + UNIPHIER_PINCTRL_PIN(38, "RGMII_RXD3", UNIPHIER_PIN_IECTRL_EXIST, 26, UNIPHIER_PIN_DRV_3BIT, 38, UNIPHIER_PIN_PULL_DOWN), - UNIPHIER_PINCTRL_PIN(39, "RGMII_RXCTL", 39, + UNIPHIER_PINCTRL_PIN(39, "RGMII_RXCTL", UNIPHIER_PIN_IECTRL_EXIST, 27, UNIPHIER_PIN_DRV_3BIT, 39, UNIPHIER_PIN_PULL_DOWN), - UNIPHIER_PINCTRL_PIN(40, "RGMII_TXCLK", 40, + UNIPHIER_PINCTRL_PIN(40, "RGMII_TXCLK", UNIPHIER_PIN_IECTRL_EXIST, 28, UNIPHIER_PIN_DRV_3BIT, 40, UNIPHIER_PIN_PULL_DOWN), - UNIPHIER_PINCTRL_PIN(41, "RGMII_TXD0", 41, + UNIPHIER_PINCTRL_PIN(41, "RGMII_TXD0", UNIPHIER_PIN_IECTRL_EXIST, 29, UNIPHIER_PIN_DRV_3BIT, 41, UNIPHIER_PIN_PULL_DOWN), - UNIPHIER_PINCTRL_PIN(42, "RGMII_TXD1", 42, + UNIPHIER_PINCTRL_PIN(42, "RGMII_TXD1", UNIPHIER_PIN_IECTRL_EXIST, 30, UNIPHIER_PIN_DRV_3BIT, 42, UNIPHIER_PIN_PULL_DOWN), - UNIPHIER_PINCTRL_PIN(43, "RGMII_TXD2", 43, + UNIPHIER_PINCTRL_PIN(43, "RGMII_TXD2", UNIPHIER_PIN_IECTRL_EXIST, 31, UNIPHIER_PIN_DRV_3BIT, 43, UNIPHIER_PIN_PULL_DOWN), - UNIPHIER_PINCTRL_PIN(44, "RGMII_TXD3", 44, + UNIPHIER_PINCTRL_PIN(44, "RGMII_TXD3", UNIPHIER_PIN_IECTRL_EXIST, 32, UNIPHIER_PIN_DRV_3BIT, 44, UNIPHIER_PIN_PULL_DOWN), - UNIPHIER_PINCTRL_PIN(45, "RGMII_TXCTL", 45, + UNIPHIER_PINCTRL_PIN(45, "RGMII_TXCTL", UNIPHIER_PIN_IECTRL_EXIST, 33, UNIPHIER_PIN_DRV_3BIT, 45, UNIPHIER_PIN_PULL_DOWN), - UNIPHIER_PINCTRL_PIN(46, "USB0VBUS", 46, + UNIPHIER_PINCTRL_PIN(46, "USB0VBUS", UNIPHIER_PIN_IECTRL_EXIST, 34, UNIPHIER_PIN_DRV_3BIT, 46, UNIPHIER_PIN_PULL_DOWN), - UNIPHIER_PINCTRL_PIN(47, "USB0OD", 47, + UNIPHIER_PINCTRL_PIN(47, "USB0OD", UNIPHIER_PIN_IECTRL_EXIST, 35, UNIPHIER_PIN_DRV_3BIT, 47, UNIPHIER_PIN_PULL_UP), - UNIPHIER_PINCTRL_PIN(48, "USB1VBUS", 48, + UNIPHIER_PINCTRL_PIN(48, "USB1VBUS", UNIPHIER_PIN_IECTRL_EXIST, 36, UNIPHIER_PIN_DRV_3BIT, 48, UNIPHIER_PIN_PULL_DOWN), - UNIPHIER_PINCTRL_PIN(49, "USB1OD", 49, + UNIPHIER_PINCTRL_PIN(49, "USB1OD", UNIPHIER_PIN_IECTRL_EXIST, 37, UNIPHIER_PIN_DRV_3BIT, 49, UNIPHIER_PIN_PULL_UP), - UNIPHIER_PINCTRL_PIN(50, "USB2VBUS", 50, + UNIPHIER_PINCTRL_PIN(50, "USB2VBUS", UNIPHIER_PIN_IECTRL_EXIST, 38, UNIPHIER_PIN_DRV_3BIT, 50, UNIPHIER_PIN_PULL_DOWN), - UNIPHIER_PINCTRL_PIN(51, "USB2OD", 51, + UNIPHIER_PINCTRL_PIN(51, "USB2OD", UNIPHIER_PIN_IECTRL_EXIST, 39, UNIPHIER_PIN_DRV_3BIT, 51, UNIPHIER_PIN_PULL_UP), - UNIPHIER_PINCTRL_PIN(52, "USB3VBUS", 52, + UNIPHIER_PINCTRL_PIN(52, "USB3VBUS", UNIPHIER_PIN_IECTRL_EXIST, 40, UNIPHIER_PIN_DRV_3BIT, 52, UNIPHIER_PIN_PULL_DOWN), - UNIPHIER_PINCTRL_PIN(53, "USB3OD", 53, + UNIPHIER_PINCTRL_PIN(53, "USB3OD", UNIPHIER_PIN_IECTRL_EXIST, 41, UNIPHIER_PIN_DRV_3BIT, 53, UNIPHIER_PIN_PULL_UP), - UNIPHIER_PINCTRL_PIN(54, "TXD0", 54, + UNIPHIER_PINCTRL_PIN(54, "TXD0", UNIPHIER_PIN_IECTRL_EXIST, 42, UNIPHIER_PIN_DRV_3BIT, 54, UNIPHIER_PIN_PULL_UP), - UNIPHIER_PINCTRL_PIN(55, "RXD0", 55, + UNIPHIER_PINCTRL_PIN(55, "RXD0", UNIPHIER_PIN_IECTRL_EXIST, 43, UNIPHIER_PIN_DRV_3BIT, 55, UNIPHIER_PIN_PULL_UP), - UNIPHIER_PINCTRL_PIN(56, "SPISYNC0", 56, + UNIPHIER_PINCTRL_PIN(56, "SPISYNC0", UNIPHIER_PIN_IECTRL_EXIST, 44, UNIPHIER_PIN_DRV_3BIT, 56, UNIPHIER_PIN_PULL_DOWN), - UNIPHIER_PINCTRL_PIN(57, "SPISCLK0", 57, + UNIPHIER_PINCTRL_PIN(57, "SPISCLK0", UNIPHIER_PIN_IECTRL_EXIST, 45, UNIPHIER_PIN_DRV_3BIT, 57, UNIPHIER_PIN_PULL_DOWN), - UNIPHIER_PINCTRL_PIN(58, "SPITXD0", 58, + UNIPHIER_PINCTRL_PIN(58, "SPITXD0", UNIPHIER_PIN_IECTRL_EXIST, 46, UNIPHIER_PIN_DRV_3BIT, 58, UNIPHIER_PIN_PULL_DOWN), - UNIPHIER_PINCTRL_PIN(59, "SPIRXD0", 59, + UNIPHIER_PINCTRL_PIN(59, "SPIRXD0", UNIPHIER_PIN_IECTRL_EXIST, 47, UNIPHIER_PIN_DRV_3BIT, 59, UNIPHIER_PIN_PULL_DOWN), - UNIPHIER_PINCTRL_PIN(60, "AGCI", 60, + UNIPHIER_PINCTRL_PIN(60, "AGCI", UNIPHIER_PIN_IECTRL_EXIST, 48, UNIPHIER_PIN_DRV_3BIT, 60, UNIPHIER_PIN_PULL_DOWN), - UNIPHIER_PINCTRL_PIN(61, "DMDSDA0", 61, + UNIPHIER_PINCTRL_PIN(61, "DMDSDA0", UNIPHIER_PIN_IECTRL_EXIST, -1, UNIPHIER_PIN_DRV_FIXED4, -1, UNIPHIER_PIN_PULL_NONE), - UNIPHIER_PINCTRL_PIN(62, "DMDSCL0", 62, + UNIPHIER_PINCTRL_PIN(62, "DMDSCL0", UNIPHIER_PIN_IECTRL_EXIST, -1, UNIPHIER_PIN_DRV_FIXED4, -1, UNIPHIER_PIN_PULL_NONE), - UNIPHIER_PINCTRL_PIN(63, "SDA0", 63, + UNIPHIER_PINCTRL_PIN(63, "SDA0", UNIPHIER_PIN_IECTRL_EXIST, -1, UNIPHIER_PIN_DRV_FIXED4, -1, UNIPHIER_PIN_PULL_NONE), - UNIPHIER_PINCTRL_PIN(64, "SCL0", 64, + UNIPHIER_PINCTRL_PIN(64, "SCL0", UNIPHIER_PIN_IECTRL_EXIST, -1, UNIPHIER_PIN_DRV_FIXED4, -1, UNIPHIER_PIN_PULL_NONE), - UNIPHIER_PINCTRL_PIN(65, "SDA1", 65, + UNIPHIER_PINCTRL_PIN(65, "SDA1", UNIPHIER_PIN_IECTRL_EXIST, -1, UNIPHIER_PIN_DRV_FIXED4, -1, UNIPHIER_PIN_PULL_NONE), - UNIPHIER_PINCTRL_PIN(66, "SCL1", 66, + UNIPHIER_PINCTRL_PIN(66, "SCL1", UNIPHIER_PIN_IECTRL_EXIST, -1, UNIPHIER_PIN_DRV_FIXED4, -1, UNIPHIER_PIN_PULL_NONE), - UNIPHIER_PINCTRL_PIN(67, "HIN", 67, + UNIPHIER_PINCTRL_PIN(67, "HIN", UNIPHIER_PIN_IECTRL_EXIST, -1, UNIPHIER_PIN_DRV_FIXED4, -1, UNIPHIER_PIN_PULL_NONE), - UNIPHIER_PINCTRL_PIN(68, "VIN", 68, + UNIPHIER_PINCTRL_PIN(68, "VIN", UNIPHIER_PIN_IECTRL_EXIST, -1, UNIPHIER_PIN_DRV_FIXED4, -1, UNIPHIER_PIN_PULL_NONE), - UNIPHIER_PINCTRL_PIN(69, "PCA00", 69, + UNIPHIER_PINCTRL_PIN(69, "PCA00", UNIPHIER_PIN_IECTRL_EXIST, 49, UNIPHIER_PIN_DRV_3BIT, 69, UNIPHIER_PIN_PULL_DOWN), - UNIPHIER_PINCTRL_PIN(70, "PCA01", 70, + UNIPHIER_PINCTRL_PIN(70, "PCA01", UNIPHIER_PIN_IECTRL_EXIST, 50, UNIPHIER_PIN_DRV_3BIT, 70, UNIPHIER_PIN_PULL_DOWN), - UNIPHIER_PINCTRL_PIN(71, "PCA02", 71, + UNIPHIER_PINCTRL_PIN(71, "PCA02", UNIPHIER_PIN_IECTRL_EXIST, 51, UNIPHIER_PIN_DRV_3BIT, 71, UNIPHIER_PIN_PULL_DOWN), - UNIPHIER_PINCTRL_PIN(72, "PCA03", 72, + UNIPHIER_PINCTRL_PIN(72, "PCA03", UNIPHIER_PIN_IECTRL_EXIST, 52, UNIPHIER_PIN_DRV_3BIT, 72, UNIPHIER_PIN_PULL_DOWN), - UNIPHIER_PINCTRL_PIN(73, "PCA04", 73, + UNIPHIER_PINCTRL_PIN(73, "PCA04", UNIPHIER_PIN_IECTRL_EXIST, 53, UNIPHIER_PIN_DRV_3BIT, 73, UNIPHIER_PIN_PULL_DOWN), - UNIPHIER_PINCTRL_PIN(74, "PCA05", 74, + UNIPHIER_PINCTRL_PIN(74, "PCA05", UNIPHIER_PIN_IECTRL_EXIST, 54, UNIPHIER_PIN_DRV_3BIT, 74, UNIPHIER_PIN_PULL_DOWN), - UNIPHIER_PINCTRL_PIN(75, "PCA06", 75, + UNIPHIER_PINCTRL_PIN(75, "PCA06", UNIPHIER_PIN_IECTRL_EXIST, 55, UNIPHIER_PIN_DRV_3BIT, 75, UNIPHIER_PIN_PULL_DOWN), - UNIPHIER_PINCTRL_PIN(76, "PCA07", 76, + UNIPHIER_PINCTRL_PIN(76, "PCA07", UNIPHIER_PIN_IECTRL_EXIST, 56, UNIPHIER_PIN_DRV_3BIT, 76, UNIPHIER_PIN_PULL_DOWN), - UNIPHIER_PINCTRL_PIN(77, "PCA08", 77, + UNIPHIER_PINCTRL_PIN(77, "PCA08", UNIPHIER_PIN_IECTRL_EXIST, 57, UNIPHIER_PIN_DRV_3BIT, 77, UNIPHIER_PIN_PULL_DOWN), - UNIPHIER_PINCTRL_PIN(78, "PCA09", 78, + UNIPHIER_PINCTRL_PIN(78, "PCA09", UNIPHIER_PIN_IECTRL_EXIST, 58, UNIPHIER_PIN_DRV_3BIT, 78, UNIPHIER_PIN_PULL_DOWN), - UNIPHIER_PINCTRL_PIN(79, "PCA10", 79, + UNIPHIER_PINCTRL_PIN(79, "PCA10", UNIPHIER_PIN_IECTRL_EXIST, 59, UNIPHIER_PIN_DRV_3BIT, 79, UNIPHIER_PIN_PULL_DOWN), - UNIPHIER_PINCTRL_PIN(80, "PCA11", 80, + UNIPHIER_PINCTRL_PIN(80, "PCA11", UNIPHIER_PIN_IECTRL_EXIST, 60, UNIPHIER_PIN_DRV_3BIT, 80, UNIPHIER_PIN_PULL_DOWN), - UNIPHIER_PINCTRL_PIN(81, "PCA12", 81, + UNIPHIER_PINCTRL_PIN(81, "PCA12", UNIPHIER_PIN_IECTRL_EXIST, 61, UNIPHIER_PIN_DRV_3BIT, 81, UNIPHIER_PIN_PULL_DOWN), - UNIPHIER_PINCTRL_PIN(82, "PCA13", 82, + UNIPHIER_PINCTRL_PIN(82, "PCA13", UNIPHIER_PIN_IECTRL_EXIST, 62, UNIPHIER_PIN_DRV_3BIT, 82, UNIPHIER_PIN_PULL_DOWN), - UNIPHIER_PINCTRL_PIN(83, "PCA14", 83, + UNIPHIER_PINCTRL_PIN(83, "PCA14", UNIPHIER_PIN_IECTRL_EXIST, 63, UNIPHIER_PIN_DRV_3BIT, 83, UNIPHIER_PIN_PULL_DOWN), - UNIPHIER_PINCTRL_PIN(84, "PC0READY", 84, + UNIPHIER_PINCTRL_PIN(84, "PC0READY", UNIPHIER_PIN_IECTRL_EXIST, 0, UNIPHIER_PIN_DRV_1BIT, 84, UNIPHIER_PIN_PULL_DOWN), - UNIPHIER_PINCTRL_PIN(85, "PC0CD1", 85, + UNIPHIER_PINCTRL_PIN(85, "PC0CD1", UNIPHIER_PIN_IECTRL_EXIST, 1, UNIPHIER_PIN_DRV_1BIT, 85, UNIPHIER_PIN_PULL_DOWN), - UNIPHIER_PINCTRL_PIN(86, "PC0CD2", 86, + UNIPHIER_PINCTRL_PIN(86, "PC0CD2", UNIPHIER_PIN_IECTRL_EXIST, 2, UNIPHIER_PIN_DRV_1BIT, 86, UNIPHIER_PIN_PULL_DOWN), - UNIPHIER_PINCTRL_PIN(87, "PC0WAIT", 87, + UNIPHIER_PINCTRL_PIN(87, "PC0WAIT", UNIPHIER_PIN_IECTRL_EXIST, 3, UNIPHIER_PIN_DRV_1BIT, 87, UNIPHIER_PIN_PULL_DOWN), - UNIPHIER_PINCTRL_PIN(88, "PC0RESET", 88, + UNIPHIER_PINCTRL_PIN(88, "PC0RESET", UNIPHIER_PIN_IECTRL_EXIST, 4, UNIPHIER_PIN_DRV_1BIT, 88, UNIPHIER_PIN_PULL_DOWN), - UNIPHIER_PINCTRL_PIN(89, "PC0CE1", 89, + UNIPHIER_PINCTRL_PIN(89, "PC0CE1", UNIPHIER_PIN_IECTRL_EXIST, 5, UNIPHIER_PIN_DRV_1BIT, 89, UNIPHIER_PIN_PULL_DOWN), - UNIPHIER_PINCTRL_PIN(90, "PC0WE", 90, + UNIPHIER_PINCTRL_PIN(90, "PC0WE", UNIPHIER_PIN_IECTRL_EXIST, 6, UNIPHIER_PIN_DRV_1BIT, 90, UNIPHIER_PIN_PULL_DOWN), - UNIPHIER_PINCTRL_PIN(91, "PC0OE", 91, + UNIPHIER_PINCTRL_PIN(91, "PC0OE", UNIPHIER_PIN_IECTRL_EXIST, 7, UNIPHIER_PIN_DRV_1BIT, 91, UNIPHIER_PIN_PULL_DOWN), - UNIPHIER_PINCTRL_PIN(92, "PC0IOWR", 92, + UNIPHIER_PINCTRL_PIN(92, "PC0IOWR", UNIPHIER_PIN_IECTRL_EXIST, 8, UNIPHIER_PIN_DRV_1BIT, 92, UNIPHIER_PIN_PULL_DOWN), - UNIPHIER_PINCTRL_PIN(93, "PC0IORD", 93, + UNIPHIER_PINCTRL_PIN(93, "PC0IORD", UNIPHIER_PIN_IECTRL_EXIST, 9, UNIPHIER_PIN_DRV_1BIT, 93, UNIPHIER_PIN_PULL_DOWN), - UNIPHIER_PINCTRL_PIN(94, "PCD00", 94, + UNIPHIER_PINCTRL_PIN(94, "PCD00", UNIPHIER_PIN_IECTRL_EXIST, 10, UNIPHIER_PIN_DRV_1BIT, 94, UNIPHIER_PIN_PULL_DOWN), - UNIPHIER_PINCTRL_PIN(95, "PCD01", 95, + UNIPHIER_PINCTRL_PIN(95, "PCD01", UNIPHIER_PIN_IECTRL_EXIST, 11, UNIPHIER_PIN_DRV_1BIT, 95, UNIPHIER_PIN_PULL_DOWN), - UNIPHIER_PINCTRL_PIN(96, "PCD02", 96, + UNIPHIER_PINCTRL_PIN(96, "PCD02", UNIPHIER_PIN_IECTRL_EXIST, 12, UNIPHIER_PIN_DRV_1BIT, 96, UNIPHIER_PIN_PULL_DOWN), - UNIPHIER_PINCTRL_PIN(97, "PCD03", 97, + UNIPHIER_PINCTRL_PIN(97, "PCD03", UNIPHIER_PIN_IECTRL_EXIST, 13, UNIPHIER_PIN_DRV_1BIT, 97, UNIPHIER_PIN_PULL_DOWN), - UNIPHIER_PINCTRL_PIN(98, "PCD04", 98, + UNIPHIER_PINCTRL_PIN(98, "PCD04", UNIPHIER_PIN_IECTRL_EXIST, 14, UNIPHIER_PIN_DRV_1BIT, 98, UNIPHIER_PIN_PULL_DOWN), - UNIPHIER_PINCTRL_PIN(99, "PCD05", 99, + UNIPHIER_PINCTRL_PIN(99, "PCD05", UNIPHIER_PIN_IECTRL_EXIST, 15, UNIPHIER_PIN_DRV_1BIT, 99, UNIPHIER_PIN_PULL_DOWN), - UNIPHIER_PINCTRL_PIN(100, "PCD06", 100, + UNIPHIER_PINCTRL_PIN(100, "PCD06", UNIPHIER_PIN_IECTRL_EXIST, 16, UNIPHIER_PIN_DRV_1BIT, 100, UNIPHIER_PIN_PULL_DOWN), - UNIPHIER_PINCTRL_PIN(101, "PCD07", 101, + UNIPHIER_PINCTRL_PIN(101, "PCD07", UNIPHIER_PIN_IECTRL_EXIST, 17, UNIPHIER_PIN_DRV_1BIT, 101, UNIPHIER_PIN_PULL_DOWN), - UNIPHIER_PINCTRL_PIN(102, "HS0BCLKIN", 102, + UNIPHIER_PINCTRL_PIN(102, "HS0BCLKIN", UNIPHIER_PIN_IECTRL_EXIST, 18, UNIPHIER_PIN_DRV_1BIT, 102, UNIPHIER_PIN_PULL_DOWN), - UNIPHIER_PINCTRL_PIN(103, "HS0SYNCIN", 103, + UNIPHIER_PINCTRL_PIN(103, "HS0SYNCIN", UNIPHIER_PIN_IECTRL_EXIST, 19, UNIPHIER_PIN_DRV_1BIT, 103, UNIPHIER_PIN_PULL_DOWN), - UNIPHIER_PINCTRL_PIN(104, "HS0VALIN", 104, + UNIPHIER_PINCTRL_PIN(104, "HS0VALIN", UNIPHIER_PIN_IECTRL_EXIST, 20, UNIPHIER_PIN_DRV_1BIT, 104, UNIPHIER_PIN_PULL_DOWN), - UNIPHIER_PINCTRL_PIN(105, "HS0DIN0", 105, + UNIPHIER_PINCTRL_PIN(105, "HS0DIN0", UNIPHIER_PIN_IECTRL_EXIST, 21, UNIPHIER_PIN_DRV_1BIT, 105, UNIPHIER_PIN_PULL_DOWN), - UNIPHIER_PINCTRL_PIN(106, "HS0DIN1", 106, + UNIPHIER_PINCTRL_PIN(106, "HS0DIN1", UNIPHIER_PIN_IECTRL_EXIST, 22, UNIPHIER_PIN_DRV_1BIT, 106, UNIPHIER_PIN_PULL_DOWN), - UNIPHIER_PINCTRL_PIN(107, "HS0DIN2", 107, + UNIPHIER_PINCTRL_PIN(107, "HS0DIN2", UNIPHIER_PIN_IECTRL_EXIST, 23, UNIPHIER_PIN_DRV_1BIT, 107, UNIPHIER_PIN_PULL_DOWN), - UNIPHIER_PINCTRL_PIN(108, "HS0DIN3", 108, + UNIPHIER_PINCTRL_PIN(108, "HS0DIN3", UNIPHIER_PIN_IECTRL_EXIST, 24, UNIPHIER_PIN_DRV_1BIT, 108, UNIPHIER_PIN_PULL_DOWN), - UNIPHIER_PINCTRL_PIN(109, "HS0DIN4", 109, + UNIPHIER_PINCTRL_PIN(109, "HS0DIN4", UNIPHIER_PIN_IECTRL_EXIST, 25, UNIPHIER_PIN_DRV_1BIT, 109, UNIPHIER_PIN_PULL_DOWN), - UNIPHIER_PINCTRL_PIN(110, "HS0DIN5", 110, + UNIPHIER_PINCTRL_PIN(110, "HS0DIN5", UNIPHIER_PIN_IECTRL_EXIST, 26, UNIPHIER_PIN_DRV_1BIT, 110, UNIPHIER_PIN_PULL_DOWN), - UNIPHIER_PINCTRL_PIN(111, "HS0DIN6", 111, + UNIPHIER_PINCTRL_PIN(111, "HS0DIN6", UNIPHIER_PIN_IECTRL_EXIST, 27, UNIPHIER_PIN_DRV_1BIT, 111, UNIPHIER_PIN_PULL_DOWN), - UNIPHIER_PINCTRL_PIN(112, "HS0DIN7", 112, + UNIPHIER_PINCTRL_PIN(112, "HS0DIN7", UNIPHIER_PIN_IECTRL_EXIST, 28, UNIPHIER_PIN_DRV_1BIT, 112, UNIPHIER_PIN_PULL_DOWN), - UNIPHIER_PINCTRL_PIN(113, "HS0BCLKOUT", 113, + UNIPHIER_PINCTRL_PIN(113, "HS0BCLKOUT", UNIPHIER_PIN_IECTRL_EXIST, 64, UNIPHIER_PIN_DRV_3BIT, 113, UNIPHIER_PIN_PULL_DOWN), - UNIPHIER_PINCTRL_PIN(114, "HS0SYNCOUT", 114, + UNIPHIER_PINCTRL_PIN(114, "HS0SYNCOUT", UNIPHIER_PIN_IECTRL_EXIST, 65, UNIPHIER_PIN_DRV_3BIT, 114, UNIPHIER_PIN_PULL_DOWN), - UNIPHIER_PINCTRL_PIN(115, "HS0VALOUT", 115, + UNIPHIER_PINCTRL_PIN(115, "HS0VALOUT", UNIPHIER_PIN_IECTRL_EXIST, 66, UNIPHIER_PIN_DRV_3BIT, 115, UNIPHIER_PIN_PULL_DOWN), - UNIPHIER_PINCTRL_PIN(116, "HS0DOUT0", 116, + UNIPHIER_PINCTRL_PIN(116, "HS0DOUT0", UNIPHIER_PIN_IECTRL_EXIST, 67, UNIPHIER_PIN_DRV_3BIT, 116, UNIPHIER_PIN_PULL_DOWN), - UNIPHIER_PINCTRL_PIN(117, "HS0DOUT1", 117, + UNIPHIER_PINCTRL_PIN(117, "HS0DOUT1", UNIPHIER_PIN_IECTRL_EXIST, 68, UNIPHIER_PIN_DRV_3BIT, 117, UNIPHIER_PIN_PULL_DOWN), - UNIPHIER_PINCTRL_PIN(118, "HS0DOUT2", 118, + UNIPHIER_PINCTRL_PIN(118, "HS0DOUT2", UNIPHIER_PIN_IECTRL_EXIST, 69, UNIPHIER_PIN_DRV_3BIT, 118, UNIPHIER_PIN_PULL_DOWN), - UNIPHIER_PINCTRL_PIN(119, "HS0DOUT3", 119, + UNIPHIER_PINCTRL_PIN(119, "HS0DOUT3", UNIPHIER_PIN_IECTRL_EXIST, 70, UNIPHIER_PIN_DRV_3BIT, 119, UNIPHIER_PIN_PULL_DOWN), - UNIPHIER_PINCTRL_PIN(120, "HS0DOUT4", 120, + UNIPHIER_PINCTRL_PIN(120, "HS0DOUT4", UNIPHIER_PIN_IECTRL_EXIST, 71, UNIPHIER_PIN_DRV_3BIT, 120, UNIPHIER_PIN_PULL_DOWN), - UNIPHIER_PINCTRL_PIN(121, "HS0DOUT5", 121, + UNIPHIER_PINCTRL_PIN(121, "HS0DOUT5", UNIPHIER_PIN_IECTRL_EXIST, 72, UNIPHIER_PIN_DRV_3BIT, 121, UNIPHIER_PIN_PULL_DOWN), - UNIPHIER_PINCTRL_PIN(122, "HS0DOUT6", 122, + UNIPHIER_PINCTRL_PIN(122, "HS0DOUT6", UNIPHIER_PIN_IECTRL_EXIST, 73, UNIPHIER_PIN_DRV_3BIT, 122, UNIPHIER_PIN_PULL_DOWN), - UNIPHIER_PINCTRL_PIN(123, "HS0DOUT7", 123, + UNIPHIER_PINCTRL_PIN(123, "HS0DOUT7", UNIPHIER_PIN_IECTRL_EXIST, 74, UNIPHIER_PIN_DRV_3BIT, 123, UNIPHIER_PIN_PULL_DOWN), - UNIPHIER_PINCTRL_PIN(124, "HS1BCLKIN", 124, + UNIPHIER_PINCTRL_PIN(124, "HS1BCLKIN", UNIPHIER_PIN_IECTRL_EXIST, 75, UNIPHIER_PIN_DRV_3BIT, 124, UNIPHIER_PIN_PULL_DOWN), - UNIPHIER_PINCTRL_PIN(125, "HS1SYNCIN", 125, + UNIPHIER_PINCTRL_PIN(125, "HS1SYNCIN", UNIPHIER_PIN_IECTRL_EXIST, 76, UNIPHIER_PIN_DRV_3BIT, 125, UNIPHIER_PIN_PULL_DOWN), - UNIPHIER_PINCTRL_PIN(126, "HS1VALIN", 126, + UNIPHIER_PINCTRL_PIN(126, "HS1VALIN", UNIPHIER_PIN_IECTRL_EXIST, 77, UNIPHIER_PIN_DRV_3BIT, 126, UNIPHIER_PIN_PULL_DOWN), - UNIPHIER_PINCTRL_PIN(127, "HS1DIN0", 127, + UNIPHIER_PINCTRL_PIN(127, "HS1DIN0", UNIPHIER_PIN_IECTRL_EXIST, 78, UNIPHIER_PIN_DRV_3BIT, 127, UNIPHIER_PIN_PULL_DOWN), - UNIPHIER_PINCTRL_PIN(128, "HS1DIN1", 128, + UNIPHIER_PINCTRL_PIN(128, "HS1DIN1", UNIPHIER_PIN_IECTRL_EXIST, 79, UNIPHIER_PIN_DRV_3BIT, 128, UNIPHIER_PIN_PULL_DOWN), - UNIPHIER_PINCTRL_PIN(129, "HS1DIN2", 129, + UNIPHIER_PINCTRL_PIN(129, "HS1DIN2", UNIPHIER_PIN_IECTRL_EXIST, 80, UNIPHIER_PIN_DRV_3BIT, 129, UNIPHIER_PIN_PULL_DOWN), - UNIPHIER_PINCTRL_PIN(130, "HS1DIN3", 130, + UNIPHIER_PINCTRL_PIN(130, "HS1DIN3", UNIPHIER_PIN_IECTRL_EXIST, 81, UNIPHIER_PIN_DRV_3BIT, 130, UNIPHIER_PIN_PULL_DOWN), - UNIPHIER_PINCTRL_PIN(131, "HS1DIN4", 131, + UNIPHIER_PINCTRL_PIN(131, "HS1DIN4", UNIPHIER_PIN_IECTRL_EXIST, 82, UNIPHIER_PIN_DRV_3BIT, 131, UNIPHIER_PIN_PULL_DOWN), - UNIPHIER_PINCTRL_PIN(132, "HS1DIN5", 132, + UNIPHIER_PINCTRL_PIN(132, "HS1DIN5", UNIPHIER_PIN_IECTRL_EXIST, 83, UNIPHIER_PIN_DRV_3BIT, 132, UNIPHIER_PIN_PULL_DOWN), - UNIPHIER_PINCTRL_PIN(133, "HS1DIN6", 133, + UNIPHIER_PINCTRL_PIN(133, "HS1DIN6", UNIPHIER_PIN_IECTRL_EXIST, 84, UNIPHIER_PIN_DRV_3BIT, 133, UNIPHIER_PIN_PULL_DOWN), - UNIPHIER_PINCTRL_PIN(134, "HS1DIN7", 134, + UNIPHIER_PINCTRL_PIN(134, "HS1DIN7", UNIPHIER_PIN_IECTRL_EXIST, 85, UNIPHIER_PIN_DRV_3BIT, 134, UNIPHIER_PIN_PULL_DOWN), - UNIPHIER_PINCTRL_PIN(135, "AO1IEC", 135, + UNIPHIER_PINCTRL_PIN(135, "AO1IEC", UNIPHIER_PIN_IECTRL_EXIST, 86, UNIPHIER_PIN_DRV_3BIT, 135, UNIPHIER_PIN_PULL_DOWN), - UNIPHIER_PINCTRL_PIN(136, "AO1ARC", 136, + UNIPHIER_PINCTRL_PIN(136, "AO1ARC", UNIPHIER_PIN_IECTRL_EXIST, 87, UNIPHIER_PIN_DRV_3BIT, 136, UNIPHIER_PIN_PULL_DOWN), - UNIPHIER_PINCTRL_PIN(137, "AO1DACCK", 137, + UNIPHIER_PINCTRL_PIN(137, "AO1DACCK", UNIPHIER_PIN_IECTRL_EXIST, 88, UNIPHIER_PIN_DRV_3BIT, 137, UNIPHIER_PIN_PULL_DOWN), - UNIPHIER_PINCTRL_PIN(138, "AO1BCK", 138, + UNIPHIER_PINCTRL_PIN(138, "AO1BCK", UNIPHIER_PIN_IECTRL_EXIST, 89, UNIPHIER_PIN_DRV_3BIT, 138, UNIPHIER_PIN_PULL_DOWN), - UNIPHIER_PINCTRL_PIN(139, "AO1LRCK", 139, + UNIPHIER_PINCTRL_PIN(139, "AO1LRCK", UNIPHIER_PIN_IECTRL_EXIST, 90, UNIPHIER_PIN_DRV_3BIT, 139, UNIPHIER_PIN_PULL_DOWN), - UNIPHIER_PINCTRL_PIN(140, "AO1D0", 140, + UNIPHIER_PINCTRL_PIN(140, "AO1D0", UNIPHIER_PIN_IECTRL_EXIST, 91, UNIPHIER_PIN_DRV_3BIT, 140, UNIPHIER_PIN_PULL_DOWN), - UNIPHIER_PINCTRL_PIN(141, "AO1D1", 141, + UNIPHIER_PINCTRL_PIN(141, "AO1D1", UNIPHIER_PIN_IECTRL_EXIST, 92, UNIPHIER_PIN_DRV_3BIT, 141, UNIPHIER_PIN_PULL_DOWN), - UNIPHIER_PINCTRL_PIN(142, "AO1D2", 142, + UNIPHIER_PINCTRL_PIN(142, "AO1D2", UNIPHIER_PIN_IECTRL_EXIST, 93, UNIPHIER_PIN_DRV_3BIT, 142, UNIPHIER_PIN_PULL_DOWN), - UNIPHIER_PINCTRL_PIN(143, "HTPDN0", 143, + UNIPHIER_PINCTRL_PIN(143, "HTPDN0", UNIPHIER_PIN_IECTRL_EXIST, 94, UNIPHIER_PIN_DRV_3BIT, 143, UNIPHIER_PIN_PULL_DOWN), - UNIPHIER_PINCTRL_PIN(144, "LOCKN0", 144, + UNIPHIER_PINCTRL_PIN(144, "LOCKN0", UNIPHIER_PIN_IECTRL_EXIST, 95, UNIPHIER_PIN_DRV_3BIT, 144, UNIPHIER_PIN_PULL_DOWN), - UNIPHIER_PINCTRL_PIN(145, "HTPDN1", 145, + UNIPHIER_PINCTRL_PIN(145, "HTPDN1", UNIPHIER_PIN_IECTRL_EXIST, 96, UNIPHIER_PIN_DRV_3BIT, 145, UNIPHIER_PIN_PULL_DOWN), - UNIPHIER_PINCTRL_PIN(146, "LOCKN1", 146, + UNIPHIER_PINCTRL_PIN(146, "LOCKN1", UNIPHIER_PIN_IECTRL_EXIST, 97, UNIPHIER_PIN_DRV_3BIT, 146, UNIPHIER_PIN_PULL_DOWN), - UNIPHIER_PINCTRL_PIN(147, "PWMA", 147, + UNIPHIER_PINCTRL_PIN(147, "PWMA", UNIPHIER_PIN_IECTRL_EXIST, 98, UNIPHIER_PIN_DRV_3BIT, 147, UNIPHIER_PIN_PULL_DOWN), - UNIPHIER_PINCTRL_PIN(148, "LR_GOUT", 148, + UNIPHIER_PINCTRL_PIN(148, "LR_GOUT", UNIPHIER_PIN_IECTRL_EXIST, 99, UNIPHIER_PIN_DRV_3BIT, 148, UNIPHIER_PIN_PULL_DOWN), - UNIPHIER_PINCTRL_PIN(149, "XIRQ0", 149, + UNIPHIER_PINCTRL_PIN(149, "XIRQ0", UNIPHIER_PIN_IECTRL_EXIST, 100, UNIPHIER_PIN_DRV_3BIT, 149, UNIPHIER_PIN_PULL_DOWN), - UNIPHIER_PINCTRL_PIN(150, "XIRQ1", 150, + UNIPHIER_PINCTRL_PIN(150, "XIRQ1", UNIPHIER_PIN_IECTRL_EXIST, 101, UNIPHIER_PIN_DRV_3BIT, 150, UNIPHIER_PIN_PULL_DOWN), - UNIPHIER_PINCTRL_PIN(151, "XIRQ2", 151, + UNIPHIER_PINCTRL_PIN(151, "XIRQ2", UNIPHIER_PIN_IECTRL_EXIST, 102, UNIPHIER_PIN_DRV_3BIT, 151, UNIPHIER_PIN_PULL_DOWN), - UNIPHIER_PINCTRL_PIN(152, "XIRQ3", 152, + UNIPHIER_PINCTRL_PIN(152, "XIRQ3", UNIPHIER_PIN_IECTRL_EXIST, 103, UNIPHIER_PIN_DRV_3BIT, 152, UNIPHIER_PIN_PULL_DOWN), - UNIPHIER_PINCTRL_PIN(153, "XIRQ4", 153, + UNIPHIER_PINCTRL_PIN(153, "XIRQ4", UNIPHIER_PIN_IECTRL_EXIST, 104, UNIPHIER_PIN_DRV_3BIT, 153, UNIPHIER_PIN_PULL_DOWN), - UNIPHIER_PINCTRL_PIN(154, "XIRQ5", 154, + UNIPHIER_PINCTRL_PIN(154, "XIRQ5", UNIPHIER_PIN_IECTRL_EXIST, 105, UNIPHIER_PIN_DRV_3BIT, 154, UNIPHIER_PIN_PULL_DOWN), - UNIPHIER_PINCTRL_PIN(155, "XIRQ6", 155, + UNIPHIER_PINCTRL_PIN(155, "XIRQ6", UNIPHIER_PIN_IECTRL_EXIST, 106, UNIPHIER_PIN_DRV_3BIT, 155, UNIPHIER_PIN_PULL_DOWN), - UNIPHIER_PINCTRL_PIN(156, "XIRQ7", 156, + UNIPHIER_PINCTRL_PIN(156, "XIRQ7", UNIPHIER_PIN_IECTRL_EXIST, 107, UNIPHIER_PIN_DRV_3BIT, 156, UNIPHIER_PIN_PULL_DOWN), - UNIPHIER_PINCTRL_PIN(157, "XIRQ8", 157, + UNIPHIER_PINCTRL_PIN(157, "XIRQ8", UNIPHIER_PIN_IECTRL_EXIST, 108, UNIPHIER_PIN_DRV_3BIT, 157, UNIPHIER_PIN_PULL_DOWN), - UNIPHIER_PINCTRL_PIN(158, "XIRQ9", 158, + UNIPHIER_PINCTRL_PIN(158, "XIRQ9", UNIPHIER_PIN_IECTRL_EXIST, 109, UNIPHIER_PIN_DRV_3BIT, 158, UNIPHIER_PIN_PULL_DOWN), - UNIPHIER_PINCTRL_PIN(159, "XIRQ10", 159, + UNIPHIER_PINCTRL_PIN(159, "XIRQ10", UNIPHIER_PIN_IECTRL_EXIST, 110, UNIPHIER_PIN_DRV_3BIT, 159, UNIPHIER_PIN_PULL_DOWN), - UNIPHIER_PINCTRL_PIN(160, "XIRQ11", 160, + UNIPHIER_PINCTRL_PIN(160, "XIRQ11", UNIPHIER_PIN_IECTRL_EXIST, 111, UNIPHIER_PIN_DRV_3BIT, 160, UNIPHIER_PIN_PULL_DOWN), - UNIPHIER_PINCTRL_PIN(161, "XIRQ13", 161, + UNIPHIER_PINCTRL_PIN(161, "XIRQ13", UNIPHIER_PIN_IECTRL_EXIST, 112, UNIPHIER_PIN_DRV_3BIT, 161, UNIPHIER_PIN_PULL_DOWN), - UNIPHIER_PINCTRL_PIN(162, "XIRQ14", 162, + UNIPHIER_PINCTRL_PIN(162, "XIRQ14", UNIPHIER_PIN_IECTRL_EXIST, 113, UNIPHIER_PIN_DRV_3BIT, 162, UNIPHIER_PIN_PULL_DOWN), - UNIPHIER_PINCTRL_PIN(163, "XIRQ16", 163, + UNIPHIER_PINCTRL_PIN(163, "XIRQ16", UNIPHIER_PIN_IECTRL_EXIST, 114, UNIPHIER_PIN_DRV_3BIT, 163, UNIPHIER_PIN_PULL_DOWN), - UNIPHIER_PINCTRL_PIN(164, "XIRQ17", 164, + UNIPHIER_PINCTRL_PIN(164, "XIRQ17", UNIPHIER_PIN_IECTRL_EXIST, 115, UNIPHIER_PIN_DRV_3BIT, 164, UNIPHIER_PIN_PULL_DOWN), - UNIPHIER_PINCTRL_PIN(165, "XIRQ18", 165, + UNIPHIER_PINCTRL_PIN(165, "XIRQ18", UNIPHIER_PIN_IECTRL_EXIST, 116, UNIPHIER_PIN_DRV_3BIT, 165, UNIPHIER_PIN_PULL_DOWN), - UNIPHIER_PINCTRL_PIN(166, "XIRQ19", 166, + UNIPHIER_PINCTRL_PIN(166, "XIRQ19", UNIPHIER_PIN_IECTRL_EXIST, 117, UNIPHIER_PIN_DRV_3BIT, 166, UNIPHIER_PIN_PULL_DOWN), - UNIPHIER_PINCTRL_PIN(167, "XIRQ20", 167, + UNIPHIER_PINCTRL_PIN(167, "XIRQ20", UNIPHIER_PIN_IECTRL_EXIST, 118, UNIPHIER_PIN_DRV_3BIT, 167, UNIPHIER_PIN_PULL_DOWN), - UNIPHIER_PINCTRL_PIN(168, "PORT00", 168, + UNIPHIER_PINCTRL_PIN(168, "PORT00", UNIPHIER_PIN_IECTRL_EXIST, 119, UNIPHIER_PIN_DRV_3BIT, 168, UNIPHIER_PIN_PULL_DOWN), - UNIPHIER_PINCTRL_PIN(169, "PORT01", 169, + UNIPHIER_PINCTRL_PIN(169, "PORT01", UNIPHIER_PIN_IECTRL_EXIST, 120, UNIPHIER_PIN_DRV_3BIT, 169, UNIPHIER_PIN_PULL_DOWN), - UNIPHIER_PINCTRL_PIN(170, "PORT02", 170, + UNIPHIER_PINCTRL_PIN(170, "PORT02", UNIPHIER_PIN_IECTRL_EXIST, 121, UNIPHIER_PIN_DRV_3BIT, 170, UNIPHIER_PIN_PULL_DOWN), - UNIPHIER_PINCTRL_PIN(171, "PORT03", 171, + UNIPHIER_PINCTRL_PIN(171, "PORT03", UNIPHIER_PIN_IECTRL_EXIST, 122, UNIPHIER_PIN_DRV_3BIT, 171, UNIPHIER_PIN_PULL_DOWN), - UNIPHIER_PINCTRL_PIN(172, "PORT04", 172, + UNIPHIER_PINCTRL_PIN(172, "PORT04", UNIPHIER_PIN_IECTRL_EXIST, 123, UNIPHIER_PIN_DRV_3BIT, 172, UNIPHIER_PIN_PULL_DOWN), - UNIPHIER_PINCTRL_PIN(173, "CK27FO", 173, + UNIPHIER_PINCTRL_PIN(173, "CK27FO", UNIPHIER_PIN_IECTRL_EXIST, 124, UNIPHIER_PIN_DRV_3BIT, 173, UNIPHIER_PIN_PULL_DOWN), - UNIPHIER_PINCTRL_PIN(174, "PHSYNCO", 174, + UNIPHIER_PINCTRL_PIN(174, "PHSYNCO", UNIPHIER_PIN_IECTRL_EXIST, 125, UNIPHIER_PIN_DRV_3BIT, 174, UNIPHIER_PIN_PULL_DOWN), - UNIPHIER_PINCTRL_PIN(175, "PVSYNCO", 175, + UNIPHIER_PINCTRL_PIN(175, "PVSYNCO", UNIPHIER_PIN_IECTRL_EXIST, 126, UNIPHIER_PIN_DRV_3BIT, 175, UNIPHIER_PIN_PULL_DOWN), }; +static const unsigned aout_pins[] = {135, 136, 137, 138, 139, 140, 141, 142}; +static const int aout_muxvals[] = {0, 0, 0, 0, 0, 0, 0, 0}; static const unsigned emmc_pins[] = {18, 19, 20, 21, 22, 23, 24, 25}; static const int emmc_muxvals[] = {0, 0, 0, 0, 0, 0, 0, 0}; static const unsigned emmc_dat8_pins[] = {26, 27, 28, 29}; @@ -597,7 +599,7 @@ static const unsigned usb2_pins[] = {50, 51}; static const int usb2_muxvals[] = {0, 0}; static const unsigned usb3_pins[] = {52, 53}; static const int usb3_muxvals[] = {0, 0}; -static const unsigned port_range0_pins[] = { +static const unsigned int gpio_range0_pins[] = { 168, 169, 170, 171, 172, 173, 174, 175, /* PORT0x */ 0, 1, 2, 3, 4, 5, 6, 7, /* PORT1x */ 8, 9, 10, 11, 12, 13, 14, 15, /* PORT2x */ @@ -610,36 +612,16 @@ static const unsigned port_range0_pins[] = { 83, 84, 85, 86, 87, 88, 89, 90, /* PORT9x */ 91, 92, 93, 94, 95, 96, 97, 98, /* PORT10x */ }; -static const int port_range0_muxvals[] = { - 15, 15, 15, 15, 15, 15, 15, 15, /* PORT0x */ - 15, 15, 15, 15, 15, 15, 15, 15, /* PORT1x */ - 15, 15, 15, 15, 15, 15, 15, 15, /* PORT2x */ - 15, 15, 15, 15, 15, 15, 15, 15, /* PORT3x */ - 15, 15, 15, 15, 15, 15, 15, 15, /* PORT4x */ - 15, 15, 15, 15, 15, 15, 15, 15, /* PORT5x */ - 15, 15, 15, 15, 15, 15, 15, 15, /* PORT6x */ - 15, 15, 15, 15, 15, 15, 15, 15, /* PORT7x */ - 15, 15, 15, 15, 15, 15, 15, 15, /* PORT8x */ - 15, 15, 15, 15, 15, 15, 15, 15, /* PORT9x */ - 15, 15, 15, 15, 15, 15, 15, 15, /* PORT10x */ -}; -static const unsigned port_range1_pins[] = { +static const unsigned int gpio_range1_pins[] = { 99, 100, 101, 102, 103, 104, 105, 106, /* PORT12x */ 107, 108, 109, 110, 111, 112, 113, 114, /* PORT13x */ 115, 116, 117, 118, 119, 120, 121, 122, /* PORT14x */ -}; -static const int port_range1_muxvals[] = { - 15, 15, 15, 15, 15, 15, 15, 15, /* PORT12x */ - 15, 15, 15, 15, 15, 15, 15, 15, /* PORT13x */ - 15, 15, 15, 15, 15, 15, 15, 15, /* PORT14x */ -}; -static const unsigned port_range2_pins[] = { + 149, 150, 151, 152, 153, 154, 155, 156, /* XIRQ0-7 */ + 157, 158, 159, 160, 85, 161, 162, 84, /* XIRQ8-15 */ + 163, 164, 165, 166, 167, 146, 52, 53, /* XIRQ16-23 */ 61, 62, 63, 64, 65, 66, 67, 68, /* PORT18x */ }; -static const int port_range2_muxvals[] = { - 15, 15, 15, 15, 15, 15, 15, 15, /* PORT18x */ -}; -static const unsigned port_range3_pins[] = { +static const unsigned int gpio_range2_pins[] = { 123, 124, 125, 126, 127, 128, 129, 130, /* PORT20x */ 131, 132, 133, 134, 135, 136, 137, 138, /* PORT21x */ 139, 140, 141, 142, 143, 144, 145, 146, /* PORT22x */ @@ -647,36 +629,9 @@ static const unsigned port_range3_pins[] = { 155, 156, 157, 158, 159, 160, 161, 162, /* PORT24x */ 163, 164, 165, 166, 167, /* PORT250-254 */ }; -static const int port_range3_muxvals[] = { - 15, 15, 15, 15, 15, 15, 15, 15, /* PORT20x */ - 15, 15, 15, 15, 15, 15, 15, 15, /* PORT21x */ - 15, 15, 15, 15, 15, 15, 15, 15, /* PORT22x */ - 15, 15, 15, 15, 15, 15, 15, 15, /* PORT23x */ - 15, 15, 15, 15, 15, 15, 15, 15, /* PORT24x */ - 15, 15, 15, 15, 15, /* PORT250-254 */ -}; -static const unsigned xirq_pins[] = { - 149, 150, 151, 152, 153, 154, 155, 156, /* XIRQ0-7 */ - 157, 158, 159, 160, 85, 161, 162, 84, /* XIRQ8-15 */ - 163, 164, 165, 166, 167, 146, 52, 53, /* XIRQ16-23 */ -}; -static const int xirq_muxvals[] = { - 14, 14, 14, 14, 14, 14, 14, 14, /* XIRQ0-7 */ - 14, 14, 14, 14, 13, 14, 14, 13, /* XIRQ8-15 */ - 14, 14, 14, 14, 14, 14, 14, 14, /* XIRQ16-23 */ -}; -static const unsigned xirq_alternatives_pins[] = { - 94, 95, 96, 97, 98, 99, 100, 101, /* XIRQ0-7 */ - 102, 103, 104, 105, 106, 107, /* XIRQ8-11,13,14 */ - 108, 109, 110, 111, 112, 147, 141, 142, /* XIRQ16-23 */ -}; -static const int xirq_alternatives_muxvals[] = { - 14, 14, 14, 14, 14, 14, 14, 14, /* XIRQ0-7 */ - 14, 14, 14, 14, 14, 14, /* XIRQ8-11,13,14 */ - 14, 14, 14, 14, 14, 14, 14, 14, /* XIRQ16-23 */ -}; static const struct uniphier_pinctrl_group uniphier_ld20_groups[] = { + UNIPHIER_PINCTRL_GROUP(aout), UNIPHIER_PINCTRL_GROUP(emmc), UNIPHIER_PINCTRL_GROUP(emmc_dat8), UNIPHIER_PINCTRL_GROUP(ether_rgmii), @@ -697,225 +652,12 @@ static const struct uniphier_pinctrl_group uniphier_ld20_groups[] = { UNIPHIER_PINCTRL_GROUP(usb1), UNIPHIER_PINCTRL_GROUP(usb2), UNIPHIER_PINCTRL_GROUP(usb3), - UNIPHIER_PINCTRL_GROUP_GPIO_RANGE_PORT(port_range0), - UNIPHIER_PINCTRL_GROUP_GPIO_RANGE_PORT(port_range1), - UNIPHIER_PINCTRL_GROUP_GPIO_RANGE_PORT(port_range2), - UNIPHIER_PINCTRL_GROUP_GPIO_RANGE_PORT(port_range3), - UNIPHIER_PINCTRL_GROUP_GPIO_RANGE_IRQ(xirq), - UNIPHIER_PINCTRL_GROUP_GPIO_RANGE_IRQ(xirq_alternatives), - UNIPHIER_PINCTRL_GROUP_SINGLE(port00, port_range0, 0), - UNIPHIER_PINCTRL_GROUP_SINGLE(port01, port_range0, 1), - UNIPHIER_PINCTRL_GROUP_SINGLE(port02, port_range0, 2), - UNIPHIER_PINCTRL_GROUP_SINGLE(port03, port_range0, 3), - UNIPHIER_PINCTRL_GROUP_SINGLE(port04, port_range0, 4), - UNIPHIER_PINCTRL_GROUP_SINGLE(port05, port_range0, 5), - UNIPHIER_PINCTRL_GROUP_SINGLE(port06, port_range0, 6), - UNIPHIER_PINCTRL_GROUP_SINGLE(port07, port_range0, 7), - UNIPHIER_PINCTRL_GROUP_SINGLE(port10, port_range0, 8), - UNIPHIER_PINCTRL_GROUP_SINGLE(port11, port_range0, 9), - UNIPHIER_PINCTRL_GROUP_SINGLE(port12, port_range0, 10), - UNIPHIER_PINCTRL_GROUP_SINGLE(port13, port_range0, 11), - UNIPHIER_PINCTRL_GROUP_SINGLE(port14, port_range0, 12), - UNIPHIER_PINCTRL_GROUP_SINGLE(port15, port_range0, 13), - UNIPHIER_PINCTRL_GROUP_SINGLE(port16, port_range0, 14), - UNIPHIER_PINCTRL_GROUP_SINGLE(port17, port_range0, 15), - UNIPHIER_PINCTRL_GROUP_SINGLE(port20, port_range0, 16), - UNIPHIER_PINCTRL_GROUP_SINGLE(port21, port_range0, 17), - UNIPHIER_PINCTRL_GROUP_SINGLE(port22, port_range0, 18), - UNIPHIER_PINCTRL_GROUP_SINGLE(port23, port_range0, 19), - UNIPHIER_PINCTRL_GROUP_SINGLE(port24, port_range0, 20), - UNIPHIER_PINCTRL_GROUP_SINGLE(port25, port_range0, 21), - UNIPHIER_PINCTRL_GROUP_SINGLE(port26, port_range0, 22), - UNIPHIER_PINCTRL_GROUP_SINGLE(port27, port_range0, 23), - UNIPHIER_PINCTRL_GROUP_SINGLE(port30, port_range0, 24), - UNIPHIER_PINCTRL_GROUP_SINGLE(port31, port_range0, 25), - UNIPHIER_PINCTRL_GROUP_SINGLE(port32, port_range0, 26), - UNIPHIER_PINCTRL_GROUP_SINGLE(port33, port_range0, 27), - UNIPHIER_PINCTRL_GROUP_SINGLE(port34, port_range0, 28), - UNIPHIER_PINCTRL_GROUP_SINGLE(port35, port_range0, 29), - UNIPHIER_PINCTRL_GROUP_SINGLE(port36, port_range0, 30), - UNIPHIER_PINCTRL_GROUP_SINGLE(port37, port_range0, 31), - UNIPHIER_PINCTRL_GROUP_SINGLE(port40, port_range0, 32), - UNIPHIER_PINCTRL_GROUP_SINGLE(port41, port_range0, 33), - UNIPHIER_PINCTRL_GROUP_SINGLE(port42, port_range0, 34), - UNIPHIER_PINCTRL_GROUP_SINGLE(port43, port_range0, 35), - UNIPHIER_PINCTRL_GROUP_SINGLE(port44, port_range0, 36), - UNIPHIER_PINCTRL_GROUP_SINGLE(port45, port_range0, 37), - UNIPHIER_PINCTRL_GROUP_SINGLE(port46, port_range0, 38), - UNIPHIER_PINCTRL_GROUP_SINGLE(port47, port_range0, 39), - UNIPHIER_PINCTRL_GROUP_SINGLE(port50, port_range0, 40), - UNIPHIER_PINCTRL_GROUP_SINGLE(port51, port_range0, 41), - UNIPHIER_PINCTRL_GROUP_SINGLE(port52, port_range0, 42), - UNIPHIER_PINCTRL_GROUP_SINGLE(port53, port_range0, 43), - UNIPHIER_PINCTRL_GROUP_SINGLE(port54, port_range0, 44), - UNIPHIER_PINCTRL_GROUP_SINGLE(port55, port_range0, 45), - UNIPHIER_PINCTRL_GROUP_SINGLE(port56, port_range0, 46), - UNIPHIER_PINCTRL_GROUP_SINGLE(port57, port_range0, 47), - UNIPHIER_PINCTRL_GROUP_SINGLE(port60, port_range0, 48), - UNIPHIER_PINCTRL_GROUP_SINGLE(port61, port_range0, 49), - UNIPHIER_PINCTRL_GROUP_SINGLE(port62, port_range0, 50), - UNIPHIER_PINCTRL_GROUP_SINGLE(port63, port_range0, 51), - UNIPHIER_PINCTRL_GROUP_SINGLE(port64, port_range0, 52), - UNIPHIER_PINCTRL_GROUP_SINGLE(port65, port_range0, 53), - UNIPHIER_PINCTRL_GROUP_SINGLE(port66, port_range0, 54), - UNIPHIER_PINCTRL_GROUP_SINGLE(port67, port_range0, 55), - UNIPHIER_PINCTRL_GROUP_SINGLE(port70, port_range0, 56), - UNIPHIER_PINCTRL_GROUP_SINGLE(port71, port_range0, 57), - UNIPHIER_PINCTRL_GROUP_SINGLE(port72, port_range0, 58), - UNIPHIER_PINCTRL_GROUP_SINGLE(port73, port_range0, 59), - UNIPHIER_PINCTRL_GROUP_SINGLE(port74, port_range0, 60), - UNIPHIER_PINCTRL_GROUP_SINGLE(port75, port_range0, 61), - UNIPHIER_PINCTRL_GROUP_SINGLE(port76, port_range0, 62), - UNIPHIER_PINCTRL_GROUP_SINGLE(port77, port_range0, 63), - UNIPHIER_PINCTRL_GROUP_SINGLE(port80, port_range0, 64), - UNIPHIER_PINCTRL_GROUP_SINGLE(port81, port_range0, 65), - UNIPHIER_PINCTRL_GROUP_SINGLE(port82, port_range0, 66), - UNIPHIER_PINCTRL_GROUP_SINGLE(port83, port_range0, 67), - UNIPHIER_PINCTRL_GROUP_SINGLE(port84, port_range0, 68), - UNIPHIER_PINCTRL_GROUP_SINGLE(port85, port_range0, 69), - UNIPHIER_PINCTRL_GROUP_SINGLE(port86, port_range0, 70), - UNIPHIER_PINCTRL_GROUP_SINGLE(port87, port_range0, 71), - UNIPHIER_PINCTRL_GROUP_SINGLE(port90, port_range0, 72), - UNIPHIER_PINCTRL_GROUP_SINGLE(port91, port_range0, 73), - UNIPHIER_PINCTRL_GROUP_SINGLE(port92, port_range0, 74), - UNIPHIER_PINCTRL_GROUP_SINGLE(port93, port_range0, 75), - UNIPHIER_PINCTRL_GROUP_SINGLE(port94, port_range0, 76), - UNIPHIER_PINCTRL_GROUP_SINGLE(port95, port_range0, 77), - UNIPHIER_PINCTRL_GROUP_SINGLE(port96, port_range0, 78), - UNIPHIER_PINCTRL_GROUP_SINGLE(port97, port_range0, 79), - UNIPHIER_PINCTRL_GROUP_SINGLE(port100, port_range0, 80), - UNIPHIER_PINCTRL_GROUP_SINGLE(port101, port_range0, 81), - UNIPHIER_PINCTRL_GROUP_SINGLE(port102, port_range0, 82), - UNIPHIER_PINCTRL_GROUP_SINGLE(port103, port_range0, 83), - UNIPHIER_PINCTRL_GROUP_SINGLE(port104, port_range0, 84), - UNIPHIER_PINCTRL_GROUP_SINGLE(port105, port_range0, 85), - UNIPHIER_PINCTRL_GROUP_SINGLE(port106, port_range0, 86), - UNIPHIER_PINCTRL_GROUP_SINGLE(port107, port_range0, 87), - UNIPHIER_PINCTRL_GROUP_SINGLE(port120, port_range1, 0), - UNIPHIER_PINCTRL_GROUP_SINGLE(port121, port_range1, 1), - UNIPHIER_PINCTRL_GROUP_SINGLE(port122, port_range1, 2), - UNIPHIER_PINCTRL_GROUP_SINGLE(port123, port_range1, 3), - UNIPHIER_PINCTRL_GROUP_SINGLE(port124, port_range1, 4), - UNIPHIER_PINCTRL_GROUP_SINGLE(port125, port_range1, 5), - UNIPHIER_PINCTRL_GROUP_SINGLE(port126, port_range1, 6), - UNIPHIER_PINCTRL_GROUP_SINGLE(port127, port_range1, 7), - UNIPHIER_PINCTRL_GROUP_SINGLE(port130, port_range1, 8), - UNIPHIER_PINCTRL_GROUP_SINGLE(port131, port_range1, 9), - UNIPHIER_PINCTRL_GROUP_SINGLE(port132, port_range1, 10), - UNIPHIER_PINCTRL_GROUP_SINGLE(port133, port_range1, 11), - UNIPHIER_PINCTRL_GROUP_SINGLE(port134, port_range1, 12), - UNIPHIER_PINCTRL_GROUP_SINGLE(port135, port_range1, 13), - UNIPHIER_PINCTRL_GROUP_SINGLE(port136, port_range1, 14), - UNIPHIER_PINCTRL_GROUP_SINGLE(port137, port_range1, 15), - UNIPHIER_PINCTRL_GROUP_SINGLE(port140, port_range1, 16), - UNIPHIER_PINCTRL_GROUP_SINGLE(port141, port_range1, 17), - UNIPHIER_PINCTRL_GROUP_SINGLE(port142, port_range1, 18), - UNIPHIER_PINCTRL_GROUP_SINGLE(port143, port_range1, 19), - UNIPHIER_PINCTRL_GROUP_SINGLE(port144, port_range1, 20), - UNIPHIER_PINCTRL_GROUP_SINGLE(port145, port_range1, 21), - UNIPHIER_PINCTRL_GROUP_SINGLE(port146, port_range1, 22), - UNIPHIER_PINCTRL_GROUP_SINGLE(port147, port_range1, 23), - UNIPHIER_PINCTRL_GROUP_SINGLE(port180, port_range2, 0), - UNIPHIER_PINCTRL_GROUP_SINGLE(port181, port_range2, 1), - UNIPHIER_PINCTRL_GROUP_SINGLE(port182, port_range2, 2), - UNIPHIER_PINCTRL_GROUP_SINGLE(port183, port_range2, 3), - UNIPHIER_PINCTRL_GROUP_SINGLE(port184, port_range2, 4), - UNIPHIER_PINCTRL_GROUP_SINGLE(port185, port_range2, 5), - UNIPHIER_PINCTRL_GROUP_SINGLE(port186, port_range2, 6), - UNIPHIER_PINCTRL_GROUP_SINGLE(port187, port_range2, 7), - UNIPHIER_PINCTRL_GROUP_SINGLE(port200, port_range3, 0), - UNIPHIER_PINCTRL_GROUP_SINGLE(port201, port_range3, 1), - UNIPHIER_PINCTRL_GROUP_SINGLE(port202, port_range3, 2), - UNIPHIER_PINCTRL_GROUP_SINGLE(port203, port_range3, 3), - UNIPHIER_PINCTRL_GROUP_SINGLE(port204, port_range3, 4), - UNIPHIER_PINCTRL_GROUP_SINGLE(port205, port_range3, 5), - UNIPHIER_PINCTRL_GROUP_SINGLE(port206, port_range3, 6), - UNIPHIER_PINCTRL_GROUP_SINGLE(port207, port_range3, 7), - UNIPHIER_PINCTRL_GROUP_SINGLE(port210, port_range3, 8), - UNIPHIER_PINCTRL_GROUP_SINGLE(port211, port_range3, 9), - UNIPHIER_PINCTRL_GROUP_SINGLE(port212, port_range3, 10), - UNIPHIER_PINCTRL_GROUP_SINGLE(port213, port_range3, 11), - UNIPHIER_PINCTRL_GROUP_SINGLE(port214, port_range3, 12), - UNIPHIER_PINCTRL_GROUP_SINGLE(port215, port_range3, 13), - UNIPHIER_PINCTRL_GROUP_SINGLE(port216, port_range3, 14), - UNIPHIER_PINCTRL_GROUP_SINGLE(port217, port_range3, 15), - UNIPHIER_PINCTRL_GROUP_SINGLE(port220, port_range3, 16), - UNIPHIER_PINCTRL_GROUP_SINGLE(port221, port_range3, 17), - UNIPHIER_PINCTRL_GROUP_SINGLE(port222, port_range3, 18), - UNIPHIER_PINCTRL_GROUP_SINGLE(port223, port_range3, 19), - UNIPHIER_PINCTRL_GROUP_SINGLE(port224, port_range3, 20), - UNIPHIER_PINCTRL_GROUP_SINGLE(port225, port_range3, 21), - UNIPHIER_PINCTRL_GROUP_SINGLE(port226, port_range3, 22), - UNIPHIER_PINCTRL_GROUP_SINGLE(port227, port_range3, 23), - UNIPHIER_PINCTRL_GROUP_SINGLE(port230, port_range3, 24), - UNIPHIER_PINCTRL_GROUP_SINGLE(port231, port_range3, 25), - UNIPHIER_PINCTRL_GROUP_SINGLE(port232, port_range3, 26), - UNIPHIER_PINCTRL_GROUP_SINGLE(port233, port_range3, 27), - UNIPHIER_PINCTRL_GROUP_SINGLE(port234, port_range3, 28), - UNIPHIER_PINCTRL_GROUP_SINGLE(port235, port_range3, 29), - UNIPHIER_PINCTRL_GROUP_SINGLE(port236, port_range3, 30), - UNIPHIER_PINCTRL_GROUP_SINGLE(port237, port_range3, 31), - UNIPHIER_PINCTRL_GROUP_SINGLE(port240, port_range3, 32), - UNIPHIER_PINCTRL_GROUP_SINGLE(port241, port_range3, 33), - UNIPHIER_PINCTRL_GROUP_SINGLE(port242, port_range3, 34), - UNIPHIER_PINCTRL_GROUP_SINGLE(port243, port_range3, 35), - UNIPHIER_PINCTRL_GROUP_SINGLE(port244, port_range3, 36), - UNIPHIER_PINCTRL_GROUP_SINGLE(port245, port_range3, 37), - UNIPHIER_PINCTRL_GROUP_SINGLE(port246, port_range3, 38), - UNIPHIER_PINCTRL_GROUP_SINGLE(port247, port_range3, 39), - UNIPHIER_PINCTRL_GROUP_SINGLE(port250, port_range3, 40), - UNIPHIER_PINCTRL_GROUP_SINGLE(port251, port_range3, 41), - UNIPHIER_PINCTRL_GROUP_SINGLE(port252, port_range3, 42), - UNIPHIER_PINCTRL_GROUP_SINGLE(port253, port_range3, 43), - UNIPHIER_PINCTRL_GROUP_SINGLE(port254, port_range3, 44), - UNIPHIER_PINCTRL_GROUP_SINGLE(xirq0, xirq, 0), - UNIPHIER_PINCTRL_GROUP_SINGLE(xirq1, xirq, 1), - UNIPHIER_PINCTRL_GROUP_SINGLE(xirq2, xirq, 2), - UNIPHIER_PINCTRL_GROUP_SINGLE(xirq3, xirq, 3), - UNIPHIER_PINCTRL_GROUP_SINGLE(xirq4, xirq, 4), - UNIPHIER_PINCTRL_GROUP_SINGLE(xirq5, xirq, 5), - UNIPHIER_PINCTRL_GROUP_SINGLE(xirq6, xirq, 6), - UNIPHIER_PINCTRL_GROUP_SINGLE(xirq7, xirq, 7), - UNIPHIER_PINCTRL_GROUP_SINGLE(xirq8, xirq, 8), - UNIPHIER_PINCTRL_GROUP_SINGLE(xirq9, xirq, 9), - UNIPHIER_PINCTRL_GROUP_SINGLE(xirq10, xirq, 10), - UNIPHIER_PINCTRL_GROUP_SINGLE(xirq11, xirq, 11), - UNIPHIER_PINCTRL_GROUP_SINGLE(xirq12, xirq, 12), - UNIPHIER_PINCTRL_GROUP_SINGLE(xirq13, xirq, 13), - UNIPHIER_PINCTRL_GROUP_SINGLE(xirq14, xirq, 14), - UNIPHIER_PINCTRL_GROUP_SINGLE(xirq15, xirq, 15), - UNIPHIER_PINCTRL_GROUP_SINGLE(xirq16, xirq, 16), - UNIPHIER_PINCTRL_GROUP_SINGLE(xirq17, xirq, 17), - UNIPHIER_PINCTRL_GROUP_SINGLE(xirq18, xirq, 18), - UNIPHIER_PINCTRL_GROUP_SINGLE(xirq19, xirq, 19), - UNIPHIER_PINCTRL_GROUP_SINGLE(xirq20, xirq, 20), - UNIPHIER_PINCTRL_GROUP_SINGLE(xirq21, xirq, 21), - UNIPHIER_PINCTRL_GROUP_SINGLE(xirq22, xirq, 22), - UNIPHIER_PINCTRL_GROUP_SINGLE(xirq23, xirq, 23), - UNIPHIER_PINCTRL_GROUP_SINGLE(xirq0b, xirq_alternatives, 0), - UNIPHIER_PINCTRL_GROUP_SINGLE(xirq1b, xirq_alternatives, 1), - UNIPHIER_PINCTRL_GROUP_SINGLE(xirq2b, xirq_alternatives, 2), - UNIPHIER_PINCTRL_GROUP_SINGLE(xirq3b, xirq_alternatives, 3), - UNIPHIER_PINCTRL_GROUP_SINGLE(xirq4b, xirq_alternatives, 4), - UNIPHIER_PINCTRL_GROUP_SINGLE(xirq5b, xirq_alternatives, 5), - UNIPHIER_PINCTRL_GROUP_SINGLE(xirq6b, xirq_alternatives, 6), - UNIPHIER_PINCTRL_GROUP_SINGLE(xirq7b, xirq_alternatives, 7), - UNIPHIER_PINCTRL_GROUP_SINGLE(xirq8b, xirq_alternatives, 8), - UNIPHIER_PINCTRL_GROUP_SINGLE(xirq9b, xirq_alternatives, 9), - UNIPHIER_PINCTRL_GROUP_SINGLE(xirq10b, xirq_alternatives, 10), - UNIPHIER_PINCTRL_GROUP_SINGLE(xirq11b, xirq_alternatives, 11), - UNIPHIER_PINCTRL_GROUP_SINGLE(xirq13b, xirq_alternatives, 12), - UNIPHIER_PINCTRL_GROUP_SINGLE(xirq14b, xirq_alternatives, 13), - UNIPHIER_PINCTRL_GROUP_SINGLE(xirq16b, xirq_alternatives, 14), - UNIPHIER_PINCTRL_GROUP_SINGLE(xirq17b, xirq_alternatives, 15), - UNIPHIER_PINCTRL_GROUP_SINGLE(xirq18b, xirq_alternatives, 16), - UNIPHIER_PINCTRL_GROUP_SINGLE(xirq19b, xirq_alternatives, 17), - UNIPHIER_PINCTRL_GROUP_SINGLE(xirq20b, xirq_alternatives, 18), - UNIPHIER_PINCTRL_GROUP_SINGLE(xirq21b, xirq_alternatives, 19), - UNIPHIER_PINCTRL_GROUP_SINGLE(xirq22b, xirq_alternatives, 20), - UNIPHIER_PINCTRL_GROUP_SINGLE(xirq23b, xirq_alternatives, 21), + UNIPHIER_PINCTRL_GROUP_GPIO(gpio_range0), + UNIPHIER_PINCTRL_GROUP_GPIO(gpio_range1), + UNIPHIER_PINCTRL_GROUP_GPIO(gpio_range2), }; +static const char * const aout_groups[] = {"aout"}; static const char * const emmc_groups[] = {"emmc", "emmc_dat8"}; static const char * const ether_rgmii_groups[] = {"ether_rgmii"}; static const char * const ether_rmii_groups[] = {"ether_rmii"}; @@ -935,69 +677,9 @@ static const char * const usb0_groups[] = {"usb0"}; static const char * const usb1_groups[] = {"usb1"}; static const char * const usb2_groups[] = {"usb2"}; static const char * const usb3_groups[] = {"usb3"}; -static const char * const port_groups[] = { - "port00", "port01", "port02", "port03", - "port04", "port05", "port06", "port07", - "port10", "port11", "port12", "port13", - "port14", "port15", "port16", "port17", - "port20", "port21", "port22", "port23", - "port24", "port25", "port26", "port27", - "port30", "port31", "port32", "port33", - "port34", "port35", "port36", "port37", - "port40", "port41", "port42", "port43", - "port44", "port45", "port46", "port47", - "port50", "port51", "port52", "port53", - "port54", "port55", "port56", "port57", - "port60", "port61", "port62", "port63", - "port64", "port65", "port66", "port67", - "port70", "port71", "port72", "port73", - "port74", "port75", "port76", "port77", - "port80", "port81", "port82", "port83", - "port84", "port85", "port86", "port87", - "port90", "port91", "port92", "port93", - "port94", "port95", "port96", "port97", - "port100", "port101", "port102", "port103", - "port104", "port105", "port106", "port107", - /* port110-117 missing */ - "port120", "port121", "port122", "port123", - "port124", "port125", "port126", "port127", - "port130", "port131", "port132", "port133", - "port134", "port135", "port136", "port137", - "port140", "port141", "port142", "port143", - "port144", "port145", "port146", "port147", - /* port150-177 missing */ - "port180", "port181", "port182", "port183", - "port184", "port185", "port186", "port187", - /* port190-197 missing */ - "port200", "port201", "port202", "port203", - "port204", "port205", "port206", "port207", - "port210", "port211", "port212", "port213", - "port214", "port215", "port216", "port217", - "port220", "port221", "port222", "port223", - "port224", "port225", "port226", "port227", - "port230", "port231", "port232", "port233", - "port234", "port235", "port236", "port237", - "port240", "port241", "port242", "port243", - "port244", "port245", "port246", "port247", - "port250", "port251", "port252", "port253", - "port254", -}; -static const char * const xirq_groups[] = { - "xirq0", "xirq1", "xirq2", "xirq3", - "xirq4", "xirq5", "xirq6", "xirq7", - "xirq8", "xirq9", "xirq10", "xirq11", - "xirq12", "xirq13", "xirq14", "xirq15", - "xirq16", "xirq17", "xirq18", "xirq19", - "xirq20", "xirq21", "xirq22", "xirq23", - "xirq0b", "xirq1b", "xirq2b", "xirq3b", - "xirq4b", "xirq5b", "xirq6b", "xirq7b", - "xirq8b", "xirq9b", "xirq10b", "xirq11b", - /* none */ "xirq13b", "xirq14b", /* none */ - "xirq16b", "xirq17b", "xirq18b", "xirq19b", - "xirq20b", "xirq21b", "xirq22b", "xirq23b", -}; static const struct uniphier_pinmux_function uniphier_ld20_functions[] = { + UNIPHIER_PINMUX_FUNCTION(aout), UNIPHIER_PINMUX_FUNCTION(emmc), UNIPHIER_PINMUX_FUNCTION(ether_rgmii), UNIPHIER_PINMUX_FUNCTION(ether_rmii), @@ -1016,10 +698,20 @@ static const struct uniphier_pinmux_function uniphier_ld20_functions[] = { UNIPHIER_PINMUX_FUNCTION(usb1), UNIPHIER_PINMUX_FUNCTION(usb2), UNIPHIER_PINMUX_FUNCTION(usb3), - UNIPHIER_PINMUX_FUNCTION(port), - UNIPHIER_PINMUX_FUNCTION(xirq), }; +static int uniphier_ld20_get_gpio_muxval(unsigned int pin, + unsigned int gpio_offset) +{ + if (gpio_offset == 132 || gpio_offset == 135) /* XIRQ12, 15 */ + return 13; + + if (gpio_offset >= 120 && gpio_offset <= 143) /* XIRQx */ + return 14; + + return 15; +} + static struct uniphier_pinctrl_socdata uniphier_ld20_pindata = { .pins = uniphier_ld20_pins, .npins = ARRAY_SIZE(uniphier_ld20_pins), @@ -1027,6 +719,7 @@ static struct uniphier_pinctrl_socdata uniphier_ld20_pindata = { .groups_count = ARRAY_SIZE(uniphier_ld20_groups), .functions = uniphier_ld20_functions, .functions_count = ARRAY_SIZE(uniphier_ld20_functions), + .get_gpio_muxval = uniphier_ld20_get_gpio_muxval, .caps = UNIPHIER_PINCTRL_CAPS_PERPIN_IECTRL, }; @@ -1045,6 +738,7 @@ static struct platform_driver uniphier_ld20_pinctrl_driver = { .driver = { .name = "uniphier-ld20-pinctrl", .of_match_table = uniphier_ld20_pinctrl_match, + .pm = &uniphier_pinctrl_pm_ops, }, }; builtin_platform_driver(uniphier_ld20_pinctrl_driver); diff --git a/drivers/pinctrl/uniphier/pinctrl-uniphier-ld4.c b/drivers/pinctrl/uniphier/pinctrl-uniphier-ld4.c index 8f2ad1c4c6f4..840382847212 100644 --- a/drivers/pinctrl/uniphier/pinctrl-uniphier-ld4.c +++ b/drivers/pinctrl/uniphier/pinctrl-uniphier-ld4.c @@ -606,59 +606,24 @@ static const unsigned usb2_pins[] = {155, 156}; static const int usb2_muxvals[] = {4, 4}; static const unsigned usb2b_pins[] = {67, 68}; static const int usb2b_muxvals[] = {23, 23}; -static const unsigned port_range0_pins[] = { - 135, 136, 137, 138, 139, 140, 141, 142, /* PORT0x */ - 143, 144, 145, 146, 147, 148, 149, 150, /* PORT1x */ - 151, 152, 153, 154, 155, 156, 157, 0, /* PORT2x */ - 1, 2, 3, 4, 5, 120, 121, 122, /* PORT3x */ - 24, 25, 26, 27, 28, 29, 30, 31, /* PORT4x */ - 40, 41, 42, 43, 44, 45, 46, 47, /* PORT5x */ - 48, 49, 50, 51, 52, 53, 54, 55, /* PORT6x */ - 56, 85, 84, 59, 82, 61, 64, 65, /* PORT7x */ - 8, 9, 10, 11, 12, 13, 14, 15, /* PORT8x */ - 66, 67, 68, 69, 70, 71, 72, 73, /* PORT9x */ - 74, 75, 89, 86, 78, 79, 80, 81, /* PORT10x */ - 60, 83, 58, 57, 88, 87, 77, 76, /* PORT11x */ - 90, 91, 92, 93, 94, 95, 96, 97, /* PORT12x */ - 98, 99, 100, 6, 101, 114, 115, 116, /* PORT13x */ - 103, 108, 21, 22, 23, 117, 118, 119, /* PORT14x */ -}; -static const int port_range0_muxvals[] = { - 0, 0, 0, 0, 0, 0, 0, 0, /* PORT0x */ - 0, 0, 0, 0, 0, 0, 0, 0, /* PORT1x */ - 0, 0, 0, 0, 0, 0, 0, 15, /* PORT2x */ - 15, 15, 15, 15, 15, 15, 15, 15, /* PORT3x */ - 15, 15, 15, 15, 15, 15, 15, 15, /* PORT4x */ - 15, 15, 15, 15, 15, 15, 15, 15, /* PORT5x */ - 15, 15, 15, 15, 15, 15, 15, 15, /* PORT6x */ - 15, 15, 15, 15, 15, 15, 15, 15, /* PORT7x */ - 15, 15, 15, 15, 15, 15, 15, 15, /* PORT8x */ - 15, 15, 15, 15, 15, 15, 15, 15, /* PORT9x */ - 15, 15, 15, 15, 15, 15, 15, 15, /* PORT10x */ - 15, 15, 15, 15, 15, 15, 15, 15, /* PORT11x */ - 15, 15, 15, 15, 15, 15, 15, 15, /* PORT12x */ - 15, 15, 15, 15, 15, 15, 15, 15, /* PORT13x */ - 15, 15, 15, 15, 15, 15, 15, 15, /* PORT14x */ -}; -static const unsigned port_range1_pins[] = { - 7, /* PORT166 */ -}; -static const int port_range1_muxvals[] = { - 15, /* PORT166 */ -}; -static const unsigned xirq_range0_pins[] = { - 151, 123, 124, 125, 126, 127, 128, 129, /* XIRQ0-7 */ - 130, 131, 132, 133, 62, /* XIRQ8-12 */ -}; -static const int xirq_range0_muxvals[] = { - 14, 0, 0, 0, 0, 0, 0, 0, /* XIRQ0-7 */ - 0, 0, 0, 0, 14, /* XIRQ8-12 */ -}; -static const unsigned xirq_range1_pins[] = { - 134, 63, /* XIRQ14-15 */ -}; -static const int xirq_range1_muxvals[] = { - 0, 14, /* XIRQ14-15 */ +static const unsigned int gpio_range_pins[] = { + 135, 136, 137, 138, 139, 140, 141, 142, /* PORT0x */ + 143, 144, 145, 146, 147, 148, 149, 150, /* PORT1x */ + 151, 152, 153, 154, 155, 156, 157, 0, /* PORT2x */ + 1, 2, 3, 4, 5, 120, 121, 122, /* PORT3x */ + 24, 25, 26, 27, 28, 29, 30, 31, /* PORT4x */ + 40, 41, 42, 43, 44, 45, 46, 47, /* PORT5x */ + 48, 49, 50, 51, 52, 53, 54, 55, /* PORT6x */ + 56, 85, 84, 59, 82, 61, 64, 65, /* PORT7x */ + 8, 9, 10, 11, 12, 13, 14, 15, /* PORT8x */ + 66, 67, 68, 69, 70, 71, 72, 73, /* PORT9x */ + 74, 75, 89, 86, 78, 79, 80, 81, /* PORT10x */ + 60, 83, 58, 57, 88, 87, 77, 76, /* PORT11x */ + 90, 91, 92, 93, 94, 95, 96, 97, /* PORT12x */ + 98, 99, 100, 6, 101, 114, 115, 116, /* PORT13x */ + 103, 108, 21, 22, 23, 117, 118, 119, /* PORT14x */ + 151, 123, 124, 125, 126, 127, 128, 129, /* XIRQ0-7 */ + 130, 131, 132, 133, 62, 7, 134, 63, /* XIRQ8-12, PORT165, XIRQ14-15 */ }; static const struct uniphier_pinctrl_group uniphier_ld4_groups[] = { @@ -687,146 +652,7 @@ static const struct uniphier_pinctrl_group uniphier_ld4_groups[] = { UNIPHIER_PINCTRL_GROUP(usb1), UNIPHIER_PINCTRL_GROUP(usb2), UNIPHIER_PINCTRL_GROUP(usb2b), - UNIPHIER_PINCTRL_GROUP_GPIO_RANGE_PORT(port_range0), - UNIPHIER_PINCTRL_GROUP_GPIO_RANGE_PORT(port_range1), - UNIPHIER_PINCTRL_GROUP_GPIO_RANGE_IRQ(xirq_range0), - UNIPHIER_PINCTRL_GROUP_GPIO_RANGE_IRQ(xirq_range1), - UNIPHIER_PINCTRL_GROUP_SINGLE(port00, port_range0, 0), - UNIPHIER_PINCTRL_GROUP_SINGLE(port01, port_range0, 1), - UNIPHIER_PINCTRL_GROUP_SINGLE(port02, port_range0, 2), - UNIPHIER_PINCTRL_GROUP_SINGLE(port03, port_range0, 3), - UNIPHIER_PINCTRL_GROUP_SINGLE(port04, port_range0, 4), - UNIPHIER_PINCTRL_GROUP_SINGLE(port05, port_range0, 5), - UNIPHIER_PINCTRL_GROUP_SINGLE(port06, port_range0, 6), - UNIPHIER_PINCTRL_GROUP_SINGLE(port07, port_range0, 7), - UNIPHIER_PINCTRL_GROUP_SINGLE(port10, port_range0, 8), - UNIPHIER_PINCTRL_GROUP_SINGLE(port11, port_range0, 9), - UNIPHIER_PINCTRL_GROUP_SINGLE(port12, port_range0, 10), - UNIPHIER_PINCTRL_GROUP_SINGLE(port13, port_range0, 11), - UNIPHIER_PINCTRL_GROUP_SINGLE(port14, port_range0, 12), - UNIPHIER_PINCTRL_GROUP_SINGLE(port15, port_range0, 13), - UNIPHIER_PINCTRL_GROUP_SINGLE(port16, port_range0, 14), - UNIPHIER_PINCTRL_GROUP_SINGLE(port17, port_range0, 15), - UNIPHIER_PINCTRL_GROUP_SINGLE(port20, port_range0, 16), - UNIPHIER_PINCTRL_GROUP_SINGLE(port21, port_range0, 17), - UNIPHIER_PINCTRL_GROUP_SINGLE(port22, port_range0, 18), - UNIPHIER_PINCTRL_GROUP_SINGLE(port23, port_range0, 19), - UNIPHIER_PINCTRL_GROUP_SINGLE(port24, port_range0, 20), - UNIPHIER_PINCTRL_GROUP_SINGLE(port25, port_range0, 21), - UNIPHIER_PINCTRL_GROUP_SINGLE(port26, port_range0, 22), - UNIPHIER_PINCTRL_GROUP_SINGLE(port27, port_range0, 23), - UNIPHIER_PINCTRL_GROUP_SINGLE(port30, port_range0, 24), - UNIPHIER_PINCTRL_GROUP_SINGLE(port31, port_range0, 25), - UNIPHIER_PINCTRL_GROUP_SINGLE(port32, port_range0, 26), - UNIPHIER_PINCTRL_GROUP_SINGLE(port33, port_range0, 27), - UNIPHIER_PINCTRL_GROUP_SINGLE(port34, port_range0, 28), - UNIPHIER_PINCTRL_GROUP_SINGLE(port35, port_range0, 29), - UNIPHIER_PINCTRL_GROUP_SINGLE(port36, port_range0, 30), - UNIPHIER_PINCTRL_GROUP_SINGLE(port37, port_range0, 31), - UNIPHIER_PINCTRL_GROUP_SINGLE(port40, port_range0, 32), - UNIPHIER_PINCTRL_GROUP_SINGLE(port41, port_range0, 33), - UNIPHIER_PINCTRL_GROUP_SINGLE(port42, port_range0, 34), - UNIPHIER_PINCTRL_GROUP_SINGLE(port43, port_range0, 35), - UNIPHIER_PINCTRL_GROUP_SINGLE(port44, port_range0, 36), - UNIPHIER_PINCTRL_GROUP_SINGLE(port45, port_range0, 37), - UNIPHIER_PINCTRL_GROUP_SINGLE(port46, port_range0, 38), - UNIPHIER_PINCTRL_GROUP_SINGLE(port47, port_range0, 39), - UNIPHIER_PINCTRL_GROUP_SINGLE(port50, port_range0, 40), - UNIPHIER_PINCTRL_GROUP_SINGLE(port51, port_range0, 41), - UNIPHIER_PINCTRL_GROUP_SINGLE(port52, port_range0, 42), - UNIPHIER_PINCTRL_GROUP_SINGLE(port53, port_range0, 43), - UNIPHIER_PINCTRL_GROUP_SINGLE(port54, port_range0, 44), - UNIPHIER_PINCTRL_GROUP_SINGLE(port55, port_range0, 45), - UNIPHIER_PINCTRL_GROUP_SINGLE(port56, port_range0, 46), - UNIPHIER_PINCTRL_GROUP_SINGLE(port57, port_range0, 47), - UNIPHIER_PINCTRL_GROUP_SINGLE(port60, port_range0, 48), - UNIPHIER_PINCTRL_GROUP_SINGLE(port61, port_range0, 49), - UNIPHIER_PINCTRL_GROUP_SINGLE(port62, port_range0, 50), - UNIPHIER_PINCTRL_GROUP_SINGLE(port63, port_range0, 51), - UNIPHIER_PINCTRL_GROUP_SINGLE(port64, port_range0, 52), - UNIPHIER_PINCTRL_GROUP_SINGLE(port65, port_range0, 53), - UNIPHIER_PINCTRL_GROUP_SINGLE(port66, port_range0, 54), - UNIPHIER_PINCTRL_GROUP_SINGLE(port67, port_range0, 55), - UNIPHIER_PINCTRL_GROUP_SINGLE(port70, port_range0, 56), - UNIPHIER_PINCTRL_GROUP_SINGLE(port71, port_range0, 57), - UNIPHIER_PINCTRL_GROUP_SINGLE(port72, port_range0, 58), - UNIPHIER_PINCTRL_GROUP_SINGLE(port73, port_range0, 59), - UNIPHIER_PINCTRL_GROUP_SINGLE(port74, port_range0, 60), - UNIPHIER_PINCTRL_GROUP_SINGLE(port75, port_range0, 61), - UNIPHIER_PINCTRL_GROUP_SINGLE(port76, port_range0, 62), - UNIPHIER_PINCTRL_GROUP_SINGLE(port77, port_range0, 63), - UNIPHIER_PINCTRL_GROUP_SINGLE(port80, port_range0, 64), - UNIPHIER_PINCTRL_GROUP_SINGLE(port81, port_range0, 65), - UNIPHIER_PINCTRL_GROUP_SINGLE(port82, port_range0, 66), - UNIPHIER_PINCTRL_GROUP_SINGLE(port83, port_range0, 67), - UNIPHIER_PINCTRL_GROUP_SINGLE(port84, port_range0, 68), - UNIPHIER_PINCTRL_GROUP_SINGLE(port85, port_range0, 69), - UNIPHIER_PINCTRL_GROUP_SINGLE(port86, port_range0, 70), - UNIPHIER_PINCTRL_GROUP_SINGLE(port87, port_range0, 71), - UNIPHIER_PINCTRL_GROUP_SINGLE(port90, port_range0, 72), - UNIPHIER_PINCTRL_GROUP_SINGLE(port91, port_range0, 73), - UNIPHIER_PINCTRL_GROUP_SINGLE(port92, port_range0, 74), - UNIPHIER_PINCTRL_GROUP_SINGLE(port93, port_range0, 75), - UNIPHIER_PINCTRL_GROUP_SINGLE(port94, port_range0, 76), - UNIPHIER_PINCTRL_GROUP_SINGLE(port95, port_range0, 77), - UNIPHIER_PINCTRL_GROUP_SINGLE(port96, port_range0, 78), - UNIPHIER_PINCTRL_GROUP_SINGLE(port97, port_range0, 79), - UNIPHIER_PINCTRL_GROUP_SINGLE(port100, port_range0, 80), - UNIPHIER_PINCTRL_GROUP_SINGLE(port101, port_range0, 81), - UNIPHIER_PINCTRL_GROUP_SINGLE(port102, port_range0, 82), - UNIPHIER_PINCTRL_GROUP_SINGLE(port103, port_range0, 83), - UNIPHIER_PINCTRL_GROUP_SINGLE(port104, port_range0, 84), - UNIPHIER_PINCTRL_GROUP_SINGLE(port105, port_range0, 85), - UNIPHIER_PINCTRL_GROUP_SINGLE(port106, port_range0, 86), - UNIPHIER_PINCTRL_GROUP_SINGLE(port107, port_range0, 87), - UNIPHIER_PINCTRL_GROUP_SINGLE(port110, port_range0, 88), - UNIPHIER_PINCTRL_GROUP_SINGLE(port111, port_range0, 89), - UNIPHIER_PINCTRL_GROUP_SINGLE(port112, port_range0, 90), - UNIPHIER_PINCTRL_GROUP_SINGLE(port113, port_range0, 91), - UNIPHIER_PINCTRL_GROUP_SINGLE(port114, port_range0, 92), - UNIPHIER_PINCTRL_GROUP_SINGLE(port115, port_range0, 93), - UNIPHIER_PINCTRL_GROUP_SINGLE(port116, port_range0, 94), - UNIPHIER_PINCTRL_GROUP_SINGLE(port117, port_range0, 95), - UNIPHIER_PINCTRL_GROUP_SINGLE(port120, port_range0, 96), - UNIPHIER_PINCTRL_GROUP_SINGLE(port121, port_range0, 97), - UNIPHIER_PINCTRL_GROUP_SINGLE(port122, port_range0, 98), - UNIPHIER_PINCTRL_GROUP_SINGLE(port123, port_range0, 99), - UNIPHIER_PINCTRL_GROUP_SINGLE(port124, port_range0, 100), - UNIPHIER_PINCTRL_GROUP_SINGLE(port125, port_range0, 101), - UNIPHIER_PINCTRL_GROUP_SINGLE(port126, port_range0, 102), - UNIPHIER_PINCTRL_GROUP_SINGLE(port127, port_range0, 103), - UNIPHIER_PINCTRL_GROUP_SINGLE(port130, port_range0, 104), - UNIPHIER_PINCTRL_GROUP_SINGLE(port131, port_range0, 105), - UNIPHIER_PINCTRL_GROUP_SINGLE(port132, port_range0, 106), - UNIPHIER_PINCTRL_GROUP_SINGLE(port133, port_range0, 107), - UNIPHIER_PINCTRL_GROUP_SINGLE(port134, port_range0, 108), - UNIPHIER_PINCTRL_GROUP_SINGLE(port135, port_range0, 109), - UNIPHIER_PINCTRL_GROUP_SINGLE(port136, port_range0, 110), - UNIPHIER_PINCTRL_GROUP_SINGLE(port137, port_range0, 111), - UNIPHIER_PINCTRL_GROUP_SINGLE(port140, port_range0, 112), - UNIPHIER_PINCTRL_GROUP_SINGLE(port141, port_range0, 113), - UNIPHIER_PINCTRL_GROUP_SINGLE(port142, port_range0, 114), - UNIPHIER_PINCTRL_GROUP_SINGLE(port143, port_range0, 115), - UNIPHIER_PINCTRL_GROUP_SINGLE(port144, port_range0, 116), - UNIPHIER_PINCTRL_GROUP_SINGLE(port145, port_range0, 117), - UNIPHIER_PINCTRL_GROUP_SINGLE(port146, port_range0, 118), - UNIPHIER_PINCTRL_GROUP_SINGLE(port147, port_range0, 119), - UNIPHIER_PINCTRL_GROUP_SINGLE(port165, port_range1, 0), - UNIPHIER_PINCTRL_GROUP_SINGLE(xirq0, xirq_range0, 0), - UNIPHIER_PINCTRL_GROUP_SINGLE(xirq1, xirq_range0, 1), - UNIPHIER_PINCTRL_GROUP_SINGLE(xirq2, xirq_range0, 2), - UNIPHIER_PINCTRL_GROUP_SINGLE(xirq3, xirq_range0, 3), - UNIPHIER_PINCTRL_GROUP_SINGLE(xirq4, xirq_range0, 4), - UNIPHIER_PINCTRL_GROUP_SINGLE(xirq5, xirq_range0, 5), - UNIPHIER_PINCTRL_GROUP_SINGLE(xirq6, xirq_range0, 6), - UNIPHIER_PINCTRL_GROUP_SINGLE(xirq7, xirq_range0, 7), - UNIPHIER_PINCTRL_GROUP_SINGLE(xirq8, xirq_range0, 8), - UNIPHIER_PINCTRL_GROUP_SINGLE(xirq9, xirq_range0, 9), - UNIPHIER_PINCTRL_GROUP_SINGLE(xirq10, xirq_range0, 10), - UNIPHIER_PINCTRL_GROUP_SINGLE(xirq11, xirq_range0, 11), - UNIPHIER_PINCTRL_GROUP_SINGLE(xirq12, xirq_range0, 12), - UNIPHIER_PINCTRL_GROUP_SINGLE(xirq14, xirq_range1, 0), - UNIPHIER_PINCTRL_GROUP_SINGLE(xirq15, xirq_range1, 1), + UNIPHIER_PINCTRL_GROUP_GPIO(gpio_range), }; static const char * const emmc_groups[] = {"emmc", "emmc_dat8"}; @@ -850,46 +676,6 @@ static const char * const uart3_groups[] = {"uart3"}; static const char * const usb0_groups[] = {"usb0"}; static const char * const usb1_groups[] = {"usb1"}; static const char * const usb2_groups[] = {"usb2", "usb2b"}; -static const char * const port_groups[] = { - "port00", "port01", "port02", "port03", - "port04", "port05", "port06", "port07", - "port10", "port11", "port12", "port13", - "port14", "port15", "port16", "port17", - "port20", "port21", "port22", "port23", - "port24", "port25", "port26", "port27", - "port30", "port31", "port32", "port33", - "port34", "port35", "port36", "port37", - "port40", "port41", "port42", "port43", - "port44", "port45", "port46", "port47", - "port50", "port51", "port52", "port53", - "port54", "port55", "port56", "port57", - "port60", "port61", "port62", "port63", - "port64", "port65", "port66", "port67", - "port70", "port71", "port72", "port73", - "port74", "port75", "port76", "port77", - "port80", "port81", "port82", "port83", - "port84", "port85", "port86", "port87", - "port90", "port91", "port92", "port93", - "port94", "port95", "port96", "port97", - "port100", "port101", "port102", "port103", - "port104", "port105", "port106", "port107", - "port110", "port111", "port112", "port113", - "port114", "port115", "port116", "port117", - "port120", "port121", "port122", "port123", - "port124", "port125", "port126", "port127", - "port130", "port131", "port132", "port133", - "port134", "port135", "port136", "port137", - "port140", "port141", "port142", "port143", - "port144", "port145", "port146", "port147", - /* port150-164 missing */ - /* none */ "port165", -}; -static const char * const xirq_groups[] = { - "xirq0", "xirq1", "xirq2", "xirq3", - "xirq4", "xirq5", "xirq6", "xirq7", - "xirq8", "xirq9", "xirq10", "xirq11", - "xirq12", /* none*/ "xirq14", "xirq15", -}; static const struct uniphier_pinmux_function uniphier_ld4_functions[] = { UNIPHIER_PINMUX_FUNCTION(emmc), @@ -909,10 +695,25 @@ static const struct uniphier_pinmux_function uniphier_ld4_functions[] = { UNIPHIER_PINMUX_FUNCTION(usb0), UNIPHIER_PINMUX_FUNCTION(usb1), UNIPHIER_PINMUX_FUNCTION(usb2), - UNIPHIER_PINMUX_FUNCTION(port), - UNIPHIER_PINMUX_FUNCTION(xirq), }; +static int uniphier_ld4_get_gpio_muxval(unsigned int pin, + unsigned int gpio_offset) +{ + switch (gpio_offset) { + case 0 ... 22: /* PORT00-PORT26 */ + case 121 ... 131: /* XIRQ1-XIRQ11 */ + case 134: /* XIRQ14 */ + return 0; + case 120: /* XIRQ0 */ + case 132: /* XIRQ12 */ + case 135: /* XIRQ15 */ + return 14; + default: + return 15; + } +} + static struct uniphier_pinctrl_socdata uniphier_ld4_pindata = { .pins = uniphier_ld4_pins, .npins = ARRAY_SIZE(uniphier_ld4_pins), @@ -920,6 +721,7 @@ static struct uniphier_pinctrl_socdata uniphier_ld4_pindata = { .groups_count = ARRAY_SIZE(uniphier_ld4_groups), .functions = uniphier_ld4_functions, .functions_count = ARRAY_SIZE(uniphier_ld4_functions), + .get_gpio_muxval = uniphier_ld4_get_gpio_muxval, .caps = 0, }; @@ -938,6 +740,7 @@ static struct platform_driver uniphier_ld4_pinctrl_driver = { .driver = { .name = "uniphier-ld4-pinctrl", .of_match_table = uniphier_ld4_pinctrl_match, + .pm = &uniphier_pinctrl_pm_ops, }, }; builtin_platform_driver(uniphier_ld4_pinctrl_driver); diff --git a/drivers/pinctrl/uniphier/pinctrl-uniphier-ld6b.c b/drivers/pinctrl/uniphier/pinctrl-uniphier-ld6b.c index 8a0da937b670..493a90c6d733 100644 --- a/drivers/pinctrl/uniphier/pinctrl-uniphier-ld6b.c +++ b/drivers/pinctrl/uniphier/pinctrl-uniphier-ld6b.c @@ -803,7 +803,7 @@ static const unsigned usb2_pins[] = {60, 61}; static const int usb2_muxvals[] = {0, 0}; static const unsigned usb3_pins[] = {62, 63}; static const int usb3_muxvals[] = {0, 0}; -static const unsigned port_range0_pins[] = { +static const unsigned int gpio_range0_pins[] = { 127, 128, 129, 130, 131, 132, 133, 134, /* PORT0x */ 135, 136, 137, 138, 139, 140, 141, 142, /* PORT1x */ 0, 1, 2, 3, 4, 5, 6, 7, /* PORT2x */ @@ -816,26 +816,13 @@ static const unsigned port_range0_pins[] = { 61, 62, 63, 64, 65, 66, 67, 68, /* PORT9x */ 69, 70, 71, 76, 77, 78, 79, 80, /* PORT10x */ }; -static const int port_range0_muxvals[] = { - 15, 15, 15, 15, 15, 15, 15, 15, /* PORT0x */ - 15, 15, 15, 15, 15, 15, 15, 15, /* PORT1x */ - 15, 15, 15, 15, 15, 15, 15, 15, /* PORT2x */ - 15, 15, 15, 15, 15, 15, 15, 15, /* PORT3x */ - 15, 15, 15, 15, 15, 15, 15, 15, /* PORT4x */ - 15, 15, 15, 15, 15, 15, 15, 15, /* PORT5x */ - 15, 15, 15, 15, 15, 15, 15, 15, /* PORT6x */ - 15, 15, 15, 15, 15, 15, 15, 15, /* PORT7x */ - 15, 15, 15, 15, 15, 15, 15, 15, /* PORT8x */ - 15, 15, 15, 15, 15, 15, 15, 15, /* PORT9x */ - 15, 15, 15, 15, 15, 15, 15, 15, /* PORT10x */ -}; -static const unsigned port_range1_pins[] = { +static const unsigned int gpio_range1_pins[] = { 81, 82, 83, 84, 85, 86, 87, 88, /* PORT12x */ 89, 90, 95, 96, 97, 98, 99, 100, /* PORT13x */ 101, 102, 103, 104, 105, 106, 107, 108, /* PORT14x */ - 118, 119, 120, 121, 122, 123, 124, 125, /* PORT15x */ - 126, 72, 73, 92, 177, 93, 94, 176, /* PORT16x */ - 74, 91, 27, 28, 29, 75, 20, 26, /* PORT17x */ + 118, 119, 120, 121, 122, 123, 124, 125, /* XIRQ0-7 */ + 126, 72, 73, 92, 177, 93, 94, 176, /* XIRQ8-15 */ + 74, 91, 27, 28, 29, 75, 20, 26, /* XIRQ16-23 */ 109, 110, 111, 112, 113, 114, 115, 116, /* PORT18x */ 117, 143, 144, 145, 146, 147, 148, 149, /* PORT19x */ 150, 151, 152, 153, 154, 155, 156, 157, /* PORT20x */ @@ -848,35 +835,6 @@ static const unsigned port_range1_pins[] = { 218, 219, 220, 221, 223, 224, 225, 226, /* PORT27x */ 227, 228, 229, 230, 231, 232, 233, 234, /* PORT28x */ }; -static const int port_range1_muxvals[] = { - 15, 15, 15, 15, 15, 15, 15, 15, /* PORT12x */ - 15, 15, 15, 15, 15, 15, 15, 15, /* PORT13x */ - 15, 15, 15, 15, 15, 15, 15, 15, /* PORT14x */ - 15, 15, 15, 15, 15, 15, 15, 15, /* PORT15x */ - 15, 15, 15, 15, 15, 15, 15, 15, /* PORT16x */ - 15, 15, 15, 15, 15, 15, 15, 15, /* PORT17x */ - 15, 15, 15, 15, 15, 15, 15, 15, /* PORT18x */ - 15, 15, 15, 15, 15, 15, 15, 15, /* PORT19x */ - 15, 15, 15, 15, 15, 15, 15, 15, /* PORT20x */ - 15, 15, 15, 15, 15, 15, 15, 15, /* PORT21x */ - 15, 15, 15, 15, 15, 15, 15, 15, /* PORT22x */ - 15, 15, 15, 15, 15, 15, 15, 15, /* PORT23x */ - 15, 15, 15, 15, 15, 15, 15, 15, /* PORT24x */ - 15, 15, 15, 15, 15, 15, 15, 15, /* PORT25x */ - 15, 15, 15, 15, 15, 15, 15, 15, /* PORT26x */ - 15, 15, 15, 15, 15, 15, 15, 15, /* PORT27x */ - 15, 15, 15, 15, 15, 15, 15, 15, /* PORT28x */ -}; -static const unsigned xirq_pins[] = { - 118, 119, 120, 121, 122, 123, 124, 125, /* XIRQ0-7 */ - 126, 72, 73, 92, 177, 93, 94, 176, /* XIRQ8-15 */ - 74, 91, 27, 28, 29, 75, 20, 26, /* XIRQ16-23 */ -}; -static const int xirq_muxvals[] = { - 14, 14, 14, 14, 14, 14, 14, 14, /* XIRQ0-7 */ - 14, 14, 14, 14, 14, 14, 14, 14, /* XIRQ8-15 */ - 14, 14, 14, 14, 14, 14, 14, 14, /* XIRQ16-23 */ -}; static const struct uniphier_pinctrl_group uniphier_ld6b_groups[] = { UNIPHIER_PINCTRL_GROUP(adinter), @@ -907,257 +865,8 @@ static const struct uniphier_pinctrl_group uniphier_ld6b_groups[] = { UNIPHIER_PINCTRL_GROUP(usb1), UNIPHIER_PINCTRL_GROUP(usb2), UNIPHIER_PINCTRL_GROUP(usb3), - UNIPHIER_PINCTRL_GROUP_GPIO_RANGE_PORT(port_range0), - UNIPHIER_PINCTRL_GROUP_GPIO_RANGE_PORT(port_range1), - UNIPHIER_PINCTRL_GROUP_GPIO_RANGE_IRQ(xirq), - UNIPHIER_PINCTRL_GROUP_SINGLE(port00, port_range0, 0), - UNIPHIER_PINCTRL_GROUP_SINGLE(port01, port_range0, 1), - UNIPHIER_PINCTRL_GROUP_SINGLE(port02, port_range0, 2), - UNIPHIER_PINCTRL_GROUP_SINGLE(port03, port_range0, 3), - UNIPHIER_PINCTRL_GROUP_SINGLE(port04, port_range0, 4), - UNIPHIER_PINCTRL_GROUP_SINGLE(port05, port_range0, 5), - UNIPHIER_PINCTRL_GROUP_SINGLE(port06, port_range0, 6), - UNIPHIER_PINCTRL_GROUP_SINGLE(port07, port_range0, 7), - UNIPHIER_PINCTRL_GROUP_SINGLE(port10, port_range0, 8), - UNIPHIER_PINCTRL_GROUP_SINGLE(port11, port_range0, 9), - UNIPHIER_PINCTRL_GROUP_SINGLE(port12, port_range0, 10), - UNIPHIER_PINCTRL_GROUP_SINGLE(port13, port_range0, 11), - UNIPHIER_PINCTRL_GROUP_SINGLE(port14, port_range0, 12), - UNIPHIER_PINCTRL_GROUP_SINGLE(port15, port_range0, 13), - UNIPHIER_PINCTRL_GROUP_SINGLE(port16, port_range0, 14), - UNIPHIER_PINCTRL_GROUP_SINGLE(port17, port_range0, 15), - UNIPHIER_PINCTRL_GROUP_SINGLE(port20, port_range0, 16), - UNIPHIER_PINCTRL_GROUP_SINGLE(port21, port_range0, 17), - UNIPHIER_PINCTRL_GROUP_SINGLE(port22, port_range0, 18), - UNIPHIER_PINCTRL_GROUP_SINGLE(port23, port_range0, 19), - UNIPHIER_PINCTRL_GROUP_SINGLE(port24, port_range0, 20), - UNIPHIER_PINCTRL_GROUP_SINGLE(port25, port_range0, 21), - UNIPHIER_PINCTRL_GROUP_SINGLE(port26, port_range0, 22), - UNIPHIER_PINCTRL_GROUP_SINGLE(port27, port_range0, 23), - UNIPHIER_PINCTRL_GROUP_SINGLE(port30, port_range0, 24), - UNIPHIER_PINCTRL_GROUP_SINGLE(port31, port_range0, 25), - UNIPHIER_PINCTRL_GROUP_SINGLE(port32, port_range0, 26), - UNIPHIER_PINCTRL_GROUP_SINGLE(port33, port_range0, 27), - UNIPHIER_PINCTRL_GROUP_SINGLE(port34, port_range0, 28), - UNIPHIER_PINCTRL_GROUP_SINGLE(port35, port_range0, 29), - UNIPHIER_PINCTRL_GROUP_SINGLE(port36, port_range0, 30), - UNIPHIER_PINCTRL_GROUP_SINGLE(port37, port_range0, 31), - UNIPHIER_PINCTRL_GROUP_SINGLE(port40, port_range0, 32), - UNIPHIER_PINCTRL_GROUP_SINGLE(port41, port_range0, 33), - UNIPHIER_PINCTRL_GROUP_SINGLE(port42, port_range0, 34), - UNIPHIER_PINCTRL_GROUP_SINGLE(port43, port_range0, 35), - UNIPHIER_PINCTRL_GROUP_SINGLE(port44, port_range0, 36), - UNIPHIER_PINCTRL_GROUP_SINGLE(port45, port_range0, 37), - UNIPHIER_PINCTRL_GROUP_SINGLE(port46, port_range0, 38), - UNIPHIER_PINCTRL_GROUP_SINGLE(port47, port_range0, 39), - UNIPHIER_PINCTRL_GROUP_SINGLE(port50, port_range0, 40), - UNIPHIER_PINCTRL_GROUP_SINGLE(port51, port_range0, 41), - UNIPHIER_PINCTRL_GROUP_SINGLE(port52, port_range0, 42), - UNIPHIER_PINCTRL_GROUP_SINGLE(port53, port_range0, 43), - UNIPHIER_PINCTRL_GROUP_SINGLE(port54, port_range0, 44), - UNIPHIER_PINCTRL_GROUP_SINGLE(port55, port_range0, 45), - UNIPHIER_PINCTRL_GROUP_SINGLE(port56, port_range0, 46), - UNIPHIER_PINCTRL_GROUP_SINGLE(port57, port_range0, 47), - UNIPHIER_PINCTRL_GROUP_SINGLE(port60, port_range0, 48), - UNIPHIER_PINCTRL_GROUP_SINGLE(port61, port_range0, 49), - UNIPHIER_PINCTRL_GROUP_SINGLE(port62, port_range0, 50), - UNIPHIER_PINCTRL_GROUP_SINGLE(port63, port_range0, 51), - UNIPHIER_PINCTRL_GROUP_SINGLE(port64, port_range0, 52), - UNIPHIER_PINCTRL_GROUP_SINGLE(port65, port_range0, 53), - UNIPHIER_PINCTRL_GROUP_SINGLE(port66, port_range0, 54), - UNIPHIER_PINCTRL_GROUP_SINGLE(port67, port_range0, 55), - UNIPHIER_PINCTRL_GROUP_SINGLE(port70, port_range0, 56), - UNIPHIER_PINCTRL_GROUP_SINGLE(port71, port_range0, 57), - UNIPHIER_PINCTRL_GROUP_SINGLE(port72, port_range0, 58), - UNIPHIER_PINCTRL_GROUP_SINGLE(port73, port_range0, 59), - UNIPHIER_PINCTRL_GROUP_SINGLE(port74, port_range0, 60), - UNIPHIER_PINCTRL_GROUP_SINGLE(port75, port_range0, 61), - UNIPHIER_PINCTRL_GROUP_SINGLE(port76, port_range0, 62), - UNIPHIER_PINCTRL_GROUP_SINGLE(port77, port_range0, 63), - UNIPHIER_PINCTRL_GROUP_SINGLE(port80, port_range0, 64), - UNIPHIER_PINCTRL_GROUP_SINGLE(port81, port_range0, 65), - UNIPHIER_PINCTRL_GROUP_SINGLE(port82, port_range0, 66), - UNIPHIER_PINCTRL_GROUP_SINGLE(port83, port_range0, 67), - UNIPHIER_PINCTRL_GROUP_SINGLE(port84, port_range0, 68), - UNIPHIER_PINCTRL_GROUP_SINGLE(port85, port_range0, 69), - UNIPHIER_PINCTRL_GROUP_SINGLE(port86, port_range0, 70), - UNIPHIER_PINCTRL_GROUP_SINGLE(port87, port_range0, 71), - UNIPHIER_PINCTRL_GROUP_SINGLE(port90, port_range0, 72), - UNIPHIER_PINCTRL_GROUP_SINGLE(port91, port_range0, 73), - UNIPHIER_PINCTRL_GROUP_SINGLE(port92, port_range0, 74), - UNIPHIER_PINCTRL_GROUP_SINGLE(port93, port_range0, 75), - UNIPHIER_PINCTRL_GROUP_SINGLE(port94, port_range0, 76), - UNIPHIER_PINCTRL_GROUP_SINGLE(port95, port_range0, 77), - UNIPHIER_PINCTRL_GROUP_SINGLE(port96, port_range0, 78), - UNIPHIER_PINCTRL_GROUP_SINGLE(port97, port_range0, 79), - UNIPHIER_PINCTRL_GROUP_SINGLE(port100, port_range0, 80), - UNIPHIER_PINCTRL_GROUP_SINGLE(port101, port_range0, 81), - UNIPHIER_PINCTRL_GROUP_SINGLE(port102, port_range0, 82), - UNIPHIER_PINCTRL_GROUP_SINGLE(port103, port_range0, 83), - UNIPHIER_PINCTRL_GROUP_SINGLE(port104, port_range0, 84), - UNIPHIER_PINCTRL_GROUP_SINGLE(port105, port_range0, 85), - UNIPHIER_PINCTRL_GROUP_SINGLE(port106, port_range0, 86), - UNIPHIER_PINCTRL_GROUP_SINGLE(port107, port_range0, 87), - UNIPHIER_PINCTRL_GROUP_SINGLE(port120, port_range1, 0), - UNIPHIER_PINCTRL_GROUP_SINGLE(port121, port_range1, 1), - UNIPHIER_PINCTRL_GROUP_SINGLE(port122, port_range1, 2), - UNIPHIER_PINCTRL_GROUP_SINGLE(port123, port_range1, 3), - UNIPHIER_PINCTRL_GROUP_SINGLE(port124, port_range1, 4), - UNIPHIER_PINCTRL_GROUP_SINGLE(port125, port_range1, 5), - UNIPHIER_PINCTRL_GROUP_SINGLE(port126, port_range1, 6), - UNIPHIER_PINCTRL_GROUP_SINGLE(port127, port_range1, 7), - UNIPHIER_PINCTRL_GROUP_SINGLE(port130, port_range1, 8), - UNIPHIER_PINCTRL_GROUP_SINGLE(port131, port_range1, 9), - UNIPHIER_PINCTRL_GROUP_SINGLE(port132, port_range1, 10), - UNIPHIER_PINCTRL_GROUP_SINGLE(port133, port_range1, 11), - UNIPHIER_PINCTRL_GROUP_SINGLE(port134, port_range1, 12), - UNIPHIER_PINCTRL_GROUP_SINGLE(port135, port_range1, 13), - UNIPHIER_PINCTRL_GROUP_SINGLE(port136, port_range1, 14), - UNIPHIER_PINCTRL_GROUP_SINGLE(port137, port_range1, 15), - UNIPHIER_PINCTRL_GROUP_SINGLE(port140, port_range1, 16), - UNIPHIER_PINCTRL_GROUP_SINGLE(port141, port_range1, 17), - UNIPHIER_PINCTRL_GROUP_SINGLE(port142, port_range1, 18), - UNIPHIER_PINCTRL_GROUP_SINGLE(port143, port_range1, 19), - UNIPHIER_PINCTRL_GROUP_SINGLE(port144, port_range1, 20), - UNIPHIER_PINCTRL_GROUP_SINGLE(port145, port_range1, 21), - UNIPHIER_PINCTRL_GROUP_SINGLE(port146, port_range1, 22), - UNIPHIER_PINCTRL_GROUP_SINGLE(port147, port_range1, 23), - UNIPHIER_PINCTRL_GROUP_SINGLE(port150, port_range1, 24), - UNIPHIER_PINCTRL_GROUP_SINGLE(port151, port_range1, 25), - UNIPHIER_PINCTRL_GROUP_SINGLE(port152, port_range1, 26), - UNIPHIER_PINCTRL_GROUP_SINGLE(port153, port_range1, 27), - UNIPHIER_PINCTRL_GROUP_SINGLE(port154, port_range1, 28), - UNIPHIER_PINCTRL_GROUP_SINGLE(port155, port_range1, 29), - UNIPHIER_PINCTRL_GROUP_SINGLE(port156, port_range1, 30), - UNIPHIER_PINCTRL_GROUP_SINGLE(port157, port_range1, 31), - UNIPHIER_PINCTRL_GROUP_SINGLE(port160, port_range1, 32), - UNIPHIER_PINCTRL_GROUP_SINGLE(port161, port_range1, 33), - UNIPHIER_PINCTRL_GROUP_SINGLE(port162, port_range1, 34), - UNIPHIER_PINCTRL_GROUP_SINGLE(port163, port_range1, 35), - UNIPHIER_PINCTRL_GROUP_SINGLE(port164, port_range1, 36), - UNIPHIER_PINCTRL_GROUP_SINGLE(port165, port_range1, 37), - UNIPHIER_PINCTRL_GROUP_SINGLE(port166, port_range1, 38), - UNIPHIER_PINCTRL_GROUP_SINGLE(port167, port_range1, 39), - UNIPHIER_PINCTRL_GROUP_SINGLE(port170, port_range1, 40), - UNIPHIER_PINCTRL_GROUP_SINGLE(port171, port_range1, 41), - UNIPHIER_PINCTRL_GROUP_SINGLE(port172, port_range1, 42), - UNIPHIER_PINCTRL_GROUP_SINGLE(port173, port_range1, 43), - UNIPHIER_PINCTRL_GROUP_SINGLE(port174, port_range1, 44), - UNIPHIER_PINCTRL_GROUP_SINGLE(port175, port_range1, 45), - UNIPHIER_PINCTRL_GROUP_SINGLE(port176, port_range1, 46), - UNIPHIER_PINCTRL_GROUP_SINGLE(port177, port_range1, 47), - UNIPHIER_PINCTRL_GROUP_SINGLE(port180, port_range1, 48), - UNIPHIER_PINCTRL_GROUP_SINGLE(port181, port_range1, 49), - UNIPHIER_PINCTRL_GROUP_SINGLE(port182, port_range1, 50), - UNIPHIER_PINCTRL_GROUP_SINGLE(port183, port_range1, 51), - UNIPHIER_PINCTRL_GROUP_SINGLE(port184, port_range1, 52), - UNIPHIER_PINCTRL_GROUP_SINGLE(port185, port_range1, 53), - UNIPHIER_PINCTRL_GROUP_SINGLE(port186, port_range1, 54), - UNIPHIER_PINCTRL_GROUP_SINGLE(port187, port_range1, 55), - UNIPHIER_PINCTRL_GROUP_SINGLE(port190, port_range1, 56), - UNIPHIER_PINCTRL_GROUP_SINGLE(port191, port_range1, 57), - UNIPHIER_PINCTRL_GROUP_SINGLE(port192, port_range1, 58), - UNIPHIER_PINCTRL_GROUP_SINGLE(port193, port_range1, 59), - UNIPHIER_PINCTRL_GROUP_SINGLE(port194, port_range1, 60), - UNIPHIER_PINCTRL_GROUP_SINGLE(port195, port_range1, 61), - UNIPHIER_PINCTRL_GROUP_SINGLE(port196, port_range1, 62), - UNIPHIER_PINCTRL_GROUP_SINGLE(port197, port_range1, 63), - UNIPHIER_PINCTRL_GROUP_SINGLE(port200, port_range1, 64), - UNIPHIER_PINCTRL_GROUP_SINGLE(port201, port_range1, 65), - UNIPHIER_PINCTRL_GROUP_SINGLE(port202, port_range1, 66), - UNIPHIER_PINCTRL_GROUP_SINGLE(port203, port_range1, 67), - UNIPHIER_PINCTRL_GROUP_SINGLE(port204, port_range1, 68), - UNIPHIER_PINCTRL_GROUP_SINGLE(port205, port_range1, 69), - UNIPHIER_PINCTRL_GROUP_SINGLE(port206, port_range1, 70), - UNIPHIER_PINCTRL_GROUP_SINGLE(port207, port_range1, 71), - UNIPHIER_PINCTRL_GROUP_SINGLE(port210, port_range1, 72), - UNIPHIER_PINCTRL_GROUP_SINGLE(port211, port_range1, 73), - UNIPHIER_PINCTRL_GROUP_SINGLE(port212, port_range1, 74), - UNIPHIER_PINCTRL_GROUP_SINGLE(port213, port_range1, 75), - UNIPHIER_PINCTRL_GROUP_SINGLE(port214, port_range1, 76), - UNIPHIER_PINCTRL_GROUP_SINGLE(port215, port_range1, 77), - UNIPHIER_PINCTRL_GROUP_SINGLE(port216, port_range1, 78), - UNIPHIER_PINCTRL_GROUP_SINGLE(port217, port_range1, 79), - UNIPHIER_PINCTRL_GROUP_SINGLE(port220, port_range1, 80), - UNIPHIER_PINCTRL_GROUP_SINGLE(port221, port_range1, 81), - UNIPHIER_PINCTRL_GROUP_SINGLE(port222, port_range1, 82), - UNIPHIER_PINCTRL_GROUP_SINGLE(port223, port_range1, 83), - UNIPHIER_PINCTRL_GROUP_SINGLE(port224, port_range1, 84), - UNIPHIER_PINCTRL_GROUP_SINGLE(port225, port_range1, 85), - UNIPHIER_PINCTRL_GROUP_SINGLE(port226, port_range1, 86), - UNIPHIER_PINCTRL_GROUP_SINGLE(port227, port_range1, 87), - UNIPHIER_PINCTRL_GROUP_SINGLE(port230, port_range1, 88), - UNIPHIER_PINCTRL_GROUP_SINGLE(port231, port_range1, 89), - UNIPHIER_PINCTRL_GROUP_SINGLE(port232, port_range1, 90), - UNIPHIER_PINCTRL_GROUP_SINGLE(port233, port_range1, 91), - UNIPHIER_PINCTRL_GROUP_SINGLE(port234, port_range1, 92), - UNIPHIER_PINCTRL_GROUP_SINGLE(port235, port_range1, 93), - UNIPHIER_PINCTRL_GROUP_SINGLE(port236, port_range1, 94), - UNIPHIER_PINCTRL_GROUP_SINGLE(port237, port_range1, 95), - UNIPHIER_PINCTRL_GROUP_SINGLE(port240, port_range1, 96), - UNIPHIER_PINCTRL_GROUP_SINGLE(port241, port_range1, 97), - UNIPHIER_PINCTRL_GROUP_SINGLE(port242, port_range1, 98), - UNIPHIER_PINCTRL_GROUP_SINGLE(port243, port_range1, 99), - UNIPHIER_PINCTRL_GROUP_SINGLE(port244, port_range1, 100), - UNIPHIER_PINCTRL_GROUP_SINGLE(port245, port_range1, 101), - UNIPHIER_PINCTRL_GROUP_SINGLE(port246, port_range1, 102), - UNIPHIER_PINCTRL_GROUP_SINGLE(port247, port_range1, 103), - UNIPHIER_PINCTRL_GROUP_SINGLE(port250, port_range1, 104), - UNIPHIER_PINCTRL_GROUP_SINGLE(port251, port_range1, 105), - UNIPHIER_PINCTRL_GROUP_SINGLE(port252, port_range1, 106), - UNIPHIER_PINCTRL_GROUP_SINGLE(port253, port_range1, 107), - UNIPHIER_PINCTRL_GROUP_SINGLE(port254, port_range1, 108), - UNIPHIER_PINCTRL_GROUP_SINGLE(port255, port_range1, 109), - UNIPHIER_PINCTRL_GROUP_SINGLE(port256, port_range1, 110), - UNIPHIER_PINCTRL_GROUP_SINGLE(port257, port_range1, 111), - UNIPHIER_PINCTRL_GROUP_SINGLE(port260, port_range1, 112), - UNIPHIER_PINCTRL_GROUP_SINGLE(port261, port_range1, 113), - UNIPHIER_PINCTRL_GROUP_SINGLE(port262, port_range1, 114), - UNIPHIER_PINCTRL_GROUP_SINGLE(port263, port_range1, 115), - UNIPHIER_PINCTRL_GROUP_SINGLE(port264, port_range1, 116), - UNIPHIER_PINCTRL_GROUP_SINGLE(port265, port_range1, 117), - UNIPHIER_PINCTRL_GROUP_SINGLE(port266, port_range1, 118), - UNIPHIER_PINCTRL_GROUP_SINGLE(port267, port_range1, 119), - UNIPHIER_PINCTRL_GROUP_SINGLE(port270, port_range1, 120), - UNIPHIER_PINCTRL_GROUP_SINGLE(port271, port_range1, 121), - UNIPHIER_PINCTRL_GROUP_SINGLE(port272, port_range1, 122), - UNIPHIER_PINCTRL_GROUP_SINGLE(port273, port_range1, 123), - UNIPHIER_PINCTRL_GROUP_SINGLE(port274, port_range1, 124), - UNIPHIER_PINCTRL_GROUP_SINGLE(port275, port_range1, 125), - UNIPHIER_PINCTRL_GROUP_SINGLE(port276, port_range1, 126), - UNIPHIER_PINCTRL_GROUP_SINGLE(port277, port_range1, 127), - UNIPHIER_PINCTRL_GROUP_SINGLE(port280, port_range1, 128), - UNIPHIER_PINCTRL_GROUP_SINGLE(port281, port_range1, 129), - UNIPHIER_PINCTRL_GROUP_SINGLE(port282, port_range1, 130), - UNIPHIER_PINCTRL_GROUP_SINGLE(port283, port_range1, 131), - UNIPHIER_PINCTRL_GROUP_SINGLE(port284, port_range1, 132), - UNIPHIER_PINCTRL_GROUP_SINGLE(port285, port_range1, 133), - UNIPHIER_PINCTRL_GROUP_SINGLE(port286, port_range1, 134), - UNIPHIER_PINCTRL_GROUP_SINGLE(port287, port_range1, 135), - UNIPHIER_PINCTRL_GROUP_SINGLE(xirq0, xirq, 0), - UNIPHIER_PINCTRL_GROUP_SINGLE(xirq1, xirq, 1), - UNIPHIER_PINCTRL_GROUP_SINGLE(xirq2, xirq, 2), - UNIPHIER_PINCTRL_GROUP_SINGLE(xirq3, xirq, 3), - UNIPHIER_PINCTRL_GROUP_SINGLE(xirq4, xirq, 4), - UNIPHIER_PINCTRL_GROUP_SINGLE(xirq5, xirq, 5), - UNIPHIER_PINCTRL_GROUP_SINGLE(xirq6, xirq, 6), - UNIPHIER_PINCTRL_GROUP_SINGLE(xirq7, xirq, 7), - UNIPHIER_PINCTRL_GROUP_SINGLE(xirq8, xirq, 8), - UNIPHIER_PINCTRL_GROUP_SINGLE(xirq9, xirq, 9), - UNIPHIER_PINCTRL_GROUP_SINGLE(xirq10, xirq, 10), - UNIPHIER_PINCTRL_GROUP_SINGLE(xirq11, xirq, 11), - UNIPHIER_PINCTRL_GROUP_SINGLE(xirq12, xirq, 12), - UNIPHIER_PINCTRL_GROUP_SINGLE(xirq13, xirq, 13), - UNIPHIER_PINCTRL_GROUP_SINGLE(xirq14, xirq, 14), - UNIPHIER_PINCTRL_GROUP_SINGLE(xirq15, xirq, 15), - UNIPHIER_PINCTRL_GROUP_SINGLE(xirq16, xirq, 16), - UNIPHIER_PINCTRL_GROUP_SINGLE(xirq17, xirq, 17), - UNIPHIER_PINCTRL_GROUP_SINGLE(xirq18, xirq, 18), - UNIPHIER_PINCTRL_GROUP_SINGLE(xirq19, xirq, 19), - UNIPHIER_PINCTRL_GROUP_SINGLE(xirq20, xirq, 20), - UNIPHIER_PINCTRL_GROUP_SINGLE(xirq21, xirq, 21), - UNIPHIER_PINCTRL_GROUP_SINGLE(xirq22, xirq, 22), - UNIPHIER_PINCTRL_GROUP_SINGLE(xirq23, xirq, 23), + UNIPHIER_PINCTRL_GROUP_GPIO(gpio_range0), + UNIPHIER_PINCTRL_GROUP_GPIO(gpio_range1), }; static const char * const adinter_groups[] = {"adinter"}; @@ -1183,73 +892,6 @@ static const char * const usb0_groups[] = {"usb0"}; static const char * const usb1_groups[] = {"usb1"}; static const char * const usb2_groups[] = {"usb2"}; static const char * const usb3_groups[] = {"usb3"}; -static const char * const port_groups[] = { - "port00", "port01", "port02", "port03", - "port04", "port05", "port06", "port07", - "port10", "port11", "port12", "port13", - "port14", "port15", "port16", "port17", - "port20", "port21", "port22", "port23", - "port24", "port25", "port26", "port27", - "port30", "port31", "port32", "port33", - "port34", "port35", "port36", "port37", - "port40", "port41", "port42", "port43", - "port44", "port45", "port46", "port47", - "port50", "port51", "port52", "port53", - "port54", "port55", "port56", "port57", - "port60", "port61", "port62", "port63", - "port64", "port65", "port66", "port67", - "port70", "port71", "port72", "port73", - "port74", "port75", "port76", "port77", - "port80", "port81", "port82", "port83", - "port84", "port85", "port86", "port87", - "port90", "port91", "port92", "port93", - "port94", "port95", "port96", "port97", - "port100", "port101", "port102", "port103", - "port104", "port105", "port106", "port107", - /* port110-117 missing */ - "port120", "port121", "port122", "port123", - "port124", "port125", "port126", "port127", - "port130", "port131", "port132", "port133", - "port134", "port135", "port136", "port137", - "port140", "port141", "port142", "port143", - "port144", "port145", "port146", "port147", - "port150", "port151", "port152", "port153", - "port154", "port155", "port156", "port157", - "port160", "port161", "port162", "port163", - "port164", "port165", "port166", "port167", - "port170", "port171", "port172", "port173", - "port174", "port175", "port176", "port177", - "port180", "port181", "port182", "port183", - "port184", "port185", "port186", "port187", - "port190", "port191", "port192", "port193", - "port194", "port195", "port196", "port197", - "port200", "port201", "port202", "port203", - "port204", "port205", "port206", "port207", - "port210", "port211", "port212", "port213", - "port214", "port215", "port216", "port217", - "port220", "port221", "port222", "port223", - "port224", "port225", "port226", "port227", - "port230", "port231", "port232", "port233", - "port234", "port235", "port236", "port237", - "port240", "port241", "port242", "port243", - "port244", "port245", "port246", "port247", - "port250", "port251", "port252", "port253", - "port254", "port255", "port256", "port257", - "port260", "port261", "port262", "port263", - "port264", "port265", "port266", "port267", - "port270", "port271", "port272", "port273", - "port274", "port275", "port276", "port277", - "port280", "port281", "port282", "port283", - "port284", "port285", "port286", "port287", -}; -static const char * const xirq_groups[] = { - "xirq0", "xirq1", "xirq2", "xirq3", - "xirq4", "xirq5", "xirq6", "xirq7", - "xirq8", "xirq9", "xirq10", "xirq11", - "xirq12", "xirq13", "xirq14", "xirq15", - "xirq16", "xirq17", "xirq18", "xirq19", - "xirq20", "xirq21", "xirq22", "xirq23", -}; static const struct uniphier_pinmux_function uniphier_ld6b_functions[] = { UNIPHIER_PINMUX_FUNCTION(adinter), /* Achip-Dchip interconnect */ @@ -1270,10 +912,18 @@ static const struct uniphier_pinmux_function uniphier_ld6b_functions[] = { UNIPHIER_PINMUX_FUNCTION(usb1), UNIPHIER_PINMUX_FUNCTION(usb2), UNIPHIER_PINMUX_FUNCTION(usb3), - UNIPHIER_PINMUX_FUNCTION(port), - UNIPHIER_PINMUX_FUNCTION(xirq), }; +static int uniphier_ld6b_get_gpio_muxval(unsigned int pin, + unsigned int gpio_offset) +{ + if (gpio_offset >= 120 && gpio_offset <= 143) /* XIRQx */ + /* 15 will do because XIRQ0-23 are aliases of PORT150-177. */ + return 14; + + return 15; +} + static struct uniphier_pinctrl_socdata uniphier_ld6b_pindata = { .pins = uniphier_ld6b_pins, .npins = ARRAY_SIZE(uniphier_ld6b_pins), @@ -1281,6 +931,7 @@ static struct uniphier_pinctrl_socdata uniphier_ld6b_pindata = { .groups_count = ARRAY_SIZE(uniphier_ld6b_groups), .functions = uniphier_ld6b_functions, .functions_count = ARRAY_SIZE(uniphier_ld6b_functions), + .get_gpio_muxval = uniphier_ld6b_get_gpio_muxval, .caps = 0, }; @@ -1299,6 +950,7 @@ static struct platform_driver uniphier_ld6b_pinctrl_driver = { .driver = { .name = "uniphier-ld6b-pinctrl", .of_match_table = uniphier_ld6b_pinctrl_match, + .pm = &uniphier_pinctrl_pm_ops, }, }; builtin_platform_driver(uniphier_ld6b_pinctrl_driver); diff --git a/drivers/pinctrl/uniphier/pinctrl-uniphier-pro4.c b/drivers/pinctrl/uniphier/pinctrl-uniphier-pro4.c index c75e094b2d90..603204a00213 100644 --- a/drivers/pinctrl/uniphier/pinctrl-uniphier-pro4.c +++ b/drivers/pinctrl/uniphier/pinctrl-uniphier-pro4.c @@ -1086,87 +1086,38 @@ static const unsigned usb2_pins[] = {184, 185}; static const int usb2_muxvals[] = {0, 0}; static const unsigned usb3_pins[] = {187, 188}; static const int usb3_muxvals[] = {0, 0}; -static const unsigned port_range0_pins[] = { - 300, 301, 302, 303, 304, 305, 306, 307, /* PORT0x */ - 308, 309, 310, 311, 312, 313, 314, 315, /* PORT1x */ - 316, 317, 318, 16, 17, 18, 19, 20, /* PORT2x */ - 21, 22, 23, 4, 93, 94, 95, 63, /* PORT3x */ - 123, 122, 124, 125, 126, 141, 202, 203, /* PORT4x */ - 204, 226, 227, 290, 291, 233, 280, 281, /* PORT5x */ - 8, 7, 10, 29, 30, 48, 49, 50, /* PORT6x */ - 40, 41, 42, 43, 44, 45, 46, 47, /* PORT7x */ - 54, 51, 52, 53, 127, 128, 129, 130, /* PORT8x */ - 131, 132, 57, 60, 134, 133, 135, 136, /* PORT9x */ - 138, 137, 140, 139, 64, 65, 66, 67, /* PORT10x */ - 107, 106, 105, 104, 113, 112, 111, 110, /* PORT11x */ - 68, 69, 70, 71, 72, 73, 74, 75, /* PORT12x */ - 76, 77, 78, 79, 80, 81, 82, 83, /* PORT13x */ - 84, 85, 86, 87, 88, 89, 90, 91, /* PORT14x */ -}; -static const int port_range0_muxvals[] = { - 7, 7, 7, 7, 7, 7, 7, 7, /* PORT0x */ - 7, 7, 7, 7, 7, 7, 7, 7, /* PORT1x */ - 7, 7, 7, 7, 7, 7, 7, 7, /* PORT2x */ - 7, 7, 7, 7, 7, 7, 7, 7, /* PORT3x */ - 7, 7, 7, 7, 7, 7, 7, 7, /* PORT4x */ - 7, 7, 7, 7, 7, 7, 7, 7, /* PORT5x */ - 7, 7, 7, 7, 7, 7, 7, 7, /* PORT6x */ - 7, 7, 7, 7, 7, 7, 7, 7, /* PORT7x */ - 7, 7, 7, 7, 7, 7, 7, 7, /* PORT8x */ - 7, 7, 7, 7, 7, 7, 7, 7, /* PORT9x */ - 7, 7, 7, 7, 7, 7, 7, 7, /* PORT10x */ - 7, 7, 7, 7, 7, 7, 7, 7, /* PORT11x */ - 7, 7, 7, 7, 7, 7, 7, 7, /* PORT12x */ - 7, 7, 7, 7, 7, 7, 7, 7, /* PORT13x */ - 7, 7, 7, 7, 7, 7, 7, 7, /* PORT14x */ -}; -static const unsigned port_range1_pins[] = { - 13, 14, 15, /* PORT175-177 */ - 157, 158, 156, 154, 150, 151, 152, 153, /* PORT18x */ - 326, 327, 325, 323, 319, 320, 321, 322, /* PORT19x */ - 160, 161, 162, 163, 164, 165, 166, 167, /* PORT20x */ - 168, 169, 170, 171, 172, 173, 174, 175, /* PORT21x */ - 180, 181, 182, 183, 184, 185, 187, 188, /* PORT22x */ - 193, 194, 195, 196, 197, 198, 199, 200, /* PORT23x */ - 191, 192, 215, 216, 217, 218, 219, 220, /* PORT24x */ - 222, 223, 224, 225, 228, 229, 230, 231, /* PORT25x */ - 282, 283, 284, 285, 286, 287, 288, 289, /* PORT26x */ - 292, 293, 294, 295, 296, 236, 237, 238, /* PORT27x */ - 275, 276, 277, 278, 239, 240, 249, 250, /* PORT28x */ - 251, 252, 261, 262, 263, 264, 273, 274, /* PORT29x */ - 31, 32, 33, 34, 35, 36, 37, 38, /* PORT30x */ -}; -static const int port_range1_muxvals[] = { - 7, 7, 7, /* PORT175-177 */ - 7, 7, 7, 7, 7, 7, 7, 7, /* PORT18x */ - 7, 7, 7, 7, 7, 7, 7, 7, /* PORT19x */ - 7, 7, 7, 7, 7, 7, 7, 7, /* PORT20x */ - 7, 7, 7, 7, 7, 7, 7, 7, /* PORT21x */ - 7, 7, 7, 7, 7, 7, 7, 7, /* PORT22x */ - 7, 7, 7, 7, 7, 7, 7, 7, /* PORT23x */ - 7, 7, 7, 7, 7, 7, 7, 7, /* PORT24x */ - 7, 7, 7, 7, 7, 7, 7, 7, /* PORT25x */ - 7, 7, 7, 7, 7, 7, 7, 7, /* PORT26x */ - 7, 7, 7, 7, 7, 7, 7, 7, /* PORT27x */ - 7, 7, 7, 7, 7, 7, 7, 7, /* PORT28x */ - 7, 7, 7, 7, 7, 7, 7, 7, /* PORT29x */ - 7, 7, 7, 7, 7, 7, 7, 7, /* PORT30x */ -}; -static const unsigned xirq_pins[] = { - 11, 9, 12, 96, 97, 98, 108, 114, /* XIRQ0-7 */ - 234, 186, 99, 100, 101, 102, 184, 301, /* XIRQ8-15 */ - 302, 303, 304, 305, 306, /* XIRQ16-20 */ -}; -static const int xirq_muxvals[] = { - 7, 7, 7, 7, 7, 7, 7, 7, /* XIRQ0-7 */ - 7, 7, 7, 7, 7, 7, 2, 2, /* XIRQ8-15 */ - 2, 2, 2, 2, 2, /* XIRQ16-20 */ -}; -static const unsigned xirq_alternatives_pins[] = { - 184, 310, 316, -}; -static const int xirq_alternatives_muxvals[] = { - 2, 2, 2, +static const unsigned int gpio_range_pins[] = { + 300, 301, 302, 303, 304, 305, 306, 307, /* PORT0x */ + 308, 309, 310, 311, 312, 313, 314, 315, /* PORT1x */ + 316, 317, 318, 16, 17, 18, 19, 20, /* PORT2x */ + 21, 22, 23, 4, 93, 94, 95, 63, /* PORT3x */ + 123, 122, 124, 125, 126, 141, 202, 203, /* PORT4x */ + 204, 226, 227, 290, 291, 233, 280, 281, /* PORT5x */ + 8, 7, 10, 29, 30, 48, 49, 50, /* PORT6x */ + 40, 41, 42, 43, 44, 45, 46, 47, /* PORT7x */ + 54, 51, 52, 53, 127, 128, 129, 130, /* PORT8x */ + 131, 132, 57, 60, 134, 133, 135, 136, /* PORT9x */ + 138, 137, 140, 139, 64, 65, 66, 67, /* PORT10x */ + 107, 106, 105, 104, 113, 112, 111, 110, /* PORT11x */ + 68, 69, 70, 71, 72, 73, 74, 75, /* PORT12x */ + 76, 77, 78, 79, 80, 81, 82, 83, /* PORT13x */ + 84, 85, 86, 87, 88, 89, 90, 91, /* PORT14x */ + 11, 9, 12, 96, 97, 98, 108, 114, /* XIRQ0-7 */ + 234, 186, 99, 100, 101, 102, 300, 301, /* XIRQ8-15 */ + 302, 303, 304, 305, 306, 13, 14, 15, /* XIRQ16-20, PORT175-177 */ + 157, 158, 156, 154, 150, 151, 152, 153, /* PORT18x */ + 326, 327, 325, 323, 319, 320, 321, 322, /* PORT19x */ + 160, 161, 162, 163, 164, 165, 166, 167, /* PORT20x */ + 168, 169, 170, 171, 172, 173, 174, 175, /* PORT21x */ + 180, 181, 182, 183, 184, 185, 187, 188, /* PORT22x */ + 193, 194, 195, 196, 197, 198, 199, 200, /* PORT23x */ + 191, 192, 215, 216, 217, 218, 219, 220, /* PORT24x */ + 222, 223, 224, 225, 228, 229, 230, 231, /* PORT25x */ + 282, 283, 284, 285, 286, 287, 288, 289, /* PORT26x */ + 292, 293, 294, 295, 296, 236, 237, 238, /* PORT27x */ + 275, 276, 277, 278, 239, 240, 249, 250, /* PORT28x */ + 251, 252, 261, 262, 263, 264, 273, 274, /* PORT29x */ + 31, 32, 33, 34, 35, 36, 37, 38, /* PORT30x */ }; static const struct uniphier_pinctrl_group uniphier_pro4_groups[] = { @@ -1202,267 +1153,13 @@ static const struct uniphier_pinctrl_group uniphier_pro4_groups[] = { UNIPHIER_PINCTRL_GROUP(usb1), UNIPHIER_PINCTRL_GROUP(usb2), UNIPHIER_PINCTRL_GROUP(usb3), - UNIPHIER_PINCTRL_GROUP_GPIO_RANGE_PORT(port_range0), - UNIPHIER_PINCTRL_GROUP_GPIO_RANGE_PORT(port_range1), - UNIPHIER_PINCTRL_GROUP_GPIO_RANGE_IRQ(xirq), - UNIPHIER_PINCTRL_GROUP_GPIO_RANGE_IRQ(xirq_alternatives), - UNIPHIER_PINCTRL_GROUP_SINGLE(port00, port_range0, 0), - UNIPHIER_PINCTRL_GROUP_SINGLE(port01, port_range0, 1), - UNIPHIER_PINCTRL_GROUP_SINGLE(port02, port_range0, 2), - UNIPHIER_PINCTRL_GROUP_SINGLE(port03, port_range0, 3), - UNIPHIER_PINCTRL_GROUP_SINGLE(port04, port_range0, 4), - UNIPHIER_PINCTRL_GROUP_SINGLE(port05, port_range0, 5), - UNIPHIER_PINCTRL_GROUP_SINGLE(port06, port_range0, 6), - UNIPHIER_PINCTRL_GROUP_SINGLE(port07, port_range0, 7), - UNIPHIER_PINCTRL_GROUP_SINGLE(port10, port_range0, 8), - UNIPHIER_PINCTRL_GROUP_SINGLE(port11, port_range0, 9), - UNIPHIER_PINCTRL_GROUP_SINGLE(port12, port_range0, 10), - UNIPHIER_PINCTRL_GROUP_SINGLE(port13, port_range0, 11), - UNIPHIER_PINCTRL_GROUP_SINGLE(port14, port_range0, 12), - UNIPHIER_PINCTRL_GROUP_SINGLE(port15, port_range0, 13), - UNIPHIER_PINCTRL_GROUP_SINGLE(port16, port_range0, 14), - UNIPHIER_PINCTRL_GROUP_SINGLE(port17, port_range0, 15), - UNIPHIER_PINCTRL_GROUP_SINGLE(port20, port_range0, 16), - UNIPHIER_PINCTRL_GROUP_SINGLE(port21, port_range0, 17), - UNIPHIER_PINCTRL_GROUP_SINGLE(port22, port_range0, 18), - UNIPHIER_PINCTRL_GROUP_SINGLE(port23, port_range0, 19), - UNIPHIER_PINCTRL_GROUP_SINGLE(port24, port_range0, 20), - UNIPHIER_PINCTRL_GROUP_SINGLE(port25, port_range0, 21), - UNIPHIER_PINCTRL_GROUP_SINGLE(port26, port_range0, 22), - UNIPHIER_PINCTRL_GROUP_SINGLE(port27, port_range0, 23), - UNIPHIER_PINCTRL_GROUP_SINGLE(port30, port_range0, 24), - UNIPHIER_PINCTRL_GROUP_SINGLE(port31, port_range0, 25), - UNIPHIER_PINCTRL_GROUP_SINGLE(port32, port_range0, 26), - UNIPHIER_PINCTRL_GROUP_SINGLE(port33, port_range0, 27), - UNIPHIER_PINCTRL_GROUP_SINGLE(port34, port_range0, 28), - UNIPHIER_PINCTRL_GROUP_SINGLE(port35, port_range0, 29), - UNIPHIER_PINCTRL_GROUP_SINGLE(port36, port_range0, 30), - UNIPHIER_PINCTRL_GROUP_SINGLE(port37, port_range0, 31), - UNIPHIER_PINCTRL_GROUP_SINGLE(port40, port_range0, 32), - UNIPHIER_PINCTRL_GROUP_SINGLE(port41, port_range0, 33), - UNIPHIER_PINCTRL_GROUP_SINGLE(port42, port_range0, 34), - UNIPHIER_PINCTRL_GROUP_SINGLE(port43, port_range0, 35), - UNIPHIER_PINCTRL_GROUP_SINGLE(port44, port_range0, 36), - UNIPHIER_PINCTRL_GROUP_SINGLE(port45, port_range0, 37), - UNIPHIER_PINCTRL_GROUP_SINGLE(port46, port_range0, 38), - UNIPHIER_PINCTRL_GROUP_SINGLE(port47, port_range0, 39), - UNIPHIER_PINCTRL_GROUP_SINGLE(port50, port_range0, 40), - UNIPHIER_PINCTRL_GROUP_SINGLE(port51, port_range0, 41), - UNIPHIER_PINCTRL_GROUP_SINGLE(port52, port_range0, 42), - UNIPHIER_PINCTRL_GROUP_SINGLE(port53, port_range0, 43), - UNIPHIER_PINCTRL_GROUP_SINGLE(port54, port_range0, 44), - UNIPHIER_PINCTRL_GROUP_SINGLE(port55, port_range0, 45), - UNIPHIER_PINCTRL_GROUP_SINGLE(port56, port_range0, 46), - UNIPHIER_PINCTRL_GROUP_SINGLE(port57, port_range0, 47), - UNIPHIER_PINCTRL_GROUP_SINGLE(port60, port_range0, 48), - UNIPHIER_PINCTRL_GROUP_SINGLE(port61, port_range0, 49), - UNIPHIER_PINCTRL_GROUP_SINGLE(port62, port_range0, 50), - UNIPHIER_PINCTRL_GROUP_SINGLE(port63, port_range0, 51), - UNIPHIER_PINCTRL_GROUP_SINGLE(port64, port_range0, 52), - UNIPHIER_PINCTRL_GROUP_SINGLE(port65, port_range0, 53), - UNIPHIER_PINCTRL_GROUP_SINGLE(port66, port_range0, 54), - UNIPHIER_PINCTRL_GROUP_SINGLE(port67, port_range0, 55), - UNIPHIER_PINCTRL_GROUP_SINGLE(port70, port_range0, 56), - UNIPHIER_PINCTRL_GROUP_SINGLE(port71, port_range0, 57), - UNIPHIER_PINCTRL_GROUP_SINGLE(port72, port_range0, 58), - UNIPHIER_PINCTRL_GROUP_SINGLE(port73, port_range0, 59), - UNIPHIER_PINCTRL_GROUP_SINGLE(port74, port_range0, 60), - UNIPHIER_PINCTRL_GROUP_SINGLE(port75, port_range0, 61), - UNIPHIER_PINCTRL_GROUP_SINGLE(port76, port_range0, 62), - UNIPHIER_PINCTRL_GROUP_SINGLE(port77, port_range0, 63), - UNIPHIER_PINCTRL_GROUP_SINGLE(port80, port_range0, 64), - UNIPHIER_PINCTRL_GROUP_SINGLE(port81, port_range0, 65), - UNIPHIER_PINCTRL_GROUP_SINGLE(port82, port_range0, 66), - UNIPHIER_PINCTRL_GROUP_SINGLE(port83, port_range0, 67), - UNIPHIER_PINCTRL_GROUP_SINGLE(port84, port_range0, 68), - UNIPHIER_PINCTRL_GROUP_SINGLE(port85, port_range0, 69), - UNIPHIER_PINCTRL_GROUP_SINGLE(port86, port_range0, 70), - UNIPHIER_PINCTRL_GROUP_SINGLE(port87, port_range0, 71), - UNIPHIER_PINCTRL_GROUP_SINGLE(port90, port_range0, 72), - UNIPHIER_PINCTRL_GROUP_SINGLE(port91, port_range0, 73), - UNIPHIER_PINCTRL_GROUP_SINGLE(port92, port_range0, 74), - UNIPHIER_PINCTRL_GROUP_SINGLE(port93, port_range0, 75), - UNIPHIER_PINCTRL_GROUP_SINGLE(port94, port_range0, 76), - UNIPHIER_PINCTRL_GROUP_SINGLE(port95, port_range0, 77), - UNIPHIER_PINCTRL_GROUP_SINGLE(port96, port_range0, 78), - UNIPHIER_PINCTRL_GROUP_SINGLE(port97, port_range0, 79), - UNIPHIER_PINCTRL_GROUP_SINGLE(port100, port_range0, 80), - UNIPHIER_PINCTRL_GROUP_SINGLE(port101, port_range0, 81), - UNIPHIER_PINCTRL_GROUP_SINGLE(port102, port_range0, 82), - UNIPHIER_PINCTRL_GROUP_SINGLE(port103, port_range0, 83), - UNIPHIER_PINCTRL_GROUP_SINGLE(port104, port_range0, 84), - UNIPHIER_PINCTRL_GROUP_SINGLE(port105, port_range0, 85), - UNIPHIER_PINCTRL_GROUP_SINGLE(port106, port_range0, 86), - UNIPHIER_PINCTRL_GROUP_SINGLE(port107, port_range0, 87), - UNIPHIER_PINCTRL_GROUP_SINGLE(port110, port_range0, 88), - UNIPHIER_PINCTRL_GROUP_SINGLE(port111, port_range0, 89), - UNIPHIER_PINCTRL_GROUP_SINGLE(port112, port_range0, 90), - UNIPHIER_PINCTRL_GROUP_SINGLE(port113, port_range0, 91), - UNIPHIER_PINCTRL_GROUP_SINGLE(port114, port_range0, 92), - UNIPHIER_PINCTRL_GROUP_SINGLE(port115, port_range0, 93), - UNIPHIER_PINCTRL_GROUP_SINGLE(port116, port_range0, 94), - UNIPHIER_PINCTRL_GROUP_SINGLE(port117, port_range0, 95), - UNIPHIER_PINCTRL_GROUP_SINGLE(port120, port_range0, 96), - UNIPHIER_PINCTRL_GROUP_SINGLE(port121, port_range0, 97), - UNIPHIER_PINCTRL_GROUP_SINGLE(port122, port_range0, 98), - UNIPHIER_PINCTRL_GROUP_SINGLE(port123, port_range0, 99), - UNIPHIER_PINCTRL_GROUP_SINGLE(port124, port_range0, 100), - UNIPHIER_PINCTRL_GROUP_SINGLE(port125, port_range0, 101), - UNIPHIER_PINCTRL_GROUP_SINGLE(port126, port_range0, 102), - UNIPHIER_PINCTRL_GROUP_SINGLE(port127, port_range0, 103), - UNIPHIER_PINCTRL_GROUP_SINGLE(port130, port_range0, 104), - UNIPHIER_PINCTRL_GROUP_SINGLE(port131, port_range0, 105), - UNIPHIER_PINCTRL_GROUP_SINGLE(port132, port_range0, 106), - UNIPHIER_PINCTRL_GROUP_SINGLE(port133, port_range0, 107), - UNIPHIER_PINCTRL_GROUP_SINGLE(port134, port_range0, 108), - UNIPHIER_PINCTRL_GROUP_SINGLE(port135, port_range0, 109), - UNIPHIER_PINCTRL_GROUP_SINGLE(port136, port_range0, 110), - UNIPHIER_PINCTRL_GROUP_SINGLE(port137, port_range0, 111), - UNIPHIER_PINCTRL_GROUP_SINGLE(port140, port_range0, 112), - UNIPHIER_PINCTRL_GROUP_SINGLE(port141, port_range0, 113), - UNIPHIER_PINCTRL_GROUP_SINGLE(port142, port_range0, 114), - UNIPHIER_PINCTRL_GROUP_SINGLE(port143, port_range0, 115), - UNIPHIER_PINCTRL_GROUP_SINGLE(port144, port_range0, 116), - UNIPHIER_PINCTRL_GROUP_SINGLE(port145, port_range0, 117), - UNIPHIER_PINCTRL_GROUP_SINGLE(port146, port_range0, 118), - UNIPHIER_PINCTRL_GROUP_SINGLE(port147, port_range0, 119), - UNIPHIER_PINCTRL_GROUP_SINGLE(port175, port_range1, 0), - UNIPHIER_PINCTRL_GROUP_SINGLE(port176, port_range1, 1), - UNIPHIER_PINCTRL_GROUP_SINGLE(port177, port_range1, 2), - UNIPHIER_PINCTRL_GROUP_SINGLE(port180, port_range1, 3), - UNIPHIER_PINCTRL_GROUP_SINGLE(port181, port_range1, 4), - UNIPHIER_PINCTRL_GROUP_SINGLE(port182, port_range1, 5), - UNIPHIER_PINCTRL_GROUP_SINGLE(port183, port_range1, 6), - UNIPHIER_PINCTRL_GROUP_SINGLE(port184, port_range1, 7), - UNIPHIER_PINCTRL_GROUP_SINGLE(port185, port_range1, 8), - UNIPHIER_PINCTRL_GROUP_SINGLE(port186, port_range1, 9), - UNIPHIER_PINCTRL_GROUP_SINGLE(port187, port_range1, 10), - UNIPHIER_PINCTRL_GROUP_SINGLE(port190, port_range1, 11), - UNIPHIER_PINCTRL_GROUP_SINGLE(port191, port_range1, 12), - UNIPHIER_PINCTRL_GROUP_SINGLE(port192, port_range1, 13), - UNIPHIER_PINCTRL_GROUP_SINGLE(port193, port_range1, 14), - UNIPHIER_PINCTRL_GROUP_SINGLE(port194, port_range1, 15), - UNIPHIER_PINCTRL_GROUP_SINGLE(port195, port_range1, 16), - UNIPHIER_PINCTRL_GROUP_SINGLE(port196, port_range1, 17), - UNIPHIER_PINCTRL_GROUP_SINGLE(port197, port_range1, 18), - UNIPHIER_PINCTRL_GROUP_SINGLE(port200, port_range1, 19), - UNIPHIER_PINCTRL_GROUP_SINGLE(port201, port_range1, 20), - UNIPHIER_PINCTRL_GROUP_SINGLE(port202, port_range1, 21), - UNIPHIER_PINCTRL_GROUP_SINGLE(port203, port_range1, 22), - UNIPHIER_PINCTRL_GROUP_SINGLE(port204, port_range1, 23), - UNIPHIER_PINCTRL_GROUP_SINGLE(port205, port_range1, 24), - UNIPHIER_PINCTRL_GROUP_SINGLE(port206, port_range1, 25), - UNIPHIER_PINCTRL_GROUP_SINGLE(port207, port_range1, 26), - UNIPHIER_PINCTRL_GROUP_SINGLE(port210, port_range1, 27), - UNIPHIER_PINCTRL_GROUP_SINGLE(port211, port_range1, 28), - UNIPHIER_PINCTRL_GROUP_SINGLE(port212, port_range1, 29), - UNIPHIER_PINCTRL_GROUP_SINGLE(port213, port_range1, 30), - UNIPHIER_PINCTRL_GROUP_SINGLE(port214, port_range1, 31), - UNIPHIER_PINCTRL_GROUP_SINGLE(port215, port_range1, 32), - UNIPHIER_PINCTRL_GROUP_SINGLE(port216, port_range1, 33), - UNIPHIER_PINCTRL_GROUP_SINGLE(port217, port_range1, 34), - UNIPHIER_PINCTRL_GROUP_SINGLE(port220, port_range1, 35), - UNIPHIER_PINCTRL_GROUP_SINGLE(port221, port_range1, 36), - UNIPHIER_PINCTRL_GROUP_SINGLE(port222, port_range1, 37), - UNIPHIER_PINCTRL_GROUP_SINGLE(port223, port_range1, 38), - UNIPHIER_PINCTRL_GROUP_SINGLE(port224, port_range1, 39), - UNIPHIER_PINCTRL_GROUP_SINGLE(port225, port_range1, 40), - UNIPHIER_PINCTRL_GROUP_SINGLE(port226, port_range1, 41), - UNIPHIER_PINCTRL_GROUP_SINGLE(port227, port_range1, 42), - UNIPHIER_PINCTRL_GROUP_SINGLE(port230, port_range1, 43), - UNIPHIER_PINCTRL_GROUP_SINGLE(port231, port_range1, 44), - UNIPHIER_PINCTRL_GROUP_SINGLE(port232, port_range1, 45), - UNIPHIER_PINCTRL_GROUP_SINGLE(port233, port_range1, 46), - UNIPHIER_PINCTRL_GROUP_SINGLE(port234, port_range1, 47), - UNIPHIER_PINCTRL_GROUP_SINGLE(port235, port_range1, 48), - UNIPHIER_PINCTRL_GROUP_SINGLE(port236, port_range1, 49), - UNIPHIER_PINCTRL_GROUP_SINGLE(port237, port_range1, 50), - UNIPHIER_PINCTRL_GROUP_SINGLE(port240, port_range1, 51), - UNIPHIER_PINCTRL_GROUP_SINGLE(port241, port_range1, 52), - UNIPHIER_PINCTRL_GROUP_SINGLE(port242, port_range1, 53), - UNIPHIER_PINCTRL_GROUP_SINGLE(port243, port_range1, 54), - UNIPHIER_PINCTRL_GROUP_SINGLE(port244, port_range1, 55), - UNIPHIER_PINCTRL_GROUP_SINGLE(port245, port_range1, 56), - UNIPHIER_PINCTRL_GROUP_SINGLE(port246, port_range1, 57), - UNIPHIER_PINCTRL_GROUP_SINGLE(port247, port_range1, 58), - UNIPHIER_PINCTRL_GROUP_SINGLE(port250, port_range1, 59), - UNIPHIER_PINCTRL_GROUP_SINGLE(port251, port_range1, 60), - UNIPHIER_PINCTRL_GROUP_SINGLE(port252, port_range1, 61), - UNIPHIER_PINCTRL_GROUP_SINGLE(port253, port_range1, 62), - UNIPHIER_PINCTRL_GROUP_SINGLE(port254, port_range1, 63), - UNIPHIER_PINCTRL_GROUP_SINGLE(port255, port_range1, 64), - UNIPHIER_PINCTRL_GROUP_SINGLE(port256, port_range1, 65), - UNIPHIER_PINCTRL_GROUP_SINGLE(port257, port_range1, 66), - UNIPHIER_PINCTRL_GROUP_SINGLE(port260, port_range1, 67), - UNIPHIER_PINCTRL_GROUP_SINGLE(port261, port_range1, 68), - UNIPHIER_PINCTRL_GROUP_SINGLE(port262, port_range1, 69), - UNIPHIER_PINCTRL_GROUP_SINGLE(port263, port_range1, 70), - UNIPHIER_PINCTRL_GROUP_SINGLE(port264, port_range1, 71), - UNIPHIER_PINCTRL_GROUP_SINGLE(port265, port_range1, 72), - UNIPHIER_PINCTRL_GROUP_SINGLE(port266, port_range1, 73), - UNIPHIER_PINCTRL_GROUP_SINGLE(port267, port_range1, 74), - UNIPHIER_PINCTRL_GROUP_SINGLE(port270, port_range1, 75), - UNIPHIER_PINCTRL_GROUP_SINGLE(port271, port_range1, 76), - UNIPHIER_PINCTRL_GROUP_SINGLE(port272, port_range1, 77), - UNIPHIER_PINCTRL_GROUP_SINGLE(port273, port_range1, 78), - UNIPHIER_PINCTRL_GROUP_SINGLE(port274, port_range1, 79), - UNIPHIER_PINCTRL_GROUP_SINGLE(port275, port_range1, 80), - UNIPHIER_PINCTRL_GROUP_SINGLE(port276, port_range1, 81), - UNIPHIER_PINCTRL_GROUP_SINGLE(port277, port_range1, 82), - UNIPHIER_PINCTRL_GROUP_SINGLE(port280, port_range1, 83), - UNIPHIER_PINCTRL_GROUP_SINGLE(port281, port_range1, 84), - UNIPHIER_PINCTRL_GROUP_SINGLE(port282, port_range1, 85), - UNIPHIER_PINCTRL_GROUP_SINGLE(port283, port_range1, 86), - UNIPHIER_PINCTRL_GROUP_SINGLE(port284, port_range1, 87), - UNIPHIER_PINCTRL_GROUP_SINGLE(port285, port_range1, 88), - UNIPHIER_PINCTRL_GROUP_SINGLE(port286, port_range1, 89), - UNIPHIER_PINCTRL_GROUP_SINGLE(port287, port_range1, 90), - UNIPHIER_PINCTRL_GROUP_SINGLE(port290, port_range1, 91), - UNIPHIER_PINCTRL_GROUP_SINGLE(port291, port_range1, 92), - UNIPHIER_PINCTRL_GROUP_SINGLE(port292, port_range1, 93), - UNIPHIER_PINCTRL_GROUP_SINGLE(port293, port_range1, 94), - UNIPHIER_PINCTRL_GROUP_SINGLE(port294, port_range1, 95), - UNIPHIER_PINCTRL_GROUP_SINGLE(port295, port_range1, 96), - UNIPHIER_PINCTRL_GROUP_SINGLE(port296, port_range1, 97), - UNIPHIER_PINCTRL_GROUP_SINGLE(port297, port_range1, 98), - UNIPHIER_PINCTRL_GROUP_SINGLE(port300, port_range1, 99), - UNIPHIER_PINCTRL_GROUP_SINGLE(port301, port_range1, 100), - UNIPHIER_PINCTRL_GROUP_SINGLE(port302, port_range1, 101), - UNIPHIER_PINCTRL_GROUP_SINGLE(port303, port_range1, 102), - UNIPHIER_PINCTRL_GROUP_SINGLE(port304, port_range1, 103), - UNIPHIER_PINCTRL_GROUP_SINGLE(port305, port_range1, 104), - UNIPHIER_PINCTRL_GROUP_SINGLE(port306, port_range1, 105), - UNIPHIER_PINCTRL_GROUP_SINGLE(port307, port_range1, 106), - UNIPHIER_PINCTRL_GROUP_SINGLE(xirq0, xirq, 0), - UNIPHIER_PINCTRL_GROUP_SINGLE(xirq1, xirq, 1), - UNIPHIER_PINCTRL_GROUP_SINGLE(xirq2, xirq, 2), - UNIPHIER_PINCTRL_GROUP_SINGLE(xirq3, xirq, 3), - UNIPHIER_PINCTRL_GROUP_SINGLE(xirq4, xirq, 4), - UNIPHIER_PINCTRL_GROUP_SINGLE(xirq5, xirq, 5), - UNIPHIER_PINCTRL_GROUP_SINGLE(xirq6, xirq, 6), - UNIPHIER_PINCTRL_GROUP_SINGLE(xirq7, xirq, 7), - UNIPHIER_PINCTRL_GROUP_SINGLE(xirq8, xirq, 8), - UNIPHIER_PINCTRL_GROUP_SINGLE(xirq9, xirq, 9), - UNIPHIER_PINCTRL_GROUP_SINGLE(xirq10, xirq, 10), - UNIPHIER_PINCTRL_GROUP_SINGLE(xirq11, xirq, 11), - UNIPHIER_PINCTRL_GROUP_SINGLE(xirq12, xirq, 12), - UNIPHIER_PINCTRL_GROUP_SINGLE(xirq13, xirq, 13), - UNIPHIER_PINCTRL_GROUP_SINGLE(xirq14, xirq, 14), - UNIPHIER_PINCTRL_GROUP_SINGLE(xirq15, xirq, 15), - UNIPHIER_PINCTRL_GROUP_SINGLE(xirq16, xirq, 16), - UNIPHIER_PINCTRL_GROUP_SINGLE(xirq17, xirq, 17), - UNIPHIER_PINCTRL_GROUP_SINGLE(xirq18, xirq, 18), - UNIPHIER_PINCTRL_GROUP_SINGLE(xirq19, xirq, 19), - UNIPHIER_PINCTRL_GROUP_SINGLE(xirq20, xirq, 20), - UNIPHIER_PINCTRL_GROUP_SINGLE(xirq14b, xirq_alternatives, 0), - UNIPHIER_PINCTRL_GROUP_SINGLE(xirq17b, xirq_alternatives, 1), - UNIPHIER_PINCTRL_GROUP_SINGLE(xirq18b, xirq_alternatives, 2), + UNIPHIER_PINCTRL_GROUP_GPIO(gpio_range), }; static const char * const emmc_groups[] = {"emmc", "emmc_dat8"}; static const char * const ether_mii_groups[] = {"ether_mii"}; static const char * const ether_rgmii_groups[] = {"ether_rgmii"}; -static const char * const ether_rmii_groups[] = {"ether_rgmii", "ether_rgmiib"}; +static const char * const ether_rmii_groups[] = {"ether_rmii", "ether_rmiib"}; static const char * const i2c0_groups[] = {"i2c0"}; static const char * const i2c1_groups[] = {"i2c1"}; static const char * const i2c2_groups[] = {"i2c2"}; @@ -1488,75 +1185,6 @@ static const char * const usb0_groups[] = {"usb0"}; static const char * const usb1_groups[] = {"usb1"}; static const char * const usb2_groups[] = {"usb2"}; static const char * const usb3_groups[] = {"usb3"}; -static const char * const port_groups[] = { - "port00", "port01", "port02", "port03", - "port04", "port05", "port06", "port07", - "port10", "port11", "port12", "port13", - "port14", "port15", "port16", "port17", - "port20", "port21", "port22", "port23", - "port24", "port25", "port26", "port27", - "port30", "port31", "port32", "port33", - "port34", "port35", "port36", "port37", - "port40", "port41", "port42", "port43", - "port44", "port45", "port46", "port47", - "port50", "port51", "port52", "port53", - "port54", "port55", "port56", "port57", - "port60", "port61", "port62", "port63", - "port64", "port65", "port66", "port67", - "port70", "port71", "port72", "port73", - "port74", "port75", "port76", "port77", - "port80", "port81", "port82", "port83", - "port84", "port85", "port86", "port87", - "port90", "port91", "port92", "port93", - "port94", "port95", "port96", "port97", - "port100", "port101", "port102", "port103", - "port104", "port105", "port106", "port107", - "port110", "port111", "port112", "port113", - "port114", "port115", "port116", "port117", - "port120", "port121", "port122", "port123", - "port124", "port125", "port126", "port127", - "port130", "port131", "port132", "port133", - "port134", "port135", "port136", "port137", - "port140", "port141", "port142", "port143", - "port144", "port145", "port146", "port147", - /* port150-174 missing */ - /* none */ "port175", "port176", "port177", - "port180", "port181", "port182", "port183", - "port184", "port185", "port186", "port187", - "port190", "port191", "port192", "port193", - "port194", "port195", "port196", "port197", - "port200", "port201", "port202", "port203", - "port204", "port205", "port206", "port207", - "port210", "port211", "port212", "port213", - "port214", "port215", "port216", "port217", - "port220", "port221", "port222", "port223", - "port224", "port225", "port226", "port227", - "port230", "port231", "port232", "port233", - "port234", "port235", "port236", "port237", - "port240", "port241", "port242", "port243", - "port244", "port245", "port246", "port247", - "port250", "port251", "port252", "port253", - "port254", "port255", "port256", "port257", - "port260", "port261", "port262", "port263", - "port264", "port265", "port266", "port267", - "port270", "port271", "port272", "port273", - "port274", "port275", "port276", "port277", - "port280", "port281", "port282", "port283", - "port284", "port285", "port286", "port287", - "port290", "port291", "port292", "port293", - "port294", "port295", "port296", "port297", - "port300", "port301", "port302", "port303", - "port304", "port305", "port306", "port307", -}; -static const char * const xirq_groups[] = { - "xirq0", "xirq1", "xirq2", "xirq3", - "xirq4", "xirq5", "xirq6", "xirq7", - "xirq8", "xirq9", "xirq10", "xirq11", - "xirq12", "xirq13", "xirq14", "xirq15", - "xirq16", "xirq17", "xirq18", "xirq19", - "xirq20", - "xirq14b", "xirq17b", "xirq18b", -}; static const struct uniphier_pinmux_function uniphier_pro4_functions[] = { UNIPHIER_PINMUX_FUNCTION(emmc), @@ -1580,10 +1208,17 @@ static const struct uniphier_pinmux_function uniphier_pro4_functions[] = { UNIPHIER_PINMUX_FUNCTION(usb1), UNIPHIER_PINMUX_FUNCTION(usb2), UNIPHIER_PINMUX_FUNCTION(usb3), - UNIPHIER_PINMUX_FUNCTION(port), - UNIPHIER_PINMUX_FUNCTION(xirq), }; +static int uniphier_pro4_get_gpio_muxval(unsigned int pin, + unsigned int gpio_offset) +{ + if (gpio_offset >= 134 && gpio_offset <= 140) /* XIRQ14-20 */ + return 2; + + return 7; +} + static struct uniphier_pinctrl_socdata uniphier_pro4_pindata = { .pins = uniphier_pro4_pins, .npins = ARRAY_SIZE(uniphier_pro4_pins), @@ -1591,6 +1226,7 @@ static struct uniphier_pinctrl_socdata uniphier_pro4_pindata = { .groups_count = ARRAY_SIZE(uniphier_pro4_groups), .functions = uniphier_pro4_functions, .functions_count = ARRAY_SIZE(uniphier_pro4_functions), + .get_gpio_muxval = uniphier_pro4_get_gpio_muxval, .caps = UNIPHIER_PINCTRL_CAPS_DBGMUX_SEPARATE, }; @@ -1609,6 +1245,7 @@ static struct platform_driver uniphier_pro4_pinctrl_driver = { .driver = { .name = "uniphier-pro4-pinctrl", .of_match_table = uniphier_pro4_pinctrl_match, + .pm = &uniphier_pinctrl_pm_ops, }, }; builtin_platform_driver(uniphier_pro4_pinctrl_driver); diff --git a/drivers/pinctrl/uniphier/pinctrl-uniphier-pro5.c b/drivers/pinctrl/uniphier/pinctrl-uniphier-pro5.c index 04d00c398eaf..9381a4ff4389 100644 --- a/drivers/pinctrl/uniphier/pinctrl-uniphier-pro5.c +++ b/drivers/pinctrl/uniphier/pinctrl-uniphier-pro5.c @@ -854,87 +854,38 @@ static const unsigned usb1_pins[] = {126, 127}; static const int usb1_muxvals[] = {0, 0}; static const unsigned usb2_pins[] = {128, 129}; static const int usb2_muxvals[] = {0, 0}; -static const unsigned port_range0_pins[] = { - 89, 90, 91, 92, 93, 94, 95, 96, /* PORT0x */ - 97, 98, 99, 100, 101, 102, 103, 104, /* PORT1x */ - 251, 252, 253, 254, 255, 247, 248, 249, /* PORT2x */ - 39, 40, 41, 42, 43, 44, 45, 46, /* PORT3x */ - 156, 157, 158, 159, 160, 161, 162, 163, /* PORT4x */ - 164, 165, 166, 167, 168, 169, 170, 171, /* PORT5x */ - 190, 191, 192, 193, 194, 195, 196, 197, /* PORT6x */ - 198, 199, 200, 201, 202, 203, 204, 205, /* PORT7x */ - 120, 121, 122, 123, 55, 56, 57, 58, /* PORT8x */ - 124, 125, 126, 127, 49, 50, 53, 54, /* PORT9x */ - 148, 149, 150, 151, 152, 153, 154, 155, /* PORT10x */ - 133, 134, 131, 130, 138, 139, 136, 135, /* PORT11x */ - 28, 29, 30, 31, 32, 33, 34, 35, /* PORT12x */ - 179, 180, 181, 182, 186, 187, 188, 189, /* PORT13x */ - 4, 5, 6, 7, 8, 9, 10, 11, /* PORT14x */ -}; -static const int port_range0_muxvals[] = { - 15, 15, 15, 15, 15, 15, 15, 15, /* PORT0x */ - 15, 15, 15, 15, 15, 15, 15, 15, /* PORT1x */ - 15, 15, 15, 15, 15, 15, 15, 15, /* PORT2x */ - 15, 15, 15, 15, 15, 15, 15, 15, /* PORT3x */ - 15, 15, 15, 15, 15, 15, 15, 15, /* PORT4x */ - 15, 15, 15, 15, 15, 15, 15, 15, /* PORT5x */ - 15, 15, 15, 15, 15, 15, 15, 15, /* PORT6x */ - 15, 15, 15, 15, 15, 15, 15, 15, /* PORT7x */ - 15, 15, 15, 15, 15, 15, 15, 15, /* PORT8x */ - 15, 15, 15, 15, 15, 15, 15, 15, /* PORT9x */ - 15, 15, 15, 15, 15, 15, 15, 15, /* PORT10x */ - 15, 15, 15, 15, 15, 15, 15, 15, /* PORT11x */ - 15, 15, 15, 15, 15, 15, 15, 15, /* PORT12x */ - 15, 15, 15, 15, 15, 15, 15, 15, /* PORT13x */ - 15, 15, 15, 15, 15, 15, 15, 15, /* PORT14x */ -}; -static const unsigned port_range1_pins[] = { - 109, 110, 111, /* PORT175-177 */ - 206, 207, 208, 209, 210, 211, 212, 213, /* PORT18x */ - 12, 13, 14, 15, 16, 17, 107, 108, /* PORT19x */ - 140, 141, 142, 143, 144, 145, 146, 147, /* PORT20x */ - 59, 60, 61, 62, 63, 64, 65, 66, /* PORT21x */ - 214, 215, 216, 217, 218, 219, 220, 221, /* PORT22x */ - 222, 223, 224, 225, 226, 227, 228, 229, /* PORT23x */ - 19, 20, 21, 22, 23, 24, 25, 26, /* PORT24x */ - 230, 231, 232, 233, 234, 235, 236, 237, /* PORT25x */ - 239, 240, 241, 242, 243, 244, 245, 246, /* PORT26x */ - 172, 173, 174, 175, 176, 177, 178, 129, /* PORT27x */ - 0, 1, 2, 67, 85, 86, 87, 88, /* PORT28x */ - 105, 106, 18, 27, 36, 128, 132, 137, /* PORT29x */ - 183, 184, 185, 84, 47, 48, 51, 52, /* PORT30x */ -}; -static const int port_range1_muxvals[] = { - 15, 15, 15, /* PORT175-177 */ - 15, 15, 15, 15, 15, 15, 15, 15, /* PORT18x */ - 15, 15, 15, 15, 15, 15, 15, 15, /* PORT19x */ - 15, 15, 15, 15, 15, 15, 15, 15, /* PORT20x */ - 15, 15, 15, 15, 15, 15, 15, 15, /* PORT21x */ - 15, 15, 15, 15, 15, 15, 15, 15, /* PORT22x */ - 15, 15, 15, 15, 15, 15, 15, 15, /* PORT23x */ - 15, 15, 15, 15, 15, 15, 15, 15, /* PORT24x */ - 15, 15, 15, 15, 15, 15, 15, 15, /* PORT25x */ - 15, 15, 15, 15, 15, 15, 15, 15, /* PORT26x */ - 15, 15, 15, 15, 15, 15, 15, 15, /* PORT27x */ - 15, 15, 15, 15, 15, 15, 15, 15, /* PORT28x */ - 15, 15, 15, 15, 15, 15, 15, 15, /* PORT29x */ - 15, 15, 15, 15, 15, 15, 15, 15, /* PORT30x */ -}; -static const unsigned xirq_pins[] = { - 68, 69, 70, 71, 72, 73, 74, 75, /* XIRQ0-7 */ - 76, 77, 78, 79, 80, 81, 82, 83, /* XIRQ8-15 */ - 84, 85, 86, 87, 88, /* XIRQ16-20 */ -}; -static const int xirq_muxvals[] = { - 14, 14, 14, 14, 14, 14, 14, 14, /* XIRQ0-7 */ - 14, 14, 14, 14, 14, 14, 14, 14, /* XIRQ8-15 */ - 14, 14, 14, 14, 14, /* XIRQ16-20 */ -}; -static const unsigned xirq_alternatives_pins[] = { - 91, 92, 239, 144, 240, 156, 241, 106, 128, -}; -static const int xirq_alternatives_muxvals[] = { - 14, 14, 14, 14, 14, 14, 14, 14, 14, +static const unsigned int gpio_range_pins[] = { + 89, 90, 91, 92, 93, 94, 95, 96, /* PORT0x */ + 97, 98, 99, 100, 101, 102, 103, 104, /* PORT1x */ + 251, 252, 253, 254, 255, 247, 248, 249, /* PORT2x */ + 39, 40, 41, 42, 43, 44, 45, 46, /* PORT3x */ + 156, 157, 158, 159, 160, 161, 162, 163, /* PORT4x */ + 164, 165, 166, 167, 168, 169, 170, 171, /* PORT5x */ + 190, 191, 192, 193, 194, 195, 196, 197, /* PORT6x */ + 198, 199, 200, 201, 202, 203, 204, 205, /* PORT7x */ + 120, 121, 122, 123, 55, 56, 57, 58, /* PORT8x */ + 124, 125, 126, 127, 49, 50, 53, 54, /* PORT9x */ + 148, 149, 150, 151, 152, 153, 154, 155, /* PORT10x */ + 133, 134, 131, 130, 138, 139, 136, 135, /* PORT11x */ + 28, 29, 30, 31, 32, 33, 34, 35, /* PORT12x */ + 179, 180, 181, 182, 186, 187, 188, 189, /* PORT13x */ + 4, 5, 6, 7, 8, 9, 10, 11, /* PORT14x */ + 68, 69, 70, 71, 72, 73, 74, 75, /* XIRQ0-7 */ + 76, 77, 78, 79, 80, 81, 82, 83, /* XIRQ8-15 */ + 84, 85, 86, 87, 88, 109, 110, 111, /* XIRQ16-20, PORT175-177 */ + 206, 207, 208, 209, 210, 211, 212, 213, /* PORT18x */ + 12, 13, 14, 15, 16, 17, 107, 108, /* PORT19x */ + 140, 141, 142, 143, 144, 145, 146, 147, /* PORT20x */ + 59, 60, 61, 62, 63, 64, 65, 66, /* PORT21x */ + 214, 215, 216, 217, 218, 219, 220, 221, /* PORT22x */ + 222, 223, 224, 225, 226, 227, 228, 229, /* PORT23x */ + 19, 20, 21, 22, 23, 24, 25, 26, /* PORT24x */ + 230, 231, 232, 233, 234, 235, 236, 237, /* PORT25x */ + 239, 240, 241, 242, 243, 244, 245, 246, /* PORT26x */ + 172, 173, 174, 175, 176, 177, 178, 129, /* PORT27x */ + 0, 1, 2, 67, 85, 86, 87, 88, /* PORT28x */ + 105, 106, 18, 27, 36, 128, 132, 137, /* PORT29x */ + 183, 184, 185, 84, 47, 48, 51, 52, /* PORT30x */ }; static const struct uniphier_pinctrl_group uniphier_pro5_groups[] = { @@ -968,267 +919,7 @@ static const struct uniphier_pinctrl_group uniphier_pro5_groups[] = { UNIPHIER_PINCTRL_GROUP(usb0), UNIPHIER_PINCTRL_GROUP(usb1), UNIPHIER_PINCTRL_GROUP(usb2), - UNIPHIER_PINCTRL_GROUP_GPIO_RANGE_PORT(port_range0), - UNIPHIER_PINCTRL_GROUP_GPIO_RANGE_PORT(port_range1), - UNIPHIER_PINCTRL_GROUP_GPIO_RANGE_IRQ(xirq), - UNIPHIER_PINCTRL_GROUP_GPIO_RANGE_IRQ(xirq_alternatives), - UNIPHIER_PINCTRL_GROUP_SINGLE(port00, port_range0, 0), - UNIPHIER_PINCTRL_GROUP_SINGLE(port01, port_range0, 1), - UNIPHIER_PINCTRL_GROUP_SINGLE(port02, port_range0, 2), - UNIPHIER_PINCTRL_GROUP_SINGLE(port03, port_range0, 3), - UNIPHIER_PINCTRL_GROUP_SINGLE(port04, port_range0, 4), - UNIPHIER_PINCTRL_GROUP_SINGLE(port05, port_range0, 5), - UNIPHIER_PINCTRL_GROUP_SINGLE(port06, port_range0, 6), - UNIPHIER_PINCTRL_GROUP_SINGLE(port07, port_range0, 7), - UNIPHIER_PINCTRL_GROUP_SINGLE(port10, port_range0, 8), - UNIPHIER_PINCTRL_GROUP_SINGLE(port11, port_range0, 9), - UNIPHIER_PINCTRL_GROUP_SINGLE(port12, port_range0, 10), - UNIPHIER_PINCTRL_GROUP_SINGLE(port13, port_range0, 11), - UNIPHIER_PINCTRL_GROUP_SINGLE(port14, port_range0, 12), - UNIPHIER_PINCTRL_GROUP_SINGLE(port15, port_range0, 13), - UNIPHIER_PINCTRL_GROUP_SINGLE(port16, port_range0, 14), - UNIPHIER_PINCTRL_GROUP_SINGLE(port17, port_range0, 15), - UNIPHIER_PINCTRL_GROUP_SINGLE(port20, port_range0, 16), - UNIPHIER_PINCTRL_GROUP_SINGLE(port21, port_range0, 17), - UNIPHIER_PINCTRL_GROUP_SINGLE(port22, port_range0, 18), - UNIPHIER_PINCTRL_GROUP_SINGLE(port23, port_range0, 19), - UNIPHIER_PINCTRL_GROUP_SINGLE(port24, port_range0, 20), - UNIPHIER_PINCTRL_GROUP_SINGLE(port25, port_range0, 21), - UNIPHIER_PINCTRL_GROUP_SINGLE(port26, port_range0, 22), - UNIPHIER_PINCTRL_GROUP_SINGLE(port27, port_range0, 23), - UNIPHIER_PINCTRL_GROUP_SINGLE(port30, port_range0, 24), - UNIPHIER_PINCTRL_GROUP_SINGLE(port31, port_range0, 25), - UNIPHIER_PINCTRL_GROUP_SINGLE(port32, port_range0, 26), - UNIPHIER_PINCTRL_GROUP_SINGLE(port33, port_range0, 27), - UNIPHIER_PINCTRL_GROUP_SINGLE(port34, port_range0, 28), - UNIPHIER_PINCTRL_GROUP_SINGLE(port35, port_range0, 29), - UNIPHIER_PINCTRL_GROUP_SINGLE(port36, port_range0, 30), - UNIPHIER_PINCTRL_GROUP_SINGLE(port37, port_range0, 31), - UNIPHIER_PINCTRL_GROUP_SINGLE(port40, port_range0, 32), - UNIPHIER_PINCTRL_GROUP_SINGLE(port41, port_range0, 33), - UNIPHIER_PINCTRL_GROUP_SINGLE(port42, port_range0, 34), - UNIPHIER_PINCTRL_GROUP_SINGLE(port43, port_range0, 35), - UNIPHIER_PINCTRL_GROUP_SINGLE(port44, port_range0, 36), - UNIPHIER_PINCTRL_GROUP_SINGLE(port45, port_range0, 37), - UNIPHIER_PINCTRL_GROUP_SINGLE(port46, port_range0, 38), - UNIPHIER_PINCTRL_GROUP_SINGLE(port47, port_range0, 39), - UNIPHIER_PINCTRL_GROUP_SINGLE(port50, port_range0, 40), - UNIPHIER_PINCTRL_GROUP_SINGLE(port51, port_range0, 41), - UNIPHIER_PINCTRL_GROUP_SINGLE(port52, port_range0, 42), - UNIPHIER_PINCTRL_GROUP_SINGLE(port53, port_range0, 43), - UNIPHIER_PINCTRL_GROUP_SINGLE(port54, port_range0, 44), - UNIPHIER_PINCTRL_GROUP_SINGLE(port55, port_range0, 45), - UNIPHIER_PINCTRL_GROUP_SINGLE(port56, port_range0, 46), - UNIPHIER_PINCTRL_GROUP_SINGLE(port57, port_range0, 47), - UNIPHIER_PINCTRL_GROUP_SINGLE(port60, port_range0, 48), - UNIPHIER_PINCTRL_GROUP_SINGLE(port61, port_range0, 49), - UNIPHIER_PINCTRL_GROUP_SINGLE(port62, port_range0, 50), - UNIPHIER_PINCTRL_GROUP_SINGLE(port63, port_range0, 51), - UNIPHIER_PINCTRL_GROUP_SINGLE(port64, port_range0, 52), - UNIPHIER_PINCTRL_GROUP_SINGLE(port65, port_range0, 53), - UNIPHIER_PINCTRL_GROUP_SINGLE(port66, port_range0, 54), - UNIPHIER_PINCTRL_GROUP_SINGLE(port67, port_range0, 55), - UNIPHIER_PINCTRL_GROUP_SINGLE(port70, port_range0, 56), - UNIPHIER_PINCTRL_GROUP_SINGLE(port71, port_range0, 57), - UNIPHIER_PINCTRL_GROUP_SINGLE(port72, port_range0, 58), - UNIPHIER_PINCTRL_GROUP_SINGLE(port73, port_range0, 59), - UNIPHIER_PINCTRL_GROUP_SINGLE(port74, port_range0, 60), - UNIPHIER_PINCTRL_GROUP_SINGLE(port75, port_range0, 61), - UNIPHIER_PINCTRL_GROUP_SINGLE(port76, port_range0, 62), - UNIPHIER_PINCTRL_GROUP_SINGLE(port77, port_range0, 63), - UNIPHIER_PINCTRL_GROUP_SINGLE(port80, port_range0, 64), - UNIPHIER_PINCTRL_GROUP_SINGLE(port81, port_range0, 65), - UNIPHIER_PINCTRL_GROUP_SINGLE(port82, port_range0, 66), - UNIPHIER_PINCTRL_GROUP_SINGLE(port83, port_range0, 67), - UNIPHIER_PINCTRL_GROUP_SINGLE(port84, port_range0, 68), - UNIPHIER_PINCTRL_GROUP_SINGLE(port85, port_range0, 69), - UNIPHIER_PINCTRL_GROUP_SINGLE(port86, port_range0, 70), - UNIPHIER_PINCTRL_GROUP_SINGLE(port87, port_range0, 71), - UNIPHIER_PINCTRL_GROUP_SINGLE(port90, port_range0, 72), - UNIPHIER_PINCTRL_GROUP_SINGLE(port91, port_range0, 73), - UNIPHIER_PINCTRL_GROUP_SINGLE(port92, port_range0, 74), - UNIPHIER_PINCTRL_GROUP_SINGLE(port93, port_range0, 75), - UNIPHIER_PINCTRL_GROUP_SINGLE(port94, port_range0, 76), - UNIPHIER_PINCTRL_GROUP_SINGLE(port95, port_range0, 77), - UNIPHIER_PINCTRL_GROUP_SINGLE(port96, port_range0, 78), - UNIPHIER_PINCTRL_GROUP_SINGLE(port97, port_range0, 79), - UNIPHIER_PINCTRL_GROUP_SINGLE(port100, port_range0, 80), - UNIPHIER_PINCTRL_GROUP_SINGLE(port101, port_range0, 81), - UNIPHIER_PINCTRL_GROUP_SINGLE(port102, port_range0, 82), - UNIPHIER_PINCTRL_GROUP_SINGLE(port103, port_range0, 83), - UNIPHIER_PINCTRL_GROUP_SINGLE(port104, port_range0, 84), - UNIPHIER_PINCTRL_GROUP_SINGLE(port105, port_range0, 85), - UNIPHIER_PINCTRL_GROUP_SINGLE(port106, port_range0, 86), - UNIPHIER_PINCTRL_GROUP_SINGLE(port107, port_range0, 87), - UNIPHIER_PINCTRL_GROUP_SINGLE(port110, port_range0, 88), - UNIPHIER_PINCTRL_GROUP_SINGLE(port111, port_range0, 89), - UNIPHIER_PINCTRL_GROUP_SINGLE(port112, port_range0, 90), - UNIPHIER_PINCTRL_GROUP_SINGLE(port113, port_range0, 91), - UNIPHIER_PINCTRL_GROUP_SINGLE(port114, port_range0, 92), - UNIPHIER_PINCTRL_GROUP_SINGLE(port115, port_range0, 93), - UNIPHIER_PINCTRL_GROUP_SINGLE(port116, port_range0, 94), - UNIPHIER_PINCTRL_GROUP_SINGLE(port117, port_range0, 95), - UNIPHIER_PINCTRL_GROUP_SINGLE(port120, port_range0, 96), - UNIPHIER_PINCTRL_GROUP_SINGLE(port121, port_range0, 97), - UNIPHIER_PINCTRL_GROUP_SINGLE(port122, port_range0, 98), - UNIPHIER_PINCTRL_GROUP_SINGLE(port123, port_range0, 99), - UNIPHIER_PINCTRL_GROUP_SINGLE(port124, port_range0, 100), - UNIPHIER_PINCTRL_GROUP_SINGLE(port125, port_range0, 101), - UNIPHIER_PINCTRL_GROUP_SINGLE(port126, port_range0, 102), - UNIPHIER_PINCTRL_GROUP_SINGLE(port127, port_range0, 103), - UNIPHIER_PINCTRL_GROUP_SINGLE(port130, port_range0, 104), - UNIPHIER_PINCTRL_GROUP_SINGLE(port131, port_range0, 105), - UNIPHIER_PINCTRL_GROUP_SINGLE(port132, port_range0, 106), - UNIPHIER_PINCTRL_GROUP_SINGLE(port133, port_range0, 107), - UNIPHIER_PINCTRL_GROUP_SINGLE(port134, port_range0, 108), - UNIPHIER_PINCTRL_GROUP_SINGLE(port135, port_range0, 109), - UNIPHIER_PINCTRL_GROUP_SINGLE(port136, port_range0, 110), - UNIPHIER_PINCTRL_GROUP_SINGLE(port137, port_range0, 111), - UNIPHIER_PINCTRL_GROUP_SINGLE(port140, port_range0, 112), - UNIPHIER_PINCTRL_GROUP_SINGLE(port141, port_range0, 113), - UNIPHIER_PINCTRL_GROUP_SINGLE(port142, port_range0, 114), - UNIPHIER_PINCTRL_GROUP_SINGLE(port143, port_range0, 115), - UNIPHIER_PINCTRL_GROUP_SINGLE(port144, port_range0, 116), - UNIPHIER_PINCTRL_GROUP_SINGLE(port145, port_range0, 117), - UNIPHIER_PINCTRL_GROUP_SINGLE(port146, port_range0, 118), - UNIPHIER_PINCTRL_GROUP_SINGLE(port147, port_range0, 119), - UNIPHIER_PINCTRL_GROUP_SINGLE(port175, port_range1, 0), - UNIPHIER_PINCTRL_GROUP_SINGLE(port176, port_range1, 1), - UNIPHIER_PINCTRL_GROUP_SINGLE(port177, port_range1, 2), - UNIPHIER_PINCTRL_GROUP_SINGLE(port180, port_range1, 3), - UNIPHIER_PINCTRL_GROUP_SINGLE(port181, port_range1, 4), - UNIPHIER_PINCTRL_GROUP_SINGLE(port182, port_range1, 5), - UNIPHIER_PINCTRL_GROUP_SINGLE(port183, port_range1, 6), - UNIPHIER_PINCTRL_GROUP_SINGLE(port184, port_range1, 7), - UNIPHIER_PINCTRL_GROUP_SINGLE(port185, port_range1, 8), - UNIPHIER_PINCTRL_GROUP_SINGLE(port186, port_range1, 9), - UNIPHIER_PINCTRL_GROUP_SINGLE(port187, port_range1, 10), - UNIPHIER_PINCTRL_GROUP_SINGLE(port190, port_range1, 11), - UNIPHIER_PINCTRL_GROUP_SINGLE(port191, port_range1, 12), - UNIPHIER_PINCTRL_GROUP_SINGLE(port192, port_range1, 13), - UNIPHIER_PINCTRL_GROUP_SINGLE(port193, port_range1, 14), - UNIPHIER_PINCTRL_GROUP_SINGLE(port194, port_range1, 15), - UNIPHIER_PINCTRL_GROUP_SINGLE(port195, port_range1, 16), - UNIPHIER_PINCTRL_GROUP_SINGLE(port196, port_range1, 17), - UNIPHIER_PINCTRL_GROUP_SINGLE(port197, port_range1, 18), - UNIPHIER_PINCTRL_GROUP_SINGLE(port200, port_range1, 19), - UNIPHIER_PINCTRL_GROUP_SINGLE(port201, port_range1, 20), - UNIPHIER_PINCTRL_GROUP_SINGLE(port202, port_range1, 21), - UNIPHIER_PINCTRL_GROUP_SINGLE(port203, port_range1, 22), - UNIPHIER_PINCTRL_GROUP_SINGLE(port204, port_range1, 23), - UNIPHIER_PINCTRL_GROUP_SINGLE(port205, port_range1, 24), - UNIPHIER_PINCTRL_GROUP_SINGLE(port206, port_range1, 25), - UNIPHIER_PINCTRL_GROUP_SINGLE(port207, port_range1, 26), - UNIPHIER_PINCTRL_GROUP_SINGLE(port210, port_range1, 27), - UNIPHIER_PINCTRL_GROUP_SINGLE(port211, port_range1, 28), - UNIPHIER_PINCTRL_GROUP_SINGLE(port212, port_range1, 29), - UNIPHIER_PINCTRL_GROUP_SINGLE(port213, port_range1, 30), - UNIPHIER_PINCTRL_GROUP_SINGLE(port214, port_range1, 31), - UNIPHIER_PINCTRL_GROUP_SINGLE(port215, port_range1, 32), - UNIPHIER_PINCTRL_GROUP_SINGLE(port216, port_range1, 33), - UNIPHIER_PINCTRL_GROUP_SINGLE(port217, port_range1, 34), - UNIPHIER_PINCTRL_GROUP_SINGLE(port220, port_range1, 35), - UNIPHIER_PINCTRL_GROUP_SINGLE(port221, port_range1, 36), - UNIPHIER_PINCTRL_GROUP_SINGLE(port222, port_range1, 37), - UNIPHIER_PINCTRL_GROUP_SINGLE(port223, port_range1, 38), - UNIPHIER_PINCTRL_GROUP_SINGLE(port224, port_range1, 39), - UNIPHIER_PINCTRL_GROUP_SINGLE(port225, port_range1, 40), - UNIPHIER_PINCTRL_GROUP_SINGLE(port226, port_range1, 41), - UNIPHIER_PINCTRL_GROUP_SINGLE(port227, port_range1, 42), - UNIPHIER_PINCTRL_GROUP_SINGLE(port230, port_range1, 43), - UNIPHIER_PINCTRL_GROUP_SINGLE(port231, port_range1, 44), - UNIPHIER_PINCTRL_GROUP_SINGLE(port232, port_range1, 45), - UNIPHIER_PINCTRL_GROUP_SINGLE(port233, port_range1, 46), - UNIPHIER_PINCTRL_GROUP_SINGLE(port234, port_range1, 47), - UNIPHIER_PINCTRL_GROUP_SINGLE(port235, port_range1, 48), - UNIPHIER_PINCTRL_GROUP_SINGLE(port236, port_range1, 49), - UNIPHIER_PINCTRL_GROUP_SINGLE(port237, port_range1, 50), - UNIPHIER_PINCTRL_GROUP_SINGLE(port240, port_range1, 51), - UNIPHIER_PINCTRL_GROUP_SINGLE(port241, port_range1, 52), - UNIPHIER_PINCTRL_GROUP_SINGLE(port242, port_range1, 53), - UNIPHIER_PINCTRL_GROUP_SINGLE(port243, port_range1, 54), - UNIPHIER_PINCTRL_GROUP_SINGLE(port244, port_range1, 55), - UNIPHIER_PINCTRL_GROUP_SINGLE(port245, port_range1, 56), - UNIPHIER_PINCTRL_GROUP_SINGLE(port246, port_range1, 57), - UNIPHIER_PINCTRL_GROUP_SINGLE(port247, port_range1, 58), - UNIPHIER_PINCTRL_GROUP_SINGLE(port250, port_range1, 59), - UNIPHIER_PINCTRL_GROUP_SINGLE(port251, port_range1, 60), - UNIPHIER_PINCTRL_GROUP_SINGLE(port252, port_range1, 61), - UNIPHIER_PINCTRL_GROUP_SINGLE(port253, port_range1, 62), - UNIPHIER_PINCTRL_GROUP_SINGLE(port254, port_range1, 63), - UNIPHIER_PINCTRL_GROUP_SINGLE(port255, port_range1, 64), - UNIPHIER_PINCTRL_GROUP_SINGLE(port256, port_range1, 65), - UNIPHIER_PINCTRL_GROUP_SINGLE(port257, port_range1, 66), - UNIPHIER_PINCTRL_GROUP_SINGLE(port260, port_range1, 67), - UNIPHIER_PINCTRL_GROUP_SINGLE(port261, port_range1, 68), - UNIPHIER_PINCTRL_GROUP_SINGLE(port262, port_range1, 69), - UNIPHIER_PINCTRL_GROUP_SINGLE(port263, port_range1, 70), - UNIPHIER_PINCTRL_GROUP_SINGLE(port264, port_range1, 71), - UNIPHIER_PINCTRL_GROUP_SINGLE(port265, port_range1, 72), - UNIPHIER_PINCTRL_GROUP_SINGLE(port266, port_range1, 73), - UNIPHIER_PINCTRL_GROUP_SINGLE(port267, port_range1, 74), - UNIPHIER_PINCTRL_GROUP_SINGLE(port270, port_range1, 75), - UNIPHIER_PINCTRL_GROUP_SINGLE(port271, port_range1, 76), - UNIPHIER_PINCTRL_GROUP_SINGLE(port272, port_range1, 77), - UNIPHIER_PINCTRL_GROUP_SINGLE(port273, port_range1, 78), - UNIPHIER_PINCTRL_GROUP_SINGLE(port274, port_range1, 79), - UNIPHIER_PINCTRL_GROUP_SINGLE(port275, port_range1, 80), - UNIPHIER_PINCTRL_GROUP_SINGLE(port276, port_range1, 81), - UNIPHIER_PINCTRL_GROUP_SINGLE(port277, port_range1, 82), - UNIPHIER_PINCTRL_GROUP_SINGLE(port280, port_range1, 83), - UNIPHIER_PINCTRL_GROUP_SINGLE(port281, port_range1, 84), - UNIPHIER_PINCTRL_GROUP_SINGLE(port282, port_range1, 85), - UNIPHIER_PINCTRL_GROUP_SINGLE(port283, port_range1, 86), - UNIPHIER_PINCTRL_GROUP_SINGLE(port284, port_range1, 87), - UNIPHIER_PINCTRL_GROUP_SINGLE(port285, port_range1, 88), - UNIPHIER_PINCTRL_GROUP_SINGLE(port286, port_range1, 89), - UNIPHIER_PINCTRL_GROUP_SINGLE(port287, port_range1, 90), - UNIPHIER_PINCTRL_GROUP_SINGLE(port290, port_range1, 91), - UNIPHIER_PINCTRL_GROUP_SINGLE(port291, port_range1, 92), - UNIPHIER_PINCTRL_GROUP_SINGLE(port292, port_range1, 93), - UNIPHIER_PINCTRL_GROUP_SINGLE(port293, port_range1, 94), - UNIPHIER_PINCTRL_GROUP_SINGLE(port294, port_range1, 95), - UNIPHIER_PINCTRL_GROUP_SINGLE(port295, port_range1, 96), - UNIPHIER_PINCTRL_GROUP_SINGLE(port296, port_range1, 97), - UNIPHIER_PINCTRL_GROUP_SINGLE(port297, port_range1, 98), - UNIPHIER_PINCTRL_GROUP_SINGLE(port300, port_range1, 99), - UNIPHIER_PINCTRL_GROUP_SINGLE(port301, port_range1, 100), - UNIPHIER_PINCTRL_GROUP_SINGLE(port302, port_range1, 101), - UNIPHIER_PINCTRL_GROUP_SINGLE(port303, port_range1, 102), - UNIPHIER_PINCTRL_GROUP_SINGLE(port304, port_range1, 103), - UNIPHIER_PINCTRL_GROUP_SINGLE(port305, port_range1, 104), - UNIPHIER_PINCTRL_GROUP_SINGLE(port306, port_range1, 105), - UNIPHIER_PINCTRL_GROUP_SINGLE(port307, port_range1, 106), - UNIPHIER_PINCTRL_GROUP_SINGLE(xirq0, xirq, 0), - UNIPHIER_PINCTRL_GROUP_SINGLE(xirq1, xirq, 1), - UNIPHIER_PINCTRL_GROUP_SINGLE(xirq2, xirq, 2), - UNIPHIER_PINCTRL_GROUP_SINGLE(xirq3, xirq, 3), - UNIPHIER_PINCTRL_GROUP_SINGLE(xirq4, xirq, 4), - UNIPHIER_PINCTRL_GROUP_SINGLE(xirq5, xirq, 5), - UNIPHIER_PINCTRL_GROUP_SINGLE(xirq6, xirq, 6), - UNIPHIER_PINCTRL_GROUP_SINGLE(xirq7, xirq, 7), - UNIPHIER_PINCTRL_GROUP_SINGLE(xirq8, xirq, 8), - UNIPHIER_PINCTRL_GROUP_SINGLE(xirq9, xirq, 9), - UNIPHIER_PINCTRL_GROUP_SINGLE(xirq10, xirq, 10), - UNIPHIER_PINCTRL_GROUP_SINGLE(xirq11, xirq, 11), - UNIPHIER_PINCTRL_GROUP_SINGLE(xirq12, xirq, 12), - UNIPHIER_PINCTRL_GROUP_SINGLE(xirq13, xirq, 13), - UNIPHIER_PINCTRL_GROUP_SINGLE(xirq14, xirq, 14), - UNIPHIER_PINCTRL_GROUP_SINGLE(xirq15, xirq, 15), - UNIPHIER_PINCTRL_GROUP_SINGLE(xirq16, xirq, 16), - UNIPHIER_PINCTRL_GROUP_SINGLE(xirq17, xirq, 17), - UNIPHIER_PINCTRL_GROUP_SINGLE(xirq18, xirq, 18), - UNIPHIER_PINCTRL_GROUP_SINGLE(xirq19, xirq, 19), - UNIPHIER_PINCTRL_GROUP_SINGLE(xirq20, xirq, 20), - UNIPHIER_PINCTRL_GROUP_SINGLE(xirq3b, xirq_alternatives, 0), - UNIPHIER_PINCTRL_GROUP_SINGLE(xirq4b, xirq_alternatives, 1), - UNIPHIER_PINCTRL_GROUP_SINGLE(xirq16b, xirq_alternatives, 2), - UNIPHIER_PINCTRL_GROUP_SINGLE(xirq17b, xirq_alternatives, 3), - UNIPHIER_PINCTRL_GROUP_SINGLE(xirq17c, xirq_alternatives, 4), - UNIPHIER_PINCTRL_GROUP_SINGLE(xirq18b, xirq_alternatives, 5), - UNIPHIER_PINCTRL_GROUP_SINGLE(xirq18c, xirq_alternatives, 6), - UNIPHIER_PINCTRL_GROUP_SINGLE(xirq19b, xirq_alternatives, 7), - UNIPHIER_PINCTRL_GROUP_SINGLE(xirq20b, xirq_alternatives, 8), + UNIPHIER_PINCTRL_GROUP_GPIO(gpio_range), }; static const char * const emmc_groups[] = {"emmc", "emmc_dat8"}; @@ -1256,76 +947,6 @@ static const char * const uart3_groups[] = {"uart3"}; static const char * const usb0_groups[] = {"usb0"}; static const char * const usb1_groups[] = {"usb1"}; static const char * const usb2_groups[] = {"usb2"}; -static const char * const port_groups[] = { - "port00", "port01", "port02", "port03", - "port04", "port05", "port06", "port07", - "port10", "port11", "port12", "port13", - "port14", "port15", "port16", "port17", - "port20", "port21", "port22", "port23", - "port24", "port25", "port26", "port27", - "port30", "port31", "port32", "port33", - "port34", "port35", "port36", "port37", - "port40", "port41", "port42", "port43", - "port44", "port45", "port46", "port47", - "port50", "port51", "port52", "port53", - "port54", "port55", "port56", "port57", - "port60", "port61", "port62", "port63", - "port64", "port65", "port66", "port67", - "port70", "port71", "port72", "port73", - "port74", "port75", "port76", "port77", - "port80", "port81", "port82", "port83", - "port84", "port85", "port86", "port87", - "port90", "port91", "port92", "port93", - "port94", "port95", "port96", "port97", - "port100", "port101", "port102", "port103", - "port104", "port105", "port106", "port107", - "port110", "port111", "port112", "port113", - "port114", "port115", "port116", "port117", - "port120", "port121", "port122", "port123", - "port124", "port125", "port126", "port127", - "port130", "port131", "port132", "port133", - "port134", "port135", "port136", "port137", - "port140", "port141", "port142", "port143", - "port144", "port145", "port146", "port147", - /* port150-174 missing */ - /* none */ "port175", "port176", "port177", - "port180", "port181", "port182", "port183", - "port184", "port185", "port186", "port187", - "port190", "port191", "port192", "port193", - "port194", "port195", "port196", "port197", - "port200", "port201", "port202", "port203", - "port204", "port205", "port206", "port207", - "port210", "port211", "port212", "port213", - "port214", "port215", "port216", "port217", - "port220", "port221", "port222", "port223", - "port224", "port225", "port226", "port227", - "port230", "port231", "port232", "port233", - "port234", "port235", "port236", "port237", - "port240", "port241", "port242", "port243", - "port244", "port245", "port246", "port247", - "port250", "port251", "port252", "port253", - "port254", "port255", "port256", "port257", - "port260", "port261", "port262", "port263", - "port264", "port265", "port266", "port267", - "port270", "port271", "port272", "port273", - "port274", "port275", "port276", "port277", - "port280", "port281", "port282", "port283", - "port284", "port285", "port286", "port287", - "port290", "port291", "port292", "port293", - "port294", "port295", "port296", "port297", - "port300", "port301", "port302", "port303", - "port304", "port305", "port306", "port307", -}; -static const char * const xirq_groups[] = { - "xirq0", "xirq1", "xirq2", "xirq3", - "xirq4", "xirq5", "xirq6", "xirq7", - "xirq8", "xirq9", "xirq10", "xirq11", - "xirq12", "xirq13", "xirq14", "xirq15", - "xirq16", "xirq17", "xirq18", "xirq19", - "xirq20", - "xirq3b", "xirq4b", "xirq16b", "xirq17b", "xirq17c", - "xirq18b", "xirq18c", "xirq19b", "xirq20b", -}; static const struct uniphier_pinmux_function uniphier_pro5_functions[] = { UNIPHIER_PINMUX_FUNCTION(emmc), @@ -1345,10 +966,17 @@ static const struct uniphier_pinmux_function uniphier_pro5_functions[] = { UNIPHIER_PINMUX_FUNCTION(usb0), UNIPHIER_PINMUX_FUNCTION(usb1), UNIPHIER_PINMUX_FUNCTION(usb2), - UNIPHIER_PINMUX_FUNCTION(port), - UNIPHIER_PINMUX_FUNCTION(xirq), }; +static int uniphier_pro5_get_gpio_muxval(unsigned int pin, + unsigned int gpio_offset) +{ + if (gpio_offset >= 120 && gpio_offset <= 141) /* XIRQ0-20 */ + return 14; + + return 15; +} + static struct uniphier_pinctrl_socdata uniphier_pro5_pindata = { .pins = uniphier_pro5_pins, .npins = ARRAY_SIZE(uniphier_pro5_pins), @@ -1356,6 +984,7 @@ static struct uniphier_pinctrl_socdata uniphier_pro5_pindata = { .groups_count = ARRAY_SIZE(uniphier_pro5_groups), .functions = uniphier_pro5_functions, .functions_count = ARRAY_SIZE(uniphier_pro5_functions), + .get_gpio_muxval = uniphier_pro5_get_gpio_muxval, .caps = UNIPHIER_PINCTRL_CAPS_DBGMUX_SEPARATE, }; @@ -1374,6 +1003,7 @@ static struct platform_driver uniphier_pro5_pinctrl_driver = { .driver = { .name = "uniphier-pro5-pinctrl", .of_match_table = uniphier_pro5_pinctrl_match, + .pm = &uniphier_pinctrl_pm_ops, }, }; builtin_platform_driver(uniphier_pro5_pinctrl_driver); diff --git a/drivers/pinctrl/uniphier/pinctrl-uniphier-pxs2.c b/drivers/pinctrl/uniphier/pinctrl-uniphier-pxs2.c index 53b6b774654e..c0ef40ae99a7 100644 --- a/drivers/pinctrl/uniphier/pinctrl-uniphier-pxs2.c +++ b/drivers/pinctrl/uniphier/pinctrl-uniphier-pxs2.c @@ -790,7 +790,7 @@ static const unsigned usb2_pins[] = {60, 61}; static const int usb2_muxvals[] = {8, 8}; static const unsigned usb3_pins[] = {62, 63}; static const int usb3_muxvals[] = {8, 8}; -static const unsigned port_range0_pins[] = { +static const unsigned int gpio_range0_pins[] = { 127, 128, 129, 130, 131, 132, 133, 134, /* PORT0x */ 135, 136, 137, 138, 139, 140, 141, 142, /* PORT1x */ 0, 1, 2, 3, 4, 5, 6, 7, /* PORT2x */ @@ -803,26 +803,13 @@ static const unsigned port_range0_pins[] = { 61, 62, 63, 64, 65, 66, 67, 68, /* PORT9x */ 69, 70, 71, 76, 77, 78, 79, 80, /* PORT10x */ }; -static const int port_range0_muxvals[] = { - 15, 15, 15, 15, 15, 15, 15, 15, /* PORT0x */ - 15, 15, 15, 15, 15, 15, 15, 15, /* PORT1x */ - 15, 15, 15, 15, 15, 15, 15, 15, /* PORT2x */ - 15, 15, 15, 15, 15, 15, 15, 15, /* PORT3x */ - 15, 15, 15, 15, 15, 15, 15, 15, /* PORT4x */ - 15, 15, 15, 15, 15, 15, 15, 15, /* PORT5x */ - 15, 15, 15, 15, 15, 15, 15, 15, /* PORT6x */ - 15, 15, 15, 15, 15, 15, 15, 15, /* PORT7x */ - 15, 15, 15, 15, 15, 15, 15, 15, /* PORT8x */ - 15, 15, 15, 15, 15, 15, 15, 15, /* PORT9x */ - 15, 15, 15, 15, 15, 15, 15, 15, /* PORT10x */ -}; -static const unsigned port_range1_pins[] = { +static const unsigned int gpio_range1_pins[] = { 81, 82, 83, 84, 85, 86, 87, 88, /* PORT12x */ 89, 90, 95, 96, 97, 98, 99, 100, /* PORT13x */ 101, 102, 103, 104, 105, 106, 107, 108, /* PORT14x */ - 118, 119, 120, 121, 122, 123, 124, 125, /* PORT15x */ - 126, 72, 73, 92, 177, 93, 94, 176, /* PORT16x */ - 74, 91, 27, 28, 29, 75, 20, 26, /* PORT17x */ + 118, 119, 120, 121, 122, 123, 124, 125, /* XIRQ0-7 */ + 126, 72, 73, 92, 177, 93, 94, 176, /* XIRQ8-15 */ + 74, 91, 27, 28, 29, 75, 20, 26, /* XIRQ16-23 */ 109, 110, 111, 112, 113, 114, 115, 116, /* PORT18x */ 117, 143, 144, 145, 146, 147, 148, 149, /* PORT19x */ 150, 151, 152, 153, 154, 155, 156, 157, /* PORT20x */ @@ -835,35 +822,6 @@ static const unsigned port_range1_pins[] = { 218, 219, 220, 221, 223, 224, 225, 226, /* PORT27x */ 227, 228, 229, 230, 231, 232, 233, 234, /* PORT28x */ }; -static const int port_range1_muxvals[] = { - 15, 15, 15, 15, 15, 15, 15, 15, /* PORT12x */ - 15, 15, 15, 15, 15, 15, 15, 15, /* PORT13x */ - 15, 15, 15, 15, 15, 15, 15, 15, /* PORT14x */ - 15, 15, 15, 15, 15, 15, 15, 15, /* PORT15x */ - 15, 15, 15, 15, 15, 15, 15, 15, /* PORT16x */ - 15, 15, 15, 15, 15, 15, 15, 15, /* PORT17x */ - 15, 15, 15, 15, 15, 15, 15, 15, /* PORT18x */ - 15, 15, 15, 15, 15, 15, 15, 15, /* PORT19x */ - 15, 15, 15, 15, 15, 15, 15, 15, /* PORT20x */ - 15, 15, 15, 15, 15, 15, 15, 15, /* PORT21x */ - 15, 15, 15, 15, 15, 15, 15, 15, /* PORT22x */ - 15, 15, 15, 15, 15, 15, 15, 15, /* PORT23x */ - 15, 15, 15, 15, 15, 15, 15, 15, /* PORT24x */ - 15, 15, 15, 15, 15, 15, 15, 15, /* PORT25x */ - 15, 15, 15, 15, 15, 15, 15, 15, /* PORT26x */ - 15, 15, 15, 15, 15, 15, 15, 15, /* PORT27x */ - 15, 15, 15, 15, 15, 15, 15, 15, /* PORT28x */ -}; -static const unsigned xirq_pins[] = { - 118, 119, 120, 121, 122, 123, 124, 125, /* XIRQ0-7 */ - 126, 72, 73, 92, 177, 93, 94, 176, /* XIRQ8-15 */ - 74, 91, 27, 28, 29, 75, 20, 26, /* XIRQ16-23 */ -}; -static const int xirq_muxvals[] = { - 14, 14, 14, 14, 14, 14, 14, 14, /* XIRQ0-7 */ - 14, 14, 14, 14, 14, 14, 14, 14, /* XIRQ8-15 */ - 14, 14, 14, 14, 14, 14, 14, 14, /* XIRQ16-23 */ -}; static const struct uniphier_pinctrl_group uniphier_pxs2_groups[] = { UNIPHIER_PINCTRL_GROUP(emmc), @@ -892,257 +850,8 @@ static const struct uniphier_pinctrl_group uniphier_pxs2_groups[] = { UNIPHIER_PINCTRL_GROUP(usb1), UNIPHIER_PINCTRL_GROUP(usb2), UNIPHIER_PINCTRL_GROUP(usb3), - UNIPHIER_PINCTRL_GROUP_GPIO_RANGE_PORT(port_range0), - UNIPHIER_PINCTRL_GROUP_GPIO_RANGE_PORT(port_range1), - UNIPHIER_PINCTRL_GROUP_GPIO_RANGE_IRQ(xirq), - UNIPHIER_PINCTRL_GROUP_SINGLE(port00, port_range0, 0), - UNIPHIER_PINCTRL_GROUP_SINGLE(port01, port_range0, 1), - UNIPHIER_PINCTRL_GROUP_SINGLE(port02, port_range0, 2), - UNIPHIER_PINCTRL_GROUP_SINGLE(port03, port_range0, 3), - UNIPHIER_PINCTRL_GROUP_SINGLE(port04, port_range0, 4), - UNIPHIER_PINCTRL_GROUP_SINGLE(port05, port_range0, 5), - UNIPHIER_PINCTRL_GROUP_SINGLE(port06, port_range0, 6), - UNIPHIER_PINCTRL_GROUP_SINGLE(port07, port_range0, 7), - UNIPHIER_PINCTRL_GROUP_SINGLE(port10, port_range0, 8), - UNIPHIER_PINCTRL_GROUP_SINGLE(port11, port_range0, 9), - UNIPHIER_PINCTRL_GROUP_SINGLE(port12, port_range0, 10), - UNIPHIER_PINCTRL_GROUP_SINGLE(port13, port_range0, 11), - UNIPHIER_PINCTRL_GROUP_SINGLE(port14, port_range0, 12), - UNIPHIER_PINCTRL_GROUP_SINGLE(port15, port_range0, 13), - UNIPHIER_PINCTRL_GROUP_SINGLE(port16, port_range0, 14), - UNIPHIER_PINCTRL_GROUP_SINGLE(port17, port_range0, 15), - UNIPHIER_PINCTRL_GROUP_SINGLE(port20, port_range0, 16), - UNIPHIER_PINCTRL_GROUP_SINGLE(port21, port_range0, 17), - UNIPHIER_PINCTRL_GROUP_SINGLE(port22, port_range0, 18), - UNIPHIER_PINCTRL_GROUP_SINGLE(port23, port_range0, 19), - UNIPHIER_PINCTRL_GROUP_SINGLE(port24, port_range0, 20), - UNIPHIER_PINCTRL_GROUP_SINGLE(port25, port_range0, 21), - UNIPHIER_PINCTRL_GROUP_SINGLE(port26, port_range0, 22), - UNIPHIER_PINCTRL_GROUP_SINGLE(port27, port_range0, 23), - UNIPHIER_PINCTRL_GROUP_SINGLE(port30, port_range0, 24), - UNIPHIER_PINCTRL_GROUP_SINGLE(port31, port_range0, 25), - UNIPHIER_PINCTRL_GROUP_SINGLE(port32, port_range0, 26), - UNIPHIER_PINCTRL_GROUP_SINGLE(port33, port_range0, 27), - UNIPHIER_PINCTRL_GROUP_SINGLE(port34, port_range0, 28), - UNIPHIER_PINCTRL_GROUP_SINGLE(port35, port_range0, 29), - UNIPHIER_PINCTRL_GROUP_SINGLE(port36, port_range0, 30), - UNIPHIER_PINCTRL_GROUP_SINGLE(port37, port_range0, 31), - UNIPHIER_PINCTRL_GROUP_SINGLE(port40, port_range0, 32), - UNIPHIER_PINCTRL_GROUP_SINGLE(port41, port_range0, 33), - UNIPHIER_PINCTRL_GROUP_SINGLE(port42, port_range0, 34), - UNIPHIER_PINCTRL_GROUP_SINGLE(port43, port_range0, 35), - UNIPHIER_PINCTRL_GROUP_SINGLE(port44, port_range0, 36), - UNIPHIER_PINCTRL_GROUP_SINGLE(port45, port_range0, 37), - UNIPHIER_PINCTRL_GROUP_SINGLE(port46, port_range0, 38), - UNIPHIER_PINCTRL_GROUP_SINGLE(port47, port_range0, 39), - UNIPHIER_PINCTRL_GROUP_SINGLE(port50, port_range0, 40), - UNIPHIER_PINCTRL_GROUP_SINGLE(port51, port_range0, 41), - UNIPHIER_PINCTRL_GROUP_SINGLE(port52, port_range0, 42), - UNIPHIER_PINCTRL_GROUP_SINGLE(port53, port_range0, 43), - UNIPHIER_PINCTRL_GROUP_SINGLE(port54, port_range0, 44), - UNIPHIER_PINCTRL_GROUP_SINGLE(port55, port_range0, 45), - UNIPHIER_PINCTRL_GROUP_SINGLE(port56, port_range0, 46), - UNIPHIER_PINCTRL_GROUP_SINGLE(port57, port_range0, 47), - UNIPHIER_PINCTRL_GROUP_SINGLE(port60, port_range0, 48), - UNIPHIER_PINCTRL_GROUP_SINGLE(port61, port_range0, 49), - UNIPHIER_PINCTRL_GROUP_SINGLE(port62, port_range0, 50), - UNIPHIER_PINCTRL_GROUP_SINGLE(port63, port_range0, 51), - UNIPHIER_PINCTRL_GROUP_SINGLE(port64, port_range0, 52), - UNIPHIER_PINCTRL_GROUP_SINGLE(port65, port_range0, 53), - UNIPHIER_PINCTRL_GROUP_SINGLE(port66, port_range0, 54), - UNIPHIER_PINCTRL_GROUP_SINGLE(port67, port_range0, 55), - UNIPHIER_PINCTRL_GROUP_SINGLE(port70, port_range0, 56), - UNIPHIER_PINCTRL_GROUP_SINGLE(port71, port_range0, 57), - UNIPHIER_PINCTRL_GROUP_SINGLE(port72, port_range0, 58), - UNIPHIER_PINCTRL_GROUP_SINGLE(port73, port_range0, 59), - UNIPHIER_PINCTRL_GROUP_SINGLE(port74, port_range0, 60), - UNIPHIER_PINCTRL_GROUP_SINGLE(port75, port_range0, 61), - UNIPHIER_PINCTRL_GROUP_SINGLE(port76, port_range0, 62), - UNIPHIER_PINCTRL_GROUP_SINGLE(port77, port_range0, 63), - UNIPHIER_PINCTRL_GROUP_SINGLE(port80, port_range0, 64), - UNIPHIER_PINCTRL_GROUP_SINGLE(port81, port_range0, 65), - UNIPHIER_PINCTRL_GROUP_SINGLE(port82, port_range0, 66), - UNIPHIER_PINCTRL_GROUP_SINGLE(port83, port_range0, 67), - UNIPHIER_PINCTRL_GROUP_SINGLE(port84, port_range0, 68), - UNIPHIER_PINCTRL_GROUP_SINGLE(port85, port_range0, 69), - UNIPHIER_PINCTRL_GROUP_SINGLE(port86, port_range0, 70), - UNIPHIER_PINCTRL_GROUP_SINGLE(port87, port_range0, 71), - UNIPHIER_PINCTRL_GROUP_SINGLE(port90, port_range0, 72), - UNIPHIER_PINCTRL_GROUP_SINGLE(port91, port_range0, 73), - UNIPHIER_PINCTRL_GROUP_SINGLE(port92, port_range0, 74), - UNIPHIER_PINCTRL_GROUP_SINGLE(port93, port_range0, 75), - UNIPHIER_PINCTRL_GROUP_SINGLE(port94, port_range0, 76), - UNIPHIER_PINCTRL_GROUP_SINGLE(port95, port_range0, 77), - UNIPHIER_PINCTRL_GROUP_SINGLE(port96, port_range0, 78), - UNIPHIER_PINCTRL_GROUP_SINGLE(port97, port_range0, 79), - UNIPHIER_PINCTRL_GROUP_SINGLE(port100, port_range0, 80), - UNIPHIER_PINCTRL_GROUP_SINGLE(port101, port_range0, 81), - UNIPHIER_PINCTRL_GROUP_SINGLE(port102, port_range0, 82), - UNIPHIER_PINCTRL_GROUP_SINGLE(port103, port_range0, 83), - UNIPHIER_PINCTRL_GROUP_SINGLE(port104, port_range0, 84), - UNIPHIER_PINCTRL_GROUP_SINGLE(port105, port_range0, 85), - UNIPHIER_PINCTRL_GROUP_SINGLE(port106, port_range0, 86), - UNIPHIER_PINCTRL_GROUP_SINGLE(port107, port_range0, 87), - UNIPHIER_PINCTRL_GROUP_SINGLE(port120, port_range1, 0), - UNIPHIER_PINCTRL_GROUP_SINGLE(port121, port_range1, 1), - UNIPHIER_PINCTRL_GROUP_SINGLE(port122, port_range1, 2), - UNIPHIER_PINCTRL_GROUP_SINGLE(port123, port_range1, 3), - UNIPHIER_PINCTRL_GROUP_SINGLE(port124, port_range1, 4), - UNIPHIER_PINCTRL_GROUP_SINGLE(port125, port_range1, 5), - UNIPHIER_PINCTRL_GROUP_SINGLE(port126, port_range1, 6), - UNIPHIER_PINCTRL_GROUP_SINGLE(port127, port_range1, 7), - UNIPHIER_PINCTRL_GROUP_SINGLE(port130, port_range1, 8), - UNIPHIER_PINCTRL_GROUP_SINGLE(port131, port_range1, 9), - UNIPHIER_PINCTRL_GROUP_SINGLE(port132, port_range1, 10), - UNIPHIER_PINCTRL_GROUP_SINGLE(port133, port_range1, 11), - UNIPHIER_PINCTRL_GROUP_SINGLE(port134, port_range1, 12), - UNIPHIER_PINCTRL_GROUP_SINGLE(port135, port_range1, 13), - UNIPHIER_PINCTRL_GROUP_SINGLE(port136, port_range1, 14), - UNIPHIER_PINCTRL_GROUP_SINGLE(port137, port_range1, 15), - UNIPHIER_PINCTRL_GROUP_SINGLE(port140, port_range1, 16), - UNIPHIER_PINCTRL_GROUP_SINGLE(port141, port_range1, 17), - UNIPHIER_PINCTRL_GROUP_SINGLE(port142, port_range1, 18), - UNIPHIER_PINCTRL_GROUP_SINGLE(port143, port_range1, 19), - UNIPHIER_PINCTRL_GROUP_SINGLE(port144, port_range1, 20), - UNIPHIER_PINCTRL_GROUP_SINGLE(port145, port_range1, 21), - UNIPHIER_PINCTRL_GROUP_SINGLE(port146, port_range1, 22), - UNIPHIER_PINCTRL_GROUP_SINGLE(port147, port_range1, 23), - UNIPHIER_PINCTRL_GROUP_SINGLE(port150, port_range1, 24), - UNIPHIER_PINCTRL_GROUP_SINGLE(port151, port_range1, 25), - UNIPHIER_PINCTRL_GROUP_SINGLE(port152, port_range1, 26), - UNIPHIER_PINCTRL_GROUP_SINGLE(port153, port_range1, 27), - UNIPHIER_PINCTRL_GROUP_SINGLE(port154, port_range1, 28), - UNIPHIER_PINCTRL_GROUP_SINGLE(port155, port_range1, 29), - UNIPHIER_PINCTRL_GROUP_SINGLE(port156, port_range1, 30), - UNIPHIER_PINCTRL_GROUP_SINGLE(port157, port_range1, 31), - UNIPHIER_PINCTRL_GROUP_SINGLE(port160, port_range1, 32), - UNIPHIER_PINCTRL_GROUP_SINGLE(port161, port_range1, 33), - UNIPHIER_PINCTRL_GROUP_SINGLE(port162, port_range1, 34), - UNIPHIER_PINCTRL_GROUP_SINGLE(port163, port_range1, 35), - UNIPHIER_PINCTRL_GROUP_SINGLE(port164, port_range1, 36), - UNIPHIER_PINCTRL_GROUP_SINGLE(port165, port_range1, 37), - UNIPHIER_PINCTRL_GROUP_SINGLE(port166, port_range1, 38), - UNIPHIER_PINCTRL_GROUP_SINGLE(port167, port_range1, 39), - UNIPHIER_PINCTRL_GROUP_SINGLE(port170, port_range1, 40), - UNIPHIER_PINCTRL_GROUP_SINGLE(port171, port_range1, 41), - UNIPHIER_PINCTRL_GROUP_SINGLE(port172, port_range1, 42), - UNIPHIER_PINCTRL_GROUP_SINGLE(port173, port_range1, 43), - UNIPHIER_PINCTRL_GROUP_SINGLE(port174, port_range1, 44), - UNIPHIER_PINCTRL_GROUP_SINGLE(port175, port_range1, 45), - UNIPHIER_PINCTRL_GROUP_SINGLE(port176, port_range1, 46), - UNIPHIER_PINCTRL_GROUP_SINGLE(port177, port_range1, 47), - UNIPHIER_PINCTRL_GROUP_SINGLE(port180, port_range1, 48), - UNIPHIER_PINCTRL_GROUP_SINGLE(port181, port_range1, 49), - UNIPHIER_PINCTRL_GROUP_SINGLE(port182, port_range1, 50), - UNIPHIER_PINCTRL_GROUP_SINGLE(port183, port_range1, 51), - UNIPHIER_PINCTRL_GROUP_SINGLE(port184, port_range1, 52), - UNIPHIER_PINCTRL_GROUP_SINGLE(port185, port_range1, 53), - UNIPHIER_PINCTRL_GROUP_SINGLE(port186, port_range1, 54), - UNIPHIER_PINCTRL_GROUP_SINGLE(port187, port_range1, 55), - UNIPHIER_PINCTRL_GROUP_SINGLE(port190, port_range1, 56), - UNIPHIER_PINCTRL_GROUP_SINGLE(port191, port_range1, 57), - UNIPHIER_PINCTRL_GROUP_SINGLE(port192, port_range1, 58), - UNIPHIER_PINCTRL_GROUP_SINGLE(port193, port_range1, 59), - UNIPHIER_PINCTRL_GROUP_SINGLE(port194, port_range1, 60), - UNIPHIER_PINCTRL_GROUP_SINGLE(port195, port_range1, 61), - UNIPHIER_PINCTRL_GROUP_SINGLE(port196, port_range1, 62), - UNIPHIER_PINCTRL_GROUP_SINGLE(port197, port_range1, 63), - UNIPHIER_PINCTRL_GROUP_SINGLE(port200, port_range1, 64), - UNIPHIER_PINCTRL_GROUP_SINGLE(port201, port_range1, 65), - UNIPHIER_PINCTRL_GROUP_SINGLE(port202, port_range1, 66), - UNIPHIER_PINCTRL_GROUP_SINGLE(port203, port_range1, 67), - UNIPHIER_PINCTRL_GROUP_SINGLE(port204, port_range1, 68), - UNIPHIER_PINCTRL_GROUP_SINGLE(port205, port_range1, 69), - UNIPHIER_PINCTRL_GROUP_SINGLE(port206, port_range1, 70), - UNIPHIER_PINCTRL_GROUP_SINGLE(port207, port_range1, 71), - UNIPHIER_PINCTRL_GROUP_SINGLE(port210, port_range1, 72), - UNIPHIER_PINCTRL_GROUP_SINGLE(port211, port_range1, 73), - UNIPHIER_PINCTRL_GROUP_SINGLE(port212, port_range1, 74), - UNIPHIER_PINCTRL_GROUP_SINGLE(port213, port_range1, 75), - UNIPHIER_PINCTRL_GROUP_SINGLE(port214, port_range1, 76), - UNIPHIER_PINCTRL_GROUP_SINGLE(port215, port_range1, 77), - UNIPHIER_PINCTRL_GROUP_SINGLE(port216, port_range1, 78), - UNIPHIER_PINCTRL_GROUP_SINGLE(port217, port_range1, 79), - UNIPHIER_PINCTRL_GROUP_SINGLE(port220, port_range1, 80), - UNIPHIER_PINCTRL_GROUP_SINGLE(port221, port_range1, 81), - UNIPHIER_PINCTRL_GROUP_SINGLE(port222, port_range1, 82), - UNIPHIER_PINCTRL_GROUP_SINGLE(port223, port_range1, 83), - UNIPHIER_PINCTRL_GROUP_SINGLE(port224, port_range1, 84), - UNIPHIER_PINCTRL_GROUP_SINGLE(port225, port_range1, 85), - UNIPHIER_PINCTRL_GROUP_SINGLE(port226, port_range1, 86), - UNIPHIER_PINCTRL_GROUP_SINGLE(port227, port_range1, 87), - UNIPHIER_PINCTRL_GROUP_SINGLE(port230, port_range1, 88), - UNIPHIER_PINCTRL_GROUP_SINGLE(port231, port_range1, 89), - UNIPHIER_PINCTRL_GROUP_SINGLE(port232, port_range1, 90), - UNIPHIER_PINCTRL_GROUP_SINGLE(port233, port_range1, 91), - UNIPHIER_PINCTRL_GROUP_SINGLE(port234, port_range1, 92), - UNIPHIER_PINCTRL_GROUP_SINGLE(port235, port_range1, 93), - UNIPHIER_PINCTRL_GROUP_SINGLE(port236, port_range1, 94), - UNIPHIER_PINCTRL_GROUP_SINGLE(port237, port_range1, 95), - UNIPHIER_PINCTRL_GROUP_SINGLE(port240, port_range1, 96), - UNIPHIER_PINCTRL_GROUP_SINGLE(port241, port_range1, 97), - UNIPHIER_PINCTRL_GROUP_SINGLE(port242, port_range1, 98), - UNIPHIER_PINCTRL_GROUP_SINGLE(port243, port_range1, 99), - UNIPHIER_PINCTRL_GROUP_SINGLE(port244, port_range1, 100), - UNIPHIER_PINCTRL_GROUP_SINGLE(port245, port_range1, 101), - UNIPHIER_PINCTRL_GROUP_SINGLE(port246, port_range1, 102), - UNIPHIER_PINCTRL_GROUP_SINGLE(port247, port_range1, 103), - UNIPHIER_PINCTRL_GROUP_SINGLE(port250, port_range1, 104), - UNIPHIER_PINCTRL_GROUP_SINGLE(port251, port_range1, 105), - UNIPHIER_PINCTRL_GROUP_SINGLE(port252, port_range1, 106), - UNIPHIER_PINCTRL_GROUP_SINGLE(port253, port_range1, 107), - UNIPHIER_PINCTRL_GROUP_SINGLE(port254, port_range1, 108), - UNIPHIER_PINCTRL_GROUP_SINGLE(port255, port_range1, 109), - UNIPHIER_PINCTRL_GROUP_SINGLE(port256, port_range1, 110), - UNIPHIER_PINCTRL_GROUP_SINGLE(port257, port_range1, 111), - UNIPHIER_PINCTRL_GROUP_SINGLE(port260, port_range1, 112), - UNIPHIER_PINCTRL_GROUP_SINGLE(port261, port_range1, 113), - UNIPHIER_PINCTRL_GROUP_SINGLE(port262, port_range1, 114), - UNIPHIER_PINCTRL_GROUP_SINGLE(port263, port_range1, 115), - UNIPHIER_PINCTRL_GROUP_SINGLE(port264, port_range1, 116), - UNIPHIER_PINCTRL_GROUP_SINGLE(port265, port_range1, 117), - UNIPHIER_PINCTRL_GROUP_SINGLE(port266, port_range1, 118), - UNIPHIER_PINCTRL_GROUP_SINGLE(port267, port_range1, 119), - UNIPHIER_PINCTRL_GROUP_SINGLE(port270, port_range1, 120), - UNIPHIER_PINCTRL_GROUP_SINGLE(port271, port_range1, 121), - UNIPHIER_PINCTRL_GROUP_SINGLE(port272, port_range1, 122), - UNIPHIER_PINCTRL_GROUP_SINGLE(port273, port_range1, 123), - UNIPHIER_PINCTRL_GROUP_SINGLE(port274, port_range1, 124), - UNIPHIER_PINCTRL_GROUP_SINGLE(port275, port_range1, 125), - UNIPHIER_PINCTRL_GROUP_SINGLE(port276, port_range1, 126), - UNIPHIER_PINCTRL_GROUP_SINGLE(port277, port_range1, 127), - UNIPHIER_PINCTRL_GROUP_SINGLE(port280, port_range1, 128), - UNIPHIER_PINCTRL_GROUP_SINGLE(port281, port_range1, 129), - UNIPHIER_PINCTRL_GROUP_SINGLE(port282, port_range1, 130), - UNIPHIER_PINCTRL_GROUP_SINGLE(port283, port_range1, 131), - UNIPHIER_PINCTRL_GROUP_SINGLE(port284, port_range1, 132), - UNIPHIER_PINCTRL_GROUP_SINGLE(port285, port_range1, 133), - UNIPHIER_PINCTRL_GROUP_SINGLE(port286, port_range1, 134), - UNIPHIER_PINCTRL_GROUP_SINGLE(port287, port_range1, 135), - UNIPHIER_PINCTRL_GROUP_SINGLE(xirq0, xirq, 0), - UNIPHIER_PINCTRL_GROUP_SINGLE(xirq1, xirq, 1), - UNIPHIER_PINCTRL_GROUP_SINGLE(xirq2, xirq, 2), - UNIPHIER_PINCTRL_GROUP_SINGLE(xirq3, xirq, 3), - UNIPHIER_PINCTRL_GROUP_SINGLE(xirq4, xirq, 4), - UNIPHIER_PINCTRL_GROUP_SINGLE(xirq5, xirq, 5), - UNIPHIER_PINCTRL_GROUP_SINGLE(xirq6, xirq, 6), - UNIPHIER_PINCTRL_GROUP_SINGLE(xirq7, xirq, 7), - UNIPHIER_PINCTRL_GROUP_SINGLE(xirq8, xirq, 8), - UNIPHIER_PINCTRL_GROUP_SINGLE(xirq9, xirq, 9), - UNIPHIER_PINCTRL_GROUP_SINGLE(xirq10, xirq, 10), - UNIPHIER_PINCTRL_GROUP_SINGLE(xirq11, xirq, 11), - UNIPHIER_PINCTRL_GROUP_SINGLE(xirq12, xirq, 12), - UNIPHIER_PINCTRL_GROUP_SINGLE(xirq13, xirq, 13), - UNIPHIER_PINCTRL_GROUP_SINGLE(xirq14, xirq, 14), - UNIPHIER_PINCTRL_GROUP_SINGLE(xirq15, xirq, 15), - UNIPHIER_PINCTRL_GROUP_SINGLE(xirq16, xirq, 16), - UNIPHIER_PINCTRL_GROUP_SINGLE(xirq17, xirq, 17), - UNIPHIER_PINCTRL_GROUP_SINGLE(xirq18, xirq, 18), - UNIPHIER_PINCTRL_GROUP_SINGLE(xirq19, xirq, 19), - UNIPHIER_PINCTRL_GROUP_SINGLE(xirq20, xirq, 20), - UNIPHIER_PINCTRL_GROUP_SINGLE(xirq21, xirq, 21), - UNIPHIER_PINCTRL_GROUP_SINGLE(xirq22, xirq, 22), - UNIPHIER_PINCTRL_GROUP_SINGLE(xirq23, xirq, 23), + UNIPHIER_PINCTRL_GROUP_GPIO(gpio_range0), + UNIPHIER_PINCTRL_GROUP_GPIO(gpio_range1), }; static const char * const emmc_groups[] = {"emmc", "emmc_dat8"}; @@ -1167,73 +876,6 @@ static const char * const usb0_groups[] = {"usb0"}; static const char * const usb1_groups[] = {"usb1"}; static const char * const usb2_groups[] = {"usb2"}; static const char * const usb3_groups[] = {"usb3"}; -static const char * const port_groups[] = { - "port00", "port01", "port02", "port03", - "port04", "port05", "port06", "port07", - "port10", "port11", "port12", "port13", - "port14", "port15", "port16", "port17", - "port20", "port21", "port22", "port23", - "port24", "port25", "port26", "port27", - "port30", "port31", "port32", "port33", - "port34", "port35", "port36", "port37", - "port40", "port41", "port42", "port43", - "port44", "port45", "port46", "port47", - "port50", "port51", "port52", "port53", - "port54", "port55", "port56", "port57", - "port60", "port61", "port62", "port63", - "port64", "port65", "port66", "port67", - "port70", "port71", "port72", "port73", - "port74", "port75", "port76", "port77", - "port80", "port81", "port82", "port83", - "port84", "port85", "port86", "port87", - "port90", "port91", "port92", "port93", - "port94", "port95", "port96", "port97", - "port100", "port101", "port102", "port103", - "port104", "port105", "port106", "port107", - /* port110-117 missing */ - "port120", "port121", "port122", "port123", - "port124", "port125", "port126", "port127", - "port130", "port131", "port132", "port133", - "port134", "port135", "port136", "port137", - "port140", "port141", "port142", "port143", - "port144", "port145", "port146", "port147", - "port150", "port151", "port152", "port153", - "port154", "port155", "port156", "port157", - "port160", "port161", "port162", "port163", - "port164", "port165", "port166", "port167", - "port170", "port171", "port172", "port173", - "port174", "port175", "port176", "port177", - "port180", "port181", "port182", "port183", - "port184", "port185", "port186", "port187", - "port190", "port191", "port192", "port193", - "port194", "port195", "port196", "port197", - "port200", "port201", "port202", "port203", - "port204", "port205", "port206", "port207", - "port210", "port211", "port212", "port213", - "port214", "port215", "port216", "port217", - "port220", "port221", "port222", "port223", - "port224", "port225", "port226", "port227", - "port230", "port231", "port232", "port233", - "port234", "port235", "port236", "port237", - "port240", "port241", "port242", "port243", - "port244", "port245", "port246", "port247", - "port250", "port251", "port252", "port253", - "port254", "port255", "port256", "port257", - "port260", "port261", "port262", "port263", - "port264", "port265", "port266", "port267", - "port270", "port271", "port272", "port273", - "port274", "port275", "port276", "port277", - "port280", "port281", "port282", "port283", - "port284", "port285", "port286", "port287", -}; -static const char * const xirq_groups[] = { - "xirq0", "xirq1", "xirq2", "xirq3", - "xirq4", "xirq5", "xirq6", "xirq7", - "xirq8", "xirq9", "xirq10", "xirq11", - "xirq12", "xirq13", "xirq14", "xirq15", - "xirq16", "xirq17", "xirq18", "xirq19", - "xirq20", "xirq21", "xirq22", "xirq23", -}; static const struct uniphier_pinmux_function uniphier_pxs2_functions[] = { UNIPHIER_PINMUX_FUNCTION(emmc), @@ -1257,10 +899,18 @@ static const struct uniphier_pinmux_function uniphier_pxs2_functions[] = { UNIPHIER_PINMUX_FUNCTION(usb1), UNIPHIER_PINMUX_FUNCTION(usb2), UNIPHIER_PINMUX_FUNCTION(usb3), - UNIPHIER_PINMUX_FUNCTION(port), - UNIPHIER_PINMUX_FUNCTION(xirq), }; +static int uniphier_pxs2_get_gpio_muxval(unsigned int pin, + unsigned int gpio_offset) +{ + if (gpio_offset >= 120 && gpio_offset <= 143) /* XIRQx */ + /* 15 will do because XIRQ0-23 are aliases of PORT150-177. */ + return 14; + + return 15; +} + static struct uniphier_pinctrl_socdata uniphier_pxs2_pindata = { .pins = uniphier_pxs2_pins, .npins = ARRAY_SIZE(uniphier_pxs2_pins), @@ -1268,6 +918,7 @@ static struct uniphier_pinctrl_socdata uniphier_pxs2_pindata = { .groups_count = ARRAY_SIZE(uniphier_pxs2_groups), .functions = uniphier_pxs2_functions, .functions_count = ARRAY_SIZE(uniphier_pxs2_functions), + .get_gpio_muxval = uniphier_pxs2_get_gpio_muxval, .caps = 0, }; @@ -1286,6 +937,7 @@ static struct platform_driver uniphier_pxs2_pinctrl_driver = { .driver = { .name = "uniphier-pxs2-pinctrl", .of_match_table = uniphier_pxs2_pinctrl_match, + .pm = &uniphier_pinctrl_pm_ops, }, }; builtin_platform_driver(uniphier_pxs2_pinctrl_driver); diff --git a/drivers/pinctrl/uniphier/pinctrl-uniphier-pxs3.c b/drivers/pinctrl/uniphier/pinctrl-uniphier-pxs3.c new file mode 100644 index 000000000000..d9f166f0cc86 --- /dev/null +++ b/drivers/pinctrl/uniphier/pinctrl-uniphier-pxs3.c @@ -0,0 +1,989 @@ +/* + * Copyright (C) 2017 Socionext Inc. + * Author: Masahiro Yamada <yamada.masahiro@socionext.com> + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + */ + +#include <linux/init.h> +#include <linux/kernel.h> +#include <linux/pinctrl/pinctrl.h> +#include <linux/platform_device.h> + +#include "pinctrl-uniphier.h" + +static const struct pinctrl_pin_desc uniphier_pxs3_pins[] = { + UNIPHIER_PINCTRL_PIN(0, "LPST", UNIPHIER_PIN_IECTRL_EXIST, + 0, UNIPHIER_PIN_DRV_3BIT, + 0, UNIPHIER_PIN_PULL_DOWN), + UNIPHIER_PINCTRL_PIN(1, "ED0", UNIPHIER_PIN_IECTRL_EXIST, + 1, UNIPHIER_PIN_DRV_3BIT, + 1, UNIPHIER_PIN_PULL_DOWN), + UNIPHIER_PINCTRL_PIN(2, "ED1", UNIPHIER_PIN_IECTRL_EXIST, + 2, UNIPHIER_PIN_DRV_3BIT, + 2, UNIPHIER_PIN_PULL_DOWN), + UNIPHIER_PINCTRL_PIN(3, "ED2", UNIPHIER_PIN_IECTRL_EXIST, + 3, UNIPHIER_PIN_DRV_3BIT, + 3, UNIPHIER_PIN_PULL_DOWN), + UNIPHIER_PINCTRL_PIN(4, "ED3", UNIPHIER_PIN_IECTRL_EXIST, + 4, UNIPHIER_PIN_DRV_3BIT, + 4, UNIPHIER_PIN_PULL_DOWN), + UNIPHIER_PINCTRL_PIN(5, "ED4", UNIPHIER_PIN_IECTRL_EXIST, + 5, UNIPHIER_PIN_DRV_3BIT, + 5, UNIPHIER_PIN_PULL_DOWN), + UNIPHIER_PINCTRL_PIN(6, "ED5", UNIPHIER_PIN_IECTRL_EXIST, + 6, UNIPHIER_PIN_DRV_3BIT, + 6, UNIPHIER_PIN_PULL_DOWN), + UNIPHIER_PINCTRL_PIN(7, "ED6", UNIPHIER_PIN_IECTRL_EXIST, + 7, UNIPHIER_PIN_DRV_3BIT, + 7, UNIPHIER_PIN_PULL_DOWN), + UNIPHIER_PINCTRL_PIN(8, "ED7", UNIPHIER_PIN_IECTRL_EXIST, + 8, UNIPHIER_PIN_DRV_3BIT, + 8, UNIPHIER_PIN_PULL_DOWN), + UNIPHIER_PINCTRL_PIN(9, "XERWE0", UNIPHIER_PIN_IECTRL_EXIST, + 9, UNIPHIER_PIN_DRV_3BIT, + 9, UNIPHIER_PIN_PULL_DOWN), + UNIPHIER_PINCTRL_PIN(10, "XERWE1", UNIPHIER_PIN_IECTRL_EXIST, + 10, UNIPHIER_PIN_DRV_3BIT, + 10, UNIPHIER_PIN_PULL_DOWN), + UNIPHIER_PINCTRL_PIN(11, "ERXW", UNIPHIER_PIN_IECTRL_EXIST, + 11, UNIPHIER_PIN_DRV_3BIT, + 11, UNIPHIER_PIN_PULL_DOWN), + UNIPHIER_PINCTRL_PIN(12, "ES0", UNIPHIER_PIN_IECTRL_EXIST, + 12, UNIPHIER_PIN_DRV_3BIT, + 12, UNIPHIER_PIN_PULL_DOWN), + UNIPHIER_PINCTRL_PIN(13, "ES1", UNIPHIER_PIN_IECTRL_EXIST, + 13, UNIPHIER_PIN_DRV_3BIT, + 13, UNIPHIER_PIN_PULL_DOWN), + UNIPHIER_PINCTRL_PIN(14, "ES2", UNIPHIER_PIN_IECTRL_EXIST, + 14, UNIPHIER_PIN_DRV_3BIT, + 14, UNIPHIER_PIN_PULL_DOWN), + UNIPHIER_PINCTRL_PIN(15, "XECS1", UNIPHIER_PIN_IECTRL_EXIST, + 15, UNIPHIER_PIN_DRV_3BIT, + 15, UNIPHIER_PIN_PULL_UP), + UNIPHIER_PINCTRL_PIN(16, "XNFWP", UNIPHIER_PIN_IECTRL_EXIST, + 16, UNIPHIER_PIN_DRV_3BIT, + 16, UNIPHIER_PIN_PULL_DOWN), + UNIPHIER_PINCTRL_PIN(17, "XNFCE0", UNIPHIER_PIN_IECTRL_EXIST, + 17, UNIPHIER_PIN_DRV_3BIT, + 17, UNIPHIER_PIN_PULL_UP), + UNIPHIER_PINCTRL_PIN(18, "NFRYBY0", UNIPHIER_PIN_IECTRL_EXIST, + 18, UNIPHIER_PIN_DRV_3BIT, + 18, UNIPHIER_PIN_PULL_UP), + UNIPHIER_PINCTRL_PIN(19, "XNFRE", UNIPHIER_PIN_IECTRL_EXIST, + 19, UNIPHIER_PIN_DRV_3BIT, + 19, UNIPHIER_PIN_PULL_UP), + UNIPHIER_PINCTRL_PIN(20, "XNFWE", UNIPHIER_PIN_IECTRL_EXIST, + 20, UNIPHIER_PIN_DRV_3BIT, + 20, UNIPHIER_PIN_PULL_UP), + UNIPHIER_PINCTRL_PIN(21, "NFALE", UNIPHIER_PIN_IECTRL_EXIST, + 21, UNIPHIER_PIN_DRV_3BIT, + 21, UNIPHIER_PIN_PULL_UP), + UNIPHIER_PINCTRL_PIN(22, "NFCLE", UNIPHIER_PIN_IECTRL_EXIST, + 22, UNIPHIER_PIN_DRV_3BIT, + 22, UNIPHIER_PIN_PULL_UP), + UNIPHIER_PINCTRL_PIN(23, "NFD0", UNIPHIER_PIN_IECTRL_EXIST, + 23, UNIPHIER_PIN_DRV_3BIT, + 23, UNIPHIER_PIN_PULL_UP), + UNIPHIER_PINCTRL_PIN(24, "NFD1", UNIPHIER_PIN_IECTRL_EXIST, + 24, UNIPHIER_PIN_DRV_3BIT, + 24, UNIPHIER_PIN_PULL_UP), + UNIPHIER_PINCTRL_PIN(25, "NFD2", UNIPHIER_PIN_IECTRL_EXIST, + 25, UNIPHIER_PIN_DRV_3BIT, + 25, UNIPHIER_PIN_PULL_UP), + UNIPHIER_PINCTRL_PIN(26, "NFD3", UNIPHIER_PIN_IECTRL_EXIST, + 26, UNIPHIER_PIN_DRV_3BIT, + 26, UNIPHIER_PIN_PULL_UP), + UNIPHIER_PINCTRL_PIN(27, "NFD4", UNIPHIER_PIN_IECTRL_EXIST, + 27, UNIPHIER_PIN_DRV_3BIT, + 27, UNIPHIER_PIN_PULL_UP), + UNIPHIER_PINCTRL_PIN(28, "NFD5", UNIPHIER_PIN_IECTRL_EXIST, + 28, UNIPHIER_PIN_DRV_3BIT, + 28, UNIPHIER_PIN_PULL_UP), + UNIPHIER_PINCTRL_PIN(29, "NFD6", UNIPHIER_PIN_IECTRL_EXIST, + 29, UNIPHIER_PIN_DRV_3BIT, + 29, UNIPHIER_PIN_PULL_UP), + UNIPHIER_PINCTRL_PIN(30, "NFD7", UNIPHIER_PIN_IECTRL_EXIST, + 30, UNIPHIER_PIN_DRV_3BIT, + 30, UNIPHIER_PIN_PULL_UP), + UNIPHIER_PINCTRL_PIN(31, "XERST", UNIPHIER_PIN_IECTRL_EXIST, + 0, UNIPHIER_PIN_DRV_2BIT, + 31, UNIPHIER_PIN_PULL_DOWN), + UNIPHIER_PINCTRL_PIN(32, "MMCCLK", UNIPHIER_PIN_IECTRL_EXIST, + 1, UNIPHIER_PIN_DRV_2BIT, + 32, UNIPHIER_PIN_PULL_DOWN), + UNIPHIER_PINCTRL_PIN(33, "MMCCMD", UNIPHIER_PIN_IECTRL_EXIST, + 2, UNIPHIER_PIN_DRV_2BIT, + 33, UNIPHIER_PIN_PULL_UP), + UNIPHIER_PINCTRL_PIN(34, "MMCDS", UNIPHIER_PIN_IECTRL_EXIST, + 3, UNIPHIER_PIN_DRV_2BIT, + 34, UNIPHIER_PIN_PULL_DOWN), + UNIPHIER_PINCTRL_PIN(35, "MMCDAT0", UNIPHIER_PIN_IECTRL_EXIST, + 4, UNIPHIER_PIN_DRV_2BIT, + 35, UNIPHIER_PIN_PULL_UP), + UNIPHIER_PINCTRL_PIN(36, "MMCDAT1", UNIPHIER_PIN_IECTRL_EXIST, + 5, UNIPHIER_PIN_DRV_2BIT, + 36, UNIPHIER_PIN_PULL_UP), + UNIPHIER_PINCTRL_PIN(37, "MMCDAT2", UNIPHIER_PIN_IECTRL_EXIST, + 6, UNIPHIER_PIN_DRV_2BIT, + 37, UNIPHIER_PIN_PULL_UP), + UNIPHIER_PINCTRL_PIN(38, "MMCDAT3", UNIPHIER_PIN_IECTRL_EXIST, + 7, UNIPHIER_PIN_DRV_2BIT, + 38, UNIPHIER_PIN_PULL_UP), + UNIPHIER_PINCTRL_PIN(39, "MMCDAT4", UNIPHIER_PIN_IECTRL_EXIST, + 8, UNIPHIER_PIN_DRV_2BIT, + 39, UNIPHIER_PIN_PULL_UP), + UNIPHIER_PINCTRL_PIN(40, "MMCDAT5", UNIPHIER_PIN_IECTRL_EXIST, + 9, UNIPHIER_PIN_DRV_2BIT, + 40, UNIPHIER_PIN_PULL_UP), + UNIPHIER_PINCTRL_PIN(41, "MMCDAT6", UNIPHIER_PIN_IECTRL_EXIST, + 10, UNIPHIER_PIN_DRV_2BIT, + 41, UNIPHIER_PIN_PULL_UP), + UNIPHIER_PINCTRL_PIN(42, "MMCDAT7", UNIPHIER_PIN_IECTRL_EXIST, + 11, UNIPHIER_PIN_DRV_2BIT, + 42, UNIPHIER_PIN_PULL_UP), + UNIPHIER_PINCTRL_PIN(43, "SDCLK", UNIPHIER_PIN_IECTRL_EXIST, + 12, UNIPHIER_PIN_DRV_2BIT, + 43, UNIPHIER_PIN_PULL_UP), + UNIPHIER_PINCTRL_PIN(44, "SDCMD", UNIPHIER_PIN_IECTRL_EXIST, + 13, UNIPHIER_PIN_DRV_2BIT, + 44, UNIPHIER_PIN_PULL_UP), + UNIPHIER_PINCTRL_PIN(45, "SDDAT0", UNIPHIER_PIN_IECTRL_EXIST, + 14, UNIPHIER_PIN_DRV_2BIT, + 45, UNIPHIER_PIN_PULL_UP), + UNIPHIER_PINCTRL_PIN(46, "SDDAT1", UNIPHIER_PIN_IECTRL_EXIST, + 15, UNIPHIER_PIN_DRV_2BIT, + 46, UNIPHIER_PIN_PULL_UP), + UNIPHIER_PINCTRL_PIN(47, "SDDAT2", UNIPHIER_PIN_IECTRL_EXIST, + 16, UNIPHIER_PIN_DRV_2BIT, + 47, UNIPHIER_PIN_PULL_UP), + UNIPHIER_PINCTRL_PIN(48, "SDDAT3", UNIPHIER_PIN_IECTRL_EXIST, + 17, UNIPHIER_PIN_DRV_2BIT, + 48, UNIPHIER_PIN_PULL_UP), + UNIPHIER_PINCTRL_PIN(49, "SDCD", UNIPHIER_PIN_IECTRL_EXIST, + 31, UNIPHIER_PIN_DRV_3BIT, + 49, UNIPHIER_PIN_PULL_UP), + UNIPHIER_PINCTRL_PIN(50, "SDWP", UNIPHIER_PIN_IECTRL_EXIST, + 32, UNIPHIER_PIN_DRV_3BIT, + 50, UNIPHIER_PIN_PULL_UP), + UNIPHIER_PINCTRL_PIN(51, "SDVOLC", UNIPHIER_PIN_IECTRL_EXIST, + 33, UNIPHIER_PIN_DRV_3BIT, + 51, UNIPHIER_PIN_PULL_UP), + UNIPHIER_PINCTRL_PIN(52, "MDC0", UNIPHIER_PIN_IECTRL_EXIST, + 18, UNIPHIER_PIN_DRV_2BIT, + 52, UNIPHIER_PIN_PULL_UP), + UNIPHIER_PINCTRL_PIN(53, "MDIO0", UNIPHIER_PIN_IECTRL_EXIST, + 19, UNIPHIER_PIN_DRV_2BIT, + 53, UNIPHIER_PIN_PULL_UP), + UNIPHIER_PINCTRL_PIN(54, "MDIO0_INTL", UNIPHIER_PIN_IECTRL_EXIST, + 20, UNIPHIER_PIN_DRV_2BIT, + 54, UNIPHIER_PIN_PULL_UP), + UNIPHIER_PINCTRL_PIN(55, "PHYRSTL0", UNIPHIER_PIN_IECTRL_EXIST, + 21, UNIPHIER_PIN_DRV_2BIT, + 55, UNIPHIER_PIN_PULL_UP), + UNIPHIER_PINCTRL_PIN(56, "RGMII0_RXCLK", UNIPHIER_PIN_IECTRL_EXIST, + 22, UNIPHIER_PIN_DRV_2BIT, + 56, UNIPHIER_PIN_PULL_UP), + UNIPHIER_PINCTRL_PIN(57, "RGMII0_RXD0", UNIPHIER_PIN_IECTRL_EXIST, + 23, UNIPHIER_PIN_DRV_2BIT, + 57, UNIPHIER_PIN_PULL_UP), + UNIPHIER_PINCTRL_PIN(58, "RGMII0_RXD1", UNIPHIER_PIN_IECTRL_EXIST, + 24, UNIPHIER_PIN_DRV_2BIT, + 58, UNIPHIER_PIN_PULL_UP), + UNIPHIER_PINCTRL_PIN(59, "RGMII0_RXD2", UNIPHIER_PIN_IECTRL_EXIST, + 25, UNIPHIER_PIN_DRV_2BIT, + 59, UNIPHIER_PIN_PULL_UP), + UNIPHIER_PINCTRL_PIN(60, "RGMII0_RXD3", UNIPHIER_PIN_IECTRL_EXIST, + 26, UNIPHIER_PIN_DRV_2BIT, + 60, UNIPHIER_PIN_PULL_UP), + UNIPHIER_PINCTRL_PIN(61, "RGMII0_RXCTL", UNIPHIER_PIN_IECTRL_EXIST, + 27, UNIPHIER_PIN_DRV_2BIT, + 61, UNIPHIER_PIN_PULL_UP), + UNIPHIER_PINCTRL_PIN(62, "RGMII0_TXCLK", UNIPHIER_PIN_IECTRL_EXIST, + 28, UNIPHIER_PIN_DRV_2BIT, + 62, UNIPHIER_PIN_PULL_DOWN), + UNIPHIER_PINCTRL_PIN(63, "RGMII0_TXD0", UNIPHIER_PIN_IECTRL_EXIST, + 29, UNIPHIER_PIN_DRV_2BIT, + 63, UNIPHIER_PIN_PULL_DOWN), + UNIPHIER_PINCTRL_PIN(64, "RGMII0_TXD1", UNIPHIER_PIN_IECTRL_EXIST, + 30, UNIPHIER_PIN_DRV_2BIT, + 64, UNIPHIER_PIN_PULL_DOWN), + UNIPHIER_PINCTRL_PIN(65, "RGMII0_TXD2", UNIPHIER_PIN_IECTRL_EXIST, + 31, UNIPHIER_PIN_DRV_2BIT, + 65, UNIPHIER_PIN_PULL_DOWN), + UNIPHIER_PINCTRL_PIN(66, "RGMII0_TXD3", UNIPHIER_PIN_IECTRL_EXIST, + 32, UNIPHIER_PIN_DRV_2BIT, + 66, UNIPHIER_PIN_PULL_DOWN), + UNIPHIER_PINCTRL_PIN(67, "RGMII0_TXCTL", UNIPHIER_PIN_IECTRL_EXIST, + 33, UNIPHIER_PIN_DRV_2BIT, + 67, UNIPHIER_PIN_PULL_DOWN), + UNIPHIER_PINCTRL_PIN(68, "MDC1", UNIPHIER_PIN_IECTRL_EXIST, + 34, UNIPHIER_PIN_DRV_2BIT, + 68, UNIPHIER_PIN_PULL_UP), + UNIPHIER_PINCTRL_PIN(69, "MDIO1", UNIPHIER_PIN_IECTRL_EXIST, + 35, UNIPHIER_PIN_DRV_2BIT, + 69, UNIPHIER_PIN_PULL_UP), + UNIPHIER_PINCTRL_PIN(70, "MDIO1_INTL", UNIPHIER_PIN_IECTRL_EXIST, + 36, UNIPHIER_PIN_DRV_2BIT, + 70, UNIPHIER_PIN_PULL_UP), + UNIPHIER_PINCTRL_PIN(71, "PHYRSTL1", UNIPHIER_PIN_IECTRL_EXIST, + 37, UNIPHIER_PIN_DRV_2BIT, + 71, UNIPHIER_PIN_PULL_UP), + UNIPHIER_PINCTRL_PIN(72, "RGMII1_RXCLK", UNIPHIER_PIN_IECTRL_EXIST, + 38, UNIPHIER_PIN_DRV_2BIT, + 72, UNIPHIER_PIN_PULL_UP), + UNIPHIER_PINCTRL_PIN(73, "RGMII1_RXD0", UNIPHIER_PIN_IECTRL_EXIST, + 39, UNIPHIER_PIN_DRV_2BIT, + 73, UNIPHIER_PIN_PULL_UP), + UNIPHIER_PINCTRL_PIN(74, "RGMII1_RXD1", UNIPHIER_PIN_IECTRL_EXIST, + 40, UNIPHIER_PIN_DRV_2BIT, + 74, UNIPHIER_PIN_PULL_UP), + UNIPHIER_PINCTRL_PIN(75, "RGMII1_RXD2", UNIPHIER_PIN_IECTRL_EXIST, + 41, UNIPHIER_PIN_DRV_2BIT, + 75, UNIPHIER_PIN_PULL_UP), + UNIPHIER_PINCTRL_PIN(76, "RGMII1_RXD3", UNIPHIER_PIN_IECTRL_EXIST, + 42, UNIPHIER_PIN_DRV_2BIT, + 76, UNIPHIER_PIN_PULL_UP), + UNIPHIER_PINCTRL_PIN(77, "RGMII1_RXCTL", UNIPHIER_PIN_IECTRL_EXIST, + 43, UNIPHIER_PIN_DRV_2BIT, + 77, UNIPHIER_PIN_PULL_UP), + UNIPHIER_PINCTRL_PIN(78, "RGMII1_TXCLK", UNIPHIER_PIN_IECTRL_EXIST, + 44, UNIPHIER_PIN_DRV_2BIT, + 78, UNIPHIER_PIN_PULL_DOWN), + UNIPHIER_PINCTRL_PIN(79, "RGMII1_TXD0", UNIPHIER_PIN_IECTRL_EXIST, + 45, UNIPHIER_PIN_DRV_2BIT, + 79, UNIPHIER_PIN_PULL_DOWN), + UNIPHIER_PINCTRL_PIN(80, "RGMII1_TXD1", UNIPHIER_PIN_IECTRL_EXIST, + 46, UNIPHIER_PIN_DRV_2BIT, + 80, UNIPHIER_PIN_PULL_DOWN), + UNIPHIER_PINCTRL_PIN(81, "RGMII1_TXD2", UNIPHIER_PIN_IECTRL_EXIST, + 47, UNIPHIER_PIN_DRV_2BIT, + 81, UNIPHIER_PIN_PULL_DOWN), + UNIPHIER_PINCTRL_PIN(82, "RGMII1_TXD3", UNIPHIER_PIN_IECTRL_EXIST, + 48, UNIPHIER_PIN_DRV_2BIT, + 82, UNIPHIER_PIN_PULL_DOWN), + UNIPHIER_PINCTRL_PIN(83, "RGMII1_TXCTL", UNIPHIER_PIN_IECTRL_EXIST, + 49, UNIPHIER_PIN_DRV_2BIT, + 83, UNIPHIER_PIN_PULL_DOWN), + UNIPHIER_PINCTRL_PIN(84, "USB0VBUS", UNIPHIER_PIN_IECTRL_EXIST, + 34, UNIPHIER_PIN_DRV_3BIT, + 84, UNIPHIER_PIN_PULL_DOWN), + UNIPHIER_PINCTRL_PIN(85, "USB0OD", UNIPHIER_PIN_IECTRL_EXIST, + 35, UNIPHIER_PIN_DRV_3BIT, + 85, UNIPHIER_PIN_PULL_UP), + UNIPHIER_PINCTRL_PIN(86, "USB1VBUS", UNIPHIER_PIN_IECTRL_EXIST, + 36, UNIPHIER_PIN_DRV_3BIT, + 86, UNIPHIER_PIN_PULL_DOWN), + UNIPHIER_PINCTRL_PIN(87, "USB1OD", UNIPHIER_PIN_IECTRL_EXIST, + 37, UNIPHIER_PIN_DRV_3BIT, + 87, UNIPHIER_PIN_PULL_UP), + UNIPHIER_PINCTRL_PIN(88, "USB2VBUS", UNIPHIER_PIN_IECTRL_EXIST, + 38, UNIPHIER_PIN_DRV_3BIT, + 88, UNIPHIER_PIN_PULL_DOWN), + UNIPHIER_PINCTRL_PIN(89, "USB2OD", UNIPHIER_PIN_IECTRL_EXIST, + 39, UNIPHIER_PIN_DRV_3BIT, + 89, UNIPHIER_PIN_PULL_UP), + UNIPHIER_PINCTRL_PIN(90, "USB3VBUS", UNIPHIER_PIN_IECTRL_EXIST, + 40, UNIPHIER_PIN_DRV_3BIT, + 90, UNIPHIER_PIN_PULL_DOWN), + UNIPHIER_PINCTRL_PIN(91, "USB3OD", UNIPHIER_PIN_IECTRL_EXIST, + 41, UNIPHIER_PIN_DRV_3BIT, + 91, UNIPHIER_PIN_PULL_UP), + UNIPHIER_PINCTRL_PIN(92, "TXD0", UNIPHIER_PIN_IECTRL_EXIST, + 42, UNIPHIER_PIN_DRV_3BIT, + 92, UNIPHIER_PIN_PULL_UP), + UNIPHIER_PINCTRL_PIN(93, "RXD0", UNIPHIER_PIN_IECTRL_EXIST, + 43, UNIPHIER_PIN_DRV_3BIT, + 93, UNIPHIER_PIN_PULL_UP), + UNIPHIER_PINCTRL_PIN(94, "TXD1", UNIPHIER_PIN_IECTRL_EXIST, + 44, UNIPHIER_PIN_DRV_3BIT, + 94, UNIPHIER_PIN_PULL_UP), + UNIPHIER_PINCTRL_PIN(95, "RXD1", UNIPHIER_PIN_IECTRL_EXIST, + 45, UNIPHIER_PIN_DRV_3BIT, + 95, UNIPHIER_PIN_PULL_UP), + UNIPHIER_PINCTRL_PIN(96, "TXD2", UNIPHIER_PIN_IECTRL_EXIST, + 46, UNIPHIER_PIN_DRV_3BIT, + 96, UNIPHIER_PIN_PULL_UP), + UNIPHIER_PINCTRL_PIN(97, "RXD2", UNIPHIER_PIN_IECTRL_EXIST, + 47, UNIPHIER_PIN_DRV_3BIT, + 97, UNIPHIER_PIN_PULL_UP), + UNIPHIER_PINCTRL_PIN(98, "TXD3", UNIPHIER_PIN_IECTRL_EXIST, + 48, UNIPHIER_PIN_DRV_3BIT, + 98, UNIPHIER_PIN_PULL_UP), + UNIPHIER_PINCTRL_PIN(99, "RXD3", UNIPHIER_PIN_IECTRL_EXIST, + 49, UNIPHIER_PIN_DRV_3BIT, + 99, UNIPHIER_PIN_PULL_UP), + UNIPHIER_PINCTRL_PIN(100, "SPISYNC0", UNIPHIER_PIN_IECTRL_EXIST, + 50, UNIPHIER_PIN_DRV_3BIT, + 100, UNIPHIER_PIN_PULL_DOWN), + UNIPHIER_PINCTRL_PIN(101, "SPISCLK0", UNIPHIER_PIN_IECTRL_EXIST, + 51, UNIPHIER_PIN_DRV_3BIT, + 101, UNIPHIER_PIN_PULL_DOWN), + UNIPHIER_PINCTRL_PIN(102, "SPITXD0", UNIPHIER_PIN_IECTRL_EXIST, + 52, UNIPHIER_PIN_DRV_3BIT, + 102, UNIPHIER_PIN_PULL_DOWN), + UNIPHIER_PINCTRL_PIN(103, "SPIRXD0", UNIPHIER_PIN_IECTRL_EXIST, + 53, UNIPHIER_PIN_DRV_3BIT, + 103, UNIPHIER_PIN_PULL_DOWN), + UNIPHIER_PINCTRL_PIN(104, "SDA0", UNIPHIER_PIN_IECTRL_EXIST, + -1, UNIPHIER_PIN_DRV_FIXED4, + -1, UNIPHIER_PIN_PULL_NONE), + UNIPHIER_PINCTRL_PIN(105, "SCL0", UNIPHIER_PIN_IECTRL_EXIST, + -1, UNIPHIER_PIN_DRV_FIXED4, + -1, UNIPHIER_PIN_PULL_NONE), + UNIPHIER_PINCTRL_PIN(106, "SDA1", UNIPHIER_PIN_IECTRL_EXIST, + -1, UNIPHIER_PIN_DRV_FIXED4, + -1, UNIPHIER_PIN_PULL_NONE), + UNIPHIER_PINCTRL_PIN(107, "SCL1", UNIPHIER_PIN_IECTRL_EXIST, + -1, UNIPHIER_PIN_DRV_FIXED4, + -1, UNIPHIER_PIN_PULL_NONE), + UNIPHIER_PINCTRL_PIN(108, "SDA2", UNIPHIER_PIN_IECTRL_EXIST, + -1, UNIPHIER_PIN_DRV_FIXED4, + -1, UNIPHIER_PIN_PULL_NONE), + UNIPHIER_PINCTRL_PIN(109, "SCL2", UNIPHIER_PIN_IECTRL_EXIST, + -1, UNIPHIER_PIN_DRV_FIXED4, + -1, UNIPHIER_PIN_PULL_NONE), + UNIPHIER_PINCTRL_PIN(110, "SDA3", UNIPHIER_PIN_IECTRL_EXIST, + -1, UNIPHIER_PIN_DRV_FIXED4, + -1, UNIPHIER_PIN_PULL_NONE), + UNIPHIER_PINCTRL_PIN(111, "SCL3", UNIPHIER_PIN_IECTRL_EXIST, + -1, UNIPHIER_PIN_DRV_FIXED4, + -1, UNIPHIER_PIN_PULL_NONE), + UNIPHIER_PINCTRL_PIN(112, "SMTRST0", UNIPHIER_PIN_IECTRL_EXIST, + 54, UNIPHIER_PIN_DRV_3BIT, + 112, UNIPHIER_PIN_PULL_DOWN), + UNIPHIER_PINCTRL_PIN(113, "SMTCMD0", UNIPHIER_PIN_IECTRL_EXIST, + 55, UNIPHIER_PIN_DRV_3BIT, + 113, UNIPHIER_PIN_PULL_DOWN), + UNIPHIER_PINCTRL_PIN(114, "SMTD0", UNIPHIER_PIN_IECTRL_EXIST, + 56, UNIPHIER_PIN_DRV_3BIT, + 114, UNIPHIER_PIN_PULL_DOWN), + UNIPHIER_PINCTRL_PIN(115, "SMTSEL0", UNIPHIER_PIN_IECTRL_EXIST, + 57, UNIPHIER_PIN_DRV_3BIT, + 115, UNIPHIER_PIN_PULL_DOWN), + UNIPHIER_PINCTRL_PIN(116, "SMTCLK0CG", UNIPHIER_PIN_IECTRL_EXIST, + 58, UNIPHIER_PIN_DRV_3BIT, + 116, UNIPHIER_PIN_PULL_DOWN), + UNIPHIER_PINCTRL_PIN(117, "SMTDET0", UNIPHIER_PIN_IECTRL_EXIST, + 59, UNIPHIER_PIN_DRV_3BIT, + 117, UNIPHIER_PIN_PULL_DOWN), + UNIPHIER_PINCTRL_PIN(118, "SMTRST1", UNIPHIER_PIN_IECTRL_EXIST, + 60, UNIPHIER_PIN_DRV_3BIT, + 118, UNIPHIER_PIN_PULL_DOWN), + UNIPHIER_PINCTRL_PIN(119, "SMTCMD1", UNIPHIER_PIN_IECTRL_EXIST, + 61, UNIPHIER_PIN_DRV_3BIT, + 119, UNIPHIER_PIN_PULL_DOWN), + UNIPHIER_PINCTRL_PIN(120, "SMTD1", UNIPHIER_PIN_IECTRL_EXIST, + 62, UNIPHIER_PIN_DRV_3BIT, + 120, UNIPHIER_PIN_PULL_DOWN), + UNIPHIER_PINCTRL_PIN(121, "SMTSEL1", UNIPHIER_PIN_IECTRL_EXIST, + 63, UNIPHIER_PIN_DRV_3BIT, + 121, UNIPHIER_PIN_PULL_DOWN), + UNIPHIER_PINCTRL_PIN(122, "SMTCLK1CG", UNIPHIER_PIN_IECTRL_EXIST, + 64, UNIPHIER_PIN_DRV_3BIT, + 122, UNIPHIER_PIN_PULL_DOWN), + UNIPHIER_PINCTRL_PIN(123, "SMTDET1", UNIPHIER_PIN_IECTRL_EXIST, + 65, UNIPHIER_PIN_DRV_3BIT, + 123, UNIPHIER_PIN_PULL_DOWN), + UNIPHIER_PINCTRL_PIN(124, "SMTRST2", UNIPHIER_PIN_IECTRL_EXIST, + 66, UNIPHIER_PIN_DRV_3BIT, + 124, UNIPHIER_PIN_PULL_DOWN), + UNIPHIER_PINCTRL_PIN(125, "SMTCMD2", UNIPHIER_PIN_IECTRL_EXIST, + 67, UNIPHIER_PIN_DRV_3BIT, + 125, UNIPHIER_PIN_PULL_DOWN), + UNIPHIER_PINCTRL_PIN(126, "SMTD2", UNIPHIER_PIN_IECTRL_EXIST, + 68, UNIPHIER_PIN_DRV_3BIT, + 126, UNIPHIER_PIN_PULL_DOWN), + UNIPHIER_PINCTRL_PIN(127, "SMTSEL2", UNIPHIER_PIN_IECTRL_EXIST, + 69, UNIPHIER_PIN_DRV_3BIT, + 127, UNIPHIER_PIN_PULL_DOWN), + UNIPHIER_PINCTRL_PIN(128, "SMTCLK2CG", UNIPHIER_PIN_IECTRL_EXIST, + 70, UNIPHIER_PIN_DRV_3BIT, + 128, UNIPHIER_PIN_PULL_DOWN), + UNIPHIER_PINCTRL_PIN(129, "SMTDET2", UNIPHIER_PIN_IECTRL_EXIST, + 71, UNIPHIER_PIN_DRV_3BIT, + 129, UNIPHIER_PIN_PULL_DOWN), + UNIPHIER_PINCTRL_PIN(130, "CH0CLK", UNIPHIER_PIN_IECTRL_EXIST, + 72, UNIPHIER_PIN_DRV_3BIT, + 130, UNIPHIER_PIN_PULL_DOWN), + UNIPHIER_PINCTRL_PIN(131, "CH0PSYNC", UNIPHIER_PIN_IECTRL_EXIST, + 73, UNIPHIER_PIN_DRV_3BIT, + 131, UNIPHIER_PIN_PULL_DOWN), + UNIPHIER_PINCTRL_PIN(132, "CH0VAL", UNIPHIER_PIN_IECTRL_EXIST, + 74, UNIPHIER_PIN_DRV_3BIT, + 132, UNIPHIER_PIN_PULL_DOWN), + UNIPHIER_PINCTRL_PIN(133, "CH0DATA", UNIPHIER_PIN_IECTRL_EXIST, + 75, UNIPHIER_PIN_DRV_3BIT, + 133, UNIPHIER_PIN_PULL_DOWN), + UNIPHIER_PINCTRL_PIN(134, "CH1CLK", UNIPHIER_PIN_IECTRL_EXIST, + 76, UNIPHIER_PIN_DRV_3BIT, + 134, UNIPHIER_PIN_PULL_DOWN), + UNIPHIER_PINCTRL_PIN(135, "CH1PSYNC", UNIPHIER_PIN_IECTRL_EXIST, + 77, UNIPHIER_PIN_DRV_3BIT, + 135, UNIPHIER_PIN_PULL_DOWN), + UNIPHIER_PINCTRL_PIN(136, "CH1VAL", UNIPHIER_PIN_IECTRL_EXIST, + 78, UNIPHIER_PIN_DRV_3BIT, + 136, UNIPHIER_PIN_PULL_DOWN), + UNIPHIER_PINCTRL_PIN(137, "CH1DATA", UNIPHIER_PIN_IECTRL_EXIST, + 79, UNIPHIER_PIN_DRV_3BIT, + 137, UNIPHIER_PIN_PULL_DOWN), + UNIPHIER_PINCTRL_PIN(138, "CH2CLK", UNIPHIER_PIN_IECTRL_EXIST, + 80, UNIPHIER_PIN_DRV_3BIT, + 138, UNIPHIER_PIN_PULL_DOWN), + UNIPHIER_PINCTRL_PIN(139, "CH2PSYNC", UNIPHIER_PIN_IECTRL_EXIST, + 81, UNIPHIER_PIN_DRV_3BIT, + 139, UNIPHIER_PIN_PULL_DOWN), + UNIPHIER_PINCTRL_PIN(140, "CH2VAL", UNIPHIER_PIN_IECTRL_EXIST, + 82, UNIPHIER_PIN_DRV_3BIT, + 140, UNIPHIER_PIN_PULL_DOWN), + UNIPHIER_PINCTRL_PIN(141, "CH2DATA", UNIPHIER_PIN_IECTRL_EXIST, + 83, UNIPHIER_PIN_DRV_3BIT, + 141, UNIPHIER_PIN_PULL_DOWN), + UNIPHIER_PINCTRL_PIN(142, "HS0BCLKIN", UNIPHIER_PIN_IECTRL_EXIST, + 84, UNIPHIER_PIN_DRV_3BIT, + 142, UNIPHIER_PIN_PULL_DOWN), + UNIPHIER_PINCTRL_PIN(143, "HS0SYNCIN", UNIPHIER_PIN_IECTRL_EXIST, + 85, UNIPHIER_PIN_DRV_3BIT, + 143, UNIPHIER_PIN_PULL_DOWN), + UNIPHIER_PINCTRL_PIN(144, "HS0VALIN", UNIPHIER_PIN_IECTRL_EXIST, + 86, UNIPHIER_PIN_DRV_3BIT, + 144, UNIPHIER_PIN_PULL_DOWN), + UNIPHIER_PINCTRL_PIN(145, "HS0DIN0", UNIPHIER_PIN_IECTRL_EXIST, + 87, UNIPHIER_PIN_DRV_3BIT, + 145, UNIPHIER_PIN_PULL_DOWN), + UNIPHIER_PINCTRL_PIN(146, "HS0DIN1", UNIPHIER_PIN_IECTRL_EXIST, + 88, UNIPHIER_PIN_DRV_3BIT, + 146, UNIPHIER_PIN_PULL_DOWN), + UNIPHIER_PINCTRL_PIN(147, "HS0DIN2", UNIPHIER_PIN_IECTRL_EXIST, + 89, UNIPHIER_PIN_DRV_3BIT, + 147, UNIPHIER_PIN_PULL_DOWN), + UNIPHIER_PINCTRL_PIN(148, "HS0DIN3", UNIPHIER_PIN_IECTRL_EXIST, + 90, UNIPHIER_PIN_DRV_3BIT, + 148, UNIPHIER_PIN_PULL_DOWN), + UNIPHIER_PINCTRL_PIN(149, "HS0DIN4", UNIPHIER_PIN_IECTRL_EXIST, + 91, UNIPHIER_PIN_DRV_3BIT, + 149, UNIPHIER_PIN_PULL_DOWN), + UNIPHIER_PINCTRL_PIN(150, "HS0DIN5", UNIPHIER_PIN_IECTRL_EXIST, + 92, UNIPHIER_PIN_DRV_3BIT, + 150, UNIPHIER_PIN_PULL_DOWN), + UNIPHIER_PINCTRL_PIN(151, "HS0DIN6", UNIPHIER_PIN_IECTRL_EXIST, + 93, UNIPHIER_PIN_DRV_3BIT, + 151, UNIPHIER_PIN_PULL_DOWN), + UNIPHIER_PINCTRL_PIN(152, "HS0DIN7", UNIPHIER_PIN_IECTRL_EXIST, + 94, UNIPHIER_PIN_DRV_3BIT, + 152, UNIPHIER_PIN_PULL_DOWN), + UNIPHIER_PINCTRL_PIN(153, "HS1BCLKIN", UNIPHIER_PIN_IECTRL_EXIST, + 95, UNIPHIER_PIN_DRV_3BIT, + 153, UNIPHIER_PIN_PULL_DOWN), + UNIPHIER_PINCTRL_PIN(154, "HS1SYNCIN", UNIPHIER_PIN_IECTRL_EXIST, + 96, UNIPHIER_PIN_DRV_3BIT, + 154, UNIPHIER_PIN_PULL_DOWN), + UNIPHIER_PINCTRL_PIN(155, "HS1VALIN", UNIPHIER_PIN_IECTRL_EXIST, + 97, UNIPHIER_PIN_DRV_3BIT, + 155, UNIPHIER_PIN_PULL_DOWN), + UNIPHIER_PINCTRL_PIN(156, "HS1DIN0", UNIPHIER_PIN_IECTRL_EXIST, + 98, UNIPHIER_PIN_DRV_3BIT, + 156, UNIPHIER_PIN_PULL_DOWN), + UNIPHIER_PINCTRL_PIN(157, "HS1DIN1", UNIPHIER_PIN_IECTRL_EXIST, + 99, UNIPHIER_PIN_DRV_3BIT, + 157, UNIPHIER_PIN_PULL_DOWN), + UNIPHIER_PINCTRL_PIN(158, "HS1DIN2", UNIPHIER_PIN_IECTRL_EXIST, + 100, UNIPHIER_PIN_DRV_3BIT, + 158, UNIPHIER_PIN_PULL_DOWN), + UNIPHIER_PINCTRL_PIN(159, "HS1DIN3", UNIPHIER_PIN_IECTRL_EXIST, + 101, UNIPHIER_PIN_DRV_3BIT, + 159, UNIPHIER_PIN_PULL_DOWN), + UNIPHIER_PINCTRL_PIN(160, "HS1DIN4", UNIPHIER_PIN_IECTRL_EXIST, + 102, UNIPHIER_PIN_DRV_3BIT, + 160, UNIPHIER_PIN_PULL_DOWN), + UNIPHIER_PINCTRL_PIN(161, "HS1DIN5", UNIPHIER_PIN_IECTRL_EXIST, + 103, UNIPHIER_PIN_DRV_3BIT, + 161, UNIPHIER_PIN_PULL_DOWN), + UNIPHIER_PINCTRL_PIN(162, "HS1DIN6", UNIPHIER_PIN_IECTRL_EXIST, + 104, UNIPHIER_PIN_DRV_3BIT, + 162, UNIPHIER_PIN_PULL_DOWN), + UNIPHIER_PINCTRL_PIN(163, "HS1DIN7", UNIPHIER_PIN_IECTRL_EXIST, + 105, UNIPHIER_PIN_DRV_3BIT, + 163, UNIPHIER_PIN_PULL_DOWN), + UNIPHIER_PINCTRL_PIN(164, "LINKCLK", UNIPHIER_PIN_IECTRL_EXIST, + 106, UNIPHIER_PIN_DRV_3BIT, + 164, UNIPHIER_PIN_PULL_DOWN), + UNIPHIER_PINCTRL_PIN(165, "LINKREQ", UNIPHIER_PIN_IECTRL_EXIST, + 107, UNIPHIER_PIN_DRV_3BIT, + 165, UNIPHIER_PIN_PULL_DOWN), + UNIPHIER_PINCTRL_PIN(166, "LINKCTL0", UNIPHIER_PIN_IECTRL_EXIST, + 108, UNIPHIER_PIN_DRV_3BIT, + 166, UNIPHIER_PIN_PULL_DOWN), + UNIPHIER_PINCTRL_PIN(167, "LINKCTL1", UNIPHIER_PIN_IECTRL_EXIST, + 109, UNIPHIER_PIN_DRV_3BIT, + 167, UNIPHIER_PIN_PULL_DOWN), + UNIPHIER_PINCTRL_PIN(168, "LINKDT0", UNIPHIER_PIN_IECTRL_EXIST, + 110, UNIPHIER_PIN_DRV_3BIT, + 168, UNIPHIER_PIN_PULL_DOWN), + UNIPHIER_PINCTRL_PIN(169, "LINKDT1", UNIPHIER_PIN_IECTRL_EXIST, + 111, UNIPHIER_PIN_DRV_3BIT, + 169, UNIPHIER_PIN_PULL_DOWN), + UNIPHIER_PINCTRL_PIN(170, "LINKDT2", UNIPHIER_PIN_IECTRL_EXIST, + 112, UNIPHIER_PIN_DRV_3BIT, + 170, UNIPHIER_PIN_PULL_DOWN), + UNIPHIER_PINCTRL_PIN(171, "LINKDT3", UNIPHIER_PIN_IECTRL_EXIST, + 113, UNIPHIER_PIN_DRV_3BIT, + 171, UNIPHIER_PIN_PULL_DOWN), + UNIPHIER_PINCTRL_PIN(172, "LINKDT4", UNIPHIER_PIN_IECTRL_EXIST, + 114, UNIPHIER_PIN_DRV_3BIT, + 172, UNIPHIER_PIN_PULL_DOWN), + UNIPHIER_PINCTRL_PIN(173, "LINKDT5", UNIPHIER_PIN_IECTRL_EXIST, + 115, UNIPHIER_PIN_DRV_3BIT, + 173, UNIPHIER_PIN_PULL_DOWN), + UNIPHIER_PINCTRL_PIN(174, "LINKDT6", UNIPHIER_PIN_IECTRL_EXIST, + 116, UNIPHIER_PIN_DRV_3BIT, + 174, UNIPHIER_PIN_PULL_DOWN), + UNIPHIER_PINCTRL_PIN(175, "LINKDT7", UNIPHIER_PIN_IECTRL_EXIST, + 117, UNIPHIER_PIN_DRV_3BIT, + 175, UNIPHIER_PIN_PULL_DOWN), + UNIPHIER_PINCTRL_PIN(176, "H0RXDDCSDA", UNIPHIER_PIN_IECTRL_EXIST, + -1, UNIPHIER_PIN_DRV_FIXED4, + -1, UNIPHIER_PIN_PULL_NONE), + UNIPHIER_PINCTRL_PIN(177, "H0RXDDCSCL", UNIPHIER_PIN_IECTRL_EXIST, + -1, UNIPHIER_PIN_DRV_FIXED4, + -1, UNIPHIER_PIN_PULL_NONE), + UNIPHIER_PINCTRL_PIN(178, "H0RXHPDO", UNIPHIER_PIN_IECTRL_EXIST, + -1, UNIPHIER_PIN_DRV_FIXED4, + -1, UNIPHIER_PIN_PULL_NONE), + UNIPHIER_PINCTRL_PIN(179, "H0RX5VDETI", UNIPHIER_PIN_IECTRL_EXIST, + -1, UNIPHIER_PIN_DRV_FIXED4, + -1, UNIPHIER_PIN_PULL_NONE), + UNIPHIER_PINCTRL_PIN(180, "H0TXDDCSDA", UNIPHIER_PIN_IECTRL_EXIST, + -1, UNIPHIER_PIN_DRV_FIXED4, + -1, UNIPHIER_PIN_PULL_NONE), + UNIPHIER_PINCTRL_PIN(181, "H0TXDDCSCL", UNIPHIER_PIN_IECTRL_EXIST, + -1, UNIPHIER_PIN_DRV_FIXED4, + -1, UNIPHIER_PIN_PULL_NONE), + UNIPHIER_PINCTRL_PIN(182, "H0TXHPDI", UNIPHIER_PIN_IECTRL_EXIST, + -1, UNIPHIER_PIN_DRV_FIXED4, + -1, UNIPHIER_PIN_PULL_NONE), + UNIPHIER_PINCTRL_PIN(183, "H1TXDDCSDA", UNIPHIER_PIN_IECTRL_EXIST, + -1, UNIPHIER_PIN_DRV_FIXED4, + -1, UNIPHIER_PIN_PULL_NONE), + UNIPHIER_PINCTRL_PIN(184, "H1TXDDCSCL", UNIPHIER_PIN_IECTRL_EXIST, + -1, UNIPHIER_PIN_DRV_FIXED4, + -1, UNIPHIER_PIN_PULL_NONE), + UNIPHIER_PINCTRL_PIN(185, "H1TXHPDI", UNIPHIER_PIN_IECTRL_EXIST, + -1, UNIPHIER_PIN_DRV_FIXED4, + -1, UNIPHIER_PIN_PULL_NONE), + UNIPHIER_PINCTRL_PIN(186, "AI1ADCCK", UNIPHIER_PIN_IECTRL_EXIST, + 118, UNIPHIER_PIN_DRV_3BIT, + 186, UNIPHIER_PIN_PULL_DOWN), + UNIPHIER_PINCTRL_PIN(187, "AI1BCK", UNIPHIER_PIN_IECTRL_EXIST, + 119, UNIPHIER_PIN_DRV_3BIT, + 187, UNIPHIER_PIN_PULL_DOWN), + UNIPHIER_PINCTRL_PIN(188, "AI1LRCK", UNIPHIER_PIN_IECTRL_EXIST, + 120, UNIPHIER_PIN_DRV_3BIT, + 188, UNIPHIER_PIN_PULL_DOWN), + UNIPHIER_PINCTRL_PIN(189, "AI1D0", UNIPHIER_PIN_IECTRL_EXIST, + 121, UNIPHIER_PIN_DRV_3BIT, + 189, UNIPHIER_PIN_PULL_DOWN), + UNIPHIER_PINCTRL_PIN(190, "AO1IEC", UNIPHIER_PIN_IECTRL_EXIST, + 122, UNIPHIER_PIN_DRV_3BIT, + 190, UNIPHIER_PIN_PULL_DOWN), + UNIPHIER_PINCTRL_PIN(191, "AO2IEC", UNIPHIER_PIN_IECTRL_EXIST, + 123, UNIPHIER_PIN_DRV_3BIT, + 191, UNIPHIER_PIN_PULL_DOWN), + UNIPHIER_PINCTRL_PIN(192, "AO2DACCK", UNIPHIER_PIN_IECTRL_EXIST, + 124, UNIPHIER_PIN_DRV_3BIT, + 192, UNIPHIER_PIN_PULL_DOWN), + UNIPHIER_PINCTRL_PIN(193, "AO2BCK", UNIPHIER_PIN_IECTRL_EXIST, + 125, UNIPHIER_PIN_DRV_3BIT, + 193, UNIPHIER_PIN_PULL_DOWN), + UNIPHIER_PINCTRL_PIN(194, "AO2LRCK", UNIPHIER_PIN_IECTRL_EXIST, + 126, UNIPHIER_PIN_DRV_3BIT, + 194, UNIPHIER_PIN_PULL_DOWN), + UNIPHIER_PINCTRL_PIN(195, "AO2D0", UNIPHIER_PIN_IECTRL_EXIST, + 127, UNIPHIER_PIN_DRV_3BIT, + 195, UNIPHIER_PIN_PULL_DOWN), + UNIPHIER_PINCTRL_PIN(196, "AO2D1", UNIPHIER_PIN_IECTRL_EXIST, + 128, UNIPHIER_PIN_DRV_3BIT, + 196, UNIPHIER_PIN_PULL_DOWN), + UNIPHIER_PINCTRL_PIN(197, "AO2D2", UNIPHIER_PIN_IECTRL_EXIST, + 129, UNIPHIER_PIN_DRV_3BIT, + 197, UNIPHIER_PIN_PULL_DOWN), + UNIPHIER_PINCTRL_PIN(198, "AO2D3", UNIPHIER_PIN_IECTRL_EXIST, + 130, UNIPHIER_PIN_DRV_3BIT, + 198, UNIPHIER_PIN_PULL_DOWN), + UNIPHIER_PINCTRL_PIN(199, "AO3DACCK", UNIPHIER_PIN_IECTRL_EXIST, + 131, UNIPHIER_PIN_DRV_3BIT, + 199, UNIPHIER_PIN_PULL_DOWN), + UNIPHIER_PINCTRL_PIN(200, "AO3BCK", UNIPHIER_PIN_IECTRL_EXIST, + 132, UNIPHIER_PIN_DRV_3BIT, + 200, UNIPHIER_PIN_PULL_DOWN), + UNIPHIER_PINCTRL_PIN(201, "AO3LRCK", UNIPHIER_PIN_IECTRL_EXIST, + 133, UNIPHIER_PIN_DRV_3BIT, + 201, UNIPHIER_PIN_PULL_DOWN), + UNIPHIER_PINCTRL_PIN(202, "AO3D0", UNIPHIER_PIN_IECTRL_EXIST, + 134, UNIPHIER_PIN_DRV_3BIT, + 202, UNIPHIER_PIN_PULL_DOWN), + UNIPHIER_PINCTRL_PIN(203, "VI1CLK", UNIPHIER_PIN_IECTRL_EXIST, + 135, UNIPHIER_PIN_DRV_3BIT, + 203, UNIPHIER_PIN_PULL_DOWN), + UNIPHIER_PINCTRL_PIN(204, "VI1G2", UNIPHIER_PIN_IECTRL_EXIST, + 136, UNIPHIER_PIN_DRV_3BIT, + 204, UNIPHIER_PIN_PULL_DOWN), + UNIPHIER_PINCTRL_PIN(205, "VI1G3", UNIPHIER_PIN_IECTRL_EXIST, + 137, UNIPHIER_PIN_DRV_3BIT, + 205, UNIPHIER_PIN_PULL_DOWN), + UNIPHIER_PINCTRL_PIN(206, "VI1G4", UNIPHIER_PIN_IECTRL_EXIST, + 138, UNIPHIER_PIN_DRV_3BIT, + 206, UNIPHIER_PIN_PULL_DOWN), + UNIPHIER_PINCTRL_PIN(207, "VI1G5", UNIPHIER_PIN_IECTRL_EXIST, + 139, UNIPHIER_PIN_DRV_3BIT, + 207, UNIPHIER_PIN_PULL_DOWN), + UNIPHIER_PINCTRL_PIN(208, "VI1G6", UNIPHIER_PIN_IECTRL_EXIST, + 140, UNIPHIER_PIN_DRV_3BIT, + 208, UNIPHIER_PIN_PULL_DOWN), + UNIPHIER_PINCTRL_PIN(209, "VI1G7", UNIPHIER_PIN_IECTRL_EXIST, + 141, UNIPHIER_PIN_DRV_3BIT, + 209, UNIPHIER_PIN_PULL_DOWN), + UNIPHIER_PINCTRL_PIN(210, "VI1G8", UNIPHIER_PIN_IECTRL_EXIST, + 142, UNIPHIER_PIN_DRV_3BIT, + 210, UNIPHIER_PIN_PULL_DOWN), + UNIPHIER_PINCTRL_PIN(211, "VI1G9", UNIPHIER_PIN_IECTRL_EXIST, + 143, UNIPHIER_PIN_DRV_3BIT, + 211, UNIPHIER_PIN_PULL_DOWN), + UNIPHIER_PINCTRL_PIN(212, "FANPWM", UNIPHIER_PIN_IECTRL_EXIST, + 144, UNIPHIER_PIN_DRV_3BIT, + 212, UNIPHIER_PIN_PULL_DOWN), + UNIPHIER_PINCTRL_PIN(213, "CK27EXO", UNIPHIER_PIN_IECTRL_EXIST, + 145, UNIPHIER_PIN_DRV_3BIT, + 213, UNIPHIER_PIN_PULL_DOWN), + UNIPHIER_PINCTRL_PIN(214, "CK27AO", UNIPHIER_PIN_IECTRL_EXIST, + 146, UNIPHIER_PIN_DRV_3BIT, + 214, UNIPHIER_PIN_PULL_DOWN), + UNIPHIER_PINCTRL_PIN(215, "CK27EXI", UNIPHIER_PIN_IECTRL_EXIST, + 147, UNIPHIER_PIN_DRV_3BIT, + 215, UNIPHIER_PIN_PULL_DOWN), + UNIPHIER_PINCTRL_PIN(216, "VEXCKA", UNIPHIER_PIN_IECTRL_EXIST, + 148, UNIPHIER_PIN_DRV_3BIT, + 216, UNIPHIER_PIN_PULL_DOWN), + UNIPHIER_PINCTRL_PIN(217, "AEXCKA", UNIPHIER_PIN_IECTRL_EXIST, + 149, UNIPHIER_PIN_DRV_3BIT, + 217, UNIPHIER_PIN_PULL_DOWN), + UNIPHIER_PINCTRL_PIN(218, "ASEL", UNIPHIER_PIN_IECTRL_EXIST, + 150, UNIPHIER_PIN_DRV_3BIT, + 218, UNIPHIER_PIN_PULL_DOWN), + UNIPHIER_PINCTRL_PIN(219, "XIRQ0", UNIPHIER_PIN_IECTRL_EXIST, + 151, UNIPHIER_PIN_DRV_3BIT, + 219, UNIPHIER_PIN_PULL_DOWN), + UNIPHIER_PINCTRL_PIN(220, "XIRQ1", UNIPHIER_PIN_IECTRL_EXIST, + 152, UNIPHIER_PIN_DRV_3BIT, + 220, UNIPHIER_PIN_PULL_DOWN), + UNIPHIER_PINCTRL_PIN(221, "XIRQ2", UNIPHIER_PIN_IECTRL_EXIST, + 153, UNIPHIER_PIN_DRV_3BIT, + 221, UNIPHIER_PIN_PULL_DOWN), + UNIPHIER_PINCTRL_PIN(222, "XIRQ3", UNIPHIER_PIN_IECTRL_EXIST, + 154, UNIPHIER_PIN_DRV_3BIT, + 222, UNIPHIER_PIN_PULL_DOWN), + UNIPHIER_PINCTRL_PIN(223, "XIRQ4", UNIPHIER_PIN_IECTRL_EXIST, + 155, UNIPHIER_PIN_DRV_3BIT, + 223, UNIPHIER_PIN_PULL_DOWN), + UNIPHIER_PINCTRL_PIN(224, "XIRQ5", UNIPHIER_PIN_IECTRL_EXIST, + 156, UNIPHIER_PIN_DRV_3BIT, + 224, UNIPHIER_PIN_PULL_DOWN), + UNIPHIER_PINCTRL_PIN(225, "XIRQ6", UNIPHIER_PIN_IECTRL_EXIST, + 157, UNIPHIER_PIN_DRV_3BIT, + 225, UNIPHIER_PIN_PULL_DOWN), + UNIPHIER_PINCTRL_PIN(226, "XIRQ7", UNIPHIER_PIN_IECTRL_EXIST, + 158, UNIPHIER_PIN_DRV_3BIT, + 226, UNIPHIER_PIN_PULL_DOWN), + UNIPHIER_PINCTRL_PIN(227, "XIRQ8", UNIPHIER_PIN_IECTRL_EXIST, + 159, UNIPHIER_PIN_DRV_3BIT, + 227, UNIPHIER_PIN_PULL_DOWN), + UNIPHIER_PINCTRL_PIN(228, "XIRQ9", UNIPHIER_PIN_IECTRL_EXIST, + 160, UNIPHIER_PIN_DRV_3BIT, + 228, UNIPHIER_PIN_PULL_DOWN), + UNIPHIER_PINCTRL_PIN(229, "XIRQ10", UNIPHIER_PIN_IECTRL_EXIST, + 161, UNIPHIER_PIN_DRV_3BIT, + 229, UNIPHIER_PIN_PULL_DOWN), + UNIPHIER_PINCTRL_PIN(230, "XIRQ11", UNIPHIER_PIN_IECTRL_EXIST, + 162, UNIPHIER_PIN_DRV_3BIT, + 230, UNIPHIER_PIN_PULL_DOWN), + UNIPHIER_PINCTRL_PIN(231, "XIRQ12", UNIPHIER_PIN_IECTRL_EXIST, + 163, UNIPHIER_PIN_DRV_3BIT, + 231, UNIPHIER_PIN_PULL_DOWN), + UNIPHIER_PINCTRL_PIN(232, "XIRQ13", UNIPHIER_PIN_IECTRL_EXIST, + 164, UNIPHIER_PIN_DRV_3BIT, + 232, UNIPHIER_PIN_PULL_DOWN), + UNIPHIER_PINCTRL_PIN(233, "XIRQ14", UNIPHIER_PIN_IECTRL_EXIST, + 165, UNIPHIER_PIN_DRV_3BIT, + 233, UNIPHIER_PIN_PULL_DOWN), + UNIPHIER_PINCTRL_PIN(234, "XIRQ15", UNIPHIER_PIN_IECTRL_EXIST, + 166, UNIPHIER_PIN_DRV_3BIT, + 234, UNIPHIER_PIN_PULL_DOWN), + UNIPHIER_PINCTRL_PIN(235, "PORT00", UNIPHIER_PIN_IECTRL_EXIST, + 167, UNIPHIER_PIN_DRV_3BIT, + 235, UNIPHIER_PIN_PULL_DOWN), + UNIPHIER_PINCTRL_PIN(236, "PORT01", UNIPHIER_PIN_IECTRL_EXIST, + 168, UNIPHIER_PIN_DRV_3BIT, + 236, UNIPHIER_PIN_PULL_DOWN), + UNIPHIER_PINCTRL_PIN(237, "PORT02", UNIPHIER_PIN_IECTRL_EXIST, + 169, UNIPHIER_PIN_DRV_3BIT, + 237, UNIPHIER_PIN_PULL_DOWN), + UNIPHIER_PINCTRL_PIN(238, "PORT03", UNIPHIER_PIN_IECTRL_EXIST, + 170, UNIPHIER_PIN_DRV_3BIT, + 238, UNIPHIER_PIN_PULL_DOWN), + UNIPHIER_PINCTRL_PIN(239, "PORT04", UNIPHIER_PIN_IECTRL_EXIST, + 171, UNIPHIER_PIN_DRV_3BIT, + 239, UNIPHIER_PIN_PULL_DOWN), + UNIPHIER_PINCTRL_PIN(240, "PORT05", UNIPHIER_PIN_IECTRL_EXIST, + 172, UNIPHIER_PIN_DRV_3BIT, + 240, UNIPHIER_PIN_PULL_DOWN), + UNIPHIER_PINCTRL_PIN(241, "PORT06", UNIPHIER_PIN_IECTRL_EXIST, + 173, UNIPHIER_PIN_DRV_3BIT, + 241, UNIPHIER_PIN_PULL_DOWN), + UNIPHIER_PINCTRL_PIN(242, "PORT07", UNIPHIER_PIN_IECTRL_EXIST, + 174, UNIPHIER_PIN_DRV_3BIT, + 242, UNIPHIER_PIN_PULL_DOWN), + UNIPHIER_PINCTRL_PIN(243, "PORT10", UNIPHIER_PIN_IECTRL_EXIST, + 175, UNIPHIER_PIN_DRV_3BIT, + 243, UNIPHIER_PIN_PULL_DOWN), + UNIPHIER_PINCTRL_PIN(244, "PORT11", UNIPHIER_PIN_IECTRL_EXIST, + 176, UNIPHIER_PIN_DRV_3BIT, + 244, UNIPHIER_PIN_PULL_DOWN), + UNIPHIER_PINCTRL_PIN(245, "PORT12", UNIPHIER_PIN_IECTRL_EXIST, + 177, UNIPHIER_PIN_DRV_3BIT, + 245, UNIPHIER_PIN_PULL_DOWN), + UNIPHIER_PINCTRL_PIN(246, "PORT13", UNIPHIER_PIN_IECTRL_EXIST, + 178, UNIPHIER_PIN_DRV_3BIT, + 246, UNIPHIER_PIN_PULL_DOWN), + UNIPHIER_PINCTRL_PIN(247, "PORT14", UNIPHIER_PIN_IECTRL_EXIST, + 179, UNIPHIER_PIN_DRV_3BIT, + 247, UNIPHIER_PIN_PULL_DOWN), + UNIPHIER_PINCTRL_PIN(248, "PORT15", UNIPHIER_PIN_IECTRL_EXIST, + 180, UNIPHIER_PIN_DRV_3BIT, + 248, UNIPHIER_PIN_PULL_DOWN), + UNIPHIER_PINCTRL_PIN(249, "PORT16", UNIPHIER_PIN_IECTRL_EXIST, + 181, UNIPHIER_PIN_DRV_3BIT, + 249, UNIPHIER_PIN_PULL_DOWN), + UNIPHIER_PINCTRL_PIN(250, "PORT17", UNIPHIER_PIN_IECTRL_EXIST, + 182, UNIPHIER_PIN_DRV_3BIT, + 250, UNIPHIER_PIN_PULL_DOWN), +}; + +static const unsigned int emmc_pins[] = {31, 32, 33, 34, 35, 36, 37, 38}; +static const int emmc_muxvals[] = {0, 0, 0, 0, 0, 0, 0, 0}; +static const unsigned int emmc_dat8_pins[] = {39, 40, 41, 42}; +static const int emmc_dat8_muxvals[] = {0, 0, 0, 0}; +static const unsigned int ether_rgmii_pins[] = {52, 53, 54, 55, 56, 57, 58, 59, + 60, 61, 62, 63, 64, 65, 66, 67}; +static const int ether_rgmii_muxvals[] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0}; +static const unsigned int ether_rmii_pins[] = {52, 53, 54, 55, 56, 57, 58, 59, + 61, 63, 64, 67}; +static const int ether_rmii_muxvals[] = {0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1}; +static const unsigned int ether1_rgmii_pins[] = {68, 69, 70, 71, 72, 73, 74, + 75, 76, 77, 78, 79, 80, 81, + 82, 83}; +static const int ether1_rgmii_muxvals[] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0}; +static const unsigned int ether1_rmii_pins[] = {68, 69, 70, 71, 72, 73, 74, 75, + 77, 79, 80, 83}; +static const int ether1_rmii_muxvals[] = {0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1}; +static const unsigned int i2c0_pins[] = {104, 105}; +static const int i2c0_muxvals[] = {0, 0}; +static const unsigned int i2c1_pins[] = {106, 107}; +static const int i2c1_muxvals[] = {0, 0}; +static const unsigned int i2c2_pins[] = {108, 109}; +static const int i2c2_muxvals[] = {0, 0}; +static const unsigned int i2c3_pins[] = {110, 111}; +static const int i2c3_muxvals[] = {0, 0}; +static const unsigned int nand_pins[] = {16, 17, 18, 19, 20, 21, 22, 23, 24, 25, + 26, 27, 28, 29, 30}; +static const int nand_muxvals[] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; +static const unsigned int sd_pins[] = {43, 44, 45, 46, 47, 48, 49, 50, 51}; +static const int sd_muxvals[] = {0, 0, 0, 0, 0, 0, 0, 0, 0}; +static const unsigned int system_bus_pins[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, + 11, 12, 13, 14}; +static const int system_bus_muxvals[] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0}; +static const unsigned int system_bus_cs1_pins[] = {15}; +static const int system_bus_cs1_muxvals[] = {0}; +static const unsigned int uart0_pins[] = {92, 93}; +static const int uart0_muxvals[] = {0, 0}; +static const unsigned int uart1_pins[] = {94, 95}; +static const int uart1_muxvals[] = {0, 0}; +static const unsigned int uart2_pins[] = {96, 97}; +static const int uart2_muxvals[] = {0, 0}; +static const unsigned int uart3_pins[] = {98, 99}; +static const int uart3_muxvals[] = {0, 0}; +static const unsigned int usb0_pins[] = {84, 85}; +static const int usb0_muxvals[] = {0, 0}; +static const unsigned int usb1_pins[] = {86, 87}; +static const int usb1_muxvals[] = {0, 0}; +static const unsigned int usb2_pins[] = {88, 89}; +static const int usb2_muxvals[] = {0, 0}; +static const unsigned int usb3_pins[] = {90, 91}; +static const int usb3_muxvals[] = {0, 0}; +static const unsigned int gpio_range0_pins[] = { + 235, 236, 237, 238, 239, 240, 241, 242, /* PORT0x */ + 243, 244, 245, 246, 247, 248, 249, 250, /* PORT1x */ + 0, 1, 2, 3, 4, 5, 6, 7, /* PORT2x */ + 8, 9, 10, 11, 12, 13, 14, 15, /* PORT3x */ + 16, 17, 18, 19, 20, 21, 22, 23, /* PORT4x */ + 24, 25, 26, 27, 28, 29, 30, 31, /* PORT5x */ + 43, 44, 45, 46, 47, 48, 49, 50, /* PORT6x */ + 51, 52, 53, 54, 55, 56, 57, 58, /* PORT7x */ + 59, 60, 61, 62, 63, 64, 65, 66, /* PORT8x */ + 67, 68, 69, 70, 71, 72, 73, 74, /* PORT9x */ + 75, 76, 77, 78, 79, 80, 81, 82, /* PORT10x */ +}; +static const unsigned int gpio_range1_pins[] = { + 83, 84, 85, 86, 87, 88, 89, 90, /* PORT13x */ + 91, 92, 93, 94, 95, 96, 97, 98, /* PORT14x */ + 219, 220, 221, 222, 223, 224, 225, 226, /* XIRQ0-7 */ + 227, 228, 229, 230, 231, 232, 233, 234, /* XIRQ8-15 */ + 215, 216, 217, 218, 164, 165, 166, 167, /* XIRQ16-23 */ + 104, 105, 106, 107, 108, 109, 110, 111, /* PORT18x */ + 176, 177, 178, 179, 180, 181, 182, 183, /* PORT19x */ + 184, 185, /* PORT200-201 */ +}; +static const unsigned int gpio_range2_pins[] = { + 99, 100, 101, 102, 103, 112, 113, 114, /* PORT21x */ + 115, 116, 117, 118, 119, 120, 121, 122, /* PORT22x */ + 123, 124, 125, 126, 127, 128, 129, 130, /* PORT23x */ + 131, 132, 133, 134, 135, 136, 137, 138, /* PORT24x */ + 139, 140, 141, 142, 143, 144, 145, 146, /* PORT25x */ + 147, 148, 149, 150, 151, 152, 153, 154, /* PORT26x */ + 155, 156, 157, 158, 159, 160, 161, 162, /* PORT27x */ + 163, 164, 165, 166, 167, 168, 169, 170, /* PORT28x */ + 171, 172, 173, 174, 175, 186, 187, 188, /* PORT29x */ + 189, 190, 191, 192, 193, 194, 195, 196, /* PORT30x */ + 197, 198, 199, 200, 201, 202, 203, 204, /* PORT31x */ + 205, 206, 207, 208, 209, 210, 211, 212, /* PORT32x */ + 213, 214, 215, 216, 217, 218, 219, 220, /* PORT33x */ + 221, 222, 223, 224, 225, 226, 227, 228, /* PORT34x */ + 229, 230, 231, 232, 233, 234, /* PORT350-355 */ +}; + +static const struct uniphier_pinctrl_group uniphier_pxs3_groups[] = { + UNIPHIER_PINCTRL_GROUP(emmc), + UNIPHIER_PINCTRL_GROUP(emmc_dat8), + UNIPHIER_PINCTRL_GROUP(ether_rgmii), + UNIPHIER_PINCTRL_GROUP(ether_rmii), + UNIPHIER_PINCTRL_GROUP(ether1_rgmii), + UNIPHIER_PINCTRL_GROUP(ether1_rmii), + UNIPHIER_PINCTRL_GROUP(i2c0), + UNIPHIER_PINCTRL_GROUP(i2c1), + UNIPHIER_PINCTRL_GROUP(i2c2), + UNIPHIER_PINCTRL_GROUP(i2c3), + UNIPHIER_PINCTRL_GROUP(nand), + UNIPHIER_PINCTRL_GROUP(sd), + UNIPHIER_PINCTRL_GROUP(system_bus), + UNIPHIER_PINCTRL_GROUP(system_bus_cs1), + UNIPHIER_PINCTRL_GROUP(uart0), + UNIPHIER_PINCTRL_GROUP(uart1), + UNIPHIER_PINCTRL_GROUP(uart2), + UNIPHIER_PINCTRL_GROUP(uart3), + UNIPHIER_PINCTRL_GROUP(usb0), + UNIPHIER_PINCTRL_GROUP(usb1), + UNIPHIER_PINCTRL_GROUP(usb2), + UNIPHIER_PINCTRL_GROUP(usb3), + UNIPHIER_PINCTRL_GROUP_GPIO(gpio_range0), + UNIPHIER_PINCTRL_GROUP_GPIO(gpio_range1), + UNIPHIER_PINCTRL_GROUP_GPIO(gpio_range2), +}; + +static const char * const emmc_groups[] = {"emmc", "emmc_dat8"}; +static const char * const ether_rgmii_groups[] = {"ether_rgmii"}; +static const char * const ether_rmii_groups[] = {"ether_rmii"}; +static const char * const ether1_rgmii_groups[] = {"ether1_rgmii"}; +static const char * const ether1_rmii_groups[] = {"ether1_rmii"}; +static const char * const i2c0_groups[] = {"i2c0"}; +static const char * const i2c1_groups[] = {"i2c1"}; +static const char * const i2c2_groups[] = {"i2c2"}; +static const char * const i2c3_groups[] = {"i2c3"}; +static const char * const nand_groups[] = {"nand"}; +static const char * const sd_groups[] = {"sd"}; +static const char * const system_bus_groups[] = {"system_bus", + "system_bus_cs1"}; +static const char * const uart0_groups[] = {"uart0"}; +static const char * const uart1_groups[] = {"uart1"}; +static const char * const uart2_groups[] = {"uart2"}; +static const char * const uart3_groups[] = {"uart3"}; +static const char * const usb0_groups[] = {"usb0"}; +static const char * const usb1_groups[] = {"usb1"}; +static const char * const usb2_groups[] = {"usb2"}; +static const char * const usb3_groups[] = {"usb3"}; + +static const struct uniphier_pinmux_function uniphier_pxs3_functions[] = { + UNIPHIER_PINMUX_FUNCTION(emmc), + UNIPHIER_PINMUX_FUNCTION(ether_rgmii), + UNIPHIER_PINMUX_FUNCTION(ether_rmii), + UNIPHIER_PINMUX_FUNCTION(ether1_rgmii), + UNIPHIER_PINMUX_FUNCTION(ether1_rmii), + UNIPHIER_PINMUX_FUNCTION(i2c0), + UNIPHIER_PINMUX_FUNCTION(i2c1), + UNIPHIER_PINMUX_FUNCTION(i2c2), + UNIPHIER_PINMUX_FUNCTION(i2c3), + UNIPHIER_PINMUX_FUNCTION(nand), + UNIPHIER_PINMUX_FUNCTION(sd), + UNIPHIER_PINMUX_FUNCTION(system_bus), + UNIPHIER_PINMUX_FUNCTION(uart0), + UNIPHIER_PINMUX_FUNCTION(uart1), + UNIPHIER_PINMUX_FUNCTION(uart2), + UNIPHIER_PINMUX_FUNCTION(uart3), + UNIPHIER_PINMUX_FUNCTION(usb0), + UNIPHIER_PINMUX_FUNCTION(usb1), + UNIPHIER_PINMUX_FUNCTION(usb2), + UNIPHIER_PINMUX_FUNCTION(usb3), +}; + +static int uniphier_pxs3_get_gpio_muxval(unsigned int pin, + unsigned int gpio_offset) +{ + if (gpio_offset >= 120 && gpio_offset <= 143) { /* XIRQx */ + if (pin >= 219 && pin <= 234) + return 0; + + return 14; + } + + return 15; +} + +static struct uniphier_pinctrl_socdata uniphier_pxs3_pindata = { + .pins = uniphier_pxs3_pins, + .npins = ARRAY_SIZE(uniphier_pxs3_pins), + .groups = uniphier_pxs3_groups, + .groups_count = ARRAY_SIZE(uniphier_pxs3_groups), + .functions = uniphier_pxs3_functions, + .functions_count = ARRAY_SIZE(uniphier_pxs3_functions), + .get_gpio_muxval = uniphier_pxs3_get_gpio_muxval, + .caps = UNIPHIER_PINCTRL_CAPS_PERPIN_IECTRL, +}; + +static int uniphier_pxs3_pinctrl_probe(struct platform_device *pdev) +{ + return uniphier_pinctrl_probe(pdev, &uniphier_pxs3_pindata); +} + +static const struct of_device_id uniphier_pxs3_pinctrl_match[] = { + { .compatible = "socionext,uniphier-pxs3-pinctrl" }, + { /* sentinel */ } +}; + +static struct platform_driver uniphier_pxs3_pinctrl_driver = { + .probe = uniphier_pxs3_pinctrl_probe, + .driver = { + .name = "uniphier-pxs3-pinctrl", + .of_match_table = uniphier_pxs3_pinctrl_match, + .pm = &uniphier_pinctrl_pm_ops, + }, +}; +builtin_platform_driver(uniphier_pxs3_pinctrl_driver); diff --git a/drivers/pinctrl/uniphier/pinctrl-uniphier-sld8.c b/drivers/pinctrl/uniphier/pinctrl-uniphier-sld8.c index 37deaf615dcf..1af430d701be 100644 --- a/drivers/pinctrl/uniphier/pinctrl-uniphier-sld8.c +++ b/drivers/pinctrl/uniphier/pinctrl-uniphier-sld8.c @@ -532,67 +532,28 @@ static const unsigned usb1_pins[] = {43, 44}; static const int usb1_muxvals[] = {0, 0}; static const unsigned usb2_pins[] = {114, 115}; static const int usb2_muxvals[] = {1, 1}; -static const unsigned port_range0_pins[] = { - 0, 1, 2, 3, 4, 5, 6, 7, /* PORT0x */ - 8, 9, 10, 11, 12, 13, 14, 15, /* PORT1x */ - 32, 33, 34, 35, 36, 37, 38, 39, /* PORT2x */ - 59, 60, 61, 62, 63, 64, 65, 66, /* PORT3x */ - 95, 96, 97, 98, 99, 100, 101, 57, /* PORT4x */ - 70, 71, 72, 73, 74, 75, 76, 77, /* PORT5x */ - 81, 83, 84, 85, 86, 89, 90, 91, /* PORT6x */ - 118, 119, 120, 121, 122, 53, 54, 55, /* PORT7x */ - 41, 42, 43, 44, 79, 80, 18, 19, /* PORT8x */ - 110, 111, 112, 113, 114, 115, 16, 17, /* PORT9x */ - 40, 67, 68, 69, 78, 92, 93, 94, /* PORT10x */ - 48, 49, 46, 45, 123, 124, 125, 126, /* PORT11x */ - 47, 127, 20, 56, 22, /* PORT120-124 */ +static const unsigned int gpio_range0_pins[] = { + 0, 1, 2, 3, 4, 5, 6, 7, /* PORT0x */ + 8, 9, 10, 11, 12, 13, 14, 15, /* PORT1x */ + 32, 33, 34, 35, 36, 37, 38, 39, /* PORT2x */ + 59, 60, 61, 62, 63, 64, 65, 66, /* PORT3x */ + 95, 96, 97, 98, 99, 100, 101, 57, /* PORT4x */ + 70, 71, 72, 73, 74, 75, 76, 77, /* PORT5x */ + 81, 83, 84, 85, 86, 89, 90, 91, /* PORT6x */ + 118, 119, 120, 121, 122, 53, 54, 55, /* PORT7x */ + 41, 42, 43, 44, 79, 80, 18, 19, /* PORT8x */ + 110, 111, 112, 113, 114, 115, 16, 17, /* PORT9x */ + 40, 67, 68, 69, 78, 92, 93, 94, /* PORT10x */ + 48, 49, 46, 45, 123, 124, 125, 126, /* PORT11x */ + 47, 127, 20, 56, 22, /* PORT120-124 */ }; -static const int port_range0_muxvals[] = { - 15, 15, 15, 15, 15, 15, 15, 15, /* PORT0x */ - 15, 15, 15, 15, 15, 15, 15, 15, /* PORT1x */ - 15, 15, 15, 15, 15, 15, 15, 15, /* PORT2x */ - 15, 15, 15, 15, 15, 15, 15, 15, /* PORT3x */ - 15, 15, 15, 15, 15, 15, 15, 15, /* PORT4x */ - 15, 15, 15, 15, 15, 15, 15, 15, /* PORT5x */ - 15, 15, 15, 15, 15, 15, 15, 15, /* PORT6x */ - 15, 15, 15, 15, 15, 15, 15, 15, /* PORT7x */ - 15, 15, 15, 15, 15, 15, 15, 15, /* PORT8x */ - 15, 15, 15, 15, 15, 15, 15, 15, /* PORT9x */ - 15, 15, 15, 15, 15, 15, 15, 15, /* PORT10x */ - 15, 15, 15, 15, 15, 15, 15, 15, /* PORT11x */ - 15, 15, 15, 15, 15, /* PORT120-124 */ +static const unsigned int gpio_range1_pins[] = { + 116, 117, /* PORT130-131 */ }; -static const unsigned port_range1_pins[] = { - 116, 117, /* PORT130-131 */ -}; -static const int port_range1_muxvals[] = { - 15, 15, /* PORT130-131 */ -}; -static const unsigned port_range2_pins[] = { - 102, 103, 104, 105, 106, 107, 108, 109, /* PORT14x */ -}; -static const int port_range2_muxvals[] = { - 15, 15, 15, 15, 15, 15, 15, 15, /* PORT14x */ -}; -static const unsigned port_range3_pins[] = { - 23, /* PORT166 */ -}; -static const int port_range3_muxvals[] = { - 15, /* PORT166 */ -}; -static const unsigned xirq_range0_pins[] = { - 128, 129, 130, 131, 132, 133, 134, 135, /* XIRQ0-7 */ - 82, 87, 88, 50, 51, /* XIRQ8-12 */ -}; -static const int xirq_range0_muxvals[] = { - 0, 0, 0, 0, 0, 0, 0, 0, /* XIRQ0-7 */ - 14, 14, 14, 14, 14, /* XIRQ8-12 */ -}; -static const unsigned xirq_range1_pins[] = { - 52, 58, /* XIRQ14-15 */ -}; -static const int xirq_range1_muxvals[] = { - 14, 14, /* XIRQ14-15 */ +static const unsigned int gpio_range2_pins[] = { + 102, 103, 104, 105, 106, 107, 108, 109, /* PORT14x */ + 128, 129, 130, 131, 132, 133, 134, 135, /* XIRQ0-7 */ + 82, 87, 88, 50, 51, 23, 52, 58, /* XIRQ8-12, PORT165, XIRQ14-15 */ }; static const struct uniphier_pinctrl_group uniphier_sld8_groups[] = { @@ -620,139 +581,9 @@ static const struct uniphier_pinctrl_group uniphier_sld8_groups[] = { UNIPHIER_PINCTRL_GROUP(usb0), UNIPHIER_PINCTRL_GROUP(usb1), UNIPHIER_PINCTRL_GROUP(usb2), - UNIPHIER_PINCTRL_GROUP_GPIO_RANGE_PORT(port_range0), - UNIPHIER_PINCTRL_GROUP_GPIO_RANGE_PORT(port_range1), - UNIPHIER_PINCTRL_GROUP_GPIO_RANGE_PORT(port_range2), - UNIPHIER_PINCTRL_GROUP_GPIO_RANGE_PORT(port_range3), - UNIPHIER_PINCTRL_GROUP_GPIO_RANGE_IRQ(xirq_range0), - UNIPHIER_PINCTRL_GROUP_GPIO_RANGE_IRQ(xirq_range1), - UNIPHIER_PINCTRL_GROUP_SINGLE(port00, port_range0, 0), - UNIPHIER_PINCTRL_GROUP_SINGLE(port01, port_range0, 1), - UNIPHIER_PINCTRL_GROUP_SINGLE(port02, port_range0, 2), - UNIPHIER_PINCTRL_GROUP_SINGLE(port03, port_range0, 3), - UNIPHIER_PINCTRL_GROUP_SINGLE(port04, port_range0, 4), - UNIPHIER_PINCTRL_GROUP_SINGLE(port05, port_range0, 5), - UNIPHIER_PINCTRL_GROUP_SINGLE(port06, port_range0, 6), - UNIPHIER_PINCTRL_GROUP_SINGLE(port07, port_range0, 7), - UNIPHIER_PINCTRL_GROUP_SINGLE(port10, port_range0, 8), - UNIPHIER_PINCTRL_GROUP_SINGLE(port11, port_range0, 9), - UNIPHIER_PINCTRL_GROUP_SINGLE(port12, port_range0, 10), - UNIPHIER_PINCTRL_GROUP_SINGLE(port13, port_range0, 11), - UNIPHIER_PINCTRL_GROUP_SINGLE(port14, port_range0, 12), - UNIPHIER_PINCTRL_GROUP_SINGLE(port15, port_range0, 13), - UNIPHIER_PINCTRL_GROUP_SINGLE(port16, port_range0, 14), - UNIPHIER_PINCTRL_GROUP_SINGLE(port17, port_range0, 15), - UNIPHIER_PINCTRL_GROUP_SINGLE(port20, port_range0, 16), - UNIPHIER_PINCTRL_GROUP_SINGLE(port21, port_range0, 17), - UNIPHIER_PINCTRL_GROUP_SINGLE(port22, port_range0, 18), - UNIPHIER_PINCTRL_GROUP_SINGLE(port23, port_range0, 19), - UNIPHIER_PINCTRL_GROUP_SINGLE(port24, port_range0, 20), - UNIPHIER_PINCTRL_GROUP_SINGLE(port25, port_range0, 21), - UNIPHIER_PINCTRL_GROUP_SINGLE(port26, port_range0, 22), - UNIPHIER_PINCTRL_GROUP_SINGLE(port27, port_range0, 23), - UNIPHIER_PINCTRL_GROUP_SINGLE(port30, port_range0, 24), - UNIPHIER_PINCTRL_GROUP_SINGLE(port31, port_range0, 25), - UNIPHIER_PINCTRL_GROUP_SINGLE(port32, port_range0, 26), - UNIPHIER_PINCTRL_GROUP_SINGLE(port33, port_range0, 27), - UNIPHIER_PINCTRL_GROUP_SINGLE(port34, port_range0, 28), - UNIPHIER_PINCTRL_GROUP_SINGLE(port35, port_range0, 29), - UNIPHIER_PINCTRL_GROUP_SINGLE(port36, port_range0, 30), - UNIPHIER_PINCTRL_GROUP_SINGLE(port37, port_range0, 31), - UNIPHIER_PINCTRL_GROUP_SINGLE(port40, port_range0, 32), - UNIPHIER_PINCTRL_GROUP_SINGLE(port41, port_range0, 33), - UNIPHIER_PINCTRL_GROUP_SINGLE(port42, port_range0, 34), - UNIPHIER_PINCTRL_GROUP_SINGLE(port43, port_range0, 35), - UNIPHIER_PINCTRL_GROUP_SINGLE(port44, port_range0, 36), - UNIPHIER_PINCTRL_GROUP_SINGLE(port45, port_range0, 37), - UNIPHIER_PINCTRL_GROUP_SINGLE(port46, port_range0, 38), - UNIPHIER_PINCTRL_GROUP_SINGLE(port47, port_range0, 39), - UNIPHIER_PINCTRL_GROUP_SINGLE(port50, port_range0, 40), - UNIPHIER_PINCTRL_GROUP_SINGLE(port51, port_range0, 41), - UNIPHIER_PINCTRL_GROUP_SINGLE(port52, port_range0, 42), - UNIPHIER_PINCTRL_GROUP_SINGLE(port53, port_range0, 43), - UNIPHIER_PINCTRL_GROUP_SINGLE(port54, port_range0, 44), - UNIPHIER_PINCTRL_GROUP_SINGLE(port55, port_range0, 45), - UNIPHIER_PINCTRL_GROUP_SINGLE(port56, port_range0, 46), - UNIPHIER_PINCTRL_GROUP_SINGLE(port57, port_range0, 47), - UNIPHIER_PINCTRL_GROUP_SINGLE(port60, port_range0, 48), - UNIPHIER_PINCTRL_GROUP_SINGLE(port61, port_range0, 49), - UNIPHIER_PINCTRL_GROUP_SINGLE(port62, port_range0, 50), - UNIPHIER_PINCTRL_GROUP_SINGLE(port63, port_range0, 51), - UNIPHIER_PINCTRL_GROUP_SINGLE(port64, port_range0, 52), - UNIPHIER_PINCTRL_GROUP_SINGLE(port65, port_range0, 53), - UNIPHIER_PINCTRL_GROUP_SINGLE(port66, port_range0, 54), - UNIPHIER_PINCTRL_GROUP_SINGLE(port67, port_range0, 55), - UNIPHIER_PINCTRL_GROUP_SINGLE(port70, port_range0, 56), - UNIPHIER_PINCTRL_GROUP_SINGLE(port71, port_range0, 57), - UNIPHIER_PINCTRL_GROUP_SINGLE(port72, port_range0, 58), - UNIPHIER_PINCTRL_GROUP_SINGLE(port73, port_range0, 59), - UNIPHIER_PINCTRL_GROUP_SINGLE(port74, port_range0, 60), - UNIPHIER_PINCTRL_GROUP_SINGLE(port75, port_range0, 61), - UNIPHIER_PINCTRL_GROUP_SINGLE(port76, port_range0, 62), - UNIPHIER_PINCTRL_GROUP_SINGLE(port77, port_range0, 63), - UNIPHIER_PINCTRL_GROUP_SINGLE(port80, port_range0, 64), - UNIPHIER_PINCTRL_GROUP_SINGLE(port81, port_range0, 65), - UNIPHIER_PINCTRL_GROUP_SINGLE(port82, port_range0, 66), - UNIPHIER_PINCTRL_GROUP_SINGLE(port83, port_range0, 67), - UNIPHIER_PINCTRL_GROUP_SINGLE(port84, port_range0, 68), - UNIPHIER_PINCTRL_GROUP_SINGLE(port85, port_range0, 69), - UNIPHIER_PINCTRL_GROUP_SINGLE(port86, port_range0, 70), - UNIPHIER_PINCTRL_GROUP_SINGLE(port87, port_range0, 71), - UNIPHIER_PINCTRL_GROUP_SINGLE(port90, port_range0, 72), - UNIPHIER_PINCTRL_GROUP_SINGLE(port91, port_range0, 73), - UNIPHIER_PINCTRL_GROUP_SINGLE(port92, port_range0, 74), - UNIPHIER_PINCTRL_GROUP_SINGLE(port93, port_range0, 75), - UNIPHIER_PINCTRL_GROUP_SINGLE(port94, port_range0, 76), - UNIPHIER_PINCTRL_GROUP_SINGLE(port95, port_range0, 77), - UNIPHIER_PINCTRL_GROUP_SINGLE(port96, port_range0, 78), - UNIPHIER_PINCTRL_GROUP_SINGLE(port97, port_range0, 79), - UNIPHIER_PINCTRL_GROUP_SINGLE(port100, port_range0, 80), - UNIPHIER_PINCTRL_GROUP_SINGLE(port101, port_range0, 81), - UNIPHIER_PINCTRL_GROUP_SINGLE(port102, port_range0, 82), - UNIPHIER_PINCTRL_GROUP_SINGLE(port103, port_range0, 83), - UNIPHIER_PINCTRL_GROUP_SINGLE(port104, port_range0, 84), - UNIPHIER_PINCTRL_GROUP_SINGLE(port105, port_range0, 85), - UNIPHIER_PINCTRL_GROUP_SINGLE(port106, port_range0, 86), - UNIPHIER_PINCTRL_GROUP_SINGLE(port107, port_range0, 87), - UNIPHIER_PINCTRL_GROUP_SINGLE(port110, port_range0, 88), - UNIPHIER_PINCTRL_GROUP_SINGLE(port111, port_range0, 89), - UNIPHIER_PINCTRL_GROUP_SINGLE(port112, port_range0, 90), - UNIPHIER_PINCTRL_GROUP_SINGLE(port113, port_range0, 91), - UNIPHIER_PINCTRL_GROUP_SINGLE(port114, port_range0, 92), - UNIPHIER_PINCTRL_GROUP_SINGLE(port115, port_range0, 93), - UNIPHIER_PINCTRL_GROUP_SINGLE(port116, port_range0, 94), - UNIPHIER_PINCTRL_GROUP_SINGLE(port117, port_range0, 95), - UNIPHIER_PINCTRL_GROUP_SINGLE(port120, port_range0, 96), - UNIPHIER_PINCTRL_GROUP_SINGLE(port121, port_range0, 97), - UNIPHIER_PINCTRL_GROUP_SINGLE(port122, port_range0, 98), - UNIPHIER_PINCTRL_GROUP_SINGLE(port123, port_range0, 99), - UNIPHIER_PINCTRL_GROUP_SINGLE(port124, port_range0, 100), - UNIPHIER_PINCTRL_GROUP_SINGLE(port130, port_range1, 0), - UNIPHIER_PINCTRL_GROUP_SINGLE(port131, port_range1, 1), - UNIPHIER_PINCTRL_GROUP_SINGLE(port140, port_range2, 0), - UNIPHIER_PINCTRL_GROUP_SINGLE(port141, port_range2, 1), - UNIPHIER_PINCTRL_GROUP_SINGLE(port142, port_range2, 2), - UNIPHIER_PINCTRL_GROUP_SINGLE(port143, port_range2, 3), - UNIPHIER_PINCTRL_GROUP_SINGLE(port144, port_range2, 4), - UNIPHIER_PINCTRL_GROUP_SINGLE(port145, port_range2, 5), - UNIPHIER_PINCTRL_GROUP_SINGLE(port146, port_range2, 6), - UNIPHIER_PINCTRL_GROUP_SINGLE(port147, port_range2, 7), - UNIPHIER_PINCTRL_GROUP_SINGLE(port166, port_range3, 0), - UNIPHIER_PINCTRL_GROUP_SINGLE(xirq0, xirq_range0, 0), - UNIPHIER_PINCTRL_GROUP_SINGLE(xirq1, xirq_range0, 1), - UNIPHIER_PINCTRL_GROUP_SINGLE(xirq2, xirq_range0, 2), - UNIPHIER_PINCTRL_GROUP_SINGLE(xirq3, xirq_range0, 3), - UNIPHIER_PINCTRL_GROUP_SINGLE(xirq4, xirq_range0, 4), - UNIPHIER_PINCTRL_GROUP_SINGLE(xirq5, xirq_range0, 5), - UNIPHIER_PINCTRL_GROUP_SINGLE(xirq6, xirq_range0, 6), - UNIPHIER_PINCTRL_GROUP_SINGLE(xirq7, xirq_range0, 7), - UNIPHIER_PINCTRL_GROUP_SINGLE(xirq8, xirq_range0, 8), - UNIPHIER_PINCTRL_GROUP_SINGLE(xirq9, xirq_range0, 9), - UNIPHIER_PINCTRL_GROUP_SINGLE(xirq10, xirq_range0, 10), - UNIPHIER_PINCTRL_GROUP_SINGLE(xirq11, xirq_range0, 11), - UNIPHIER_PINCTRL_GROUP_SINGLE(xirq12, xirq_range0, 12), - UNIPHIER_PINCTRL_GROUP_SINGLE(xirq14, xirq_range1, 0), - UNIPHIER_PINCTRL_GROUP_SINGLE(xirq15, xirq_range1, 1), + UNIPHIER_PINCTRL_GROUP_GPIO(gpio_range0), + UNIPHIER_PINCTRL_GROUP_GPIO(gpio_range1), + UNIPHIER_PINCTRL_GROUP_GPIO(gpio_range2), }; static const char * const emmc_groups[] = {"emmc", "emmc_dat8"}; @@ -777,46 +608,6 @@ static const char * const uart3_groups[] = {"uart3"}; static const char * const usb0_groups[] = {"usb0"}; static const char * const usb1_groups[] = {"usb1"}; static const char * const usb2_groups[] = {"usb2"}; -static const char * const port_groups[] = { - "port00", "port01", "port02", "port03", - "port04", "port05", "port06", "port07", - "port10", "port11", "port12", "port13", - "port14", "port15", "port16", "port17", - "port20", "port21", "port22", "port23", - "port24", "port25", "port26", "port27", - "port30", "port31", "port32", "port33", - "port34", "port35", "port36", "port37", - "port40", "port41", "port42", "port43", - "port44", "port45", "port46", "port47", - "port50", "port51", "port52", "port53", - "port54", "port55", "port56", "port57", - "port60", "port61", "port62", "port63", - "port64", "port65", "port66", "port67", - "port70", "port71", "port72", "port73", - "port74", "port75", "port76", "port77", - "port80", "port81", "port82", "port83", - "port84", "port85", "port86", "port87", - "port90", "port91", "port92", "port93", - "port94", "port95", "port96", "port97", - "port100", "port101", "port102", "port103", - "port104", "port105", "port106", "port107", - "port110", "port111", "port112", "port113", - "port114", "port115", "port116", "port117", - "port120", "port121", "port122", "port123", - "port124", "port125", "port126", "port127", - "port130", "port131", "port132", "port133", - "port134", "port135", "port136", "port137", - "port140", "port141", "port142", "port143", - "port144", "port145", "port146", "port147", - /* port150-164 missing */ - /* none */ "port165", -}; -static const char * const xirq_groups[] = { - "xirq0", "xirq1", "xirq2", "xirq3", - "xirq4", "xirq5", "xirq6", "xirq7", - "xirq8", "xirq9", "xirq10", "xirq11", - "xirq12", /* none*/ "xirq14", "xirq15", -}; static const struct uniphier_pinmux_function uniphier_sld8_functions[] = { UNIPHIER_PINMUX_FUNCTION(emmc), @@ -836,10 +627,22 @@ static const struct uniphier_pinmux_function uniphier_sld8_functions[] = { UNIPHIER_PINMUX_FUNCTION(usb0), UNIPHIER_PINMUX_FUNCTION(usb1), UNIPHIER_PINMUX_FUNCTION(usb2), - UNIPHIER_PINMUX_FUNCTION(port), - UNIPHIER_PINMUX_FUNCTION(xirq), }; +static int uniphier_sld8_get_gpio_muxval(unsigned int pin, + unsigned int gpio_offset) +{ + switch (gpio_offset) { + case 120 ... 127: /* XIRQ0-XIRQ7 */ + return 0; + case 128 ... 132: /* XIRQ8-12 */ + case 134 ... 135: /* XIRQ14-15 */ + return 14; + default: + return 15; + } +} + static struct uniphier_pinctrl_socdata uniphier_sld8_pindata = { .pins = uniphier_sld8_pins, .npins = ARRAY_SIZE(uniphier_sld8_pins), @@ -847,6 +650,7 @@ static struct uniphier_pinctrl_socdata uniphier_sld8_pindata = { .groups_count = ARRAY_SIZE(uniphier_sld8_groups), .functions = uniphier_sld8_functions, .functions_count = ARRAY_SIZE(uniphier_sld8_functions), + .get_gpio_muxval = uniphier_sld8_get_gpio_muxval, .caps = 0, }; @@ -865,6 +669,7 @@ static struct platform_driver uniphier_sld8_pinctrl_driver = { .driver = { .name = "uniphier-sld8-pinctrl", .of_match_table = uniphier_sld8_pinctrl_match, + .pm = &uniphier_pinctrl_pm_ops, }, }; builtin_platform_driver(uniphier_sld8_pinctrl_driver); diff --git a/drivers/pinctrl/uniphier/pinctrl-uniphier.h b/drivers/pinctrl/uniphier/pinctrl-uniphier.h index 6f2f33bf788f..c075ecb8e5db 100644 --- a/drivers/pinctrl/uniphier/pinctrl-uniphier.h +++ b/drivers/pinctrl/uniphier/pinctrl-uniphier.h @@ -25,7 +25,7 @@ struct platform_device; /* input enable control register bit */ #define UNIPHIER_PIN_IECTRL_SHIFT 0 -#define UNIPHIER_PIN_IECTRL_BITS 8 +#define UNIPHIER_PIN_IECTRL_BITS 3 #define UNIPHIER_PIN_IECTRL_MASK ((1UL << (UNIPHIER_PIN_IECTRL_BITS)) \ - 1) @@ -62,6 +62,7 @@ struct platform_device; #endif #define UNIPHIER_PIN_IECTRL_NONE (UNIPHIER_PIN_IECTRL_MASK) +#define UNIPHIER_PIN_IECTRL_EXIST 0 /* drive control type */ enum uniphier_pin_drv_type { @@ -131,18 +132,11 @@ static inline unsigned int uniphier_pin_get_pull_dir(void *drv_data) UNIPHIER_PIN_PULL_DIR_MASK; } -enum uniphier_pinmux_gpio_range_type { - UNIPHIER_PINMUX_GPIO_RANGE_PORT, - UNIPHIER_PINMUX_GPIO_RANGE_IRQ, - UNIPHIER_PINMUX_GPIO_RANGE_NONE, -}; - struct uniphier_pinctrl_group { const char *name; const unsigned *pins; unsigned num_pins; const int *muxvals; - enum uniphier_pinmux_gpio_range_type range_type; }; struct uniphier_pinmux_function { @@ -158,6 +152,7 @@ struct uniphier_pinctrl_socdata { int groups_count; const struct uniphier_pinmux_function *functions; int functions_count; + int (*get_gpio_muxval)(unsigned int pin, unsigned int gpio_offset); unsigned int caps; #define UNIPHIER_PINCTRL_CAPS_PERPIN_IECTRL BIT(1) #define UNIPHIER_PINCTRL_CAPS_DBGMUX_SEPARATE BIT(0) @@ -170,33 +165,22 @@ struct uniphier_pinctrl_socdata { .drv_data = (void *)UNIPHIER_PIN_ATTR_PACKED(c, d, e, f, g), \ } -#define __UNIPHIER_PINCTRL_GROUP(grp, type) \ +#define __UNIPHIER_PINCTRL_GROUP(grp, mux) \ { \ .name = #grp, \ .pins = grp##_pins, \ .num_pins = ARRAY_SIZE(grp##_pins), \ - .muxvals = grp##_muxvals + \ - BUILD_BUG_ON_ZERO(ARRAY_SIZE(grp##_pins) != \ - ARRAY_SIZE(grp##_muxvals)), \ - .range_type = type, \ + .muxvals = mux, \ } #define UNIPHIER_PINCTRL_GROUP(grp) \ - __UNIPHIER_PINCTRL_GROUP(grp, UNIPHIER_PINMUX_GPIO_RANGE_NONE) - -#define UNIPHIER_PINCTRL_GROUP_GPIO_RANGE_PORT(grp) \ - __UNIPHIER_PINCTRL_GROUP(grp, UNIPHIER_PINMUX_GPIO_RANGE_PORT) - -#define UNIPHIER_PINCTRL_GROUP_GPIO_RANGE_IRQ(grp) \ - __UNIPHIER_PINCTRL_GROUP(grp, UNIPHIER_PINMUX_GPIO_RANGE_IRQ) + __UNIPHIER_PINCTRL_GROUP(grp, \ + grp##_muxvals + \ + BUILD_BUG_ON_ZERO(ARRAY_SIZE(grp##_pins) != \ + ARRAY_SIZE(grp##_muxvals))) -#define UNIPHIER_PINCTRL_GROUP_SINGLE(grp, array, ofst) \ - { \ - .name = #grp, \ - .pins = array##_pins + ofst, \ - .num_pins = 1, \ - .muxvals = array##_muxvals + ofst, \ - } +#define UNIPHIER_PINCTRL_GROUP_GPIO(grp) \ + __UNIPHIER_PINCTRL_GROUP(grp, NULL) #define UNIPHIER_PINMUX_FUNCTION(func) \ { \ @@ -208,4 +192,6 @@ struct uniphier_pinctrl_socdata { int uniphier_pinctrl_probe(struct platform_device *pdev, struct uniphier_pinctrl_socdata *socdata); +extern const struct dev_pm_ops uniphier_pinctrl_pm_ops; + #endif /* __PINCTRL_UNIPHIER_H__ */ |