From owner-freebsd-arm@freebsd.org Thu Jul 9 20:35:41 2020 Return-Path: Delivered-To: freebsd-arm@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 521973559A2 for ; Thu, 9 Jul 2020 20:35:41 +0000 (UTC) (envelope-from gonzo@bluezbox.com) Received: from id.bluezbox.com (id.bluezbox.com [45.55.20.155]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4B2nxS1K67z4bKM for ; Thu, 9 Jul 2020 20:35:39 +0000 (UTC) (envelope-from gonzo@bluezbox.com) Received: from localhost ([127.0.0.1] helo=id.bluezbox.com) by id.bluezbox.com with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94 (FreeBSD)) (envelope-from ) id 1jtdGW-0002fP-UM; Thu, 09 Jul 2020 13:35:33 -0700 Received: (from gonzo@localhost) by id.bluezbox.com (8.15.2/8.15.2/Submit) id 069KZWSo010254; Thu, 9 Jul 2020 13:35:32 -0700 (PDT) (envelope-from gonzo@bluezbox.com) X-Authentication-Warning: id.bluezbox.com: gonzo set sender to gonzo@bluezbox.com using -f Date: Thu, 9 Jul 2020 13:35:32 -0700 From: Oleksandr Tymoshenko To: Peter Jeremy Cc: freebsd-arm@freebsd.org Subject: Re: RK3328/Rock64 GigE testers needed. Message-ID: <20200709203532.GA9738@bluezbox.com> References: <20200705000643.GA63127@server.rulingia.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200705000643.GA63127@server.rulingia.com> X-Operating-System: FreeBSD/11.2-RELEASE-p10 (amd64) X-Spam-Level: -- X-Spam-Report: Spam detection software, running on the system "id.bluezbox.com", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see The administrator of that system for details. Content preview: Peter Jeremy (peter@rulingia.com) wrote: > Head r362736 has enabled the internal RGMII delay lines in the RK3328 > (and RK3399) and this breaks networking on my Rock64 v2.0 (that I've > modded to use [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Rspamd-Queue-Id: 4B2nxS1K67z4bKM X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of gonzo@bluezbox.com designates 45.55.20.155 as permitted sender) smtp.mailfrom=gonzo@bluezbox.com X-Spamd-Result: default: False [-2.18 / 15.00]; MID_RHS_MATCH_FROM(0.00)[]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.02)[-1.016]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+mx]; NEURAL_HAM_LONG(-1.03)[-1.031]; MIME_GOOD(-0.10)[text/plain]; HAS_XAW(0.00)[]; DMARC_NA(0.00)[bluezbox.com]; NEURAL_SPAM_SHORT(0.17)[0.167]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCPT_COUNT_TWO(0.00)[2]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:14061, ipnet:45.55.0.0/19, country:US]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[] X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Jul 2020 20:35:41 -0000 Peter Jeremy (peter@rulingia.com) wrote: > Head r362736 has enabled the internal RGMII delay lines in the RK3328 > (and RK3399) and this breaks networking on my Rock64 v2.0 (that I've > modded to use the higher RGMII bus voltage, as per the v3.0). > > gonzo@ and I would be interested in other people's experiences with > this revision - particularly other people with Rock64 v2 or Rock64 v3 > boards. Thanks to everyone for tests, it looks like only Peter's device networking was completely broken by the commit. As a possible workaround I consider adding a tunable/sysctl that can be used to override the delay in DTB. The change is available in this patch: https://people.freebsd.org/~gonzo/patches/rockchip-gmac-202007009.patch This is WIP on improving if_dwc_rk and contains following changes - Enable and dump gmac clocks frequencies. RK3328 does not have ethernet clocks implemented yet so this part fails on the SoC. - Configure clock according to the sensed media. I was able to switch between 100 and 1000 switches on both Rock64 and on Firefly-RK3399 - Introduces tunable and sysctl dev.dwc.X.delays (where X is a unit number, e.g. 0, 1... etc. The value is (rx_delay << 8) | tx_delay, so adding dev.dwc.0.delays=0x4533 to loader.conf would set rx delay to 69 and tx delay to 51. It's possible to change delays run-time using sysctl too so people can experiment with values fast. - Print delay values and enable flags when changing delays. This should be useful to get the delay values set by U-Boot and that worked before the r362736. The patch does not have any performance improvements, so there is no need to re-run tests. -- gonzo