Lines Matching +full:cmd +full:- +full:dat +full:- +full:pins
1 // SPDX-License-Identifier: GPL-2.0-only
6 * Copyright (C) 2009-2011 ST-Ericsson AB
11 * pins, so we enumerate the pads we can mux rather than actual pins. The pads
12 * are connected to different pins in different packaging types, so it would
25 #include <linux/pinctrl/pinconf-generic.h>
26 #include "pinctrl-coh901.h"
170 #define DRIVER_NAME "pinctrl-u300"
361 PINCTRL_PIN(171, "MMC CMD DIR LS"),
366 PINCTRL_PIN(176, "MMC CMD"),
623 PINCTRL_PIN(431, "PIO ACC SDIO0 CMD"),
631 PINCTRL_PIN(439, "PIO USB DAT VP"),
672 * u300_pmx_registers - the array of registers read/written for each pinmux
684 * struct u300_pin_group - describes a U300 pin group
686 * @pins: an array of discrete physical pins used in this group, taken
687 * from the driver-local pin enumeration space
688 * @num_pins: the number of pins in this group array, i.e. the number of
689 * elements in .pins so we can iterate over that array
693 const unsigned int *pins; member
698 * struct pmx_onmask - mask bits to enable/disable padmux
716 /* The chip power pins are VDD, GND, VDDIO and VSSIO */
809 .pins = power_pins,
814 .pins = emif0_pins,
819 .pins = emif1_pins,
824 .pins = uart0_pins,
829 .pins = mmc0_pins,
834 .pins = spi0_pins,
851 const unsigned **pins, in u300_get_group_pins() argument
854 *pins = u300_pin_groups[selector].pins; in u300_get_group_pins()
877 * struct u300_pmx_func - describes U300 pinmux functions
945 val = upmx_mask->bits; in u300_pmx_endisable()
949 mask = upmx_mask->mask; in u300_pmx_endisable()
951 regval = readw(upmx->virtbase + u300_pmx_registers[i]); in u300_pmx_endisable()
954 writew(regval, upmx->virtbase + u300_pmx_registers[i]); in u300_pmx_endisable()
965 /* There is nothing to do with the power pins */ in u300_pmx_set_mux()
1008 /* We get config for those pins we CAN get it for and that's it */ in u300_pin_config_get()
1010 return -ENOTSUPP; in u300_pin_config_get()
1012 return u300_gpio_config_get(range->gc, in u300_pin_config_get()
1013 (pin - range->pin_base + range->base), in u300_pin_config_get()
1025 return -EINVAL; in u300_pin_config_set()
1029 ret = u300_gpio_config_set(range->gc, in u300_pin_config_set()
1030 (pin - range->pin_base + range->base), in u300_pin_config_set()
1047 .pins = u300_pads,
1060 upmx = devm_kzalloc(&pdev->dev, sizeof(*upmx), GFP_KERNEL); in u300_pmx_probe()
1062 return -ENOMEM; in u300_pmx_probe()
1064 upmx->dev = &pdev->dev; in u300_pmx_probe()
1066 upmx->virtbase = devm_platform_ioremap_resource(pdev, 0); in u300_pmx_probe()
1067 if (IS_ERR(upmx->virtbase)) in u300_pmx_probe()
1068 return PTR_ERR(upmx->virtbase); in u300_pmx_probe()
1070 upmx->pctl = devm_pinctrl_register(&pdev->dev, &u300_pmx_desc, upmx); in u300_pmx_probe()
1071 if (IS_ERR(upmx->pctl)) { in u300_pmx_probe()
1072 dev_err(&pdev->dev, "could not register U300 pinmux driver\n"); in u300_pmx_probe()
1073 return PTR_ERR(upmx->pctl); in u300_pmx_probe()
1078 dev_info(&pdev->dev, "initialized U300 pin control driver\n"); in u300_pmx_probe()
1084 { .compatible = "stericsson,pinctrl-u300" },