-
Notifications
You must be signed in to change notification settings - Fork 5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
rpi-4.7.y enable clock manager and modify all subsystems to use it #1628
rpi-4.7.y enable clock manager and modify all subsystems to use it #1628
Conversation
Enable the clock manager by default. Signed-off-by: Martin Sperl <[email protected]>
Removed clock registers from reg and added clock to i2s devicetree node. Signed-off-by: Martin Sperl <[email protected]>
Upstream mandates the use of "serial" as name inside the device-tree. Note that this does not affect the use of the alias - there uart0 and uart1 are permissible. This also fixed the patch references inside the overlays for the rpi3. Signed-off-by: Martin Sperl <[email protected]>
Moved uart0 to use new clock framework. At the same time removed the fixed clock clk_uart0 and the corresponding references, as the clock is now read directly from the configured clocks. If it ever becomes necessary the following can get added to modify the base clock rate later: assigned-clocks = <&clocks BCM2835_CLOCK_UART>; assigned-clock-rates = <X>; Signed-off-by: Martin Sperl <[email protected]>
use spi0 to use new clock framwork Signed-off-by: Martin Sperl <[email protected]>
move i2c to use the new clock framework instead of the fixed clock Signed-off-by: Martin Sperl <[email protected]>
Move PWM to use the new clock framework Signed-off-by: Martin Sperl <[email protected]>
Fix the auxiliar clock provider to use the clock framework Signed-off-by: Martin Sperl <[email protected]>
Fix the register range of the spi-aux devices, as they do not control the gate. Signed-off-by: Martin Sperl <[email protected]>
Move to new aux-uart driver (from upstream) and enable it correctly in the device tree Note that this may also solve the "serial not 115200 baud" issue on the rpi3... With an extension to the driver (requesting clock change notifications) the driver could change the baud divider when such a clock change occurs... It still would require some communication between the firmware and the kernel, so that this would get propagated. Signed-off-by: Martin Sperl <[email protected]>
Remove no longer necessary fixed pwm clock. Signed-off-by: Martin Sperl <[email protected]>
Use clock manager instead of self-made clockmanager. Also fix some error paths that showd up during development (especially missing release of dma resources on rmmod) Signed-off-by: Martin Sperl <[email protected]>
Move smi to use clock framework. Signed-off-by: Martin Sperl <[email protected]>
Move mmc to use clock framework. For some reason the emmc clock dirver does not claim the clock - enable count stays at 0 for the emmc clock. Signed-off-by: Martin Sperl <[email protected]>
Move the sdhost device to use the clock framework. Unfortunately I can not test it on my CM, as it seem as if there is no overlay that would enable sdhost and change the gpio-mux to the correct ALT0 (from Alt3 from mmc). Signed-off-by: Martin Sperl <[email protected]>
Remove clk_core from device tree as it is no longer used. Any "modification" to the core_clock in the bootloader is now automatically detected via the cnew clockmgr. Signed-off-by: Martin Sperl <[email protected]>
Revert the i2s-mmap dt overlay (7ee829f). Signed-off-by: DigitalDreamtime <[email protected]>
Moved uart0 to use new clock framework. At the same time removed the fixed clock clk_uart0 and the corresponding references, as the clock is now read directly from the configured clocks. If it ever becomes necessary the following can get added to modify the base clock rate later: assigned-clocks = <&clocks BCM2835_CLOCK_UART>; assigned-clock-rates = <X>; Signed-off-by: DigitalDreamtime <[email protected]>
Remove clk_core from device tree as it is no longer used. Any "modification" to the core_clock in the bootloader is now automatically detected via the cnew clockmgr. Signed-off-by: DigitalDreamtime <[email protected]>
On comment: imo the "bcm2835-i2s: REVERT the reverted patches" patch is slightly ugly - maybe just revert each of the reverts separately to document what actually happened instead of referencing in the comment. But it is up to @popcornmix to decide what he prefers to merge... Besides that I guess we should now be good enough to use the clock-framework for everything. This finally allows to use vc4 graphics together with i2s. If this works fine in 4.7, then it should also be possible to cherry-pick these patches in 4.4, but I guess that may be seen as too risky. |
here the quick branch that just did the reverts individually:
only replaces this: Note that: Note: I have not tested this yet - compile is running... @popcornmix: the question is: do you want a pull request of this patchset? |
@msperl Yes, I know. I was lazy with the "revert the reverts" patchset, bundling it into one commit. ;) @msperl I'm thinking I want to ask @popcornmix to also cherry-pick this 2b8dfa3 commit from rpi-4.4.y to rpi-4.7.y. What do you think? (I think any of the other Anholt clock commits are specific to his VC4 stuff and can wait until he rebases his 4.4 code to 4.7.) |
At some point after merging the reverts and "reverts of reverts" will be dropped. |
@popcornmix : Created #1629 with reverted reverts instead of the "bulk revert". Please choose which one you prefer to merge. |
@clivem : the patch by Eric with regards to DSI/PLL reconfig probably needs to get in when all those DSI patches go in. In principle I guess the next step would be for eric to update his VC4 patchset for 4.7, but I guess we should be able to cherry-pick the VC4 4.8 patches immediately:
I am not sure if there would be some need for some other (support) patches to make these really work... |
a quick check (individual cherry pick + conflict check + compile check) shows that this one does not apply cleanly:
so for the vc4 stuff eric needs to look into it... But anyway: this is outside the scope of this pull |
Yes, I'd rather stay well away from anything to do with vc4. I am not going to be able to do any testing with all of my "headless" configurations.... |
Closing, in favour of #1629 |
Placeholder.... This is what I think we have to merge to move all of the subsystems over to using clock manager in rpi-4.7.y.
@msperl I think this is turning more into a "loose ends" to have clock manager enabled by default, and move all of the subsystems over to using it, rather than an "backport upstream clockmgr/I2S" thing. I'm still testing, but I'm not seeing any issues at the moment.