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 X-Spam-Level: X-Spam-Status: No, score=-15.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 87481C11F64 for ; Thu, 1 Jul 2021 08:22:54 +0000 (UTC) Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id B9CBC61480 for ; Thu, 1 Jul 2021 08:22:53 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B9CBC61480 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=denx.de Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id F2DAB8320D; Thu, 1 Jul 2021 10:22:51 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=denx.de Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=denx.de; s=phobos-20191101; t=1625127772; bh=41nbIK9JOcyD/mHoPTBspM7QE8Tzdy94cS81tOZIpRo=; h=Subject:From:To:Cc:References:Date:In-Reply-To:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=KmMk4bNtjpPI856KMIBgibTnwk/cCa0EgHXu1YoZ4wHi7n4D1F0c5U1fVyf9c8xeX IZ/yUnXqotL8587nA7WOpiyPKyYfM2TtM6KcTHwR8s5s/bZKzztUB7ClR3S8pdltav GDlM6te132ZE8Q8r6TGpZ9FI1fGcI/wqRwSAB/y3rue0NUt5xauJS0/ArUfssXlPOQ GV0dxBuU28JwUIiqYu09fnnxRz9VhPEAGIdHEWfF8YazzobH1bQA+kL4BIk6N/bK9I aUDoIcWB2l2bj6PM7z2i/4rG/g2iEJB7TmvMmCQ6j3FfRWusm5/gpM3eY1ct4WYdO+ cGQgds6zIlUrw== Received: by phobos.denx.de (Postfix, from userid 109) id 8C89783236; Thu, 1 Jul 2021 10:22:50 +0200 (CEST) Received: from mout-u-204.mailbox.org (mout-u-204.mailbox.org [IPv6:2001:67c:2050:1::465:204]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id D4768831F3 for ; Thu, 1 Jul 2021 10:22:47 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=denx.de Authentication-Results: phobos.denx.de; spf=fail smtp.mailfrom=sr@denx.de Received: from smtp1.mailbox.org (smtp1.mailbox.org [80.241.60.240]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-u-204.mailbox.org (Postfix) with ESMTPS id 4GFrn34F6PzQk71; Thu, 1 Jul 2021 10:22:47 +0200 (CEST) Received: from smtp1.mailbox.org ([80.241.60.240]) by gerste.heinlein-support.de (gerste.heinlein-support.de [91.198.250.173]) (amavisd-new, port 10030) with ESMTP id G6wO9pOKGiHl; Thu, 1 Jul 2021 10:22:44 +0200 (CEST) Subject: Re: [PATCH 3/4] NSA310S : Use Ethernet PHY name from device tree From: Stefan Roese To: Tony Dinh , U-Boot Mailing List Cc: Tom Rini , Chris Packham References: <20210701042625.18815-1-mibodhi@gmail.com> <20210701042625.18815-4-mibodhi@gmail.com> <41f44aa6-0af8-6ddb-cf5c-2b4ced65b7d9@denx.de> Message-ID: <73d89073-9066-ff80-15d5-93bc0a7a4e27@denx.de> Date: Thu, 1 Jul 2021 10:22:44 +0200 MIME-Version: 1.0 In-Reply-To: <41f44aa6-0af8-6ddb-cf5c-2b4ced65b7d9@denx.de> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: de-DE Content-Transfer-Encoding: 8bit X-MBO-SPAM-Probability: X-Rspamd-Score: -3.01 / 15.00 / 15.00 X-Rspamd-Queue-Id: B813018B9 X-Rspamd-UID: bde361 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.2 at phobos.denx.de X-Virus-Status: Clean Hi Tony, On 01.07.21 10:19, Stefan Roese wrote: > On 01.07.21 06:26, Tony Dinh wrote: >> In DM Ethernet, the old "egiga0" name is no longer valid, so replace it >> with Ethernet PHY name from device tree. >> >> Signed-off-by: Tony Dinh >> --- >> >>   board/zyxel/nsa310s/nsa310s.c | 15 +++++++-------- >>   1 file changed, 7 insertions(+), 8 deletions(-) >> >> diff --git a/board/zyxel/nsa310s/nsa310s.c >> b/board/zyxel/nsa310s/nsa310s.c >> index cd4a7723b1..29aded1910 100644 >> --- a/board/zyxel/nsa310s/nsa310s.c >> +++ b/board/zyxel/nsa310s/nsa310s.c >> @@ -1,5 +1,6 @@ >>   // SPDX-License-Identifier: GPL-2.0+ >>   /* >> + * Copyright (C) 2021 Tony Dinh > > AFAIU, just changing a few lines, as this patch does, does not justify > to add a copyright notice to this file. I just noticed that you already are present in the copyright notice below. I suggest to change this in a way, so that your name only occurs once, like: * Copyright (C) 2015, 2021 Tony Dinh Does this make sense? Thanks, Stefan >>    * Copyright (C) 2015 >>    * Gerald Kerma >>    * Tony Dinh >> @@ -81,22 +82,18 @@ int board_init(void) >>       return 0; >>   } >> +#define PHY_ADR    1 > > You should be able to read this PHY address from the device-tree now. > No need to define this here again. > > Thanks, > Stefan > >> + >>   #ifdef CONFIG_RESET_PHY_R >>   void reset_phy(void) >>   { >>       u16 reg; >> -    u16 phyaddr; >> -    char *name = "egiga0"; >> +    u16 phyaddr = PHY_ADR; >> +    char *name = "ethernet-controller@72000"; >>       if (miiphy_set_current_dev(name)) >>           return; >> -    /* read PHY dev address */ >> -    if (miiphy_read(name, 0xee, 0xee, (u16 *) &phyaddr)) { >> -        printf("could not read PHY dev address\n"); >> -        return; >> -    } >> - >>       /* set RGMII delay */ >>       miiphy_write(name, phyaddr, MV88E1318_PGADR_REG, >> MV88E1318_MAC_CTRL_PG); >>       miiphy_read(name, phyaddr, MV88E1318_MAC_CTRL_REG, ®); >> @@ -131,5 +128,7 @@ void reset_phy(void) >>       /* downshift */ >>       miiphy_write(name, phyaddr, 0x10, 0x3860); >>       miiphy_write(name, phyaddr, 0x0, 0x9140); >> + >> +    printf("MV88E1318 PHY initialized on %s\n", name); >>   } >>   #endif /* CONFIG_RESET_PHY_R */ >> > > > Viele Grüße, > Stefan > Viele Grüße, Stefan -- DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-51 Fax: (+49)-8142-66989-80 Email: sr@denx.de