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

drivers: can: add support for Nordic nRF MCAN #73386

Merged
merged 7 commits into from
May 30, 2024

Conversation

gmarull
Copy link
Member

@gmarull gmarull commented May 28, 2024

No description provided.

@zephyrbot zephyrbot added manifest manifest-hal_nordic DNM This PR should not be merged (Do Not Merge) labels May 28, 2024
@gmarull gmarull force-pushed the nordic-can branch 2 times, most recently from aec56dd to 1740b4c Compare May 28, 2024 10:01
carlescufi added a commit to carlescufi/docker-image that referenced this pull request May 28, 2024
The new version is required for the introduction of nRF MCAN:
zephyrproject-rtos/zephyr#73386

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
>=5.3.0 is required for proper CAN support.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
Add binding for Nordic CAN peripheral, based on the Bosch MCAN IP.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
Define CAN120 instance.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
Configure CAN120 MCAN core registers as non-cachable to prevent D-Cache
from inhibiting volatile accesses to the CAN120 MCAN registers. Also
apply non-cachable attribute to the message ram region. Even though the
MCAN driver handles cache invalidation/flushing, MPU faults are still
triggered (to be investigated).

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
So that we can configure CAN pins.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
Add driver for the Nordic CAN peripheral, based on Bosch MCAN IP.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
@gmarull gmarull marked this pull request as ready for review May 29, 2024 15:48
@gmarull gmarull requested a review from anangl as a code owner May 29, 2024 15:48
@zephyrbot zephyrbot added platform: nRF Nordic nRFx area: Pinctrl area: Devicetree Binding PR modifies or adds a Device Tree binding area: CAN and removed manifest manifest-hal_nordic DNM This PR should not be merged (Do Not Merge) labels May 29, 2024
@decsny decsny removed their request for review May 29, 2024 18:00
Enable canpll (required to clock CAN), and can120 instance, routed to
pins P9.4 and P9.5.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
@gmarull
Copy link
Member Author

gmarull commented May 30, 2024

last push: added can to the supported list in board yaml

#define CAN_INTEN offsetof(NRF_CAN_Type, INTEN)

struct can_nrf_config {
uint32_t wrapper;
Copy link
Member

Choose a reason for hiding this comment

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

Just out of curiosity, what is this wrapper? Is it something related to multicore and irq?

Copy link
Member Author

@gmarull gmarull May 30, 2024

Choose a reason for hiding this comment

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

nope, it's just the nordic-specific thin layer on top of the Bosch MCAN IP (eg IRQ enablement, events, etc.)

Copy link
Member

@alexanderwachter alexanderwachter left a comment

Choose a reason for hiding this comment

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

Looks good.A datasheet would be nice. When is it released?

stephanosio pushed a commit to zephyrproject-rtos/docker-image that referenced this pull request May 30, 2024
The new version is required for the introduction of nRF MCAN:
zephyrproject-rtos/zephyr#73386

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
@carlescufi carlescufi merged commit c0b0443 into zephyrproject-rtos:main May 30, 2024
22 checks passed
@carlescufi
Copy link
Member

Looks good.A datasheet would be nice. When is it released?

Late this year!

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: Pinctrl platform: nRF Nordic nRFx
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants