From owner-freebsd-arm@freebsd.org Sun May 2 18:28:06 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 F273E62CAE7 for ; Sun, 2 May 2021 18:28:06 +0000 (UTC) (envelope-from marklmi@yahoo.com) Received: from sonic316-54.consmr.mail.gq1.yahoo.com (sonic316-54.consmr.mail.gq1.yahoo.com [98.137.69.30]) (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 4FYF394MdSz4v5k for ; Sun, 2 May 2021 18:28:05 +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=1619980083; bh=taKwhovzQEuXudDJdpCHdvNSPq33ckrJZ9vXeigElgb=; h=X-Sonic-MF:Subject:From:Date:To:From:Subject; b=BHDmwUBbyKIdmdB+d0y+rF8LBNYNlefgGazVcZ9k6PTmDfblNPqW2GUUx0gbU0fGED0lPf4yJEkyNuYa3+zTwv1B6Q+nqxD3C3qe4qE1x/Pmnj2GDnHkZrlpXRw8XFtZvHEdgoE00fpbBm43/vTzJdECn4T/Z89OqQ87DJUZ3BN9TJmmyjoormGK5TgIrOH8U4Hd4wOMoCriws3K7ddxDbIfta80WIr3w1k6IiEwHKn8dc+dQ4dBYktVLTA8rQpudyixZO+QVTyDWjavRAOzg6fkRw7R3ShG4xAf8dd+k5zpAiGcNjzNlq7RQBUCORiOCyjLi1A3AsSpk7/nt6hD9g== X-YMail-OSG: 9aTZvzEVM1mYxfv_CRj.0W8oPIhMC3KM.em71lRLLYyQ37tdA64_garVavirEEb Rc085vkdex0wlkYr7b24hhg78m1DCqPm2vwVT1pI0eaIPJayZNcofK0DpJn0WWFnjGnSGX4H4Igw 4DgDM55bu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xjU2D6ZjOjnNzCbc79SPYJGSwGinAG6PBXbudPBgYrVGwKZBMs1L lZwc7GKW8vWq2JW_kvjp2kL.Lt3utIvIJatcrenkF8jNkmBiiBzRv8pVBuVBB0PMftY_emaMXfMb 8Lw3HTZgueTg..9fEN179skzwoiRmW90olIjcoemBfjX0cAJN9k2F4CfjndH7_ysLFT_OJFrXYo_ 4vYNcxFM0XiZhglfZ3XpnDgInmzWom9ur5KIEaxpOti8hM2K5ZmSSy6FwyacYg26XylwJrF5389N S5rLRf0DqRBOZITTA0dKUXFVnM_UW X-Sonic-MF: Received: from sonic.gate.mail.ne1.yahoo.com by sonic316.consmr.mail.gq1.yahoo.com with HTTP; Sun, 2 May 2021 18:28:03 +0000 Received: by kubenode544.mail-prod1.omega.bf1.yahoo.com (VZM Hermes SMTP Server) with ESMTPA ID eac5b65dabd4c3a9c16aa8ce855b238c; Sun, 02 May 2021 18:28:01 +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: <01634FBF-A36F-4AD3-B10F-992CEA9D3729@yahoo.com> Date: Sun, 2 May 2021 11:27:59 -0700 Cc: freebsd-arm Content-Transfer-Encoding: quoted-printable Message-Id: <1ABF0EB5-80A6-41FC-B465-B21CE5F004D3@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> <01634FBF-A36F-4AD3-B10F-992CEA9D3729@yahoo.com> To: Mark Murray X-Mailer: Apple Mail (2.3654.60.0.2.21) X-Rspamd-Queue-Id: 4FYF394MdSz4v5k X-Spamd-Bar: -- X-Spamd-Result: default: False [-2.24 / 15.00]; FREEMAIL_FROM(0.00)[yahoo.com]; MV_CASE(0.50)[]; R_SPF_ALLOW(-0.20)[+ptr:yahoo.com]; TO_DN_ALL(0.00)[]; DKIM_TRACE(0.00)[yahoo.com:+]; RCPT_COUNT_TWO(0.00)[2]; DMARC_POLICY_ALLOW(-0.50)[yahoo.com,reject]; NEURAL_HAM_SHORT(-0.75)[-0.752]; FROM_EQ_ENVFROM(0.00)[]; RCVD_TLS_LAST(0.00)[]; MIME_TRACE(0.00)[0:+]; FREEMAIL_ENVFROM(0.00)[yahoo.com]; ASN(0.00)[asn:36647, ipnet:98.137.64.0/20, country:US]; RBL_DBL_DONT_QUERY_IPS(0.00)[98.137.69.30:from]; DWL_DNSWL_NONE(0.00)[yahoo.com:dkim]; SUBJECT_ENDS_QUESTION(1.00)[]; ARC_NA(0.00)[]; R_DKIM_ALLOW(-0.20)[yahoo.com:s=s2048]; MID_RHS_MATCH_FROM(0.00)[]; FROM_HAS_DN(0.00)[]; NEURAL_HAM_MEDIUM(-0.99)[-0.987]; NEURAL_HAM_LONG(-1.00)[-1.000]; MIME_GOOD(-0.10)[text/plain]; SPAMHAUS_ZRD(0.00)[98.137.69.30:from:127.0.2.255]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[98.137.69.30:from]; RWL_MAILSPIKE_POSSIBLE(0.00)[98.137.69.30:from]; 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: Sun, 02 May 2021 18:28:07 -0000 On 2021-May-2, at 10:31, Mark Millard wrote: > On 2021-May-2, at 03:14, Mark Murray wrote: >=20 >>=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 >=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. >=20 > For example, fedora uses the foundation's files (same names > as FreeBSD ends up with). Fedora 34: >=20 > # 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 >=20 > 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): >=20 > # 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 >=20 > The RPiFirmware has special config.txt support for using upstream > kernels that expect the linux naming and content. For example: >=20 > QUOTE > upstream_kernel >=20 > 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. >=20 > 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 >=20 > See = https://www.raspberrypi.org/documentation/configuration/config-txt/boot.md= > for os_prefix and overlay_prefix information as well. >=20 > =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. >=20 There is another implication: the RPi firmware loaded and uses the .dtb files and also makes dynamic adjustments to provide what it does to U-Boot, which in turn can do more adjsutments for what it provides to the FreeBSD loader. Having the kernel use different .dtb built from other sources without having the RPi firmware and U-Boot also use the same .dtb is asking for mismatches and other troubles. Thus any .dtb generated and used needs to be tested for the earlier stages handling the alternate .dtb's. Compatibility would not be a local-to-FreeBSD concern overall. It is not obvious to me that alternate .dtb files make things simpler for knowing what will work vs. not. =3D=3D=3D Mark Millard marklmi at yahoo.com ( dsl-only.net went away in early 2018-Mar)