From owner-freebsd-arm@freebsd.org Sun May 2 17:31:56 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 EB20462B694 for ; Sun, 2 May 2021 17:31:56 +0000 (UTC) (envelope-from marklmi@yahoo.com) Received: from sonic305-20.consmr.mail.gq1.yahoo.com (sonic305-20.consmr.mail.gq1.yahoo.com [98.137.64.83]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4FYCpN4hHLz4sHQ for ; Sun, 2 May 2021 17:31:56 +0000 (UTC) (envelope-from marklmi@yahoo.com) X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1619976714; bh=oEAXvQIQ1/mc8RLvmDZMlcbOOgTBogvzLl4bMSvEMyz=; h=X-Sonic-MF:Subject:From:Date:To:From:Subject; b=YyhXr/GAg6hVhibBXxHJ2Dw/0xO9c0LWwIC1CMuc/7U8gDAOA8M0JQTWC429eCRdc2ztR1keYrV2Q8pGV13RzzHD8YVuuMZhsJSypWT7gRzN/MNQr39dBGO2saEDdKVJlwIldDEo2w2P1CXiInm4hf3IUZUrxzwP+ieex89WZYu5Crkp10u/6wdt74KwHoDTQe4uAj2867lMElP3RIrKLZAazueUiSYadhqxAL2LvKGdKgACCm4bq09lNhvr5PY9xJeCy+4e4onSiW0IWbBZWI9b81sUEWt1BLtkwyJno8ktPJPNp9u22pcqDri4oYRVJ5eh2J0qSab1NLHd1BBSwQ== X-YMail-OSG: _Mp0Xb4VM1lJQy8L3MuAge7724AESbRRc7TwB.JQU5JuZp3e7sYcMaItyq5UxFo 9evW.npH.A5KNH.ApIeB0XQr2LKN0OuPjgZVhTdYa6jwV96ObJSj_9YLqPR6EfWs34YeQXSlrjTN Ex2ET1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KUVcZRRGvRsVltT49GGfGczhZE9wkqMU_2j1NKDcOQpAlzaOJDYq0Z.p4Lkk1KHHq2h PCSEZaVf2hehjS9Fgv_CBY7vO4yQZDoLr6RsWnOo0EOdTNnne_fxSANrTPEkG_K7Q5Di4n17ZtXj JQZAZDq9mBdsn5ea3fLe0.M8_6xU6fcepR9At6KtFCGr_Yq00yWUMKNTW7PVf369casqZm2yMfHQ 4RC9LuMSYOVf1KwrBmbm77_LMQtj7xEqW3T8x_5olUi1B2Sis4iQ- X-Sonic-MF: Received: from sonic.gate.mail.ne1.yahoo.com by sonic305.consmr.mail.gq1.yahoo.com with HTTP; Sun, 2 May 2021 17:31:54 +0000 Received: by kubenode548.mail-prod1.omega.ne1.yahoo.com (VZM Hermes SMTP Server) with ESMTPA ID 89dd191e436600fbb93953dcc207e40f; Sun, 02 May 2021 17:31:53 +0000 (UTC) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.60.0.2.21\)) Subject: Re: I2C/IIC working on RPI4 8GB? From: Mark Millard In-Reply-To: Date: Sun, 2 May 2021 10:31:50 -0700 Cc: freebsd-arm Content-Transfer-Encoding: quoted-printable Message-Id: <01634FBF-A36F-4AD3-B10F-992CEA9D3729@yahoo.com> References: <1C2DD11C-B1F6-4C2A-9AB0-5F1553520FF5@FreeBSD.org> <20210426161138.a8f44b6e1134f73a411be57d@bidouilliste.com> <47A634E3-4938-4AFC-9341-E480CEBF67FB@FreeBSD.org> <20210428101945.67417ef8eba251dcbcb38078@bidouilliste.com> <486E3EA3-EBAE-492E-B12E-E72E3E3E7B6A@FreeBSD.org> <501CB1C0-73D4-4BEF-A1E6-1F13C02EFA42@FreeBSD.org> <8CBBAE44-E736-4DEF-BA60-4D5068D25C15@yahoo.com> To: Mark Murray X-Mailer: Apple Mail (2.3654.60.0.2.21) X-Rspamd-Queue-Id: 4FYCpN4hHLz4sHQ X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] 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: Sun, 02 May 2021 17:31:57 -0000 On 2021-May-2, at 03:14, Mark Murray wrote: >=20 > On 2 May 2021, at 03:58, Mark Millard wrote: >>=20 >> [I was given a code hint that I've not investigated yet.] >>=20 >> But going in a different direction, based on my default >> context on the local FreeBSD RPI4B 8 GiByte: >=20 > ... and a whole lot more really helpful diagnosis over several emails. >=20 > Thank you VERY much! it will take me a while to digest this, but = digest it I will. >=20 > Ultimately, it would be good for a "make buildworld; make = installworld" on an RPi to install the in-source FDT, and for it to be = correct, such that it doesn't take some trickier port modification to = have a working FDT. This is worth taking on as a project, but I won't = get to it very soon. >=20 Linux and the foundation do not even agree about various .dtb names (or content). And some linux distributions targeting the RPi*'s use the foundation's .dtb files in preference to the linux mainline ones. For example, fedora uses the foundation's files (same names as FreeBSD ends up with). Fedora 34: # ls -ld /boot/efi/*.dtb -rwx------. 1 root root 26745 Feb 23 07:35 /boot/efi/bcm2709-rpi-2-b.dtb -rwx------. 1 root root 26894 Feb 23 07:35 /boot/efi/bcm2710-rpi-2-b.dtb -rwx------. 1 root root 28392 Feb 23 07:35 /boot/efi/bcm2710-rpi-3-b.dtb -rwx------. 1 root root 29011 Feb 23 07:35 = /boot/efi/bcm2710-rpi-3-b-plus.dtb -rwx------. 1 root root 26890 Feb 23 07:35 /boot/efi/bcm2710-rpi-cm3.dtb -rwx------. 1 root root 49198 Apr 9 07:11 /boot/efi/bcm2711-rpi-400.dtb -rwx------. 1 root root 49218 Mar 24 08:12 /boot/efi/bcm2711-rpi-4-b.dtb -rwx------. 1 root root 49892 Apr 9 07:11 /boot/efi/bcm2711-rpi-cm4.dtb By contrast, ubuntu uses the linux .dtb's. Note the bcm2837*.dtb names in ubuntu 21.04 (instead of bcm2709*.dtb and bcm2710*.dtb like naming): # ls -ld /boot/firmware/*.dtb -rwxr-xr-x 1 root root 26914 Apr 22 21:21 = /boot/firmware/bcm2710-rpi-2-b.dtb -rwxr-xr-x 1 root root 29031 Apr 22 21:21 = /boot/firmware/bcm2710-rpi-3-b-plus.dtb -rwxr-xr-x 1 root root 28412 Apr 22 21:21 = /boot/firmware/bcm2710-rpi-3-b.dtb -rwxr-xr-x 1 root root 26910 Apr 22 21:21 = /boot/firmware/bcm2710-rpi-cm3.dtb -rwxr-xr-x 1 root root 49254 Apr 22 21:21 = /boot/firmware/bcm2711-rpi-4-b.dtb -rwxr-xr-x 1 root root 48910 Apr 22 21:21 = /boot/firmware/bcm2711-rpi-400.dtb -rwxr-xr-x 1 root root 49318 Apr 22 21:21 = /boot/firmware/bcm2711-rpi-cm4.dtb -rwxr-xr-x 1 root root 20140 Apr 22 21:21 = /boot/firmware/bcm2837-rpi-3-a-plus.dtb -rwxr-xr-x 1 root root 21009 Apr 22 21:21 = /boot/firmware/bcm2837-rpi-3-b-plus.dtb -rwxr-xr-x 1 root root 20545 Apr 22 21:21 = /boot/firmware/bcm2837-rpi-3-b.dtb -rwxr-xr-x 1 root root 19872 Apr 22 21:21 = /boot/firmware/bcm2837-rpi-cm3-io3.dtb -rwxr-xr-x 1 root root 1559 Apr 3 06:16 /boot/firmware/overlay_map.dtb The RPiFirmware has special config.txt support for using upstream kernels that expect the linux naming and content. For example: QUOTE upstream_kernel If upstream_kernel=3D1 is used, the firmware sets os_prefix to = "upstream/", unless it has been explicitly set to something else, but = like other os_prefixvalues it will be ignored if the required kernel and = .dtb file can't be found when using the prefix. The firmware will also prefer upstream Linux names for DTBs = (bcm2837-rpi-3-b.dtb instead of bcm2710-rpi-3-b.dtb, for example). If = the upstream file isn't found the firmware will load the downstream = variant instead and automatically apply the "upstream" overlay to make = some adjustments. Note that this process happens after the os_prefix has = been finalised. ENDQUOTE See = https://www.raspberrypi.org/documentation/configuration/config-txt/boot.md= for os_prefix and overlay_prefix information as well. =46rom what I can tell, it appears that the linux .dtb's are less tested by being less used, so possibly having more problems, not fewer. And FreeBSD itself would have to have its kernel updated to deal with the differences (or to support both ways). It is not just a build = environment change if I understand right. =3D=3D=3D Mark Millard marklmi at yahoo.com ( dsl-only.net went away in early 2018-Mar)