ChanServ changed the topic of #linux-rockchip to: Rockchip development discussion
kevery has joined #linux-rockchip
stikonas has quit [Read error: Connection reset by peer]
dliviu has quit [Ping timeout: 265 seconds]
dliviu has joined #linux-rockchip
<macromorgan>
clocks are making my eyes tired. Do you know an easy way to dump the children names for a given parent from the clk subsystem?
<macromorgan>
I think for now I'll just submit this fix upstream minus the phy-supply node... 2 seconds of wonky USB will have to wait to be resolved until this clock thing can be solved
<macromorgan>
does the fact that usb480m is marked as a protected clock and also appears to be a child of usb480m-phy which tries to get disabled matter?
<macromorgan>
i.e. we're trying to disable the parent of a critical clock?
<macromorgan>
answered my own question... that's the problem
<macromorgan>
so usb480m is a critical clock. Assume it's an orphan until its parent usb480_phy gets enabled; after which I can confirm it prevents usb480_phy from getting disabled (I removed usb480m as a critical clock and the error went away).
<macromorgan>
I'm pretty sure usb480m is in fact a critical clock since it's also used by the GPU for some reason... so I'm wondering if there's a way to reparent the clock when we try to disable its parent (or drop it back to "orphan" temporarily)
kevery has quit [Read error: Connection reset by peer]
kevery1 is now known as kevery
<eballetbo>
Thanks wens, we will give a try
archetyp has joined #linux-rockchip
<punit>
wrt RK3399 ethernet issue.. I compared /sys/kernel/debug/clk/clk_summary between a working and a broken kernel
<punit>
The only difference is in the prepare and enable counts of "clk_usbphy[01]_480m"
<punit>
I don't see how the usb clocks are related to the gmac. Any ideas?
<punit>
mriesch: Thanks for the patches. They don't seem to help though. :(
<mriesch>
punit: well it would have been a lucky shot... thanks for testing
<mriesch>
once we found the actual cause of this bug we can take again a look at those patches, i think they do clean up the glue driver a bit
<punit>
Ack, it can definitely use some cleanup.
<mriesch>
as to the differences in clk_summary: interesting, but is this clock somehow related to ethernet at all?
mps has quit [Ping timeout: 268 seconds]
<punit>
I couldn't find any relation in the documentation or the device tree.
<punit>
But it's suspicious as it's the only difference with your patch
<punit>
There are ~450+ odd clocks in there...
<mriesch>
interestingly there was a discussion about this clock (or at least one with a similar name) in this channel earlier this day
<punit>
Thanks for the pointer I had missed that. The mention of usbphy480m being used for unrelated functions seems interesting
<punit>
macromorgan: Maybe /sys/kernel/debug/clk/clk_summary is what you're looking for
<macromorgan>
yes, seems our problems are somehow related?
<macromorgan>
the issue I have is that the usb480m clock is marked as critical and is also a child of the usb480m_phy clock. When the usb PHY driver tries to undo setting the clock because it's not ready to fully probe yet it can't because of the critical child
<pgwipeout[m]>
On a fun note, I played around with this a bit. I found if I run `pm_runtime_put_sync(dev);` after `pm_runtime_get_sync(dev);` in the offending code path it hard locks, but adding `pm_runtime_disable(dev);` removes the unbalanced enable warning.
<pgwipeout[m]>
So something starts talking as soon as `pm_runtime_get_sync(dev);` fires.
<punit>
macromorgan: are you also looking at rk3399? Crazy co-incidence
<macromorgan>
no, PX30
<macromorgan>
(actually RK3326, but what's the difference aside from a VOPL?)
<punit>
I know nothing about either - px30 or rk3326, except that a clock named usb480m is causing trouble there :-D
<macromorgan>
yep
<macromorgan>
not a lot of trouble, just making a warning
<macromorgan>
but still, I like my dmesg log not full of crap
* punit
nods
<pgwipeout[m]>
Looking at the clocks only a few things of interest: `clk_usbphy_480m` can be a parent of `upll`, I wonder if that's set correctly. We have `clk_hsicphy` who's parent is also `clk_usbphy_480m`
mps has joined #linux-rockchip
<punit>
Hmm... both upll and clk_hsicphy don't seem to circle back to gmac afaict
kevery has quit [Quit: kevery]
stikonas has quit [Remote host closed the connection]
stikonas has joined #linux-rockchip
mps has quit [Ping timeout: 252 seconds]
mps has joined #linux-rockchip
stikonas has quit [Remote host closed the connection]
stikonas has joined #linux-rockchip
chewitt has joined #linux-rockchip
vagrantc has joined #linux-rockchip
lurchi__ has joined #linux-rockchip
lurchi_ has quit [Ping timeout: 268 seconds]
lurchi__ has quit [Ping timeout: 265 seconds]
lurchi__ has joined #linux-rockchip
norris has joined #linux-rockchip
<macromorgan>
fuck it... I can make the USB work fine if I also add regulator-boot-on and don't add the phy-supply. I'll just do that for now and note why in the patch notes, I'll leave this clock craziness for some time when I am bored or for someone who is smarter than I (basically everyone)
<norris>
eballetbo: I hear you were talking about me? (I mean, bugs I'm looking at, regarding MIPI displays?) sorry, I forgot to sign back in here post freenode-fiasco
<norris>
the answer to your question is yes, it's definitely a known issue, but I don't know _who_ all knows :) if you're willing to stomach a google account, this is open for reading: https://issuetracker.google.com/195913664
<norris>
I believe things work if you build as a module, instead of built-in