aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/marvell/octeontx2/af/cgx_fw_if.h
AgeCommit message (Collapse)Author
2020-09-15octeontx2-af: Backport upstream changes.Rakesh Babu
commit abc3a5994008c7167275c2cbcc0f6d77874d8daa from git@git.assembla.com:cavium/WindRiver.linux.git Backported changes from upstream kernel sources. Signed-off-by: Rakesh Babu <rsaladi2@marvell.com> Change-Id: I1c6c5b9802bd0c701249e12011ea67589ea9890a Reviewed-on: https://sj1git1.cavium.com/c/IP/SW/kernel/linux/+/34589 Tested-by: sa_ip-sw-jenkins <sa_ip-sw-jenkins@marvell.com> Reviewed-by: Sunil Kovvuri Goutham <Sunil.Goutham@cavium.com> Signed-off-by: Ruiqiang Hao <Ruiqiang.Hao@windriver.com>
2020-06-16octeontx2-af: Reduce dependency on firmware command interface versionLinu Cherian
commit e5e5a527a901bdb2ca04f21c477d820f6d0e572a from git@git.assembla.com:cavium/WindRiver.linux.git Firmware interface version checks are now relaxed to major version. Major version would change only if there is structural change in existing commands that breaks functionality. This would make kernel driver backward/forward compatible with firmware as long as major version matches. Change-Id: Ibdb52cc62908f3dbfb84c4d97b98ec3118545f36 Signed-off-by: Linu Cherian <lcherian@marvell.com> Reviewed-on: https://sj1git1.cavium.com/c/IP/SW/kernel/linux/+/26747 Signed-off-by: Kevin Hao <kexin.hao@windriver.com>
2020-02-27octeontx2-af: Add new CGX_CMD to get PHY FEC statisticsFelix Manlunas
commit b1b525868f846e2599dd96ac881d8e483d162c0d from git@git.assembla.com:cavium/WindRiver.linux.git The stats are put in the shared data struct fwdata. A PHY driver indicates that it has FEC stats by setting the flag fwdata.phy.misc.has_fec_stats (for now, only the LIO3 card's 6141 PHY does this; all other PHYs clear that flag). On LIO3, FEC can be enabled at the PHY line-side only, never at the PHY host-side. So for LIO3, the ethtool FEC stats come from the PHY (not from CGX). Besides CGX_CMD_GET_PHY_FEC_STATS, also add CGX_CMD_PRBS and CGX_CMD_DISPLAY_EYE to enum cgx_cmd_id so that Linux's enum list is in sync with ATF's enum list. Change-Id: Ib0cb8e9315b88e3c3f1ddd16cae709f8837d4f1d Signed-off-by: Felix Manlunas <fmanlunas@marvell.com> Reviewed-on: https://sj1git1.cavium.com/18814 Reviewed-by: Sunil Kovvuri Goutham <Sunil.Goutham@cavium.com> Tested-by: Sunil Kovvuri Goutham <Sunil.Goutham@cavium.com> Signed-off-by: Kevin Hao <kexin.hao@windriver.com>
2020-02-27octeontx-af: Interface mode change feature via ethtoolChristina Jacob
commit eb65f5377da6cccad942ccb4c18819d8e3dc8a8a from git@git.assembla.com:cavium/WindRiver.linux.git Changes for supporting cgx link mode change using ethtool. Change-Id: I91cda92064ded056b074725016795f17aa114167 Signed-off-by: Christina Jacob <cjacob@marvell.com> Reviewed-on: https://sj1git1.cavium.com/15606 Reviewed-by: Sunil Kovvuri Goutham <Sunil.Goutham@cavium.com> Tested-by: Sunil Kovvuri Goutham <Sunil.Goutham@cavium.com> Signed-off-by: Xiaotao Yin <xiaotao.yin@windriver.com>
2020-02-27octeontx2-af: Introduce SET_LINK_MODE command to change various ↵Christina Jacob
configurations of a network interface. commit dd5f07b9184eba3fd4f9bc4cdc00dedb0e70d7b4 from git@git.assembla.com:cavium/WindRiver.linux.git Command to change configurations like speed, duplex, autonegotiation of a network interface Change-Id: Idaca9c3b5509230ad22a50be9bec3973703e92d0 Signed-off-by: Christina Jacob <cjacob@marvell.com> Reviewed-on: https://sj1git1.cavium.com/13566 Reviewed-by: Sunil Kovvuri Goutham <Sunil.Goutham@cavium.com> Tested-by: Sunil Kovvuri Goutham <Sunil.Goutham@cavium.com> Signed-off-by: Xiaotao Yin <xiaotao.yin@windriver.com>
2020-02-27octeontx2-af: Add new CGX_CMDs to set and get PHY modulation typeFelix Manlunas
commit d01dbb0b51a1d9f4ef9f33d738d908441c432a98 from git@git.assembla.com:cavium/WindRiver.linux.git Implement commands to set and get PHY line-side modulation type (NRZ or PAM4) from firmware. Change-Id: I9887db1e96a09985e49ff444d5ef3797c09ad23c Signed-off-by: Felix Manlunas <fmanlunas@marvell.com> Signed-off-by: Xiaotao Yin <xiaotao.yin@windriver.com>
2020-02-27octeontx2-af: Support to get link info like current speed, fec etcChristina Jacob
commit 35d204387543bd8f8f2f0c7a8d2e54554d380235 from git@git.assembla.com:cavium/WindRiver.linux.git - Implements CGX_FW_DATA_GET command to get the cgx link info shared from atf. - Implement CGX_FEC_SET mailbox message to set current FEC value. - Update the link status structre in cgx with additional information such as the port type, current fec etc. Change-Id: I0b1036925836364c0bde5a7f1ca15a2e4c07b8c0 Signed-off-by: Christina Jacob <cjacob@marvell.com> Signed-off-by: Xiaotao Yin <xiaotao.yin@windriver.com>
2020-02-27octeontx2-af: Add support for importing firmware dataLinu Cherian
commit 40a9a9cc5bc5b162f72c31386f715373daf66f01 from git@git.assembla.com:cavium/WindRiver.linux.git Firmware data is essentially a block of one time configuration data exported from firmware to kernel through shared memory. Base address of this memory is obtained through CGX firmware interface commands. With this in place, MAC address of CGX mapped functions are inited from firmware data if available else they are inited with random MAC address. Change-Id: I51e8cd0c4cac66f89f6411587ccc418bc3c08394 Signed-off-by: Linu Cherian <lcherian@marvell.com> Signed-off-by: Xiaotao Yin <xiaotao.yin@windriver.com>
2020-02-27octeontx2-af: Update CGX speed mapping table for 80GLinu Cherian
commit c26931380749c060c7d9fa3b32783be153059490 from git@git.assembla.com:cavium/WindRiver.linux.git Added 80G link speed map. Change-Id: I7e220a3f6988dda3db2fe01f9b3c12bf03e9c84e Signed-off-by: Linu Cherian <lcherian@marvell.com> Signed-off-by: Nithya Mani <nmani@marvell.com> Signed-off-by: Xiaotao Yin <xiaotao.yin@windriver.com>
2020-02-27octeontx2-af: Misc CGX changesLinu Cherian
commit ae9e1b84cc9bd8420de45256abd9feccd5845a3a from git@git.assembla.com:cavium/WindRiver.linux.git - Add SPUX_MARKER_LOCK_FAIL in cgx error list - Add necessary error checks in nix_link_config - Also removed link status debug message, as PF/VF drivers will anyway have their messages, this would be a unnecessary duplicate msg. Change-Id: I8282b9fe11ffdd04b6cb1d87db7b8081c9dfd2df Signed-off-by: Linu Cherian <lcherian@marvell.com> Signed-off-by: Xiaotao Yin <xiaotao.yin@windriver.com>
2019-11-16octeontx2-af: Use the correct style for SPDX License IdentifierNishad Kamdar
This patch corrects the SPDX License Identifier style in header files related to Marvell OcteonTX2 network devices. It uses an expilict block comment for the SPDX License Identifier. Changes made by using a script provided by Joe Perches here: https://lkml.org/lkml/2019/2/7/46. Suggested-by: Joe Perches <joe@perches.com> Signed-off-by: Nishad Kamdar <nishadkamdar@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2018-12-03octeontx2-af: Enable mkex profileVamsi Attunuru
The following set of NPC registers allow the driver to configure NPC to generate different key value schemes to compare against packet payload in MCAM search. NPC_AF_INTF(0..1)_KEX_CFG NPC_AF_KEX_LDATA(0..1)_FLAGS_CFG NPC_AF_INTF(0..1)_LID(0..7)_LT(0..15)_LD(0..1)_CFG NPC_AF_INTF(0..1)_LDATA(0..1)_FLAGS(0..15)_CFG Currently, the AF driver populates these registers to configure the default values to address the most common use cases such as key generation for channel number + DMAC. The secure firmware stores different configuration value of these registers to enable different NPC use case along with the name for the lookup. Patch loads profile binary from secure firmware over the exiting CGX mailbox interface and apply the profile. AF driver shall fall back to the default configuration in case of any errors. The AF consumer driver can know the selected profile on response to NPC_GET_KEX_CFG mailbox by introducing mkex_pfl_name in the struct npc_get_kex_cfg_rsp. Signed-off-by: Vamsi Attunuru <vamsi.attunuru@marvell.com> Signed-off-by: Jerin Jacob <jerinj@marvell.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2018-11-23octeontx2-af: Misc cleanups in cgx driverLinu Cherian
* Do CGX init before NIX init This would add consistency in NIX code that depends on cgx ports * Few other misc cleanups - rvu_cgx_probe renamed as rvu_cgx_init for consistency - rvu_cgx_exit wrapper added to take care of the exit path - Added error check on cgx_lmac_event_handler_init - Minor cleanups in cgx.h related to tab alignment - Removed redundant ids from enum cgx_cmd_id Signed-off-by: Linu Cherian <lcherian@marvell.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2018-10-10octeontx2-af: Add support for CGX link managementLinu Cherian
CGX LMAC initialization, link status polling etc is done by low level secure firmware. For link management this patch adds a interface or communication mechanism between firmware and this kernel CGX driver. - Firmware interface specification is defined in cgx_fw_if.h. - Support to send/receive commands/events to/form firmware. - events/commands implemented * link up * link down * reading firmware version Signed-off-by: Linu Cherian <lcherian@marvell.com> Signed-off-by: Nithya Mani <nmani@marvell.com> Signed-off-by: Sunil Goutham <sgoutham@marvell.com> Signed-off-by: David S. Miller <davem@davemloft.net>