You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by "Fishwaldo (via GitHub)" <gi...@apache.org> on 2026/09/06 13:02:59 UTC
[PR] arch/risc-v/eic7700x: Add CPU core clock control. [nuttx]
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: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] arch/risc-v/eic7700x: Add CPU core clock control. [nuttx]
Posted by "FelipeMdeO (via GitHub)" <gi...@apache.org>.
FelipeMdeO commented on PR #20065:
URL: https://github.com/apache/nuttx/pull/20065#issuecomment-5586029037
Hello @acassis , can you revert this PR temporarily, please?
Please check file `arch/risc-v/src/eic7700x/Kconfig`, it missed endline. Now I am facing issue to build:
```
$ git clone https://github.com/apache/nuttx.git
$ git clone https://github.com/apache/nuttx-apps.git apps
$ cd nuttx
$ git log --oneline -1
f17c6552 Documentation/rp2040: document fastboot_usb config for waveshare boards
$ ./tools/configure.sh sim:nsh
...
arch/risc-v/src/eic7700x/Kconfig:50: 'endif' in different file than 'if'
arch/risc-v/src/eic7700x/Kconfig:39: location of the 'if'
arch/risc-v/Kconfig:956: 'endif' in different file than 'if'
arch/risc-v/src/eic7700x/Kconfig:39: location of the 'if'
arch/risc-v/Kconfig:961: 'endif' in different file than 'if'
arch/risc-v/src/eic7700x/Kconfig:39: location of the 'if'
arch/Kconfig:257: 'endif' in different file than 'if'
arch/risc-v/src/eic7700x/Kconfig:39: location of the 'if'
Kconfig:2996: 'endmenu' in different file than 'menu'
arch/risc-v/src/eic7700x/Kconfig:39: location of the 'menu'
make: *** [tools/Unix.mk:756: olddefconfig] Error 1
ERROR: failed to refresh
```
--
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: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] arch/risc-v/eic7700x: Add CPU core clock control. [nuttx]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #20065:
URL: https://github.com/apache/nuttx/pull/20065#issuecomment-5559434348
<!-- membrowse-pr-comment -->
## <img src="https://membrowse.com/membrowse-logo.svg" height="24" align="top"> MemBrowse Memory Report
*No memory changes detected for:*
- [arduino-mega2560](https://membrowse.com/public/apache/nuttx/target/arduino-mega2560/compare?head=e74be9c1316384689437efb9dce24227c92da61b&base=05cc04e306b9fd8ddf898adb91a0a49f22c9789d)
- [esp32-devkitc](https://membrowse.com/public/apache/nuttx/target/esp32-devkitc/compare?head=e74be9c1316384689437efb9dce24227c92da61b&base=05cc04e306b9fd8ddf898adb91a0a49f22c9789d)
- [hifive1-revb](https://membrowse.com/public/apache/nuttx/target/hifive1-revb/compare?head=e74be9c1316384689437efb9dce24227c92da61b&base=05cc04e306b9fd8ddf898adb91a0a49f22c9789d)
- [mirtoo](https://membrowse.com/public/apache/nuttx/target/mirtoo/compare?head=e74be9c1316384689437efb9dce24227c92da61b&base=05cc04e306b9fd8ddf898adb91a0a49f22c9789d)
- [qemu-armv8a](https://membrowse.com/public/apache/nuttx/target/qemu-armv8a/compare?head=e74be9c1316384689437efb9dce24227c92da61b&base=05cc04e306b9fd8ddf898adb91a0a49f22c9789d)
- [qemu-intel64](https://membrowse.com/public/apache/nuttx/target/qemu-intel64/compare?head=e74be9c1316384689437efb9dce24227c92da61b&base=05cc04e306b9fd8ddf898adb91a0a49f22c9789d)
- [rx65n-rsk2mb](https://membrowse.com/public/apache/nuttx/target/rx65n-rsk2mb/compare?head=e74be9c1316384689437efb9dce24227c92da61b&base=05cc04e306b9fd8ddf898adb91a0a49f22c9789d)
- [s698pm-dkit](https://membrowse.com/public/apache/nuttx/target/s698pm-dkit/compare?head=e74be9c1316384689437efb9dce24227c92da61b&base=05cc04e306b9fd8ddf898adb91a0a49f22c9789d)
- [stm32-nucleo-f103rb](https://membrowse.com/public/apache/nuttx/target/stm32-nucleo-f103rb/compare?head=e74be9c1316384689437efb9dce24227c92da61b&base=05cc04e306b9fd8ddf898adb91a0a49f22c9789d)
--
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: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] arch/risc-v/eic7700x: Add CPU core clock control. [nuttx]
Posted by "acassis (via GitHub)" <gi...@apache.org>.
acassis merged PR #20065:
URL: https://github.com/apache/nuttx/pull/20065
--
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: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] arch/risc-v/eic7700x: Add CPU core clock control. [nuttx]
Posted by "acassis (via GitHub)" <gi...@apache.org>.
acassis commented on PR #20065:
URL: https://github.com/apache/nuttx/pull/20065#issuecomment-5586289239
> Hello @acassis , can you revert this PR temporarily, please?
>
> Please check file `arch/risc-v/src/eic7700x/Kconfig`, it missed endline. Now I am facing issue to build:
>
> ```
> $ git clone https://github.com/apache/nuttx.git
> $ git clone https://github.com/apache/nuttx-apps.git apps
> $ cd nuttx
> $ git log --oneline -1
> f17c6552 Documentation/rp2040: document fastboot_usb config for waveshare boards
>
> $ ./tools/configure.sh sim:nsh
> ...
> arch/risc-v/src/eic7700x/Kconfig:50: 'endif' in different file than 'if'
> arch/risc-v/src/eic7700x/Kconfig:39: location of the 'if'
> arch/risc-v/Kconfig:956: 'endif' in different file than 'if'
> arch/risc-v/src/eic7700x/Kconfig:39: location of the 'if'
> arch/risc-v/Kconfig:961: 'endif' in different file than 'if'
> arch/risc-v/src/eic7700x/Kconfig:39: location of the 'if'
> arch/Kconfig:257: 'endif' in different file than 'if'
> arch/risc-v/src/eic7700x/Kconfig:39: location of the 'if'
> Kconfig:2996: 'endmenu' in different file than 'menu'
> arch/risc-v/src/eic7700x/Kconfig:39: location of the 'menu'
> make: *** [tools/Unix.mk:756: olddefconfig] Error 1
> ERROR: failed to refresh
> ```
but the added Kconfig seems fine:
<img width="577" height="802" alt="image" src="https://github.com/user-attachments/assets/8c0d4c73-f961-40b2-aacb-44bba831552f" />
Probably the unpaired Kconfig is commit from other Kconfig, let's find it
--
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: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org