Commit 1d86cca4 authored by Karol Kolacinski's avatar Karol Kolacinski Committed by Tony Nguyen
Browse files

ice: Add SDPs support for E825C



Add support of PTP SDPs (Software Definable Pins) for E825C products.

Reviewed-by: default avatarArkadiusz Kubalewski <arkadiusz.kubalewski@intel.com>
Signed-off-by: default avatarKarol Kolacinski <karol.kolacinski@intel.com>
Reviewed-by: default avatarSimon Horman <horms@kernel.org>
Tested-by: Pucha Himasekhar Reddy <himasekharx.reddy.pucha@intel.com> (A Contingent worker at Intel)
Signed-off-by: default avatarTony Nguyen <anthony.l.nguyen@intel.com>
parent 26017cff
Loading
Loading
Loading
Loading
+18 −2
Original line number Diff line number Diff line
@@ -20,6 +20,16 @@ static const struct ice_ptp_pin_desc ice_pin_desc_e82x[] = {
	{  ONE_PPS,   { -1,  5 }},
};

static const struct ice_ptp_pin_desc ice_pin_desc_e825c[] = {
	/* name,        gpio */
	{  SDP0,      {  0,  0 }},
	{  SDP1,      {  1,  1 }},
	{  SDP2,      {  2,  2 }},
	{  SDP3,      {  3,  3 }},
	{  TIME_SYNC, {  4, -1 }},
	{  ONE_PPS,   { -1,  5 }},
};

static const struct ice_ptp_pin_desc ice_pin_desc_e810[] = {
	/* name,      gpio */
	{  SDP0,    {  0, 0 }},
@@ -2605,8 +2615,14 @@ static void ice_ptp_set_funcs_e82x(struct ice_pf *pf)
#endif /* CONFIG_ICE_HWTS */
	pf->ptp.info.enable = ice_ptp_gpio_enable;
	pf->ptp.info.verify = ice_verify_pin;

	if (ice_is_e825c(&pf->hw)) {
		pf->ptp.ice_pin_desc = ice_pin_desc_e825c;
		pf->ptp.info.n_pins = ICE_PIN_DESC_ARR_LEN(ice_pin_desc_e825c);
	} else {
		pf->ptp.ice_pin_desc = ice_pin_desc_e82x;
		pf->ptp.info.n_pins = ICE_PIN_DESC_ARR_LEN(ice_pin_desc_e82x);
	}
	ice_ptp_setup_pin_cfg(pf);
}