Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
@@ -1,12 +1,16 @@
lib_board_support change log
============================

UNRELEASED
----------
1.4.0
-----

* FIXED: Incorrect link-speed reported for XK-EVK-XE216 v1.3
* ADDED: Support for optional configuration header file
`board_support_conf.h`
* ADDED: Support for xcore.ai Ethernet development kit `XK-ETH-316-DUAL`.
Single PHY support only at this time (ETH0).
* ADDED: Debug units for `XK-ETH-316-DUAL`. `XK-ETH-XU316-DUAL-100M` and
`XK-EVK-XE216`.
* FIXED: Incorrect link-speed reported for XK-EVK-XE216 v1.3

* Changes to dependencies:

Expand Down
2 changes: 1 addition & 1 deletion Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ pipeline {
)
string(
name: 'XMOSDOC_VERSION',
defaultValue: 'v7.3.0',
defaultValue: 'v7.4.0',
description: 'The xmosdoc version'
)
string(
Expand Down
17 changes: 5 additions & 12 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ lib_board_support: XMOS board support
#####################################

:vendor: XMOS
:version: 1.3.0
:version: 1.4.0
:scope: General Use
:description: Support library for XMOS development kits
:category: General Purpose
Expand All @@ -29,24 +29,17 @@ Features
* ``XK_AUDIO_316_MC``
* ``XK_AUDIO_216_MC``
* ``XK_EVK_XU216``
* ``XK_ETH_XU316_DUAL_100M``
* ``XK_ETH_316_DUAL``

* Simple examples demonstrating usage from both `XC` and `C`.

************
Known issues
************

* XK_EVK_XU216 support is currently only for the GigE PHY. The required dependency lib_ethernet to support
SMI has not been added to this repo to avoid unneeded dependencies in non-Ethernet applications and will
be required by any Ethernet application for this board anyway.

* XK_ETH_XU316_DUAL_100M is currently an unreleased board and hence has no documentation.

* XK_ETH_XU316_DUAL_100M uses the TI DP83826 PHY. During testing we noticed that very occasionally (1% of the time) the first
packet sent after initialisation may be dropped for certain link partners. Subsequent packets are always OK.
This is consistent with a similar bug seen on the `TI forum <https://e2e.ti.com/support/interface- group/interface/f/interface-forum/956808/dp83822i-after-link-up-first-packet-is-not-being-transmitted>`_.
For most applications this is not an issue however for test cases it may be worth noting. Sending an initial dummy Tx packet works around this issue.
* Support for SMI (used in the Ethernet PHY drivers) requires the lib_ethernet dependency, which is not included in
this repository to avoid introducing dependencies into non-Ethernet applications. Any Ethernet application
targeting either XK-EVK-XU216 or XK-ETH-316-DUAL boards must include lib_ethernet explicitly.

****************
Development repo
Expand Down
10 changes: 3 additions & 7 deletions doc/rst/lib_board_support.rst
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,9 @@ The following boards are supported in this repo with interfaces provided in the
+-----------------------+---------------------+
|XK_EVK_XE216 | XC |
+-----------------------+---------------------+
|XK_ETH_XU316_DUAL_100M | XC |
|XK_ETH_316_DUAL | XC |
+-----------------------+---------------------+

.. note::
The XK_ETH_XU316_DUAL_100M board is not currently generally available and does not have official
documentation. Contact `XMOS` for further information.

The following sections provide specific details of the features for each of the boards supported by this library.

.. toctree::
Expand Down Expand Up @@ -155,10 +151,10 @@ XK_EVK_XU216 API

|newpage|

XK_ETH_XU316_DUAL_100M API
XK_ETH_316_DUAL API
==========================

.. doxygengroup:: xk_eth_xu316_dual_100m
.. doxygengroup:: xk_eth_316_dual
:content-only:

|newpage|
Expand Down
7 changes: 5 additions & 2 deletions lib_board_support/api/boards/boards_utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,14 @@
/** Define representing XK-EVK-XU216 board */
#define XK_EVK_XE216 4

/** Define representing XK-ETH-316-DUAL board */
#define XK_ETH_316_DUAL 5

/** Define representing XK-ETH-XU316-DUAL-100M board */
#define XK_ETH_XU316_DUAL_100M 5
#define XK_ETH_XU316_DUAL_100M 6

/** Total number of boards supported by the library */
#define BOARD_SUPPORT_N_BOARDS 6 // max board + 1
#define BOARD_SUPPORT_N_BOARDS 7 // max board + 1

/** Define that should be set to the current board type in use
*
Expand Down
79 changes: 79 additions & 0 deletions lib_board_support/api/boards/xk_eth_316_dual/board.h
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__
8 changes: 4 additions & 4 deletions lib_board_support/lib_build_info.cmake
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()
2 changes: 1 addition & 1 deletion lib_board_support/module_build_info
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)
Expand Down
Loading