Commit graph

80630 commits

Author SHA1 Message Date
Lucas Tamborrino d8332d1de5 debug: coredump: flash partition: Use K_NO_WAIT when in ISR
This code is meant to run in the context of a exception.
Most architectures will fail the asertion made in z_impl_k_sem_take()
when timeout is not K_NO_WAIT.

This commit ensures K_NO_WAIT is used when arch_is_in_isr() is true.

Signed-off-by: Lucas Tamborrino <lucas.tamborrino@espressif.com>
2023-06-21 16:06:06 -04:00
Lucas Tamborrino 8acedc61d1 drivers: flash: esp32xx: use K_NO_WAIT when in ISR
Avoid timeout when taking semaphores in ISR.

This enables flash operations inside interrupted context
such as exceptions, allowing operations like saving core
dump to flash for instance.

Signed-off-by: Lucas Tamborrino <lucas.tamborrino@espressif.com>
2023-06-21 16:06:06 -04:00
Lucas Tamborrino eb028ccf55 debug: coredump: xtensa: Add esp32s3
Add coredump support for esp32s3.

Signed-off-by: Lucas Tamborrino <lucas.tamborrino@espressif.com>
2023-06-21 16:06:06 -04:00
Lucas Tamborrino ba3766a75f debug: coredump: xtensa: add esp32s2
Add coredump support for esp32s2.

Signed-off-by: Lucas Tamborrino <lucas.tamborrino@espressif.com>
2023-06-21 16:06:06 -04:00
Lucas Tamborrino fbbb82d6ac debug: coredump: esp32: Fix registers index for current toolchain
The current toolchain version for espressif SoCs does not
have the same limitation on registers indexing as the previous
one, enabling sending the correct A0-A15 register values directly

Signed-off-by: Lucas Tamborrino <lucas.tamborrino@espressif.com>
2023-06-21 16:06:06 -04:00
Daniel Leung 71b522cfdd tests: kernel/mp: move CONFIG_KERNEL_COHERENCE to Kconfig
This moves CONFIG_KERNEL_COHERENCE from prj.conf to Kconfig.
This gets rid of the cmake warning where CONFIG_KERNEL_COHERENCE
is assigned the value 'y' but gets the value ''. This is simply
done to avoid confusion when running the test manually.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2023-06-21 13:59:36 -04:00
Peter Mitsis 4c7aeb252d doc: Correct msgq data item size discrepancy
Updates the data passing summary table to indicate that the size of
a message queue data item must be a multiple of its data alignment.
This brings the documentation in both the summary table and the
message queue documentation into alignment.

Signed-off-by: Peter Mitsis <peter.mitsis@intel.com>
2023-06-21 13:57:15 -04:00
Tomasz Bursztyka 257deba9c2 drivers/pcie: Fix copyright year
Trivial update that was missed.

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2023-06-21 13:57:01 -04:00
Adrian Warecki d13dfb9d23 dmic: Allow use of reserved bits in CIC_CONTROL register
Since the mtl platform, the stereo bit has been removed from the
CIC_CONTROL register and now it is marked as reserved. On some platforms
(mtl and above), the configuration blob still has this bit set, causing the
dmic driver to report an error. This commit changes the behavior of the
driver to only display a warning.

Signed-off-by: Adrian Warecki <adrian.warecki@intel.com>
2023-06-21 13:56:16 -04:00
Aleksandr Khromykh 10ef3b46d8 Bluetooth: Mesh: fix provisionee public key usage
Provisionee shall fail if provisioner sent public key
identicall to OOB public key back.

Signed-off-by: Aleksandr Khromykh <aleksandr.khromykh@nordicsemi.no>
2023-06-21 16:49:54 +02:00
Armin Brauns 3bef10f398 net: ip: always cancel IPv6 DAD when address is removed
If the address was removed immediately after being added (e.g. because the
interface MAC address is changed on boot), it would remain in the DAD timer
list.

In one scenario, the DAD timeout would eventually fire, causing the
now-removed address to be modified, potentially causing issues that way.

In another scenario, if the interface was immediately brought back up
again with a different link-local address, this new address would reuse the
first address slot on the interface. Starting the DAD process for this new
address would lead to the same address slot being added to the DAD timer
list a second time, causing an infinite list and associated lockup during
iteration.

Always remove the address from the DAD timer list when it is removed from
the interface, not just when DAD fails.

Signed-off-by: Armin Brauns <armin.brauns@embedded-solutions.at>
2023-06-21 16:07:21 +02:00
Jonathan Rico 8a65b3f337 tests: Bluetooth: don't assume handle is 0
Don't assume the connection handle will always be 0. This is currently the
case with the Zephyr link layer, but recently changed in the Softdevice
Controller.

Another problem is that apparently the spec allows the controller to just
blackhole data instead of returning `BT_HCI_ERR_UNKNOWN_CONN_ID` if the
host uses a wrong handle.

Signed-off-by: Jonathan Rico <jonathan.rico@nordicsemi.no>
2023-06-21 16:07:05 +02:00
Jaska Uimonen c022f41c1e drivers: dai: intel: dmic: fix irq argument cast
The argument to the dmic irq is of type "struct device *" and dmic data
is actually part of it, thus make the cast correctly.

Signed-off-by: Jaska Uimonen <jaska.uimonen@linux.intel.com>
2023-06-21 16:06:44 +02:00
Troels Nilsson 7c6eb242a9 Bluetooth: Fix endianness handling for ext scan reports evt_type
evt_type is 16 bits and thus requires endianness conversion over HCI

Signed-off-by: Troels Nilsson <trnn@demant.com>
2023-06-21 16:06:36 +02:00
Huifeng Zhang 9edd2951ef tests: kernel: fpu_sharing: Add double type support
Use double type when FPU supports double precision.

Signed-off-by: Huifeng Zhang <Huifeng.Zhang@arm.com>
2023-06-21 16:06:08 +02:00
Huifeng Zhang 1cec85dc07 tests: kernel: fpu_sharing: Enable it on VFP platfrom of aarch32
- Remove raising compilation error in `float_regs_arm_gcc.h`
    These macros are checked in 'load_store.c', so no need to check them
    again in 'float_regs_arm_gcc.h'

- Enable this test on the VFP platform of aarch32

Signed-off-by: Huifeng Zhang <Huifeng.Zhang@arm.com>
2023-06-21 16:06:08 +02:00
Huifeng Zhang c1ecb8faaa arch: arm: enable FPU and FPU sharing for v8r aarch32
This commit is to enable FPU and FPU_SHARING for v8r aarch32.

Signed-off-by: Huifeng Zhang <Huifeng.Zhang@arm.com>
2023-06-21 16:06:08 +02:00
Huifeng Zhang 89ea503b29 arch: arm: Add support for 32 double-precision registers
This adds support for 32 double-precision registers in the context
switching of aarch32 architecture.

Signed-off-by: Huifeng Zhang <Huifeng.Zhang@arm.com>
2023-06-21 16:06:08 +02:00
Huifeng Zhang b0612e14e0 arch: arm: save 'fpscr' in the svc and isr handler
`fpscr` is assigned from `struct __fpu_sf.fpscr` in `vfp_restore`, but it
wasn't saved into `struct __fpu_sf.fpscr` in the svc and isr handler, So
it may be a dirty value.

    - Fix it by saving `fpscr` in the svc hand isr handler.
    - Jump out if FPU isn't enabled

Signed-off-by: Huifeng Zhang <Huifeng.Zhang@arm.com>
2023-06-21 16:06:08 +02:00
Georgij Cernysiov f09e3abbcb drivers: flash: stm32 ospi: configure ospim io ports
Allows to configure OSPI Manager IO ports with devicetree.

If properties are absent, then original default values
are preserved for compatibility.

Signed-off-by: Georgij Cernysiov <geo.cgv@gmail.com>
2023-06-21 16:06:00 +02:00
Georgij Cernysiov 5cde75688e dts: bindings: ospi: add ospim io ports
Adds properties to configure OCTOSPI IO
Manager data lines. That allows to use
any `IOLowPort` and `IOHightPort`.

Note: OSPIM requires additional clock to be enabled.
      Please refer to Reference Manual.
      Extra clock can be enabled in devicetree.

Signed-off-by: Georgij Cernysiov <geo.cgv@gmail.com>
2023-06-21 16:06:00 +02:00
Georgij Cernysiov 0ea2e7c906 drivers: flash: stm32 ospi: move STM32 OSPI node
Move `STM32_OSPI_NODE` to the top.
That allows its usage in other macros that require
OSPI bus.

Signed-off-by: Georgij Cernysiov <geo.cgv@gmail.com>
2023-06-21 16:06:00 +02:00
Kamil Gawor 82bff62276 ipc: icmsg: Align naming for buffers
This remanes send_buffer to tx_buffer to be
consistent with Rx buffer naming and with
mbox naming.

Signed-off-by: Kamil Gawor <Kamil.Gawor@nordicsemi.no>
2023-06-21 15:56:02 +02:00
Kamil Gawor b7f14ee94f ipc: icmsg: Improve packets reception
This improves packet reception and fix an issue
where packets bigger than internal Rx buffer
were silently dropped. In current solution
local data coping for reception is not needed.
User gets direct pointer to shared memory which
allow to efficient receive as much data as was sent.

Signed-off-by: Kamil Gawor <Kamil.Gawor@nordicsemi.no>
2023-06-21 15:56:02 +02:00
Kamil Gawor 3cbc2249ce os: spsc_buf: Clarify claim function doc
This clarifies the spsc_buf_claim function documentation.
It should be easier now to understand what this function
does and what are returned memory properties.

Signed-off-by: Kamil Gawor <Kamil.Gawor@nordicsemi.no>
2023-06-21 15:56:02 +02:00
Vinayak Kariappa Chettimada 8c7140a9c0 Bluetooth: Controller: Fix BT_CTLR_CENTRAL_SPACING to ticks conversion
Fix missing BT_CTLR_CENTRAL_SPACING in microseconds to ticks
conversion.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2023-06-21 14:49:36 +02:00
Christopher Friedt d4ea1c920b tests: drivers: rtc: add a y2k test
Ensure that the RTC is capable of transitioning from
Dec 31, 1999 to Jan 1, 2000.

Signed-off-by: Christopher Friedt <cfriedt@meta.com>
2023-06-21 08:20:45 -04:00
Christopher Friedt bf4977e41b drivers: rtc: mc146818: changes for y2k test
The year needs to be corrected to an offset from 1900.

Signed-off-by: Christopher Friedt <cfriedt@meta.com>
2023-06-21 08:20:45 -04:00
Anas Nashif 84d8841497 MAINTAINERS: add twister related files to area
Add pytest plugin and related documenation.

Also add gchwier to collabs.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2023-06-21 08:02:59 -04:00
Jamie McCrae eff9f731b1 doc: release: 3.5: Add note on MGMT_EVT_OP_CMD_RECV
Adds a note that this MCUmgr notification hook can now be used
to reject commands and send an error back to the client.

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2023-06-21 13:24:12 +02:00
Jamie McCrae 6877ad413f mgmt: mcumgr: smp: Allow preventing command execution via hook
Adds status checking to the command status hook which allows an
application to inspect a request and, optionally, reject it.

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2023-06-21 13:24:12 +02:00
Jamie McCrae 0b6077443d mgmt: mcumgr: grp: img_mgmt: Add optional mutex lock support
Adds an optional Kconfig that adds mutex locks to image management
group functions, this prevents collision between multiple threads
and/or transports.

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2023-06-21 13:24:01 +02:00
Supper Thomas 3a13070dcc boards: arm: Fix the vendor name
Fix the vendor name from st to alientek

Signed-off-by: Supper Thomas <78900636@qq.com>
2023-06-21 09:37:32 +00:00
Anas Nashif f573a702de tests: mcumgr: os_mgmt_info: simplify test yaml file
- Use common section to avoid duplication of excludes
- use mcumgr tag

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2023-06-21 09:36:24 +00:00
Jordan Yates 6271f2fa56 net: if: default NET_IF_LOWER_UP at compile time
The `net_if` layer should not be forcing `NET_IF_LOWER_UP` to be set on
all interfaces at runtime. Because `net_init` runs relatively late by
default, this is overriding any control the driver itself may have
performed using `net_if_carrier_on/off`.

Initialise this bit at compile-time instead. As the structure is already
being initialised, this doesn't increase any footprints.

Signed-off-by: Jordan Yates <jordan.yates@data61.csiro.au>
2023-06-21 09:35:49 +00:00
sukrit buddeewong c5bb959b25 driver: uart: Fix Modbus data currupted by DE-RE signal
Add UART_UARTFR_BUSY_BITS To fix modbus data was currupted

Signed-off-by: sukrit buddeewong <sukrit.omu@gmail.com>
2023-06-21 09:34:08 +00:00
cyliang tw 246bd7a290 board: arm: add support for nuvoton pfm m467
add support for nuvoton pfm m467 development board

Signed-off-by: cyliang tw <cyliang@nuvoton.com>
2023-06-21 09:26:00 +00:00
cyliang tw 0fd564ef7f drivers: gpio: support for Nuvoton numaker series GPIO
Add Nuvoton numaker series GPIO support, including interrupt mode and
also integrate clock control.

Signed-off-by: cyliang tw <cyliang@nuvoton.com>
2023-06-21 09:26:00 +00:00
cyliang tw 6176687c88 drivers: serial: support for Nuvoton numaker series UART
Add Nuvoton numaker series UART support, including interrupt-driven,
also apply pinctrl and clock-control.

Signed-off-by: cyliang tw <cyliang@nuvoton.com>
2023-06-21 09:26:00 +00:00
cyliang tw c448dceb57 drivers: reset: add support for NuMaker series reset
Add Nuvoton numaker series reset controller support.

Signed-off-by: cyliang tw <cyliang@nuvoton.com>
2023-06-21 09:26:00 +00:00
cyliang tw 4ad399d54d drivers: clock_control: add support for Nuvoton numaker series CLK
Add Nuvoton numaker series clock controller support, including:
1.  Do system clock initialization in z_arm_platform_init().
2.  Support peripheral clock control API equivalent to BSP
    CLK_EnableModuleClock()/CLK_SetModuleClock().

Signed-off-by: cyliang tw <cyliang@nuvoton.com>
2023-06-21 09:26:00 +00:00
cyliang tw 5879810137 drivers: pinctrl: add support for NuMaker series pinctrl
Add Nuvoton numaker series pinctrl support.

Signed-off-by: cyliang tw <cyliang@nuvoton.com>
2023-06-21 09:26:00 +00:00
cyliang tw 512371b75b soc: arm: add support for nuvoton numaker m46x series
Add initial support for nuvoton numaker m46x SoC series including
basic init.

Signed-off-by: cyliang tw <cyliang@nuvoton.com>
2023-06-21 09:26:00 +00:00
Seppo Takalo 95cef5f3ab net: lwm2m: Ensure string termination
When writing string data to resources which are string types,
we should count in the terminating character into the data length.

Corner cases exist where LwM2M resource type is opaque but
lwm2m_get_string() or lwm2m_set_string() are used to read/write
the data. We must ensure string termination on those case, but
terminating character must not be stored in the engine buffer
or counted in the data length as this might be considered
as part of the binary data.

Fixes #59196

Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
2023-06-21 10:42:31 +02:00
Emil Gydesen 8b9815aff6 Bluetooth: IAS: Fix alert level loop
The loop was supposed to set the alert level to the highest
value by any device. The loop, however, only made sense if
CONFIG_BT_MAX_CONN > 1.

It has been modified to start from [0] instead of [1] and
the initial condition was modified.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2023-06-21 09:34:49 +02:00
Chaitanya Tata 54b8044d03 boards: thingy53: Fix missing entry for CPUNET
CPUNET uses a diffetent DTS file and the edge connector entry was
missed, this causes build issue for CPUNET.

Fixes 017ff78466("boards: thingy53: Update DTS files to support
expansion boards").

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2023-06-21 09:34:03 +02:00
Luca Fancellu 38a43b0eec net: config: Add VLAN identifier as network initial configuration
Add a new Kconfig parameter NET_CONFIG_MY_VLAN_ID as initial network
configuration to enable users to set VLAN identifier at startup.

Add a new setup_vlan(...) function to setup the VLAN identifier in
the device, the call have an effect only when NET_CONFIG_MY_VLAN_ID
is above zero.

Signed-off-by: Luca Fancellu <luca.fancellu@arm.com>
2023-06-21 09:32:41 +02:00
Luca Fancellu b3f5db0c71 net: eth: Fix ethernet max header size on VLAN presence
Currently NET_ETH_MAX_HDR_SIZE is computed as the size of the
structure struct net_eth_hdr, but this does not take into account
the additional 4 bytes on the ethernet frame header in the presence
of VLAN, fix the issue using the size of struct net_eth_vlan_hdr
when CONFIG_NET_VLAN is enabled.

Signed-off-by: Luca Fancellu <luca.fancellu@arm.com>
2023-06-21 09:32:15 +02:00
Gerard Marull-Paretas 48b201cc53 device: make device dependencies optional
Device dependencies are not always required, so make them optional via
CONFIG_DEVICE_DEPS. When enabled, the gen_device_deps script will run so
that dependencies are collected and part of the final image. Related
APIs will be also made available. Since device dependencies are used in
just a few places (power domains), disable the feature by default. When
not enabled, a second linking pass will not be required.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2023-06-21 09:32:05 +02:00
Gerard Marull-Paretas b6d5d246b7 scripts: build: gen_device_deps: s/--dynamic-handles/--dynamic-deps
Align naming of the CLI option with recent changes in handles naming.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2023-06-21 09:32:05 +02:00