Page MenuHomeFreeBSD

Add LS1046A clockgen driver.

Authored by on Apr 9 2020, 2:49 PM.
Referenced Files
F58634756: D24352.diff
Tue, Mar 28, 4:34 AM
Unknown Object (File)
Sat, Mar 4, 10:59 AM
Unknown Object (File)
Feb 12 2023, 4:56 PM
Unknown Object (File)
Feb 11 2023, 1:30 AM
Unknown Object (File)
Jan 4 2023, 8:58 PM
Unknown Object (File)
Jan 2 2023, 4:48 AM
Unknown Object (File)
Dec 4 2022, 1:55 PM



Driver provides probe and attach functions for LS1046A clockgen and passes
configuration information to QorIQ clockgen class. May be used as
reference implementation for different QorIQ clockgen devices.

Diff Detail

Lint Skipped
Tests Skipped

Event Timeline

This is a comment for all the LS1046A reviews: Please add a new SOC_NXP_LS1046A option to sys/conf/options.arm64 and make the drivers depend on that in sys/conf/files.arm64

I modified the driver to use the modified QorIQ clockgen classes.
Also added dependency on SOC_NXP_LS104A.


this is the same id as the hwaccel1, is that intentional ?
If the clocks aren't exposed in the DTS an id of 0 is perfectly fine.


Why does this fixed clock needs a init function to be registered ?


No, that was not intentional.
Most of the clocks are exposed in dts, but due to using two clock cells in dts the custom ofw_mapper function finds clock based on name instead of id.


I used init function here as the way FMAN nodes work is specific to SoC, so different way of creating this node may be needed.

Hi, if you have any more comments or remarks, please let me know. Thanks.

Imho, It will be better to wait with this until we find consensus with D24351, right ?


There is no reason to obfuscate clock node name in this way, please use names from TRM


huh!. Use nitems() :)


again this is wrong way. Simply encode both cells into one id and use it.

Modified to work with new version of D24351

The LS family has too many members and can share 99% of the code. It seems unnecessary for me to have the option for each individual variant. How about 'SOC_NXP_LS' ?

This revision is now accepted and ready to land.May 22 2020, 12:46 PM

I'll change it in all the patches to SOC_NXP_LS.

In D24352#549462, @mmel wrote:

The LS family has too many members and can share 99% of the code. It seems unnecessary for me to have the option for each individual variant. How about 'SOC_NXP_LS' ?

That might be fine for now but what about the future ?

@mmel @manu Please agree on the desired option naming as it affects all submitted patches. Once done, I'll commit.

Just go with NXP_LS, if there is any problem later we'll handle it at this moment.

from IRC:
There is at least 11 variants of QoriQ arm64 based SoCs. This is too much for per-SOC options.
We can always add a SOC_NXP_LS_BLAH and !it if one soc differs

Replace SOC_NXP_LS1046 with SOC_NXP_LS.

This revision now requires review to proceed.May 22 2020, 7:58 PM
This revision was not accepted when it landed; it landed in state Needs Review.May 25 2020, 2:45 PM
Closed by commit rS361459: Add LS1046A clockgen driver. (authored by mw). · Explain Why
This revision was automatically updated to reflect the committed changes.