return 0;
 }
 
+/**
+ * ice_dpll_phase_range_set - initialize phase adjust range helper
+ * @range: pointer to phase adjust range struct to be initialized
+ * @phase_adj: a value to be used as min(-)/max(+) boundary
+ */
+static void ice_dpll_phase_range_set(struct dpll_pin_phase_adjust_range *range,
+                                    u32 phase_adj)
+{
+       range->min = -phase_adj;
+       range->max = phase_adj;
+}
+
 /**
  * ice_dpll_init_info_pins_generic - initializes generic pins info
  * @pf: board private structure
        for (i = 0; i < pin_num; i++) {
                pins[i].idx = i;
                pins[i].prop.board_label = labels[i];
-               pins[i].prop.phase_range.min = phase_adj_max;
-               pins[i].prop.phase_range.max = -phase_adj_max;
+               ice_dpll_phase_range_set(&pins[i].prop.phase_range,
+                                        phase_adj_max);
                pins[i].prop.capabilities = cap;
                pins[i].pf = pf;
                ret = ice_dpll_pin_state_update(pf, &pins[i], pin_type, NULL);
        struct ice_hw *hw = &pf->hw;
        struct ice_dpll_pin *pins;
        unsigned long caps;
+       u32 phase_adj_max;
        u8 freq_supp_num;
        bool input;
 
        case ICE_DPLL_PIN_TYPE_INPUT:
                pins = pf->dplls.inputs;
                num_pins = pf->dplls.num_inputs;
+               phase_adj_max = pf->dplls.input_phase_adj_max;
                input = true;
                break;
        case ICE_DPLL_PIN_TYPE_OUTPUT:
                pins = pf->dplls.outputs;
                num_pins = pf->dplls.num_outputs;
+               phase_adj_max = pf->dplls.output_phase_adj_max;
                input = false;
                break;
        default:
                                return ret;
                        caps |= (DPLL_PIN_CAPABILITIES_PRIORITY_CAN_CHANGE |
                                 DPLL_PIN_CAPABILITIES_STATE_CAN_CHANGE);
-                       pins[i].prop.phase_range.min =
-                               pf->dplls.input_phase_adj_max;
-                       pins[i].prop.phase_range.max =
-                               -pf->dplls.input_phase_adj_max;
                } else {
-                       pins[i].prop.phase_range.min =
-                               pf->dplls.output_phase_adj_max;
-                       pins[i].prop.phase_range.max =
-                               -pf->dplls.output_phase_adj_max;
                        ret = ice_cgu_get_output_pin_state_caps(hw, i, &caps);
                        if (ret)
                                return ret;
                }
+               ice_dpll_phase_range_set(&pins[i].prop.phase_range,
+                                        phase_adj_max);
                pins[i].prop.capabilities = caps;
                ret = ice_dpll_pin_state_update(pf, &pins[i], pin_type, NULL);
                if (ret)
        dp->dpll_idx = abilities.pps_dpll_idx;
        d->num_inputs = abilities.num_inputs;
        d->num_outputs = abilities.num_outputs;
-       d->input_phase_adj_max = le32_to_cpu(abilities.max_in_phase_adj);
-       d->output_phase_adj_max = le32_to_cpu(abilities.max_out_phase_adj);
+       d->input_phase_adj_max = le32_to_cpu(abilities.max_in_phase_adj) &
+               ICE_AQC_GET_CGU_MAX_PHASE_ADJ;
+       d->output_phase_adj_max = le32_to_cpu(abilities.max_out_phase_adj) &
+               ICE_AQC_GET_CGU_MAX_PHASE_ADJ;
 
        alloc_size = sizeof(*d->inputs) * d->num_inputs;
        d->inputs = kzalloc(alloc_size, GFP_KERNEL);