Add MSI as potential SYSCLK direct source for L0 and L4.
It could be needed in some cases when an accurate clock
is required and no external clock is available.
Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
We have been combining imported mcux drivers into a flattened directory
structure to maximize driver reuse, but the introduction of additional
nxp soc families (lpc and imx) to zephyr has introduced driver naming
conflicts. This caused us to rename and modify imported files, such as
fsl_gpio.c/h, to make them unique across all three nxp soc families.
This makes updating the the mcux drivers complicated, especially for the
lpc family.
Reoganize the mcux drivers into soc family subfolders, so we can just
copy all the drivers from an mcux distribution (which is done on an
soc-basis) into the appropriate soc family folder. Undo all of the
naming changes that occurred when lpc and imx drivers were originally
imported. Undo the accidental squashing of the kinetis watchdog and dcdc
drivers that occurred when the imx drivers were introduced.
The drawback to this approach is that we have duplicate files when the
same hw ip modules exist in multiple soc families, however there are
only few cases where this occurs, such as fsl_lpuart and fsl_trng.
Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
include/uart.h says that an interrupt may be an edge or a level.
Re-work the uart_pipe interrupt handler to support both. This makes
uart_pipe work with the USB CDC ACM driver.
Signed-off-by: Michael Hope <mlhx@google.com>
Because of incorrectly set MPS we always got 0 returned for WRITE
transfers and ZLP were always generated for every packet.
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
This adds a translation layer to make the nrfx driver for the nRF SPIS
(SPI Slave with EasyDMA) peripheral accessible via the Zephyr's API.
Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
Synchronous call return them on success, asynchronous one - with proper
signal - require to get this info through the status.
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
- removing a left over from previous SPI slave attempt
- unlock async calls on error
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
Introduced with the commit 7a9c4cbd9d,
by copy-pasting from "spi_nrfx_spim.c". Shame on me...
Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
The sam0 flash driver has support for retrieving flash page layout
information. This commit fixes compilation when
CONFIG_FLASH_PAGE_LAYOUT is disabled.
Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
Similar parts of code are aligned in the two shims, so that they
can be easily compared and updated if required.
Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
This adds a translation layer to make the nrfx driver for the nRF SPIM
(SPI Master with EasyDMA) peripheral accessible via the Zephyr's API.
The shim is provided only for nRF52840 because of a hardware anomaly
present in nRF52832. See Anomaly 58 (SPIM: An additional byte is clocked
out when RXD.MAXCNT = 1) in Errata for this chip.
Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
The simple function that helps to integrate nrfx IRQ handlers with
the IRQ_CONNECT macro can be used in shims for various nrfx drivers,
not only the SPI one.
Similarly, the macro for getting the IRQ number from the peripheral
base address needs to be widely available. It should be even moved
to <nrfx_common.h> in some next nrfx update.
Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
Exposing connect, disconnect and scan for now.
In case the iface is an instance of a WiFi offload device, the way it
manages scanning, connecting and disconnecting will be specific to that
device (not the mgmt interface obviously). In such case the device will
have to export relevantly a dedicated bunch of function to serve the
mgmt interface in a generic way.
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
This will help not to collide within drivers implementations and/or
avoid dependency from one driver to another one.
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
- There is a mismatch when interfacing with external code where a
uint32_t is defined as a parameter and internal Zephyr code attempts
to use u32_t. If NewLib is used, the typedef for u32_t is
'unsigned int' which is not a portable match to uint32_t as
'unsigned int' is not a common size across architectures so gcc will
output a warning.
- The mcux flash code calls NXP supplied functions that expect a
uint32_t.
- openthread.c ot_state_changed_handler has a uint32_t flag as a
parameter.
Signed-off-by: David Leach <david.leach@nxp.com>
- tx_tsv is never used anywhere
- and rx_rsv can be allocated on stack
Optimizing a bit the stack usage in eth_enc28j60_rx() function as well.
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
SPI API helps to directly transfer bytes from/to relevant buffers, so
let's take advantage of it.
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
Driver is still a bit messy, not using for instance the 0-copy
capabilities of SPI API, but this will be fix later.
Constify most of the spi buf structures, removing useless variables,
renaming function with common prefix eth_enc28j60_ etc...
It seems to fix an issue on verifying if tx was successful as well.
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
Adds a shim layer around the imx uart driver to adapt it to the Zephyr
serial interface.
Modem mode was introduce to control it as DCE and DTE and can be
configured in the device tree:
modem-mode:
type: int
category: required
description: Set the UART Port to modem mode 0 (dce) 1 (dte)
generation: define
For now only the UART 2 was tested.
Signed-off-by: Diego Sueiro <diego.sueiro@gmail.com>
Curently only link speed is exposed.
Opportunity taken to remove any post-fix enumerating the iface init
and/or the api: these must be generic and used by all the instances.
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
A Kconfig option is added for setting the initialization priority.
This is done to make the initialization priority requirements in
nrf52_pca20020 board power up sequence clearer.
Signed-off-by: Aapo Vienamo <aapo.vienamo@iki.fi>
This commit exposes the RTC1 ISR handling function, so the
function can be directly used in tests which generate
customized vector tables manually and require a visible symbol
for the ISR function.
Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
Set the received network packet priority according to VLAN priority.
Currently this mapping is 1:1 but can be changed if needed.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
This enables / fixes VLAN support in mcux ethernet driver.
The commit contains these changes for enabling VLAN:
* Increase the size of the ethernet frame if VLAN is enabled.
* Enable VLAN in chip if VLAN is enabled
* If VLAN is enabled, then the iface in context struct should
not be used directly as there can be multiple VLAN iface
related to this physical device.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Clarify the difference between the buffer length and threshold Kconfig
options available in the nRF5 entropy driver.
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
Improve the documentation of entropy_nrf5.c by adding a comment that
clarifies it's characteristics.
Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
Logical or is unsufficent for setting up new tmod: it's required to
remove previous one first. Indeed, 0 as tmod is valid (tx-rx mode), but
previous tmod could be 10 or 01, so a logical or will keep the previous
tmod leading to a bogus transaction.
Fixing also a rebase issue visible when debug mode is enabled. Slave
callback is a left over from a test on spi slave.
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
Commit 29f8b23b broke "make menuconfig" due to a missing newline in
this Kconfig.quark_se file.
Signed-off-by: Leandro Pereira <leandro.pereira@intel.com>
The sensor channel type for the nRF TEMP peripheral is incorrectly set
to SENSOR_CHAN_AMBIENT_TEMP. This peripheral measures die temperature,
not ambient temperature.
Fix the sensor channel.
Signed-off-by: Marti Bolivar <marti@opensourcefoundries.com>