Re: I2C/IIC working on RPI4 8GB?
Mark Millard via freebsd-arm <[email protected]>
| Newsgroups | gmane.os.freebsd.devel.arm |
|---|---|
| Message-ID | <[email protected]> |
On 2021-May-2, at 03:14, Mark Murray <markm at freebsd.org> wrote: > > On 2 May 2021, at 03:58, Mark Millard <[email protected]> wrote: >> >> [I was given a code hint that I've not investigated yet.] >> >> But going in a different direction, based on my default >> context on the local FreeBSD RPI4B 8 GiByte: > > ... and a whole lot more really helpful diagnosis over several emails. > > Thank you VERY much! it will take me a while to digest this, but digest it I will. > > 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. > 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=1 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. From 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. === Mark Millard marklmi at yahoo.com ( dsl-only.net went away in early 2018-Mar) _______________________________________________ [email protected] mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-arm To unsubscribe, send any mail to "[email protected]"