Include the RPA addresses in the enhanced connection complete debug
log. This makes it easier to debug privacy failures.
Use a new debug statement so that the debug print will work correctly
when log_strdup does not copy the string.
Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
Fix local RPA field for the legacy controller. This failed without
compilation errors because of blind pointer cast between two
structs of similar definition.
Set the local RPA field of the enhanced connection complete event only
when the address was generated by the controller. If the host has
set an RPA and this one was used the controller should return all
zeroes.
Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
Set the local RPA field of the enhanced connection complete event only
when the address was generated by the controller. If the host has
set an RPA and this one was used the controller should return all
zeroes.
Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
Fix compilation issue for extended advertising beacon. Adv pool was
mistakenly put under BT_OBSERVER define.
Both observer and broadcaster use the bt_lookup_id_addr. SMP cannot
be enabled without connections, so for broadcaster and observer there
will not be a lookup.
Fix compilation warning for extended scanner-only build.
Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
According to the BT Core spec. The local RPA field in the enhanced
connection complete event should be set if the own-address type was
set to 0x02/0x03 and the controller generated an RPA using a non-zero
IRK, otherwise the controller should return all zeroes.
In the case where we generate the RPA in the host instead we need to
handle set the on-air RPA address based on the random address set by
the host.
If this is not handled then pairing will fail because the on-air
addresses are used as input to the pairing procedure.
Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
Remove handling of extended advertising from connection complete
event. If extended advertising has been enabled and is supported by
the controller then enhanced connection complete must be supported.
Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
Fasten events handling by unloading callback treatment.
A RX thread is created. IPM RX events are dumped in a FIFO
which is processed in the thread context.
Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
The NET_DEVICE_INIT(), NET_DEVICE_INIT_INSTANCE() and
ETH_NET_DEVICE_INIT() macros changed and take new device power
management function pointer parameter.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Use a smaller ordinal type than int to hold the global index
identifying devices that support power management.
Use an upper bound instead of an array of flags to identify the
devices that were successfully suspended.
Only attempt pm on devices that provide a non-default pm control
function.
Use shorter more descriptive names for state variables.
Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
The default vertical tiling is designed for displays that are rotated 90
or 270 degrees from normal orientation. Devices where pixel data
advances first horizontally then vertically requires horizontally-tiled
data.
Similarly when generating upright text on a row-major-order monochrome
display the most significant bit may encode the pixel at the lowest
horizontal position.
Add options to control horizontal vs vertical tiling, and msb vs lsb
pixel order.
The commit also generates the representation of the glyph in comments at
each row.
Signed-off-by: Peter A. Bigot <pab@pabigot.com>
Font capabilities currently indicate whether font data is packed
horizontally or vertically, and this is used to control frame buffer
updates. The font bit ordering should likewise be recorded in the font
description, and any reversal to match the display applied when text is
being set in the frame buffer.
Signed-off-by: Peter A. Bigot <pab@pabigot.com>
This is a rework for OpenISA SW LL of
"b7220cef86 Bluetooth: controller: split: Fix densely scheduled event
preemption"
Fix LLL implementation handling preemption of currently
active radio event with densely scheduled events in the
pipeline.
Preempt timeout was stopped without consideration to there
being more queued events in the pipeline. Also, added
chaining of preemption timeouts one after the other expiry
so as to preempt currently active events by the densely
scheduled events in the pipeline.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Signed-off-by: Alex Porosanu <alexandru.porosanu@nxp.com>
This is a rework for OpenISA SW LL of
"b0826a7f65 Bluetooth: controller: split: Reduce time to setup tIFS
switch"
Refactor to reduce the setup next tIFS switch within tIFS
period of the Radio ISR.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Signed-off-by: Alex Porosanu <alexandru.porosanu@nxp.com>
This is a rework for OpenISA SW LL of
"4547bfb452 Bluetooth: controller: split: handle latency for cancelled
conn events" as well as subsequent fixes
Update implementation of master and slave LLL's to correctly
handle event counter values when latencies introduced due to
connection events cancelled by active events operating in
unreserved time space.
When an active radio event extends into unreserved time
space, and a connection event prepare is scheduled but at
the time of pre-emption timeout if the connection event is
cancelled then the event count and latencies needs to be
continiued to get acummulated.
In the current controller usecases the above scenarios does
not get exercised, the changes in this commit is needed for
future roles that can extend into unreserved time space and
would cancel a scheduled connection event.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Signed-off-by: Alex Porosanu <alexandru.porosanu@nxp.com>
This is a rework for OpenISA SW LL of
"62c1e1a52b Bluetooth: controller: split: Fix assert on invalid packet
sequence"
Fix to remove assertion failure check on detecting invalid
packet sequence used by peer central and that no non-empty
packet was transmitted.
Fixes#22967.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Signed-off-by: Alex Porosanu <alexandru.porosanu@nxp.com>
No point to change the throw_sleep to k_timeout_t because we
are calculating the timeout beforehand which can lead to
unexpected results if using k_timeout_t.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
This documentation is well-intentioned but not good advice.
The reason why we have a vtable-like API abstraction at the
driver subsystem level is to introduce object orientation.
The subsystem defintions implement an abstract class that
specific driver implementations all implement, providing
a common interface for end users. Multiple drivers may be
written for a subsystem that are interchangeable to the end
user.
However, there is no point in introducing a vtable-like
abstraction for APIs which are specific to a single driver.
We are not trying to present an interface abstraction which
could support multiple implementations. There is just one.
Simply declare a function in a header, and implement it in
the driver's C file.
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
Use DT_INST_FOREACH macro to combine code used for multiple instances.
Remove unnecessary Kconfig options and dts fixups for GPIO instances.
A side-effect to using DT_INST_FOREACH is that GPIO ports A0 and A3
are now enabled, whereas they were originally disabled by default as
an optimization.
Signed-off-by: Vincent Wan <vincent.wan@linaro.org>
Changing more of DT_* prefixed macros that refer to instances to use
DT_INST macros in GPIO, I2C and UART drivers.
Signed-off-by: Vincent Wan <vincent.wan@linaro.org>
Convert various DT_CCM_* macros to use DT_CHOSEN(zephyr_ccm) and
associated macros from devicetree.h.
We remove CCM references from cortex_a and cortex_r linker scripts as
its only a feature on Cortex-M STM32 SoCs.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Convert various DT_DTCM_* macros to use DT_CHOSEN(zephyr_dtcm) and
associated macros from devicetree.h.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Convert pinmux driver to use nodelabels to get references to devicetree
nodes using the new devicetree.h macros.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Convert gpio driver to use nodelabels to get references to devicetree
nodes using the new devicetree.h macros.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Rework the devicetree to utilize new DT_INST macros and extract per
instance data for clocks from devicetree. Move the prescaler setting
from Kconfig to devicetree as well.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Add clock references for ADC and TC devices. Update the bindings for
these devices to require clocks property and update the dtsi files to
have the clock info.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Updating west.yml to point a fix to include proper time.h header in
the HAL. This should fix an issue where clock_gettime() is not
correctly called due to recent change to make it into a system call.
Signed-off-by: Vincent Wan <vincent.wan@linaro.org>
Rename DT_L2_SRAM_* to just L2_SRAM_* and set it using new DT macros.
Do something similar for DT_LP_SRAM_* renamed to LP_SRAM_*
Updated the intel_gna driver as it used the DT_L2_SRAM_* defines.
This change also lets us remove dts_fixup.h on intel_s1000 and
intel_apl_adsp SoCs.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Rework the devicetree to utilize new DT_INST macros and extract per
instance data for clocks and dma from devicetree. We update the
atmel,sam0-spi binding for dma to replace the rxdma and txdma
properties with proper 'dmas' property.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Rework the devicetree to utilize new DT_INST macros and extract per
instance data for clocks and dma from devicetree. We update the
atmel,sam0-i2c binding for dma to replace the dma property with
proper 'dmas' property.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Reworked spi_sam driver to utilize new DT_INST macros as part of
this rework we also now get pin ctrl/mux configuration information
from the device tree instead of via Kconfig and defines in soc_pinmap.h
We remove defines from dts_fixup.h and soc_pinmap.h and associated
Kconfig symbols that are no longer needed due to getting all that
information from devicetree.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Add pinctl support for the SAM SPI device. We update the SPI
binding to have pinctrl-0 bindings that are expected to have
at least phandles for MISO, MOSI, and SPCK, but might also have
various chip selects as well.
The pinctrl nodes will have an 'atmel,pins' property that describes the
GPIO port, pin and periphal configuration for that pin.
We update sam*-pinctrl.dtsi files with all the various pin ctrl
configuration operations supported by the given SoC family. These
files are based on data extracted from the Atmel ASF HAL
(in include/sam<FAMILY>/pio/*.h).
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Added ATMEL_SAM_DT_NUM_PINS macro which will return the number of pins
to initialize for "pinctrl-0" devicetree property.
Added ATMEL_SAM_DT_PINS macro which will create an array initializer
with all the pins associated with "pinctrl-0" devicetree property.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
This commit enables the ARM memory protection unit for the SAM 4S
Xplained board, since the `CPU_HAS_ARM_MPU` is now selected by the SoC
Kconfig.
Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
This commit enables the ARM memory protection unit for the SAM 4E
Xplained Pro board, since the `CPU_HAS_ARM_MPU` is now selected by the
SoC Kconfig.
Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
Rename internal macros to use Z_ prefix instead of _K..
Those macros were missed when we did the global renaming activities.
Fixes#24645
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Sort the supported lists alphabetically for some boards. I'm not
trying to do this for all boards, just some DKs I'm using for testing.
Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
Add wdt0 node labels for all watchdogs. Keep the existing wdt node
labels in place for backwards compatibility.
Add a wdt1 node to the nRF5340 application core .dtsi, but leave it
disabled. Leave the wdt node's label set to "WDT" on this core for
backwards compatibility also, in case any users are getting it with a
string literal instead of asking the devicetree. This can be changed
later after this round of watchdog changes has been shaken out and
tested more.
Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
In case of flashing (which is typically used with OpenOCD)
we do reset of the target after programming application binary
in the non-volatile memory.
In case of Elf execution we need to reset the target before
loading Elf sections so that we might be sure our target
is in sane & expected state before we start execution.
Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
Use NODELABEL macros rather than DT_INST as this driver is so far
limited to support of LPTIM1 instance.
Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
Convert the driver to use the new dt macros. As part of this change we
remove a bunch of defines that happened in dts_fixup.h that didn't
belong there. Some of these should be converted to devicetree
properties at some point.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>