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

Support Ethernet on SAM E5x #23300

Merged
merged 7 commits into from
Apr 17, 2020

Conversation

stephanosio
Copy link
Member

@stephanosio stephanosio commented Mar 5, 2020

This PR includes a series of commits to support the GMAC Ethernet peripheral on the Atmel SAM0 family devices, and enable Ethernet support on the Atmel SAM E53 and E54 SoCs.

Closes #23001.

NOTE: This patch has been tested and verified working on the atsame54_xpro board using the samples/net/dhcpv4_client sample.

@zephyrbot
Copy link
Collaborator

zephyrbot commented Mar 5, 2020

All checks passed.

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
Contributor

@pfalcon pfalcon left a comment

Choose a reason for hiding this comment

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

.

@stephanosio
Copy link
Member Author

Rebased

Copy link
Collaborator

@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.

In general looks fine, some minor style comments. Mostly want a comment about what gmac_fixup_samd5x.h is all about.

@stephanosio stephanosio force-pushed the sam_e54_ethernet branch 2 times, most recently from e4d5139 to 6ad8ed7 Compare April 5, 2020 04:34
@stephanosio stephanosio requested a review from galak April 5, 2020 04:35
@stephanosio
Copy link
Member Author

@benpicco @nandojve Could you review this and, if there is no problem, approve this?

This commit adds a GMAC instance to the SAM E5x device tree, along with
the refactoring necessary to specify the SAM E5x-specific components.

Signed-off-by: Stephanos Ioannidis <[email protected]>
This commit enables the GMAC (Ethernet) instance in the `atsame54_xpro`
device tree.

Signed-off-by: Stephanos Ioannidis <[email protected]>
This commit adds the MCLK clock configuration symbol fix-up for the
GMAC peripheral.

The APB-agnostic clock configuration fix-up symbols map to the
SoC-specific APB, in order to accommodate different SoC variants with
the GMAC on different APBs.

Signed-off-by: Stephanos Ioannidis <[email protected]>
This commit adds the GMAC driver support for the Ethernet-capable SAM0
family devices (SAM E53 and E54 at this time).

Signed-off-by: Stephanos Ioannidis <[email protected]>
This commit adds more pin function definitions (PINMUX_FUNC_I through
PINMUX_FUNC_P) to the pinmux interface header.

The SAM D5x and E5x series devices, for instances, define up to the
"function N" and this change is necessary to support such devices.

Signed-off-by: Stephanos Ioannidis <[email protected]>
This commit adds a reference to the SAM E54 maximum queue count value
in the device tree for specifying the range of `ETH_SAM_GMAC_QUEUES`
configuration.

Signed-off-by: Stephanos Ioannidis <[email protected]>
This commit enables the GMAC Ethernet support for the `atsame54_xpro`
board which includes an on-board RMII PHY.

Signed-off-by: Stephanos Ioannidis <[email protected]>
@stephanosio
Copy link
Member Author

Rebased, verified working on atsame54_xpro.

@galak Could you revisit this? Your reviews comments were addressed and your change request is still pending.

@@ -18,6 +18,7 @@ config ETH_SAM_GMAC_QUEUES
range 1 $(dt_node_int_prop_int,/soc/ethernet@40050088,num-queues) if SOC_SERIES_SAME70 || \
SOC_SERIES_SAMV71
range 1 $(dt_node_int_prop_int,/soc/ethernet@40034000,num-queues) if SOC_SERIES_SAM4E
range 1 $(dt_node_int_prop_int,/soc/ethernet@42000800,num-queues) if SOC_SERIES_SAME54
Copy link
Collaborator

Choose a reason for hiding this comment

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

I'd still prefer to remove this dt_node_int_prop_int

@galak galak merged commit ce1394e into zephyrproject-rtos:master Apr 17, 2020
@nandojve nandojve mentioned this pull request Apr 18, 2020
61 tasks
@stephanosio stephanosio deleted the sam_e54_ethernet branch April 23, 2020 06:20
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.

Implement SAM E5X GMAC support
5 participants