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 0BCB7C4332F for ; Fri, 9 Dec 2022 02:27:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229717AbiLIC1L convert rfc822-to-8bit (ORCPT ); Thu, 8 Dec 2022 21:27:11 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52104 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229795AbiLIC1H (ORCPT ); Thu, 8 Dec 2022 21:27:07 -0500 Received: from fd01.gateway.ufhost.com (fd01.gateway.ufhost.com [61.152.239.71]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BD25E442FE; Thu, 8 Dec 2022 18:27:04 -0800 (PST) Received: from EXMBX166.cuchost.com (unknown [175.102.18.54]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "EXMBX166", Issuer "EXMBX166" (not verified)) by fd01.gateway.ufhost.com (Postfix) with ESMTP id 2ED5F24DD6E; Fri, 9 Dec 2022 10:26:58 +0800 (CST) Received: from EXMBX173.cuchost.com (172.16.6.93) by EXMBX166.cuchost.com (172.16.6.76) with Microsoft SMTP Server (TLS) id 15.0.1497.42; Fri, 9 Dec 2022 10:26:58 +0800 Received: from [192.168.120.49] (171.223.208.138) by EXMBX173.cuchost.com (172.16.6.93) with Microsoft SMTP Server (TLS) id 15.0.1497.42; Fri, 9 Dec 2022 10:26:56 +0800 Message-ID: <236b1b83-9bda-ac09-ea09-9701dccb4ac6@starfivetech.com> Date: Fri, 9 Dec 2022 10:26:55 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.5.1 Subject: Re: [PATCH v1 2/7] net: stmmac: platform: Add snps,dwmac-5.20 IP compatible string Content-Language: en-US To: Ben Dooks CC: , , , , "David S . Miller" , Eric Dumazet , "Jakub Kicinski" , Paolo Abeni , Rob Herring , Krzysztof Kozlowski , Emil Renner Berthing , Richard Cochran , Andrew Lunn , Heiner Kallweit , Peter Geis References: <20221201090242.2381-1-yanhong.wang@starfivetech.com> <20221201090242.2381-3-yanhong.wang@starfivetech.com> From: yanhong wang In-Reply-To: Content-Type: text/plain; charset="UTF-8" X-Originating-IP: [171.223.208.138] X-ClientProxiedBy: EXCAS064.cuchost.com (172.16.6.24) To EXMBX173.cuchost.com (172.16.6.93) X-YovoleRuleAgent: yovoleflag Content-Transfer-Encoding: 8BIT Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2022/12/9 9:59, Ben Dooks wrote: > > > On 2022-12-01 09:02, Yanhong Wang wrote: >> Add "snps,dwmac-5.20" compatible string for 5.20 version that can avoid >> to define some platform data in the glue layer. >> >> Signed-off-by: Emil Renner Berthing >> Signed-off-by: Yanhong Wang >> --- >>  drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c | 3 ++- >>  1 file changed, 2 insertions(+), 1 deletion(-) >> >> diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c >> b/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c >> index 50f6b4a14be4..cc3b701af802 100644 >> --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c >> +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c >> @@ -519,7 +519,8 @@ stmmac_probe_config_dt(struct platform_device >> *pdev, u8 *mac) >>      if (of_device_is_compatible(np, "snps,dwmac-4.00") || >>          of_device_is_compatible(np, "snps,dwmac-4.10a") || >>          of_device_is_compatible(np, "snps,dwmac-4.20a") || >> -        of_device_is_compatible(np, "snps,dwmac-5.10a")) { >> +        of_device_is_compatible(np, "snps,dwmac-5.10a") || >> +        of_device_is_compatible(np, "snps,dwmac-5.20")) { >>          plat->has_gmac4 = 1; >>          plat->has_gmac = 0; >>          plat->pmt = 1; > > out of interest, is the version of the ip autodetectable yet? > also, we would be better off if having an if (version > 4) check if we use the standard snps ip block code headers > Yes, the version of the ip is autodetectable. It is also possible to use the standard "snps, dwmac-5.10a" definition on JH7110(has been tested on the VisionFive v2 boards and works normally), do you have any better suggestions?