-
Notifications
You must be signed in to change notification settings - Fork 8.2k
soc: riscv: openisa: rv32m1: add pinctrl support #45274
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
soc: riscv: openisa: rv32m1: add pinctrl support #45274
Conversation
henrikbrixandersen
commented
May 2, 2022
- Add pinctrl support to the OpenISA RV32M1 SoC
- Add pinctrl support to the OpenISA RV32M1 peripheral drivers (lpuart, lpi2c, lpspi, tpm)
- Convert the OpenISA VEGAboard from pinmux to pinctrl
55defdb to
8fa5d30
Compare
|
Note: As I do not have access to a machine parseable list of the allowed pin MUX settings, I have left out the otherwise recommended |
662cd71 to
38d4fd3
Compare
gmarull
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.
lgtm, a few minor comments
38d4fd3 to
811b09e
Compare
Add OpenISA RV32M1 pinctrl header file to define SoC specific pinctrl_soc_t structure. This is used to store pin configurations for the pinctrl driver. Signed-off-by: Henrik Brix Andersen <[email protected]>
Add pinctrl devicetree bindings for the OpenISA RV32M1. Signed-off-by: Henrik Brix Andersen <[email protected]>
Add OpenISA RV32M1 pinctrl driver. Signed-off-by: Henrik Brix Andersen <[email protected]>
The OpenISA RV32M1 pinctrl groups need a dummy pinctrl node to populate with pinctrl options at the board level. Signed-off-by: Henrik Brix Andersen <[email protected]>
Set the PCR[MUX] field to kPORT_MuxAsGpio as part of configuring a GPIO pin. This removes the need to explicitly call pinmux_pin_set() in board code. Signed-off-by: Henrik Brix Andersen <[email protected]>
Add pinctrl support to the OpenISA RV32M1 LPUART serial driver. Signed-off-by: Henrik Brix Andersen <[email protected]>
Add pinctrl support to the OpenISA RV32M1 LPI2C I2C driver. Signed-off-by: Henrik Brix Andersen <[email protected]>
Add pinctrl support to the OpenISA RV32M1 LPSPI SPI driver. Signed-off-by: Henrik Brix Andersen <[email protected]>
Add pinctrl support to the OpenISA RV32M1 TPM PWM driver. Signed-off-by: Henrik Brix Andersen <[email protected]>
Convert the OpenISA RV32M1 VEGAboard from pinmux to pinctrl. Signed-off-by: Henrik Brix Andersen <[email protected]>
Remove the default pinmux Kconfig configuration from the OpenISA RV32M1 SoC. Signed-off-by: Henrik Brix Andersen <[email protected]>
811b09e to
05ccb61
Compare
Exactly why I am not making it optional. The hardware default is "fast", but likely many pins should be configured for "slow". I do not like putting in a DTS default that does not match the hardware default. By making this property required, users are required to consider if the slew rate should be "fast" or "slow". This is equivalent to the NXP Kinetis pinctrl binding, by the way, on which this is based:
|
Codecov Report
@@ Coverage Diff @@
## main #45274 +/- ##
=======================================
Coverage 49.86% 49.86%
=======================================
Files 643 643
Lines 80617 80626 +9
Branches 18933 18933
=======================================
+ Hits 40197 40206 +9
Misses 33757 33757
Partials 6663 6663
Continue to review full report at Codecov.
|