From owner-freebsd-arm@freebsd.org Wed Jul 25 10:36:02 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 72F181046FDC for ; Wed, 25 Jul 2018 10:36:02 +0000 (UTC) (envelope-from ralph@ralphsmith.org) Received: from ralphsmith.org (ralphsmith.org [98.172.20.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "ralphsmith.org", Issuer "Go Daddy Secure Certificate Authority - G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 1233B78DBC for ; Wed, 25 Jul 2018 10:36:01 +0000 (UTC) (envelope-from ralph@ralphsmith.org) Received: from [192.168.0.179] ([192.168.0.179]) (authenticated bits=0) by ralphsmith.org (8.15.2/8.15.2) with ESMTPSA id w6PAZsSX097452 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Wed, 25 Jul 2018 06:35:54 -0400 (EDT) (envelope-from ralph@ralphsmith.org) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=ralphsmith.org; s=201502; t=1532514954; bh=CzsaTLHs8e+VySSRLCZlHFp5pHRZFGjZwvH6zgjfb3E=; h=Subject:From:In-Reply-To:Date:Cc:References:To; b=LTB9xEhbAWuynLonxu2eYOvoL5LrTuFhASbwrJrVRHzL7P2t2gbCrDAlx6o8EXNa5 eHwI/1cEy0mCKENGkO3G2RFWnBiFLKVrqnt+1ZUGO9zjLQtMcH4kaE9C0fK1FPC0r/ 6TDsG0/jV5nag1nddcyukKcVkeq8Vq3ugPtL0JLw= Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (1.0) Subject: Re: rpi3 and Adafruit GPS hat continued From: Ralph Smith X-Mailer: iPhone Mail (15G77) In-Reply-To: <2f55aaea-6832-7441-1011-b8288628a4a9@nethead.se> Date: Wed, 25 Jul 2018 06:35:53 -0400 Cc: freebsd-arm Content-Transfer-Encoding: quoted-printable Message-Id: References: <2f55aaea-6832-7441-1011-b8288628a4a9@nethead.se> To: Per olof Ljungmark 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: Wed, 25 Jul 2018 10:36:02 -0000 Sent from my iPhone > On Jul 25, 2018, at 5:55 AM, Per olof Ljungmark wrote: >=20 >> On 07/25/18 11:27, Per olof Ljungmark wrote: >>> On 07/25/18 04:25, Warner Losh wrote: >>>=20 >>>=20 >>> On Tue, Jul 24, 2018 at 1:44 PM, Per olof Ljungmark >> > wrote: >>>=20 >>> Thanks to >>> http://freebsd.1045724.x6.nabble.com/Adding-a-GPS-Module-hat-shield-o= n-a-Raspberry-Pi-td6236680.html >>> >>> and helpful people on the list I managed to get the pi to boot by >>> silencing the console messages in u-boot. >>>=20 >>> I skipped the switch and patched rpi.h: >>>=20 >>> @@ -85,10 +87,13 @@ >>> #define CONFIG_INITRD_TAG >>>=20 >>> /* Environment */ >>> +#define CONFIG_SYS_DEVICE_NULLDEV >>> +#define CONFIG_SILENT_CONSOLE_UPDATE_ON_RELOC >>> +#define CONFIG_SILENT_CONSOLE_UPDATE_ON_SET >>> #define ENV_DEVICE_SETTINGS \ >>> - "stdin=3Dserial,usbkbd\0" \ >>> - "stdout=3Dserial,vidconsole\0" \ >>> - "stderr=3Dserial,vidconsole\0" >>> + "stdin=3Dusbkbd\0" \ >>> + "stdout=3Dvidconsole\0" \ >>> + "stderr=3Dvidconsole\0" >>>=20 >>> and now the pi is booting. >>>=20 >>> Now to the next problem, I need to rewire TXD and RXD and add recepti= on >>> of the PPS signal on pin 4. The advice in the link above is not >>> appclicable to current and rpi3. >>>=20 >>> Right now uart1 is wired to the RXD and TXD pins, I want uart0. Is it= >>> recompile a dts or use gpioctl? >>>=20 >>> uart0: mem 0x7e201000-0x7e201fff irq 24 on >>> simplebus0 >>> uart1: mem 0x7e215040-0x7e21507f irq 32 on >>> simplebus0 >>> uart1: console (115200,n,8,1) >>>=20 >>>=20 >>> I'm pretty sure that you'll need to hack dts. >>=20 >> Yes. Most importantly, stop the kernel from talking to the serial console= . >>=20 >> I've been wandering around the source and right now the theory is to >> change /usr/src/sys/gnu/dts/arm/bcm283x.dtsi, it is the only place in >> all the included dts files where I find a reference to the console: >>=20 >> chosen { >> stdout-path =3D "serial0:115200n8"; >> }; >>=20 >> Says nothing about stdin though, not anywhere. >=20 > Tried stdout-path =3D ""; but that did not help. >=20 > I'm giving up and move to rpi2 and 11.2 instead. Phew. Just another gotcha to worry about: be aware of the difference between the r= pi2 board versions 1.1 and 1.2. They quietly changed the SOC, so FreeBSD 11.= 1 would not boot on the rev 1.2 board. It will boot FreeBSD 11.2, but I=E2=80= =99ve not tried the GPS HAT on that yet.=20 Ralph=