Use the HWINFO API for getting the unique mac address, and use the
pre-existing hardcoded macros as fallbacks if hwinfo is not implemented
properly.
Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
Add option in enum phy_link_speed to disable auto-negotiation.
This allows PHY drivers to support disabling auto-negotiation.
Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
Add support for setting RGMII RX and TX internal delays via DT properties:
`ti,rx-internal-delay` and `ti,tx-internal-delay`.
Signed-off-by: Venkatesh Odela <venkatesh.odela@amd.com>
add timestamping on Tx to packets marked for timestamping
add timestamping on Rx to all packets for later use
fix race condidition on adding timestamp when sending delay_req
Signed-off-by: Adib Taraben <theadib@gmail.com>
make sure the hal is stopped, before
configuring the link. The phy can change the
speed without notifying a link down in between.
Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
Increased the default number of TX and RX buffer descriptors from 4 to
16. Since the current default buffer size (CONFIG_NET_BUF_DATA_SIZE) is
128, increasing the number of RX buffers is needed to be able to receive
at least one frame of a maximum size split between multiple buffers.
The default number of TX buffers was increased to match the number of RX
buffers and to be able to transmit large frames with many fragments.
Added build-time configuration validation to ensure that the combined
size of all RX buffers is sufficient to receive a maximum-sized Ethernet
frame.
Signed-off-by: Stanislav Poboril <stanislav.poboril@nxp.com>
DMA copies frames which cannot fit into a single buffer into
multiple receive buffers. Updated the receiving code to combine
these buffers into a net_pkt with multiple fragments.
This allows the driver to handle larger Ethernet frames that
span across multiple DMA buffers.
Signed-off-by: Stanislav Poboril <stanislav.poboril@nxp.com>
Always reading from descriptor with index 0 could cause processing
of the buffers in a different order than they were received. Fixed by
reading from the next unprocessed position in the ring of descriptors
instead.
Fixed unused variable warnings.
Signed-off-by: Stanislav Poboril <stanislav.poboril@nxp.com>
make sure that autonegotiation is restarted, after
changing the speeds. Also make sure to only write
the changed registers, as mdio is pretty slow.
Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
remove phy related configs from eth config.
phy related configs chould go directly into the phy.
Most ethernet drivers didn't support the now removed
functions yet. Users should instead use `phy_configure_link()`
together with the `net_eth_get_phy()` function.
Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
Handle each error individually.
Do not skip RX loop on first error.
Revise DMA buf size to CONFIG_NET_BUF_DATA_SIZE.
Signed-off-by: Adib Taraben <theadib@gmail.com>
update members in struct Netc_Eth_Ip_StationInterfaceConfigType
in RTD 2.0.1 for both psi and vsi driver code.
Netc_Eth_Ip_VsiToPsiMsgType need to relocate nocache section
in RTD 2.0.1
Signed-off-by: Tu Nguyen Van <tu.nguyenvan@nxp.com>
The ENET timestamp events may be via ENET IRQ rather than ENET
timer IRQ handled in ptp driver for some platforms like i.MX RT1060.
Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
The NXP ENET driver used a mutex inside an ISR.
Since mutexes are not allowed in ISR, an assertion had been triggered.
The mutex is not required since a semaphore ensures sequential writing
(in ISR) and subsequent reading (after eth_wait_for_ptp_ts()).
Fixed by removing calls to mutex.
Signed-off-by: Frank Duerr <frank.duerr@ipvs.uni-stuttgart.de>
Don't use the same name for the structure instance and type.
As that is a violation of MISRA-C 2012 rule 5.7.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Add an implementation for the Ethernet API's set_config
hook. Supported features:
- change MAC address at run-time
- enable/disable promiscuous mode if enabled at system level
Signed-off-by: Immo Birnbaum <mail@birnbaum.immo>
As the code noted, the RGMII RX and TX clock delay values may need to
change depending on the MAC configuration or the PCB layout. Add
properties to allow configuring these in the device tree, defaulting to
the previous hard-coded values if not present.
Signed-off-by: Robert Hancock <robert.hancock@calian.com>
The enet handle in mac driver was not shared with ptp driver
properly. This was causing wrong TX timestamp.
This patch is to fix it.
Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
Currently, GPIO16/17 are supported for Ethernet phy
clock out, but some boards are also using GPIO0.
This change allows GPIO0 to be configured.
Signed-off-by: Cliff Brake <cbrake@bec-systems.com>
rename LINK_*_*BASE_T to LINK_*_*BASE
speed options for ethernet drivers shouldn't end with a _T, implying
that ethernet is only supported via a twisted pair cable.
Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
move phy_link_callback_set() to the iface init,
so we don't have to manually check the link state,
as phy_link_callback_set() will also invoke the callback.
Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>