Page MenuHomeFreeBSD

riscv: enable allwinner RTC
ClosedPublic

Authored by mhorne on Nov 11 2024, 5:19 PM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Jun 17, 8:27 PM
Unknown Object (File)
Fri, Jun 13, 5:39 PM
Unknown Object (File)
May 19 2025, 8:38 AM
Unknown Object (File)
May 14 2025, 6:12 PM
Unknown Object (File)
Apr 23 2025, 5:52 PM
Unknown Object (File)
Apr 23 2025, 5:50 PM
Unknown Object (File)
Apr 23 2025, 2:10 PM
Unknown Object (File)
Apr 22 2025, 12:45 PM

Details

Summary

For the Allwinner D1 (Nehza) SBC.

This RTC driver is also a clock provider, which registers two fixed
clocks. In all the devices we currently support, the names of the clocks
are present in the "clock-output-names" property of the device tree.
This is not the case for the D1 DTS, as this property does not appear in
upstream. Therefore the clock definitions are statically assigned a
name, which is overridden when specified.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

@manu This is the first of several changes enabling Allwinner drivers on the riscv platform (probably not all coming today). It suggests that we might move these sources to a more common place (out of arm subdir), but I do not really see any reason this must happen first.

@manu This is the first of several changes enabling Allwinner drivers on the riscv platform (probably not all coming today). It suggests that we might move these sources to a more common place (out of arm subdir), but I do not really see any reason this must happen first.

Sure, that's why I started moving a lot of other drivers too in the past.

This revision is now accepted and ready to land.Nov 11 2024, 6:12 PM
This revision was automatically updated to reflect the committed changes.

Unfortunately, the assumption about "In all the devices we currently support, the clock names in the "clock-output-names" property" is clearly incorrect. The documented binding for the A10/A20 does not allow any of these clocks. so this breaks every single A10/A20 board...

Additionally, the required and maximum number of items in the clock-output names depends on the platform, so comparing fixed to 3 doesn't look right either.

Unfortunately, the assumption about "In all the devices we currently support, the clock names in the "clock-output-names" property" is clearly incorrect. The documented binding for the A10/A20 does not allow any of these clocks. so this breaks every single A10/A20 board...

Additionally, the required and maximum number of items in the clock-output names depends on the platform, so comparing fixed to 3 doesn't look right either.

Yes, my handling was a little clumsy here, as also reported https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=285054.

I will revert for now, to consider the best way to handle this.

The fixed comparison to 3 was an existing assumption of the driver.