From patchwork Mon Feb 18 13:03:51 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vinod Koul X-Patchwork-Id: 158614 Delivered-To: patch@linaro.org Received: by 2002:a02:48:0:0:0:0:0 with SMTP id 69csp2465961jaa; Mon, 18 Feb 2019 05:04:37 -0800 (PST) X-Google-Smtp-Source: AHgI3IaxNBcjWzAw9U0UrkVvVXTV2Xv/eQwyJr6dpWBqpma2XQS4a5YZt9Hweey5KZ8ckEwbL5GI X-Received: by 2002:a17:902:f096:: with SMTP id go22mr25562369plb.23.1550495077050; Mon, 18 Feb 2019 05:04:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1550495077; cv=none; d=google.com; s=arc-20160816; b=vzHmMvh1zScYcaqy6Ot/AYKI2KYhllIw/WPB0wzO/JxKqV8c3bfiVyD+Kb3WhiUsjw /uOxKlL1dAMZUotP7/aWIrkIcXGX3YdjjIGVyWCnyTNvm0ueqNfGFYjt5a3kFm2kuIrU z3Kp8aNYMPJ7Twc+AlQoHxN4WGYfdb9weRwDfgDhbYo0nkYPZopYewInhkdBqyc7dwiH Rx3XI0HoQTSE2z+ZJfvtNqwK5Rg+0x4UreEyf9ydkmYiQhGc6prgvFyvi/7nf6IHXy5E 2aGcixdSnZEfEaaidF4Kp2FbSgt5Bq9g5AoKW1DN1OEVYkm9kmRBuJisauJQWuDv+5qQ D+ug== 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:dkim-signature; bh=oTuTfUeHALmLKo71aoRu7u2aNcceOGIP3i9iY4xwZvg=; b=w/djqSMHoilqmpRWvflToiXP6HCBFIpReC5Zqpntqj0zencIw5rb/hhTPxd4CBg6le Nt4ns4UhzJ7jbkZaUTW0bglFaqC36jjonQhptOoT9O9uvaFEB0hFXwIkBFXwbnt4MIFa fTcWG2blV1Rf/4+gXgMMlEqy+t8IhfYtk9/d68wIlFNpn8Vz1jvvjOG0tkSmZLyDpYOl RcJ1tE3jo74S0gkzpVSO5PWwYQ9unr5W+5vrwdwn9/YH1h/5luyk5OaXL1eNOE7wOVEY W4UynpKhLhq+9O4OkrYhuc5jq7z5BegchoK6f9Ash7k+cYoEAieemoyb+OkpxhaSAS5M pWdA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=1B4zoIUE; spf=pass (google.com: best guess record for domain of netdev-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=netdev-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a31si12842246pgl.376.2019.02.18.05.04.36; Mon, 18 Feb 2019 05:04:37 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of netdev-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=1B4zoIUE; spf=pass (google.com: best guess record for domain of netdev-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=netdev-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730766AbfBRNEf (ORCPT + 10 others); Mon, 18 Feb 2019 08:04:35 -0500 Received: from mail.kernel.org ([198.145.29.99]:49760 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728873AbfBRNEd (ORCPT ); Mon, 18 Feb 2019 08:04:33 -0500 Received: from localhost.localdomain (unknown [106.200.226.2]) (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 CCDD620645; Mon, 18 Feb 2019 13:04:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1550495072; bh=FgJjZhbSXntmgUqdZ3d8Xb/9/CiTtobyMY5pBL8WP0A=; h=From:To:Cc:Subject:Date:From; b=1B4zoIUEoHM+T8+taTtfRyrvWJWfuFMRoamefaLZkx4vp/Zq4Yka1oD73IhamUH45 HlupnnblridcTT17sDM8sl6DtJox8AJcyKWshhyDERWF4E8WkR3oITU6Bf76wUozVI jJj8LPQORguou9dSoqHZVYHOtLVuGzfLtPHEMjCc= From: Vinod Koul To: David S Miller Cc: linux-arm-msm@vger.kernel.org, Bjorn Andersson , Vinod Koul , netdev@vger.kernel.org, Niklas Cassel , Andrew Lunn , Florian Fainelli , =?utf-8?q?Michal_Vok=C3=A1?= =?utf-8?b?xI0=?= Subject: [PATCH] net: dsa: qca8k: Enable delay for RGMII_ID mode Date: Mon, 18 Feb 2019 18:33:51 +0530 Message-Id: <20190218130352.9373-1-vkoul@kernel.org> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org RGMII_ID specifies that we should have internal delay, so resurrect the delay addition routine but under the RGMII_ID mode. Fixes: 40269aa9f40a ("net: dsa: qca8k: disable delay for RGMII mode") Signed-off-by: Vinod Koul --- drivers/net/dsa/qca8k.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) -- 2.20.1 diff --git a/drivers/net/dsa/qca8k.c b/drivers/net/dsa/qca8k.c index a4b6cda38016..aa1f7f1b20d3 100644 --- a/drivers/net/dsa/qca8k.c +++ b/drivers/net/dsa/qca8k.c @@ -443,6 +443,18 @@ qca8k_set_pad_ctrl(struct qca8k_priv *priv, int port, int mode) val = QCA8K_PORT_PAD_RGMII_EN; qca8k_write(priv, reg, val); break; + case PHY_INTERFACE_MODE_RGMII_ID: + /* RGMII_ID needs internal delay. This is enabled through + * PORT5_PAD_CTRL for all ports, rather than individual port + * registers + */ + qca8k_write(priv, reg, + QCA8K_PORT_PAD_RGMII_EN | + QCA8K_PORT_PAD_RGMII_TX_DELAY(3) | + QCA8K_PORT_PAD_RGMII_RX_DELAY(3)); + qca8k_write(priv, QCA8K_REG_PORT5_PAD_CTRL, + QCA8K_PORT_PAD_RGMII_RX_DELAY_EN); + break; case PHY_INTERFACE_MODE_SGMII: qca8k_write(priv, reg, QCA8K_PORT_PAD_SGMII_EN); break;