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, Mar 11, 1:21 AM
Unknown Object (File)
Wed, Mar 5, 3:18 PM
Unknown Object (File)
Fri, Feb 28, 2:23 PM
Unknown Object (File)
Fri, Feb 28, 8:35 AM
Unknown Object (File)
Fri, Feb 21, 6:53 PM
Unknown Object (File)
Feb 6 2025, 8:11 PM
Unknown Object (File)
Jan 11 2025, 2:48 AM
Unknown Object (File)
Jan 9 2025, 6:06 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.