ChanServ changed the topic of #linux-rockchip to: Rockchip development discussion
<pgwipeout[m]>
Someone suspected that the grf clock wasn't being enabled, as such the grf wasn't being updated with the delay values.
<pgwipeout[m]>
Ohhhhhh
<pgwipeout[m]>
They are different drivers.
<pgwipeout[m]>
We ran into this issue when porting, the rk356x is gmac4 core, where the rk3399 and previous used the older core.
<pgwipeout[m]>
Okay I know what's wrong
<pgwipeout[m]>
The rgmii delays are set on calling runtime powerup.
<pgwipeout[m]>
They should be set during initial probe.
<pgwipeout[m]>
They aren't seeing the issue because we have been flirting with rgmii-id mode on rk356x.
<pgwipeout[m]>
I'll move the delay set into a separate function that can be called during probe then again during runtime power enable (to cover resuming from sleep when grf may have been lost).
<pgwipeout[m]>
Never mind, powerup is already called during probe, continuing.
<pgwipeout[m]>
Oh, wow.
<pgwipeout[m]>
So during probe we called rk_gmac_powerup, which set the ids. During rk_gmac_powerup runtime_pm was enabled then synced, which called rk_gmac_resume. It would check if suspended was set, which it isn't, then calls stmmac_resume, which sets up everything, before we call stmmac_dvr_probe to actually set everything up.
<pgwipeout[m]>
So uh, if this broke rk3399 by taking this away, there's something much deeper that's broken here.
<pgwipeout[m]>
Why are the usbdrd devices the only devices that take a reference to the grf clock?
kevery has joined #linux-rockchip
<punit>
I too suspected that rk_gmac_resume() was reached indirectly when pm_runtime_get_sync() is called but some tracing suggests that's not the case.
<pgwipeout[m]>
I'll have to poke a few places in the code tomorrow. I still suspect the delays are the issue here, but how or why isn't obvious to my exhausted brain.
<punit>
Ack - I'll pick up where I left off later in the evening
vagrantc has quit [Quit: leaving]
kevery1 has joined #linux-rockchip
kevery has quit [Ping timeout: 244 seconds]
kevery1 is now known as kevery
archetyp` has joined #linux-rockchip
archetyp has quit [Ping timeout: 250 seconds]
lurchi_ has joined #linux-rockchip
lurchi__ has quit [Ping timeout: 240 seconds]
archetyp` has quit [Quit: Leaving]
alpernebbi has joined #linux-rockchip
matthias_bgg has joined #linux-rockchip
kevery1 has joined #linux-rockchip
kevery has quit [Ping timeout: 252 seconds]
kevery1 is now known as kevery
kevery1 has joined #linux-rockchip
kevery has quit [Ping timeout: 245 seconds]
kevery1 is now known as kevery
chewitt has joined #linux-rockchip
kevery1 has joined #linux-rockchip
kevery has quit [Ping timeout: 252 seconds]
kevery1 is now known as kevery
archetyp has joined #linux-rockchip
ServerStatsDisco has quit [Quit: Bridge terminating on SIGTERM]
MatrixTravelerbo has quit [Quit: Bridge terminating on SIGTERM]
amstan has quit [Quit: Bridge terminating on SIGTERM]
psydroid has quit [Quit: Bridge terminating on SIGTERM]
samueldr has quit [Quit: Bridge terminating on SIGTERM]
LinuxHackerman has quit [Quit: Bridge terminating on SIGTERM]
pgwipeout[m] has quit [Quit: Bridge terminating on SIGTERM]
csrpi[m] has quit [Quit: Bridge terminating on SIGTERM]
psydroid has joined #linux-rockchip
amstan has joined #linux-rockchip
samueldr has joined #linux-rockchip
LinuxHackerman has joined #linux-rockchip
pgwipeout[m] has joined #linux-rockchip
MatrixTravelerbo has joined #linux-rockchip
ServerStatsDisco has joined #linux-rockchip
csrpi[m] has joined #linux-rockchip
kevery has quit [Quit: kevery]
<CounterPillow>
I recommend rewriting anything that looks like it's abusing resume callbacks for initial enablement, the I2S/TDM driver did this and I just rewrote all that code instead of trying to understand whether it was technically correct.
<punit>
In this case it looks like the resume callbacks lead to enabling the associated power domain - which now occur later(?) and cause problems.
<punit>
Hopefully somebody looking at this can pick up from there...
matthias_bgg has quit [Ping timeout: 245 seconds]
vagrantc has joined #linux-rockchip
<pgwipeout[m]>
I'm building the current kernel for experimentation now.
crabbedhaloablut has quit [Quit: No Ping reply in 180 seconds.]
crabbedhaloablut has joined #linux-rockchip
alpernebbi has quit [Quit: alpernebbi]
warpme_ has quit [Quit: Connection closed for inactivity]
crabbedhaloablut has quit [Remote host closed the connection]