From patchwork Fri Aug 9 03:12:56 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Andr=C3=A9_Draszik?= X-Patchwork-Id: 11085249 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 54C4A14D5 for ; Fri, 9 Aug 2019 03:13:07 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 44A1728C1C for ; Fri, 9 Aug 2019 03:13:07 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 382CB28C21; Fri, 9 Aug 2019 03:13:07 +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 A031C28C1C for ; Fri, 9 Aug 2019 03:13:06 +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=QLO6TVmYyoIA34BZtmRmZZZxeqxe1ZZ2KfCmNHnw5rs=; b=Dfd3jsOy3TYY5j /NO42GVUKSTWj46ICO+1Gh5x+ZCSuEThI7GenVxyygZpKaWrTqlsMl96xTsE25k0gVbVG8VugMXe6 ILLZRbMelOYdxs9TJIu6ZRWtdLY5ViKxEIBnW/VNOZB8xMdd9tEBRVJ5o8Q9RHlow9yvgu70DJKy4 /5W0xtHCdJ1mZAChZ0RGXEDOEhCf8mG1R5W2h0xkdlYc7o7uAA1GngeASnek7u41sQ1rZ3UGIzeCf nQLdnw5NDbBW/BQmdBIGK7QpZBfm90erEtofj9mnGUBKHxHakipo/4o5/IYGYkXgPy/XutQbal9w1 z1ppInixVP9CtH9nxSVA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92 #3 (Red Hat Linux)) id 1hvvL0-0007EC-7j; Fri, 09 Aug 2019 03:13:06 +0000 Received: from mail-wr1-f67.google.com ([209.85.221.67]) by bombadil.infradead.org with esmtps (Exim 4.92 #3 (Red Hat Linux)) id 1hvvKv-0007DG-Qe for linux-arm-kernel@lists.infradead.org; Fri, 09 Aug 2019 03:13:04 +0000 Received: by mail-wr1-f67.google.com with SMTP id q12so6574681wrj.12 for ; Thu, 08 Aug 2019 20:13:01 -0700 (PDT) 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:mime-version :content-transfer-encoding; bh=uonr7JGvdCWxCXj+k6k7pRPYOSgXIk19KhW6G51a7QQ=; b=sTFmoBBjm76dEqEX4qmYLRuKDPOVC5fR7Jf80OXIO6wt36QEPdsbfvJVIGWZlp4MqP xN9P0joWuctNnhfU0x0m1x95VTigDFplP+bGxOccURxJ9Gd2hIIQeCCcnhjrfhCnXr3h 5O5a0/EF1vMGFlIu1tX+mNylftKYIXRWtwRfjfr/u3PxZnruiJqvUUku80phqQ/WpeNg 6OHP7BIEJPaac7dEaaMfxvcZ8sR2He7bcU3n8RzYsCb2DjahAZJiVo3DQiCJ3nPZh/lm LddZv7MNlZueyVu85jnKnX1rw0CKtLU/UQBW+9aGVpJIHZNbjCv0bIj4dEMBTPVKs9bX uMBQ== X-Gm-Message-State: APjAAAVnptAnc/1aIcTISL17jYNMRp1yzBj9PZA3pf4SaFUbnOktzCj+ tcYqTsBYPGieD0OiKqP5Cb8= X-Google-Smtp-Source: APXvYqxTo5Q9T2mOXycuvfbxR4lb1X0KpEpQKQKLAhovI4Yky74FgaZTgY7LTdrzkcmNh0U1VAJxjQ== X-Received: by 2002:adf:fe10:: with SMTP id n16mr20512822wrr.92.1565320380703; Thu, 08 Aug 2019 20:13:00 -0700 (PDT) Received: from tfsielt31850.garage.tyco.com ([79.97.20.138]) by smtp.gmail.com with ESMTPSA id l14sm119815wrn.42.2019.08.08.20.12.59 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Thu, 08 Aug 2019 20:13:00 -0700 (PDT) From: =?utf-8?q?Andr=C3=A9_Draszik?= To: linux-kernel@vger.kernel.org Subject: [PATCH] ARM: imx: stop adjusting ar8031 phy tx delay Date: Fri, 9 Aug 2019 04:12:56 +0100 Message-Id: <20190809031256.3594-1-git@andred.net> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190808_201301_860148_07D94D81 X-CRM114-Status: GOOD ( 14.53 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kate Stewart , =?utf-8?q?Andr=C3=A9_Draszi?= =?utf-8?q?k?= , Sascha Hauer , Russell King , NXP Linux Team , Pengutronix Kernel Team , Greg Kroah-Hartman , Shawn Guo , Thomas Gleixner , Leonard Crestez , Fabio Estevam , 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 Recent changes to the Atheros at803x driver cause the approach taken here to stop working because commit 6d4cd041f0af ("net: phy: at803x: disable delay only for RGMII mode") and commit cd28d1d6e52e ("net: phy: at803x: Disable phy delay for RGMII mode") fix the AR8031 driver to configure the phy's (RX/TX) delays as per the 'phy-mode' in the device tree. In particular, the phy tx (and rx) delays are updated again as per the 'phy-mode' *after* the code in here runs. Things worked before above commits, because the AR8031 comes out of reset with RX delay enabled, and the at803x driver didn't touch the delay configuration at all when "rgmii" mode was selected. It appears the code in here tries to make device trees work that incorrectly specify "rgmii", but that can't work any more and it is imperative since above commits to have the phy-mode configured correctly in the device tree. I suspect there are a few imx7d based boards using the ar8031 phy and phy-mode = "rgmii", but given I don't know which ones exactly, I am not in a position to update the respective device trees. Hence this patch is simply removing the superfluous code from the imx7d initialisation. An alternative could be to add a warning instead, but that would penalize all boards that have been updated already. Signed-off-by: André Draszik CC: Russell King CC: Shawn Guo CC: Sascha Hauer CC: Pengutronix Kernel Team CC: Fabio Estevam CC: NXP Linux Team CC: Kate Stewart CC: Greg Kroah-Hartman CC: Thomas Gleixner CC: Leonard Crestez CC: linux-arm-kernel@lists.infradead.org --- arch/arm/mach-imx/mach-imx7d.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/arch/arm/mach-imx/mach-imx7d.c b/arch/arm/mach-imx/mach-imx7d.c index 95713450591a..ebb27592a9f7 100644 --- a/arch/arm/mach-imx/mach-imx7d.c +++ b/arch/arm/mach-imx/mach-imx7d.c @@ -30,12 +30,6 @@ static int ar8031_phy_fixup(struct phy_device *dev) val &= ~(0x1 << 8); phy_write(dev, 0xe, val); - /* introduce tx clock delay */ - phy_write(dev, 0x1d, 0x5); - val = phy_read(dev, 0x1e); - val |= 0x0100; - phy_write(dev, 0x1e, val); - return 0; }