-
Notifications
You must be signed in to change notification settings - Fork 8.2k
Add Atmel SAM0 pinctrl #35423
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
Add Atmel SAM0 pinctrl #35423
Conversation
6331721 to
ebd12fb
Compare
|
The compliance check didn't detect some Macro construction. It is a well know problem. |
ebd12fb to
3820e76
Compare
|
rebase |
3820e76 to
849a19e
Compare
|
Hi @mnkp , I made apply some changes as requested. I implement a variable length macro to explicit assign pin to an peripheral. It allows add any other GPIO flag. It only add flexibility at pin definition. |
849a19e to
27c15ba
Compare
mnkp
left a comment
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.
Looks good. So, should we change soc_gpio.c to soc_port.c and change the prefix of the functions in the file?
27c15ba to
2c674c8
Compare
|
We could update commit message of the first commit. It still refers to |
Yes, this confirm that I need one week vacation heheh. |
2c674c8 to
2d0b362
Compare
|
@galak The PR looks good, we could merge it, but it requires approval from one more reviewer. |
2d0b362 to
985915a
Compare
|
Rebased on main just to make sure this still passes CI. |
Introduce soc_port common functions. The sam0 pinmux driver was refactored to use soc_port_pinmux_set common function. This create the common base to implement sam0 pinctrl functions. Signed-off-by: Gerson Fernando Budke <[email protected]>
Add Atmel sam0 MCU series pinctrl devicetree bindings and infrastructure. Signed-off-by: Gerson Fernando Budke <[email protected]>
Add Atmel sam0 sercom[uart] pinctrl bindings and implements pinctrl at driver level. It changes all sam0 boards to use new feature and remove pinmux driver dependency for sercom[uart]. The samples that require a binding were update to keep consistency and avoid errors. Signed-off-by: Gerson Fernando Budke <[email protected]>
985915a to
7c91f46
Compare
Sure, thank you Kumar! |
Atmel SAM already uses pinctrl feature but SAM0 doesn't have support. This refactor pinmux driver to use a new common SoC gpio methods. It add the gpio and pinctrl devicetree bindings structures and macros.
As part of this PR sercom[uart] driver was enhanced to use pinctrl. All sercom[uart] configuration for sam0 boards were updated to use pinctrl and pinmux entries were removed. Some samples were altered to allow consistency.
Tested with SAMR21.