Received: by 2002:a25:b794:0:0:0:0:0 with SMTP id n20csp7632024ybh; Thu, 8 Aug 2019 20:13:52 -0700 (PDT) X-Google-Smtp-Source: APXvYqzB+CACzpST6XQYO/TyYt/cJQK++xuCfp/UBd00HEFVYgMUs5nxxcTSxasZYqmu5scsSPFB X-Received: by 2002:a63:121b:: with SMTP id h27mr15593233pgl.335.1565320432620; Thu, 08 Aug 2019 20:13:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1565320432; cv=none; d=google.com; s=arc-20160816; b=uL3m3psgzQoW1wgarY435JYAiH4+q1Q36oXw6mChhZWnlDExWvL7T/PlBhVwu0y05H ixSQelVuJB1DhA8R+X6LSbILKRaXqBFO9dYC0rElREBs9EsxYGrYndMfmeHWN6SFcXvm mCTloeSSDuXh7ubs7geSrz0IgzZEqCdUUs1pO6dB2AWhctPX2PjZut5n8Yu/BY7cjN/V 8VFLkSmXWENM89r1yR0mrLHmmjhFU3xThIGBje0x6PW0xBAtnABjfH8HqCAJGF4oIQBK D+BlunzpJTqqE1wl6DpAc8rlO4KRqBi0NBRSknUtvfqBUnSAGGqszYAKvyUwCMU//BU8 kSwA== 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 :message-id:date:subject:cc:to:from; bh=uonr7JGvdCWxCXj+k6k7pRPYOSgXIk19KhW6G51a7QQ=; b=OcgLUdo7ZcveAfMIOH565aj5HdQUoKherM9fN1As+IP8AVNnByC37N4GyD+kXQXWy7 JkoNgvziXX5/GCmx0It1SxsJnezDThJKSDsDX3gMKPV0JgBuvaP9QYf6TXX7szJhN/0R etMbWxBJfHleuAXG8wdLUzmZPKgn4wtkRSh0FT/K/DnUdDMTC8pNVbusEITIiSXejUmM Yi3ufi+qnI+StcSoNmSxVMpDO6lKp9HdbDnVfnvcehFk74vIKSP6xOaSRNXuBB5yS6sY 3wH9qSSkUIykV6OeV+MFKmGX+O/KpDpccOKCqznuzlXyp6Am5xFCkrgnZyKMJAIumPKO WpWg== ARC-Authentication-Results: i=1; mx.google.com; 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 e2si52136105pgf.256.2019.08.08.20.13.36; Thu, 08 Aug 2019 20:13:52 -0700 (PDT) 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; 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 S2404985AbfHIDND (ORCPT + 99 others); Thu, 8 Aug 2019 23:13:03 -0400 Received: from mail-wr1-f68.google.com ([209.85.221.68]:46900 "EHLO mail-wr1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2404958AbfHIDND (ORCPT ); Thu, 8 Aug 2019 23:13:03 -0400 Received: by mail-wr1-f68.google.com with SMTP id z1so96836744wru.13 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=d0tecrJwZbMRlnIIPBH4bv10bWdENjG3fbgjRip0V+KitFqb7bUx8cyREvjX409UCE +hDBjlEVikIN6fbCio/ls4+jwfBqPihfxo1H2RrUKFexNo1xGzx9RRYA2vclntJUsoR2 s/oomIkAPaceMRLwaLo/4i4yH+gX7+EmP9V8kg0rQslO9XuV3j3O9OvKaWDNs0ss0zWb PSUFdyXwoLKJ7PfrKvpoUQ5l9HtYoy4qWUOvpsIBd5JGflscmqm1zOwAIaumGqXPfklq WBHo1AgErUXKw20pdKaX8FofvM/3R47seTBj676kwD2Zfkvukz8XLrQschqfmv4l2bmI 9i4g== X-Gm-Message-State: APjAAAVjS2+zT1WE+u7vjp50CXn4FxkCaAmsS4o/dMoJJz/XQA9mta42 FpLLRXVCECDA168edyOau3fzKJIv8sw3WA== 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=20Draszik?= To: linux-kernel@vger.kernel.org Cc: =?UTF-8?q?Andr=C3=A9=20Draszik?= , Russell King , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , NXP Linux Team , Kate Stewart , Greg Kroah-Hartman , Thomas Gleixner , Leonard Crestez , linux-arm-kernel@lists.infradead.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 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 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; } -- 2.20.1