From patchwork Mon Mar 25 09:30:58 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vladimir Oltean X-Patchwork-Id: 10868477 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 3597513B5 for ; Mon, 25 Mar 2019 09:31:51 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1678A29066 for ; Mon, 25 Mar 2019 09:31:51 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0A96B292AF; Mon, 25 Mar 2019 09:31: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_SIGNED, DKIM_VALID,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 712A229066 for ; Mon, 25 Mar 2019 09:31: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:MIME-Version: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:In-Reply-To:References: List-Owner; bh=8HPcWEf0DFMM7zSSx7SwfhzIVL3XVBU6on5eoMvFdCA=; b=P9uibOhfp4gat1 58NjgrgQLnmzhflmPhClpdYsm4tORW/1hOtFU+10KOjoPsu4uC22+gZDvN5vTFcTQU0jmMyWGxa1z 4Qzd1FEmm/Y14gRd5AFm0383buLvm34Q82Vt6llk8Y7ejGt3KdDO7cCLlCkVqrPu9FZV2az0oyJMC 3UnZ8dKCrn/9kMRGwA2wS7yOFGT5yYV0WylC85xuo829uxfJxLvU2v3a1D+lNq39FQtWdQ5QlbkbU 26D40PJOtxOtJyE8ZdBn/XpvFR717IEowJ/zvQY1j7gIynIkfna3PC5Q2gTK9/s00oZDNmtYedX0m tt3o/EZQt4yy2qGRKY9g==; 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 1h8LxL-00089D-KY; Mon, 25 Mar 2019 09:31:47 +0000 Received: from mail-eopbgr20061.outbound.protection.outlook.com ([40.107.2.61] helo=EUR02-VE1-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1h8Lwe-0007M0-Py for linux-arm-kernel@lists.infradead.org; Mon, 25 Mar 2019 09:31:09 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=ZMGjj8DEBrM1TwZWr9oOYH3d/mVjI1y5t+lANt0POas=; b=sFNJL44vtnLeXmH8Z6eNmELk/rte5hD43INkV55TUwE5K/vKc7hTgxZUK8z/p3Frsl2EqWsTjqX6+RLC0kXtPMF5AK9WA3vLtLiPaYkQ9jpUG8d3/e7TFiemjFfP6fbwxR+EtetZDzOlZPOsYJwKGfZ8oSStgDYaz7oTJ5kPd+A= Received: from DB7PR04MB5163.eurprd04.prod.outlook.com (20.176.235.75) by DB7PR04MB5308.eurprd04.prod.outlook.com (20.176.236.144) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1730.16; Mon, 25 Mar 2019 09:30:58 +0000 Received: from DB7PR04MB5163.eurprd04.prod.outlook.com ([fe80::6869:c937:7d2:d60b]) by DB7PR04MB5163.eurprd04.prod.outlook.com ([fe80::6869:c937:7d2:d60b%5]) with mapi id 15.20.1730.019; Mon, 25 Mar 2019 09:30:58 +0000 From: Vladimir Oltean To: "shawnguo@kernel.org" , Leo Li , Claudiu Manoil Subject: [PATCH] ARM: dts: ls1021: Fix SGMII PCS link remaining down after PHY disconnect Thread-Topic: [PATCH] ARM: dts: ls1021: Fix SGMII PCS link remaining down after PHY disconnect Thread-Index: AQHU4u10/As1+FdGfk+r8tl5GBIdhQ== Date: Mon, 25 Mar 2019 09:30:58 +0000 Message-ID: <1553506240-2584-1-git-send-email-vladimir.oltean@nxp.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-mailer: git-send-email 2.7.4 x-clientproxiedby: VI1PR03CA0071.eurprd03.prod.outlook.com (2603:10a6:803:50::42) To DB7PR04MB5163.eurprd04.prod.outlook.com (2603:10a6:10:1d::11) authentication-results: spf=none (sender IP is ) smtp.mailfrom=vladimir.oltean@nxp.com; x-ms-exchange-messagesentrepresentingtype: 1 x-originating-ip: [212.146.100.6] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: fefcc352-356e-420b-f935-08d6b10496ab x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600127)(711020)(4605104)(4618075)(2017052603328)(7153060)(7193020); SRVR:DB7PR04MB5308; x-ms-traffictypediagnostic: DB7PR04MB5308: x-microsoft-antispam-prvs: x-forefront-prvs: 0987ACA2E2 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(136003)(39860400002)(396003)(346002)(376002)(366004)(199004)(189003)(71200400001)(71190400001)(4326008)(102836004)(476003)(2616005)(486006)(97736004)(86362001)(44832011)(6506007)(14454004)(386003)(6512007)(6116002)(53936002)(26005)(68736007)(186003)(3846002)(256004)(14444005)(5660300002)(7736002)(305945005)(99286004)(6636002)(25786009)(316002)(478600001)(110136005)(54906003)(2906002)(106356001)(8936002)(2501003)(105586002)(66066001)(52116002)(6486002)(36756003)(50226002)(6436002)(81156014)(8676002)(81166006); DIR:OUT; SFP:1101; SCL:1; SRVR:DB7PR04MB5308; H:DB7PR04MB5163.eurprd04.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; received-spf: None (protection.outlook.com: nxp.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: l17En+ejIEF9Rele+N292iRCSRocbPow5b7oL1LtuwFBzq4yxaSeYNK0ExPCTmrIfQ3SyCOax0O5ZamybXJKMmtPFKjPeAUZ8Lot3btzHDBwN9/bk7/dGNoP06JYM8BCvFm2WVUBxhL1vVXODaJgYsmGc5JYuNoWcDjOkHGPi3pQ1pRN4pL71pIzD4AajCu/JjKZD+tTsN+YiCQKT6ABx5ACJYPniYY4B2PanpiTFHSHe/j5Uiw97HezYfODgtFEkHoTLkqtcp7yx/HgelS4+uNYtri/avIQiBAz7/389IJr5Vd2mKl2H/IBjUmMJoD1jYFkJNOnHHLBJXehTjN1fV/ynP4/fXzAkD/DM9GshlD8EzbcO+3AlJDAivV0xHCtAaIWdpMITTMItPV9oIEUK/b/ABbuKt3kfZa5LGJlLGU= MIME-Version: 1.0 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: fefcc352-356e-420b-f935-08d6b10496ab X-MS-Exchange-CrossTenant-originalarrivaltime: 25 Mar 2019 09:30:58.8924 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB7PR04MB5308 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190325_023105_185285_E9AE4996 X-CRM114-Status: GOOD ( 11.43 ) 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" 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 --- 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 97e1fb7..9b1fe99 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 b4f2723..3a3d264 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 = "gianfar"; + 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>;