Page MenuHomeFreeBSD

riscv: enable allwinner RTC
ClosedPublic

Authored by mhorne on Nov 11 2024, 5:19 PM.
Tags
None
Referenced Files
F131492501: D47514.id146283.diff
Wed, Oct 8, 2:24 PM
Unknown Object (File)
Mon, Oct 6, 11:41 PM
Unknown Object (File)
Thu, Oct 2, 5:34 PM
Unknown Object (File)
Sep 4 2025, 3:35 PM
Unknown Object (File)
Sep 4 2025, 12:14 PM
Unknown Object (File)
Sep 4 2025, 8:55 AM
Unknown Object (File)
Sep 2 2025, 3:50 PM
Unknown Object (File)
Aug 30 2025, 12:13 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.