From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 9810AA04DD; Wed, 28 Oct 2020 04:24:40 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id BD10FBE5B; Wed, 28 Oct 2020 04:20:12 +0100 (CET) Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by dpdk.org (Postfix) with ESMTP id 5C984AA1F for ; Wed, 28 Oct 2020 04:20:00 +0100 (CET) IronPort-SDR: Ri77+OkpaoLX9o2fi5O3CZdYD6+DD1rTZzi9J1W1LY5AQ1yHlE7mQc1JqcsJjqdEKGMMHHSlbN GoY3M5DDzR6g== X-IronPort-AV: E=McAfee;i="6000,8403,9787"; a="148052812" X-IronPort-AV: E=Sophos;i="5.77,425,1596524400"; d="scan'208";a="148052812" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Oct 2020 20:19:59 -0700 IronPort-SDR: 9yldFQf+8cf2NArrNJ8XqjV6SpDLseI+0fdV2KG2vVb1gCC9stveYvoANp2rnXUz2IkQ2WibND Z0Bf+l3SUTHw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.77,425,1596524400"; d="scan'208";a="526174499" Received: from dpdk51.sh.intel.com ([10.67.111.142]) by fmsmga005.fm.intel.com with ESMTP; 27 Oct 2020 20:19:58 -0700 From: Qi Zhang To: qiming.yang@intel.com Cc: dev@dpdk.org, Qi Zhang , Amir Shay Date: Wed, 28 Oct 2020 11:23:15 +0800 Message-Id: <20201028032320.1755208-17-qi.z.zhang@intel.com> X-Mailer: git-send-email 2.25.4 In-Reply-To: <20201028032320.1755208-1-qi.z.zhang@intel.com> References: <20201028032320.1755208-1-qi.z.zhang@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH v3 16/21] net/ice/base: support extended GPIO access X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Added two new admin commands called: SW Set GPIO and SW Get GPIO (0x6EF and 0x6F0 respectively) which extends GPIO handling capabilities by SW driver Signed-off-by: Amir Shay Signed-off-by: Qi Zhang --- drivers/net/ice/base/ice_adminq_cmd.h | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/drivers/net/ice/base/ice_adminq_cmd.h b/drivers/net/ice/base/ice_adminq_cmd.h index c105a445ee..f715fb0910 100644 --- a/drivers/net/ice/base/ice_adminq_cmd.h +++ b/drivers/net/ice/base/ice_adminq_cmd.h @@ -1635,6 +1635,22 @@ struct ice_aqc_sff_eeprom { __le32 addr_low; }; +/* SW Set GPIO command (indirect 0x6EF) + * SW Get GPIO command (indirect 0x6F0) + */ +struct ice_aqc_sw_gpio { + __le16 gpio_ctrl_handle; +#define ICE_AQC_SW_GPIO_CONTROLLER_HANDLE_S 0 +#define ICE_AQC_SW_GPIO_CONTROLLER_HANDLE_M (0x3FF << ICE_AQC_SW_GPIO_CONTROLLER_HANDLE_S) + u8 gpio_num; +#define ICE_AQC_SW_GPIO_NUMBER_S 0 +#define ICE_AQC_SW_GPIO_NUMBER_M (0x1F << ICE_AQC_SW_GPIO_NUMBER_S) + u8 gpio_params; +#define ICE_AQC_SW_GPIO_PARAMS_DIRECTION BIT(1) +#define ICE_AQC_SW_GPIO_PARAMS_VALUE BIT(0) + u8 rsvd[12]; +}; + /* NVM Read command (indirect 0x0701) * NVM Erase commands (direct 0x0702) * NVM Write commands (indirect 0x0703) @@ -2925,6 +2941,8 @@ enum ice_adminq_opc { ice_aqc_opc_set_gpio = 0x06EC, ice_aqc_opc_get_gpio = 0x06ED, ice_aqc_opc_sff_eeprom = 0x06EE, + ice_aqc_opc_sw_set_gpio = 0x06EF, + ice_aqc_opc_sw_get_gpio = 0x06F0, /* NVM commands */ ice_aqc_opc_nvm_read = 0x0701, -- 2.25.4