Page MenuHomeFreeBSD

[PATCH 1/7] clk/allwinner: fixes and the A64 display clocks
Needs ReviewPublic

Authored by vice-shore-grid_duck.com on Fri, Oct 16, 8:38 PM.
Tags
Referenced Files
Unknown Object (File)
Mon, Oct 19, 3:59 AM
Unknown Object (File)
Sun, Oct 18, 1:05 AM
Unknown Object (File)
Sun, Oct 18, 1:05 AM
Unknown Object (File)
Sat, Oct 17, 2:21 AM
Unknown Object (File)
Sat, Oct 17, 1:48 AM
Unknown Object (File)
Sat, Oct 17, 1:35 AM
Unknown Object (File)
Sat, Oct 17, 1:03 AM
Unknown Object (File)
Sat, Oct 17, 12:58 AM
Subscribers

Details

Reviewers
andrew
manu
Group Reviewers
arm64
Summary

Changes to the Allwinner clock drivers needed to run the A64 display
pipeline (DE2 mixer, TCON0, MIPI DSI, D-PHY), two of them plain bugs
that affect any consumer of the clocks involved.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

manu requested changes to this revision.Sun, Oct 18, 6:48 AM
manu added a subscriber: manu.

Please upload diff with full context.

sys/dev/clk/allwinner/ccu_a64.c
662

tcon0 is cleary a MUX clock, why would you change this ? (See 3.3.5.42. TCON0 Clock Register from the A64 User Manual)

728

parent 01 is invalid for dsi, so it should be : {"pll_video0", NULL, "pll_periph0"}
Other part seems correct

This revision now requires changes to proceed.Sun, Oct 18, 6:48 AM

Fix context size + dsi_dphy_parents definition.

vice-shore-grid_duck.com marked an inline comment as done and an inline comment as not done.Sun, Oct 18, 9:01 PM
vice-shore-grid_duck.com added inline comments.
sys/dev/clk/allwinner/ccu_a64.c
662

That's because it's gated, so clk_enable has no effect on it, so it remains in the state that the firmware left it - which on the PineTab is "disabled".

Now, I'm aware that there is a similar pattern with e.g. i2s, where there's a MUX_CLK and a CCU_GATE construction, and the gate child carries the id. But the device tree dtb (inherited from Linux and/or u-boot) assigns the parents to the mux. Then when clk_set_assigned is called, it gets the gate node, looks for pll_mipi which isn't a parent node of the gate, but of the mux. So it can't find the parent.

What I can do, is either create a MUX_GATE_CLK macro for this specific use case, or add a more detailed comment explaining the issue and keep using `M_CLK. Unless you have a better suggestion?

vice-shore-grid_duck.com retitled this revision from [PATCH 1/5] clk/allwinner: fixes and the A64 display clocks to [PATCH 1/7] clk/allwinner: fixes and the A64 display clocks.Tue, Oct 20, 6:23 AM