From owner-freebsd-arm@freebsd.org Wed Jul 31 14:06:34 2019 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 579EFBF51F for ; Wed, 31 Jul 2019 14:06:34 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from outbound2m.ore.mailhop.org (outbound2m.ore.mailhop.org [54.149.155.156]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 45zFbF6wwsz3Nb6 for ; Wed, 31 Jul 2019 14:06:33 +0000 (UTC) (envelope-from ian@freebsd.org) ARC-Seal: i=1; a=rsa-sha256; t=1564581992; cv=none; d=outbound.mailhop.org; s=arc-outbound20181012; b=uUSdWrzPMMOPIIHyKPH09vd6qomPzjwHFpdai3Ngh2zNJIbsgjzGt13HmmdZn0zjKpIpTXWdP+oqv 1SrFO7FxEQ13BIKNXZuwtOo3K5PYCFYbChgD5Bbod+X2/b+8y+dMP4bi+eHX+kacgu5JBORfA665s0 2jMDZPKxE1Dxt/I+ubjp57NgK4onDEVO0hLx/YeOgQb9Z0UZcSiyro9w4mxAB19+bWoGLzTrok9fqL ZHlZ/ljaBwTliK8N4BPFlq4E0KNjnnsPClC/tA1BneNbqODJAn8h1SAdxEb4SD01CA3fxmFBNVOP1k Is6mL0QW5ho60UawD7glDJ2wBSa85JA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=outbound.mailhop.org; s=arc-outbound20181012; h=content-transfer-encoding:mime-version:content-type:references:in-reply-to: date:to:from:subject:message-id:dkim-signature:from; bh=IY1rDdS6/7YQpqg1Hlfr+1+YUioYx7MqSO3B/2sQCiY=; b=pjOYp/9JXMJ0NUSQdJ+PJ83qOmXiZoX7tVmRKxUYZCJML1AGmIL/TxxbVHOwQ2BgFWAwZomAWvwMl h7Gd9FBD1YGQJf4pW2zg+NBkjglZst+WyWJ7FMiIpXAH8EZT6JhJD2E0sl6K7P22keJ3m7RLdl0AqZ WxBN1DtqkVdFi03Q0v5Mim3LlAViTWcmCMCZG8Vr7pcxN5VTAK7kDH95QAwWFvzeXn5a3BiLDoQINE miip1vsM8rAch5oKwcqKDhvrjYId9bXZjQR+86l53K3IkKyXnAsk8ZdB61a9gjdyRNcGnuT2puDpif y4CvI4b+6K2Jo+oSvTjhfWVSXm9VrRQ== ARC-Authentication-Results: i=1; outbound4.ore.mailhop.org; spf=softfail smtp.mailfrom=freebsd.org smtp.remote-ip=67.177.211.60; dmarc=none header.from=freebsd.org; arc=none header.oldest-pass=0; DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=outbound.mailhop.org; s=dkim-high; h=content-transfer-encoding:mime-version:content-type:references:in-reply-to: date:to:from:subject:message-id:from; bh=IY1rDdS6/7YQpqg1Hlfr+1+YUioYx7MqSO3B/2sQCiY=; b=Ot/+FTX6eCfLa7M6c417ODMPmxp9ukjirmPzYFqb0gpC1gXopPZzFGHnJT7IlsoBHRf5Qg80O/DJs 4T2Ji0UVjKK5m8BvQ9VlOJ+mw8Nm0g023tBqlzDuferc38Waff8JA3ZPjybxHrSP/JMJk0/my0Blhr xR4eCQ0jj0Q145IG8KKbBjvs+v02p96qgW+94fANaH2RwLfFuvHKwkmAOTRi0r81ojQM8JjYBylTA+ YWAtnxckFt8U2I/P4JGFXAu/rOab05l4n/Tl3jdzD1sPQ5/FhVcbgkWvDs0nPj/aEac5v9FKOjdXre NKDgqPk4OYdSPgwVofG5AFrObv/WFxg== X-MHO-RoutePath: aGlwcGll X-MHO-User: 64bb1636-b39c-11e9-85ec-13b9aae3a1d2 X-Report-Abuse-To: https://support.duocircle.com/support/solutions/articles/5000540958-duocircle-standard-smtp-abuse-information X-Originating-IP: 67.177.211.60 X-Mail-Handler: DuoCircle Outbound SMTP Received: from ilsoft.org (unknown [67.177.211.60]) by outbound4.ore.mailhop.org (Halon) with ESMTPSA id 64bb1636-b39c-11e9-85ec-13b9aae3a1d2; Wed, 31 Jul 2019 14:06:31 +0000 (UTC) Received: from rev (rev [172.22.42.240]) by ilsoft.org (8.15.2/8.15.2) with ESMTP id x6VE6TeH097151; Wed, 31 Jul 2019 08:06:29 -0600 (MDT) (envelope-from ian@freebsd.org) Message-ID: <2ab16425ac48bb7ff4365561b8959ee3eac50530.camel@freebsd.org> Subject: Re: Pine64-LTS overlays for uart ports fixed! From: Ian Lepore To: Kaya Saman , "freebsd-arm@freebsd.org" Date: Wed, 31 Jul 2019 08:06:29 -0600 In-Reply-To: <09afae63-3583-46bd-8911-82a0f0a3185f@optiplex-networks.com> References: <5f30c425-60c6-d54a-9593-2584bcf25925@optiplex-networks.com> <09afae63-3583-46bd-8911-82a0f0a3185f@optiplex-networks.com> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.28.5 FreeBSD GNOME Team Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 45zFbF6wwsz3Nb6 X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [0.20 / 15.00]; local_wl_from(0.00)[freebsd.org]; NEURAL_SPAM_SHORT(0.20)[0.202,0]; ASN(0.00)[asn:16509, ipnet:54.148.0.0/15, country:US] X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 Jul 2019 14:06:34 -0000 On Wed, 2019-07-31 at 14:33 +0100, Kaya Saman wrote: > On 7/31/19 1:42 AM, Ian Lepore wrote: > > On Wed, 2019-07-31 at 00:46 +0100, Kaya Saman wrote: > > > Hi guys, > > > > > > > > > just wanted to say that I managed to fix the overlay issue for > > > the uart > > > ports. I just updated my bug report: > > > https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=239390 > > > > > > > > > So, thanks to everyone who provided assistance and especially > > > Milan for > > > the introduction to the 'overlay' system and the dtso file :-) > > > > > > > > > Just need to figure out why PPS isn't working now, my GPS > > > receiver is > > > sending the information so it definitely is a system config issue > > > - > > > either wrong pin or something in the OS... (still looking into > > > it). Also > > > needing a driver in lcdproc for my Newhaven displays and after > > > that the > > > project will be perfect :-) :-) :-) > > > > > > > > > Best Regards, > > > > > > > > > Kaya > > > > > > > > > > Is the GPS receiver delivering the pps signal on one of the uart > > pins > > such as cts? If it's using cts, you probably need this change to > > your > > overlay: > > > > --- sun50i-a64-uart4.dts.orig 2019-07-30 18:35:19.188762000 > > -0600 > > +++ sun50i-a64-uart4.dts 2019-07-30 18:37:02.015479000 -0600 > > @@ -30,7 +30,7 @@ > > target = <&uart4>; > > __overlay__ { > > pinctrl-names = "default"; > > - pinctrl-0 = <&uart4_pins>; > > + pinctrl-0 = <&uart4_pins &uart4_rts_cts_pins>; > > status = "okay"; > > }; > > }; > > > > You may also need to set sysctl dev.uart.4.pps_mode=1 for CTS, in > > /etc/sysctl.conf. > > > > If it's using some other pin such as RI or CD, there is no pre- > > written > > pinctrl entry for it in those overlays you found, and some more > > research into how to add the right pinctrl nodes will be needed. > > > > -- Ian > > > > Bingo!!! :-) :-) > > > Thank you so much Ian..... > > > I am seeing this: > > gpsd:PROG: PPS:/dev/gps1 Assert cycle: 999973, duration: 799977 @ > 1564579823.472659791 > gpsd:PROG: PPS:/dev/gps1 Assert rejected missing last_fixtime > > > Perfect ;-) > > > I think I need to add pps_mode=0x11 or 17 in dec. as the pulse is > inverted. > > > This setup was working previously using a Prolific Serial to USB adapter > for testing purposes as of course the USB introduces high latency. > Actually, not so much as you'd think. I expected both high latency and a lot of jitter when using a usb-serial for PPS, and what I found was a fixed latency of less than a millisecond and jitter on the order of 60- 80 microseconds. Even trying to saturate the usb bus by doing continuous or bursty IO to a disk drive didn't noticibly increase the pps latency or jitter. I was pretty surprised. -- Ian