From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.9 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E5ACDC433E0 for ; Fri, 19 Jun 2020 16:19:36 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id C40CD21707 for ; Fri, 19 Jun 2020 16:19:36 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=ti.com header.i=@ti.com header.b="JubHsdyN" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2405653AbgFSQTb (ORCPT ); Fri, 19 Jun 2020 12:19:31 -0400 Received: from lelv0142.ext.ti.com ([198.47.23.249]:49442 "EHLO lelv0142.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2390777AbgFSQSY (ORCPT ); Fri, 19 Jun 2020 12:18:24 -0400 Received: from lelv0266.itg.ti.com ([10.180.67.225]) by lelv0142.ext.ti.com (8.15.2/8.15.2) with ESMTP id 05JGIFpK008140; Fri, 19 Jun 2020 11:18:15 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1592583496; bh=qGP6MS6+eG2DFpGVz1IWcoA6j9uBqfJ/c06oHe2JZGk=; h=From:To:CC:Subject:Date; b=JubHsdyNuL+CBY1m5AuqIfsbDEcOLDsJKcXUkqoCF7t29DDyKSK4OCt8nLu8/evaB iHdv5L5fVJWXM3c/NDNWSyK/mgdOhSdcofw1idFBiSQdUJV6KiqawOVTHjglM5XhHN 3MaHalTAjHjyCi6KExoKVBFo0N/BeWbn7CLek6ss= Received: from DLEE109.ent.ti.com (dlee109.ent.ti.com [157.170.170.41]) by lelv0266.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 05JGIFI1026425 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Fri, 19 Jun 2020 11:18:15 -0500 Received: from DLEE104.ent.ti.com (157.170.170.34) 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; Fri, 19 Jun 2020 11:18:15 -0500 Received: from lelv0326.itg.ti.com (10.180.67.84) by DLEE104.ent.ti.com (157.170.170.34) 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; Fri, 19 Jun 2020 11:18:15 -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 05JGIF2Y034554; Fri, 19 Jun 2020 11:18:15 -0500 From: Dan Murphy To: , , , , CC: , , , Dan Murphy Subject: [PATCH net-next v9 0/5] RGMII Internal delay common property Date: Fri, 19 Jun 2020 11:18:08 -0500 Message-ID: <20200619161813.2716-1-dmurphy@ti.com> X-Mailer: git-send-email 2.26.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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 | 13 +++ .../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, 251 insertions(+), 14 deletions(-) -- 2.26.2