From nobody Thu Jan 26 17:49:24 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 4P2pB038SKz3bDkj for ; Thu, 26 Jan 2023 17:49:28 +0000 (UTC) (envelope-from fred@thegalacticzoo.com) Received: from nmtao102.oxsus-vadesecure.net (mta-132a.oxsus-vadesecure.net [135.148.117.230]) (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 4P2p9z0h83z3vvw for ; Thu, 26 Jan 2023 17:49:26 +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=NRih7D6p; spf=pass (mx1.freebsd.org: domain of fred@thegalacticzoo.com designates 135.148.117.230 as permitted sender) smtp.mailfrom=fred@thegalacticzoo.com; dmarc=pass (policy=quarantine) header.from=thegalacticzoo.com DKIM-Signature: v=1; a=rsa-sha256; bh=vgnCerIwdYabdux1/Vu3uyF1MDqfJlhApL8X3E uvhEY=; 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=1674755366; x=1675360166; b=NRih7D6pvrwtmKxYmIPv4kZKXn/fQlPGruwNehl11 P/FIJ234iOw09xL1K1BfirSZ134JvW2hHafHrp6GdGYxlrzukJSTflJXQP/fGUa65oIBeL2 2W/UInpLGudNAUbObd7t/6CQu1QMGa/Ql1HNOeXEpeVMGua+VC01I7HegMEg7sjcdWr576b 1wb8TBzCYnmiwWtamBCFl0oiFJN7FCHNYsUg7szC7cPRwulL7Bv0S3oATwR7/tUwr7X5lvg ta6BjUAzaNcprK6wonhR89fuWL0FeVxs8XacMXl7GCDc7awU8YKefegYPfa3hi+V0vWRG/I nGNbploW7j3dXSh+A== Received: from proxy-4.proxy.cloudus.ewr.xion.oxcs.net ([76.14.221.149]) by oxsus1nmtao02p.internal.vadesecure.com with ngmta id 91d9d2d8-173ded21b3ca740e; Thu, 26 Jan 2023 17:49:26 +0000 Message-ID: Date: Thu, 26 Jan 2023 09:49:24 -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: John Rushford , freebsd-arm@freebsd.org From: Fred Finster Subject: sys/uart fdt Here is pointers to the code we should be using Hope this helps, John. FreeBSD, UART and Raspberry Pi 3 B+ 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:135.148.117.230]; MIME_GOOD(-0.10)[text/plain]; FREEMAIL_TO(0.00)[gmail.com,freebsd.org]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; ARC_NA(0.00)[]; ASN(0.00)[asn:16276, ipnet:135.148.0.0/17, country:FR]; RCVD_TLS_LAST(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; MLMMJ_DEST(0.00)[freebsd-arm@freebsd.org]; RCVD_IN_DNSWL_NONE(0.00)[135.148.117.230:from]; RCPT_COUNT_TWO(0.00)[2]; FROM_HAS_DN(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; TO_DN_SOME(0.00)[]; DKIM_TRACE(0.00)[webcom.xion.oxcs.net:+]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RWL_MAILSPIKE_POSSIBLE(0.00)[135.148.117.230:from] X-Rspamd-Queue-Id: 4P2p9z0h83z3vvw X-Spamd-Bar: --- X-ThisMailContainsUnwantedMimeParts: N https://blackdot.be/2018/08/freebsd-uart-and-raspberry-pi-3-b/ FreeBSD, UART and Raspberry Pi 3 B+ He also wanted to hook up a GPS input to a serial port 0. Fred If you are reading this because you, like me were lost and frustrated… I feel your pain. But let me try and help! A few weeks ago I added a POE HAT to a Raspberry Pi 3B+ and installed FreeBSD to so I could build a remote access server. I also bough another Raspberry Pi 3B+ to replace by OrangePi Zero + USB uBlox 5 NTP server. Unlike Raspbian it is surprisingly hard to stop FreeBSD’s kernel from grabbing uart0 for it’s console. Lets start with why you are probably here… how do I stop the kernel from doing this? |echo 'hw.fdt.console="NO"' >> /boot/loader.conf.local | Easy right? It took me more than 24 hours to find this. Most of which was one long Saturday. I could not find much (any) documentation on this parameter. So how did I find it? One of the embedded device devs from FreeBSD recommended to remove /chosen/stdout-path from the fdt tree. This did not work. After a few hours of messing around with building kernels without baked in uart support and other dead-ends I went back to looking at the fdt stuff. |/usr/src/sys/gnu/dts/arm/bcm2837-rpi-3-b-plus.dts /usr/src/sys/gnu/dts/arm/bcm2835-rpi.dtsi /usr/src/sys/gnu/dts/arm/bcm2837.dts | These dtsi and dts files are what eventually end up in the fdt…*bcm2837-rpi-3-b-plus.dts*holds the /chosen/stdout-path for the rPI 3B+. -- Fred Finster fred@thegalacticzoo.com +1 971-718-9144 https://GhostBSD-ARM64.blogspot.com https://ghostbsd.org