LPI_GPIO_FUNCTION_MASK
u32p_replace_bits(&val, i, LPI_GPIO_FUNCTION_MASK);
func = FIELD_GET(LPI_GPIO_FUNCTION_MASK, ctl_reg);