From nobody Sun Jan 22 03:27:38 2023 X-Original-To: freebsd-arm@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4NzzFg08Qwz2ssQd for ; Sun, 22 Jan 2023 03:27:51 +0000 (UTC) (envelope-from jjrushford@gmail.com) Received: from mail-io1-xd36.google.com (mail-io1-xd36.google.com [IPv6:2607:f8b0:4864:20::d36]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4NzzFf53K8z3y2b for ; Sun, 22 Jan 2023 03:27:50 +0000 (UTC) (envelope-from jjrushford@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-io1-xd36.google.com with SMTP id y69so4259782iof.3 for ; Sat, 21 Jan 2023 19:27:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=references:to:cc:in-reply-to:date:subject:mime-version:message-id :from:from:to:cc:subject:date:message-id:reply-to; bh=NL1tK14ek2Y/rQ9guFFKR0reGVJPOtlGesjwRR6ZtXc=; b=XlD3mCWWigkvvTBtKDtOBqW1igMQ+ZYo1fCuGPNj7oNU8hypErtKr1eoVILxxQ5Ql0 feSr8KKlo4dMqRHsjS6SA91juIEK8FzJ9/BQ+yVn4Ayqk/0fNv12RumuQK476EIWqcZ+ V5F5zZv8AFQesl3jVkbablXBxuJj/5f3f5+08YC7Z4yFQ9gS6860sN3dLUPAhAvxbvDT qOtwR/9DVvh1uTndt/3yJSb1gKZqRBhVLN21uQC1+8LqaRyM6aFfjqzAKAxtJyUanr9Z uvCzDckYqYr5XLVScH4SgPRdtlAlrpmnykTeDnmDQZIifWjys58CQ4oE31Xoxg+TUl5+ l1LA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=references:to:cc:in-reply-to:date:subject:mime-version:message-id :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=NL1tK14ek2Y/rQ9guFFKR0reGVJPOtlGesjwRR6ZtXc=; b=jyrctJLJ9kMrqd25dQc7oGsRV9ZeHPCt7k+mw+BxA+uh9m/c2amPS2N3y549Rnvw4B 4dUfIfixvlVKSSPkKSmyarFct9dditsgfzqlFCMY72rDwsdByLN9W0NSzt8PyuWxPNDC kr7noAdZoTHeANqTG4GOIYTIcLqKnhvjBG8UnOa4KbDjZ3nR59q8k4vhtkUq+JizuVDe mZTe3gQlSthK1nSS6yy2wc4QuKd78OdR+OreDGEJYf6ISCmjIHg4hm+2+TkPptHRDEbo TH4B2TerNP2VOJm/NgANd9GyDeKXbVZvrUi1FCpi1KEvtyGayDawZ1gxFVZCAWoTW/px 6/pA== X-Gm-Message-State: AFqh2krWVFEvZz8iCPa2nffACmWes7130SEkSDOCOBys07mVxMQAG8kB TC/N0PPzYWteuqAQyh/xInPsh3w/OXmWfA== X-Google-Smtp-Source: AMrXdXsjw5nMiLoc/gSW5ZQFojXBJxX9nLQqU/HdPxqLfZGoyO3FCwv3/HU6kwVCfDJ7/qkvZJBzGQ== X-Received: by 2002:a6b:e61a:0:b0:704:d0d8:632b with SMTP id g26-20020a6be61a000000b00704d0d8632bmr12984871ioh.16.1674358069680; Sat, 21 Jan 2023 19:27:49 -0800 (PST) Received: from smtpclient.apple ([2601:280:587f:1450:d1a3:f492:d408:e2b3]) by smtp.gmail.com with ESMTPSA id w11-20020a056602034b00b006f8ee49c22dsm14941879iou.10.2023.01.21.19.27.48 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sat, 21 Jan 2023 19:27:49 -0800 (PST) From: John Rushford Message-Id: Content-Type: multipart/alternative; boundary="Apple-Mail=_C7B40EBF-C50B-4CB3-913E-23EAF42AF00F" List-Id: Porting FreeBSD to ARM processors List-Archive: https://lists.freebsd.org/archives/freebsd-arm List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-arm@freebsd.org Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3731.300.101.1.3\)) Subject: Re: Pi 4 uarts Date: Sat, 21 Jan 2023 20:27:38 -0700 In-Reply-To: <07307CEC-9C0B-42AC-8D17-2C81427081A0@yahoo.com> Cc: "freebsd-arm@freebsd.org" To: Mark Millard References: <6496EB45-1CC8-4BF3-8A5E-A90039485D2F@gmail.com> <07307CEC-9C0B-42AC-8D17-2C81427081A0@yahoo.com> X-Mailer: Apple Mail (2.3731.300.101.1.3) X-Rspamd-Queue-Id: 4NzzFf53K8z3y2b X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-ThisMailContainsUnwantedMimeParts: N --Apple-Mail=_C7B40EBF-C50B-4CB3-913E-23EAF42AF00F Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 Mark, Thanks for the reply. I only have =E2=80=9Cdtoverlay=3Duart3=E2=80=9D = in the config.txt and with that entry, FreeBSD creates /dev/ttyu1 and = /dev/cuau1 along with the .init and .lock files. So, I tried with this entry in /etc/ttys and it was of no help, still no = data: ttyu1 "none" vt100 on secure thanks John jjrushford@gmail.com > On Jan 21, 2023, at 8:18 PM, Mark Millard wrote: >=20 > On Jan 21, 2023, at 18:34, John Rushford wrote: >=20 >> I have installed FreeBSD 13.1 on a raspberry PI 4b rev 1.4 and I am = trying to use the additional serial ports that are available with the PI = 4 with an Adafruit ultimate GPS card. >> I found that it was problematic using the first serial port ttyu0 on = GPIO pins 14 and 15 as data on the line from the GPS would interrupt the = boot process and I verified that I was in fact able see data time stamps = from the GPS card on the first uart port once I got FreeBSD to boot. >>=20 >> Now since I do not wish to use the first serial port, I=E2=80=99ve = built the rpi-firmware port and copied all the uart dtb=E2=80=99s to = /boot/msdos/overlays and I=E2=80=99ve tried enabling the uart=E2=80=99s = in /boot/msdos/config.txt with =E2=80=9Cdtoverlay=3Duart3=E2=80=9D for = example. =20 >> Enabling them does in fact result in device entries created for them = in /dev but, I am unable to see any data on the corresponding ttyuX or = cuauX ports. >>=20 >> Just to eliminate a wiring error, I installed another SD card with = Raspberry PI OS, enabled uart3 and I am able to see data on uart3 = without any issue confirming I have everything wired up properly. >>=20 >> With FreeBSD, I have set the proper baud rate on the ports and I=E2=80=99= ve tried disabling flow control on them, using stty, but no matter what = I do, I never see any data on them. Unless I=E2=80=99m missing = something, I can only conclude there is some bug in FreeBSD preventing = me from using these additional serial ports. Has anyone here on this = mailing list been able to use them? If so, what does it take? >=20 > You did not mention /etc/ttys editing. So I wonder if you > changed any of the lines like, say, >=20 > # Serial terminals > # The 'dialup' keyword identifies dialin lines to login, fingerd etc. > ttyu0 "/usr/libexec/getty 3wire" vt100 onifconsole secure > ttyu1 "/usr/libexec/getty 3wire" vt100 onifconsole secure > ttyu2 "/usr/libexec/getty 3wire" vt100 onifconsole secure > ttyu3 "/usr/libexec/getty 3wire" vt100 onifconsole secure >=20 > to use, say, none instead of "/usr/libexec/getty 3wire", and other > related edits. >=20 > But I've not tried to get any extra serial ports going on > an RPi4B. So the above is just guess work about something > to experiment with. >=20 > =3D=3D=3D > Mark Millard > marklmi at yahoo.com >=20 --Apple-Mail=_C7B40EBF-C50B-4CB3-913E-23EAF42AF00F Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=utf-8 Mark,

Thanks for the reply. =  I only have =E2=80=9Cdtoverlay=3Duart3=E2=80=9D in the config.txt = and with that entry, FreeBSD creates /dev/ttyu1 and /dev/cuau1 along = with the .init and .lock files.
So, I tried with this entry in = /etc/ttys and it was of no help, still no = data:

ttyu1 "none" vt100 on = secure

thanks
John
On Jan 21, 2023, at 8:18 PM, Mark = Millard <marklmi@yahoo.com> wrote:

On Jan 21, 2023, at 18:34, = John Rushford <jjrushford@gmail.com> wrote:

I have installed FreeBSD 13.1 on a raspberry PI 4b rev 1.4 = and I am trying to use the additional serial ports that are available = with the PI 4 with an Adafruit ultimate GPS card.
I found that it was = problematic using the first serial port ttyu0 on GPIO pins 14 and 15 as = data on the line from the GPS would interrupt the boot process and I = verified that I was in fact able see data time stamps from the GPS card = on the first uart port once I got FreeBSD to boot.

Now since I do = not wish to use the first serial port, I=E2=80=99ve built the = rpi-firmware port and copied all the uart dtb=E2=80=99s to = /boot/msdos/overlays and I=E2=80=99ve tried enabling the uart=E2=80=99s = in /boot/msdos/config.txt with =E2=80=9Cdtoverlay=3Duart3=E2=80=9D for = example.  
Enabling them does in fact  result in device = entries created for them in /dev but, I am unable to see any data on the = corresponding ttyuX or cuauX ports.

Just to eliminate a wiring = error, I installed another SD card with Raspberry PI OS, enabled uart3 = and I am able to see data on uart3 without any issue confirming I have = everything wired up properly.

With FreeBSD, I have set the proper = baud rate on the ports and I=E2=80=99ve tried disabling flow control on = them, using stty, but no matter what I do, I never see any data on them. =  Unless I=E2=80=99m missing something, I can only conclude there is = some bug in FreeBSD preventing me from using these additional serial = ports.  Has anyone here on this mailing list been able to use them? =  If so, what does it take?

You did not mention = /etc/ttys editing. So I wonder if you
changed any of the lines like, = say,

# Serial terminals
# The 'dialup' keyword identifies = dialin lines to login, fingerd etc.
ttyu0 =   "/usr/libexec/getty 3wire" =      vt100   onifconsole = secure
ttyu1   "/usr/libexec/getty 3wire" =      vt100   onifconsole = secure
ttyu2   "/usr/libexec/getty 3wire" =      vt100   onifconsole = secure
ttyu3   "/usr/libexec/getty 3wire" =      vt100   onifconsole = secure

to use, say, none instead of "/usr/libexec/getty 3wire", = and other
related edits.

But I've not tried to get any extra = serial ports going on
an RPi4B. So the above is just guess work about = something
to experiment with.

=3D=3D=3D
Mark = Millard
marklmi at = yahoo.com


= --Apple-Mail=_C7B40EBF-C50B-4CB3-913E-23EAF42AF00F--