Exclude the mps2_an385/mps2_an521 as we try to run on qemu and that
doesnt support the GPIO/LED so the tests will fail. For now exclude
the platform completely until we can just do a sim run exclusion.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
gpio_pin_interrupt_configure() is invoked from within
gpio_pin_configure() to support legacy code that combines pin and
interrupt configuration. Expressing a disabled interrupt by a zero
value for interrupt flags causes this invocation to disable interrupts
when the intent is to change only a pin configuration, such as pull
direction.
Support a distinction between explicitly disabling interrupts and
leaving the interrupt configuration unchanged.
Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
gpio_pin_interrupt_configure() verified that the pin was within range,
while gpio_pin_configure() did not. Make them consistent since they
take the same set of flags.
Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
- Updates gpio driver and device tree files to the new GPIO Config flags
- Implements the new port_* APIs
- Update I2C and PWM Drivers to use new GPIO config
- Add esp32.overlay to gpio_basic_api test
- refactor convert_int_type, regs struct
- remove config_polarity
- add kConfig notes
Tests:
- samples/basic/blinky
- samples/basic/button
- tests/drivers/gpio/gpio_basic_api
- tests/drivers/gpio/gpio_api_1pin
Board:
- esp32 DevKitC V4
Note about interrupts:
The ESP32 requires specifying a CPU interrupt to be used for GPIO
interrupt signals. CPU interrupts can be either level or edge (or
special) triggered, but not both.
Please check gpio/Kconfig.esp32 for more info.
Signed-off-by: Mohamed ElShahawi <ExtremeGTX@hotmail.com>
As the mmio32 is more of a library than a proper driver, just implement
the new port functions and have pin_interrupt_configure marked pretty
much as not supported.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Enables the 2-pin gpio test on the rv32m1_vega_ri5cy board by adding a
dts overlay and configuring pinmuxes on the arduino header.
Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
Updates the rv32m1 gpio driver and all associated boards to use new
device tree compatible gpio configuration flags. Implements new port
get/set/clear/toggle and pin_interrupt_configure functions recently
added to the gpio api.
Assumes the gpio api layer handles translating logical flags to physical
flags.
Stops quietly reconfiguring pinmuxes to gpio mode. The pinmux must now
be configured explicitly in the board's pinmux.c or in the application.
Tested with:
- samples/basic/blinky
- samples/basic/button
- tests/drivers/gpio/gpio_api_1pin
On boards:
- rv32m1_vega_ri5cy
Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
Remove redundant interrupt code from gpio_mcux_configure, move the rest
to gpio_mcux_pin_interrupt_configure.
Signed-off-by: Piotr Mienkowski <piotr.mienkowski@gmail.com>
When checking the behavior of pull configurations delay long enough
for the signal to stabilize. Checking without a sufficient delay may
indicate a false failure.
Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
Use standard spelling for pull and active flags. Correct LED active
level (based on SAM-D21-Xplained-Pro).
Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
Update driver code and board files to use new GPIO configuration flags
such as GPIO_ACTIVE_LOW. Also add implementation of new port_* driver
API as well as gpio_pin_interrupt_configure function.
We treat GPIO_INT_MODE_LEVEL as not supported as the hardware doesn't
seem to handle level interrupts as one would expect. Looking into this
further to determine if its a HW bug or some misconfiguration in the
software.
We don't support dynamic setting of PULL_UP/PULL_DOWN config as this is
handled by pinctrl for the current boards we support the CMSDK AHB
driver on.
Tested on musca-a board.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Define the mask in terms of the individual non-zero fields to isolate
from future changes to the bit position.
Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
The debounce flag is to be provided to the pin configuration, not the
pin interrupt configuration.
Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
The asserts verify that:
- Output needs to be enabled for 'Open Drain', 'Open Source' mode to be
supported.
- GPIO_LINE_OPEN_DRAIN flag can be enabled only if GPIO_SINGLE_ENDED is
enabled.
- Only one of GPIO_INT_LOW_0, GPIO_INT_HIGH_1 can be enabled for a level
interrupt.
- GPIO_INT_DEBOUNCE is not passed to gpio_pin_interrupt_configure
function.
Signed-off-by: Piotr Mienkowski <piotr.mienkowski@gmail.com>
LPC GPIO architecture uses multiple devices.
GPIO input is routed via INPUTMUX to the PINT
device which roots the interrupt to NVIC.
Signed-off-by: Andrei Gansari <andrei.gansari@nxp.com>
LPC54114 to use D0 and D1 pinout.
LPC55S69 to use A0 and A1 pinout.
Pins enabled to be used as GPIO for 2 pin test gpio_basic_api.
Signed-off-by: Andrei Gansari <andrei.gansari@nxp.com>
LPC54114 to use D0 and D1 pinout.
LPC55S69 to use A0 and A1 pinout.
2 pin test gpio_basic_api uses pins set up in boars' pinmux.
Signed-off-by: Andrei Gansari <andrei.gansari@nxp.com>
Updates the mcux lpc driver and all associated boards to use new
device tree compatible gpio configuration flags. Implements new port
get/set/clear/toggle functions recently added to the gpio api.
ISR functions to be added later.
Signed-off-by: Andrei Gansari <andrei.gansari@nxp.com>
Keep promise of testing 1 pin only, don't attempt to test other pins
when verifying gpio_port_* API functions. Use BIT macro to create a bit
mask.
Fixes: #19692
Signed-off-by: Piotr Mienkowski <piotr.mienkowski@gmail.com>
stm32_exti_enable was returning errors on line > 32 or line pointing
to non implemented line. Both conditions are hard-coded, hence there
is no use to detect them dynamically in the code.
Check them with assert. As a consequence, function could now be void.
Additionally, enable exti irq line only if both checks are passed.
Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
Since it is now possible to disable/re-enable interrupts and
also to reconfigure an already configured interrupt, it is
now required to clear non requested triggers.
While it is not strictly requested, triggers are also cleared
when interrupt is disabled (assuming trigger should be configured
when interrupt is enabled).
Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
fixup exti
Perform few clean up in stm32 gpio driver:
*Clean up uint32_t occurrences left over.
*Move function gpio_stm32_flags_to_conf from const to static
and remove useless parameter check
*Rework error handling in functoin gpio_stm32_config
*Remove gpio_stm32_int_enabled_port function and have direct call
to gpio_stm32_get_exti_source
Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
Updates the imx gpio driver and all associated boards to use new
device tree compatible gpio configuration flags. Implements new port
get/set/clear/toggle and pin_interrupt_configure functions recently
added to the gpio api.
Assumes the gpio api layer handles translating logical flags to physical
flags.
Tested with:
- samples/basic/blinky
- samples/basic/button
- tests/drivers/gpio/gpio_api_1pin
- tests/drivers/gpio/gpio_basic_api
On boards:
- udoo_neo_full_m4
Signed-off-by: Stanislav Poboril <stanislav.poboril@nxp.com>
Added configuration for the udoo_neo_full_m4 board and
the initialization of its GPIO test pins via IOMUX controller.
Signed-off-by: Stanislav Poboril <stanislav.poboril@nxp.com>
The test verifies that the output pin appears to be shorted to the
input pin by confirming output low and high read low and high.
Failure should block progress through the test as subsequent tests
will not pass.
Replace the use of k_panic() to halt the test with an infinite loop
that doesn't splatter the console with stack traces and register
dumps.
Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
Enables the 2-pin gpio test on the mimxrt1050_evk board by adding a dts
overlay and configuring pinmuxes on the arduino header.
Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
Updates the mcux igpio driver and all associated boards to use new
device tree compatible gpio configuration flags. Implements new port
get/set/clear/toggle and pin_interrupt_configure functions recently
added to the gpio api.
Assumes the gpio api layer handles translating logical flags to physical
flags.
Removes port configuration support since that feature is deprecated in
the new gpio api.
Tested with:
- samples/basic/blinky
- samples/basic/button
- tests/drivers/gpio/gpio_api_1pin
On boards:
- mimxrt1015_evk
- mimxrt1020_evk
- mimxrt1050_evk
- mimxrt1060_evk
- mimxrt1064_evk
Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
Implement the new GPIO driver APIs for the HT16K33 and update the
driver to use the new GPIO flags.
Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
On the TI CC32xx, the GPIO peripheral supports only 8 pins per port.
We should add assertions where appropriate to verify this.
Signed-off-by: Vincent Wan <vincent.wan@linaro.org>
Adding overlays so that users can run this test on the following
boards:
- cc3220sf_launchxl
- cc3235sf_launchxl
- cc1352r1_launchxl
Instructions on pins to connect are included in the overlay files.
Signed-off-by: Vincent Wan <vincent.wan@linaro.org>
Updates the cc13x2/cc26x2 gpio driver and all associated boards to use
new device tree compatible gpio configuration flags. Implements new port
get/set/clear/toggle and pin_interrupt_configure functions recently
added to the gpio api.
Tested with:
samples/basic/blinky
samples/basic/button
tests/drivers/gpio/gpio_api_1pin
tests/drivers/gpio/gpio_basic_api
On board:
cc1352r1_launchxl
Signed-off-by: Vincent Wan <vincent.wan@linaro.org>
Updates the cc32xx gpio driver and all associated boards to use new
device tree compatible gpio configuration flags. Implements new port
get/set/clear/toggle and pin_interrupt_configure functions recently
added to the gpio api.
Tested with:
samples/basic/blinky
samples/basic/button
tests/drivers/gpio/gpio_api_1pin
tests/drivers/gpio/gpio_basic_api
On boards:
cc3220sf_launchxl
cc3235sf_launchxl
Signed-off-by: Vincent Wan <vincent.wan@linaro.org>
Update driver code and board files to use new GPIO configuration flags
such as GPIO_ACTIVE_LOW. Also add implementation of new port_* driver
API.
Tested on external SX1509B breakout board and Thingy:52.
Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
Update driver code and board files to use new GPIO configuration flags
such as GPIO_ACTIVE_LOW. Also add implementation of new port_* driver
API as well as gpio_pin_interrupt_configure function.
The interrupt triggering on both edges is a remnant from the old
Quark SE which has a customized DesignWare GPIO block. So remove
the support for both edges as the board is no longer supported.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>