Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp785216ybl; Fri, 24 Jan 2020 09:30:09 -0800 (PST) X-Google-Smtp-Source: APXvYqxIi/wIROQJ7w/mzVogASWyqaYBFBtHTJ+7g5K8cpvFVG2x4C9Rk0LeYHQ1PSvgA6RM59Ok X-Received: by 2002:a05:6808:681:: with SMTP id k1mr21529oig.143.1579887009525; Fri, 24 Jan 2020 09:30:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1579887009; cv=none; d=google.com; s=arc-20160816; b=nU4u133AwRpcjldx5zD+u8ztayRaPMgMZ/J3xLGpKUcJFJ/3bNG2pI1qj22xFa9Rcf 2dLYgaptb791ivCOLetZkvr/TlgEIclR1u4F6v3Tsxsf8UiHuz1VbO4rBXWexFKIy4K3 UZGtHsLlpPokRihoBwVCg0YuSMxwwAD5tqnBlFiy0BHpZxm62x0c+EG5cHq9Kn6LmP2p wN5l8GIv3ZVN6J7nW5JTZnNSeXdbpegEK3abSfsAnJTz5YZCxTydY053SjG4DT0jQ3eF vVgXcMk3ZgBypEMX6VJ0M0c1Lf3efpMDsFVazV/4UfuErBy5FLzRS2WgYyw5xyulip/w FJ9g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=H1rXndHIX41XQidkzRR56LvihqfzPceE41yy6SzAMUk=; b=BWQCUX5BB2GjTgBEnh1QMBU5e61hcM00aaqw6rpFnz17AqumM/uMeD5FRblSnZf6fd w8T5rq25uIlc2yVoic3SU1mh6lPGqyUUFN5wf0SArwu4EDdEKGl0T9egbVL2FZGT5fBl BDKPl6BvWK8cQ9/tyfWe9WiJPoD0oqkzahQeZesjIEZA9JtkTr1TvCr6lI1DVIyKJs74 bI1ramdWCy8ohbGqRiE8Psq4U3hpkLdFI3WhFbKnKRmo6SBxds8mX7OYeY24ceSDhcmu VdhnBeEn5/4BpIS0bJtQ/wu9PhpTr+1fX9k3Jfe0NbE+n36Mj5CFNEEKp1lPofz/weZe BJ2Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=hKD6D1Df; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l9si3384483oti.229.2020.01.24.09.29.57; Fri, 24 Jan 2020 09:30:09 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=hKD6D1Df; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2390478AbgAXLRM (ORCPT + 99 others); Fri, 24 Jan 2020 06:17:12 -0500 Received: from mail.kernel.org ([198.145.29.99]:54076 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1733082AbgAXLRL (ORCPT ); Fri, 24 Jan 2020 06:17:11 -0500 Received: from localhost (ip-213-127-102-57.ip.prioritytelecom.net [213.127.102.57]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 6DFB420708; Fri, 24 Jan 2020 11:17:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1579864631; bh=RJeEkwX1T8qdvdAUEK3an+nSjFvQlKmlFzM5QPGXXgU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=hKD6D1DfUr1FfYQSnQ1hG7osBle+0jKrTPEKmXa12Xw3egm2y16Y2WudGTRjOK6/m 9vdXKCVyMd6NNCaDmvSgBbLc2aNR6JvE0oBmqGN4VvidEeHV+RdTPiiGIrfZXHlJ4C IGTunVidtDbzrUJiZXDgNM71Gmnu5XNz3Heg81Ic= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Vladimir Oltean , Claudiu Manoil , Li Yang , Shawn Guo , Sasha Levin Subject: [PATCH 4.19 320/639] ARM: dts: ls1021: Fix SGMII PCS link remaining down after PHY disconnect Date: Fri, 24 Jan 2020 10:28:10 +0100 Message-Id: <20200124093127.122646308@linuxfoundation.org> X-Mailer: git-send-email 2.25.0 In-Reply-To: <20200124093047.008739095@linuxfoundation.org> References: <20200124093047.008739095@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Vladimir Oltean [ Upstream commit c7861adbe37f576931650ad8ef805e0c47564b9a ] 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'. Also, it changes compatible of mdio0 to "fsl,etsec2-mdio" to match mdio1 device. 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 Signed-off-by: Shawn Guo Signed-off-by: Sasha Levin --- arch/arm/boot/dts/ls1021a-twr.dts | 9 ++++++++- arch/arm/boot/dts/ls1021a.dtsi | 11 ++++++++++- 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/arch/arm/boot/dts/ls1021a-twr.dts b/arch/arm/boot/dts/ls1021a-twr.dts index f0c949d748331..ec5afad3efd8e 100644 --- a/arch/arm/boot/dts/ls1021a-twr.dts +++ b/arch/arm/boot/dts/ls1021a-twr.dts @@ -143,7 +143,7 @@ }; &enet0 { - tbi-handle = <&tbi1>; + tbi-handle = <&tbi0>; phy-handle = <&sgmii_phy2>; phy-connection-type = "sgmii"; status = "okay"; @@ -222,6 +222,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 f18490548c785..7e22309bccac7 100644 --- a/arch/arm/boot/dts/ls1021a.dtsi +++ b/arch/arm/boot/dts/ls1021a.dtsi @@ -584,7 +584,7 @@ }; mdio0: mdio@2d24000 { - compatible = "gianfar"; + compatible = "fsl,etsec2-mdio"; device_type = "mdio"; #address-cells = <1>; #size-cells = <0>; @@ -592,6 +592,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>; -- 2.20.1