From owner-freebsd-arm@freebsd.org Mon Jul 23 15:51:45 2018 Return-Path: Delivered-To: freebsd-arm@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EFB77104E9A5 for ; Mon, 23 Jul 2018 15:51:44 +0000 (UTC) (envelope-from mmitchel@gmail.com) Received: from mail-pg1-x534.google.com (mail-pg1-x534.google.com [IPv6:2607:f8b0:4864:20::534]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 46AC8823F4; Mon, 23 Jul 2018 15:51:44 +0000 (UTC) (envelope-from mmitchel@gmail.com) Received: by mail-pg1-x534.google.com with SMTP id s7-v6so679443pgv.3; Mon, 23 Jul 2018 08:51:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:message-id:mime-version:subject:date:in-reply-to:cc:to :references; bh=y6Ko/nVghq620l9R/lgpAYpNivMd6e4oUm02i60wsdQ=; b=osF0kncK0Fa5nLFk/8zU01nLWPDK7cPIDj0qO/8iWyUX4mIyOFlBi7qN06sGUq6KT/ WA5/Ifa55CWssA1rWcy7e1VlHLAIlysfFOsVJ787641dwvkKTfihseXZFDFReRE+ifHE OEtw+If8eyIQJNf45DWRTR61c5Cog6MSadCaEeWmssJ7GWnSwGvMJrrP7ImfJha20buk pt/e0T5LRCatGtkThfdQjAIpGTMd0Bs+3ZG0Gz+ruH1Nh/gzLzlTbJwyNhTw3dhyVin7 9kslomijalpaGevU4T5ZqBiizzcpahnuhSHans55p5xpQ55iASpEm4nQF72heGPo/UST j47A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:message-id:mime-version:subject:date :in-reply-to:cc:to:references; bh=y6Ko/nVghq620l9R/lgpAYpNivMd6e4oUm02i60wsdQ=; b=rgvZTmF+AqnXeoFUDcJb0NT0hHERBxbHUKvx4n228aNhTl8L5Z3mr86N9hlrQYj86f x97LCKTyMCQfLkPhFz+GR55N0dFwM8V3xIboZCP72UgYOqxFVGsRGPKPlj50AI/9o3FB CG3904d/szMwXKH7WT46ua2kEcV1KDFXBDQN5fkTe2/ngtWmgIoYItg0QJmKxASyrSna xlJR8rNnUyogVlmC0P08Pdwsi9OFUl0Ig6S4x22OBAvLhN1K1y0MiPXg37MEBkHozXOH bhHqKVU8YRiURozA8G3vR+cu4OMINH+GyG8xMZictHuuD2a3ZDiRGFUhFLkPNeKy+vVh ZkiQ== X-Gm-Message-State: AOUpUlGeneDeHDxD6v+IwR+GLFI9N6BIkO5wNeR2+nYAGrK08H//Mv2O pKEd+pEejVFMXq2veSqzRLw/5gU= X-Google-Smtp-Source: AAOMgpfwKMg47uJ584eotsPWE3EtSw4ukhnC/9eJN2G67DaEBu2FWHnR9o8qMadfJLWs6YzWyHwCaQ== X-Received: by 2002:a63:4203:: with SMTP id p3-v6mr12720042pga.184.1532361103162; Mon, 23 Jul 2018 08:51:43 -0700 (PDT) Received: from [192.168.1.47] (cpe-70-95-124-159.san.res.rr.com. [70.95.124.159]) by smtp.gmail.com with ESMTPSA id n26-v6sm5468172pgv.78.2018.07.23.08.51.42 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 23 Jul 2018 08:51:42 -0700 (PDT) From: Michael Mitchell Message-Id: <23DA127A-B954-44A8-8BA3-4D4F1E0D11A2@gmail.com> Mime-Version: 1.0 (Mac OS X Mail 11.5 \(3445.9.1\)) Subject: Re: rpi3 and Adafruit GPS Hat Date: Mon, 23 Jul 2018 08:51:40 -0700 In-Reply-To: <002D469F-26E0-492A-BEB7-8A61A56ECABF@ralphsmith.org> Cc: Ian Lepore , freebsd-arm To: Ralph Smith References: <47f49a55-66b0-1c02-4530-4701a3bd0c43@nethead.se> <20180718170157.GA40221@night.db.net> <7a14173c-cc28-6dc7-3787-a5b77a396b30@nethead.se> <1532357176.1344.130.camel@freebsd.org> <1532359478.1344.142.camel@freebsd.org> <002D469F-26E0-492A-BEB7-8A61A56ECABF@ralphsmith.org> X-Mailer: Apple Mail (2.3445.9.1) Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.27 X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Jul 2018 15:51:45 -0000 hi all: maybe this would be the supported u-boot method to give up the serial output messages during startup: https://github.com/u-boot/u-boot/blob/master/doc/README.silent = just a thought mdm > On Jul 23, 2018, at 8:37 AM, Ralph Smith wrote: >=20 >=20 >=20 > Sent from my iPhone >=20 >> On Jul 23, 2018, at 11:24 AM, Ian Lepore wrote: >>=20 >>> On Mon, 2018-07-23 at 17:20 +0200, Per olof Ljungmark wrote: >>>> On 07/23/18 16:46, Ian Lepore wrote: >>>>=20 >>>>> On Mon, 2018-07-23 at 11:40 +0200, Per olof Ljungmark wrote: >>>>>=20 >>>>>> On 07/23/18 10:46, David Cornejo wrote: >>>>>>=20 >>>>>>=20 >>>>>> this might be a little blasphemous, but for grins I tried an = Oncore with >>>>>> PPS to a GPIO and running the serial through a TTL-USB serial = cable and >>>>>> that seems to work ok. >>>>>>=20 >>>>>> there's probably some good reason that this is a bad idea. >>>>> Depends on what precision you are after, but for lowest possible = jitter >>>>> you need to use the uart, the difference is in magnitudes. >>>>>=20 >>>> Technically that may be correct, but it's meaningless. On a usb 1.x >>>> adapter there may be ~500us of jitter from one measurement to the = next. >>>> On a usb 2.x adapter the jitter drops to typically ~60us. Those = values >>>> are pretty much in the noise for ntpd, which uses a median filter = to >>>> smooth any serious jitter out of the measurements. >>>>=20 >>>> Here are some real-world measurements. The pps source for all 3 = inputs >>>> is the same gps-disciplined rubidium oscillator, so all the jitter = is >>>> within the uart, usb hardware, and freebsd drivers. The usb = adapters >>>> are both FTDI chips, which have a fixed latency on reporting a = change >>>> on the DCD pin (pin-change status messages are only delivered once = a >>>> millisecond on ftdi chips). >>>>=20 >>>> remote refid st t when poll reach delay offset = jitter >>>> = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D >>>> xPPS(0) .uart. 0 l 6 16 377 0.000 1.097 = 0.001 >>>> xPPS(1) .usb1. 0 l 4 16 377 0.000 -0.051 = 0.773 >>>> oPPS(2) .usb2. 0 l 4 16 377 0.000 -0.001 = 0.035 >>>> *dvb.hippie.lan .GPS. 1 u 12 64 377 1.234 1.296 = 2.707 >>>> +utcnist2.colora .NIST. 1 u 1 64 377 13.605 3.940 = 2.729 >>>>=20 >>>> You can see in this case ntpd actually chose the usb2 pps input as = the >>>> system peer. It did so because at startup the clock offset was = closer >>>> than the uart, and the difference in jitter between the two wasn't >>>> significant, so the ntpd code that prevents clock-hopping chose to >>>> stick with the peer with the smaller offset. >>>>=20 >>> Yes, I was technically correct but of course you are right too - >>> however, the main problem is not the jitter but rather that I am = unable >>> to switch off the serial console and stop the u-boot loader from >>> receiving NMEA data. The Adafruit GPS Hat is made to sit right on = the Pi >>> 40-pin header, as you probably know. >>>=20 >>> To quote one of the posters in the thread I linked to: >>> "... I am seriously baffled by how difficult (nearly impossible) it = had >>> been to get rid of the serial console..." >>>=20 >>> Unfortunately I am not fluid enough to figure out where to make the >>> changes, the advices I've seen so far is not applicable to = 12-CURRENT in >>> an easy way. >>>=20 >>> And that is also why I wrote bugreport 229976. It may be that all = the >>> folks involved with FreeBSD/ARM are serious developers so they do = not >>> see it as a problem but for me it is, being more on the >>> application/administration side of things. >>>=20 >>> Thanks, >>>=20 >>> //per >>>=20 >>=20 >> Unfortunately, I can't help with the rpi part of this, since it's >> related to the firmware and uboot, and that part of the rpi world has >> changed drastically since I was involved with it years ago. I know = you >> can build a custom uboot that disables serial console support >> completely, but I don't know if there's a way to achieve that with = the >> stock uboot. >=20 > Not using the stock uboot, you will need to modify it. I have this = working on 12-CURRENT for the Pi 2, I haven=E2=80=99t tried it on the Pi = 3. I documented how I modified u-boot for 11-STABLE in = https://docs.freebsd.org/cgi/getmsg.cgi?fetch=3D188164+0+archive/2018/free= bsd-arm/20180204.freebsd-arm, this should apply to the current u-boot = port as well. You will also meet to modify the DTB so the system = doesn=E2=80=99t send console output to the uart as well.=20 >=20 > Ralph > _______________________________________________ > freebsd-arm@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-arm > To unsubscribe, send any mail to "freebsd-arm-unsubscribe@freebsd.org"