From nobody Tue Jan 24 13:09:00 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 4P1S3Q1f9Mz3bQwF for ; Tue, 24 Jan 2023 13:09:06 +0000 (UTC) (envelope-from fred@thegalacticzoo.com) Received: from nmtao201.oxsus-vadesecure.net (mta-231b.oxsus-vadesecure.net [15.204.3.5]) (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 did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4P1S3N6MNMz4CLv for ; Tue, 24 Jan 2023 13:09:04 +0000 (UTC) (envelope-from fred@thegalacticzoo.com) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=webcom.xion.oxcs.net header.s=mail1 header.b=BlYIgVRc; spf=pass (mx1.freebsd.org: domain of fred@thegalacticzoo.com designates 15.204.3.5 as permitted sender) smtp.mailfrom=fred@thegalacticzoo.com; dmarc=pass (policy=quarantine) header.from=thegalacticzoo.com DKIM-Signature: v=1; a=rsa-sha256; bh=t4AgEktF50W8XwIJchVUOYmv/cGyAH4HA3pgwG LWKok=; c=relaxed/relaxed; d=webcom.xion.oxcs.net; h=from:reply-to: subject:date:to:cc:resent-date:resent-from:resent-to:resent-cc: in-reply-to:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:list-owner:list-archive; q=dns/txt; s=mail1; t=1674565742; x=1675170542; b=BlYIgVRc9y4dL/Rbn97sjyimOBIJ9+MahsZTQX0ng eVhjqufosmnEhI5DPO3GM5lcGM2dwGHcOVTKxK+98Wjtfw2ZiYtsl+ePyFdrYN7ztmtFhn6 0E6dp/DHXONy1c3ugjzKpUCsa8SQjXrhJahXtZiklnshdciElr8lKWN+KGoNgBPHDDoRqXU Zo2ZKudoSriiUatuGg/Ncycl80hVlZKqtY5NX3u4IxX27BY66Z6kmgkWW5DqioRHTo8j2sT Gel6aG812dUVUcnXap1irl/ctuEyCOVtHY3s4XEaa17QJiDfbv439QaZOPLTBTrnVeJczUY Z1CwSCCQDiYW4nqlw== Received: from proxy-6.proxy.cloudus.ewr.xion.oxcs.net ([76.14.221.149]) by oxsus2nmtao01p.internal.vadesecure.com with ngmta id 4a85bb05-173d40ab8361123e; Tue, 24 Jan 2023 13:09:02 +0000 Message-ID: <2bd8e680-df6a-cfe1-fbd2-ade1ac2d0497@thegalacticzoo.com> Date: Tue, 24 Jan 2023 05:09:00 -0800 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 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:102.0) Gecko/20100101 Thunderbird/102.6.1 Content-Language: en-US To: freebsd-arm@freebsd.org From: Fred Finster Subject: Enabling Raspberry Pi 4B Uarts, specifically uart3 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spamd-Result: default: False [-4.00 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_SHORT(-1.00)[-0.999]; DMARC_POLICY_ALLOW(-0.50)[thegalacticzoo.com,quarantine]; R_DKIM_ALLOW(-0.20)[webcom.xion.oxcs.net:s=mail1]; R_SPF_ALLOW(-0.20)[+ip4:15.204.3.5]; MIME_GOOD(-0.10)[text/plain]; MIME_TRACE(0.00)[0:+]; MLMMJ_DEST(0.00)[freebsd-arm@freebsd.org]; RCVD_TLS_LAST(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; ASN(0.00)[asn:16276, ipnet:15.204.0.0/17, country:FR]; ARC_NA(0.00)[]; DKIM_TRACE(0.00)[webcom.xion.oxcs.net:+]; RCVD_COUNT_TWO(0.00)[2]; FROM_HAS_DN(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[15.204.3.5:from]; TO_MATCH_ENVRCPT_ALL(0.00)[]; RCPT_COUNT_ONE(0.00)[1]; TO_DN_NONE(0.00)[]; MID_RHS_MATCH_FROM(0.00)[] X-Rspamd-Queue-Id: 4P1S3N6MNMz4CLv X-Spamd-Bar: --- X-ThisMailContainsUnwantedMimeParts: N */ /* */From:/* */Date:/*Sun, 22 Jan 2023 21:36:36 UTC https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=269104 Bug ID: 269104 Summary: The uarts2 - uarts5 do not function on raspberry pi 4B Product: Base System Version: 13.1-RELEASE Hardware: arm64 OS: Any Status: New Severity: Affects Only Me Priority: --- Component: arm Assignee: freebsd-arm@FreeBSD.org Reporter: jjrushford@gmail.com I’ve tried using the additional serial ports that are available with a raspberry pi 4B by enabling them in config.txt and when I try to read data on them, I see nothing. Specifically, I’ve wired an Adafruit ultimate GPS to uart3, gpio pins 4 and 5. I’ve built the RPI-firmware port and copied the uart0-5 dtb’s to /boot/msdos/overlays. I then enable uart3 in /boot/msdos/config.txt with dtoverlay=uart3 and reboot. After boot, I see that FreeBSD has created /dev/ttyu1 and /dev/cuau1 in the dev tree for uart3. When I try reading from ttyu1 or cuau1, I do not see any data whatsoever. I’ve set the baud rate to 9600 and disabled flow control but still no data is seen. If I change the wiring to use ttyu0, gpio pins 14 and 15, I do see data there. Just to verify the hardware, I installed a different SD card with raspberry pi OS, Debian, and enabled uart3 in config.txt. When I read the /dev/ttyAMA1 I do see the NMEA time stamps coming in uart3 at 9600 baud with no issue. Next I reboot back to FreeBSD 13.1, I cannot see any data from The GPS card on ttyu1 or cuau1. -- You are receiving this mail because: You are the assignee for the bug. In the aarch64 arm64 Raspberry Pi FreeBSD, maybe you need to enable some kernel modules kldstat kldload ucom umodem usb_template sysctl hw.usb.template=3 add in file /boot/loader.conf ucom_load="YES" umodem_load="YES" usb_template_load="YES" hw.usb.template=3 *cu -s 9600 -l /dev/ttyU1 What do you see? or rather cu? :>)  Do report back success or failure or changes necessary to make work, please. *https://forums.raspberrypi.com/viewtopic.php?t=244827&sid=f4a784a3c40ed0940e6fbb9f81af5015&start=25#p1590882 Re: Pi-4 Activating additional UART ports Mon Jan 06, 2020 10:36 am On all Pis, UART0 is a PL011 that appear to Linux as ttyAMA, and UART1 is an 8250 clone that appears as ttyS0. On a Pi4, UART2-5 are additional PL011s that also appear as ttyAMA. The number starts at 0 for the first enabled PL011 and counts up through all the enabled interfaces. The numbering is stable for any given combination of UARTs, but enabling or disabling one can change the number assignments of others. /PL011 appear to FreeBSD/*as /dev/ttyUx   So I wonder if one has to enable ucom and umodem and usb_template to view serial data comming back over what looks like a USB to serial interface?  Your thoughts? https://ghostbsd-arm64.blogspot.com/2023/01/hookup-gdb-to-black-magic-probe-v23.html * My setup trying to connect to USB serial port under X86_64 FreeBSD 13 to a Black Magic Probe -- Fred Finster fred@thegalacticzoo.com +1 971-718-9144 https://GhostBSD-ARM64.blogspot.com https://ghostbsd.org