-
Notifications
You must be signed in to change notification settings - Fork 6.7k
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
galak
merged 7 commits into
zephyrproject-rtos:master
from
stephanosio:sam_e54_ethernet
Apr 17, 2020
Merged
Support Ethernet on SAM E5x #23300
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
e89f368
dts: atmel: Add SAM E5x GMAC instance
stephanosio 73f86ea
boards: atsame54_xpro: Enable GMAC in device tree
stephanosio 26538e3
soc: atmel_sam0: Add GMAC fix-up for SAM D/E5x
stephanosio 116338d
drivers: ethernet: eth_sam_gmac: Add SAM0 family support
stephanosio 82cb39a
drivers: pinmux: Add more pin function definitions
stephanosio 5e271a1
drivers: ethernet: sam_gmac: Add SAM E54 maximum queue count reference
stephanosio 76196ad
boards: arm: atsame54_xpro: Support Ethernet
stephanosio File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -81,3 +81,7 @@ | |
&usb0 { | ||
status = "okay"; | ||
}; | ||
|
||
&gmac { | ||
status = "okay"; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,3 +15,4 @@ supported: | |
- spi | ||
- i2c | ||
- usb_device | ||
- netif:eth |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,134 @@ | ||
/* | ||
* Copyright (c) 2020 Stephanos Ioannidis <[email protected]> | ||
* | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
#ifndef ZEPHYR_DRIVERS_ETHERNET_ETH_SAM0_GMAC_H_ | ||
#define ZEPHYR_DRIVERS_ETHERNET_ETH_SAM0_GMAC_H_ | ||
|
||
/* | ||
* Map the SAM-family DFP GMAC register names to the SAM0-family DFP GMAC | ||
* register names. | ||
*/ | ||
#define GMAC_NCR NCR.reg | ||
#define GMAC_NCFGR NCFGR.reg | ||
#define GMAC_NSR NSR.reg | ||
#define GMAC_UR UR.reg | ||
#define GMAC_DCFGR DCFGR.reg | ||
#define GMAC_TSR TSR.reg | ||
#define GMAC_RBQB RBQB.reg | ||
#define GMAC_TBQB TBQB.reg | ||
#define GMAC_RSR RSR.reg | ||
#define GMAC_ISR ISR.reg | ||
#define GMAC_IER IER.reg | ||
#define GMAC_IDR IDR.reg | ||
#define GMAC_IMR IMR.reg | ||
#define GMAC_MAN MAN.reg | ||
#define GMAC_RPQ RPQ.reg | ||
#define GMAC_TPQ TPQ.reg | ||
#define GMAC_TPSF TPSF.reg | ||
#define GMAC_RPSF RPSF.reg | ||
#define GMAC_RJFML RJFML.reg | ||
#define GMAC_HRB HRB.reg | ||
#define GMAC_HRT HRT.reg | ||
#define GMAC_SA Sa | ||
#define GMAC_WOL WOL.reg | ||
#define GMAC_IPGS IPGS.reg | ||
#define GMAC_SVLAN SVLAN.reg | ||
#define GMAC_TPFCP TPFCP.reg | ||
#define GMAC_SAMB1 SAMB1.reg | ||
#define GMAC_SAMT1 SAMT1.reg | ||
#define GMAC_NSC NSC.reg | ||
#define GMAC_SCL SCL.reg | ||
#define GMAC_SCH SCH.reg | ||
#define GMAC_EFTSH EFTSH.reg | ||
#define GMAC_EFRSH EFRSH.reg | ||
#define GMAC_PEFTSH PEFTSH.reg | ||
#define GMAC_PEFRSH PEFRSH.reg | ||
#define GMAC_OTLO OTLO.reg | ||
#define GMAC_OTHI OTHI.reg | ||
#define GMAC_FT FT.reg | ||
#define GMAC_BCFT BCFT.reg | ||
#define GMAC_MFT MFT.reg | ||
#define GMAC_PFT PFT.reg | ||
#define GMAC_BFT64 BFT64.reg | ||
#define GMAC_TBFT127 TBFT127.reg | ||
#define GMAC_TBFT255 TBFT255.reg | ||
#define GMAC_TBFT511 TBFT511.reg | ||
#define GMAC_TBFT1023 TBFT1023.reg | ||
#define GMAC_TBFT1518 TBFT1518.reg | ||
#define GMAC_GTBFT1518 GTBFT1518.reg | ||
#define GMAC_TUR TUR.reg | ||
#define GMAC_SCF SCF.reg | ||
#define GMAC_MCF MCF.reg | ||
#define GMAC_EC EC.reg | ||
#define GMAC_LC LC.reg | ||
#define GMAC_DTF DTF.reg | ||
#define GMAC_CSE CSE.reg | ||
#define GMAC_ORLO ORLO.reg | ||
#define GMAC_ORHI ORHI.reg | ||
#define GMAC_FR FR.reg | ||
#define GMAC_BCFR BCFR.reg | ||
#define GMAC_MFR MFR.reg | ||
#define GMAC_PFR PFR.reg | ||
#define GMAC_BFR64 BFR64.reg | ||
#define GMAC_TBFR127 TBFR127.reg | ||
#define GMAC_TBFR255 TBFR255.reg | ||
#define GMAC_TBFR511 TBFR511.reg | ||
#define GMAC_TBFR1023 TBFR1023.reg | ||
#define GMAC_TBFR1518 TBFR1518.reg | ||
#define GMAC_TMXBFR TMXBFR.reg | ||
#define GMAC_UFR UFR.reg | ||
#define GMAC_OFR OFR.reg | ||
#define GMAC_JR JR.reg | ||
#define GMAC_FCSE FCSE.reg | ||
#define GMAC_LFFE LFFE.reg | ||
#define GMAC_RSE RSE.reg | ||
#define GMAC_AE AE.reg | ||
#define GMAC_RRE RRE.reg | ||
#define GMAC_ROE ROE.reg | ||
#define GMAC_IHCE IHCE.reg | ||
#define GMAC_TCE TCE.reg | ||
#define GMAC_UCE UCE.reg | ||
#define GMAC_TISUBN TISUBN.reg | ||
#define GMAC_TSH TSH.reg | ||
#define GMAC_TSSSL TSSSL.reg | ||
#define GMAC_TSSN TSSN.reg | ||
#define GMAC_TSL TSL.reg | ||
#define GMAC_TN TN.reg | ||
#define GMAC_TA TA.reg | ||
#define GMAC_TI TI.reg | ||
#define GMAC_EFTSL EFTSL.reg | ||
#define GMAC_EFTN EFTN.reg | ||
#define GMAC_EFRSL EFRSL.reg | ||
#define GMAC_EFRN EFRN.reg | ||
#define GMAC_PEFTSL PEFTSL.reg | ||
#define GMAC_PEFTN PEFTN.reg | ||
#define GMAC_PEFRSL PEFRSL.reg | ||
#define GMAC_PEFRN PEFRN.reg | ||
#define GMAC_RLPITR RLPITR.reg | ||
#define GMAC_RLPITI RLPITI.reg | ||
#define GMAC_TLPITR TLPITR.reg | ||
#define GMAC_TLPITI TLPITI.reg | ||
|
||
#define GMAC_SAB SAB.reg | ||
#define GMAC_SAT SAT.reg | ||
|
||
/* | ||
* Define the register field value symbols that are missing in the SAM0-family | ||
* DFP GMAC headers. | ||
*/ | ||
#define GMAC_NCFGR_CLK_MCK_8 GMAC_NCFGR_CLK(0) | ||
#define GMAC_NCFGR_CLK_MCK_16 GMAC_NCFGR_CLK(1) | ||
#define GMAC_NCFGR_CLK_MCK_32 GMAC_NCFGR_CLK(2) | ||
#define GMAC_NCFGR_CLK_MCK_48 GMAC_NCFGR_CLK(3) | ||
#define GMAC_NCFGR_CLK_MCK_64 GMAC_NCFGR_CLK(4) | ||
#define GMAC_NCFGR_CLK_MCK_96 GMAC_NCFGR_CLK(5) | ||
|
||
#define GMAC_DCFGR_FBLDO_SINGLE GMAC_DCFGR_FBLDO(1) | ||
#define GMAC_DCFGR_FBLDO_INCR4 GMAC_DCFGR_FBLDO(2) | ||
#define GMAC_DCFGR_FBLDO_INCR8 GMAC_DCFGR_FBLDO(3) | ||
#define GMAC_DCFGR_FBLDO_INCR16 GMAC_DCFGR_FBLDO(4) | ||
|
||
#endif /* ZEPHYR_DRIVERS_ETHERNET_ETH_SAM0_GMAC_H_ */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
/* | ||
* Copyright (c) 2020 Stephanos Ioannidis <[email protected]> | ||
* | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
#include <atmel/samd5x.dtsi> | ||
|
||
/ { | ||
soc { | ||
gmac: ethernet@42000800 { | ||
compatible = "atmel,sam-gmac"; | ||
reg = <0x42000800 0x400>; | ||
interrupts = <84 0>; | ||
interrupt-names = "gmac"; | ||
num-queues = <1>; | ||
local-mac-address = [00 00 00 00 00 00]; | ||
label = "GMAC"; | ||
status = "disabled"; | ||
}; | ||
}; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
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