Commit Graph

59149 Commits

Author SHA1 Message Date
Andrzej Głąbek 7fa4a33ea1 tests/lib/devicetree/devices: Exclude thingy52_nrf52832 platform
This test cannot be built for thingy52_nrf52832, as this board uses
regulator devices that need the SX1509B GPIO expander driver that
in turn depends on I2C which needs to be disabled in this test.
Commit b579c12714 addressed a similar
problem for hsdk platforms by excluding those. Use the same solution.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2021-12-23 12:51:01 +01:00
Attie Grande 650b516a90 soc: atmel_sam0: Fix pinctrl config
Accidental repetition of pad0 / pad1 -> pad2 / pad3

Signed-off-by: Attie Grande <attie.grande@argentum-systems.co.uk>
2021-12-23 12:39:48 +01:00
Andrzej Puzdrowski 8c6998c3a1 doc: note on the settings for the secure-domain
Added note for clarification on setting limitation
for secure/non-secure domains isolation.

Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
2021-12-23 12:39:20 +01:00
Carlo Caione 67ef1df950 mbox: Enforce callback registration before enabling the channel
Specify in the API that the callback must be registered before the
channel is enabled, fix the NRFX IPC driver to be compliant and change
the MBOX sample.

Signed-off-by: Carlo Caione <ccaione@baylibre.com>
2021-12-23 12:38:21 +01:00
Sam Hurst 651854a323 boards: arm: add support for STM32G081B Evaluation board
Support the ST STM32G081B Evaluation board with STM32G081RB SoC

Tested with:
    - `samples/basic/blinky`
    - `samples/basic/button`

Flashed samples via On-Board ST-LINK with:
    - west flash

Signed-off-by: Sam Hurst <sbh1187@gmail.com>
2021-12-23 11:21:24 +01:00
Andrzej Głąbek f0ef6c6fea manifest: Update hal_nordic revision to fix nrfx_pwm driver
Update the hal_nordic module revision to fix a copy-paste bug in
the nrfx_pwm driver that prevents PWM pins from being configured.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2021-12-23 11:21:13 +01:00
Aleksandr Khromykh 0350e38d62 test: Bluetooth: Mesh: fix racing between bsim devices in provisioning test
Bsim devices work asynchronously before access to Phy.
Interprocess OOB communication might be broken because of this.
PR adds synchronization for devices. Drift is 100ms between them.

Signed-off-by: Aleksandr Khromykh <aleksandr.khromykh@nordicsemi.no>
2021-12-23 11:20:08 +01:00
Piotr Pryga 49f0aba94c Bluetooth: Controller: Fix wrong variable passed to isr_done
Wrong variable was passed when isr_done was registered. It lead to
memory faults and exceptions. It should be a pointer to lll_adv_sync
instance instead of lll_adv.

The commit fixes the issue.

Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
2021-12-23 11:20:00 +01:00
Erwan Gouriou 9073faf641 boards: b_u585i_iot02a: Leds are active low
Fix dts leds configuration for this board as they actually light up
active when pin is set to 0.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2021-12-23 11:19:34 +01:00
Mateusz Kwiatkowski e8c12f2af0 drivers: wifi: eswifi: fix socket poll timeout
Fix a problem introduced in 6ea54db334 that caused the poll operation to
take 10x more time than intended.

Signed-off-by: Mateusz Kwiatkowski <kfyatek+publicgit@gmail.com>
2021-12-23 11:19:00 +01:00
Dominik Ermel ca1cda28f0 CODEOWNERS: Add myself for mgmt/mcumgr/lib
Add myself as codeowner for the mcumgr library.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2021-12-23 11:18:36 +01:00
Erwan Gouriou 18d35163b8 include/drivers/clock_control: stm32h7: Add missing symbol PLL SRC CSI
Symbol STM32_PLL_SRC_CSI was missing and was preventing the config
to be used.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2021-12-23 10:37:22 +01:00
Marc Herbert 5d4e08bb9f soc: xtensa: cavs-link.ld: add *(.trace_ctx) sections
Copy/paste/diverge struck again; I should have known better.

Fixes very recent and incomplete commit 9a1c5ec78e ("soc/intel_adsp:
cavs-link.ld: add *(.trace_ctx) sections"), see that commit for details.

Part of the fix for thesofproject/sof/issues/5032

This commit does not change `soc/xtensa/sample_controller/linker.ld`

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2021-12-22 17:47:21 -06:00
Aditya Bhutada e4481f82cb drivers: adc: adc_mchp_xec: update configuration register clk times
MCHP ADC configuration register need to be updated with appropriate
clock time values for high & low time clock.

Signed-off-by: Aditya Bhutada <aditya.bhutada@intel.com>
2021-12-22 13:47:18 -05:00
Aditya Bhutada 31de8caa9c dts: bindings: adc: microchip: Introduced clk_time field
Added clk_time field to configure Microchip ADC config register.
This allows programming ADC_CLK_HIGH_TIME & ADC_CLK_LOW_TIME register
values.

Signed-off-by: Aditya Bhutada <aditya.bhutada@intel.com>
2021-12-22 13:47:18 -05:00
Henrik Brix Andersen f92542ecf3 drivers: can: deprecate the can_attach_workq() API call
Deprecate the can_attach_workq() API call.

This API is limited in its functionality (it does not work with
userspace, it uses one common buffer size for all work queue instances).

Similar functionality can easily be implemented using the
can_attach_msgq() API along with the generic triggered work API
(e.g. using k_work_poll_submit()).

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2021-12-22 18:04:02 +01:00
Henrik Brix Andersen d1ff466ceb tests: drivers: can: fd: remove can_attach_workq() tests
Remove the tests for can_attach_workq().

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2021-12-22 18:04:02 +01:00
Henrik Brix Andersen aace49f600 tests: drivers: can: api: remove can_attach_workq() tests
Remove the tests for can_attach_workq() and convert the
test_send_receive_buffer() test case to using a message queue.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2021-12-22 18:04:02 +01:00
Henrik Brix Andersen 1f8255a311 samples: drivers: can: convert from can_attach_workq() to triggered work
Convert the CAN sample from using can_attach_workq() to using
can_attach_msgq() and triggered work via k_work_poll_submit().

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2021-12-22 18:04:02 +01:00
Henrik Brix Andersen a1cff6f4a9 drivers: can: shell: convert from can_attach_workq() to triggered work
Convert the CAN shell from using can_attach_workq() to using
can_attach_msgq() and triggered work via k_work_poll_submit().

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2021-12-22 18:04:02 +01:00
Torsten Rasmussen 05bb85523c cmake: improve the check of optimization level against CMAKE_BUILD_TYPE
Fixes: #39626

The CMAKE_C_FLAGS_<build_type> is a string with arguments separated by
spaces and not a list, for example "-O3 -DNDEBUG".

Therefore update the `if()` check to do a regex match to determine if
the optimization level specified through Kconfig matches the
optimization level that would be defined by the CMAKE_BUILD_TYPE
setting.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2021-12-22 17:58:42 +01:00
Torsten Rasmussen d9f0ca3943 cmake: add ztest_suite_node output section to linker script generator
The commit dee79d2b66 introduced a new
linker output section ztest_suite_node in linker/common-ram.ld but
without updating the corresponding linker_script/common/common-ram.cmake
linker script generator code.

This causes test cases for arm Compiler 6 to fail.

Add the same section to common-ram.ld.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2021-12-22 17:53:48 +01:00
Torsten Rasmussen 84fe8f8121 cmake: armlink: fix handling of argument in configure_linker_script
The PR #40174 changed `configure_linker_script()` macro from handling a
single string to handle a list of strings for the
linker_pass_define argument.

This changed the armlink/target.cmake from STREQUAL to IN_LIST, however
as `configure_linker_script()` is a macro, then arguments are not
variables in the CMake sense but string replacements, and therefore
IN_LIST doesn't work directly on the argument.

Fix this by creating a true CMake list from the content of the argument
and use this list for IN_LIST checking.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2021-12-22 17:53:48 +01:00
Torsten Rasmussen 225bea4bb2 cmake: armlink: remove sourcing of ld/target_base.cmake file
The armlink/target.cmake should not source ld/target_base.cmake file
as it provides its own (empty) implementation of the
`toolchain_ld_base` macro.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2021-12-22 17:53:48 +01:00
Andries Kruithof fca65843b9 Bluetooth: controller: inclusive naming for EDTT
Update the testnames according to the Bluetooth 5.3 specification
for inclusive naming

Signed-off-by: Andries Kruithof <Andries.Kruithof@nordicsemi.no>
2021-12-22 17:49:36 +01:00
Vinayak Kariappa Chettimada 0b47645cd7 Bluetooth: Controller: Fix Periodic Advertising Sync aux context leak
Fix Periodic Advertising Synchronization Auxiliary context
leak when failing to receive chain PDUs.
Auxiliary context has not being associated with sync context
when ULL scheduling was used.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2021-12-22 16:55:17 +01:00
Vinayak Kariappa Chettimada 6c8ff338b8 Bluetooth: Controller: Remove redundant extra list release
Periodic Advertising Synchronization Reports do not use a
list for the received chain PDUs, remove the stale code that
free extra list.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2021-12-22 16:55:17 +01:00
Vinayak Kariappa Chettimada 079e7976fe Bluetooth: Controller: Fix erroneous merge conflict resolution
Fix erroneous merge conflict resolution.

Regression in commit f023b5f611 ("Bluetooth: controller:
push topic branch to main") and
commit 2e2900f1bb ("Bluetooth: controller: revert
erroneous deletion").

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2021-12-22 16:53:37 +01:00
Vinayak Kariappa Chettimada bf2bb51035 Bluetooth: Controller: Fix Periodic Adv Sync to private address
Fix Periodic Advertising Synchronization to private address
when public and static identity address is supplied as peer
device address to synchronize to.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2021-12-22 16:53:30 +01:00
Vinayak Kariappa Chettimada 5d42bf5a70 Bluetooth: Controller: Fix Extended AD data and Scan Rsp total len type
Fix Extended Advertising Report's AD data and Scan Response
total data length type to use uint16_t.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2021-12-22 16:51:35 +01:00
Vinayak Kariappa Chettimada fd9c89d8d0 Bluetooth: Controller: Fix HCI fragment of Extended Advertising Report
Fix HCI fragment of Extended Advertising Report when chain
PDUs are received. Implementation was missing HCI event
generation for last frag of each PDU when there was a next
chain PDU.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2021-12-22 16:51:35 +01:00
Vinayak Kariappa Chettimada 7b78c4e534 Bluetooth: Controller: Fix Extended Scan Response Secondary PHY value
Fix Extended Scan Response report Secondary PHY value to use
AUX_ADV_IND PHY.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2021-12-22 16:51:00 +01:00
Vinayak Kariappa Chettimada ac3f12f9b3 Bluetooth: Controller: Fix Periodic Adv EVENT_OVERHEAD_START_US jitter
As EVENT_OVERHEAD_START_US offset is used in ticks unit in
LLL, ULL scheduling using ticker should also use ticks unit
for EVENT_OVERHEAD_START_US when reducing the first Periodic
Advertising event preparation.

Relates to commit 858dc7fab4 ("Bluetooth: controller: Fix
EVENT_OVERHEAD_START_US jitter").

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2021-12-22 16:50:15 +01:00
Krzysztof Chruscinski 11bbdb030d uart: nrfx_uarte: Return error when re-enabling RX
Driver was not behaving according to API description and
was not returning -EBUSY when uart_rx_enable() was called
on already enabled receiver.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2021-12-22 15:50:57 +01:00
Andrzej Głąbek ea81b4b812 drivers: display_nrf_led_matrix: Correct calculation of pixel period
This is a follow-up to commit 4dfab40cac.

The calculation of the pixel period is done incorrectly and results
in higher than configured refresh frequency if pixels are refreshed
in groups. Fix that and lower the base frequency for the timer and
PWM so that wider range of refresh frequency can be used also with
the pixel grouping.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2021-12-22 15:50:44 +01:00
Vinayak Kariappa Chettimada 0813d09df9 Bluetooth: Controller: Fix undefined reference in FEM support
Fix undefined reference to radio start time in FEM support
in ISO Synchronized Receiver implementation.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2021-12-22 13:30:27 +01:00
Vinayak Kariappa Chettimada 519a4a36c6 Bluetooth: Controller: Fix ISO Data payload number for BIS payloads
In the ISO Data the payload number shall be the value of
bisPayloadCounter for the PDU containing that payload.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2021-12-22 13:30:07 +01:00
Piotr Pryga c0889b0cc1 tests: Bluetooth: df: remove duplicated code from CTE req tests
There is a common implementation of connection handling code
that may be shared by tests: connection_cte_req and connection_cte-
tx_params.
This commit removes code implemented in common.c and common.h
files. The same code is currently available in ../df/common/
directory.
All calls were updated to use function from common implementation.

Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
2021-12-22 12:18:17 +01:00
Piotr Pryga d4b0cbee8e tests: Bluetooth: df: Add tests for set conn CTE TX params
Add unit tests for HCI command HCI_LE_Set_Connection_CTE_-
Transmit_Parameters.

Part of a code that was available in df/connection_cte_req/common.c,
related with artificial handling of connection, is moved to
df/common/bt_conn_common.c.

Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
2021-12-22 12:18:17 +01:00
Piotr Pryga aa3090dd7d Bluetooth: controller: lll: add TX configuration of CTE in conn mode
Add configuration of transmission of CTE in connected mode.
The transmission is enabled only for PDUs that have CTE present (CP)
bit set to 1.
Radio peripheral is configued by df_cte_tx_configure to transmit CTE.
The same parameters are set for connected and connectionless mode.
The function was changed to re-use the same code for configuration
of CTE in both modes.

Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
2021-12-22 12:18:17 +01:00
Piotr Pryga 1dcbe73cc8 Bluetooth: controller: radio: add setting of S1 byte in radio packet
To transmit CTE with data channel packet the CTE configuration must
be stored in S1 field, that is placed just after length field.

The commit changes radio_pkt_configure function to allow configuration
of S1 field. When S1 field is used to store information about CTE
then its length is 8 bits. The content of the field is filled with
CTEInfo data. The same as the one used in periodic advertising.

The signature of the radio_pkt_configure function was not changed.
There were not used bits in flags parameter of the function.
From now on, bit 3 of the flags parameter will be used to store
information whether CTE will be added to the packet.

Besides that changed, the commit provides set of macros that
help in preparation and validation of the flags parameter content.
Macros provide information about bits that are currently used.
Ther are also macros that help to retrieve particular information
stored in the flags parameter.

Every place of code where the radio_pkt_configure function occurs
was changed to use provided macros.

Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
2021-12-22 12:18:17 +01:00
Piotr Pryga 1ff9baf010 Bluetooth: controller: complete DF TX params set in conn mode
HCI_LE_Set_Connection_CTE_Transmit_Parameters host command was
not completely implemented in controller. There were missign
storage of TX parameters in ll_conn instance.

The commit adds missing part of the command handling.

Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
2021-12-22 12:18:17 +01:00
Piotr Pryga f650fd99e0 Bluetooth: controller: Add CTE present bit to pdu_data
If the CTE is attached to data channel packet, the packet must
include information about CTE. The information is stored in
CTEInfo structure that is available in S1 byte of a packet.
Radio checks if the S1 byte is present by verification of
CTE present (CP) bit in byte S0.

The commit add these data to pdu_data structure declaration.
That allows to prepare packet before it is parsed and send
by Radio peripheral.
Besides that there added a new function ull_pdu_data_init that
initlializes fields in pdu_data object that are read only by
lower link layer. CP bit in S0 byte and content of S1 bytes
are examples of such fields.

Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
2021-12-22 12:18:17 +01:00
Piotr Pryga ef24a141fb Bluetooth: controller: radio: add fun to switch to RX after PHYEND evt
When PDU has CTE added to the end, the PHYEND event must be used
to correclty switch between TX and RX. END event is triggered just
before start of CTE.
The commit adds new function that configures radio to disable after
PHYEND is generated and then swtich to RX.

Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
2021-12-22 12:18:17 +01:00
Marcin Niestroj 54a785b886 drivers: wifi: esp_at: don't send AT+CWLAP during initial setup
Sending AT+CWLAP was introduced with commit f2859f9501 ("drivers:
wifi: esp_at: changes to scanning") as a way to easily test introduced
changes, rather than on purpose. Remove that now, as there is no
particular reason to send it and additionally it breaks setup phase:

  <err> modem_cmd_handler: command AT+CWLAP ret:-5
  <err> wifi_esp_at: Init failed -5

with ESP-AT firmware v2.1.

Signed-off-by: Marcin Niestroj <m.niestroj@grinn-global.com>
2021-12-22 12:17:04 +01:00
Tomasz Bursztyka 2623315802 arch/x86: PCIE MSI vector allocator can use arch IRQ allocator
Instead of messing up with the PCI bus.

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2021-12-22 12:16:52 +01:00
Tomasz Bursztyka c1bc5db795 drivers/pcie: Use the generic arch-interface for allocating IRQs
PCIE now uses the new interface. And pcie_alloc_irq() is only made
available when CONFIG_PCIE_CONTROLLER is unset. So only for x86 atm.

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2021-12-22 12:16:52 +01:00
Tomasz Bursztyka 88bac5d0b5 arch/x86: Implement the IRQ allocation and usage interfaces for intel 64
This is the only architecture user for this at the moment.

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2021-12-22 12:16:52 +01:00
Tomasz Bursztyka b99eaca729 sys/arch: Add new interfaces for allocating and checking IRQs
Current usage was being limited to PCIE but there are new use case
that demand for this feature to be generalized.

It is made arch-specific since allocation policy may vary
per-architecture.

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2021-12-22 12:16:52 +01:00
Tomasz Bursztyka c76651b9ab arch/x86: Do not call irq controller on dedicated irq/vector function
MSI/MSI-x interrupt do not need any interrupt controller handling
(ioapic/loapic).

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2021-12-22 12:16:52 +01:00