From nobody Sun Aug 13 16:25:25 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 4RP2vP4gj6z4mL79 for ; Sun, 13 Aug 2023 16:25:37 +0000 (UTC) (envelope-from mike@karels.net) Received: from mail2.karels.net (mail2.karels.net [3.19.118.201]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "freebsd", Issuer "freebsd" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RP2vP3Nksz4Ps0 for ; Sun, 13 Aug 2023 16:25:37 +0000 (UTC) (envelope-from mike@karels.net) Authentication-Results: mx1.freebsd.org; none Received: from mail2.karels.net (localhost [IPv6:0:0:0:0:0:0:0:1]) by mail2.karels.net (8.17.1/8.17.1) with ESMTP id 37DGPQFv037970; Sun, 13 Aug 2023 11:25:26 -0500 (CDT) (envelope-from mike@karels.net) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=karels.net; s=mail2; t=1691943927; bh=GUfuhU2+6Tz3q5qza6EtYE+PkJcL5ovUkXUv7LZzdjo=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=PCjqSvWb4IkIzHG/Cm3rvvKb8vM0unSj+c45tYjpoO1v/SAB/KlBVzVekxmOcD11T owpjcjr6L7nHAesDgyKyzKsOm4pCD03JPIJhsKpWJnOWLZM/WEKl73d2pTHgFD4xVh zpy1OmntVIYWFqcDJ+FEfSweWz9vGK5hM8FI1ErQDbuUIt1tZSI3WPkVhBoDmvXdGD +3vQ1+beg3ILxKNcwsx1Ia8ZddGnIpVq7273qzPDXOgT8YdgWTz2okFFX8it95CKRr oWdgi5VR+OFFhLWM6dWMxi4bxEubqVPJ93DGFMOjMI8hT9ehpjBVBZr2DK2o0RInIv 1cGIPOqBoaYTw== Received: from [10.0.2.130] ([73.62.165.147]) by mail2.karels.net with ESMTPSA id 4YkFIfYD2WRQlAAAs/W3XQ (envelope-from ); Sun, 13 Aug 2023 11:25:26 -0500 From: Mike Karels To: Mark Millard Cc: Warner Losh , titus , freebsd-arm Subject: Re: ALPHA1 on Raspberry Pi 3B+ [added: and RPi4B] Date: Sun, 13 Aug 2023 11:25:25 -0500 X-Mailer: MailMate (1.14r5964) Message-ID: In-Reply-To: <4F7960AE-F607-4FEF-8A02-2013862A37E3@yahoo.com> References: <1C94FEAF-C616-498F-8562-2E99CF12417D@edc.ro> <4F7960AE-F607-4FEF-8A02-2013862A37E3@yahoo.com> 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 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 4RP2vP3Nksz4Ps0 X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:16509, ipnet:3.16.0.0/14, country:US] On 13 Aug 2023, at 11:10, Mark Millard wrote: > On Aug 13, 2023, at 08:17, Warner Losh wrote: > >> Manu just updated Linux DTS in the tree. Maybe see if you revert that if the problem persists. > > git: 69f8cc60aa1e - main - ofw_firmware: Only match if there is no compatible > > is the fix that Manu has committed: > > QUOTE > ofw_firmware: Only match if there is no compatible > > If there is a compatible string it likely means that the firmware needs > a dedicated driver (like on RPI*). > > PR: 273087 > Tested-by: Mark Millard > Sponsored by: Beckhoff Automation GmbH & Co. KG > Fixes: fdfd3a90b6ce ("ofw: Add a ofw_firmware driver") > END QUOTE Just for completeness: that change fixes the bcm2835_cpufreq0/powerd problem and the gpioled0 problem, but not the clk_fixed2 problem (clk_fixed4 on rpi4). Installing an msdos boot partition from the 3 Aug image makes that problem disappear. Mike > Also, FreeBSD does not use the linux DTS Files for RPi* 's. They do > not produce matches to the *.dtb 's that FreeBSD does use: FreeBSD > uses RPi* *.dtb files that are in the RPi* firmware releases. Those > RPI* firmware releases (and *.dtb's) are gotten from: > > WWW= https://github.com/raspberrypi/firmware > > via the sysutils/rpi-firmware port. >> >> On Sun, Aug 13, 2023, 12:12 AM titus wrote: >> the failed devices are all linked to raspberrypi,bcm2835-firmware >> (gpio, cpufreq_dt,…) which does not see to be probed / attached >> check fdt ls at the loader prompt and ofwdump -a >> and boot -v >> and nm /boot/kernel/kernel|grep bcm2835_firmware_get_revision >>> On 13 Aug 2023, at 07:25, Mark Millard wrote: >>> >>> On Aug 12, 2023, at 17:42, Mike Karels wrote: >>> >>>> I booted 14.0-ALPHA1 on a Raspberry Pi 3B+. It boots and runs, but there >>>> are some rough edges that probably indicate things that are broken. During >>>> the boot, there are 56 occurrences of this sequence: >>>> >>>> clk_fixed2: disabled on ofwbus0 >>>> clk_fixed2: Cannot FDT parameters. >>>> device_attach: clk_fixed2 attach returned 6 >>> >>> The large count is from a small number of examples. Each >>> internal scan repeats the messages for each example, >>> unless eventually found. I learned this when I had >>> something being looked for too early, before the >>> definition was added to match up with. Everything worked >>> because of the retries eventually finding things after >>> they had been added, but it produced lots of messages >>> first. But, in that case, there was material to find. >>> >>> The RPi4B's get clk_fixed4's instead, with a similar >>> overall count. For the RPi4B the cause is the >>> "fixed-clock" material below (from a diff of .dts >>> files produced from the .dtb files): >>> >>> - cam1_reg { >>> + cam0_clk { >>> >>> + #clock-cells = <0x0>; >>> + compatible = "fixed-clock"; >>> + status = "disabled"; >>> + }; >>> + cam0_regulator { >>> + >>> compatible = "regulator-fixed"; >>> enable-active-high; >>> - gpio = <0xa 0x5 0x0>; >>> - regulator-name = "cam1-reg"; >>> + regulator-name = "cam0-reg"; >>> status = "disabled"; >>> }; >>> + cam1_clk { >>> + >>> + #clock-cells = <0x0>; >>> + compatible = "fixed-clock"; >>> + status = "disabled"; >>> + }; >>> + cam1_regulator { >>> + >>> + compatible = "regulator-fixed"; >>> + enable-active-high; >>> + gpio = <0xb 0x5 0x0>; >>> + regulator-name = "cam1-reg"; >>> + status = "okay"; >>> + }; >>> >>> I doubt that cam0_clk and cam1_clk are ever added to later >>> find, as stands, making every scan report the 2 fixed-clock >>> references each time. >>> >>> This is something that I reported on on the lists back on >>> 2022-Apr-30. But it was mixed with a crash report that >>> turned out to be a separate issue (and was fixed some time >>> ago). >>> >>> It would be possible to decompile the .dtb used for RPi3B+'s >>> to see if cam?_clk fixed-clock's are present. >>> >>>> Two other failures: >>>> >>>> bcm2835_cpufreq0: on cpu0 >>>> bcm2835_cpufreq0: Unable to find firmware device >>>> device_attach: bcm2835_cpufreq0 attach returned 6 >>>> gpioled0: on ofwbus0 >>>> gpioled0: failed to map pin >>> >>> Those are more than noise messages. >>> >>>> The red LED that's on when the system is halted stays on after boot; not >>>> sure if that's related to the last item. >>>> >>>> Looks like the kernel needs adjustments to correspond with the new DTB. >>>> >>>> I'll append the full dmesg.boot. >>> . . . >>> >>> === >>> Mark Millard >>> marklmi at yahoo.com >>> >>> >> > > > === > Mark Millard > marklmi at yahoo.com