@@ -1339,6 +1339,30 @@ struct ice_aqc_set_mac_lb {
13391339 u8 reserved [15 ];
13401340};
13411341
1342+ /* Set PHY recovered clock output (direct 0x0630) */
1343+ struct ice_aqc_set_phy_rec_clk_out {
1344+ u8 phy_output ;
1345+ u8 port_num ;
1346+ #define ICE_AQC_SET_PHY_REC_CLK_OUT_CURR_PORT 0xFF
1347+ u8 flags ;
1348+ #define ICE_AQC_SET_PHY_REC_CLK_OUT_OUT_EN BIT(0)
1349+ u8 rsvd ;
1350+ __le32 freq ;
1351+ u8 rsvd2 [6 ];
1352+ __le16 node_handle ;
1353+ };
1354+
1355+ /* Get PHY recovered clock output (direct 0x0631) */
1356+ struct ice_aqc_get_phy_rec_clk_out {
1357+ u8 phy_output ;
1358+ u8 port_num ;
1359+ #define ICE_AQC_GET_PHY_REC_CLK_OUT_CURR_PORT 0xFF
1360+ u8 flags ;
1361+ #define ICE_AQC_GET_PHY_REC_CLK_OUT_OUT_EN BIT(0)
1362+ u8 rsvd [11 ];
1363+ __le16 node_handle ;
1364+ };
1365+
13421366struct ice_aqc_link_topo_params {
13431367 u8 lport_num ;
13441368 u8 lport_num_valid ;
@@ -1355,6 +1379,8 @@ struct ice_aqc_link_topo_params {
13551379#define ICE_AQC_LINK_TOPO_NODE_TYPE_CAGE 6
13561380#define ICE_AQC_LINK_TOPO_NODE_TYPE_MEZZ 7
13571381#define ICE_AQC_LINK_TOPO_NODE_TYPE_ID_EEPROM 8
1382+ #define ICE_AQC_LINK_TOPO_NODE_TYPE_CLK_CTRL 9
1383+ #define ICE_AQC_LINK_TOPO_NODE_TYPE_CLK_MUX 10
13581384#define ICE_AQC_LINK_TOPO_NODE_CTX_S 4
13591385#define ICE_AQC_LINK_TOPO_NODE_CTX_M \
13601386 (0xF << ICE_AQC_LINK_TOPO_NODE_CTX_S)
@@ -1391,7 +1417,12 @@ struct ice_aqc_link_topo_addr {
13911417struct ice_aqc_get_link_topo {
13921418 struct ice_aqc_link_topo_addr addr ;
13931419 u8 node_part_num ;
1394- #define ICE_AQC_GET_LINK_TOPO_NODE_NR_PCA9575 0x21
1420+ #define ICE_AQC_GET_LINK_TOPO_NODE_NR_PCA9575 0x21
1421+ #define ICE_ACQ_GET_LINK_TOPO_NODE_NR_ZL30632_80032 0x24
1422+ #define ICE_ACQ_GET_LINK_TOPO_NODE_NR_SI5383_5384 0x25
1423+ #define ICE_ACQ_GET_LINK_TOPO_NODE_NR_E822_PHY 0x30
1424+ #define ICE_ACQ_GET_LINK_TOPO_NODE_NR_C827 0x31
1425+ #define ICE_ACQ_GET_LINK_TOPO_NODE_NR_GEN_CLK_MUX 0x47
13951426 u8 rsvd [9 ];
13961427};
13971428
@@ -2079,6 +2110,193 @@ struct ice_aqc_get_pkg_info_resp {
20792110 struct ice_aqc_get_pkg_info pkg_info [];
20802111};
20812112
2113+ /* Get CGU abilities command response data structure (indirect 0x0C61) */
2114+ struct ice_aqc_get_cgu_abilities {
2115+ u8 num_inputs ;
2116+ u8 num_outputs ;
2117+ u8 pps_dpll_idx ;
2118+ u8 eec_dpll_idx ;
2119+ __le32 max_in_freq ;
2120+ __le32 max_in_phase_adj ;
2121+ __le32 max_out_freq ;
2122+ __le32 max_out_phase_adj ;
2123+ u8 cgu_part_num ;
2124+ u8 rsvd [3 ];
2125+ };
2126+
2127+ /* Set CGU input config (direct 0x0C62) */
2128+ struct ice_aqc_set_cgu_input_config {
2129+ u8 input_idx ;
2130+ u8 flags1 ;
2131+ #define ICE_AQC_SET_CGU_IN_CFG_FLG1_UPDATE_FREQ BIT(6)
2132+ #define ICE_AQC_SET_CGU_IN_CFG_FLG1_UPDATE_DELAY BIT(7)
2133+ u8 flags2 ;
2134+ #define ICE_AQC_SET_CGU_IN_CFG_FLG2_INPUT_EN BIT(5)
2135+ #define ICE_AQC_SET_CGU_IN_CFG_FLG2_ESYNC_EN BIT(6)
2136+ u8 rsvd ;
2137+ __le32 freq ;
2138+ __le32 phase_delay ;
2139+ u8 rsvd2 [2 ];
2140+ __le16 node_handle ;
2141+ };
2142+
2143+ /* Get CGU input config response descriptor structure (direct 0x0C63) */
2144+ struct ice_aqc_get_cgu_input_config {
2145+ u8 input_idx ;
2146+ u8 status ;
2147+ #define ICE_AQC_GET_CGU_IN_CFG_STATUS_LOS BIT(0)
2148+ #define ICE_AQC_GET_CGU_IN_CFG_STATUS_SCM_FAIL BIT(1)
2149+ #define ICE_AQC_GET_CGU_IN_CFG_STATUS_CFM_FAIL BIT(2)
2150+ #define ICE_AQC_GET_CGU_IN_CFG_STATUS_GST_FAIL BIT(3)
2151+ #define ICE_AQC_GET_CGU_IN_CFG_STATUS_PFM_FAIL BIT(4)
2152+ #define ICE_AQC_GET_CGU_IN_CFG_STATUS_ESYNC_FAIL BIT(6)
2153+ #define ICE_AQC_GET_CGU_IN_CFG_STATUS_ESYNC_CAP BIT(7)
2154+ u8 type ;
2155+ #define ICE_AQC_GET_CGU_IN_CFG_TYPE_READ_ONLY BIT(0)
2156+ #define ICE_AQC_GET_CGU_IN_CFG_TYPE_GPS BIT(4)
2157+ #define ICE_AQC_GET_CGU_IN_CFG_TYPE_EXTERNAL BIT(5)
2158+ #define ICE_AQC_GET_CGU_IN_CFG_TYPE_PHY BIT(6)
2159+ u8 flags1 ;
2160+ #define ICE_AQC_GET_CGU_IN_CFG_FLG1_PHASE_DELAY_SUPP BIT(0)
2161+ #define ICE_AQC_GET_CGU_IN_CFG_FLG1_1PPS_SUPP BIT(2)
2162+ #define ICE_AQC_GET_CGU_IN_CFG_FLG1_10MHZ_SUPP BIT(3)
2163+ #define ICE_AQC_GET_CGU_IN_CFG_FLG1_ANYFREQ BIT(7)
2164+ __le32 freq ;
2165+ __le32 phase_delay ;
2166+ u8 flags2 ;
2167+ #define ICE_AQC_GET_CGU_IN_CFG_FLG2_INPUT_EN BIT(5)
2168+ #define ICE_AQC_GET_CGU_IN_CFG_FLG2_ESYNC_EN BIT(6)
2169+ u8 rsvd [1 ];
2170+ __le16 node_handle ;
2171+ };
2172+
2173+ /* Set CGU output config (direct 0x0C64) */
2174+ struct ice_aqc_set_cgu_output_config {
2175+ u8 output_idx ;
2176+ u8 flags ;
2177+ #define ICE_AQC_SET_CGU_OUT_CFG_OUT_EN BIT(0)
2178+ #define ICE_AQC_SET_CGU_OUT_CFG_ESYNC_EN BIT(1)
2179+ #define ICE_AQC_SET_CGU_OUT_CFG_UPDATE_FREQ BIT(2)
2180+ #define ICE_AQC_SET_CGU_OUT_CFG_UPDATE_PHASE BIT(3)
2181+ #define ICE_AQC_SET_CGU_OUT_CFG_UPDATE_SRC_SEL BIT(4)
2182+ u8 src_sel ;
2183+ #define ICE_AQC_SET_CGU_OUT_CFG_DPLL_SRC_SEL ICE_M(0x1F, 0)
2184+ u8 rsvd ;
2185+ __le32 freq ;
2186+ __le32 phase_delay ;
2187+ u8 rsvd2 [2 ];
2188+ __le16 node_handle ;
2189+ };
2190+
2191+ /* Get CGU output config (direct 0x0C65) */
2192+ struct ice_aqc_get_cgu_output_config {
2193+ u8 output_idx ;
2194+ u8 flags ;
2195+ #define ICE_AQC_GET_CGU_OUT_CFG_OUT_EN BIT(0)
2196+ #define ICE_AQC_GET_CGU_OUT_CFG_ESYNC_EN BIT(1)
2197+ #define ICE_AQC_GET_CGU_OUT_CFG_ESYNC_ABILITY BIT(2)
2198+ u8 src_sel ;
2199+ #define ICE_AQC_GET_CGU_OUT_CFG_DPLL_SRC_SEL_SHIFT 0
2200+ #define ICE_AQC_GET_CGU_OUT_CFG_DPLL_SRC_SEL \
2201+ ICE_M(0x1F, ICE_AQC_GET_CGU_OUT_CFG_DPLL_SRC_SEL_SHIFT)
2202+ #define ICE_AQC_GET_CGU_OUT_CFG_DPLL_MODE_SHIFT 5
2203+ #define ICE_AQC_GET_CGU_OUT_CFG_DPLL_MODE \
2204+ ICE_M(0x7, ICE_AQC_GET_CGU_OUT_CFG_DPLL_MODE_SHIFT)
2205+ u8 rsvd ;
2206+ __le32 freq ;
2207+ __le32 src_freq ;
2208+ u8 rsvd2 [2 ];
2209+ __le16 node_handle ;
2210+ };
2211+
2212+ /* Get CGU DPLL status (direct 0x0C66) */
2213+ struct ice_aqc_get_cgu_dpll_status {
2214+ u8 dpll_num ;
2215+ u8 ref_state ;
2216+ #define ICE_AQC_GET_CGU_DPLL_STATUS_REF_SW_LOS BIT(0)
2217+ #define ICE_AQC_GET_CGU_DPLL_STATUS_REF_SW_SCM BIT(1)
2218+ #define ICE_AQC_GET_CGU_DPLL_STATUS_REF_SW_CFM BIT(2)
2219+ #define ICE_AQC_GET_CGU_DPLL_STATUS_REF_SW_GST BIT(3)
2220+ #define ICE_AQC_GET_CGU_DPLL_STATUS_REF_SW_PFM BIT(4)
2221+ #define ICE_AQC_GET_CGU_DPLL_STATUS_FAST_LOCK_EN BIT(5)
2222+ #define ICE_AQC_GET_CGU_DPLL_STATUS_REF_SW_ESYNC BIT(6)
2223+ u8 dpll_state ;
2224+ #define ICE_AQC_GET_CGU_DPLL_STATUS_STATE_LOCK BIT(0)
2225+ #define ICE_AQC_GET_CGU_DPLL_STATUS_STATE_HO BIT(1)
2226+ #define ICE_AQC_GET_CGU_DPLL_STATUS_STATE_HO_READY BIT(2)
2227+ #define ICE_AQC_GET_CGU_DPLL_STATUS_STATE_FLHIT BIT(5)
2228+ #define ICE_AQC_GET_CGU_DPLL_STATUS_STATE_PSLHIT BIT(7)
2229+ u8 config ;
2230+ #define ICE_AQC_GET_CGU_DPLL_CONFIG_CLK_REF_SEL ICE_M(0x1F, 0)
2231+ #define ICE_AQC_GET_CGU_DPLL_CONFIG_MODE_SHIFT 5
2232+ #define ICE_AQC_GET_CGU_DPLL_CONFIG_MODE \
2233+ ICE_M(0x7, ICE_AQC_GET_CGU_DPLL_CONFIG_MODE_SHIFT)
2234+ #define ICE_AQC_GET_CGU_DPLL_CONFIG_MODE_FREERUN 0
2235+ #define ICE_AQC_GET_CGU_DPLL_CONFIG_MODE_AUTOMATIC \
2236+ ICE_M(0x3, ICE_AQC_GET_CGU_DPLL_CONFIG_MODE_SHIFT)
2237+ __le32 phase_offset_h ;
2238+ __le32 phase_offset_l ;
2239+ u8 eec_mode ;
2240+ #define ICE_AQC_GET_CGU_DPLL_STATUS_EEC_MODE_1 0xA
2241+ #define ICE_AQC_GET_CGU_DPLL_STATUS_EEC_MODE_2 0xB
2242+ #define ICE_AQC_GET_CGU_DPLL_STATUS_EEC_MODE_UNKNOWN 0xF
2243+ u8 rsvd [1 ];
2244+ __le16 node_handle ;
2245+ };
2246+
2247+ /* Set CGU DPLL config (direct 0x0C67) */
2248+ struct ice_aqc_set_cgu_dpll_config {
2249+ u8 dpll_num ;
2250+ u8 ref_state ;
2251+ #define ICE_AQC_SET_CGU_DPLL_CONFIG_REF_SW_LOS BIT(0)
2252+ #define ICE_AQC_SET_CGU_DPLL_CONFIG_REF_SW_SCM BIT(1)
2253+ #define ICE_AQC_SET_CGU_DPLL_CONFIG_REF_SW_CFM BIT(2)
2254+ #define ICE_AQC_SET_CGU_DPLL_CONFIG_REF_SW_GST BIT(3)
2255+ #define ICE_AQC_SET_CGU_DPLL_CONFIG_REF_SW_PFM BIT(4)
2256+ #define ICE_AQC_SET_CGU_DPLL_CONFIG_REF_FLOCK_EN BIT(5)
2257+ #define ICE_AQC_SET_CGU_DPLL_CONFIG_REF_SW_ESYNC BIT(6)
2258+ u8 rsvd ;
2259+ u8 config ;
2260+ #define ICE_AQC_SET_CGU_DPLL_CONFIG_CLK_REF_SEL ICE_M(0x1F, 0)
2261+ #define ICE_AQC_SET_CGU_DPLL_CONFIG_MODE_SHIFT 5
2262+ #define ICE_AQC_SET_CGU_DPLL_CONFIG_MODE \
2263+ ICE_M(0x7, ICE_AQC_SET_CGU_DPLL_CONFIG_MODE_SHIFT)
2264+ #define ICE_AQC_SET_CGU_DPLL_CONFIG_MODE_FREERUN 0
2265+ #define ICE_AQC_SET_CGU_DPLL_CONFIG_MODE_AUTOMATIC \
2266+ ICE_M(0x3, ICE_AQC_SET_CGU_DPLL_CONFIG_MODE_SHIFT)
2267+ u8 rsvd2 [8 ];
2268+ u8 eec_mode ;
2269+ u8 rsvd3 [1 ];
2270+ __le16 node_handle ;
2271+ };
2272+
2273+ /* Set CGU reference priority (direct 0x0C68) */
2274+ struct ice_aqc_set_cgu_ref_prio {
2275+ u8 dpll_num ;
2276+ u8 ref_idx ;
2277+ u8 ref_priority ;
2278+ u8 rsvd [11 ];
2279+ __le16 node_handle ;
2280+ };
2281+
2282+ /* Get CGU reference priority (direct 0x0C69) */
2283+ struct ice_aqc_get_cgu_ref_prio {
2284+ u8 dpll_num ;
2285+ u8 ref_idx ;
2286+ u8 ref_priority ; /* Valid only in response */
2287+ u8 rsvd [13 ];
2288+ };
2289+
2290+ /* Get CGU info (direct 0x0C6A) */
2291+ struct ice_aqc_get_cgu_info {
2292+ __le32 cgu_id ;
2293+ __le32 cgu_cfg_ver ;
2294+ __le32 cgu_fw_ver ;
2295+ u8 node_part_num ;
2296+ u8 dev_rev ;
2297+ __le16 node_handle ;
2298+ };
2299+
20822300/* Driver Shared Parameters (direct, 0x0C90) */
20832301struct ice_aqc_driver_shared_params {
20842302 u8 set_or_get_op ;
@@ -2148,6 +2366,8 @@ struct ice_aq_desc {
21482366 struct ice_aqc_get_phy_caps get_phy ;
21492367 struct ice_aqc_set_phy_cfg set_phy ;
21502368 struct ice_aqc_restart_an restart_an ;
2369+ struct ice_aqc_set_phy_rec_clk_out set_phy_rec_clk_out ;
2370+ struct ice_aqc_get_phy_rec_clk_out get_phy_rec_clk_out ;
21512371 struct ice_aqc_gpio read_write_gpio ;
21522372 struct ice_aqc_sff_eeprom read_write_sff_param ;
21532373 struct ice_aqc_set_port_id_led set_port_id_led ;
@@ -2187,6 +2407,15 @@ struct ice_aq_desc {
21872407 struct ice_aqc_fw_logging fw_logging ;
21882408 struct ice_aqc_get_clear_fw_log get_clear_fw_log ;
21892409 struct ice_aqc_download_pkg download_pkg ;
2410+ struct ice_aqc_set_cgu_input_config set_cgu_input_config ;
2411+ struct ice_aqc_get_cgu_input_config get_cgu_input_config ;
2412+ struct ice_aqc_set_cgu_output_config set_cgu_output_config ;
2413+ struct ice_aqc_get_cgu_output_config get_cgu_output_config ;
2414+ struct ice_aqc_get_cgu_dpll_status get_cgu_dpll_status ;
2415+ struct ice_aqc_set_cgu_dpll_config set_cgu_dpll_config ;
2416+ struct ice_aqc_set_cgu_ref_prio set_cgu_ref_prio ;
2417+ struct ice_aqc_get_cgu_ref_prio get_cgu_ref_prio ;
2418+ struct ice_aqc_get_cgu_info get_cgu_info ;
21902419 struct ice_aqc_driver_shared_params drv_shared_params ;
21912420 struct ice_aqc_set_mac_lb set_mac_lb ;
21922421 struct ice_aqc_alloc_free_res_cmd sw_res_ctrl ;
@@ -2310,6 +2539,8 @@ enum ice_adminq_opc {
23102539 ice_aqc_opc_get_link_status = 0x0607 ,
23112540 ice_aqc_opc_set_event_mask = 0x0613 ,
23122541 ice_aqc_opc_set_mac_lb = 0x0620 ,
2542+ ice_aqc_opc_set_phy_rec_clk_out = 0x0630 ,
2543+ ice_aqc_opc_get_phy_rec_clk_out = 0x0631 ,
23132544 ice_aqc_opc_get_link_topo = 0x06E0 ,
23142545 ice_aqc_opc_read_i2c = 0x06E2 ,
23152546 ice_aqc_opc_write_i2c = 0x06E3 ,
@@ -2364,6 +2595,18 @@ enum ice_adminq_opc {
23642595 ice_aqc_opc_update_pkg = 0x0C42 ,
23652596 ice_aqc_opc_get_pkg_info_list = 0x0C43 ,
23662597
2598+ /* 1588/SyncE commands/events */
2599+ ice_aqc_opc_get_cgu_abilities = 0x0C61 ,
2600+ ice_aqc_opc_set_cgu_input_config = 0x0C62 ,
2601+ ice_aqc_opc_get_cgu_input_config = 0x0C63 ,
2602+ ice_aqc_opc_set_cgu_output_config = 0x0C64 ,
2603+ ice_aqc_opc_get_cgu_output_config = 0x0C65 ,
2604+ ice_aqc_opc_get_cgu_dpll_status = 0x0C66 ,
2605+ ice_aqc_opc_set_cgu_dpll_config = 0x0C67 ,
2606+ ice_aqc_opc_set_cgu_ref_prio = 0x0C68 ,
2607+ ice_aqc_opc_get_cgu_ref_prio = 0x0C69 ,
2608+ ice_aqc_opc_get_cgu_info = 0x0C6A ,
2609+
23672610 ice_aqc_opc_driver_shared_params = 0x0C90 ,
23682611
23692612 /* Standalone Commands/Events */
0 commit comments