On 1/28/20 9:39 AM, Peter Robinson wrote:
On Tue, Jan 28, 2020 at 1:59 PM Steven A. Falco <stevenfalco@xxxxxxxxx> wrote:
I'd like to add an RTC module to a Raspberry Pi. I see that uboot has some support for device tree overlays, but if I'm reading the code correctly, it doesn't seem to be enabled for the Pi.
Is it possible to use device tree overlays at this point, or am I better off building a custom kernel?
Yes, mostly, but there's still a whole bunch of corner cases, for
Raspberry Pi we use the Firmware provided DT and not the kernel DT.
It's only really clean on aarch64 and completely doesn't work on RPi4
(yet another reason there's been no announcement around RPi4 support).
I see. U-boot says it is using 0:2 /dtb/broadcom/bcm2711-rpi-4-b.dtb, and I've confirmed that: If I hand-edit that dtb file to add the RTC (pcf8523@68) to the I2C bus (i2c@7e804000) it works - the RTC is reported as being managed by the kernel. So it looks like the RPi4 is using the kernel device tree rather than the firmware one.
I have not been entirely successful rebuilding the kernel yet (using mock on the RPi4 itself). The dtc portion of the build fails because of the gcc10 change from -fcommon to -fno-common. I need to tweak the kernel spec file to work around that, but my first attempt was a little too heavy-handed. Seems that a lot of stuff needs -fno-common, but dtc needs -fcommon.
Steve
_______________________________________________
arm mailing list -- arm@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to arm-leave@xxxxxxxxxxxxxxxxxxxxxxx
Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/arm@xxxxxxxxxxxxxxxxxxxxxxx