-
Notifications
You must be signed in to change notification settings - Fork 11
Adding dual ethernet 316 dev-kit #66
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
Merged
humphrey-xmos
merged 2 commits into
xmos:develop
from
humphrey-xmos:adding-eth-audio-xu316
Aug 19, 2025
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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,79 @@ | ||
| // Copyright 2025 XMOS LIMITED. | ||
| // This Software is subject to the terms of the XMOS Public Licence: Version 1. | ||
|
|
||
| #ifndef __XK_ETH_316_DUAL_BOARD_H__ | ||
| #define __XK_ETH_316_DUAL_BOARD_H__ | ||
|
|
||
| #include <boards_utils.h> | ||
| #if (BOARD_SUPPORT_BOARD == XK_ETH_316_DUAL) || defined(__DOXYGEN__) | ||
| #include <xccompat.h> | ||
| #include "smi.h" | ||
|
|
||
| #ifndef NULLABLE_CLIENT_INTERFACE | ||
| #ifdef __XC__ | ||
| #define NULLABLE_CLIENT_INTERFACE(tag, name) client interface tag ?name | ||
| #else | ||
| #define NULLABLE_CLIENT_INTERFACE(type, name) unsigned name | ||
| #endif | ||
| #endif // NULLABLE_CLIENT_INTERFACE | ||
|
|
||
| /** | ||
| * \addtogroup xk_eth_316_dual | ||
| * | ||
| * API for the XK-ETH-316-DUAL board. | ||
| * @{ | ||
| */ | ||
|
|
||
| /** Index value used with get_port_timings() to refer to which PHY is in operation. | ||
| * | ||
| * The timings change according to which PHY is active in the hardware configuration | ||
| * of the dual PHY dev-kit. | ||
| */ | ||
| typedef enum { | ||
| NULL_PHY_TIMINGS, | ||
| PHY0_PORT_TIMINGS, | ||
| PHY1_PORT_TIMINGS, | ||
| } port_timing_index_t; | ||
|
|
||
| /** Task that connects to the SMI master and MAC to configure the | ||
| * DP83825I PHYs and monitor the link status. Note this task is combinable | ||
| * (typically with SMI) and therefore does not need to take a whole thread. | ||
| * | ||
| * \note It is not necessary to use both PHYs. If only one PHY is used, TBC. TODO fix this. | ||
| * | ||
| * \param i_smi Client register read/write interface | ||
| * \param i_eth_phy_0 Client MAC configuration interface for PHY_0. Set to NULL if unused. | ||
| * \param i_eth_phy_1 Client MAC configuration interface for PHY_1. Set to NULL if unused. | ||
| */ | ||
| [[combinable]] | ||
| void dual_ethernet_phy_driver(CLIENT_INTERFACE(smi_if, i_smi), | ||
| NULLABLE_CLIENT_INTERFACE(ethernet_cfg_if, i_eth_phy_0), | ||
| NULLABLE_CLIENT_INTERFACE(ethernet_cfg_if, i_eth_phy_1)); | ||
|
|
||
| /** Sends hard reset to both PHYs. Both PHYs will be ready for SMI | ||
| * communication once this function has returned. | ||
| * This function must be called from Tile[1]. | ||
| * | ||
| * \warning This function will reset both PHYs and the audio codec. To reset | ||
| * one of these devices after start-up, use the smi_phy_reset() function to | ||
| * set the reset bit in PHY Basic Control register. | ||
| * | ||
| */ | ||
| void reset_eth_phys(void); | ||
|
|
||
| /** Returns a timing struct tuned to the XK-ETH-316-DUAL hardware. | ||
| * This struct should be passed to the call to rmii_ethernet_rt_mac() and will | ||
| * ensure setup and hold times are maximised at the pin level of the PHY connection. | ||
| * rmii_port_timing_t is defined in lib_ethernet. | ||
| * | ||
| * \param phy_idx The index of the PHY to get timing data about. | ||
| * \returns The timing struct to be passed to the PHY. | ||
| */ | ||
| rmii_port_timing_t get_port_timings(port_timing_index_t phy_idx); | ||
|
|
||
|
|
||
| /**@}*/ // END: addtogroup xk_eth_316_dual | ||
|
|
||
| #endif // (BOARD_SUPPORT_BOARD == XK_ETH_316_DUAL) || defined(__DOXYGEN__) | ||
|
|
||
| #endif // __XK_ETH_316_DUAL_BOARD_H__ |
This file contains hidden or 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 |
|---|---|---|
| @@ -1,15 +1,15 @@ | ||
| set(LIB_NAME lib_board_support) | ||
|
|
||
| set(LIB_VERSION 1.3.0) | ||
| set(LIB_VERSION 1.4.0) | ||
|
|
||
| set(LIB_INCLUDES api/boards api/drivers) | ||
|
|
||
| set(LIB_COMPILER_FLAGS -Os -g) | ||
|
|
||
| set(LIB_OPTIONAL_HEADERS board_support_conf.h) | ||
|
|
||
| set(LIB_DEPENDENT_MODULES "lib_i2c(6.4.0)" | ||
| "lib_sw_pll(2.4.0)" | ||
| "lib_xassert(4.3.2)") | ||
| set(LIB_DEPENDENT_MODULES "lib_xassert(4.3.2)" | ||
| "lib_i2c(6.4.0)" | ||
| "lib_sw_pll(2.4.0)") | ||
|
|
||
| XMOS_REGISTER_MODULE() |
This file contains hidden or 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 |
|---|---|---|
| @@ -1,4 +1,4 @@ | ||
| VERSION = 1.3.0 | ||
| VERSION = 1.4.0 | ||
|
|
||
| DEPENDENT_MODULES = lib_i2c(>=6.4.0) | ||
| lib_sw_pll(>=2.4.0) | ||
|
|
||
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.
Uh oh!
There was an error while loading. Please reload this page.