Harald Welte escreveu:
>> I plan to work next on the USB gadget driver (which not only has a
>> minimum required frequency according to the datasheet but also for some
>> reason misbehaves if in use during a frequency transition).
>> Both Sound and USB derive their clocks from the UPLL, not the MPLL. USB
> depends on a 48MHz clock in order to operate at all.
There are two issues with the USB device in GTA01:
- The datasheet for some reason says PCLK should be more than 20MHz
- When I try testing cpufreq with USB plugged and try to change the
frequencies via ssh over USB ("echo 202800 > scaling_setspeed"), the USB
on the GTA01 locks up and only recovers after a reset. Setting the
frequency with the USB unplugged and plugging it later (even if at a
different frequency) works fine.
> So unless we suspend to RAM, I think the UPLL should be kept running at
> its original speed. cpufreq should only touch MPLL.
It would be good for power saving reasons to turn the UPLL off if
nothing is using it (bluetooth disabled, not connected to the host;
GTA01 AFAIK cannot use UPLL for the sound).
> Please note that there are some intrinsic dependencies, i.e. the Samsung
> docs state that you should not set only one of the two PLLs, but always
> both together. I've ran into quite some strange problems.
> Interestingly, for me setting the PLL's in the opposite order of what
> samsung recommends worked better than the other way around.
I don't recall seeing that on the datasheet; I will see if I can find
something about that later.
>> Comments and suggestions are welcome. More information on the correct
>> formula for the PLL lock time would also be good.
>> What exactly is your question with regard to the PLL lock time? Maybe I
> can help.
See s3c2410_get_transition_latency() and
s3c2442_get_transition_latency(). Both try to find out how long will it
take for the PLL lock time to pass (on GTA01 only to tell the cpufreq
core the transition latency, on GTA02 also to know how long to wait
after turning on the PLL before it can be used). However, the formula
used is pure guesswork (I'm guessing it counts cycles from the 12MHz input).
--
Cesar Eduardo Barros
cesarb at cesarb.netcesar.barros at gmail.com