From owner-freebsd-arm@freebsd.org Fri Jul 10 05:58:49 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 6754035FEE9 for ; Fri, 10 Jul 2020 05:58:49 +0000 (UTC) (envelope-from charlesr@scd-systems.net) Received: from mail.scd-systems.net (warbird.scd-systems.net [37.120.173.96]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mail.scd-systems.net", Issuer "mail.scd-systems.net" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B32RD2FhPz48Yf for ; Fri, 10 Jul 2020 05:58:47 +0000 (UTC) (envelope-from charlesr@scd-systems.net) Received: from mail.scd-systems.net (127.0.1.80 [127.0.1.80]) by mail.scd-systems.net (OpenSMTPD) with ESMTP id b904643a for ; Fri, 10 Jul 2020 05:58:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed; d=scd-systems.net; h= reply-to:subject:to:references:from:message-id:date:mime-version :in-reply-to:content-type:content-transfer-encoding; s=default; bh=djL8cDITG+A/CQ2LwSYnoBMNRxa7Ucx7kEYIDvLPDpo=; b=TOClbY0nJWZh j9gFMuOnckp/5Ra815fk3uZl9A0Uw30GmR6jvzt+KDEVD7L1OgVaXIv0bcHkyrZ5 4bJKpfnJgHJ6oYobKIV5yttdziQbGUEzVTWjyc9S7hx8ARO8QjsJtf8HSIt9MSLZ vCPj0WivaAwRjcmuijjxk2bZfoZ8ep8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=scd-systems.net; h=reply-to :subject:to:references:from:message-id:date:mime-version :in-reply-to:content-type:content-transfer-encoding; q=dns; s= default; b=ZxBN6PyA3H2OPlmW/BpXIzN9BiJ7Tn2cmBbitorFNjroM/elqJIrA KixqpTBcpX9G0wd/wMW3378W+Ea8TU5YVN9DHvCsNTBqFm6N/aJkhYf+5aynBWiO NlfqVVh5Awyz8d8B8t/0/KZ/cKnCFJzdQKpKHdvf+/gZGaqRnJkE3c= Received: from LT1006.fritz.box (127.0.1.254 [127.0.1.254]) by mail.scd-systems.net (OpenSMTPD) with ESMTPSA id 9befa16d TLS version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO for ; Fri, 10 Jul 2020 05:58:40 +0000 (UTC) Reply-To: charlesr@scd-systems.net Subject: Re: RK3328/Rock64 GigE testers needed. To: freebsd-arm@freebsd.org References: <20200705000643.GA63127@server.rulingia.com> <20200709203532.GA9738@bluezbox.com> From: Charles Message-ID: Date: Fri, 10 Jul 2020 07:58:39 +0200 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: <20200709203532.GA9738@bluezbox.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-GB Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 4B32RD2FhPz48Yf X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=scd-systems.net header.s=default header.b=TOClbY0n; dmarc=none; spf=pass (mx1.freebsd.org: domain of charlesr@scd-systems.net designates 37.120.173.96 as permitted sender) smtp.mailfrom=charlesr@scd-systems.net X-Spamd-Result: default: False [-2.94 / 15.00]; HAS_REPLYTO(0.00)[charlesr@scd-systems.net]; RCVD_VIA_SMTP_AUTH(0.00)[]; R_DKIM_ALLOW(-0.20)[scd-systems.net:s=default]; ARC_NA(0.00)[]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; R_SPF_ALLOW(-0.20)[+mx]; MIME_GOOD(-0.10)[text/plain]; TO_DN_NONE(0.00)[]; REPLYTO_ADDR_EQ_FROM(0.00)[]; RCPT_COUNT_ONE(0.00)[1]; NEURAL_HAM_LONG(-1.05)[-1.053]; RCVD_COUNT_THREE(0.00)[3]; PREVIOUSLY_DELIVERED(0.00)[freebsd-arm@freebsd.org]; DKIM_TRACE(0.00)[scd-systems.net:+]; NEURAL_HAM_SHORT(-0.41)[-0.409]; DMARC_NA(0.00)[scd-systems.net: no valid DMARC record]; NEURAL_HAM_MEDIUM(-0.98)[-0.979]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; RCVD_TLS_LAST(0.00)[]; ASN(0.00)[asn:197540, ipnet:37.120.160.0/19, country:DE]; MID_RHS_MATCH_FROM(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: Fri, 10 Jul 2020 05:58:49 -0000 Hi gonzo, Mark, If this patch and tuning settings are not help, do I have to solder like mentioned in https://sanisimov.com/2019/08/fixing-rock64-v2-gigabit-ethernet/ ? Just for the case, I bought some resistors. I would like to know why the interface works stable with linux. Best, C. Am 09.07.20 um 22:35 schrieb Oleksandr Tymoshenko: > 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. >