From patchwork Tue Jun 23 13:48:31 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dan Murphy X-Patchwork-Id: 191482 Delivered-To: patch@linaro.org Received: by 2002:a92:1f07:0:0:0:0:0 with SMTP id i7csp1996315ile; Tue, 23 Jun 2020 06:48:54 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxrAu/D0VoEXMpqaQMuxlth/QHMYUO9pR7XVXG/C7DBVAyrAmwkgQdSSdEAu1/RqSJsCbLV X-Received: by 2002:a17:906:8401:: with SMTP id n1mr19862817ejx.479.1592920133984; Tue, 23 Jun 2020 06:48:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1592920133; cv=none; d=google.com; s=arc-20160816; b=QfPhndtX58p5+STMv+PDzUwxwzvVN4Zn+PaAB5MNeS2rSSaHTW4/xtLwiSxL3FiYtv UAeqXX2+L16uMbCLv0EWQpehPUeq7SdNwIA3rXpsxgOl83UOP9VAm/ZpbYoUVCHKZD8z J/y9b4nOL2Kc6PQs2p1+jHfAtIDQoSuLyd7KUFHBJTraCZHXnSf6yakSEc2IStb0FjaT M5tnEmAsUMOFhfLurX8HcZV7pN5iB9oQzHWSmRsOGfn3I0eUzbHmGXN0ndebNcFQVqQc MIsYg6PBqyx88Nrw1DRSff2oIZ4v+dYAJMzh9+Jtgo+six7wLOaqIpHG87aECr4pgKt6 xDiQ== 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=t3UKzHX3lCyR4eH6u/dGz7RzYpxhbfYkVViEKjM2usE=; b=Buusm75QXPYjqQCkd5XPgTb3xazLzlwLLel+ixV6wiAp2KC6KZOdPZgTVngOdqoLrT FowKL72qi+OoUM1CcIdfWb1U+QRfZZGJFoS8Mb4FrXRjTm23YffbMEVgxtfhqHofnoMx 4W2TG4zTWW+CjTNo6ADEROI/t8ORVq/+Mo2eZaYO2RxpTZoBTNY8N6j6X/S0jeQb/VJE aiDYLZFJRmpyJx3ka9JHprlJKWVuhzfCWJytxyNcSe8NE7PIXUuexJnNy2D/s7Ud9ZV0 yYpAWyFT9xycvZPwdJthyXgqK3JBN4lgQwa2Vx53d1F2uPPYE3WUAsr3keGBjXeejhZ2 t/+Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=wQdWuZFW; spf=pass (google.com: domain of netdev-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=netdev-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id du22si14633319ejc.330.2020.06.23.06.48.53; Tue, 23 Jun 2020 06:48:53 -0700 (PDT) Received-SPF: pass (google.com: domain of netdev-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=wQdWuZFW; spf=pass (google.com: domain of netdev-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=netdev-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732737AbgFWNst (ORCPT + 9 others); Tue, 23 Jun 2020 09:48:49 -0400 Received: from lelv0143.ext.ti.com ([198.47.23.248]:50796 "EHLO lelv0143.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732629AbgFWNst (ORCPT ); Tue, 23 Jun 2020 09:48:49 -0400 Received: from fllv0034.itg.ti.com ([10.64.40.246]) by lelv0143.ext.ti.com (8.15.2/8.15.2) with ESMTP id 05NDmg0A007402; Tue, 23 Jun 2020 08:48:42 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1592920122; bh=t3UKzHX3lCyR4eH6u/dGz7RzYpxhbfYkVViEKjM2usE=; h=From:To:CC:Subject:Date; b=wQdWuZFWRhSIojO1+GIh2PRHLwrOoN6rjBM+TgYLxNfZC1YmNfAW1kdpS4O/HJexY 5X1HbehCSxU6tq0gPemLpGYqSwz7JJ24/JPTh9GZUmCsY+2mw3KwFFypif5pZcLZrT dDZE2SqVmCjL3dGq4yv+rsNIsR3N0HaoTovBb0bw= Received: from DLEE115.ent.ti.com (dlee115.ent.ti.com [157.170.170.26]) by fllv0034.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 05NDmg8N003739 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Tue, 23 Jun 2020 08:48:42 -0500 Received: from DLEE109.ent.ti.com (157.170.170.41) by DLEE115.ent.ti.com (157.170.170.26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1979.3; Tue, 23 Jun 2020 08:48:42 -0500 Received: from lelv0326.itg.ti.com (10.180.67.84) by DLEE109.ent.ti.com (157.170.170.41) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1979.3 via Frontend Transport; Tue, 23 Jun 2020 08:48:42 -0500 Received: from localhost (ileax41-snat.itg.ti.com [10.172.224.153]) by lelv0326.itg.ti.com (8.15.2/8.15.2) with ESMTP id 05NDmgVv011585; Tue, 23 Jun 2020 08:48:42 -0500 From: Dan Murphy To: , , , , CC: , , , Dan Murphy Subject: [PATCH net-next v10 0/5] RGMII Internal delay common property Date: Tue, 23 Jun 2020 08:48:31 -0500 Message-ID: <20200623134836.21981-1-dmurphy@ti.com> X-Mailer: git-send-email 2.26.2 MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Hello The RGMII internal delay is a common setting found in most RGMII capable PHY devices. It was found that many vendor specific device tree properties exist to do the same function. This creates a common property to be used for PHY's that have internal delays for the Rx and Tx paths. If the internal delay is tunable then the caller needs to pass the internal delay array and the return will be the index in the array that was found in the firmware node. If the internal delay is fixed then the caller only needs to indicate which delay to return. There is no need for a fixed delay to add device properties since the value is not configurable. Per the ethernet-controller.yaml the interface type indicates that the PHY should provide the delay. This series contains examples of both a configurable delay and a fixed delay. Dan Murphy (5): dt-bindings: net: Add tx and rx internal delays net: phy: Add a helper to return the index for of the internal delay dt-bindings: net: Add RGMII internal delay for DP83869 net: dp83869: Add RGMII internal delay configuration net: phy: DP83822: Add setting the fixed internal delay .../devicetree/bindings/net/ethernet-phy.yaml | 12 +++ .../devicetree/bindings/net/ti,dp83869.yaml | 16 ++- drivers/net/phy/dp83822.c | 79 ++++++++++++-- drivers/net/phy/dp83869.c | 53 +++++++++- drivers/net/phy/phy_device.c | 100 ++++++++++++++++++ include/linux/phy.h | 4 + 6 files changed, 250 insertions(+), 14 deletions(-) -- 2.26.2