Skip to content
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

stm32h7: Transition clock configuration from Kconfig to device tree #34701

Merged
merged 6 commits into from May 3, 2021

Conversation

erwango
Copy link
Member

@erwango erwango commented Apr 29, 2021

Similarly to #34120, convert stm32h7 clock_control driver to the use of device tree for clocks configuration

EDIT:
Includes #34704 to avoid CI related issues

@FRASTM FRASTM changed the title stm32h7: Transition clock conffiguration from Kconfig to device tree stm32h7: Transition clock configuration from Kconfig to device tree Apr 29, 2021
@FRASTM
Copy link
Collaborator

FRASTM commented Apr 29, 2021

About H7 and clock device tree there any link with the #34691, I mean is it one still valid after "stm32h7: Transition clock configuration from Kconfig to device tree" ?

@erwango
Copy link
Member Author

erwango commented Apr 29, 2021

About H7 and clock device tree there any link with the #34691, I mean is it one still valid after "stm32h7: Transition clock configuration from Kconfig to device tree" ?

The one that gets merged first will need to take the other one into account.
For now, #34691 is missing some important bits like code using these symbols.

dts/arm/st/h7/stm32h7.dtsi Show resolved Hide resolved
compatible = "st,stm32-hse-clock";
/* H7 clock driver may not always need this value */
/* but it is required by the binding */
clock-frequency = <DT_FREQ_M(25)>;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why setting 25MHz then ? Even if not used here, most of the stm32h7 have `clock-frequency = <DT_FREQ_M(8)>;``

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

25MHz is value of HSE_VALUE provided by Cube HAL

dts/bindings/clock/st,stm32h7-rcc.yaml Show resolved Hide resolved
dts/bindings/clock/st,stm32h7-rcc.yaml Outdated Show resolved Hide resolved
include/drivers/clock_control/stm32_clock_control.h Outdated Show resolved Hide resolved
@github-actions github-actions bot added area: API Changes to public APIs area: Devicetree Binding PR modifies or adds a Device Tree binding area: Networking area: Tests Issues related to a particular existing or missing test labels Apr 29, 2021
@erwango erwango requested review from ABOSTM and FRASTM April 29, 2021 15:01
Copy link
Collaborator

@ABOSTM ABOSTM left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Collaborator

@ABOSTM ABOSTM left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Commit message typo :
board: nucleo_h723zg: Convert to dts based clock configuration

@erwango
Copy link
Member Author

erwango commented Apr 29, 2021

Commit message typo :
board: nucleo_h723zg: Convert to dts based clock configuration

Fixed, txs

@erwango erwango requested a review from ABOSTM April 29, 2021 16:41
Copy link
Collaborator

@ABOSTM ABOSTM left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Add clocks related stm32h7 specific bindings:
- stm32h7-hsi-clock
- stm32h7-pll-clock
- stm32h7-rcc

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
Add clock nodes for stm32h7 devices.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
Add required macros to introduce dts based clock_control driver
configuration on stm32h7 devices.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
Update stm32h7 clock_control driver to make use of macros allowing
dts based configuration in coexistance with existing Kconfig method.

Note: Use of IS_ENABLED is removed as it generates warnings in
checkpatch. This checkpatch behavior needs to be reviewed but may
first require a little clean up of IS_ENABLED macro.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
Configure board clocks using device tree.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
Configure board clocks using device tree.

Bus clocks configuration part is kept common to both cores.
On core dedicated configuration we find:
- Specific sysclock freq on both cores
- Sysclk input clock selection on M7 core only (as per existing
clock_control driver behavior).

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
@carlescufi carlescufi merged commit aab7faf into zephyrproject-rtos:master May 3, 2021
erwango added a commit to erwango/zephyr that referenced this pull request May 5, 2021
Following introduction of dts based driver configuration (cf zephyrproject-rtos#34120,
zephyrproject-rtos#32609 and zephyrproject-rtos#34701), deprecate Kconfig symbols by generating a warning
when one of these symbols is used.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
galak pushed a commit that referenced this pull request May 5, 2021
Following introduction of dts based driver configuration (cf #34120,
#32609 and #34701), deprecate Kconfig symbols by generating a warning
when one of these symbols is used.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
@erwango erwango deleted the dev_dt_clocks_h7 branch January 19, 2024 14:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: API Changes to public APIs area: Boards area: Clock Control area: Devicetree Binding PR modifies or adds a Device Tree binding area: Devicetree area: Networking area: Tests Issues related to a particular existing or missing test platform: STM32 ST Micro STM32
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants