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 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 1DBD2C2BBCA for ; Fri, 28 Jun 2024 11:12:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=2/aBggAO7KfkgQjopKazQeML0U5UXsAM++vXOxekJ2k=; b=38s5n9+7bc5yxed6HFf9RwW9Q9 xj2Y86hPB/8qWLbx8OIJCLAqXwuZS0uT1MfclVsgx7+yQl98bfjRpdaLqJnkw60vFi4PeJd/bPFwI LqCai0Rvhur+lNONbqAu9QUs8nFzBAI6lzxCIpLHk0koNtvwD8gwbIuHWQrAMge+xZxU4HkiTnduL ewcPzSDhN8tQubnkXouzKdJ3864wnDDtAZg/Bpme1VMF2W8N+1+elHVvYOmc5inIUW4EggSY64xhF m2V6+2CLuNd1wSwWPJO8kDVX2ttl+NXwDF2q37QkK2xQY7r51pfzFkAO9Rb1BghoOl7wxW1BEfU7I pfc7ni1A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sN9WQ-0000000DVV9-1NkA; Fri, 28 Jun 2024 11:12:06 +0000 Received: from sin.source.kernel.org ([145.40.73.55]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sN9WG-0000000DVSu-0cBX for linux-arm-kernel@lists.infradead.org; Fri, 28 Jun 2024 11:11:58 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by sin.source.kernel.org (Postfix) with ESMTP id A5877CE3BD8; Fri, 28 Jun 2024 11:11:52 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6EC7BC116B1; Fri, 28 Jun 2024 11:11:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1719573111; bh=IhCJ8q0wQv2Uqdfm8DAp0L2pfQSawU2VAK6mGUolM8k=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=rnKAtHc7PkDH8sTRhTTHhdadT8c30XblnQHJjzE+Rdg7OA9O3N4+nYdV53ffPxMJ7 u1JYkVOpauzsxKUX1lBzIKSNwXr26WnzJRgIxoN2BonG+6LIeRwpQiqyKHq5ck/V14 JU6fb5gdser9V849G5GLRza4GAaUttzRHgM8uWcZsAk+1/PioyD8xB2laahi+gF4iP Yr1F0PFiPoa7YRd/6jD+GanvaPKBY8z4pvAD6YD359xvG/xBRkSiFSO49bVT/6MQLp 8KUmW/8W5xyyoTtcl2RzHDb2VDHihIeiBPKE2mFdapa0ApX4JDElmQmFYhGyXApOd7 dEQUxcVHjn9gQ== Date: Fri, 28 Jun 2024 13:11:48 +0200 From: Lorenzo Bianconi To: Andrew Lunn Cc: Benjamin Larsson , netdev@vger.kernel.org, nbd@nbd.name, lorenzo.bianconi83@gmail.com, davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, conor@kernel.org, linux-arm-kernel@lists.infradead.org, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org, devicetree@vger.kernel.org, catalin.marinas@arm.com, will@kernel.org, upstream@airoha.com, angelogioacchino.delregno@collabora.com, rkannoth@marvell.com, sgoutham@marvell.com Subject: Re: [PATCH v3 net-next 2/2] net: airoha: Introduce ethernet support for EN7581 SoC Message-ID: References: <89c9c226ddb31d9ff3d31231e8f532a3e983363a.1719159076.git.lorenzo@kernel.org> <2752c453-cabd-4ca0-833f-262b221de240@lunn.ch> <4a39fa50-cffc-4f0c-a442-b666b024ba34@lunn.ch> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="lAs16Qv/8RWOgpBa" Content-Disposition: inline In-Reply-To: <4a39fa50-cffc-4f0c-a442-b666b024ba34@lunn.ch> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240628_041156_648191_601B47EF X-CRM114-Status: GOOD ( 26.95 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org --lAs16Qv/8RWOgpBa Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable > On Mon, Jun 24, 2024 at 01:01:44AM +0200, Benjamin Larsson wrote: > > Hi, > > > Code like this is making me wounder about the split between MAC > > > driver, DSA driver and DSA tag driver. Or if it should actually be a > > > pure switchdev driver? > > >=20 > > > If there some open architecture documentation for this device? > > >=20 > > > What are these ports about? > > >=20 > > > > +static int airoha_dev_open(struct net_device *dev) > > > > +{ > > > > + struct airoha_eth *eth =3D netdev_priv(dev); > > > > + int err; > > > > + > > > > + if (netdev_uses_dsa(dev)) > > > > + airoha_fe_set(eth, REG_GDM1_INGRESS_CFG, GDM1_STAG_EN_MASK); > > > > + else > > > > + airoha_fe_clear(eth, REG_GDM1_INGRESS_CFG, GDM1_STAG_EN_MASK); > > > Does that imply both instances of the GMAC are not connected to the > > > switch? Can one be used with a PHY? > > >=20 > > > Andrew > >=20 > > https://mirror2.openwrt.org/docs/MT7981B_Wi-Fi6_Platform_Datasheet_Open= _V1.0.pdf > >=20 > > page 107 (text for 9.1.1 is relevant but not a complete match). In the > > EN7581 case there is a 5 port switch in the place of GMAC1 (one switch = port > > is connected to GDM1). >=20 > The typical DSA architecture is that the SoC MAC is connected to a > switch MAC port. You say here, the switch is directly connected to the > GGM1. So there is no GMAC involved? If there is no MAC, you don't need > a MAC driver. >=20 > It seems more likely there is a GMAC, and the SGMII interface, or > something similar is connected to the switch? >=20 > Andrew >=20 The EN7581 architecture is similar to MT7988a one. There is a MAC port (GDM= 1)=20 connected to a MT7530 DSA switch. With 'directly connected', I think Benjam= in means we rely on the switch internal PHYs for GDM1. Moreover the SoC suppor= ts other MAC ports (GDM2, GDM3, GDM4) that can be connected to extanl PHYs. In v4 I will rework the driver adding the capability to plug even GDM{2,3,4= }. Regards, Lorenzo --lAs16Qv/8RWOgpBa Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEABYKAB0WIQTquNwa3Txd3rGGn7Y6cBh0uS2trAUCZn6acwAKCRA6cBh0uS2t rCurAP4kKGx5QikXbXkc5wjqVKJmLfGMozX75vBvP6wutMTtygEAgmG8JBldpnqx 25QBff23NcdLFIuKepT+GxfjszfhAQ0= =fIws -----END PGP SIGNATURE----- --lAs16Qv/8RWOgpBa--