Skip to content
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

Add Microchip CAN-FD MCP251xFD drivers #59968

Merged
merged 4 commits into from Oct 1, 2023

Conversation

talih0
Copy link
Contributor

@talih0 talih0 commented Jul 3, 2023

Continues PR #31270

Copy link
Member

@henrikbrixandersen henrikbrixandersen left a comment

Choose a reason for hiding this comment

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

Please split this PR into at least three separate PRs:

  • One for the xmc47_relax_kit board changes.
  • One for the adding the arduino_uno_click shield.
  • Keep this one for adding the MCP25xxFD driver + the mcp2518fd shield.

@talih0
Copy link
Contributor Author

talih0 commented Jul 4, 2023

Please split this PR into at least three separate PRs:

* One for the xmc47_relax_kit board changes.

* One for the adding the arduino_uno_click shield.

* Keep this one for adding the MCP25xxFD driver + the mcp2518fd shield.

sure, will do. I did it this way because sample/drivers/can/counter needs all commits to run on xmc47_relax_kit. I'll add the sample later after the separate PRs are merged.

@talih0
Copy link
Contributor Author

talih0 commented Jul 4, 2023

On the mcp2518fd click shield, I changed the example to lpcxpresso55s28 so that the PR is independent of my xmc47_relax_kit/arduino uno click shield commits.
The compilation for lpcxpresso55s28 works, but I don't have the board to test.

@talih0
Copy link
Contributor Author

talih0 commented Sep 21, 2023

@henrikbrixandersen, I pushed the rebased version.

jfischer-no
jfischer-no previously approved these changes Sep 22, 2023
Copy link
Collaborator

@jfischer-no jfischer-no left a comment

Choose a reason for hiding this comment

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

Shield LGTM

Implementation for Microchip MCP2517FD/MCP2518FD SPI based CAN-FD
controller.

Signed-off-by: Abram Early <abram.early@gmail.com>
tests/drivers/build_all/can/testcase.yaml Outdated Show resolved Hide resolved
drivers/can/can_mcp251xfd.c Show resolved Hide resolved
drivers/can/can_mcp251xfd.c Outdated Show resolved Hide resolved
drivers/can/can_mcp251xfd.c Outdated Show resolved Hide resolved
drivers/can/can_mcp251xfd.c Show resolved Hide resolved
drivers/can/can_mcp251xfd.c Outdated Show resolved Hide resolved
drivers/can/can_mcp251xfd.c Outdated Show resolved Hide resolved
drivers/can/can_mcp251xfd.c Outdated Show resolved Hide resolved
drivers/can/can_mcp251xfd.c Outdated Show resolved Hide resolved
drivers/can/can_mcp251xfd.c Outdated Show resolved Hide resolved
This continue PR zephyrproject-rtos#31270. The updated changes are:
- Updated to work with latest zephyr
- Inplace reads/writes of registers
- Batch read of RX messages when multiple messages can be read
- FIFO abstraction of RX/TEF queues
- Handle ivmif errors
- Use READ_CRC for register reads
- Use bitmasks instead of bitfield members
- Rename mcp25xxfd to mcp251xfd
- General cleanups

Signed-off-by: Andriy Gelman <andriy.gelman@gmail.com>
Adds MikroElektronica click shield for the Microchip
MCP2518FD CAN-FD controller.

Signed-off-by: Andriy Gelman <andriy.gelman@gmail.com>
Adds build test case for mcp25xxfd with arduino_uno_click and
mikroe_mcp2518fd_click shield.

Signed-off-by: Andriy Gelman <andriy.gelman@gmail.com>
@henrikbrixandersen
Copy link
Member

@str4t0m, @erwango, @jfischer-no Please revisit.

@str4t0m str4t0m dismissed their stale review September 30, 2023 18:43

I've not reviewed all the latest changes, but my earlyier change requests have been addressed.

@kartben
Copy link
Collaborator

kartben commented Sep 30, 2023

@jhedberg @fabiobaltieri in case there's still time to get it into RC1

@jhedberg jhedberg merged commit 1211d77 into zephyrproject-rtos:main Oct 1, 2023
18 checks passed
@talih0
Copy link
Contributor Author

talih0 commented Oct 1, 2023

thank you everyone for your reviews and getting this merged into 3.5

@henrikbrixandersen
Copy link
Member

thank you everyone for your reviews and getting this merged into 3.5

Thank you for taking up this work and thank you to @legoabram for the initial PR. This driver is an important addition to the existing range of Zephyr CAN drivers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: CAN area: Devicetree Binding PR modifies or adds a Device Tree binding area: Shields Shields (add-on boards) platform: Microchip MEC Microchip MEC Platform
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet