From patchwork Wed May 22 19:57:16 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Heiner Kallweit X-Patchwork-Id: 10956677 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 3560A1395 for ; Wed, 22 May 2019 19:58:51 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3F4EC1FEBA for ; Wed, 22 May 2019 19:58:51 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 304C51FF65; Wed, 22 May 2019 19:58:51 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,DKIM_VALID,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id BF1E71FEBA for ; Wed, 22 May 2019 19:58:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:Date: Message-ID:References:To:From:Subject:Reply-To:Content-ID:Content-Description :Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=aFOu4MHxRCNvyTD1zRhWkpgUfQAzw0RngmiGx/W0pPs=; b=nGYmkBi3ENT8+U qTof7y2RY9/kwq+JG+Lk5PYMG455KMeP1q0XfOxFdH99ElJZ+q1CU8kJYAgeBuygXFZiZfC5wCwCk TCwTMzN3wtXG9Hjekcqes90ZGFmqXS5CtIYny1ORly7ZanJASu7zeaHSs/wkrAasw9qfM0UsIY9+7 ooKzrjDSxEr77rMdv0Pkq8xGQ/qb8WJ2Xr8HZZK5f3pxo/SLP3rLM6uS/56h+fE+3EpWi4FYRrRcu SjXXBLmdUbZ3Ycmzoljo/2mmK9Z2P3h2I+8rdUFfT6tXH5wEm+ra4f5gIWydtlzclpT1m6yFWig04 aqLZXPxQc5bHsg3kTAqA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1hTXNq-0000Ea-IQ; Wed, 22 May 2019 19:58:42 +0000 Received: from mail-wm1-x344.google.com ([2a00:1450:4864:20::344]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1hTXNn-0000DY-RN for linux-arm-kernel@lists.infradead.org; Wed, 22 May 2019 19:58:41 +0000 Received: by mail-wm1-x344.google.com with SMTP id j187so5479377wma.1 for ; Wed, 22 May 2019 12:58:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:from:to:cc:references:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=C4CpDQKXaTSWK266x4L54FFna7lnQA4Dh6pv535OwUk=; b=Ww/IA8ZeGY3Q177k7ssd5U53pRIf6TWG2NUBdLTxG8RRTY8aYyrz5zTyda4l2X92oH lr9JQg3pRSEIUvGgXYYy8y4yUsjjPxQIsNoIjcxR6+TJdfjjCs3soco11VajMuRrb1DX LyfwMXPPLlB/33YrKko2Kgw5rZec1ZAdCwZK35WgT91iyeHqSoK2zs3Smc+TAyDRN9kX 1fMICw3s87isNGyQXlwllYSiYlZUg3/dAziaK3ki7jebjXIgqSQ0QytwfRUBx6b0TOlo NHg9RoROjuhsa5RNs6v3ygvFcFm1wFlZ3D/cIwAMFykh9n4HsqLgXRxjomEPNWEI67ho gyxA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:from:to:cc:references:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=C4CpDQKXaTSWK266x4L54FFna7lnQA4Dh6pv535OwUk=; b=QpFCETRZK1hRDQ0qtPpD0TK3FEgXpZPzExbgVMH7UyomObQRO3vIdAZFnzNHp2XFG0 eGm9CG7SH5qLI+MlHaDIMFG218VrxRIbKbl2Q7DVkLRc/26i3K7iHNYK6qkmqb7pvWl8 priqhL6uoXdihDUhUrkqXK4VmxntYzKba2p4W68XK9RAesLzqj8MTz6KAyy/tzRduxhQ y4CNTISWW89DSp04gzfKzA0K3+b5AoPfvdRkX5MfpUSC3VuVUOXqHshQL5d89DtK5su1 y8XbWvcNEYsmezdZ7BnvxDKNBBxQA1WS5oP+Ie/h9EbOyWjiJjRsk/U8J39uYTuaZNWy wLvQ== X-Gm-Message-State: APjAAAWTTesldr4tBB5UxTK/4Sjr2wGXBDNNQfZcRmfVPRhVC5AyGJNu Fqur8MqPwJb9TGCbf/wvjBwr2DE4 X-Google-Smtp-Source: APXvYqxGmLfjW4idvI28Xtos3cDOqZEsrTIjciSA10Zil7RN3IqnHOyBgzku7F2zTiraeYs0HyEhkw== X-Received: by 2002:a1c:6783:: with SMTP id b125mr8715351wmc.41.1558555117740; Wed, 22 May 2019 12:58:37 -0700 (PDT) Received: from ?IPv6:2003:ea:8bd4:5700:3029:8954:1431:dc1e? (p200300EA8BD45700302989541431DC1E.dip0.t-ipconnect.de. [2003:ea:8bd4:5700:3029:8954:1431:dc1e]) by smtp.googlemail.com with ESMTPSA id y132sm12021821wmd.35.2019.05.22.12.58.36 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 22 May 2019 12:58:37 -0700 (PDT) Subject: [PATCH net-next 1/2] net: phy: add interface mode PHY_INTERFACE_MODE_USXGMII From: Heiner Kallweit To: Madalin-cristian Bucur , Shawn Guo , Li Yang , Rob Herring , Mark Rutland , Andrew Lunn , Florian Fainelli , David Miller References: <110a1e45-56a7-a646-7b63-f39fe3083c28@gmail.com> Message-ID: Date: Wed, 22 May 2019 21:57:16 +0200 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 MIME-Version: 1.0 In-Reply-To: <110a1e45-56a7-a646-7b63-f39fe3083c28@gmail.com> Content-Language: en-US X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190522_125839_951416_272A0886 X-CRM114-Status: GOOD ( 13.51 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: "netdev@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" , "devicetree@vger.kernel.org" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Add support for interface mode PHY_INTERFACE_MODE_USXGMII. Signed-off-by: Heiner Kallweit Reviewed-by: Florian Fainelli --- include/linux/phy.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/include/linux/phy.h b/include/linux/phy.h index 073fb151b..7180b1d1e 100644 --- a/include/linux/phy.h +++ b/include/linux/phy.h @@ -103,6 +103,7 @@ typedef enum { PHY_INTERFACE_MODE_XAUI, /* 10GBASE-KR, XFI, SFI - single lane 10G Serdes */ PHY_INTERFACE_MODE_10GKR, + PHY_INTERFACE_MODE_USXGMII, PHY_INTERFACE_MODE_MAX, } phy_interface_t; @@ -178,6 +179,8 @@ static inline const char *phy_modes(phy_interface_t interface) return "xaui"; case PHY_INTERFACE_MODE_10GKR: return "10gbase-kr"; + case PHY_INTERFACE_MODE_USXGMII: + return "usxgmii"; default: return "unknown"; } From patchwork Wed May 22 19:58:32 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Heiner Kallweit X-Patchwork-Id: 10956679 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id DD97C1395 for ; Wed, 22 May 2019 19:58:58 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E899A1FF3E for ; Wed, 22 May 2019 19:58:58 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id DC8991FF82; Wed, 22 May 2019 19:58:58 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,DKIM_VALID,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 802CE1FF3E for ; Wed, 22 May 2019 19:58:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:Date: Message-ID:References:To:From:Subject:Reply-To:Content-ID:Content-Description :Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=JCP3/xzH/Y5LTasfVEGTl97f+QwlQlQED78XhCEHfms=; b=RioAGZpZaWpT7N H265u/wW2Wu4tpLo/4SqKqRe+Z6It4Q61WgiQfd5H3svZ4uz25G3tJsRD/Rmhu7LOSMs764dqjmKn OEvU6L22bzS14s4blgkGsgyjNYbGrYo9kOeY7kW64QAuqMNrAl8fr8ldzOZ5keUxun7olJMQ+Cqz0 yGZAS+eaxS0G18pYFHFjnbCALRAm2VyYofXKHvw2aLgAMVAjsOF09po/iuGpIOpH74o7iY0vEJReB QLRhm+5ZZmmP7Zn0FOYKMxXV4CQtrG398Xn80642hBAewdnCYSdRTnHM2msAQ8Ubh9bJUqjwjZU02 D0m+Zxoho1di8OvMkWfg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1hTXO1-0000R6-7B; Wed, 22 May 2019 19:58:53 +0000 Received: from mail-wr1-x444.google.com ([2a00:1450:4864:20::444]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1hTXNp-0000Dj-Ap for linux-arm-kernel@lists.infradead.org; Wed, 22 May 2019 19:58:42 +0000 Received: by mail-wr1-x444.google.com with SMTP id g12so262857wro.8 for ; Wed, 22 May 2019 12:58:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:from:to:cc:references:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=g1DmrJlOLku8E3I8oZwgTYcADUuj7Aq6P5SSPkrvsoo=; b=KahAeuoY6RPMjOeOSjxdHwH78OBfIeVDAuHsN1cyR/4SrtUU7pR9GOGCKHUAoGWJCI qgMBveRGFAej90StDrhHQzQKYdS15NV50m8hDD6PzId0JjHxafeNAdPq46nK+eHJiTR/ pIhD7ke+VVHOOpQiVn4AEmSOvwMEApWpN36N4QJWQF/05xAvTD2YxqOviIRQxKTJJk6S /rrJdEPhCY3QUyDlWU6XSBl936wX7gUOZvyAQCjkeu5X7tUbSoPJjpTh4HfxjRr+iNcu w/Sfa4ZDAgqNlVnE2NzijbwMmXtd1k3W0R6ZHk14Xr/TaiYDNUQ4wX8a1i+wKjKCvvZt O2vQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:from:to:cc:references:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=g1DmrJlOLku8E3I8oZwgTYcADUuj7Aq6P5SSPkrvsoo=; b=rH49LVuxu2gl1v3nqlhGWZqwkZM7e8Ee5xe5UvN9Jg2922uoYQ+ne/YLvzdbbw9PHr CHnb/NMu38A/4ohv7XVTVk9POGxBAAK1yTObRyu5LiYsQCLRST3kKDCMkkt+NKbolkRf M8v3togJIyWGBiQ7EnSZZPHG2akWPZcidziamiNBnT4j8QmNXmP1Pi+SHVfBxYHKTXmm HuGvSv6i/Gy454bOEJ1iaA5zkmdLI9/fmSog2pcgWDVTIOFCAmsKI4HwgF5Q9Bexkcoy +ESqVk4UDhS3Sys3oqyFSi3NsB9AmAQzjjYvx+gfmYaJrWr32/ULs7e3MK7nAjAsSrwz VrBA== X-Gm-Message-State: APjAAAXB23QD0+HDQmFpNC+mDbyH6BUYyaFarox6n+xscBGi1Sc2OsE9 r5vi1FK8Y3NjdL30v6S2BzQ= X-Google-Smtp-Source: APXvYqzeJaVgpDVaeK6cbzvhz3KyzXjThTUPOYvRGfCdDwJqXeHidd/sGH+/GZkbjODnwb9Mf0mVkA== X-Received: by 2002:adf:8385:: with SMTP id 5mr41014547wre.194.1558555119239; Wed, 22 May 2019 12:58:39 -0700 (PDT) Received: from ?IPv6:2003:ea:8bd4:5700:3029:8954:1431:dc1e? (p200300EA8BD45700302989541431DC1E.dip0.t-ipconnect.de. [2003:ea:8bd4:5700:3029:8954:1431:dc1e]) by smtp.googlemail.com with ESMTPSA id j82sm9102066wmj.40.2019.05.22.12.58.38 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 22 May 2019 12:58:38 -0700 (PDT) Subject: [PATCH net-next 2/2] net: phy: aquantia: add USXGMII support From: Heiner Kallweit To: Madalin-cristian Bucur , Shawn Guo , Li Yang , Rob Herring , Mark Rutland , Andrew Lunn , Florian Fainelli , David Miller References: <110a1e45-56a7-a646-7b63-f39fe3083c28@gmail.com> Message-ID: <2c68bdb1-9b53-ce0b-74d3-c7ea2d9e7ac0@gmail.com> Date: Wed, 22 May 2019 21:58:32 +0200 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 MIME-Version: 1.0 In-Reply-To: <110a1e45-56a7-a646-7b63-f39fe3083c28@gmail.com> Content-Language: en-US X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190522_125841_381649_CDF8F94B X-CRM114-Status: GOOD ( 18.56 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: "netdev@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" , "devicetree@vger.kernel.org" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP So far we didn't support mode USXGMII, and in order to not break the two Freescale boards mode XGMII was accepted for the AQR107 family even though it doesn't support XGMII. Add USXGMII support to the Aquantia PHY driver and change the phy connection type for the two boards. As an additional note: Even though the handle is named aqr106 there seem to be LS1046A boards with an AQR107. Signed-off-by: Heiner Kallweit Reviewed-by: Florian Fainelli --- arch/arm64/boot/dts/freescale/fsl-ls1043a-rdb.dts | 2 +- arch/arm64/boot/dts/freescale/fsl-ls1046a-rdb.dts | 2 +- drivers/net/phy/aquantia_main.c | 6 +++++- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/arch/arm64/boot/dts/freescale/fsl-ls1043a-rdb.dts b/arch/arm64/boot/dts/freescale/fsl-ls1043a-rdb.dts index 4223a2352..c2ce1a611 100644 --- a/arch/arm64/boot/dts/freescale/fsl-ls1043a-rdb.dts +++ b/arch/arm64/boot/dts/freescale/fsl-ls1043a-rdb.dts @@ -139,7 +139,7 @@ ethernet@f0000 { /* 10GEC1 */ phy-handle = <&aqr105_phy>; - phy-connection-type = "xgmii"; + phy-connection-type = "usxgmii"; }; mdio@fc000 { diff --git a/arch/arm64/boot/dts/freescale/fsl-ls1046a-rdb.dts b/arch/arm64/boot/dts/freescale/fsl-ls1046a-rdb.dts index 6a6514d0e..f927a8a25 100644 --- a/arch/arm64/boot/dts/freescale/fsl-ls1046a-rdb.dts +++ b/arch/arm64/boot/dts/freescale/fsl-ls1046a-rdb.dts @@ -147,7 +147,7 @@ ethernet@f0000 { /* 10GEC1 */ phy-handle = <&aqr106_phy>; - phy-connection-type = "xgmii"; + phy-connection-type = "usxgmii"; }; ethernet@f2000 { /* 10GEC2 */ diff --git a/drivers/net/phy/aquantia_main.c b/drivers/net/phy/aquantia_main.c index 0fedd28fd..3f24c42a8 100644 --- a/drivers/net/phy/aquantia_main.c +++ b/drivers/net/phy/aquantia_main.c @@ -27,6 +27,7 @@ #define MDIO_PHYXS_VEND_IF_STATUS_TYPE_MASK GENMASK(7, 3) #define MDIO_PHYXS_VEND_IF_STATUS_TYPE_KR 0 #define MDIO_PHYXS_VEND_IF_STATUS_TYPE_XFI 2 +#define MDIO_PHYXS_VEND_IF_STATUS_TYPE_USXGMII 3 #define MDIO_PHYXS_VEND_IF_STATUS_TYPE_SGMII 6 #define MDIO_PHYXS_VEND_IF_STATUS_TYPE_OCSGMII 10 @@ -360,6 +361,9 @@ static int aqr107_read_status(struct phy_device *phydev) case MDIO_PHYXS_VEND_IF_STATUS_TYPE_XFI: phydev->interface = PHY_INTERFACE_MODE_10GKR; break; + case MDIO_PHYXS_VEND_IF_STATUS_TYPE_USXGMII: + phydev->interface = PHY_INTERFACE_MODE_USXGMII; + break; case MDIO_PHYXS_VEND_IF_STATUS_TYPE_SGMII: phydev->interface = PHY_INTERFACE_MODE_SGMII; break; @@ -487,7 +491,7 @@ static int aqr107_config_init(struct phy_device *phydev) /* Check that the PHY interface type is compatible */ if (phydev->interface != PHY_INTERFACE_MODE_SGMII && phydev->interface != PHY_INTERFACE_MODE_2500BASEX && - phydev->interface != PHY_INTERFACE_MODE_XGMII && + phydev->interface != PHY_INTERFACE_MODE_USXGMII && phydev->interface != PHY_INTERFACE_MODE_10GKR) return -ENODEV;