Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 816F3C4332F for ; Wed, 30 Mar 2022 08:38:39 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id BDF358407C; Wed, 30 Mar 2022 10:38:36 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=denx.de Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=denx.de; s=phobos-20191101; t=1648629517; bh=O0baEEjDWlebT8OG1va2OS8y0c4cGORLSX63YtUBEDE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=XiHtjQDNp3Dy5FCJYq62sBwTF5c7Q6NVmDftkLLbZtpgw6YfC2y2F2IIOwet87lZY WRN8/fuUzbEB00mOIFxaBA3eqPf6222EIXnPSOX/9R3EmWYZZ+ffXsYYDfTybxVtD2 /HplxWM96TlWZz0eIbKhkz1pr6MN5lHHn5hM34fc9S3e6RFF4FYHT/OxfPeOylvZGt zSnNiX3XQ4hcvup0qMeN+P3EFyb0O+x+lfe8xFDHblLUEXyvoIVYjmvW9qKHOe79UV HhnUT5Mw1vJUVjrzHR/OVhfjfCwvpHlUqb+Z5rUWm5beu5M/MPdRE/k8RDqBmMLamr +xj+jh7vL1hkw== Received: by phobos.denx.de (Postfix, from userid 109) id 886088407C; Wed, 30 Mar 2022 10:38:34 +0200 (CEST) Received: from mout-u-107.mailbox.org (mout-u-107.mailbox.org [IPv6:2001:67c:2050:1::465:107]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id AA36384049 for ; Wed, 30 Mar 2022 10:38:30 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=denx.de Authentication-Results: phobos.denx.de; spf=fail smtp.mailfrom=sr@denx.de Received: from smtp2.mailbox.org (unknown [91.198.250.124]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-u-107.mailbox.org (Postfix) with ESMTPS id 4KT0Ff4J05z9sSH; Wed, 30 Mar 2022 10:38:30 +0200 (CEST) From: Stefan Roese To: u-boot@lists.denx.de Cc: Ramon Fried , Joe Hershberger , Aaron Williams , Chandrakala Chavva Subject: [PATCH 2/2] net: phy: marvell: Add support for 88E1240 PHY Date: Wed, 30 Mar 2022 10:38:26 +0200 Message-Id: <20220330083826.829473-2-sr@denx.de> In-Reply-To: <20220330083826.829473-1-sr@denx.de> References: <20220330083826.829473-1-sr@denx.de> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 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.103.5 at phobos.denx.de X-Virus-Status: Clean This patch adds basic support for the Marvell 88E1240 PHY. This will be used by the upcoming ethernet support addition for the Marvell MIPS Octeon EBB7304 platform. Signed-off-by: Stefan Roese Cc: Ramon Fried Cc: Joe Hershberger Cc: Aaron Williams Cc: Chandrakala Chavva --- drivers/net/phy/marvell.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/drivers/net/phy/marvell.c b/drivers/net/phy/marvell.c index 41520c6d392a..d01603626d11 100644 --- a/drivers/net/phy/marvell.c +++ b/drivers/net/phy/marvell.c @@ -614,6 +614,16 @@ static int m88e1149_config(struct phy_device *phydev) return 0; } +/* Marvell 88E1240 */ +static int m88e1240_config(struct phy_device *phydev) +{ + marvell_of_reg_init(phydev); + + genphy_config_aneg(phydev); + + return 0; +} + /* Marvell 88E1310 */ static int m88e1310_config(struct phy_device *phydev) { @@ -760,6 +770,16 @@ static struct phy_driver M88E1149S_driver = { .shutdown = &genphy_shutdown, }; +static struct phy_driver M88E1240_driver = { + .name = "Marvell 88E1240", + .uid = 0x1410e30, + .mask = 0xffffff0, + .features = PHY_GBIT_FEATURES, + .config = &m88e1240_config, + .startup = &m88e1011s_startup, + .shutdown = &genphy_shutdown, +}; + static struct phy_driver M88E151x_driver = { .name = "Marvell 88E151x", .uid = 0x1410dd0, @@ -802,6 +822,7 @@ int phy_marvell_init(void) phy_register(&M88E1118R_driver); phy_register(&M88E1111S_driver); phy_register(&M88E1011S_driver); + phy_register(&M88E1240_driver); phy_register(&M88E151x_driver); phy_register(&M88E1680_driver); -- 2.35.1