For some reason, a regression happened where the phy monitor was never
happening. Fix by starting the monitor at the end of init function. The
monitor will then reschedule itself from then on.
Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
In 200b886d3c a deprecated kconfig
option was brought back into the driver.
Let's fix it.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Enable Link-Up and Link-Down interrupts. On the interrupt handling
the monitor work is scheduled to update the link status and calling
corresponding callback routine.
Signed-off-by: Tony Han <tony.han@microchip.com>
Add support for KSZ9131 (Gigabit Ethernet Transceiver with RGMII Support).
As first starter, 100MBit/s mode is tested.
https://www.microchip.com/en-us/product/ksz9131
Signed-off-by: Tony Han <tony.han@microchip.com>
Add depends on SOC_SERIES_STM32N6X to
PTP_CLOCK_STM32_HAL in order to use PTP on the STM32N6 series.
Signed-off-by: Julien Racki <julien.racki-ext@st.com>
Use proper settings of clock, data bus width for sama7g54.
Update queue number checking and the macro definition in header file.
Signed-off-by: Tony Han <tony.han@microchip.com>
Add property for selecting the source for GMAC Reference Clock to dts
bindings yaml file.
Choose the source for the GMAC Reference Clock by GMAC_UR register.
Signed-off-by: Tony Han <tony.han@microchip.com>
Replace cache coherence functions:
- SCB_InvalidateDCache_by_Addr() to sys_cache_data_invd_range()
- SCB_CleanDCache_by_Addr() to sys_cache_data_flush_range()
Signed-off-by: Tony Han <tony.han@microchip.com>
Wrapp the 'done:' label with #if DT_ANY_INST_HAS_PROP_STATUS_OKAY
to avoid unused label warnings when reset_gpios is not defined.
Move declaration of 'val' under the corresponding #if block to limit
its scope and prevent “unused variable” warnings.
Signed-off-by: Venkatesh Odela <venkatesh.odela@amd.com>
The driver should not take the whole interface down and re-initialize on
every low power entry and exit. This is a lot of latency for no real gain
as far as I can tell. We can just do as the reference manual actually says
which is to set the sleep enable bit to put the module to sleep while still
being able to detect magic packets for wake on LAN.
Also, the only platform that this power action was "enabled" for was
kinetis, but that platform does not have any power management enabled in
Zephyr. Which means this code was never getting called even with all the
PM configs on. So basically this code is dead code. But it could be useful
for other platform, such as RT, so there's no reason not to remove the
dependency on kinetis and let it be used for any of the platform as long as
PM_DEVICE is enabled (hence the imply).
Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
Add support for hardware reset via GPIO in the ADIN1100 PHY driver.
The reset pin is configured via device tree using the reset-gpios
property.
Signed-off-by: Tim Pambor <tim.pambor@codewrights.de>
Obtain the value for the AMBA AHB bus width (32 bit/64 bit/128 bit) from
the design_cfg5 register at init-time rather than specifying it in the
respective SoC's DT.
Signed-off-by: Immo Birnbaum <mail@birnbaum.immo>
tx_int_sem serves solely as a signal indicator and does not require signal
counting. Within eth_stm32_tx, the semaphore is reset each time a packet
is transmitted. Upon receiving the transmission completion signal, the
function exits. Signal counting is unnecessary. Change to a binary
semaphore.
Signed-off-by: WenBin Zhang <freey7955@gmail.com>
Issue was that the gpio interrupt was happening before the work item was
initialized, and then trying to schedule it, resulting null pointer
dereference and fault occurring.
Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
These busy waits were only introduced during a debugging exercise and
not supposed to have made their way into mainline.
Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
Add SOC_SERIES_STM32H7RSX to applicable Kconfig parameters and enable
use of .eth_stm32_desc and .eth_stm32_buf linker sections for ethernet
dma.
Signed-off-by: Thomas Decker <decker@jb-lighting.de>
Add DSA Qbv support, add set_config/get_config to set and get
Qbv configuration. support enable/disable, set/get times,
set/get list length and set/get gate control list.
Signed-off-by: Qiang Zhao <qiang.zhao@nxp.com>
This patch adds the necessary switch option to the slip configuration
callback to enable the dynamic configuration of the MAC address of this
interface.
Signed-off-by: Marcelo Roberto Jimenez <marcelo.jimenez@gmail.com>
Add missing empty line between local variable definitions and
instructions in eth_stm32_set_mac_config().
Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
Clean tests on HAL_ETH_SetDMAError() and HAL_ETH_GetDMAError() return
value to explicitly test against 0.
Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
Slip is naturally promiscuous, so this patch does nothing but
acknowledge that. Promiscuous mode in slip is important to allow
the interface to be added to a bridge.
Signed-off-by: Marcelo Roberto Jimenez <marcelo.jimenez@gmail.com>
This patch just formats the file before the real patch so that
whitespace changes do not mix with the real code changes.
Signed-off-by: Marcelo Roberto Jimenez <marcelo.jimenez@gmail.com>
This patch just formats the file before the real patch, otherwise
the changes would be hard to read.
The only addition was a third parameter (NULL) to all the usages
of the macro WAIT_FOR, since the dangling comma triggered conflicts
between clang-format and check_compliance.py.
Signed-off-by: Marcelo Roberto Jimenez <marcelo.jimenez@gmail.com>
Fixeszephyrproject-rtos/zephyr#97217
Added new MONITOR_PERIOD config for W5500 driver
to remove dependency from ETH_PHY_DRIVER.
Signed-off-by: Siddhant Modi <siddhant.modi@gmail.com>
Compilers may not like that attributes are provides in actual and extern
definitions of symbols.
Removing them from extern definitions
Signed-off-by: Erwan Gouriou <erwan.gouriou@st.com>
If the process does an exec() (or fork, or..) all descriptors are kept
open by default, unless O_CLOEXEC is set when opening them.
This is usefull for stdin/out/err so that new process is connected to
them, but it is very rare for it to be usefull for any other descriptor.
In general this leads to descriptors being kept open unnecessarily,
which either will block other process from getting them (for example
if the child survives the parent but it does something else).
Or for a "leak" which unnecessarily uses descriptors and memory in the
child process.
Let's ensure we do not leak it for this component as we do not need it.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Clean up headers includes section:
- Remove conditional inclusions
- zephyr/, then susbystem/, standardlib, locals
- Sort alphabetically within these categories
- Remove the ones already available through _priv.h
Noticeable exception, lldp.h requires prior net_pkt.h inclusion
Signed-off-by: Erwan Gouriou <erwan.gouriou@st.com>
Since phy init is not in this function anymore, it can be moved back
to driver initialization function.
While I'm at, harmonize v1/v2 flavors of the function.
Signed-off-by: Erwan Gouriou <erwan.gouriou@st.com>
To be able to split code, some functions were removed their static
attribute, which opens the possibility of name conflict.
Rename them by adding eth_stm32_ prefix.
Additionally, review their sorting in the header file.
Signed-off-by: Erwan Gouriou <erwan.gouriou@st.com>
Split V1 and V2 code from the common file of STM32 ethernet
driver.
Whenever it is possible, make use of v1 or v2 version of functions
that are call from the common file in order to maximize factorization.
Review definitions to put them where they are used.
Review header inclusions to minimize them.
Signed-off-by: Erwan Gouriou <erwan.gouriou@st.com>
In an effort to make stm32 eth driver files easier to read and maintain,
split the ptp code in a dedicated file.
Signed-off-by: Erwan Gouriou <erwan.gouriou@st.com>
This reverts commit 678e226045.
This commit was part of PR 94142 which has been merged
while a discussion was still on going on the right direction
between splitting V1 and V2 or keeping a common file.
Signed-off-by: Erwan Gouriou <erwan.gouriou@st.com>
This reverts commit 29750ac05d.
This commit was part of PR 94142 which has been merged
while a discussion was still on going on the right direction
between splitting V1 and V2 or keeping a common file.
Signed-off-by: Erwan Gouriou <erwan.gouriou@st.com>