Commit graph

59932 commits

Author SHA1 Message Date
Yong Cong Sin 41bff12625 drivers: modem: gsm: Use K_KERNEL_* macros
GSM workq is a system only thread, use K_KERNEL_* macros
instead of K_THREAD_*

Signed-off-by: Yong Cong Sin <yongcong.sin@gmail.com>
2022-01-21 14:39:30 -05:00
Emil Gydesen 1041f0c2ac Bluetooth: GATT: Initial GATT BSIM tests
Adds initial GATT BSIM tests for the client
and server functionality, testing simple
reads and writes.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2022-01-21 14:39:16 -05:00
Pete Dietl cb793e3d33 stm32g4: adc: Add DTS for ADC345
Add DTS information for ADCs 3, 4, and 5 for stm32g4

Signed-off-by: Pete Dietl <petedietl@gmail.com>
2022-01-21 14:38:50 -05:00
Wealian Liao 7467dc4c12 tracing_user: Add ISR nest level parameter
For tracing_user, the sys_trace_isr_enter() & sys_trace_isr_exit()
block any nest interrupts & most SMP interrupts for the user. It is
hard to analyze the IRQ preemption(e.g., each IRQ counter and execution
time). This commit adds ISR nest level for each CPU to the user instead
of blocking user call back when nest interrupts.

Signed-off-by: Wealian Liao <WHLIAO@nuvoton.com>
2022-01-21 14:38:35 -05:00
Tom Burdick b5d9c047d3 boards/intel_adsp_cavs25: Improve test coverage
Remove the only_tags filter for the board and add ignore_tags for net
and bt.

Adds a filter to a userspace sample that didn't correctly filter on
usermode being Kconfiged.

Signed-off-by: Tom Burdick <thomas.burdick@intel.com>
2022-01-21 14:36:49 -05:00
Jordan Yates afa700d182 doc: guides: index: document Doxygen linking
Document the existance of `zephyr.tag` by providing a link on the main
documentation guide page. Also include an example of how to use this
file in an external project.

Implements #41529.

Signed-off-by: Jordan Yates <jordan.yates@data61.csiro.au>
2022-01-21 14:26:14 -05:00
Jordan Yates b527915738 doc: generate Doxygen tag file
Generate the Doxygen tag file to static html sources directory so that
external documentation can use it as a source for linking. See:
    https://www.doxygen.nl/manual/external.html

Signed-off-by: Jordan Yates <jordan.yates@data61.csiro.au>
2022-01-21 14:26:14 -05:00
Marius Scholtz 38d684f8f1 drivers: counter: sam: expose RC reg to DT
Exposes the RC register so that the initial value can be set in
the device tree. This is useful in the case where the timer
generates an event but an interrupt is not required.
e.g generate event to sample adc on RC register match.

Tested on Atmel SMART SAM E70 Xplained Ultra board

Signed-off-by: Marius Scholtz <mariuss@ricelectronics.com>
2022-01-21 14:25:49 -05:00
Julien Massot ff930df4b1 boards: arm: rcar_h3ulcb: do not set default options
Just enable minimal options to run hello_world and
blinky sample.

Signed-off-by: Julien Massot <julien.massot@iot.bzh>
2022-01-21 14:25:25 -05:00
Julien Massot 71fcd696e0 drivers: gpio: rcar: set default according to dt enabled
Set GPIO_RCAR to true if renesas,rcar-gpio status is okay.

Signed-off-by: Julien Massot <julien.massot@iot.bzh>
2022-01-21 14:25:25 -05:00
Julien Massot a2fb8918ba drivers: gpio: rcar: depends on R-Car soc family
Make it consistent with other drivers, prepare for
future Gen4 introduction.

Signed-off-by: Julien Massot <julien.massot@iot.bzh>
2022-01-21 14:25:25 -05:00
Julien Massot b2811153c9 drivers: i2c: rcar: set default according to dt enabled
Set I2C_RCAR to true if renesas,rcar-i2c status is okay.

Signed-off-by: Julien Massot <julien.massot@iot.bzh>
2022-01-21 14:25:25 -05:00
Julien Massot 86a2f81c14 drivers: can: rcar: set default according to dt enabled
Set CAN_RCAR to true if renesas,rcar-can status is okay.

Signed-off-by: Julien Massot <julien.massot@iot.bzh>
2022-01-21 14:25:25 -05:00
Julien Massot 2d6ed8c083 drivers: serial: rcar: set default according to dt enabled
Set UART_RCAR to true if renesas,rcar-scif status is okay.

Signed-off-by: Julien Massot <julien.massot@iot.bzh>
2022-01-21 14:25:25 -05:00
Emil Gydesen 59840b1a7b Bluetooth: Samples: Iso connected benchmark fix unidirectional tx
Add a check for SDU size and tx qos to ensure that we do not
attempt to send any data and neither central or peripheral
if the benchmark has been setup to be rx-only.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2022-01-21 14:25:04 -05:00
Emil Gydesen e6265685a1 Bluetooth: Sample: ISO connected benchmark change to callback
Change the sample to use the callback instead of a timer
to send next packet.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2022-01-21 14:25:04 -05:00
Andy Ross ae8745df6f tests/kernel/obj_tracking: Filter cAVS 2.5 builds to prevent DSP host hangs
This test is triggering some kind of bug that will reliably cause a
full host crash/hang of the x86 host environment on TGL/cAVS 2.5.
It's interfering with CI testing, so filter it out for now while we
figure it out.

Interestingly it doesn't have any trouble on older cavs15.  And even
more so, it seems to be some kind of build interaction.  If I disable
LOG=y, it passes. But when it fails, it actually fails BEFORE the boot
entry and core 0 initialization code is reached (i.e. LONG before any
logging initialization).  Something is wrong with the generated file;
maybe a linker or rimage bug?  The signature is reported OK by the
ROM, but that's the last we hear from the device before it blows up.

Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
2022-01-21 13:22:15 -05:00
Andy Ross 64bdc044c4 tests/kernel/queue: Mark SMP-unsafe case 1cpu, reduce logging output
The test_queue_multithread_competition case wants to be sure that an
inserted item is recevied by the highest priority thread of several
waiting, but that only works if the threads aren't racing against each
other on different CPUs.

Also, the test_queue_loop case would produce a LOT of console output
very quickly.  On a few occasions, I saw this overflow the 8k output
buffer of the intel_adsp devices at exactly the wrong time (with
respect to the polling loop in the host python script), cause a flush
of the stream, and then miss the SUCCESSFUL message.  Quiet things
down a bit, there's not a lot of value of verbosity in a CI test.

Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
2022-01-21 13:22:15 -05:00
Andy Ross 6f8bb5d9fe tests/kernel/semaphore: Skip COHERENCE-hostile test cases
These two cases use a k_pipe to transfer data, and do it (as is
customary) by copying into or out of buffers on the stack.  But that
doesn't work when KERNEL_COHERENCE=y, because the pipe code has a
possibly-too-sophisticated zero copy implementation, and will do the
copy into the destination thread synchronously with the k_put_put()
call from the other CPU.

Normally the fix is to use a static buffer instead, but in this case
the buffers are shared between multiple simultaneous threads, so can't
be shared.

Just skip the tests, pending some rework to how they communicate.

Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
2022-01-21 13:22:15 -05:00
Andy Ross 8fe7d9d6df tests/kernel/mp: Must enable KERNEL_COHERENCE explicitly
This is test assumes that shared static/global variables are coherent
between the CPUs.  That's true on incoherent platforms only when
CONFIG_KERNEL_COHERENCE=y.  Normally that gets turned on along with
SMP, but this is using the lower level mp API directly and didn't have
that.

Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
2022-01-21 13:22:15 -05:00
Erwan Gouriou 5edd510c1b boards: h747/h745: Update dual core flash and debug instructions
Review flashing and debugging instructions on these dual core boards.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2022-01-21 13:18:22 -05:00
Dominik Ermel 643e4d65c6 mgmt/mcumgr/lib: Fix bug in file download chunk size config
The commit fixes bug in compile time calculation of file download
chunk, FS_MGMT_DL_CHUNK_SIZE, that is permitted within selected
mcumgr buffer size, where the mcumgr header length has not been
taken into account.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2022-01-21 13:17:59 -05:00
Robert Lubos 697f415bbf net: sockets: Use struct timeval provided by libc
Instead of redefining own `struct zsock_timeval` type at the socket
layer, use a standard type provided by libc. This prevents the
compliation errors when application includes both, `net/socket.h` and
standard C header defining `struct timeval` (sys/time.h).

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2022-01-21 13:17:43 -05:00
Sylvio Alves e745962b8f dts: esp32: clean up unused pin defintions
This removes a few uart pins currently no necessary
for this board.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2022-01-21 13:16:55 -05:00
Sylvio Alves aea53f41c1 esp32: fix uart and gpio driver priority to enable console
Current gpio and uart initialization level is set to
PRE_KERNEL_2, which won't let uart_console subsystem
to init its hook properly as it has same level.
Prioritize uart and gpio so that the console hooks
are properly initialized.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2022-01-21 13:16:55 -05:00
Sylvio Alves c409a4656f drivers: uart: esp32: use DEVICE_DT_INST_DEFINE()
Current uart driver implementation is incompleted regarding the
usage of DT_INST_FOREACH_STATUS_OKAY. If uart0 and uart2 are selected,
build breaks due to peripheral number ordering, which would be
0 and 1 in this case. This fix PR fix this by re-working the macros
and setting proper uart peripheral instances in DTSI, required for signal
routing configuration.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2022-01-21 13:16:55 -05:00
Piotr Pryga 6590ffd330 samples: Bluetooth: df: Fix too early per sync create timeout
Periodic advertising synchronization create had a timeout set
to fixed value of 10 seconds. BT 5.3 Core specification defines
synchronization timeout as 6 consecutive periodic advertising
events. When advertiser set the periodic interval to be more than
1.6 second it was possible the application timeout is reached
before time allowed by BT Core specification.

Changed implementation of timeout to depend on the periodic
advertising interval.

Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
2022-01-21 19:32:17 +02:00
Hake Huang 946414cdf9 tests: driver: build-test: add min_ram restriction
below two build test can not fit in SRAM size

drivers.modem.build
drivers.modem.quectel_bg9x.build

build error report:

region `SRAM' overflowed by 20688 bytes
collect2: error: ld returned 1 exit status

Signed-off-by: Hake Huang <hake.huang@oss.nxp.com>
2022-01-21 12:29:49 -05:00
Hake Huang a59e994322 soc: add auido clock init per soc
RT11xx and RT10xx have different audio clock settings
so add them in soc.c

Signed-off-by: Hake Huang <hake.huang@oss.nxp.com>
2022-01-21 11:26:45 -06:00
Hake Huang 8ae222641d config: soc: add i2s support in rt1170 soc
add HAS_MCUX_I2S in soc config

Signed-off-by: Hake Huang <hake.huang@oss.nxp.com>
2022-01-21 11:26:45 -06:00
Hake Huang 230c6d511c document: board: mimxrt1170_evk add SAI support
add information for SAI module

Signed-off-by: Hake Huang <hake.huang@oss.nxp.com>
2022-01-21 11:26:45 -06:00
Hake Huang 3fe4ff0548 board: mximxrt1170_evk: enable sai1
enable sai1 on mximxrt1170_evk board

Signed-off-by: Hake Huang <hake.huang@oss.nxp.com>
2022-01-21 11:26:45 -06:00
Hake Huang 710c3ca3ef bindings: ccmv2: add more SAI clock supports in RT11xx
add RT11xx SAI1-4 clock supports in dts binding

Signed-off-by: Hake Huang <hake.huang@oss.nxp.com>
2022-01-21 11:26:45 -06:00
Hake Huang 6d621787e4 dts: rt11xx: add sai1-4 support
add sai1-4 support in rt11xx series

adjust the dts settings for sai on CM7 and CM4

Signed-off-by: Hake Huang <hake.huang@oss.nxp.com>
2022-01-21 11:26:45 -06:00
Hake Huang ef0b87c4de driver: sai: add RT11XX support
RT11xx series use CCMV2 need special processing

Signed-off-by: Hake Huang <hake.huang@oss.nxp.com>
2022-01-21 11:26:45 -06:00
Hake Huang 0525ad3d46 clock: ccmv2: add SAI CCM clocks for RT11xx
add SAI CCMV2 clocks for RT11xx series

Signed-off-by: Hake Huang <hake.huang@oss.nxp.com>
2022-01-21 11:26:45 -06:00
Dominik Ermel 2f7c2333c8 mgmt/mcumg/lib: Use Kconfig options directly in img mgmt
The commit removes internal names given to Kconfig options,
in img_mgmt_config.h, and modifies code to use the Kconfig options
directly.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2022-01-21 11:34:38 -05:00
Immo Birnbaum d81485ecb7 boards: arm: qemu_cortex_a9: specify CPU cores at board level
Move the declaration of the available CPU core to the device
tree of the target board, in accordance with the modifications
of the SoC-level device tree.

Signed-off-by: Immo Birnbaum <Immo.Birnbaum@Weidmueller.com>
2022-01-21 11:34:09 -05:00
Immo Birnbaum d6c9475fce dts: arm: xilinx: zynq7000: remove "cpus" node from SoC DT
Remove the "cpus" node from the SoC device tree. The Zynq-7000
comes with either 1 or 2 CPU cores. While all the different
models within this SoC family have different capabilities in
particular when it comes to the programmable logic part and
I/O pins, there is no difference between the XC7Zxxx (2 cores)
and XC7ZxxxS (1 core) models when it comes to the peripherals
integrated in the SoC. Therefore, it makes little sense to
add a zynq7000s.dtsi next to the existing zynq7000.dtsi whose
only difference is the CPU count. Instead, the "cpus" node,
containing the appropriate CPU core definitions for the SoC
the respective target is equipped with, shall be specified at
the board level instead.

Signed-off-by: Immo Birnbaum <Immo.Birnbaum@Weidmueller.com>
2022-01-21 11:34:09 -05:00
Immo Birnbaum dffcb1d6f9 soc: arm: xilinx_zynq7000: Re-organize SoC data and init code
Re-organize the SoC family/series/model configuration data so that:
* Board definitions can distinguish between the single-core (XC7ZxxxS)
and dual-core (XC7Zxxx) ARM Cortex-A9 models. Further descriptions
of on-chip resources, in particular relating to the programmable logic
capabilities if support of this functionality is to be implemented,
can be added at a later time.
* Separate SoC initialization code exists for the two series, so that
the init code of the XC7Zxxx series can consider SMP while the init
code of the single-core XC7ZxxxS series doesn't have to.
* Device drivers which don't have to distinguish between the single-
and double-core series of the SoC family can use a common configuration
item whenever the pre-processor is used to enable Zynq-7000-specific
code.

Signed-off-by: Immo Birnbaum <Immo.Birnbaum@Weidmueller.com>
2022-01-21 11:34:09 -05:00
Immo Birnbaum 1b088adbdf drivers: serial: xlnx_ps: update referenced SoC configuration items
Update the Kconfig configuration items used to determine if the current
target is based on the Zynq-7000 SoC family as part of the re-organi-
zation of the Zynq-7000 SoC configuration data.

Signed-off-by: Immo Birnbaum <Immo.Birnbaum@Weidmueller.com>
2022-01-21 11:34:09 -05:00
Immo Birnbaum 99a6598b98 drivers: ethernet: xlnx_gem: update referenced SoC configuration items
Update the Kconfig configuration items used to determine if the current
target is based on the Zynq-7000 SoC family as part of the re-organi-
zation of the Zynq-7000 SoC configuration data.

Signed-off-by: Immo Birnbaum <Immo.Birnbaum@Weidmueller.com>
2022-01-21 11:34:09 -05:00
Immo Birnbaum 9ac8daf9d2 boards: arm: qemu_cortex_a9: update referenced SoC configuration items
Update the Kconfig and DTS configuration items referencing the Zynq-7000
SoC family and the particular Zynq series and model simulated by this
board as part of the re-organization of the Zynq-7000 SoC configuration
data.

Signed-off-by: Immo Birnbaum <Immo.Birnbaum@Weidmueller.com>
2022-01-21 11:34:09 -05:00
Dominik Ermel 6bbc261402 mgmt/mcumg/lib: Use Kconfig options directly in fs mgmt
The commit removes internal names given to Kconfig options,
in fs_mgmt_config.h, and modifies code to use the Kconfig options
directly.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2022-01-21 11:32:56 -05:00
Ryan Erickson c6ace45a6c net: lwm2m: add uCIFI Battery object (3411)
Add the uCIFI Battery object to support
monitoring a devices battery.

Signed-off-by: Ryan Erickson <ryan.erickson@lairdconnect.com>
2022-01-21 11:32:08 -05:00
Robert Lubos 4557d183b9 net: http_client: Set body_start pointer unconditionally
Set `body_start` pointer regardless of the body position in the recv
buffer. In result, the pointer shall indicate correctly position of the
body for each fragment, it's also explicit now that if the pointer is
not set for a fragment, there's no body in that particular fragment.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2022-01-21 11:31:49 -05:00
Robert Lubos d002f8a524 net: lwm2m: Fix attribute sanity check
Validate the respective attribute parameters only if both are provided
at given level. This prevents from comparing for instance unset pmax
value (equal to 0) with some new pmin value sent by the server.

Additionally, fix the sanity check for the `pmax` value set on observer,
after fetching the attribute value at all levels (including the default
value at from the server object). Instead of using wrong max(pmin, pmax)
formula, set the pmax value only if it's a valid one (>= pmin),
otherwise ignore the value and set it to 0. This makes the notification
engine ignore the pmax value set for observation.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2022-01-21 11:31:20 -05:00
Sylvio Alves b777b1dd6f counter: esp32: fix build failure and warnings
PR #41918 introduced a few warnings and build failure due to
missing data cofniguration and DEV_CFG() removal.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2022-01-21 11:27:48 -05:00
Sylvio Alves 224ec1e835 uart: esp32: move hal instance to data level
After #41918, DEV_CFG removal triggered discard qualifer warning
during build. As uart_hal functions don't required const qualifier
and uart_context_hal_t has modified data, this PR moves hal instace
to data struct instead of config struct.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2022-01-21 11:27:48 -05:00
Sylvio Alves 64755b6453 gpio: esp32: remove discard qualifier warning
After #41918, build started to warn discard qualifer
in config struct. This adds const into those structs.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2022-01-21 11:27:48 -05:00