#define ATMEL_PIO_DRVSTR_LO (1 << 16)
#define ATMEL_PIO_DRVSTR_ME (2 << 16)
#define ATMEL_PIO_DRVSTR_HI (3 << 16)
+#define ATMEL_PIO_DRVSTR_OFFSET 16
#define ATMEL_PIO_CFGR_EVTSEL_MASK GENMASK(26, 24)
#define ATMEL_PIO_CFGR_EVTSEL_FALLING (0 << 24)
#define ATMEL_PIO_CFGR_EVTSEL_RISING (1 << 24)
{ "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(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];
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);