From owner-freebsd-arm@freebsd.org Sat Feb 27 22:28:54 2021 Return-Path: Delivered-To: freebsd-arm@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 776D8556234 for ; Sat, 27 Feb 2021 22:28:54 +0000 (UTC) (envelope-from mike@karels.net) Received: from mail.karels.net (mail.karels.net [216.160.39.52]) by mx1.freebsd.org (Postfix) with ESMTP id 4Dp1QY2Xlgz4T0c; Sat, 27 Feb 2021 22:28:53 +0000 (UTC) (envelope-from mike@karels.net) Received: from mail.karels.net (localhost [127.0.0.1]) by mail.karels.net (8.15.2/8.15.2) with ESMTP id 11RMSqgo012921; Sat, 27 Feb 2021 16:28:52 -0600 (CST) (envelope-from mike@karels.net) Message-Id: <202102272228.11RMSqgo012921@mail.karels.net> To: Mark Millard cc: freebsd-arm@freebsd.org, manu@freebsd.org From: Mike Karels Reply-to: mike@karels.net Subject: Re: cpufreq driver stopped working on RPI4 In-reply-to: Your message of Sat, 27 Feb 2021 13:52:57 -0800. <7D6CCA5B-F24D-48CF-893C-18AD73417E4E@yahoo.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <12919.1614464932.1@mail.karels.net> Content-Transfer-Encoding: quoted-printable Date: Sat, 27 Feb 2021 16:28:52 -0600 X-Rspamd-Queue-Id: 4Dp1QY2Xlgz4T0c X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of mike@karels.net designates 216.160.39.52 as permitted sender) smtp.mailfrom=mike@karels.net X-Spamd-Result: default: False [-3.15 / 15.00]; HAS_REPLYTO(0.00)[mike@karels.net]; ARC_NA(0.00)[]; FREEFALL_USER(0.00)[mike]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+ip4:216.160.39.52]; MIME_GOOD(-0.10)[text/plain]; REPLYTO_ADDR_EQ_FROM(0.00)[]; DMARC_NA(0.00)[karels.net]; SPAMHAUS_ZRD(0.00)[216.160.39.52:from:127.0.2.255]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RBL_DBL_DONT_QUERY_IPS(0.00)[216.160.39.52:from]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_SHORT(-0.95)[-0.949]; NEURAL_HAM_MEDIUM(-1.00)[-0.996]; FREEMAIL_TO(0.00)[yahoo.com]; RCVD_NO_TLS_LAST(0.10)[]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:209, ipnet:216.160.36.0/22, country:US]; RCVD_COUNT_TWO(0.00)[2]; MAILMAN_DEST(0.00)[freebsd-arm] X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Porting FreeBSD to ARM processors List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 Feb 2021 22:28:54 -0000 Thanks, Mark. Meanwhile, I just tested BETA4; much to my surprise, the cpufreq driver configured again. I didn't notice a relevant change, but it is working... Mike Mark wrote: > > On 2021-Feb-27, at 09:42, Mike Karels wrote: > > = > > Following up on my previous post (below): I tried the ALPHA1 kernel on > > a BETA3 system on the RPI4, and it fails to attach the cpufreq driver > > as well. So it appears that the problem is in the dtb, etc, not the > > kernel. > > = > > It would be nice to get this fixed before the 13.0 release. Without > > the cpufreq driver, the CPU is stuck at a low clock rate. > In config.txt for an RPi4B I use (as an example, you > could use other figures): > over_voltage=3D6 > arm_freq=3D2000 > arm_freq_min=3D2000 > sdram_freq_min=3D3200 > and in /etc/sysctl.conf I have: > # The u-boot'ed RPi4B does not seem to automatically > # adjust from 600MHz, so do so manually. Presumes > # config.txt does over_voltage=3D6 and arm_freq=3D2000 . > # NOTE: without an appropriate over_voltage a > # dev.cpu.0.freq=3D2000 will crash the RPi4B on the > # spot. > dev.cpu.0.freq=3D2000 > Overall this gives a constant faster frequency > for the CPU (and the sdram). (I have a good power > supply context for this.) > You may or may not be able to tolerate the constant > status for frequencies. But there is this alternative > to cpufreq use. > > Mike > > = > >> To: freebsd-arm@freebsd.org > >> From: Mike Karels > >> Reply-to: mike@karels.net > >> Subject: cpufreq driver stopped working on RPI4 > >> Date: Sun, 21 Feb 2021 14:43:27 -0600 > > = > >> I upgraded an older (original) RPI4, 4 GB, to 13.0-BETA3, and merged = my > >> previous rc.conf including powerd. Powerd fails to start now, saying > >> that there is no cpufreq(4) support. Sure enough, dmesg has the foll= owing > >> relevant lines: > > = > >> bcm2835_cpufreq0: on cpu0 > >> bcm2835_cpufreq0: Unable to find firmware device > >> device_attach: bcm2835_cpufreq0 attach returned 6 > >> armv8crypto0: CPU lacks AES instructionsbcm2835_cpufreq0: on cpu0 > >> bcm2835_cpufreq0: Unable to find firmware device > >> device_attach: bcm2835_cpufreq0 attach returned 6 > > = > >> (Yes, armv8crypto is missing a newline.) > > = > >> I checked the most recent system I had on the shelf, which was 13.0-A= LPHA1. > >> It has this: > > = > >> bcm2835_firmware0: on simplebus0 > >> ofw_clkbus1: on bcm2835_firmware0 > >> gpio0: on bcm2835_firmware= 0 > >> bcm2835_cpufreq0: on cpu0 > >> bcm2835_cpufreq0: ARM 600MHz, Core 200MHz, SDRAM 400MHz, Turbo OFF > > = > >> Does anyone know what changed to cause this? Was it the FDT update? > > = > =3D=3D=3D > Mark Millard > marklmi at yahoo.com > ( dsl-only.net went > away in early 2018-Mar)