-
Notifications
You must be signed in to change notification settings - Fork 8.2k
gpio: gd32: initial support #40676
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
gpio: gd32: initial support #40676
Conversation
|
@cameled FYI |
|
Hi @gmarull, can we add pin default value setting for output mode? like: zephyr/drivers/gpio/gpio_nrfx.c Line 214 in 38c42f6
spi cs_control need this feature to disable the slave device by default. |
Codecov Report
@@ Coverage Diff @@
## main #40676 +/- ##
==========================================
+ Coverage 51.12% 51.20% +0.08%
==========================================
Files 604 604
Lines 70771 70815 +44
Branches 16298 16313 +15
==========================================
+ Hits 36179 36262 +83
+ Misses 28642 28577 -65
- Partials 5950 5976 +26
Continue to review full report at Codecov.
|
done |
|
@nandojve would appreciate testing on F403, since it uses the AFIO model (implementation not validated on my side) |
9b66572 to
c95586c
Compare
e91e035 to
95362d3
Compare
Should be fixed now (tested on GD32VF103V-EVAL which has the same GPIO IP). |
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.
Comment to "drivers: gpio: gd32: initial version" mentions "TODO: Add support for interrupts.". However support for interrupts is already implemented. Could be corrected.
removed TODO, thanks for spotting |
nandojve
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.
GD32F403Z-EVAL all green
- samples/basic/blinky
- samples/basic/button
- tests/drivers/gpio/gpio_basic_api
- tests/drivers/gpio/gpio_api_1pin
|
@gmarull - can you please rebase and fix merge conflicts? |
done |
Add binding for the GigaDevice EXTI interrupt controller. Signed-off-by: Gerard Marull-Paretas <[email protected]>
Add DT node for EXTI (External Interrupt Controller). Only line interrupts added for now (used for GPIO interrupts). Signed-off-by: Gerard Marull-Paretas <[email protected]>
Add DT node for EXTI (External Interrupt Controller). Only line interrupts added for now (used for GPIO interrupts). Signed-off-by: Gerard Marull-Paretas <[email protected]>
Add initial support for the GigaDevice External Interrupt Controller. This driver is required to manage GPIO interrupts. Only EXTI lines 0 to 15 are supported for now (no LVD, RTC, etc.). Driver can be extended in the future to add support for extra EXTI lines. Signed-off-by: Gerard Marull-Paretas <[email protected]>
- The gpio dt-bindings were not included - gpio-controller property was not present in gpio nodes - number of gpio cells was not present in gpio nodes Signed-off-by: Gerard Marull-Paretas <[email protected]>
- The gpio dt-bindings were not included - gpio-controller property was not present in gpio nodes - number of gpio cells was not present in gpio nodes Signed-off-by: Gerard Marull-Paretas <[email protected]>
Add support for GigaDevice SYSCFG. Signed-off-by: Gerard Marull-Paretas <[email protected]>
Add node for the SYSCFG registers (required by the GPIO driver). Signed-off-by: Gerard Marull-Paretas <[email protected]>
Add GPIO driver for Gigadevice SoCs. The driver supports devices with the AF and AFIO models. Signed-off-by: Gerard Marull-Paretas <[email protected]>
Add definitions for board LEDs and keys now that a GPIO driver exists. The GPIO driver has also been enabled in the board defconfig, since it is required to run some basic samples (e.g. blinky). Signed-off-by: Gerard Marull-Paretas <[email protected]>
Add definitions for board LEDs and keys now that a GPIO driver exists. The GPIO driver has also been enabled in the board defconfig, since it is required to run some basic samples (e.g. blinky). Signed-off-by: Gerard Marull-Paretas <[email protected]>
Add DT overlay to run gpio_basic_api test on GD32F450I-EVAL board. In order to make testing easy a couple of accessible pins have been selected: PC6 and PC7, the last 2 pins on the DCI camera 2.54" header. Signed-off-by: Gerard Marull-Paretas <[email protected]>
Add DT overlay to run gpio_basic_api test on GD32F403Z-EVAL board. In order to make testing easy a couple of accessible pins have been selected: PD0 and PD1 pins exposed via P3 and P2 respectively. Signed-off-by: Gerard Marull-Paretas <[email protected]>
Disabling clock may conflict with concurrent usage of GPIOs and pins in AF mode. This can be improved once a proper clock control API is in place. Signed-off-by: Gerard Marull-Paretas <[email protected]>
This PR introduces a GPIO driver for GigaDevice SoCs, including AF (e.g. F4XX) and AFIO (e.g. F403) variants.
Tested on:
GD32F450I-EVAL
GD32VF103V-EVAL (not mainlined yet, https://github.com/teslabs/zephyr/tree/gpio-gd32-vf103)
GD32F403Z-EVAL (@nandojve)