Received: by 2002:ab2:6a05:0:b0:1f8:1780:a4ed with SMTP id w5csp2216979lqo; Mon, 13 May 2024 11:07:47 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXojx+WhHmsOw/vy2D2YD4TnSVYoOAoJajApiwXo74hf5y2bwUBt10EgjZk+WjZ0ULQvwqVI+EqvKRvdEsQ9YGMnvQiwl0F1c6XoSIPuw== X-Google-Smtp-Source: AGHT+IGAEt+ePbQ4mijzmT6CTtnvvJidgYVv+hwiTuNgRXKG8iifm8oOH7ooZx/0Vny8ana7BGVr X-Received: by 2002:a19:7516:0:b0:51d:6f62:1ba6 with SMTP id 2adb3069b0e04-5220fc6d460mr6504255e87.3.1715623667568; Mon, 13 May 2024 11:07:47 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715623667; cv=pass; d=google.com; s=arc-20160816; b=0yhUHsHKtIZUSNmRKcxRduuz/3Pbl8zfz3oAk+7i7wPRKNqFdC9l5XGfht+6Fz1vW1 FCpBE9L5lWLse42WqmEAue8Tlb5vOLrGKJRRQb3JQZxqSDngYMtORssD0vd8nMOgoL/L V3XeRnitS9Ackl776NRaXXqE6bm97yokA5uNwKQz6smTQvpsvx6FPf/lMMxZlyTPVoEp CBk9vpfkYWDoqS+2229n/DGCzTNT2HY4gktWvs/+XHKzISoDGJ8gPETEGwvFNj7a//pR hyFfc70Bl4QgaSjl2Od34Tan1U4eiM0+851a4vlmS5GR8Af+Cgl8Pr1aJ2wknM75OJFs J2uw== ARC-Message-Signature: i=2; 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=qv4aa2y30wKDIpbTtsqV7m9XFw7hrbmhzvePIaRnkJs=; fh=8maqLfwF+f2XyaDrrN3rpCs6Ii71yZeEZ9FQodzT2/k=; b=cDGC+RkVRGwDxTr14ui1SPf9qQyzWPFnQaoxTFK4dQuKukgaurVUk3hA1wwwpo036X gF9m+BGbjQYDk5G2ZMIUL5rXL7+IrYVfbavAkSWBZatWAqiBKkEbMih0Q6aGswWyrQ1h Vj6jrWqY2SfFMtLupRj8jMTyo0UajK0Ec+aUblTg13dNxZjrACnLBfU6XVZwWEzmWB8I kDYbBMyhF4xymIqH0Bxyrg1r5FLJO2dhb5earY/VUIDFWLOsruxypnfbCLdd9o8emzt/ s/OvND3uGrUGbQiKIhEJQi1t5sSYyIYClU5Kvxa84w89RdFWZ0+PeGnqLenda2A7Obs0 KP0A==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=UvfWN3y5; arc=pass (i=1 spf=pass spfdomain=lunn.ch dkim=pass dkdomain=lunn.ch dmarc=pass fromdomain=lunn.ch); spf=pass (google.com: domain of linux-kernel+bounces-177950-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-177950-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=lunn.ch Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id 4fb4d7f45d1cf-5733c36d43asi5051958a12.527.2024.05.13.11.07.47 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 May 2024 11:07:47 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-177950-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=UvfWN3y5; arc=pass (i=1 spf=pass spfdomain=lunn.ch dkim=pass dkdomain=lunn.ch dmarc=pass fromdomain=lunn.ch); spf=pass (google.com: domain of linux-kernel+bounces-177950-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-177950-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=lunn.ch 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 4B2E81F22391 for ; Mon, 13 May 2024 18:07:47 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id A4AB12E851; Mon, 13 May 2024 18:07:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=lunn.ch header.i=@lunn.ch header.b="UvfWN3y5" Received: from vps0.lunn.ch (vps0.lunn.ch [156.67.10.101]) (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 417A629D0B; Mon, 13 May 2024 18:07:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=156.67.10.101 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715623656; cv=none; b=hAC0eYTkwfFH6kLmxQsof25rIVEFVwVNSbsb56YXz3k2z1gWQfoFbRiRFHy2jjqsjoQDn/UKkCvcXjZ/wjogPCfOZz5e8cqJ+TJim8sKAF9SPXjIiZMSIC+3DttuKSzwZcZAlRM2zga8jlA4ItyseF6V9cLBiIvMXOEa71QywFA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715623656; c=relaxed/simple; bh=nZVPVyq1aztg9r8lTsw449FeY1mUplfFw33FzVNogD4=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=B8276kfIhVS/EOvzlsqkvvLsxCWkRYhTPZnUi4V2CPhVtHOMCRxXi8ylQBoqNv7Y9MiYpxqyoVqnwvk6H5l2qr8PoEioyslGlVnToYPMftoczcG+eIzftJXZFoiI3pP+HNOS2TPYfbjYcsOGm//XsjtH24EK/nXrKGWJPIxDhlE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=lunn.ch; spf=pass smtp.mailfrom=lunn.ch; dkim=pass (1024-bit key) header.d=lunn.ch header.i=@lunn.ch header.b=UvfWN3y5; arc=none smtp.client-ip=156.67.10.101 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=lunn.ch Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=lunn.ch DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lunn.ch; s=20171124; h=In-Reply-To:Content-Disposition:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:From:Sender:Reply-To:Subject: Date:Message-ID:To:Cc:MIME-Version:Content-Type:Content-Transfer-Encoding: Content-ID:Content-Description:Content-Disposition:In-Reply-To:References; bh=qv4aa2y30wKDIpbTtsqV7m9XFw7hrbmhzvePIaRnkJs=; b=UvfWN3y5pfzUTvOPr5g8P+RC7S 9msDnr0XJmQf7mI4Ln2mXe2UWfeeFM0FZ9qnl2YU+bdIGup1THUwQ9gZeYUoJ4i1MkedVU8M8kDhM YUCPfJOMIuU3Nqn01Y9s8uqK2+PR4ttjSRM9YSm9h72ebhsaRPVe4yxQ1mChxBXmh5lk=; Received: from andrew by vps0.lunn.ch with local (Exim 4.94.2) (envelope-from ) id 1s6a51-00FKNw-JD; Mon, 13 May 2024 20:07:19 +0200 Date: Mon, 13 May 2024 20:07:19 +0200 From: Andrew Lunn To: Jitendra Vegiraju Cc: "Russell King (Oracle)" , netdev@vger.kernel.org, davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, bcm-kernel-feedback-list@broadcom.com, alexandre.torgue@foss.st.com, joabreu@synopsys.com, mcoquelin.stm32@gmail.com, richardcochran@gmail.com, linux-kernel@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH v2, net-next, 2/2] net: stmmac: PCI driver for BCM8958X SoC Message-ID: <1484c1b7-90aa-4495-a417-a400add8602a@lunn.ch> References: <20240510000331.154486-3-jitendra.vegiraju@broadcom.com> <20240511015924.41457-1-jitendra.vegiraju@broadcom.com> <4ede8911-827d-4fad-b327-52c9aa7ed957@lunn.ch> <08b9be81-52c9-449d-898f-61aa24a7b276@lunn.ch> 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: > Yes, the MAC directly connects to switch within the SoC with no external MII. > The SoC is BCM89586M/BCM89587 automotive ethernet switch. > The SOC presents PCIE interfaces on BCM89586M/BCM89587 automotive > ethernet switch. > The switch supports many ethernet interfaces out of which one or two > interfaces are presented as PCIE endpoints to the host connected on > the PCIE bus. > The MAC connects to switch using XGMII interface internal to the SOC. > The high level diagram is shown below: > > +==================================================+ > +--------+ | BCM8958X > switch SoC +----------------+ | > | Host | | +----------------+ > +-------+ | | | === > more ethernet IFs > | CPU | ===PCIE===| PCIE endpoint |==DMA==| MAC |==XGMII==| > switch fabric | | === more ethernet IFs > |Linux | | +----------------+ > +-------+ | | | > +-------+ | > +-----------------+ | > > +==================================================+ > Since the legacy fixed link cannot support 10G, we are initializing to > fixed speed 1G. You ASCII art is broken, probably because you are not using a fixed width font. So the interface between the MAC and the switch is fixed at XGMII. Is the MAC actually capable of anything other than XGMII? If XGMII is all it can do, then there is no need for a fixed link. You use a fixed-link when you have a conventional off the shelf MAC which can do 10BaseT_Half through to 10GBaseT. Normally there would be a PHY connected to the MAC and phylib/phylink will determine the line rate and tell the MAC what speed to operate at. However, if this device only supports XGMII, it is impossible to connect to a PHY because there is no external MII interface, then skip all the phylib/phylink support and hard code it. Look at the patches on the netdev list for the RealTek automotive driver which seems to be pretty similar. Andrew