Lines Matching +full:gpio +full:- +full:group
4 * SPDX-License-Identifier: Apache-2.0
8 #include <zephyr/drivers/gpio.h>
9 #include <zephyr/dt-bindings/pinctrl/npcx-pinctrl.h>
28 * GPIO in pin-mux init function.
30 * def-io-conf-list {
37 .group = DT_PHA(DT_PROP_BY_IDX(node_id, prop, idx), alts, group), \
58 /* Pin-control local functions */
62 uint8_t alt_mask = BIT(alt->bit); in npcx_pinctrl_alt_sel()
65 * alt_fun == 0 means select GPIO, otherwise Alternate Func. in npcx_pinctrl_alt_sel()
71 if (!!alt_func != !!alt->inverted) { in npcx_pinctrl_alt_sel()
72 NPCX_DEVALT(scfg_base, alt->group) |= alt_mask; in npcx_pinctrl_alt_sel()
74 NPCX_DEVALT(scfg_base, alt->group) &= ~alt_mask; in npcx_pinctrl_alt_sel()
78 /* Platform specific pin-control functions */
102 inst_glue->SMB_SEL |= BIT(controller); in npcx_pinctrl_i2c_port_sel()
104 inst_glue->SMB_SEL &= ~BIT(controller); in npcx_pinctrl_i2c_port_sel()
112 inst_scfg->DEV_CTL4 |= BIT(NPCX_DEV_CTL4_WP_IF); in npcx_pinctrl_flash_write_protect_set()
113 if (!IS_BIT_SET(inst_scfg->DEV_CTL4, NPCX_DEV_CTL4_WP_IF)) { in npcx_pinctrl_flash_write_protect_set()
114 return -EIO; in npcx_pinctrl_flash_write_protect_set()
124 return IS_BIT_SET(inst_scfg->DEV_CTL4, NPCX_DEV_CTL4_WP_IF); in npcx_pinctrl_flash_write_protect_is_set()
131 SET_FIELD(inst_scfg->DEVCNT, NPCX_DEVCNT_HIF_TYP_SEL_FIELD, hif_type); in npcx_host_interface_sel()
140 inst_scfg->DEV_CTL3 |= NPCX_DEV_CTL3_I3C_MODE_BIT(module_id); in npcx_i3c_target_sel()
142 inst_scfg->DEV_CTL3 &= ~NPCX_DEV_CTL3_I3C_MODE_BIT(module_id); in npcx_i3c_target_sel()
160 /* Pin-control driver registration */
168 /* Change all pads whose default functionality isn't IO to GPIO */ in scfg_init()