Skip to content

Conversation

@stanislav-poboril
Copy link
Contributor

@stanislav-poboril stanislav-poboril commented Oct 3, 2019

Updates the NXP i.MX 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

The udoo_neo_full_m4 board does not have a user button, so I temporarily modified the samples/basic/button code and board dts file to use second pin to simulate the button.

The test tests/drivers/gpio/gpio_api_1pin skips most of the tests, since it relies on pin to be configured as both input/output at the same time. i.MX gpio can be either input or output. However it is possible to read back the data from the output pins, so I temporarily modified the code to be able to test some of the cases.

I don't have colibri_imx7d_m4 board, only verified that the samples/basic/blinky and samples/basic/button examples build. The test tests/drivers/gpio/gpio_api_1pin compiles but does not link since it does not fit into board's flash.

@galak
Copy link
Contributor

galak commented Oct 3, 2019

Are you able to test with the tests/drivers/gpio/gpio_basic_api. It will require a wire to loop back a pair of pins. This test covers more so feel pretty confident if we're able to pass it.

galak
galak previously requested changes Oct 3, 2019
Copy link
Contributor

@galak galak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should convert boards/arm/96b_meerkat96/96b_meerkat96.dts & boards/arm/warp7_m4/warp7_m4.dts

@stanislav-poboril
Copy link
Contributor Author

Are you able to test with the tests/drivers/gpio/gpio_basic_api. It will require a wire to loop back a pair of pins. This test covers more so feel pretty confident if we're able to pass it.

Updated the code, added the udoo_neo_full_m4 board configuration and pin mux code into the tests/drivers/gpio/gpio_basic_api sample. It is passing now.

Should convert boards/arm/96b_meerkat96/96b_meerkat96.dts & boards/arm/warp7_m4/warp7_m4.dts

Done.

@zephyrbot zephyrbot added the area: Tests Issues related to a particular existing or missing test label Oct 7, 2019
@carlescufi
Copy link
Member

@stanislav-poboril
The topic branch has been rebased. Could you please rebase this PR against it?

Fix interrupt number for gpio5

Signed-off-by: Stanislav Poboril <[email protected]>
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 <[email protected]>
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 <[email protected]>
@stanislav-poboril
Copy link
Contributor Author

@stanislav-poboril
The topic branch has been rebased. Could you please rebase this PR against it?

Rebased and retested.

@MaureenHelm MaureenHelm dismissed galak’s stale review October 15, 2019 22:42

requested changes were made

@MaureenHelm MaureenHelm merged commit e308bd1 into zephyrproject-rtos:topic-gpio Oct 15, 2019
@MaureenHelm MaureenHelm deleted the imx-gpio branch October 15, 2019 22:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: Boards area: Devicetree area: GPIO area: Tests Issues related to a particular existing or missing test

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants