Commit graph

89895 commits

Author SHA1 Message Date
HaiLong Yang be2700a8d9 boards: update stm32h747i_disco display
This update stm32h747i_disco board display config to use ltdc frame
buffer config feature.

For lvgl, by default ltdc frame buffer number set to 0.

Signed-off-by: HaiLong Yang <hailong.yang@brainco.cn>
2024-01-17 14:43:20 +01:00
HaiLong Yang 39d74f1fd4 drivers: display: stm32 ltdc frame buffer number config
This add frame number config to stm32 ltdc. Line interrupt is enabled
to load new frambe buffer.

Signed-off-by: HaiLong Yang <hailong.yang@brainco.cn>
2024-01-17 14:43:20 +01:00
HaiLong Yang 83f89da24e drivers: memc: stm32 fmc add clock source select
FMC default clock is hclk, it may affected by sys_ck change.

Signed-off-by: HaiLong Yang <hailong.yang@brainco.cn>
2024-01-17 14:43:20 +01:00
HaiLong Yang 08cd5eb91d drivers: display: update otm8009a config
OTM8009A_MCS_NO_DOC2(0xCFD0U) only write buf[0], but write length
set to 3.

Signed-off-by: HaiLong Yang <hailong.yang@brainco.cn>
2024-01-17 14:43:20 +01:00
Gerhard Jörges 2a0e5e93f3 logging: net: update hostname
This commit adds a function that updates the hostname displayed by the
net backend. It is called by the network stack when the hostname is
updated.

Signed-off-by: Gerhard Jörges <joerges@metratec.com>
2024-01-17 14:42:58 +01:00
Gerhard Jörges 13740696c7 tests: net: hostname: add test for net_hostname_set
Add test that sets the hostname.

Signed-off-by: Gerhard Jörges <joerges@metratec.com>
2024-01-17 14:42:58 +01:00
Gerhard Jörges 72a51c7ec4 net: add set hostname function
This commit adds a function to set the hostname on runtime.

Signed-off-by: Gerhard Jörges <joerges@metratec.com>
2024-01-17 14:42:58 +01:00
Yong Cong Sin 98a631b5bc posix: pthread: allow oldstate & oldtype to be NULL
The POSIX standard doesn't specify if the argument to store
previous state/type in
`pthread_setcancelstate`/`pthread_setcancelstate` can be
`NULL`, but threading implementations in Linux & Apache NuttX
permit the arguments to be `NULL`.

This commit changes Zephyr's implementation to mimic that of
Linux & NuttX, so that user do not get caught off-guard by
NULL pointer dereferencing when porting code over from those
OSes.

Updated test accordingly.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2024-01-17 14:42:50 +01:00
Jonathan Rico 81d524d081 Bluetooth: L2CAP: always send from workqueue
Always pull from the channel queue from the system workqueue context.
This simplifies debugging.

This also allows us to remove `sent` from the metadata struct.

Signed-off-by: Jonathan Rico <jonathan.rico@nordicsemi.no>
2024-01-17 14:42:40 +01:00
Jonathan Rico 2dcb91ab46 Bluetooth: L2CAP: extract LE part of bt_l2cap_chan_send
Separate most of the param checking in `bt_l2cap_chan_send()`, with the
logic in `bt_l2cap_dyn_chan_send()`.

Signed-off-by: Jonathan Rico <jonathan.rico@nordicsemi.no>
2024-01-17 14:42:40 +01:00
Vinayak Kariappa Chettimada 60c0087555 Bluetooth: Controller: Fix ISO Sync Receiver time reservation calc
Fix missing ISO Synchronized Receiver radio event time
reservation that did not calculate for all the subevents.

Introduce BT_CTLR_SYNC_ISO_RESERVE_MAX Kconfig option to
allow using a minimal time reservation if needed to allow
other role to pre-empt ISO Synchronized Receiver in
pre-transmission and control subevents.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2024-01-17 14:42:32 +01:00
Jordan Yates 7e7ab495c3 wifi: esp_at: compile without NET_NATIVE_IPV4
Allow the driver to compile without `CONFIG_NET_NATIVE_IPV4`. This can
happen if the driver is only desired for SSID scanning.

Signed-off-by: Jordan Yates <jordan.yates@data61.csiro.au>
2024-01-17 14:42:19 +01:00
Anas Nashif abef8bde4e twister: reuse test schema in common section
Rather than duplicating the same schema, define it only once and reuse
for both common section and tests section.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-01-17 14:42:10 +01:00
Bjarki Arge Andreasen 4403d8f4c6 tests: lib: devicetree: api: Add tests for IRQ_INTC_* macros
Extend api test suite to cover the new devicetree macros. This
includes extending the devicetree overlay with two new bindings:

- GPIO device which is also an interrupt controller
- interrupt holder using interrupts-extended to point to both
  existing interrupt controller test_intc, and the newly added
  GPIO device

Signed-off-by: Bjarki Arge Andreasen <bjarki@arge-andreasen.me>
2024-01-17 13:18:00 +01:00
Bjarki Arge Andreasen 6516e7fac2 devicetree.h: Add macros for interrupt specifiers intc
Add the following macros to devicetree.h to get an interrupt
specifier's interrupt controller:

DT_IRQ_INTC_BY_IDX(node_id, idx)
DT_IRQ_INTC_BY_NAME(node_id, name)
DT_IRQ_INTC(node_id)

and their INST variants

DT_INST_INTC_BY_IDX(inst, idx)
DT_INST_INTC_BY_NAME(inst, name)
DT_INST_IRQ(inst)

which use the newly generated _CONTROLLER output from the
previous commit.

Signed-off-by: Bjarki Arge Andreasen <bjarki@arge-andreasen.me>
2024-01-17 13:18:00 +01:00
Bjarki Arge Andreasen 08d6ff059e scripts: dts: gen_defines: Generate interrupt-controller macro
Extend the gen_defines.py write_interrupts(node) function to
generate macros to get the interrupt controller for an
interrupt specifier by idx and by name.

The information is already generated by edtlib.py and stored in
node.interrupts[].controller. This addition uses the node pointed
to by the controller member to generate the following example output

define DT_N_S_device1_IRQ_IDX_0_CONTROLLER \
       DT_N_S_gpio_800

define DT_N_S_device1_IRQ_NAME_test4_CONTROLLER \
       N_S_device1_IRQ_IDX_0_CONTROLLER

Signed-off-by: Bjarki Arge Andreasen <bjarki@arge-andreasen.me>
2024-01-17 13:18:00 +01:00
Sateesh Kotapati cbc9439bc0 gecko: se_manager files updated | Update to GSDK 4.4.0
Updated the files present in gecko/se_manager folder in Silabs HAL
as per latest version of gecko_sdk.

Signed-off-by: Sateesh Kotapati <sateesh.kotapati@silabs.com>
2024-01-17 11:45:57 +01:00
Yong Cong Sin d4c2d4140b tests: posix: common: turn the fdtable init test into a testsuite
As there isn't any ZTEST under the `posix_apis` testsuite, its
the testsuite is skipped and its setup function never ran,
let's convert the fdtable initialization setup function into a
test of `posix_apis`.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2024-01-17 05:41:37 -05:00
Yong Cong Sin 498529ea76 tests: posix: common: split posix_apis into multiple testsuites
Currently all components live under the `posix_apis` testsuite,
this commit split them into a testsuite of their own.

This commit also prefixed a few local functions/variables with
the `static` keyword.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2024-01-17 05:41:37 -05:00
Yong Cong Sin 73e20a8967 posix: clock: add ztest rule to reset clock base
Make sure that the POSIX clock base is reset after every
testsuite so that the initial time is the same for every test.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2024-01-17 05:41:37 -05:00
Christopher Friedt e223d01b67 tests: posix: shorten the filter in testcase.yaml
CONFIG_NATIVE_LIBC can be used in place of
CONFIG_NATIVE_BUILD and CONFIG_EXTERNAL_LIBC

Signed-off-by: Christopher Friedt <cfriedt@meta.com>
2024-01-17 04:59:16 -05:00
Christopher Friedt 574e641297 samples: cpp: add a Hello, world! C++ app
Create a separate hello world C++ app for Zephyr.

Signed-off-by: Christopher Friedt <cfriedt@meta.com>
2024-01-17 09:56:34 +01:00
Martin Jäger db24a8b461 boards: arm: lora_e5_dev_board: add flash partitions
Add flash partitions required to use the board with MCUboot.

Also fix the chosen zephyr,code-partition devicetree node and point it
to slot0_partition.

Signed-off-by: Martin Jäger <martin@libre.solar>
2024-01-17 09:56:10 +01:00
Martin Jäger 8a3ba22f79 boards: arm: nucleo_wl55jc: add flash partitions
Add flash partitions required to use the board with MCUboot.

Also fix the chosen zephyr,code-partition devicetree node and point it
to slot0_partition.

Signed-off-by: Martin Jäger <martin@libre.solar>
2024-01-17 09:56:10 +01:00
Mustafa Abdullah Kus 3135a4cd0b drivers: spi: spi_ll_stm32: add midi and mssi impl
Master Inter-Data Idleness and Master SS Idleness
can configure with STM32 low level spi driver apis.

Signed-off-by: Mustafa Abdullah Kus <mustafa.kus@sparsetechnology.com>
2024-01-17 09:56:03 +01:00
Mustafa Abdullah Kus 0f9ebbded3 dts: bindings: st,stm32h7-spi: add mssi and midi property
add Master Inter-Data Idleness and
Master SS Idleness field. That fields
are integers.

Signed-off-by: Mustafa Abdullah Kus <mustafa.kus@sparsetechnology.com>
2024-01-17 09:56:03 +01:00
Peter Mitsis 5c18a00d37 arch: xtensa: Use wsr.lowercase over wsr.UPPERCASE
wsr.UPPERCASE can lead to compiler errors when UPPERCASE matches
a macro defined in the special register header file.

Signed-off-by: Peter Mitsis <peter.mitsis@intel.com>
2024-01-17 09:55:57 +01:00
Peter Mitsis 2075a1b770 arch: xtensa: Use rsr.lowercase over rsr.UPPERCASE
rsr.UPPERCASE can lead to compiler errors when UPPERCASE matches
a macro defined in the special register header file.

Signed-off-by: Peter Mitsis <peter.mitsis@intel.com>
2024-01-17 09:55:57 +01:00
Guennadi Liakhovetski e7217925c9 ace: use a 'switch' statement in pm_state_set()
Use 'switch' to emphasise that we're handling different values of
'state' in pm_state_set().

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2024-01-17 09:55:48 +01:00
Guennadi Liakhovetski c99a604bbf ace: remove superfluous variable initialisation
'ret' in pm_state_set() is always set before it's used, no need to
initialise it.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2024-01-17 09:55:48 +01:00
Guennadi Liakhovetski a1fd8cd078 runtime-pm: remove a superfluous k_is_pre_kernel() test
If runtime_suspend() is called early during Zephyr initialisation,
while k_is_pre_kernel() returns 'true,' 'async' is set to 'false,' so
if 'async' is 'true,' Zephyr initialisation is definitely complete,
so there is no need to check k_is_pre_kernel() again.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2024-01-17 09:55:48 +01:00
Guennadi Liakhovetski ac71dfae90 intel-adsp: use proper error codes
Use proper errno.h error codes in pd_intel_adsp_set_power_enable()
instead of -1.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2024-01-17 09:55:48 +01:00
Jukka Rissanen 16a54f251a net: sockets: Refactor accept() to support objcore better
If user has not supplied address pointer when calling accept(),
then we would not be able to figure out the used socket domain
properly. But as there is now SO_DOMAIN option supported, use
that to get the correct socket domain.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-01-17 09:55:40 +01:00
Jukka Rissanen 4c88169d03 tests: net: sockets: Add tests for SO_DOMAIN socket option
Make sure that the SO_DOMAIN is a read only value and it
returns correct socket domain (AF_INET or AF_INET6) in the
tests.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-01-17 09:55:40 +01:00
Jukka Rissanen 298ab2c95d net: socket: Add support for SO_DOMAIN option
The getsockopt() will return the address domain of the given
socket like AF_INET or AF_INET6.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-01-17 09:55:40 +01:00
Eduardo Montoya fe9e306a83 net: openthread: fix otLinkMetricsInit usage
Remove usage of `otPlatRadioGetReceiveSensitivity` without the
`otInstance` parameter.

Signed-off-by: Eduardo Montoya <eduardo.montoya@nordicsemi.no>
2024-01-17 09:55:34 +01:00
Ibe Van de Veire ba5bcb14ba net: ip: igmp: removed compiler warning when igmpv3 is enabled
Made the definition of in_addr all_routers conditional to remove
compiler warning:
warning: 'all_routers' defined but not used [-Wunused-const-variable=]
The warning occurs when igmpv3 is enabled.

Signed-off-by: Ibe Van de Veire <ibe.vandeveire@basalte.be>
2024-01-17 09:55:28 +01:00
Abderrahmane Jarmouni c55593cca3 board: arm: stm32h747i_disco: flashing
Add the possibility to flash stm32h747i_disco board using west
STM32CubeProgrammer runner, for both cores.

Signed-off-by: Abderrahmane Jarmouni <abderrahmane.jarmouni-ext@st.com>
2024-01-17 09:54:29 +01:00
Miika Karanki 7c0047263a shell: telnet: Don't close the connection on ENOBUFS error
If there's not enough networking buffers at certain moment,
they might become available later. So instead of closing connection
(and failing assertation) sleep and retry. This avoid the following
assertion failure when there's much of data to send:

    net_pkt: Data buffer (1500) allocation failed.
    net_tcp: conn: 0x20076024 packet allocation failed, len=1460
    shell_telnet: Failed to send -105, shutting down
    ASSERTION FAIL [err == 0] @ .../subsys/shell/shell_ops.c:416
    os: r0/a1:  0x00000004  r1/a2:  0x000001a0  r2/a3:  0x00000004
    os: r3/a4:  0x20044380 r12/ip:  0x00001958 r14/lr:  0x080c9027
    os:  xpsr:  0x41000000
    os: Faulting instruction address (r15/pc): 0x0811ed26
    os: >>> ZEPHYR FATAL ERROR 4: Kernel panic on CPU 0
    os: Current thread: 0x20045100 (shell_telnet)
    os: Halting system

Signed-off-by: Miika Karanki <miika.karanki@vaisala.com>
2024-01-17 09:54:15 +01:00
Tom Burdick 897553af17 logging: Remove hda log backend
The HDA log backend has been buggy for some time, and the fixes are well
understood. The issue with HDA log as it is implemented today means
there are concurrency and ISR issues where it can deadlock.

The fixes are effectively dropping the usage of ipc to communicate
status, using polling on the hda stream, and having a formatter per call
context (cores + isr) when log mode immediate is enabled to fix log
mangling. However it was found this had a lot of unintentional side
effects that made it difficult to make progress on when it came to
changes of the host side python tooling.

Meanwhile the feature has sat unused for nearly a year. Remove it, and
it can always be revisited in the future if something like it happens to
be needed.

Signed-off-by: Tom Burdick <thomas.burdick@intel.com>
2024-01-17 09:52:48 +01:00
Anas Nashif a0ac2faf9b intel_adsp: ace: enable power domain
Enable power domain drivers for this soc series as it is now needed in
the boot process.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-01-16 21:12:40 -08:00
Ian Morris 923201abc5 drivers: pinctrl: ra: fix write-protect register access
The write protect register (PWPR) found on RA Microcontrollers is an 8-bit
register at an odd address. It was being accessed using a pointer to a
uint32_t which causes a fault on some devices in the series.

Signed-off-by: Ian Morris <ian.d.morris@outlook.com>
2024-01-16 20:51:30 -05:00
Cong Nguyen Huu 9eb0a554f9 drivers: nxp_s32_canxl: add support RX FIFO
Driver supports both CAN classic and CAN FD frames
when using RX FIFO mode

Signed-off-by: Cong Nguyen Huu <cong.nguyenhuu@nxp.com>
2024-01-16 20:50:49 -05:00
Chekhov Ma c78f583ed7 tests: drivers: gpio_basic_api add board mimx93_evk_a55
Add mimx93_evk_a55.overlay to tests: drivers: gpio_basic_api

Signed-off-by: Chekhov Ma <chekhov.ma@nxp.com>
2024-01-16 20:50:11 -05:00
Chekhov Ma 97fabefa34 board: mimx93_evk_a55: add led and button definitions and alias
Tested with zephyr example project "samples/basic/blinky" and "samples/
basic/button". These examples can run out-of-the-box. No modification
needed.
for "samples/basic/blinky", the red LED inside RGB LED on board will
blink every 2 seconds.
for "samples/basic/button", the red LED inside RGB LED on board will
turn on once BTN1 on board is pressed down. An log will be present in
uart console as well.

Signed-off-by: Chekhov Ma <chekhov.ma@nxp.com>
2024-01-16 20:50:11 -05:00
Chekhov Ma 969792bc18 board: mimx93_evk_a55: enable rgpio
Add RGPIO 1,2,3,4 to mimx93_evk_a55 board dts

Signed-off-by: Chekhov Ma <chekhov.ma@nxp.com>
2024-01-16 20:50:11 -05:00
Chekhov Ma 4e59679ce5 soc: imx93: enable rgpio driver
Add HAS_MCUX_RGPIO to Kconfig.soc
Add gpio1 ~ gpio4 dts node and pinctrl node in nxp_mimx93_a55.dtsi

Signed-off-by: Chekhov Ma <chekhov.ma@nxp.com>
2024-01-16 20:50:11 -05:00
Chekhov Ma e1d495be81 driver: add new gpio driver "gpio_mcux_rgpio"
Add RGPIO gpio driver. This driver is used for i.MX93 and i.MX8ULP.
GPIO pinctrl, read/write and interrupt is supported. Runtime mmio
configuration is enabled, so no need for region definition in
mimx9/mmu_region.c

Signed-off-by: Chekhov Ma <chekhov.ma@nxp.com>
2024-01-16 20:50:11 -05:00
Martin Jäger 2effad3b11 drivers: rtc: pcf8563: fix ifdef for alarm_set_callback
The callback should only be available when CONFIG_RTC_ALARM is defined.

Signed-off-by: Martin Jäger <martin@libre.solar>
2024-01-16 20:49:19 -05:00
Martin Jäger 1fafa94a35 dts: bindings: rtc: pcf8563: remove unused wakeup-source
The wakeup-source is not used by the driver. Most probably this was
inadvertently left when copying the binding from pcf8523 driver.

Signed-off-by: Martin Jäger <martin@libre.solar>
2024-01-16 20:49:19 -05:00