Lines Matching refs:pcr1
59 static uint32_t prog_pud(uint32_t pcr1, uint32_t conf) in prog_pud() argument
62 pcr1 &= ~(MCHP_GPIO_CTRL_PUD_MASK); in prog_pud()
63 pcr1 |= MCHP_GPIO_CTRL_PUD_NONE; in prog_pud()
64 return pcr1; in prog_pud()
68 pcr1 &= ~(MCHP_GPIO_CTRL_PUD_MASK); in prog_pud()
70 pcr1 |= MCHP_GPIO_CTRL_PUD_PU; in prog_pud()
73 pcr1 |= MCHP_GPIO_CTRL_PUD_PD; in prog_pud()
77 return pcr1; in prog_pud()
96 uint32_t idx = 0u, pcr1 = 0u; in xec_config_pin() local
109 pcr1 = regs->CTRL[idx]; /* current configuration including pin input state */ in xec_config_pin()
110 pcr1 = regs->CTRL[idx]; /* read multiple times to allow propagation from pad */ in xec_config_pin()
111 pcr1 = regs->CTRL[idx]; /* Is this necessary? */ in xec_config_pin()
113 pcr1 = prog_pud(pcr1, conf); in xec_config_pin()
117 pcr1 &= ~(MCHP_GPIO_CTRL_DIR_OUTPUT); in xec_config_pin()
120 pcr1 |= MCHP_GPIO_CTRL_DIR_OUTPUT; in xec_config_pin()
125 pcr1 &= ~BIT(MCHP_GPIO_CTRL_OUTVAL_POS); in xec_config_pin()
128 pcr1 |= BIT(MCHP_GPIO_CTRL_OUTVAL_POS); in xec_config_pin()
133 pcr1 &= ~(MCHP_GPIO_CTRL_BUFT_OPENDRAIN); in xec_config_pin()
136 pcr1 |= MCHP_GPIO_CTRL_BUFT_OPENDRAIN; in xec_config_pin()
140 pcr1 &= ~MCHP_GPIO_CTRL_PWRG_MASK; in xec_config_pin()
142 pcr1 |= MCHP_GPIO_CTRL_PWRG_OFF; in xec_config_pin()
144 pcr1 |= MCHP_GPIO_CTRL_PWRG_VTR_IO; in xec_config_pin()
148 pcr1 &= ~MCHP_GPIO_CTRL_MUX_MASK; in xec_config_pin()
149 pcr1 |= (uint32_t)((altf & MCHP_GPIO_CTRL_MUX_MASK0) << MCHP_GPIO_CTRL_MUX_POS); in xec_config_pin()
153 pcr1 |= BIT(MCHP_GPIO_CTRL_POL_POS); in xec_config_pin()
155 pcr1 &= ~BIT(MCHP_GPIO_CTRL_POL_POS); in xec_config_pin()
159 regs->CTRL[idx] = pcr1; in xec_config_pin()
161 regs->CTRL[idx] = pcr1 | BIT(MCHP_GPIO_CTRL_AOD_POS); in xec_config_pin()