Fishwaldo opened a new pull request, #20065:
URL: https://github.com/apache/nuttx/pull/20065

   ## Summary
   
   A driver for the speed of the four application cores. It sets the rate to any
   of the operating points the vendor validates, and reports the rate at start 
up:
   
   ```
   [CPU0] cpu: measured 1399 MHz, clock tree says 1400 MHz
   ```
   
   Every operating point shares a core voltage, so this touches no regulator.
   
   ## How the rate is set
   
   The cores run from the PLL being reprogrammed, so they park on a slower clock
   first, through a selector the vendor names as glitch free. While parked the 
PLL
   is stopped, given new dividers, restarted and watched until it locks. If it
   never locks the cores stay parked: returning them to an unlocked PLL does not
   fail safely.
   
   **Above a gigahertz the bus ratio must be two to one before the cores 
return**,
   because the bus fabric does not reach beyond about eight hundred megahertz. 
The
   mux is therefore moved before the ratio. That ordering is the one step in the
   sequence software cannot recover from, and it is commented as such at the 
site.
   
   ## How the rate is read
   
   Measured, not derived: the cores are counted against the crystal derived time
   counter, because the manual and the vendor's code number the CPU PLL's 
outputs
   differently. The measurement is reported beside what the clock tree computes 
so
   the two can be compared on any board.
   
   Two consequences for `eic7700x_clk.c`: the core selector's parent is
   `cpupll_fout1`, and the three CPU PLL outputs are `CLK_GET_RATE_NOCACHE`, 
since
   this driver reprograms that PLL at run time and the framework computes rates
   from the registers.
   
   ## Testing
   
   Built with `-Wno-cpp -Werror` for `eic7700-evb:nsh`, and booted on the ESWIN
   EIC7700 EVB, where the measurement reads 1399 to 1400 MHz against a tree that
   computes 1400.
   
   `tools/checkpatch.sh -c -u -m -g master..HEAD` passes.
   
   Depends on nothing; the clock tree merged as #19865.
   
   It is a prerequisite for the EIC7700X devfreq driver, which follows in its
   own PR and calls `eic7700x_cpuclk_setrate()` to give the thermal governor
   something to slow down.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to