Skip to content

Conversation

@agansari
Copy link
Contributor

@agansari agansari commented Oct 9, 2019

Updates the mcux lpc driver and LPC 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.

Driver still supports port acces on some features. To be removed later.

Interrupts feature enabled in this pull in order to have a wider test array.
Ported from #16589, will be closed once this is merged.

Tested with:

  • samples/basic/blinky (pass - lpc54 and lpc55)
  • samples/basic/button (pass - lpc54 and lpc55)
  • tests/drivers/gpio/gpio_api_1pin (pass - lpc54)
  • tests/drivers/gpio/gpio_basic_api (pass - lpc54)

On boards:

  • lpcxpresso54114_m4
  • lpcxpresso55s69_cpu0

Tests in tests/drivers/ pass on lpc55s69 pass if run in debug mode.

@zephyrbot
Copy link

zephyrbot commented Oct 9, 2019

All checks are passing now.

Tip: The bot edits this comment instead of posting a new one, so you can check the comment's history to see earlier messages.

Copy link
Member

@mnkp mnkp left a comment

Choose a reason for hiding this comment

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

LGTM with minor (but blocking) comments.

@carlescufi
Copy link
Member

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

@mnkp
Copy link
Member

mnkp commented Oct 11, 2019

It looks like something went wrong during the rebase process. There are some commits in this PR which shouldn't be here. It will probably require some manual clean up.

@agansari agansari force-pushed the gpio_topic_lpc branch 6 times, most recently from 1eabe82 to 0da362b Compare October 11, 2019 15:13
@agansari
Copy link
Contributor Author

It looks like something went wrong during the rebase process. There are some commits in this PR which shouldn't be here. It will probably require some manual clean up.

@mnkp I rebased and moved the pin configuration to the test.

Copy link
Member

@mnkp mnkp left a comment

Choose a reason for hiding this comment

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

Thanks for the update! Sorry, I overlooked two other minor issues. However, we should fix them to make sure the testcases can pass.

@agansari
Copy link
Contributor Author

failing test is qemu base, not related to this pull

@mnkp
Copy link
Member

mnkp commented Oct 15, 2019

It looks like this PR needs to be rebased after recent merges to topic-gpio branch.

@agansari
Copy link
Contributor Author

It looks like this PR needs to be rebased after recent merges to topic-gpio branch.

@mnkp rebase and shippable passed

Copy link
Member

Choose a reason for hiding this comment

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

Please add a license/copyright header

Copy link
Contributor Author

Choose a reason for hiding this comment

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

will do

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@MaureenHelm kinetis does not have one... should i do anything about it?

Copy link
Member

Choose a reason for hiding this comment

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

no

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 <[email protected]>
NXP's LPC family of MCU's GPIOs parameters is udated.
Boards LPC54xxx and LPC55xxx have updated values according
pin and interrupt layout.

Signed-off-by: Andrei Gansari <[email protected]>
Board is refactored to use DTS generated value, not use
magic numbers.

Signed-off-by: Andrei Gansari <[email protected]>
PINT device is enabled when SoC is booting up. Applies to LPC54xxx and
LPC55xxx families.

Signed-off-by: Andrei Gansari <[email protected]>
Use the latest commit available in hal_nxp repository.

Signed-off-by: Andrei Gansari <[email protected]>
SoC initialization had an incorrect comment regarding system clock.
Corrected from 48Mhz -> 96Mhz.

Signed-off-by: Andrei Gansari <[email protected]>
Pull-up replaced by pull-down in particular test_gpio_port.

Signed-off-by: Andrei Gansari <[email protected]>
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 <[email protected]>
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 <[email protected]>
Add define that maps to IOCON register PULL-DOWN bit.

Signed-off-by: Andrei Gansari <[email protected]>
Allocate all 8 PINT interrupts to ports 0 and 1, allocate 4 to each.

Signed-off-by: Andrei Gansari <[email protected]>
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 <[email protected]>
@agansari
Copy link
Contributor Author

@MaureenHelm can you review this again?

Copy link
Member

Choose a reason for hiding this comment

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

no

@MaureenHelm MaureenHelm merged commit 78ace3d into zephyrproject-rtos:topic-gpio Oct 17, 2019
@agansari agansari deleted the gpio_topic_lpc branch December 9, 2019 09:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants