X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=include%2Fphy_interface.h;h=882e4af8ffd55dbad6390902662e71c530f20cef;hb=6864fc8704661878294d1f0f981f47e864ef470f;hp=0760d65de518f1a900b3002b15fb8fb88348ffb6;hpb=a57d45db90c8de2959b4484cc8f6ba81219a2269;p=platform%2Fkernel%2Fu-boot.git diff --git a/include/phy_interface.h b/include/phy_interface.h index 0760d65..882e4af 100644 --- a/include/phy_interface.h +++ b/include/phy_interface.h @@ -1,6 +1,7 @@ /* SPDX-License-Identifier: GPL-2.0+ */ /* * Copyright 2011 Freescale Semiconductor, Inc. + * Copyright 2020 NXP * Andy Fleming * * This file pretty much stolen from Linux's mii.h/ethtool.h/phy.h @@ -27,6 +28,13 @@ typedef enum { PHY_INTERFACE_MODE_RXAUI, PHY_INTERFACE_MODE_SFI, PHY_INTERFACE_MODE_INTERNAL, + PHY_INTERFACE_MODE_25G_AUI, + PHY_INTERFACE_MODE_XLAUI, + PHY_INTERFACE_MODE_CAUI2, + PHY_INTERFACE_MODE_CAUI4, + PHY_INTERFACE_MODE_NCSI, + PHY_INTERFACE_MODE_XFI, + PHY_INTERFACE_MODE_USXGMII, PHY_INTERFACE_MODE_NONE, /* Must be last */ PHY_INTERFACE_MODE_COUNT, @@ -50,9 +58,25 @@ static const char * const phy_interface_strings[] = { [PHY_INTERFACE_MODE_RXAUI] = "rxaui", [PHY_INTERFACE_MODE_SFI] = "sfi", [PHY_INTERFACE_MODE_INTERNAL] = "internal", + [PHY_INTERFACE_MODE_25G_AUI] = "25g-aui", + [PHY_INTERFACE_MODE_XLAUI] = "xlaui4", + [PHY_INTERFACE_MODE_CAUI2] = "caui2", + [PHY_INTERFACE_MODE_CAUI4] = "caui4", + [PHY_INTERFACE_MODE_NCSI] = "NC-SI", + [PHY_INTERFACE_MODE_XFI] = "xfi", + [PHY_INTERFACE_MODE_USXGMII] = "usxgmii", [PHY_INTERFACE_MODE_NONE] = "", }; +/* Backplane modes: + * are considered a sub-type of phy_interface_t: XGMII + * and are specified in "phy-connection-type" with one of the following strings + */ +static const char * const backplane_mode_strings[] = { + "10gbase-kr", + "40gbase-kr4", +}; + static inline const char *phy_string_for_interface(phy_interface_t i) { /* Default to unknown */ @@ -62,4 +86,17 @@ static inline const char *phy_string_for_interface(phy_interface_t i) return phy_interface_strings[i]; } +static inline bool is_backplane_mode(const char *phyconn) +{ + int i; + + if (!phyconn) + return false; + for (i = 0; i < ARRAY_SIZE(backplane_mode_strings); i++) { + if (!strcmp(phyconn, backplane_mode_strings[i])) + return true; + } + return false; +} + #endif /* _PHY_INTERFACE_H */