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

include/drivers/clock_control: stm32: Deprecate use of Kconfig #34761

Merged

Conversation

erwango
Copy link
Member

@erwango erwango commented May 3, 2021

Following introduction of dts based drier configuration (cf #34120,
#32609 and #34701), deprecate Kconfig symbols by generating a warning
when one of these symbols is used.

Requires prior merge of #34701

@github-actions github-actions bot added area: API Changes to public APIs platform: STM32 ST Micro STM32 labels May 3, 2021
@erwango erwango force-pushed the dev_stm32_dt_clocks_deprecate_kconfig branch from d7f7336 to f30991d Compare May 3, 2021 08:52
@erwango erwango requested review from ABOSTM and FRASTM May 3, 2021 08:52
@erwango erwango added this to the DV2.6 milestone May 3, 2021
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

@erwango
Copy link
Member Author

erwango commented May 3, 2021

DNM untill #34633 is closed

@erwango erwango added the DNM This PR should not be merged (Do Not Merge) label May 3, 2021
@erwango erwango assigned erwango and unassigned erwango May 3, 2021
@erwango
Copy link
Member Author

erwango commented May 3, 2021

@galak, @ABOSTM, I had to rework the solution, please have a new look.

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

@nashif nashif modified the milestones: DV2.6, v2.6.0 May 4, 2021
@erwango erwango force-pushed the dev_stm32_dt_clocks_deprecate_kconfig branch 2 times, most recently from 29ff0cc to 5bb00f8 Compare May 4, 2021 18:59
@galak
Copy link
Collaborator

galak commented May 4, 2021

@erwango Are we good to remove the DNM?

@erwango
Copy link
Member Author

erwango commented May 4, 2021

@erwango Are we good to remove the DNM?

Last missing piece would be #34744

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

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 <[email protected]>
Symbol CLOCK_STM32_HSE_CLOCK will remain in use in context of stm32
clock_control configuration using device tree, cf commit
a7989f6.

In preparation for next change, separate it from the others symbols
definition. Also make it non dependent from other Kconfig symbols.

Signed-off-by: Erwan Gouriou <[email protected]>
Add new symbol CLOCK_CONTROL_STM32_HAS_DTS to exclude definition
of other CLOCK_CONTROL_STM32_* symbols when dts based configuration
is in use.
CLOCK_CONTROL_STM32_HAS_DTS is defined based on availability of
"clocks" property in rcc node.

Signed-off-by: Erwan Gouriou <[email protected]>
Cortex-M4 stm32mp1 zephyr relies on chip Cortex-A for clock
configuration.
No change is then required for conversion to dts based clocks
configuration, but we do need to exclude use of newly deprecated
Kconfig symbols.

Signed-off-by: Erwan Gouriou <[email protected]>
In prts of the code, we use rcc node "clocks" property to testify the
use of device tree for clocks configuration.
This doesn't work in case of stm32h7 m4 targets as for those,
"upstream rcc" clock configuration, such as sysclk source selection,
is done on m7 core and hence rcc node doesn't have a "clocks"
property.
To work around this, use alternate "d1cpre" property in case of
stm32h7 targets.

Signed-off-by: Erwan Gouriou <[email protected]>
These were missing but not visible since value was defaulted
in Kconfig.
With Kconfig deprecation this breaks compilation.

Signed-off-by: Erwan Gouriou <[email protected]>
Fix definition condition for APB1 and APB2.
These were not visible until now as defaulted
in Kconfig.

Signed-off-by: Erwan Gouriou <[email protected]>
Along with other clocks settings, enable LSE clock using device tree.

Signed-off-by: Erwan Gouriou <[email protected]>
@erwango erwango force-pushed the dev_stm32_dt_clocks_deprecate_kconfig branch from 8d6eb29 to 7489ffd Compare May 5, 2021 12:55
@erwango erwango removed the DNM This PR should not be merged (Do Not Merge) label May 5, 2021
This board clock configuration was relying on default Kconfig
value for APB2 value, and hence apb2 has not been converted
to device tree.
Explicit apb2 value in dts.

Signed-off-by: Erwan Gouriou <[email protected]>
@erwango
Copy link
Member Author

erwango commented May 5, 2021

New CI Failures:

tests/drivers/build_all/sensors.build.i_z in frdm_k64f:tests/drivers/build_all/sensors.build
tests/drivers/build_all/sensors.build.i_z in disco_l475_iot1:tests/drivers/build_all/sensors.build
samples/sensor/max17262/sample.sensor.max17262 in nrf52840dk_nrf52840:samples/sensor/max17262/sample.sensor
tests/drivers/build_all/sensors.build.i_z in nucleo_wb55rg:tests/drivers/build_all/sensors.build

@galak galak merged commit 02ce386 into zephyrproject-rtos:master May 5, 2021
@erwango erwango deleted the dev_stm32_dt_clocks_deprecate_kconfig branch January 27, 2022 13:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants