From nobody Thu May 18 10:57:22 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 4QMRl55XNpz4BQVh for ; Thu, 18 May 2023 10:57:37 +0000 (UTC) (envelope-from marklmi@yahoo.com) Received: from sonic301-21.consmr.mail.gq1.yahoo.com (sonic301-21.consmr.mail.gq1.yahoo.com [98.137.64.147]) (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 4QMRl52NpZz3rqs for ; Thu, 18 May 2023 10:57:37 +0000 (UTC) (envelope-from marklmi@yahoo.com) Authentication-Results: mx1.freebsd.org; none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1684407455; bh=3gYPCrnkSiR4tKjyeqeOQkdmwgVcF8BEzweeotuNnX0=; h=Subject:From:In-Reply-To:Date:Cc:References:To:From:Subject:Reply-To; b=pOorb+YE8XHMP+u237x8A9Hb3ssFc2827Tp4AGZ2ASVLgfxVT+YiRxCbv1L5oJ+KcCobEuR46fEOhUgVdh7TkGN1F+Ob447NcGpT4GJWiEV51u1RXP35JVm4tH8O0hRVEAfCiI3PzbscuVNUvMb9lGyJ7zmtHhJ1RIUImNYZdcdFqVouRgfxPbE+ReDFuakTdtFI/7jEvHZSjfIAvEvZKeUeIyxBtADo1f2XkFOa40VJ8ksqg0pUc8sERqXPGp9DXWi4we/G1il/1NGRtAgw0MdJEgrwazVIgTGRzSRcnfZ3laeOfNCwBdXwiGfuQjfg6XBDq1nRmC73PotMCy+WXw== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1684407455; bh=ISmPxmFaIKg6Z6FJtdyuXWV4HqYl0R16O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.jr62YKeJms6J35seAUzPHLv7bY5oHBVYL1bClMj7FPFVbdSPwrOxJe NxHl.mFZKn_8ZWFyVvua1Bl76slgGRJsdJNP2WYMzo3E81BYZlNtxElCgHbQUU4VTy6Vr2NcEm4C P_uv804NKrJAFyZLnGLWOf1xwh2rXgimJFl1ZIDhHja6Fr4E56IfThPzlr52.zz1GuZ_mER7cUHg 5JF6qwFu17uP1wkLt7g_54cXLnmhbdp.CsfHXlqlIptjpy2vKt7ahuC_OYmOnaRgXkq_3Tc10EBY 0FL9iUL1tc6S96hI1z8vmp7Iz5ewUaEYGSDOWzz_qaSOTXfLZjLf0odZlKcJrYiMUjka1d4rGlIu a9GFTl.YbcDlM4.31cM3mCl94pUbdTngI_Q4IfEU6i4TWTxdpvzEyyas3lXjDGPeJ_vBJukpBk9x Kaj4rgAfzFwURK32cMJ9r9UrEjZFQRSrTylTW6H9Wejd9CM8_DrHx.4mCRV1jVDo2Fr_Z0E_3dXD rivcYJPxda0OqedfsOfT_gKEWnetvbG.7Vfyb9GagQpR0_2m0g6xgp9jFkzZeXXZu5Csn6ADQQVE k X-Sonic-MF: X-Sonic-ID: f291fa85-c0d3-4bf8-9887-595f547fd293 Received: from sonic.gate.mail.ne1.yahoo.com by sonic301.consmr.mail.gq1.yahoo.com with HTTP; Thu, 18 May 2023 10:57:35 +0000 Received: by hermes--production-ne1-574d4b7954-j2pvq (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID 154606a66ecdecdbbc97aa4854fd7698; Thu, 18 May 2023 10:57:34 +0000 (UTC) Content-Type: text/plain; charset=utf-8 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.400.51.1.1\)) Subject: Re: Raspberry Pi POE+ hat overlay From: Mark Millard In-Reply-To: Date: Thu, 18 May 2023 03:57:22 -0700 Cc: Doug Rabson , freebsd-arm@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: References: <77CD0716-3BC8-47EB-8743-F2BD9CA43D31@yahoo.com> <432A1A16-9FE5-4339-AB38-8F3E03A5D4EF@yahoo.com> To: Nuno Teixeira X-Mailer: Apple Mail (2.3731.400.51.1.1) X-Rspamd-Queue-Id: 4QMRl52NpZz3rqs X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:36647, ipnet:98.137.64.0/20, country:US] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-ThisMailContainsUnwantedMimeParts: N On May 18, 2023, at 01:29, Nuno Teixeira wrote: > Confirmed that arm_boost is enable by default on rpi4 rev >=3D 1.4 as = I checked with htop. >=20 > Also, tested arm_freq=3D1800 and it crashes FreeBSD around = initializing console/video and detecting mouse. Overclocking by setting the arm_freq directly involves also managing over_voltage explicitly, such as: over_voltage=3D6 A sequence I use (and have used for a long time) is: [pi4] over_voltage=3D6 arm_freq=3D2000 sdram_freq_min=3D3200 force_turbo=3D1 But each RPi4B has heatsinks, a case with a fan, and a power supply rated for 5.1V 3.5A (so: has some extra margin). But the range of RPi4B's span Rev 1.1, Rev 1.4, and Rev 1.5, a mix of 4 GiByte RAM and 8 GiByte RAM models. All use those settings. As I understand, arm_boost implicitly does the extra things required for its implicit frequency, unlike assigning arm_freq or the like. If force_turbo is not used, it can be that: # # Local addition that avoids USB3 SSD boot failures that look like: # uhub_reattach_port: port ? reset failed, error=3DUSB_ERR_TIMEOUT # uhub_reattach_port: device problem (USB_ERR_TIMEOUT), disabling port = ? initial_turbo=3D60 is required for USB based booting. But this also gets into if the notation is supported or not for the firmware vintage used. The initial_turbo use happens to avoid frequency variability during boot and it appears that FreeBSD does not necessarily tolerate such variability in that time frame. Also: I happen to have USB3 boot media for which use of usb_pgood_delay=3D2000 is sufficient but without some such in/for U-Boot, U-Boot has problems recognizing the device (before FreeBSD is even involved). I build the U-Boot port with the assignment built in. > As linux config.txt says: > --- > [pi4] > # Run as fast as firmware / board allows > arm_boost=3D1 > --- > firmware must be updated to support this feature for sure. I'm not aware of a dated list of when the various config.txt notations were first supported (firmware version). This makes it messier to use the web's published information, if one is using the firmware vintage that FreeBSD has in its port for the firmware. The notation that I use has been around for a long time. > Cheers, >=20 > Nuno Teixeira escreveu no dia quarta, 17/05/2023 = =C3=A0(s) 14:08: > (...) >=20 > I was meant using 13.2 not 12.3 :) >=20 > Doug Rabson escreveu no dia quarta, 17/05/2023 =C3=A0(s= ) 13:47: > I'm not sure about 12.3 either - you could try with 13.2 and see if = that makes a difference. >=20 > On Wed, 17 May 2023 at 13:45, Nuno Teixeira = wrote: > Hey, >=20 > Ok. I'm new to rpi4 and arm in general but tomorrow I will force = 'arm_freq=3D1800' again just to see it it crashes again. > I will check too what values linux shows. >=20 > I don't know if firmware/uboot version included in 12.3 supports this = feature. >=20 > Cheers, >=20 > Doug Rabson escreveu no dia quarta, 17/05/2023 =C3=A0(s= ) 13:11: > Hi Nuno, >=20 > I'm not sure where to start - I just happened to notice in the = documentation here: = https://www.raspberrypi.com/documentation/computers/config_txt.html that = the cpu frequency Pi4B R1.4 was listed as 1800 if arm_boot=3D1 so I = tried it. >=20 > Doug. >=20 >=20 >=20 > On Wed, 17 May 2023 at 11:11, Nuno Teixeira = wrote: > Hello Doug, >=20 > I have too a 1.5 rpi but arm_boost=3D1 isn't doing anything, htop = shows 1500Mhz when doing something intensive. > I'm running 13.2 stable >=20 > Do I missing something? >=20 > Could you take a look at my setup? >=20 > Thanks, >=20 > Doug Rabson escreveu no dia ter=C3=A7a, 16/05/2023 = =C3=A0(s) 17:19: >=20 > On Sat, 13 May 2023 at 13:45, Doug Rabson wrote: > I was able to build an updated rpi-firmware port based on 1.20210805 = and this boots successfully on pi400 as well as rpi4. With this, I can = load the rpi-poe-plus overlay and I just need to try and reverse = engineer the undocumented mailbox API by reading the Linux code. >=20 > I have a first approximation of a fan driver which works with the = 1.20210805 firmware (actually, I substituted rpi-poe-plus.dtbo from = 1.20210831 which just changes the fan levels for the POE+). I'm testing = with an rpi4B rev 1.5 with 'make -j4 buildworld' and the fan is keeping = the cpu temperature below 65 degrees which is nice, especially since I = set arm_boost=3D1 in config.txt which boosts the cpu frequency up to = 1800 for this board. >=20 > Does anyone have a pointer to the problem with firmware later than = 20210805? Would it make any kind of sense to try to get the fix into = releng/13.2 as an errata? >=20 =3D=3D=3D Mark Millard marklmi at yahoo.com