summaryrefslogtreecommitdiffstats
path: root/drivers/pinctrl
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2021-01-25 09:01:28 -0500
committerTom Rini <trini@konsulko.com>2021-01-25 09:01:28 -0500
commitaee5bcce35009c50555d9917e2ca4b9422210fbb (patch)
tree7f17251dbb1eeba1255dec492f89650c3b1d5895 /drivers/pinctrl
parent69d29fe1c0aeb33f42633a75555d30b7921c02aa (diff)
parent786f35b619ddbfb88e4532d11a56413f5dab473f (diff)
downloadu-boot-aee5bcce35009c50555d9917e2ca4b9422210fbb.tar.gz
u-boot-aee5bcce35009c50555d9917e2ca4b9422210fbb.tar.xz
u-boot-aee5bcce35009c50555d9917e2ca4b9422210fbb.zip
Merge tag 'u-boot-atmel-2021.04-b' of https://gitlab.denx.de/u-boot/custodians/u-boot-atmel
Second set of u-boot-atmel features for 2021.04 cycle This feature set includes macb updates for all interfaces and new sama7g5 variant support; micrel ksz9031 DLL support; a new board from Giant based on Adafruit feather form factor which contains a SAMA5D27 SoC; several fixes regarding the NAND flash PMECC block; and pincontrol drive strength support for pio4 controller.
Diffstat (limited to 'drivers/pinctrl')
-rw-r--r--drivers/pinctrl/pinctrl-at91-pio4.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/drivers/pinctrl/pinctrl-at91-pio4.c b/drivers/pinctrl/pinctrl-at91-pio4.c
index 1aba8a9150..3a5143adc3 100644
--- a/drivers/pinctrl/pinctrl-at91-pio4.c
+++ b/drivers/pinctrl/pinctrl-at91-pio4.c
@@ -34,17 +34,19 @@ static const struct pinconf_param conf_params[] = {
{ "input-schmitt-disable", PIN_CONFIG_INPUT_SCHMITT_ENABLE, 0 },
{ "input-schmitt-enable", PIN_CONFIG_INPUT_SCHMITT_ENABLE, 1 },
{ "input-debounce", PIN_CONFIG_INPUT_DEBOUNCE, 0 },
+ { "atmel,drive-strength", PIN_CONFIG_DRIVE_STRENGTH, 0 },
};
-static u32 atmel_pinctrl_get_pinconf(const void *blob, int node)
+static u32 atmel_pinctrl_get_pinconf(struct udevice *config)
{
const struct pinconf_param *params;
u32 param, arg, conf = 0;
u32 i;
+ u32 val;
for (i = 0; i < ARRAY_SIZE(conf_params); i++) {
params = &conf_params[i];
- if (!fdt_get_property(blob, node, params->property, NULL))
+ if (!dev_read_prop(config, params->property, NULL))
continue;
param = params->param;
@@ -82,6 +84,12 @@ static u32 atmel_pinctrl_get_pinconf(const void *blob, int node)
conf |= ATMEL_PIO_IFSCEN_MASK;
}
break;
+ case PIN_CONFIG_DRIVE_STRENGTH:
+ dev_read_u32(config, params->property, &val);
+ conf &= (~ATMEL_PIO_DRVSTR_MASK);
+ conf |= (val << ATMEL_PIO_DRVSTR_OFFSET)
+ & ATMEL_PIO_DRVSTR_MASK;
+ break;
default:
printf("%s: Unsupported configuration parameter: %u\n",
__func__, param);
@@ -115,7 +123,7 @@ static int atmel_pinctrl_set_state(struct udevice *dev, struct udevice *config)
u32 i, conf;
int count;
- conf = atmel_pinctrl_get_pinconf(blob, node);
+ conf = atmel_pinctrl_get_pinconf(config);
count = fdtdec_get_int_array_count(blob, node, "pinmux",
cells, ARRAY_SIZE(cells));