From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net [23.128.96.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id EF10F1849 for ; Tue, 26 Sep 2023 09:12:46 +0000 (UTC) Received: from mx01.omp.ru (mx01.omp.ru [90.154.21.10]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 11167EB; Tue, 26 Sep 2023 02:12:42 -0700 (PDT) Received: from [192.168.1.103] (31.173.84.78) by msexch01.omp.ru (10.188.4.12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.2.986.14; Tue, 26 Sep 2023 12:12:39 +0300 Subject: Re: [PATCH net v2] net: ethernet: renesas: rswitch Fix PHY station management clock setting To: Yoshihiro Shimoda , , , , , CC: , , Tam Nguyen , Kuninori Morimoto References: <20230926081156.3930074-1-yoshihiro.shimoda.uh@renesas.com> From: Sergey Shtylyov Organization: Open Mobile Platform Message-ID: <5cffcbce-9521-e896-d2e2-93585e6068ee@omp.ru> Date: Tue, 26 Sep 2023 12:12:38 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.10.1 Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 In-Reply-To: <20230926081156.3930074-1-yoshihiro.shimoda.uh@renesas.com> Content-Type: text/plain; charset="utf-8" Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [31.173.84.78] X-ClientProxiedBy: msexch01.omp.ru (10.188.4.12) To msexch01.omp.ru (10.188.4.12) X-KSE-ServerInfo: msexch01.omp.ru, 9 X-KSE-AntiSpam-Interceptor-Info: scan successful X-KSE-AntiSpam-Version: 5.9.59, Database issued on: 09/26/2023 08:47:48 X-KSE-AntiSpam-Status: KAS_STATUS_NOT_DETECTED X-KSE-AntiSpam-Method: none X-KSE-AntiSpam-Rate: 59 X-KSE-AntiSpam-Info: Lua profiles 180129 [Sep 26 2023] X-KSE-AntiSpam-Info: Version: 5.9.59.0 X-KSE-AntiSpam-Info: Envelope from: s.shtylyov@omp.ru X-KSE-AntiSpam-Info: LuaCore: 534 534 808c2ea49f7195c68d40844e073217da4fa0d1e3 X-KSE-AntiSpam-Info: {rep_avail} X-KSE-AntiSpam-Info: {Tracking_from_domain_doesnt_match_to} X-KSE-AntiSpam-Info: {relay has no DNS name} X-KSE-AntiSpam-Info: {SMTP from is not routable} X-KSE-AntiSpam-Info: {Found in DNSBL: 31.173.84.78 in (user) b.barracudacentral.org} X-KSE-AntiSpam-Info: {Found in DNSBL: 31.173.84.78 in (user) dbl.spamhaus.org} X-KSE-AntiSpam-Info: d41d8cd98f00b204e9800998ecf8427e.com:7.1.1;omp.ru:7.1.1;127.0.0.199:7.1.2;31.173.84.78:7.1.2 X-KSE-AntiSpam-Info: FromAlignment: s X-KSE-AntiSpam-Info: {rdns complete} X-KSE-AntiSpam-Info: {fromrtbl complete} X-KSE-AntiSpam-Info: ApMailHostAddress: 31.173.84.78 X-KSE-AntiSpam-Info: Rate: 59 X-KSE-AntiSpam-Info: Status: not_detected X-KSE-AntiSpam-Info: Method: none X-KSE-AntiSpam-Info: Auth:dmarc=none header.from=omp.ru;spf=none smtp.mailfrom=omp.ru;dkim=none X-KSE-Antiphishing-Info: Clean X-KSE-Antiphishing-ScanningType: Heuristic X-KSE-Antiphishing-Method: None X-KSE-Antiphishing-Bases: 09/26/2023 08:54:00 X-KSE-Antivirus-Interceptor-Info: scan successful X-KSE-Antivirus-Info: Clean, bases: 9/26/2023 6:37:00 AM X-KSE-Attachment-Filter-Triggered-Rules: Clean X-KSE-Attachment-Filter-Triggered-Filters: Clean X-KSE-BulkMessagesFiltering-Scan-Result: InTheLimit X-Spam-Status: No, score=-3.4 required=5.0 tests=BAYES_00,NICE_REPLY_A, RCVD_IN_DNSWL_BLOCKED,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 Hello! You missed a colon after rswitch. And historically we used simpler prefixes, like just sh_eth or ravb... On 9/26/23 11:11 AM, Yoshihiro Shimoda wrote: > Fix the MPIC.PSMCS value following the programming example in the > section 6.4.2 Management Data Clock (MDC) Setting, Ethernet MAC IP, > S4 Hardware User Manual Rev.1.00. > > The value is calculated by > MPIC.PSMCS = clk[MHz] / (MDC frequency[MHz] * 2) - 1 > with the input clock frequency from clk_get_rate() and MDC frequency > of 2.5MHz. Otherwise, this driver cannot communicate PHYs on the R-Car > S4 Starter Kit board. > > Fixes: 3590918b5d07 ("net: ethernet: renesas: Add support for "Ethernet Switch"") > Reported-by: Tam Nguyen > Signed-off-by: Yoshihiro Shimoda > Tested-by: Kuninori Morimoto [...] MBR, Sergey