RPi-Distro / pi-bluetooth

Loads BCM43430A1 firmware on boot
42 stars 34 forks source link

Widen match for CM4 compatibility #20

Closed waveform80 closed 3 years ago

waveform80 commented 3 years ago

The existing test tries to find "Pi 4" in the d-t model string. This works fine for the Model 4B ("Raspberry Pi 4 Model B Rev 1.x"), and the 400 ("Raspberry Pi 400 Rev 1.0"). However, it doesn't match the model string on the Compute Module 4 ("Raspberry Pi Compute Module 4 Rev 1.0").

This commit uses the d-t compatible string instead and matches on "raspberrypi,4" which matches the Pi 4 and 400 (which both have "raspberrypi,4-model-b" in their compatible value) and the CM4 (which has "raspberrypi,4-compute-module").

Instead of matching a sub-string it might be preferable to match the "brcm,bcm2711" element (which again covers all the necessary platforms), but that might be considered too "wide" a match (if there's anything else using a BCM2711)?

pelwell commented 3 years ago

That works for me - it's a feature of the boards rather than the SoCs, so I prefer this to matching on bcm2711.

Thanks.