From patchwork Tue Apr 28 19:26:03 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dan Murphy X-Patchwork-Id: 1278666 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=quarantine dis=none) header.from=ti.com Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=ti.com header.i=@ti.com header.a=rsa-sha256 header.s=ti-com-17Q1 header.b=HxSRKaKv; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 49BWxd6k7Tz9sRY for ; Wed, 29 Apr 2020 05:32:21 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 6586181FC5; Tue, 28 Apr 2020 21:32:14 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=quarantine dis=none) header.from=ti.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=ti.com header.i=@ti.com header.b="HxSRKaKv"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 65F8982010; Tue, 28 Apr 2020 21:32:12 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,SPF_HELO_NONE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from fllv0016.ext.ti.com (fllv0016.ext.ti.com [198.47.19.142]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 6097281FA8 for ; Tue, 28 Apr 2020 21:32:06 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=quarantine dis=none) header.from=ti.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=dmurphy@ti.com Received: from fllv0035.itg.ti.com ([10.64.41.0]) by fllv0016.ext.ti.com (8.15.2/8.15.2) with ESMTP id 03SJW0iA014944; Tue, 28 Apr 2020 14:32:00 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1588102320; bh=oKPxOsDeE4qnUdemLaGo063vdIPILTWP0Jbt7yW03HQ=; h=From:To:CC:Subject:Date; b=HxSRKaKvvupczf2mtjFQM4515cJobuDUdkuuFMzQVMrCUBagoFGlNwCINVZ6ALVbo lE/r4fHeb1Syo4TChv4jXgT8Xj/EwmkmEcB/191pCkIBl7Quf+zXu8kZtyKK2l4Ia6 wE70lVOqK6eiIsJ4w7WHNZp3uhR+H+b4UrYp//54= Received: from DLEE115.ent.ti.com (dlee115.ent.ti.com [157.170.170.26]) by fllv0035.itg.ti.com (8.15.2/8.15.2) with ESMTP id 03SJW0eU056787; Tue, 28 Apr 2020 14:32:00 -0500 Received: from DLEE106.ent.ti.com (157.170.170.36) 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, 28 Apr 2020 14:31:59 -0500 Received: from fllv0039.itg.ti.com (10.64.41.19) by DLEE106.ent.ti.com (157.170.170.36) 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, 28 Apr 2020 14:31:59 -0500 Received: from localhost (ileax41-snat.itg.ti.com [10.172.224.153]) by fllv0039.itg.ti.com (8.15.2/8.15.2) with ESMTP id 03SJVx1J034998; Tue, 28 Apr 2020 14:31:59 -0500 From: Dan Murphy To: , , CC: , , , , , , Dan Murphy Subject: [PATCH v2 0/3] TI Ethernet PHY changes Date: Tue, 28 Apr 2020 14:26:03 -0500 Message-ID: <20200428192606.1808-1-dmurphy@ti.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.30rc1 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.102.2 at phobos.denx.de X-Virus-Status: Clean Hello The addition of the DP83867 driver to uboot was done in a generic way that made it a bit difficult to bring in new PHY drivers. The difficulty came in the config flags and the phy_init function. The change is to make the flags and init for the DP83867 more specific to the DP83867 device to make way to add more TI PHYs to uBoot. In addition the DP8382X PHY is a generic PHY driver that does not need any special handling to establish a link. Customers have requested that at the very least there be a way to know if the PHY attached is the PHY that is connected as "Generic PHY" is not really descriptive. These patches adds the registrations for TI Generic PHYs to associcate a TI PHY ID with a PHY name. Porting PHY helper routines to set and clear bits to facilitate easier side porting of ethernet kernel drivers to uBoot. Dan Dan Murphy (3): net: phy: Add helper routines to set and clear bits net: phy: Add support for TI PHY init net: phy: Add DP8382x phy registration to TI PHY init *Note: I dropped the DP83869 patch for now. configs/am65x_evm_a53_defconfig | 2 +- configs/am65x_hs_evm_a53_defconfig | 2 +- configs/dra7xx_evm_defconfig | 2 +- configs/dra7xx_hs_evm_defconfig | 2 +- configs/dra7xx_hs_evm_usb_defconfig | 2 +- configs/j721e_evm_a72_defconfig | 2 +- configs/j721e_hs_evm_a72_defconfig | 2 +- configs/k2g_evm_defconfig | 2 +- configs/xilinx_versal_virt_defconfig | 2 +- configs/xilinx_zynqmp_virt_defconfig | 2 +- drivers/net/phy/Kconfig | 15 ++++ drivers/net/phy/Makefile | 3 +- drivers/net/phy/dp83867.c | 3 +- drivers/net/phy/ti_phy_init.c | 109 +++++++++++++++++++++++++++ drivers/net/phy/ti_phy_init.h | 15 ++++ include/phy.h | 80 ++++++++++++++++++++ 16 files changed, 233 insertions(+), 12 deletions(-) create mode 100644 drivers/net/phy/ti_phy_init.c create mode 100644 drivers/net/phy/ti_phy_init.h