-
Notifications
You must be signed in to change notification settings - Fork 6.9k
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
drivers: pinctrl: stm32: fix F1 SWJ_CFG application #43605
Merged
carlescufi
merged 6 commits into
zephyrproject-rtos:main
from
GeorgeCGV:rework_f103_pin_remap
Mar 16, 2022
Merged
drivers: pinctrl: stm32: fix F1 SWJ_CFG application #43605
carlescufi
merged 6 commits into
zephyrproject-rtos:main
from
GeorgeCGV:rework_f103_pin_remap
Mar 16, 2022
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
df0396d
to
416640e
Compare
erwango
reviewed
Mar 10, 2022
erwango
reviewed
Mar 10, 2022
FRASTM
reviewed
Mar 11, 2022
Removed SWJ_CFG initialization. The functionality is moved into pinctrl / pinmux modules. Signed-off-by: Georgij Cernysiov <[email protected]>
The Serial Wire JTAG configuration is moved to F1 pinctrl DTS. The configuration in GPIO didn't apply to the majority of the STM MCUs except F1. Signed-off-by: Georgij Cernysiov <[email protected]>
29b5490
to
1b446bf
Compare
erwango
requested changes
Mar 14, 2022
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.
Some minor comments, otherwise lgtm
erwango
reviewed
Mar 14, 2022
Adds 'swj-cfg' property to the F1 pinctrl. It is an optional property that allows to control Serial Wire JTAG configuration. Different configurations allow to free certain IO pins that can be used in remap or standalone. That replaces previously used Kconfig approach. Signed-off-by: Georgij Cernysiov <[email protected]>
c18fdca
to
f601aec
Compare
erwango
requested changes
Mar 14, 2022
- Move SWJ_CFG initialization into pinctrl. - Don't disable the AFIO clock after SWJ_CFG initialization. - Apply '111' to the SWJ_CFG bits upon remap application, that fixes the remap usage. Signed-off-by: Georgij Cernysiov <[email protected]>
- Move SWJ_CFG initialization into pinmux. - Don't disable the AFIO clock after SWJ_CFG initialization. - Apply '111' to the SWJ_CFG bits upon remap application, that fixes the remap usage. Signed-off-by: Georgij Cernysiov <[email protected]>
STM32 F1 SWJ_CFG Kconfig options were removed in favor of pinctrl/pinmux device tree properties. Signed-off-by: Georgij Cernysiov <[email protected]>
f601aec
to
7e961bb
Compare
FRASTM
approved these changes
Mar 14, 2022
erwango
approved these changes
Mar 15, 2022
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
area: Devicetree Binding
PR modifies or adds a Device Tree binding
area: Devicetree
area: Documentation
area: GPIO
area: Pinctrl
area: Pinmux
platform: STM32
ST Micro STM32
Release Notes
To be mentioned in the release notes
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Based on
LL
andHAL
libraries the value ofAFIO_MAPR_SWJ_CFG
has to be applied to theMAPR
upon enabling of a remap. That solved the issue of a not working SPI 1 remap on F103VC and allowed it to be debuggable when theCONFIG_GPIO_STM32_SWJ_NOJTAG
option is enabled.The SWJ CFG initialization into
pinctrl
/pinmux
(deprecated) modules.Kconfig SWJ options were moved into F1
pinctrl
/pinmux
DTS.Fixes #43452
Fixes #43640
Signed-off-by: Georgij Cernysiov [email protected]