Received: by 2002:a05:6358:489b:b0:bb:da1:e618 with SMTP id x27csp548790rwn; Thu, 15 Sep 2022 02:55:22 -0700 (PDT) X-Google-Smtp-Source: AA6agR7fP0KWkNw/+fUVF8S/WDaKAJUACrQ3q/ioMee2Q6PBYxj5AxdzV+u+KE1fgv7dEvmXzmuU X-Received: by 2002:a17:906:5d0a:b0:780:3c42:990f with SMTP id g10-20020a1709065d0a00b007803c42990fmr4487373ejt.9.1663235722023; Thu, 15 Sep 2022 02:55:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1663235722; cv=none; d=google.com; s=arc-20160816; b=T2v3wTg2A9SoC+utGiA7EkOj3S6VdAPqeJ0m6K+ZpPkO/1TvqVYoNiIXEzFgyL/NW4 5g2A1dlhbaCAKke9Gc/txgwydfPOjQQHkGyjuBDEuBANEBcQGCLz1tP5eUIqKwjLmVNH JuOl8Pmy+WYbURBvLyq67QhybTEtYRCOESvkY6u/T2MzODxzUp3TliVbIgk2FdA8tHES TKi/MKm30v/IGFrpvUIYLEa337beFz02WQOdo7fB8/YpXgyQaWXlRtPHrw68Nf4XGvpQ 5+zCh+77V1YMz0lbavXZa5XTjIgcH+uUM9msrcPsUYbwJ2k2SqFAcDDXEJh6w3hWn2fE bhHg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:to:content-language:subject:cc:user-agent:mime-version :date:message-id:dkim-signature; bh=ZqlwKipWWBwqNMDlQeWidZRKes3p7b+3rjYNO5D59kw=; b=QhRt6KcufF+jRf12E6TgJDCmbXnxLwc3pY83WD7QwuBV7Uq360oUckhEiRgJ3peGbU bRKIxemxDp3gm68tZMqaeYbxyshr264G9cgLYTw/OwByDNwTyuOvJW4gmE6Jm5Ib5Uwr D41/hs89VhLHF9u/bB+c5OUR67XIRkcZNSJ92s/9CZ2aMK2vyAHAooR6niqpTHuUN1nj FrEGmBvY3PFc2wYUuy14jMrpfx34g4cu9nQPIJdJJFPZ3ad1/36khQRrodPmmO1QBEsy yOfpiPqxlha1sIFwFiwM7n6W1qIYmUuLkTrOjXyx5eV3ZOr+xQAkc+avc/97OJ6HRHlC /3rQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=FEylbera; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id wg2-20020a17090705c200b0077edee81b40si8525145ejb.453.2022.09.15.02.54.56; Thu, 15 Sep 2022 02:55:22 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=FEylbera; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229851AbiIOJgB (ORCPT + 99 others); Thu, 15 Sep 2022 05:36:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57530 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229773AbiIOJf7 (ORCPT ); Thu, 15 Sep 2022 05:35:59 -0400 Received: from lelv0143.ext.ti.com (lelv0143.ext.ti.com [198.47.23.248]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B7E3174DF1; Thu, 15 Sep 2022 02:35:58 -0700 (PDT) Received: from fllv0034.itg.ti.com ([10.64.40.246]) by lelv0143.ext.ti.com (8.15.2/8.15.2) with ESMTP id 28F9ZYmo017194; Thu, 15 Sep 2022 04:35:34 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1663234534; bh=ZqlwKipWWBwqNMDlQeWidZRKes3p7b+3rjYNO5D59kw=; h=Date:CC:Subject:To:References:From:In-Reply-To; b=FEylberaJX4iZU07VA4aakxSwjUokj+AiWr1SehxTaXb6OnHgmzdcylrFgrlJE6JE Ra5TzusYJHIC5zVTjLRqZvgz/rfAKRAAv9K0rKAIIF80MHLb8yuw/oBXKRfN+SoM3X oPuCZ7i3PDGxZxfLnP4DropwK9hdXxz2/iYu9Le0= Received: from DLEE102.ent.ti.com (dlee102.ent.ti.com [157.170.170.32]) by fllv0034.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 28F9ZYPS087012 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Thu, 15 Sep 2022 04:35:34 -0500 Received: from DLEE112.ent.ti.com (157.170.170.23) by DLEE102.ent.ti.com (157.170.170.32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.6; Thu, 15 Sep 2022 04:35:33 -0500 Received: from lelv0326.itg.ti.com (10.180.67.84) by DLEE112.ent.ti.com (157.170.170.23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.6 via Frontend Transport; Thu, 15 Sep 2022 04:35:33 -0500 Received: from [10.24.69.241] (ileaxei01-snat.itg.ti.com [10.180.69.5]) by lelv0326.itg.ti.com (8.15.2/8.15.2) with ESMTP id 28F9ZSbk014554; Thu, 15 Sep 2022 04:35:29 -0500 Message-ID: <7a5dd6b3-389f-13a2-7c96-8e97e0ab4e55@ti.com> Date: Thu, 15 Sep 2022 15:05:28 +0530 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.11.0 CC: , , , , , , , , , , , , , , , , Subject: Re: [PATCH 6/8] net: ethernet: ti: am65-cpsw: Add support for SGMII mode for J7200 CPSW5G Content-Language: en-US To: "Russell King (Oracle)" References: <20220914095053.189851-1-s-vadapalli@ti.com> <20220914095053.189851-7-s-vadapalli@ti.com> From: Siddharth Vadapalli In-Reply-To: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 X-Spam-Status: No, score=-6.2 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A, RCVD_IN_DNSWL_MED,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello Russell, On 14/09/22 21:14, Russell King (Oracle) wrote: > On Wed, Sep 14, 2022 at 03:20:51PM +0530, Siddharth Vadapalli wrote: >> Add support for SGMII mode in both fixed-link MAC2MAC master mode and >> MAC2PHY modes for CPSW5G ports. >> >> Add SGMII mode to the list of extra_modes in j7200_cpswxg_pdata. >> >> The MAC2PHY mode has been tested in fixed-link mode using a bootstrapped >> PHY. The MAC2MAC mode has been tested by a customer with J7200 SoC on >> their device. >> >> Signed-off-by: Siddharth Vadapalli >> --- >> drivers/net/ethernet/ti/am65-cpsw-nuss.c | 19 ++++++++++++++++--- >> 1 file changed, 16 insertions(+), 3 deletions(-) >> >> diff --git a/drivers/net/ethernet/ti/am65-cpsw-nuss.c b/drivers/net/ethernet/ti/am65-cpsw-nuss.c >> index 1739c389af20..3f40178436ff 100644 >> --- a/drivers/net/ethernet/ti/am65-cpsw-nuss.c >> +++ b/drivers/net/ethernet/ti/am65-cpsw-nuss.c >> @@ -75,7 +75,15 @@ >> #define AM65_CPSW_PORTN_REG_TS_CTL_LTYPE2 0x31C >> >> #define AM65_CPSW_SGMII_CONTROL_REG 0x010 >> +#define AM65_CPSW_SGMII_MR_ADV_ABILITY_REG 0x018 > > This doesn't seem to be used in this patch, should it be part of some > other patch in the series? > >> #define AM65_CPSW_SGMII_CONTROL_MR_AN_ENABLE BIT(0) >> +#define AM65_CPSW_SGMII_CONTROL_MASTER_MODE BIT(5) > > Ditto. > >> + >> +#define MAC2MAC_MR_ADV_ABILITY_BASE (BIT(15) | BIT(0)) >> +#define MAC2MAC_MR_ADV_ABILITY_FULLDUPLEX BIT(12) >> +#define MAC2MAC_MR_ADV_ABILITY_1G BIT(11) >> +#define MAC2MAC_MR_ADV_ABILITY_100M BIT(10) >> +#define MAC2PHY_MR_ADV_ABILITY BIT(0) > > Most of the above don't seem to be used, and the only one that seems to > be used is used in a variable declaration where the variable isn't used, > and thus us also unused. > >> >> #define AM65_CPSW_CTL_VLAN_AWARE BIT(1) >> #define AM65_CPSW_CTL_P0_ENABLE BIT(2) >> @@ -1493,6 +1501,7 @@ static void am65_cpsw_nuss_mac_config(struct phylink_config *config, unsigned in >> struct am65_cpsw_slave_data *slave = container_of(config, struct am65_cpsw_slave_data, >> phylink_config); >> struct am65_cpsw_port *port = container_of(slave, struct am65_cpsw_port, slave); >> + u32 mr_adv_ability = MAC2MAC_MR_ADV_ABILITY_BASE; > > This doesn't seem to be used; should it be part of a different patch? > > I get the impression that most of this patch should be elsewhere in this > series. Thank you for pointing it out. These should have been a part of the previous patch [PATCH 5/8]. Sorry for the confusion. I will fix this in the v2 series. Regards, Siddharth.