Lines Matching full:pin
21 #define DRCTL(port, pin) (PORT_NSR + 0xa00 + (0x8 * port) + pin) argument
32 #define PFC_FUNC_MASK(pin) (0xf << (pin * 4)) argument
34 static void pinctrl_configure_pin(const pinctrl_soc_pin_t *pin) in pinctrl_configure_pin() argument
36 uint8_t rselp = sys_read8(RSELP(pin->port)); in pinctrl_configure_pin()
37 uint32_t pfc = sys_read32(PFC(pin->port)) & ~(PFC_FUNC_MASK(pin->pin)); in pinctrl_configure_pin()
38 uint8_t pmc = sys_read8(PMC(pin->port)); in pinctrl_configure_pin()
41 sys_write8(rselp | BIT(pin->pin), RSELP(pin->port)); in pinctrl_configure_pin()
43 pin->drive_strength, (pin->pull_up == 1 ? 1U : (pin->pull_down == 1 ? 2U : 0)), in pinctrl_configure_pin()
44 pin->schmitt_enable, pin->slew_rate), in pinctrl_configure_pin()
45 DRCTL(pin->port, pin->pin)); in pinctrl_configure_pin()
47 /* Select function for the pin. */ in pinctrl_configure_pin()
48 sys_write32(pfc | pin->func << (pin->pin * 4), PFC(pin->port)); in pinctrl_configure_pin()
50 /* Set proper bit in the PMC register to use the pin as a peripheral IO. */ in pinctrl_configure_pin()
51 sys_write8(pmc | BIT(pin->pin), PMC(pin->port)); in pinctrl_configure_pin()