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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id CC2E3C77B7C for ; Thu, 4 May 2023 12:24:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230306AbjEDMYy (ORCPT ); Thu, 4 May 2023 08:24:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53700 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229606AbjEDMYw (ORCPT ); Thu, 4 May 2023 08:24:52 -0400 Received: from vps0.lunn.ch (vps0.lunn.ch [156.67.10.101]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 442F85FFF; Thu, 4 May 2023 05:24:47 -0700 (PDT) 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=4SxUKZxHFSkFJqfmw8tU2KWudvukOgiePhinru3T1+c=; b=IZu/7PgtLNCY1MINdiulM9V8DI SI9OhK4KZ3O7jTen+Liz3K9KOk+Dy+FZtckKfgpYkOSaYqjWGmr9+V44QZzHdl/rnN20hsCWwbsKJ vIXkfeiq28Ag4PakfiFU70+CZGQOJUEHMh7OPN+zBgaUui26L6tjAIPNBI88Z/UKfWRs=; Received: from andrew by vps0.lunn.ch with local (Exim 4.94.2) (envelope-from ) id 1puY0h-00Buct-Ro; Thu, 04 May 2023 14:24:35 +0200 Date: Thu, 4 May 2023 14:24:35 +0200 From: Andrew Lunn To: "Vyas, Devang nayanbhai" Cc: "hkallweit1@gmail.com" , "linux@armlinux.org.uk" , "davem@davemloft.net" , "edumazet@google.com" , "pabeni@redhat.com" , "netdev@vger.kernel.org" , "linux-kernel@vger.kernel.org" , Jakub Kicinski Subject: Re: [PATCH] net: phy: aquantia: Add 10mbps support Message-ID: <28a1b515-b5f8-45cf-b1af-1a1826cb45ba@lunn.ch> References: <20230426081612.4123059-1-devangnayanbhai.vyas@amd.com> <7ae81127-a2aa-4f02-8c07-b8f158e0ef83@lunn.ch> <20230502194654.093afb13@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, May 04, 2023 at 06:18:11AM +0000, Vyas, Devang nayanbhai wrote: > [AMD Official Use Only - General] Hi Devang Please don't top post. Also, wrap your emails at around 75 characters. Network Etiquette rules apply for linux kernel mailling list. > We are using AQR113C Marvell PHY which is CL45 based and based on below check in phy_probe() function: > if (phydrv->features) > linkmode_copy(phydev->supported, phydrv->features); > else if (phydrv->get_features) > err = phydrv->get_features(phydev); > else if (phydev->is_c45) > err = genphy_c45_pma_read_abilities(phydev); -> it reads capability from PMA register where 10M bit is read-only static and value is 0 > else > err = genphy_read_abilities(phydev); > > Based on PHY datasheet, it supports 10M and we have made the change for the same and verified successfully. > > Below code should set the supported field under genphy_c45_pma_read_abilities(), but as the value is 0, we have to set the 10M mode explicitly. So the PHY is 'broken' in that one of its registers has the wrong value. However, it can probably be fixed. aQuantia firmware is not just code executed by its embedded uC. It also contains `provisioning`. This blob sets the values of many registers, and i think can be used to set registers which are read only. Maybe the blob you have is incorrectly provisioning the MDIO_PMA_EXTABLE_10BT register. Please talk to Marvell about the provisioning blob you have. Andrew