Zephyr API Documentation 3.7.99
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
MDIO Interface

MDIO Interface . More...

Functions

void mdio_bus_enable (const struct device *dev)
 Enable MDIO bus.
 
void mdio_bus_disable (const struct device *dev)
 Disable MDIO bus and tri-state drivers.
 
int mdio_read (const struct device *dev, uint8_t prtad, uint8_t regad, uint16_t *data)
 Read from MDIO Bus.
 
int mdio_write (const struct device *dev, uint8_t prtad, uint8_t regad, uint16_t data)
 Write to MDIO bus.
 
int mdio_read_c45 (const struct device *dev, uint8_t prtad, uint8_t devad, uint16_t regad, uint16_t *data)
 Read from MDIO Bus using Clause 45 access.
 
int mdio_write_c45 (const struct device *dev, uint8_t prtad, uint8_t devad, uint16_t regad, uint16_t data)
 Write to MDIO bus using Clause 45 access.
 

Detailed Description

MDIO Interface .

Function Documentation

◆ mdio_bus_disable()

void mdio_bus_disable ( const struct device * dev)

#include <zephyr/drivers/mdio.h>

Disable MDIO bus and tri-state drivers.

Parameters
[in]devPointer to the device structure for the controller

◆ mdio_bus_enable()

void mdio_bus_enable ( const struct device * dev)

#include <zephyr/drivers/mdio.h>

Enable MDIO bus.

Parameters
[in]devPointer to the device structure for the controller

◆ mdio_read()

int mdio_read ( const struct device * dev,
uint8_t prtad,
uint8_t regad,
uint16_t * data )

#include <zephyr/drivers/mdio.h>

Read from MDIO Bus.

This routine provides a generic interface to perform a read on the MDIO bus.

Parameters
[in]devPointer to the device structure for the controller
[in]prtadPort address
[in]regadRegister address
dataPointer to receive read data
Return values
0If successful.
-EIOGeneral input / output error.
-ETIMEDOUTIf transaction timedout on the bus
-ENOSYSif read is not supported

◆ mdio_read_c45()

int mdio_read_c45 ( const struct device * dev,
uint8_t prtad,
uint8_t devad,
uint16_t regad,
uint16_t * data )

#include <zephyr/drivers/mdio.h>

Read from MDIO Bus using Clause 45 access.

This routine provides an interface to perform a read on the MDIO bus using IEEE 802.3 Clause 45 access.

Parameters
[in]devPointer to the device structure for the controller
[in]prtadPort address
[in]devadDevice address
[in]regadRegister address
dataPointer to receive read data
Return values
0If successful.
-EIOGeneral input / output error.
-ETIMEDOUTIf transaction timedout on the bus
-ENOSYSif write using Clause 45 access is not supported

◆ mdio_write()

int mdio_write ( const struct device * dev,
uint8_t prtad,
uint8_t regad,
uint16_t data )

#include <zephyr/drivers/mdio.h>

Write to MDIO bus.

This routine provides a generic interface to perform a write on the MDIO bus.

Parameters
[in]devPointer to the device structure for the controller
[in]prtadPort address
[in]regadRegister address
[in]dataData to write
Return values
0If successful.
-EIOGeneral input / output error.
-ETIMEDOUTIf transaction timedout on the bus
-ENOSYSif write is not supported

◆ mdio_write_c45()

int mdio_write_c45 ( const struct device * dev,
uint8_t prtad,
uint8_t devad,
uint16_t regad,
uint16_t data )

#include <zephyr/drivers/mdio.h>

Write to MDIO bus using Clause 45 access.

This routine provides an interface to perform a write on the MDIO bus using IEEE 802.3 Clause 45 access.

Parameters
[in]devPointer to the device structure for the controller
[in]prtadPort address
[in]devadDevice address
[in]regadRegister address
[in]dataData to write
Return values
0If successful.
-EIOGeneral input / output error.
-ETIMEDOUTIf transaction timedout on the bus
-ENOSYSif write using Clause 45 access is not supported