This adds the ccung driver for Allwinner SoC.
Since Linux 4.9-4.10 DTS doesn't have clocks under /clocks but only a ccu node.
Currently only H3 is supported with almost the same state as HEAD. (video pll aren't supported for now but we don't support video).
This driver and clocks will also be used for other SoC (A64, A31, H5, H2 etc ...)
Details
- Reviewers
jmcneill - Group Reviewers
ARM - Commits
- rS314303: Add clkng driver for Allwinner SoC
Tested on OrangePi One
cpufreq OK, ethernet OK, Thermal OK.
Audio isn't tested (no headphone on OrangePi).
Diff Detail
- Repository
- rS FreeBSD src repository - subversion
- Lint
Lint Not Applicable - Unit
Tests Not Applicable
Event Timeline
Fix a few more mistakes in width of some factors.
It has been checked two times now but might need another pair of eyes.
sys/arm/allwinner/clkng/aw_ccung.c | ||
---|---|---|
286 ↗ | (On Diff #25103) | We're going to need a way to make the SoC specific bits compile time options. No sense in having H3 support in a 64-bit kernel, for example. |
sys/arm/allwinner/clkng/aw_clk_nkmp.c | ||
158 ↗ | (On Diff #25103) | This looks to be H3 specific. |
232 ↗ | (On Diff #25103) | if ((flags & CLK_SET_DRYRUN) != 0) { and a few more below.. |
sys/arm/allwinner/clkng/aw_clk_nm.c | ||
190 ↗ | (On Diff #25103) | if ((sc->flags & AW_CLK_REPARENT) != 0) { |
sys/arm/allwinner/clkng/aw_ccung.c | ||
---|---|---|
286 ↗ | (On Diff #25103) | RIght, I'll make it depend on ALLWINNER_SOC_XXX |
sys/arm/allwinner/clkng/aw_clk_nkmp.c | ||
158 ↗ | (On Diff #25103) | I haven't finished/tested A31 but since I had the same lock problem when implementing cpufreq it might be needed there. |
232 ↗ | (On Diff #25103) | Yup sorry will correct that. |
sys/arm/allwinner/clkng/aw_clk_nkmp.c | ||
---|---|---|
158 ↗ | (On Diff #25103) | Confirmed, this is needed on A31 for cpufreq. |
sys/arm/allwinner/clkng/aw_clk_nkmp.c | ||
---|---|---|
158 ↗ | (On Diff #25103) | Are there plans for a10- and a23-style pll1 on clkng? According to arm/allwinner/clk/aw_pll.c these use nkmp style registers but do not require this change sequence. |
sys/arm/allwinner/clkng/aw_clk_nkmp.c | ||
---|---|---|
158 ↗ | (On Diff #25103) | Then just don't set AW_CLK_SCALE_CHANGE and this will do the job. |