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

Multiple SocketCAN instance support. #51457

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

sumitbatra-nxp
Copy link
Contributor

@sumitbatra-nxp sumitbatra-nxp commented Oct 19, 2022

Adding support for multiple socketCAN interfaces by
making use of instances of DT_DRV_COMPAT for
network devices instead of a single network interface
Each socketCAN instance has a corresponding
DT Node named net_canbus<0>,<1>.

The net_canbus DT Node needs to be a child of the CAN DT Node.
The CAN and socketCAN devices can be accessed
by applications by parent child DT macros.
SocketCAN applications can access socketCAN node and
hence the network interface with its node id.

Tested on RDDRONE board.

Signed-off-by: Benjamin Perseghetti bperseghetti@rudislabs.com
Co-authored-by: Sumit Batra sumit.batra@nxp.com

@jukkar jukkar requested review from rlubos and removed request for yvanderv October 19, 2022 19:29
@decsny decsny removed their request for review February 1, 2024 15:25
@igalloway
Copy link
Contributor

@sumitbatra-nxp @bperseghetti
What is the summary here?
I'm trying to follow the thread, do we need to propose a change to the zephyr-specific-chosen-nodes
https://docs.zephyrproject.org/latest/build/dts/api/api.html#zephyr-specific-chosen-nodes

in order to have multiple CAN interfaces running simultaneously (likely with differing protocols)
(See MR-CANHUBK344 board as an example hardware. There are six CAN busses)

@henrikbrixandersen
Copy link
Member

do we need to propose a change to the zephyr-specific-chosen-nodes

No. I am working on a different approach.

@igalloway
Copy link
Contributor

Thanks @henrikbrixandersen
Just in case it is relevant, note that on a board like MR-CANHUBK344 there are also different types of PHY interfaces and they could have some differing control signals. I don't think this would have an impact at this level. But i just wanted to mention it in case it impacts the software architecture.

@henrikbrixandersen
Copy link
Member

Thanks @henrikbrixandersen

Just in case it is relevant, note that on a board like MR-CANHUBK344 there are also different types of PHY interfaces and they could have some differing control signals. I don't think this would have an impact at this level. But i just wanted to mention it in case it impacts the software architecture.

Thanks. That does not impact the solution here, as GPIO-controlled CAN transceivers are already supported.

@bperseghetti
Copy link
Member

do we need to propose a change to the zephyr-specific-chosen-nodes

No. I am working on a different approach.

@henrikbrixandersen Is there a WIP branch/PR for your approach/work that you could potentially reference in the comments of this PR?

@henrikbrixandersen
Copy link
Member

@henrikbrixandersen Is there a WIP branch/PR for your approach/work that you could potentially reference in the comments of this PR?

Unfortunately, the work is not yet ready for consumption/review. I have done a few refactoring PRs in the last month, which lead up to adding this. The basic idea is to have CAN_DEVICE_DT_DEFINE() automatically register the CAN controller device as a network interface based on whether SocketCAN is enabled in Kconfig or not (inspired by the ieee 802.15.4 drivers).

Copy link

github-actions bot commented May 5, 2024

This pull request has been marked as stale because it has been open (more than) 60 days with no activity. Remove the stale label or add a comment saying that you would like to have the label removed otherwise this pull request will automatically be closed in 14 days. Note, that you can always re-open a closed pull request at any time.

@github-actions github-actions bot added the Stale label May 5, 2024
@jukkar jukkar dismissed their stale review May 8, 2024 18:04

Removing my review atm.

Copy link

github-actions bot commented Jul 8, 2024

This pull request has been marked as stale because it has been open (more than) 60 days with no activity. Remove the stale label or add a comment saying that you would like to have the label removed otherwise this pull request will automatically be closed in 14 days. Note, that you can always re-open a closed pull request at any time.

Copy link

github-actions bot commented Sep 7, 2024

This pull request has been marked as stale because it has been open (more than) 60 days with no activity. Remove the stale label or add a comment saying that you would like to have the label removed otherwise this pull request will automatically be closed in 14 days. Note, that you can always re-open a closed pull request at any time.

Copy link

github-actions bot commented Nov 7, 2024

This pull request has been marked as stale because it has been open (more than) 60 days with no activity. Remove the stale label or add a comment saying that you would like to have the label removed otherwise this pull request will automatically be closed in 14 days. Note, that you can always re-open a closed pull request at any time.

Copy link

github-actions bot commented Jan 7, 2025

This pull request has been marked as stale because it has been open (more than) 60 days with no activity. Remove the stale label or add a comment saying that you would like to have the label removed otherwise this pull request will automatically be closed in 14 days. Note, that you can always re-open a closed pull request at any time.

@jukkar
Copy link
Member

jukkar commented Feb 3, 2025

@henrikbrixandersen should we just close this instead of removing the stale label, it does not look like this is progressing in over two years?

@henrikbrixandersen
Copy link
Member

@henrikbrixandersen should we just close this instead of removing the stale label, it does not look like this is progressing in over two years?

We could, but I still plan to address it. The solution is pending another change in the CAN driver subsystem, which I am currently working on formalizing as an RFC.

We can move this issue to just be labeled CAN, if that helps.

@jukkar
Copy link
Member

jukkar commented Feb 4, 2025

No worries at all and no need to remove the net label, just wondering what the plan was.

Copy link

github-actions bot commented Apr 6, 2025

This pull request has been marked as stale because it has been open (more than) 60 days with no activity. Remove the stale label or add a comment saying that you would like to have the label removed otherwise this pull request will automatically be closed in 14 days. Note, that you can always re-open a closed pull request at any time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants