drivers: pinctrl: Add more config options for Ambiq Apollo4

This commits add more configuration options
for Ambiq Apollo4 pinctrl driver.

Signed-off-by: Mateusz Sierszulski <msierszulski@antmicro.com>
This commit is contained in:
Mateusz Sierszulski 2023-07-05 13:00:28 +02:00 committed by Carles Cufí
parent 2b74109f20
commit be149593c9
3 changed files with 9 additions and 0 deletions

View file

@ -22,6 +22,7 @@ static void pinctrl_configure_pin(const pinctrl_soc_pin_t *pin)
: AM_HAL_GPIO_PIN_OUTCFG_DISABLE;
pin_config.GP.cfg_b.eDriveStrength = pin->drive_strength;
pin_config.GP.cfg_b.uSlewRate = pin->slew_rate;
pin_config.GP.cfg_b.uNCE = pin->iom_nce;
if (pin->bias_pull_up) {
pin_config.GP.cfg_b.ePullup = pin->ambiq_pull_up_ohms + AM_HAL_GPIO_PIN_PULLUP_1_5K;

View file

@ -104,3 +104,8 @@ child-binding:
default: 1500
description: |
The pullup resistor value. The default value is 1500 ohms.
ambiq,iom-nce-module:
type: int
default: 0
description: |
IOM nCE module select. The default value is reset value.

View file

@ -35,6 +35,8 @@ struct apollo4_pinctrl_soc_pin {
uint32_t bias_pull_down : 1;
/** pullup resistor value */
uint32_t ambiq_pull_up_ohms : 3;
/** IOM nCE module select */
uint32_t iom_nce : 6;
};
typedef struct apollo4_pinctrl_soc_pin pinctrl_soc_pin_t;
@ -59,6 +61,7 @@ typedef struct apollo4_pinctrl_soc_pin pinctrl_soc_pin_t;
DT_PROP(node_id, bias_pull_up), \
DT_PROP(node_id, bias_pull_down), \
DT_ENUM_IDX(node_id, ambiq_pull_up_ohms), \
DT_PROP(node_id, ambiq_iom_nce_module), \
},
/**