Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp410404pxu; Fri, 4 Dec 2020 06:21:41 -0800 (PST) X-Google-Smtp-Source: ABdhPJyP79nbu9qnxv2GDirgB+w/KfLDAsAb1UAsBCuvO8dBAr5R7QYUTJC98sPxHrK4s3sO/SH5 X-Received: by 2002:a17:906:604e:: with SMTP id p14mr7575657ejj.515.1607091700944; Fri, 04 Dec 2020 06:21:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1607091700; cv=none; d=google.com; s=arc-20160816; b=P9pXkotTe0c5eturr8DaOV8ZaCL8w4zH8nBzPfb7bxXgJh5/PIl23fB/Hvv0T8RPYM OhgNieXnGXUVyDlORUqtdne3E1aall8O/uEOGpIkP7doSftsYAV8cbsSG2+fTzf50xzy OjZ/41un+YzyFIzm5oWULGqSlD5REjap7Ho6rAva1rzIoV0VRd94mpxWwbkkUiXljY2I 3s2A7ejSty5zJudZHQCpxJ0YByQfCGXtS4evTB/ib34Y9Ay4O5WMsleWGns2R82PVeuA qYAregEJ8CHnfZXHTxm51jacUOfkftkSNFjj6f9CjzODkJL2GS7SAZl4Hpt0mUn7D3MN PwcQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=d/jYzmu16MFRBoM/UPLJw7qXTI4sPIOvWr5F+bQ5RzA=; b=fYHjNBrj62oS7D+8CmJkTa00Y2qlC4/dbRIYoqQQrGgUJnWz7uuedhb6c0VsbhJTps WtZkFpH/KYJ9CyZBSKBj8MiLR9h4r8c5cSqRur6LMPLqZGN5eR5PWkKBcTibCJNNlHfi Biohoa/E02VFbZEhzjcHgPW5poGc91/kmbFIcU79h/ZfJdikxIT4LNHgUX9NIkuoPw8+ NDADCCp3ETfbSEuhRxgzvq/eNzBQ78VTu1J+wCPs93UBwrqeG9SPDdKLGSHQLpInlw6n VfisvLDnQ71E2qtk+XA3dsBlx9RT1EoWZREF4FW2CnmQGxWk4SsfqnJq30Gq+S/dsUkN 9Hog== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id u20si2969277edr.287.2020.12.04.06.21.17; Fri, 04 Dec 2020 06:21:40 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388121AbgLDOQu (ORCPT + 99 others); Fri, 4 Dec 2020 09:16:50 -0500 Received: from relay11.mail.gandi.net ([217.70.178.231]:54783 "EHLO relay11.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727918AbgLDOQu (ORCPT ); Fri, 4 Dec 2020 09:16:50 -0500 Received: from localhost (lfbn-lyo-1-997-19.w86-194.abo.wanadoo.fr [86.194.74.19]) (Authenticated sender: alexandre.belloni@bootlin.com) by relay11.mail.gandi.net (Postfix) with ESMTPSA id AEE95100003; Fri, 4 Dec 2020 14:16:06 +0000 (UTC) Date: Fri, 4 Dec 2020 15:16:06 +0100 From: Alexandre Belloni To: Andrew Lunn Cc: Steen Hegelund , Kishon Vijay Abraham I , Vinod Koul , linux-arm-kernel@lists.infradead.org, Lars Povlsen , Bjarni Jonasson , Microchip UNG Driver List , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Russell King Subject: Re: [PATCH v8 3/4] phy: Add Sparx5 ethernet serdes PHY driver Message-ID: <20201204141606.GH74177@piout.net> References: <20201203103015.3735373-1-steen.hegelund@microchip.com> <20201203103015.3735373-4-steen.hegelund@microchip.com> <20201203215253.GL2333853@lunn.ch> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20201203215253.GL2333853@lunn.ch> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 03/12/2020 22:52:53+0100, Andrew Lunn wrote: > > + if (macro->serdestype == SPX5_SDT_6G) { > > + value = sdx5_rd(priv, SD6G_LANE_LANE_DF(macro->stpidx)); > > + analog_sd = SD6G_LANE_LANE_DF_PMA2PCS_RXEI_FILTERED_GET(value); > > + } else if (macro->serdestype == SPX5_SDT_10G) { > > + value = sdx5_rd(priv, SD10G_LANE_LANE_DF(macro->stpidx)); > > + analog_sd = SD10G_LANE_LANE_DF_PMA2PCS_RXEI_FILTERED_GET(value); > > + } else { > > + value = sdx5_rd(priv, SD25G_LANE_LANE_DE(macro->stpidx)); > > + analog_sd = SD25G_LANE_LANE_DE_LN_PMA_RXEI_GET(value); > > + } > > + /* Link up is when analog_sd == 0 */ > > + return analog_sd; > > +} > > What i have not yet seen is how this code plugs together with > phylink_pcs_ops? > > Can this hardware also be used for SATA, USB? As far as i understand, > the Marvell Comphy is multi-purpose, it is used for networking, USB, > and SATA, etc. Making it a generic PHY then makes sense, because > different subsystems need to use it. > > But it looks like this is for networking only? So i'm wondering if it > belongs in driver/net/pcs and it should be accessed using > phylink_pcs_ops? > Ocelot had PCie on the phys, doesn't Sparx5 have it? -- Alexandre Belloni, Bootlin Embedded Linux and Kernel engineering https://bootlin.com