Commit Graph

71338 Commits

Author SHA1 Message Date
Sam Hurst 1db9a87c85 dts: arm: st: include <dt-bindings/adc/adc.h>
Provide macros used for ADC channel configuration from a
devicetree node.

Signed-off-by: Sam Hurst <sbh1187@gmail.com>
2022-10-22 18:38:35 -04:00
Sam Hurst 3dd07aebdd usb-c: Change dir name from usbc to usb_c
For improved readability, change dir name from
usbc to usb_c

Signed-off-by: Sam Hurst <sbh1187@gmail.com>
2022-10-22 18:38:35 -04:00
Chris Friedt d832b04e96 net: sockets: socketpair: do not allow blocking IO in ISR context
Using a socketpair for communication in an ISR is not a great
solution, but the implementation should be robust in that case
as well.

It is not acceptible to block in ISR context, so robustness here
means to return -1 to indicate an error, setting errno to `EAGAIN`
(which is synonymous with `EWOULDBLOCK`).

Fixes #25417

Signed-off-by: Chris Friedt <cfriedt@meta.com>
2022-10-22 02:30:04 -07:00
Henrik Brix Andersen fa54e3aa1d drivers: can: sja1000: remove unused variables
Remove unused variables from the CAN SJA1000 driver.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2022-10-22 14:37:18 +09:00
Tom Burdick 1644cc69d7 tests: Fix spinlock time limit test
Set the time limit to be long enough not to trigger too early. Do
not unlock after assert when doing the time limit test.

Signed-off-by: Tom Burdick <thomas.burdick@intel.com>
2022-10-22 14:37:03 +09:00
Jun Lin 305e198e45 driver: i2c: npcx: do bus recovery when the transaction timeout
When there is a timeout for an i2c transaction, the i2c driver should do
the recovery logic to make the bus and driver state machine go back to
idle. Otherwise, it will cause the following transaction to fail because
the state machine keeps in an inappropriate state.

Signed-off-by: Jun Lin <CHLin56@nuvoton.com>
2022-10-22 14:36:50 +09:00
Henrik Brix Andersen 05455c3d23 modules: canopennode: storage: fix size_t format specifier
Fix the format specifier for logging size_t values.

Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
2022-10-22 14:36:11 +09:00
Henrik Brix Andersen 52f3cd03d0 tests: canbus: isotp: conformance: fix size_t format specifier
Fix the format specifier for logging size_t values, fix typo in function
name, and avoid casting integers to pointers and vice versa.

Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
2022-10-22 14:36:02 +09:00
Henrik Brix Andersen 0180b12573 tests: canbus: isotp: implementation: fix size_t format specifier
Fix the format specifier for logging size_t values. Fix typo in function
name.

Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
2022-10-22 14:36:02 +09:00
Henrik Brix Andersen c5352e99a1 canbus: isotp: fix size_t format specifier
Fix the format specifier for logging size_t values.

Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
2022-10-22 14:36:02 +09:00
Peter Marheine ab2515ad26 it8xxx2: support relocating ISR code to RAM
IT8xxx2 uses a relatively slow SPI flash for ROM with a small 4k
I-cache. As a result in large or busy applications, instruction fetch
can be very costly due to I-cache misses. Since exception handling code
is some of the hottest code in most applications, add an option (enabled
by default) causing that code to execute out of RAM in order to improve
performance.

This is very similar to exception section placement on XIP niosii
platforms (which has similar motivation), but can still be disabled by
configuration.

Signed-off-by: Peter Marheine <pmarheine@chromium.org>
2022-10-21 20:31:47 +02:00
Peter Marheine d37f496ee7 it8xxx2: allow placing arithmetic functions in ILM
These functions are small and may be very hot depending on the workload,
so are usually a good choice to execute from RAM.

Signed-off-by: Peter Marheine <pmarheine@chromium.org>
2022-10-21 20:31:47 +02:00
Peter Marheine d4549ed808 it8xxx2: generalize ILM support
Executing code out of RAM on IT8xxx2 requires that the relevant
addresses be mapped onto the CPU's instruction memory bus, referred to
by ITE documentation as Instruction Local Memory (ILM). ILM mappings
configure blocks of RAM to be used for accesses to chosen addresses when
performing instruction fetch, instead of the memory that would normally
be accessed at that address.

ILM must be used for some chip features (particularly Flash
self-programming, to execute from RAM while writing to Flash), and has
historically been configured in the Flash driver. The RAM for that was
hard-coded as a single 4k block in the linker script.  Configuring ILM
in the flash driver is confusing because it is used by other SoC code as
well, currently in code that cannot depend on the Flash being functional
or in hand-selected functions that seem performance-critical.

This change moves ILM configuration to a new driver and dynamically
allocates RAM to ILM in the linker script, allowing software use of the
entire 64k RAM depending on configuration.  This makes ILM configuration
more discoverable and makes it much easier to correctly support the
CODE_DATA_RELOCATION feature on this SoC.

Signed-off-by: Peter Marheine <pmarheine@chromium.org>
2022-10-21 20:31:47 +02:00
Peter Marheine 1b931af0ff it8xxx2: fix build with CONFIG_SOC_IT8XXX2_PLL_FLASH_48M=n
The chip I2C driver uses chip_get_pll_freq(), so that function needs to
be built even when the PLL configuration is not changed at boot.

Signed-off-by: Peter Marheine <pmarheine@chromium.org>
2022-10-21 20:31:47 +02:00
Nikolay Agishev 0422a04bfe boards: qemu_arc: fix of MPU regions setup for !XIP config
Add some changes to ARC linker script. They make correct alignment
for ROMable region. Now regions borders are aligned with respect
to MPU settings.

Signed-off-by: Nikolay Agishev <agishev@synopsys.com>
2022-10-21 20:31:31 +02:00
Thomas Antonini 018c5fe0b8 doc: fix ST B_U585I typo
This commit fixes the ST B_U585I_IOT02A Discovery kit "Supported
Features" table that is not well formatted.

Signed-off-by: Thomas Antonini <antonini.thomas@gmail.com>
2022-10-21 20:31:06 +02:00
Ahmed Moheb 92c93ef3c4 bluetooth: host: crypto: Check input arguments with CHECKIF()
Check input arguments passed to APIs with CHECKIF().

Signed-off-by: Ahmed Moheb <ahmed.moheb@nordicsemi.no>
2022-10-21 20:30:47 +02:00
Bernardo Perez Priego 810809f96b driver: adc: npcx: enable adding work queue for adc comparator
ADC comparator driver submits notifications into system work queue, this
change will make driver to use dedicated work queue instead by using
`CONFIG_ADC_CMP_NPCX_WORKQUEUE`.

Dedicated work queue and priority are configurable as well.

Signed-off-by: Bernardo Perez Priego <bernardo.perez.priego@intel.com>
2022-10-21 10:29:30 -05:00
Stephanos Ioannidis d018b2ba67 ci: manifest: Trigger unconditionally
The GitHub Actions trigger-on-file-change mechanism may fail to trigger
for very large PRs (300+ files changed).

This commit updates the manifest workflow such that it runs on all pull
requests, regardless of whether `west.yml` is modified.

Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
2022-10-21 23:53:04 +09:00
Tom Burdick 79f20ce4d4 maintainers: Add myself as collaborator
Adds myself as a collaborator to SPI and the system timer

Signed-off-by: Tom Burdick <thomas.burdick@intel.com>
2022-10-21 09:32:04 -04:00
Hu Zhenyu 470e333ab1 tests: net: icmpv4 move to new ztest API
Move net icmpv4 tests to use new ztest API
1. Add teardown, remove addr
2. Fix a packet release bug in test_send_echo_req_bad_opt
3. Combine send_echo_req/rep, as they should be run in sequence

Signed-off-by: Hu Zhenyu <zhenyu.hu@intel.com>
2022-10-21 13:15:11 +02:00
Krishna T 52ddc6e32d samples: net: zperf: Add loopback overlay
This is useful to profile networking stack using loopback interface, a
TX only option is also added but disabled by default.

Signed-off-by: Krishna T <krishna.t@nordicsemi.no>
2022-10-21 13:15:05 +02:00
Krishna T 3cc1a6e9b2 drivers: net: loopback: Optimize packet drop
If we are dropping packets, then drop then early without the clone, this
improves zperf performance.

Signed-off-by: Krishna T <krishna.t@nordicsemi.no>
2022-10-21 13:15:05 +02:00
Krishna T 3b2243dd0c drivers: net: loopback: Fix typo
Fix a typo in the comment.

Signed-off-by: Krishna T <krishna.t@nordicsemi.no>
2022-10-21 13:15:05 +02:00
Krishna T c23823a996 drivers: net: loopback: Make MTU configurable
This is useful to test higher packet sizes to simulate L2
Ethernet/Wi-Fi.

Signed-off-by: Krishna T <krishna.t@nordicsemi.no>
2022-10-21 13:15:05 +02:00
Kumar Gala a1195ae39b smp: Move for loops to use arch_num_cpus instead of CONFIG_MP_NUM_CPUS
Change for loops of the form:

for (i = 0; i < CONFIG_MP_NUM_CPUS; i++)
   ...

to

unsigned int num_cpus = arch_num_cpus();
for (i = 0; i < num_cpus; i++)
   ...

We do the call outside of the for loop so that it only happens once,
rather than on every iteration.

Signed-off-by: Kumar Gala <kumar.gala@intel.com>
2022-10-21 13:14:58 +02:00
Kumar Gala 77dcf91f50 smp: define arch_num_cpus always
Move arch_num_cpus outside of CONFIG_SMP in sys/arch_interface.h and
add define arch_num_cpus on all platforms (added arch_inlines.h on
those platforms that didn't have it before).

Signed-off-by: Kumar Gala <kumar.gala@intel.com>
2022-10-21 13:14:58 +02:00
Lauren Murphy 938b9533c7 intel: adsp: cavs: fix NO_OPTIMIZATION boot failure
Fixes boot failure on CAVS platforms with
CONFIG_NO_OPTIMIZATIONS=y by moving z_soc_mp_asm_entry
into .text linker section to ensure it is copied to
SRAM.

Signed-off-by: Lauren Murphy <lauren.murphy@intel.com>
2022-10-20 18:53:04 -04:00
Andrey Borisovich 56e1c5061d soc: ace: add external IPC completion to ipc done handler
Sometimes IPC message acknowledgement should be done by external
code to provide sufficient timing (example assemble code related
to powering down). Added bool return type to ipc message done handler
that if callback function returns true, IPC API skips writing
IPC message completion bits.

Signed-off-by: Andrey Borisovich <andrey.borisovich@intel.com>
2022-10-20 18:52:42 -04:00
Anas Nashif ad05e79598 intel_adsp: mem_window: fix definition of memory windows
Fix wrong calculation of memory window sizes.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2022-10-20 18:52:13 -04:00
Tomasz Leman ed5abc9f71 ace: power: fix d0i3 restore
The restore vector after power gating was configuring the MEMCTL register
incorrectly. This caused an FW crash during the cache prefetch.

Additionally, since lp sram cache issue was fixed, xtensa hal function
can be replace with zephyr equivalent.

Signed-off-by: Tomasz Leman <tomasz.m.leman@intel.com>
2022-10-20 18:00:26 -04:00
David Leach 1d0864fa0a MAINTAINERS: Add manuargue to the NXP platforms collaborator list
Add manuargue to the NXP platforms collaborator list

Signed-off-by: David Leach <david.leach@nxp.com>
2022-10-20 16:49:08 -05:00
Robert Lubos af8d09f40b tests: net: ieee802154: l2: Fix stack overflow on certain platforms
The default ztest stack size was not large enough for the test suite to
execute on certain platforms (noticed on x86, cortex-m4). Therefore
increase the CONFIG_ZTEST_STACK_SIZE for the suite to prevent stack
overflow.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2022-10-20 16:13:35 -05:00
Robert Lubos e9cb600514 tests: net: ieee802154: l2: Fix build warning with minimal libc
CONFIG_MBEDTLS_TEST enables mbed TLS self-test routines, which require
rand() function. As this function is not available by default with
minimal libc, it caused build warning on certain platforms.

As this feature is not really needed for 802.15.4 tests, simply remove
it from the project file to fix the issue.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2022-10-20 16:13:35 -05:00
Gerard Marull-Paretas a1398050fc manifest: update hal_nxp to fix ARRAY_SIZE collision
Updated hal_nxp so that it uses MIN/MAX/ARRAY_SIZE defined in
<zephyr/sys/util.h> when built for Zephyr. Also removed KB() internal
definition from public headers.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-10-20 17:49:57 +02:00
Stephanos Ioannidis faf4208295 scripts: set_assignee: Make review requests more deterministic
When there are more than 15 reviewers, the `set_assignee` script was
adding the reviewers more or less on a random basis because the input
set was arbitrarily ordered (thanks to how Python "set" works), and the
attempt to add any reviewers beyond the count of 15 results in the
previoulsy added reviewer being removed.

This commit updates the `set_assignee` script such that:

1. The collaborator list (input for generating the reviewer list) is
   ordered by the area match, such that the collaborators of the most
   relevant area come first.

2. The reviewers of the relevant areas are added first, until the total
   reviewer count is 15. The script does not attempt to add more than
   15 reviewers because that can result in the previously added
   reviewers being removed from the list.

Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
2022-10-20 23:52:49 +09:00
Andrzej Kuros bc78a03ca0 i2c_shell: add command to configure bus speed
Possibility to configure i2c speed through I2C_SHELL
command `i2c speed`.

Signed-off-by: Andrzej Kuros <andrzej.kuros@nordicsemi.no>
Signed-off-by: Jędrzej Ciupis <jedrzej.ciupis@nordicsemi.no>
2022-10-20 16:02:32 +02:00
Emil Gydesen 37028ea0d0 Bluetooth: Shell: Add support for advertising appearance
Add support for advertising the appearance value in the
advertising data.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2022-10-20 17:00:26 +03:00
Emil Gydesen 135bcd339b Bluetooth: Shell: Remove ad_mode_parse
The function did not provide anything that could
not just as easily have been done in the existing
loops.

This just required moving the call to ad_init to
after the param parsing loop.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2022-10-20 17:00:26 +03:00
Gerard Marull-Paretas 64ea7f61ba include: add missing errno.h
Some files were using errno codes without including errno.h.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-10-20 22:52:09 +09:00
Gerard Marull-Paretas 17c5696f71 include: add missing zephyr/sys_clock.h
Some files were using definitions from sys_clock.h, e.g. MSEC_PER_SEC
without including the header.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-10-20 22:52:09 +09:00
Gerard Marull-Paretas 4010ac103e include: add missing zephyr/irq.h include
Some files were using the IRQ APIs, e.g. irq_lock() without including
zephyr/irq.h.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-10-20 22:52:09 +09:00
Gerard Marull-Paretas b1a0d0ae86 include: add missing zephyr/kernel.h
Some files were using the Kernel APIs/types without including
zephyr/kernel.h.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-10-20 22:52:09 +09:00
Ming Shao 75914111d9 twister: fix the mis-placed drain logic.
The logic to drain the leftover logs of previous test should be
put before the monitor_serial(). It was misplaced when re-adding
this logic back.

Signed-off-by: Ming Shao <ming.shao@intel.com>
2022-10-20 15:42:25 +02:00
Jun Lin 42bb67ca85 driver: UART: npcx: remove unnecessary guard CONFIG_UART_INTERRUPT_DRIVEN
Currently, uart_npcx_pm_policy_state_lock* functions are guarded by
CONFIG_UART_INTERRUPT_DRIVEN && CONFIG_PM. However, it is unnecessary to
guard them with CONFIG_UART_INTERRUPT_DRIVEN as the polling mode UART
driver also uses these functions.
This commit removes it and leaves those functions guarded by CONFIG_PM
only.

Signed-off-by: Jun Lin <CHLin56@nuvoton.com>
2022-10-20 15:42:17 +02:00
Mariusz Skamra 39dcde2b7e Bluetooth: audio: ascs: Do not store Bluetooth address
The struct bt_ascs holds the conn reference already,
thus it's not needed to store the device address.

Signed-off-by: Mariusz Skamra <mariusz.skamra@codecoup.pl>
2022-10-20 15:41:47 +02:00
Andriy Gelman 890e84a6aa drivers: flash: soc_flash_xmc4xxx: Add missing kernel.h header
Fixes build of flash_shell sample after commit
a6a4400b86.
west build -p -b xmc45_relax_kit samples/drivers/flash_shell

Also include stdint.h.

Signed-off-by: Andriy Gelman <andriy.gelman@gmail.com>
2022-10-20 15:41:39 +02:00
Jun Lin 82a887c98d driver: eSPI: npcx: support multiple bytes mode for Port80
eSPI PUT_IOWR_SHORT protocol can send 1/2/4 bytes of data in a single
transaction. This allows the host to send max 32-bits Port80 code
at one time. This CL sets bits OFS0_SEL~OFS3_SEL in the DPAR1 register
to let the EC hardware put the full Port80 code to DP80BUF FIFO.
It also groups the N-byte code into a single 32-bits variable when
necessary by analyzing the offset field in the DP80BUF register.

Signed-off-by: Jun Lin <CHLin56@nuvoton.com>
2022-10-20 15:41:22 +02:00
Michal Sieron 702caf1c7e samples: boards: Add Qomu board sample
First pads are being configured for use by the FPGA.
Then CPU loads usbserial bitstream.
Finally it reenables clocks, sets up USB PID and waits for device to
enumerate.

Also disable software resets in used clocks.

Signed-off-by: Michal Sieron <msieron@antmicro.com>
2022-10-20 15:41:09 +02:00
Michal Sieron 6423e7db38 soc: arm: eos_s3: Use frequency from Kconfig to configure main clock
Allows applications to use other frequencies than 60 MHz.
For example 48 MHz for USB communication with usbserial driver.

Signed-off-by: Michal Sieron <msieron@antmicro.com>
2022-10-20 15:41:09 +02:00