-
Notifications
You must be signed in to change notification settings - Fork 7.6k
soc: rpi_pico: Set the default SYS_CLOCK_HW_CYCLES_PER_SEC from dt #90893
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR updates how SYS_CLOCK_HW_CYCLES_PER_SEC is defined by switching from board-specific hardcoded values to a devicetree-based default. The changes add new devicetree variable assignments and configuration settings for Raspberry Pi Pico SOCs while removing the static definitions from various board defconfig files.
Reviewed Changes
Copilot reviewed 16 out of 16 changed files in this pull request and generated 2 comments.
Show a summary per file
File | Description |
---|---|
soc/raspberrypi/rpi_pico/rp2350/Kconfig.defconfig | Adds dt-based default for SYS_CLOCK_HW_CYCLES_PER_SEC using the dt_nodelabel_path and dt_node_int_prop_int macros. |
soc/raspberrypi/rpi_pico/rp2040/Kconfig.defconfig | Similar update to use the devicetree value for SYS_CLOCK_HW_CYCLES_PER_SEC. |
boards/wiznet/w5500_evb_pico2/Kconfig.defconfig | Removes the hardcoded SYS_CLOCK_HW_CYCLES_PER_SEC value. |
boards/wiznet/w5500_evb_pico/w5500_evb_pico_defconfig | Removes static clock frequency definition to rely on the new dt-based approach. |
boards/waveshare/rp2040_zero/rp2040_zero_defconfig | Deletes the static SYS_CLOCK_HW_CYCLES_PER_SEC setting. |
boards/sparkfun/pro_micro_rp2040/sparkfun_pro_micro_rp2040_defconfig | Removes the board-specific clock definition. |
boards/seeed/xiao_rp2040/xiao_rp2040_defconfig | Eliminates the static SYS_CLOCK_HW_CYCLES_PER_SEC. |
boards/raspberrypi/rpi_pico2/rpi_pico2_rp2350a_m33_defconfig | Hardcoded clock value is removed in favor of using the devicetree source. |
boards/raspberrypi/rpi_pico/rpi_pico_rp2040_w_defconfig | Removes the static configuration for SYS_CLOCK_HW_CYCLES_PER_SEC. |
boards/raspberrypi/rpi_pico/rpi_pico_defconfig | Eliminates the board-specific clock frequency definition. |
boards/pimoroni/pico_plus2/pico_plus2_rp2350b_m33_defconfig | Removes the explicit clock value setting. |
boards/kws/pico_spe/pico_spe_defconfig | Deletes the hardcoded SYS_CLOCK_HW_CYCLES_PER_SEC line. |
boards/kws/pico2_spe/pico2_spe_rp2350a_m33_defconfig | Removes the static definition to follow the dt-based approach. |
boards/adafruit/qt_py_rp2040/adafruit_qt_py_rp2040_defconfig | Deletes the board-specific clock frequency setting. |
boards/adafruit/macropad_rp2040/adafruit_macropad_rp2040_defconfig | Removes the hardcoded clock value to utilize the global devicetree default. |
boards/adafruit/kb2040/adafruit_kb2040_defconfig | Eliminates the static clock frequency configuration. |
Comments suppressed due to low confidence (2)
boards/wiznet/w5500_evb_pico2/Kconfig.defconfig:13
- Adding a clarifying comment in the defconfig to note that the SYS_CLOCK_HW_CYCLES_PER_SEC value is now sourced from the devicetree could help future maintainers.
-CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC
boards/adafruit/qt_py_rp2040/adafruit_qt_py_rp2040_defconfig:1
- Consider adding documentation in this defconfig to mention that the clock frequency is now managed through the devicetree instead of a static value.
-CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC=125000000
ef6b4ad
to
4a7e53e
Compare
SYS_CLOCK_HW_CYCLES_PER_SEC
default value from devicetree4a7e53e
to
3468a31
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
3468a31
to
93f7205
Compare
CI was failed, but it is not related this PR. |
Avoid the individual `CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC` for each board instead to referencing the dt value. Signed-off-by: TOKITA Hiroshi <[email protected]>
93f7205
to
770f674
Compare
|
Avoid the individual
CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC
for each board instead to referencing the dt value.Note: CI has a problem. We need to address #90896 first.