From patchwork Thu Apr 11 23:23:15 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vladimir Oltean X-Patchwork-Id: 10897081 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 9202C17EF for ; Thu, 11 Apr 2019 23:27:33 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7713828C9F for ; Thu, 11 Apr 2019 23:27:33 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6B88728E1A; Thu, 11 Apr 2019 23:27:33 +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 037E228C9F for ; Thu, 11 Apr 2019 23:27:33 +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:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=QXw34zJ4pWCRo2pBSn1SJTM68eeIsAOUIXmTt+LU7NE=; b=JnLu+8h3hgaRNJS6qILYl/hgfj rpGdYvSASSWGaQ2QBikY+s4NNA0yuU5uCL5eO57DVa+nOgTLGhiYYQdgTv5xAbUxcmBRq+gwmldxx /624MtsE8pd5AUf+a4THUHJvmPanZEd4Q97nNq6bZkGqQSxP9T+jFPi67ox77ZfIU567/jpKJId+Y 1znzMroW9ZXnb9YcesdAMG8zIzbk4A3rGWLEIOxgatW8OYEtN1yPTa2BXXdSker+/QSkJMCd7zAOO aBe6NVL0JT6MPWims58banB/EpM0UuRrZRbHgl3hB71FVEPt8vEWK31CCVX7eXlcxtkA/l4MfAQ0u MI9khBrw==; 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 1hEj6S-0000ho-1R; Thu, 11 Apr 2019 23:27:32 +0000 Received: from mail-wm1-x342.google.com ([2a00:1450:4864:20::342]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1hEj6G-0000VB-Hb for linux-arm-kernel@lists.infradead.org; Thu, 11 Apr 2019 23:27:21 +0000 Received: by mail-wm1-x342.google.com with SMTP id z11so8874680wmi.0 for ; Thu, 11 Apr 2019 16:27:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=/lbmnj1rLjQX0s5PohleCzRZ9gqTtd7gfwSug1zEu/Y=; b=LtK9KpmGjIiB33Vvtm1Jq2Kyjv0eMbMK+y8pzNetIlgS6n9PMPE79+c8Cg4TJ2dbnC KpV1nWM+zrLqxGRtkOMdsfolm8Vp6N4Osn8JYIJSuNwooMrcM1ZioUJ5fE0F/Bz9sDVs hnlEjBuqHknX1SaQGAtyR86/HHGJrS5Dc1WSXo3Qf3r1WrjuS7nocHz4QgmWiLuqbHBC trP4HmOKfPEaX3AGv9tnFIOD1GC0HsvOmOk0ZOfd7T4EZ5uAN4RsCkUGifmL8qUshfRm AEbXGXdtTrZPaehbG28GHKPNPy8DnFIZ0yqBQZH2dkaKDlSgnBygVBYdPN75SxwuWFHt wbCQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=/lbmnj1rLjQX0s5PohleCzRZ9gqTtd7gfwSug1zEu/Y=; b=c5ATozpV+fO86O/YqJlcducQ/hKJt6c65d0tCyr16LP65f4VqR79t/1pZ7k93SC4FU r8qxSaugmeFeGdl+zI2tAYGY9AsLjeYqDVjafujJcUlygiCYBrPq/xXcSAcfnm5EovNk nwWNbl73ZMc0N2B4QW/gpQ4h27hdwqY/z/ZKM0yAXENYqBJe3qkYCtttrsDhOMdI2ZNz KstUcbiMEZUHY209stfKHnsxLzPqL/RjyWdVU/xvir6MWdCL3y3Ro9vMRBTw8o5GW1XJ 8BuW2Jk5I2mTdqgw4sAi5YkR0m9wOkrQr5m2TJ/TEu/33m+IBE0Vv1/9e28AX21pNXv5 7YjQ== X-Gm-Message-State: APjAAAVrGnOE8rhL4g8ZR+EG36tEs7sIiLPzJihaQ+ostaPVzesfHe0c OowL82F1Ydnt8TIMYXvC/ZU= X-Google-Smtp-Source: APXvYqzJyM4x/CBFyK4kJB2ZrWNFiVb26+6ChkUAusDvQlTrygrfq3Gu147C02/ZxZQ6XzM76sI2NA== X-Received: by 2002:a05:600c:21d3:: with SMTP id x19mr8578973wmj.2.1555025238891; Thu, 11 Apr 2019 16:27:18 -0700 (PDT) Received: from localhost.localdomain (5-12-225-227.residential.rdsnet.ro. [5.12.225.227]) by smtp.gmail.com with ESMTPSA id g132sm6355642wme.3.2019.04.11.16.27.17 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 11 Apr 2019 16:27:18 -0700 (PDT) From: Vladimir Oltean To: shawnguo@kernel.org, leoyang.li@nxp.com, claudiu.manoil@nxp.com Subject: [PATCH v2 2/2] ARM: dts: ls1021: Fix SGMII PCS link remaining down after PHY disconnect Date: Fri, 12 Apr 2019 02:23:15 +0300 Message-Id: <20190411232315.19588-2-olteanv@gmail.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190411232315.19588-1-olteanv@gmail.com> References: <20190411232315.19588-1-olteanv@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190411_162720_579460_7E396587 X-CRM114-Status: GOOD ( 12.53 ) 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: devicetree@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, robh+dt@kernel.org, Vladimir Oltean , davem@davemloft.net, linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 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 Each eTSEC MAC has its own TBI (SGMII) PCS and private MDIO bus. But due to a DTS oversight, both SGMII-compatible MACs of the LS1021 SoC are pointing towards the same internal PCS. Therefore nobody is controlling the internal PCS of eTSEC0. Upon initial ndo_open, the SGMII link is ok by virtue of U-boot initialization. But upon an ifdown/ifup sequence, the code path from ndo_open -> init_phy -> gfar_configure_serdes does not get executed for the PCS of eTSEC0 (and is executed twice for MAC eTSEC1). So the SGMII link remains down for eTSEC0. On the LS1021A-TWR board, to signal this failure condition, the PHY driver keeps printing '803x_aneg_done: SGMII link is not ok'. Fixes: 055223d4d22d ("ARM: dts: ls1021a: Enable the eTSEC ports on QDS and TWR") Signed-off-by: Vladimir Oltean Reviewed-by: Claudiu Manoil Acked-by: Li Yang --- arch/arm/boot/dts/ls1021a-twr.dts | 9 ++++++++- arch/arm/boot/dts/ls1021a.dtsi | 9 +++++++++ 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/arch/arm/boot/dts/ls1021a-twr.dts b/arch/arm/boot/dts/ls1021a-twr.dts index 97e1fb7ea932..9b1fe99d55b1 100644 --- a/arch/arm/boot/dts/ls1021a-twr.dts +++ b/arch/arm/boot/dts/ls1021a-twr.dts @@ -145,7 +145,7 @@ }; &enet0 { - tbi-handle = <&tbi1>; + tbi-handle = <&tbi0>; phy-handle = <&sgmii_phy2>; phy-connection-type = "sgmii"; status = "okay"; @@ -225,6 +225,13 @@ sgmii_phy2: ethernet-phy@2 { reg = <0x2>; }; + tbi0: tbi-phy@1f { + reg = <0x1f>; + device_type = "tbi-phy"; + }; +}; + +&mdio1 { tbi1: tbi-phy@1f { reg = <0x1f>; device_type = "tbi-phy"; diff --git a/arch/arm/boot/dts/ls1021a.dtsi b/arch/arm/boot/dts/ls1021a.dtsi index 1a2a9509d9c2..89eab1fd1f7f 100644 --- a/arch/arm/boot/dts/ls1021a.dtsi +++ b/arch/arm/boot/dts/ls1021a.dtsi @@ -709,6 +709,15 @@ <0x0 0x2d10030 0x0 0x4>; }; + mdio1: mdio@2d64000 { + compatible = "fsl,etsec2-mdio"; + device_type = "mdio"; + #address-cells = <1>; + #size-cells = <0>; + reg = <0x0 0x2d64000 0x0 0x4000>, + <0x0 0x2d50030 0x0 0x4>; + }; + ptp_clock@2d10e00 { compatible = "fsl,etsec-ptp"; reg = <0x0 0x2d10e00 0x0 0xb0>;