This commit updates the Atmel SAM GMAC driver to select max frame size
value from the device tree. Now GMAC driver can operate with the three
different frame size options available.
The current supported values are: 1518, 1536 and 10240.
Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
The current setup of physical layer forces RMII interface. The code was
refactored to have only one point to select proper phy interface. Now,
GMAC driver works with both RMII or MII interface. The phy connection
type is now selected by device tree. The default phy connection is RMII.
Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
The SAM4E GMAC version can use only MII as phy-connection-type. This
update the current default RMII value to MII.
Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
This add the following options to GMAC device tree bindings:
- max-frame-size
- max-speed
- phy-connection-type
Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
The NOCACHE_MEMORY can be enabled only for those MCU that support data
cache. The currently SoC that doesn't have data cache is SAM4E.
Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
Improve data cache conditional build. Now data cache code is build
only if device have support to it. This enables GMAC driver for use
with devices that don't have data cache instructions.
Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
Some drivers support NOCACHE_MEMORY sections. To have a default
fallback for systems where this isn't available or disabled a
fallback define is added.
Signed-off-by: Vincent van der Locht <vincent@vlotech.nl>
Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
This commit adds a GMAC instance to the SAM 4E device tree.
Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
This cleans up DMA flags by separating the necessary flags for devices
with one or multiple RX/TX queues.
Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
There was no way to use Openthread CoAP api in zephyr application so
far. These changes enable the feature. Now you can fully use CoAP
communication in an application working in Thread network.
Signed-off-by: Lukasz Maciejonczyk <Lukasz.Maciejonczyk@nordicsemi.no>
Thread and Zigbee differ in how do they handle Frame Pending Bit field
in their frames. Introduce a new enum, `ieee802154_fpb_mode`, which
allows to configure the radio driver in an appropriate mode.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
Set information about Frame Pending Bit from the ACK response in the
frame passed to OpenThread.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
The radio driver will now notify the upper layer about Frame Pending Bit
value in the ACK response it sent.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
OpenThread expects information, whether Frame Pending Bit was set in the
ACK response sent by the radio driver. Carry this information in the
net_pkt structure.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
clock-generator is a normal property. To access it we should use
DT_INST_PROP(0, clock_generator) and not DT_INST_CLOCKS_CELL().
Fixes: #24399
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Fix two issues:
1. The script assumes the default CMake generator build tool
platform is installed. On Linux at least, that's Make instead
of Ninja, but Make might not be installed since Zephyr recommends
Ninja. On Windows, that might be VS Code or nmake.
Calling `cmake -P pristine` instead of `cmake --build <path>
--target pristine` has the benefit of removing the dependency on a
build command, and hence the default generator is not relevant.
2. It also assumes run_cmake() returns control, and therefore pristine
can be run.
However, if the cmake command fails hard (say, due to issue #1
before this patch), run_cmake() throws an exception instead.
Fix that by trying to run the pristine target in a finally block
instead, and adding some manual cleanup steps in case the build
system is in a bad state and pristine fails too.
Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
Signed-off-by: Torsten Rasmussen <torsten.rasmussen@nordicsemi.no>
Fixes: #24340
Using find_package(Python3 3.6) will select the highest available
python3.
This means that in case user has:
/usr/bin/python --> python2.7
/usr/bin/python3 --> python3.6
/usr/bin/python3.6
/usr/bin/python3.8
then CMake will choose python 3.8.
This commit changes that behavior, so that in the above scenario, then
Python 3.6 will be preferred.
It also adds the following, python will be preferred over python3, if
both meets the minimum requirement.
For example:
/usr/bin/python --> python3.6
/usr/bin/python3 --> python3.7
then Python 3.6 is prefered.
It further introduces PYTHON_PREFER variable, which can be used to
further control the behavior.
As example -DPYTHON_PREFER=python3.7 will choose Python 3.7 if
installed.
Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
Pass EXTRA_DTC_FLAGS to kconfig so the EDT object we have in
kconfigfunctions can use that to set warn_reg_unit_address_mismatch
properly.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Sets the "dummy data" value to send when the transmit buffer is null.
Fixes the spi_null_tx_buf test in tests/drivers/spi/spi_loopback on the
lpcxpresso54114 board.
Tested on frdm_k64f, mimxrt1050_evk, and lpcxpresso54114_m4 boards.
Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
The command-line is correct but specifies a particular release, which
may be out of date, and is not formatted as a URL that can be clicked.
Add a proper link.
Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
In order to implement active connection close with the
TIME_WAIT state, send FIN and enter FIN_WAIT_1 state.
We actually send FIN+ACK as most of the implementations do.
Signed-off-by: Oleg Zhurakivskyy <oleg.zhurakivskyy@intel.com>
In order to support TIME_WAIT state during the TCP connection
termination, add a TIME_WAIT timer and the corresponding state.
Signed-off-by: Oleg Zhurakivskyy <oleg.zhurakivskyy@intel.com>
In order to improve readability, rename TCP_FIN_WAIT
states into TCP_FIN_WAIT_1, TCP_FIN_WAIT_2.
Signed-off-by: Oleg Zhurakivskyy <oleg.zhurakivskyy@intel.com>
This patch adds the selection of the necessary CONFIG_*
options for allowing the use of privacy on VEGA platform
Signed-off-by: Jeanina Dragusin <ancajeanina.dragusin@nxp.com>
The radio on the VEGA platform will now be able to resolve Resolvable
Private Addresses through the use of the CAUv3 hardware. With this
patch the RPA feature is now fully supported on the Controller:
RPA addresses are generated with local IRK and resolved with
previously exchanged peer IRK.
Signed-off-by: Jeanina Dragusin <ancajeanina.dragusin@nxp.com>
Now that the main Zephyr build system (and the documentation's) no
longer require ZEPHYR_BASE in the environment, the sanitycheck
script's continuing to require this makes less sense.
We can easily find ZEPHYR_BASE starting from a given sanitycheck
script, so let's just do that. Preserve the ability for a user to
override the ZEPHYR_BASE location in the environment as usual for
compatibility.
Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
This board contains an on-board Winbond W25Q16.
The chip is connected to spi1 using PB3-PB5 and PB0 as CS.
Signed-off-by: Bjarne Steinsbo <bjarne@gmail.com>
While the Cortex-R arch port does not currently support memory
protection and userspace, the `memory_protection` and `userspace` test
tags should not be ignored because doing so can unintentionally disable
other relevant tests.
Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
The current implementation to preserve r0 and r3 registers around the
call to `read_timer_end_of_isr` function has the following problems:
1. STM and LDM mnemonics are used without proper suffixes, in attempt
to implement PUSH and POP (i.e. STMFD and LDMFD). The suffix-less
STM mnemonic is equivalent to STMEA (increment after), which clearly
is not a PUSH operation, and this corrupts the interrupt stack,
leading to crashes on the Cortex-R.
2. The current implementation unnecessarily preserves additional r1, r2
and lr registers. There is no need to preserve r1 and r2 because the
values contained in these registers are not used after the function
call; as for the lr register, it is already pushed to the stack when
the interrupt service routine enters.
This commit removes all the unnecessary register preservations and
fixes the incorrect STM and LDM usages.
Note that the PUSH and POP aliases are used in place of the STMFD and
LDMFD mnemonics because they are used throughout the rest of the code.
Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
Currently, the Cortex-M SysTick-based timing info implementation is
incorrectly specified for all 32-bit ARM architectures.
This commit fixes that by restricting the SysTick-based implementation
to the ARM Cortex-M architectures only; in addition, it removes the
ARM64 timing info implementation as it is identical to the default
generic implementation and was previously added only as a workaround
for the aforementioned problem.
Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
DIO handlers defined in loramac-node are quite complex. Additionally
they call read/write operations over SPI with the sx1276 chip. This
cannot work properly in interrupt context, so call DIO handlers in
system workqueue instead.
Signed-off-by: Marcin Niestroj <m.niestroj@grinn-global.com>
So far only GPIO pin number of registered DIO line was compared with
arguments passed to GPIO callback. This is not enough when multiple gpio
controllers are used for DIO lines. As an example when DIO0 is on PA1
and DIO1 is on PB1, then DIO0 handler is called all the time.
Compare GPIO controller (in addition to pin number) of DIO lines with
the argument passed to gpio callback, so proper DIO handler is used.
Signed-off-by: Marcin Niestroj <m.niestroj@grinn-global.com>
This information is filled during build time from device-tree. This is
not supposed to change in runtime, so make it const.
Signed-off-by: Marcin Niestroj <m.niestroj@grinn-global.com>
Part of sx1276 driver which is in loramac-node module passes to Zephyr
irqHandlers with callbacks. Some of those callbacks can be NULL and this
is true now (with the current version of loramac-node) for DIO5. If we
define all 0-5 DIOs in dts, then this results in interrupts which are
unwanted. As we do not check that loramac-node callback is NULL, then we
crash trying to call it.
Check every handler during initialization and just skip initialization
of GPIO if it is NULL. This also prevents crashes, because there is no
way GPIO interrupt to be triggered in runtime for this DIO.
Signed-off-by: Marcin Niestroj <m.niestroj@grinn-global.com>
The patch specification should not be conditional on failing to match
an identifier, as some replaced values are identifiers.
Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
Always generate the comment text specifying a node's path identifier.
Add the DT_ prefix so it matches the actual macro usable from C. This
will make a following patch which adds support for accessing a node's
parent result in a generated header file which is easier to read.
Put the node's path right after "Devicetree node:" in the comment.
This makes the section for that node easier to grep for.
Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>