Received: by 2002:a05:7412:98c1:b0:fa:551:50a7 with SMTP id kc1csp1555764rdb; Mon, 8 Jan 2024 03:09:23 -0800 (PST) X-Google-Smtp-Source: AGHT+IEfnwXShSCMHNREnP/bXvQjdw8X7TcKVUDaoycxRnOmiyV9suiB9Nxc9Jeq2UOMwM6K6yuw X-Received: by 2002:a17:906:1e56:b0:a26:c9b9:3f89 with SMTP id i22-20020a1709061e5600b00a26c9b93f89mr777908ejj.226.1704712163400; Mon, 08 Jan 2024 03:09:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704712163; cv=none; d=google.com; s=arc-20160816; b=H5pxdpBtVBnCTFQulKbXF9P6ROxGokA+KODBDreuqjl5Qxwe0oKUFGMBB/I+K/kEWP x64tTRs05vyEvtp7NKpbS51WJjtwvZkXJnvrIMb0CzZMuG43wtyQS5AGV085Vlrw4ODO PcruWovC8C2OAxy+sPFe/6uRqYZoa48H5Gb2PkHNOWQCuzr2kplzzERlitK4NtZhS6P6 3C5yRMs2yugqgApsBEvfrTwi9vLsZyWptNhF6bqesQ7ALAU1HCbniwo0dhwmmdt7L81K ELe8mXJWYWvWk3yzmFY1rA8UFtjd9pqDhzCRZaoI7wTAziByUzGZHqLwBag/Hz69KZkc 8yfA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=zENAWqnzjtzMqnupQ7l5HtEkDaymbAjg+7Mroc2wWrM=; fh=A380Koy7JJhxbCKI5fvdB8GvLFi+Qj/pwdihj07erCM=; b=nufw8Gr+s+swDrrDtJgnvLvz6Zuzhm614vTFvVB2ln/C+i+t2kmUlNWx7P2gh+zvsc qbYXmz7RyexjogvtCMzQC9zqM4c6U5yMGHvThUjunAzaC5wJQfF8t9fRB3EI4gkdevKj 86Qw+2PUpd9nh386Vww/Lk1GBN5odKKVO57yURoR5G4qk9BvWf4ckGQXjPIgXT2StZkO zZWCH0Qniv+I3WmtqkvU0SjJzOxKhOjKD/r/EVByf1lQVMK4PTnpAHdV1CRq22njQTmw 4u7E7drJCIQPdh5kr38GIxfLruMc44Uy57D5yJ8HAFoM8v6EmeQBru5Tpx2qI4fd+6Y4 s95A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=LkLnXY8u; spf=pass (google.com: domain of linux-kernel+bounces-19385-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-19385-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id hb9-20020a170906b88900b00a2ae009bd2dsi365830ejb.46.2024.01.08.03.09.23 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 08 Jan 2024 03:09:23 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-19385-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=LkLnXY8u; spf=pass (google.com: domain of linux-kernel+bounces-19385-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-19385-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 175A71F2265E for ; Mon, 8 Jan 2024 11:09:23 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 7A1121428B; Mon, 8 Jan 2024 11:08:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="LkLnXY8u" X-Original-To: linux-kernel@vger.kernel.org Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id AD8C11426D; Mon, 8 Jan 2024 11:08:49 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id EA26BC433C7; Mon, 8 Jan 2024 11:08:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1704712129; bh=wEJjNDaehk6eNSabXV7AmGugSgejPKqecFRSyFZ8RZc=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=LkLnXY8u4eI9km5fTHwImF1ktVgLyZ6u2QGrP7Hk+OgzoGS2vG8mnJyRaxXn+91iH nwC+Dl+c79JuUYMhoX+SsMBWnmT1P9qwWOpSWnHSGJ9ltXJKc6VANm/u95gJgCavAX dkLmyBLZe+XuRwRJeeCgDzytrVvnp42JLFZ1Zi3vWxteEcdk1pzIFAFB/hQE1nKd4X j6QH4T4Q3dBf8wKpKhZz8grpjjpFlwEN98upscb41xbxcyTClGu+OiB5+I2rPhKtib LzdaDjZ26pI6G0rXjjk9UytWHG+rJFOfoWF+c2AFz3n5qhuX0Lih89cMxiUUiqSlub gSKOzV9j51BIQ== Date: Mon, 8 Jan 2024 11:08:44 +0000 From: Simon Horman To: Dimitri Fedrau Cc: Andrew Lunn , Heiner Kallweit , Russell King , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Stefan Eichenberger , netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v4 net-next 5/5] net: phy: marvell-88q2xxx: add driver for the Marvell 88Q2220 PHY Message-ID: <20240108110844.GH132648@kernel.org> References: <20240108093702.13476-1-dima.fedrau@gmail.com> <20240108093702.13476-6-dima.fedrau@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240108093702.13476-6-dima.fedrau@gmail.com> On Mon, Jan 08, 2024 at 10:37:00AM +0100, Dimitri Fedrau wrote: > Add a driver for the Marvell 88Q2220. This driver allows to detect the > link, switch between 100BASE-T1 and 1000BASE-T1 and switch between > master and slave mode. Autonegoation is supported. nit: Autonegotiation > Signed-off-by: Dimitri Fedrau > --- > drivers/net/phy/marvell-88q2xxx.c | 206 +++++++++++++++++++++++++++++- > include/linux/marvell_phy.h | 1 + > 2 files changed, 201 insertions(+), 6 deletions(-) > > diff --git a/drivers/net/phy/marvell-88q2xxx.c b/drivers/net/phy/marvell-88q2xxx.c ... > @@ -29,6 +36,42 @@ > > #define MDIO_MMD_PCS_MV_RX_STAT 33328 > > +struct mmd_val { > + int devad; > + u32 regnum; > + u16 val; > +}; > + > +const struct mmd_val mv88q222x_revb0_init_seq0[] = { > + { MDIO_MMD_PCS, 0x8033, 0x6801 }, > + { MDIO_MMD_AN, MDIO_AN_T1_CTRL, 0x0 }, > + { MDIO_MMD_PMAPMD, MDIO_CTRL1, > + MDIO_CTRL1_LPOWER | MDIO_PMA_CTRL1_SPEED1000 }, > + { MDIO_MMD_PCS, 0xfe1b, 0x48 }, > + { MDIO_MMD_PCS, 0xffe4, 0x6b6 }, > + { MDIO_MMD_PMAPMD, MDIO_CTRL1, 0x0 }, > + { MDIO_MMD_PCS, MDIO_CTRL1, 0x0 }, > +}; > + > +const struct mmd_val mv88q222x_revb0_init_seq1[] = { > + { MDIO_MMD_PCS, 0xfe79, 0x0 }, > + { MDIO_MMD_PCS, 0xfe07, 0x125a }, > + { MDIO_MMD_PCS, 0xfe09, 0x1288 }, > + { MDIO_MMD_PCS, 0xfe08, 0x2588 }, > + { MDIO_MMD_PCS, 0xfe11, 0x1105 }, > + { MDIO_MMD_PCS, 0xfe72, 0x042c }, > + { MDIO_MMD_PCS, 0xfbba, 0xcb2 }, > + { MDIO_MMD_PCS, 0xfbbb, 0xc4a }, > + { MDIO_MMD_AN, 0x8032, 0x2020 }, > + { MDIO_MMD_AN, 0x8031, 0xa28 }, > + { MDIO_MMD_AN, 0x8031, 0xc28 }, > + { MDIO_MMD_PCS, 0xffdb, 0xfc10 }, > + { MDIO_MMD_PCS, 0xfe1b, 0x58 }, > + { MDIO_MMD_PCS, 0xfe79, 0x4 }, > + { MDIO_MMD_PCS, 0xfe5f, 0xe8 }, > + { MDIO_MMD_PCS, 0xfe05, 0x755c }, > +}; nit: mv88q222x_revb0_init_seq0 and mv88q222x_revb0_init_seq1 seem to only be used in this file. Perhaps they should be static. ...