Commit graph

15409 commits

Author SHA1 Message Date
Steven Chang
64b4a3fe08 drivers: pinctrl: initial device driver for ENE KB1200
Add pinctrl driver for ENE KB1200

Signed-off-by: Steven Chang <steven@ene.com.tw>
2024-03-15 09:39:48 +00:00
Benedikt Schmidt
4e4049d939 drivers: sensor: add diagnostics sensor for BD8LB600FS
Implement a sensor for the output diagnostics of the low side
switch BD8LB600FS.

Signed-off-by: Benedikt Schmidt <benedikt.schmidt@embedded-solutions.at>
2024-03-15 09:00:26 +01:00
Benedikt Schmidt
31450fcb12 drivers: gpio: split up driver for BD8LB600FS into a GPIO and MFD
Split up the driver for the low side switch BD8LB600FS into a GPIO
and MFD part.

Signed-off-by: Benedikt Schmidt <benedikt.schmidt@embedded-solutions.at>
2024-03-15 09:00:26 +01:00
Phi Bang Nguyen
c720ee1b1e include: video: Add XRGB32 pixel format
Add XRGB32 pixel format

Signed-off-by: Phi Bang Nguyen <phibang.nguyen@nxp.com>
2024-03-15 08:52:13 +01:00
sukrit buddeewong
3ad8d32d18 net: mqtt: Implement ALPN Support for socket mqtt
Implement the ALPN Support for Mqtt Library allow mqtt to have
ability to utilize ALPN for connect to server that support ALPN, such
as AWS IoT Core

Signed-off-by: sukrit buddeewong <sukrit.omu@gmail.com>
2024-03-14 17:04:11 -05:00
Rubin Gerritsen
7c2f26bd2a Bluetooth: Host: Add macros for contiuous scanner
It is often desired to maximize the chances of receiving advertising
when scanning. To achieve this, the scanner should be enabled all the time.

Some controller implementations (like Nordic's SoftDevice Controller)
handle scheduling differently when scan_window = scan_interval.
Having a macro that defines this scanning configuration simplifies
writing applications.

Signed-off-by: Rubin Gerritsen <rubin.gerritsen@nordicsemi.no>
2024-03-14 17:03:44 -05:00
Bjarki Arge Andreasen
9b583cc539 llext: arm: Add R_ARM_ARM_THM_CALL reloc support
Add support for the relocation type R_ARM_ARM_THM_CALL which is
produced for the ARM Thumb BL and BLX (branch immediate)
instructions.

These instructions are used for non-static functions like

void test1(void)
{
}

void main(void)
{
        test1();
}

Without support for this relocation, test1() has to be static.

Signed-off-by: Bjarki Arge Andreasen <bjarki@arge-andreasen.me>
2024-03-14 19:07:49 +00:00
Kurtis Dinelle
3c3bee96ef drivers: sensor: tsl2591
Add the tsl2591 sensor to drivers.

Signed-off-by: Kurtis Dinelle <kurtisdinelle@gmail.com>
2024-03-14 16:32:24 +00:00
Emil Lindqvist
b610312314 modem_cellular: add registration status API
This commit implements a network registration status API,
including return of reject cause in case of denial.

Signed-off-by: Emil Lindqvist <emil@lindq.gr>
2024-03-14 16:30:57 +00:00
Chen Xingyu
f34f060588 include: drivers: led: Correct comment for struct led_info
The comments for `index` and `num_colors` in `struct led_info` were
mistakenly swapped. This commit corrects them to accurately reflect their
actual purpose.

Signed-off-by: Chen Xingyu <hi@xingrz.me>
2024-03-14 09:58:45 +00:00
Mahesh Mahadevan
742a8e85d8 drivers: clock: Enable PORT & LP Flexcomm in NXP syscon driver
1. Add support to enable PORT control clocks
2. Add support for LP Flexcomm
3. MCX family has a different Clock API for USDHC.

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2024-03-13 22:38:46 +00:00
Mahesh Mahadevan
72fd8d14da drivers: mfd: Add NXP LP Flexcomm driver
1. This driver allows to configure the Low Power Flexcomm
   interface as a UART, SPI or I2C device.
2. Manages the interrupts and dispatches it to the
   appropriate device driver.
3. A Flexcomm interface can be configured to be used as
   I2C and UART device. However a SPI device cannot be used
   concurrently with I2C or UART. Add checks for this feature.

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2024-03-13 22:38:46 +00:00
Declan Snyder
52c4aeb7cb dts: nxp: Add RW6XX Devicetree
Add SOC devicetree for RW6XX

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-03-13 16:45:13 +00:00
Christopher Friedt
9a0b8e7809 posix: sysconf: use Z_SC_VAL_IFDEF for sysconf constants
Previously, CONFIG_MAX_TIMER_COUNT and CONFIG_MSG_COUNT_MAX were
used without checking if CONFIG_TIMER and CONFIG_POSIX_MQUEUE
were enabled.

Use Z_SC_VAL_IFDEF() to conditionally define those constants
based on their gating Kconfig values, otherwise, they are defined
to -1.

Signed-off-by: Christopher Friedt <cfriedt@meta.com>
2024-03-13 20:00:49 +08:00
Yong Cong Sin
2262b294dd arch: riscv: introduce a Kconfig to mask mhartid
Configure a new Kconfig (`CONFIG_RISCV_HART_MASK`) so that it
is possible to mask the `mhartid` of a processor. This is
helpful in the cases when the hart id starts from non-zero
value.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2024-03-13 11:10:25 +00:00
TaiJu Wu
1f5f0cf838 sched: Remove multi-level queue priority limit
Modified bitmask to  bitmask array, it can make multilevel queue remove
32 bit prioriry limit.

We can scan bitmask array to find which queue have ready thread.

Only need the number of queues as priority because the priority
is checked on create_thread.

Signed-off-by: TaiJu Wu <tjwu1217@gmail.com>
2024-03-12 19:37:40 -04:00
Guillaume Gautier
7aa5d33a94 include: zephyr: drivers: dma: stm32: Fix macro
Macro STM32_DMA_SLOT_BY_IDX should return 0 instead of nothing for
dma v2bis.

Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
2024-03-12 19:28:54 -04:00
Fabio Baltieri
d123a4571a input: kbd_matrix: define PRIkbdrow coherently
It's not supposed to have the "%" in the macro, reuse the existin one
for the data type.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2024-03-12 19:28:40 -04:00
Marc Herbert
03a79d6387 llext: elf.h: fix sign of the r_addend field of struct elf32_rela
The r_addend field is signed (it seems unused for now).

Fixes commit a9a82d557c ("llext: use elf_rela_t instead of elf_rel_t")

https://refspecs.linuxfoundation.org/elf/gabi4+/ch4.reloc.html

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2024-03-12 19:28:18 -04:00
Marc Herbert
7eb1d3d57d llext: elf.h: fix wrong 32 bits length of elf64_rela fields
Fixes commit a9a82d557c ("llext: use elf_rela_t instead of elf_rel_t")

Also switch sign of (unused?) `r_addend` to unsigned.

https://refspecs.linuxfoundation.org/elf/gabi4+/ch4.reloc.html

Issue found thanks to the following warnings when compiling in 64bits:

```
/__w/zephyr/zephyr/include/zephyr/llext/elf.h:349:29: error:
  right shift count >= width of type [-Werror=shift-count-overflow]
     349 | #define ELF64_R_SYM(i) ((i) >> 32)
```

The name `elf64_word` was admittedly confusing.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2024-03-12 19:28:18 -04:00
Marc Herbert
c15f029a71 init.h: restore designated initializers in SYS_INIT_NAMED()
As seen in the PR #68125 discussion, commit 19a33c7884 ("init: adjust
the SYS_INIT dev field init to play nice with older compilers") entirely
threw away designated initializers in SYS_INIT_NAMED() to avoid
compatibility issues across toolchains.

One key aspect that was probably missed at the time: C and C++ are two
different languages and this is especially true with respect to
designated initializers.

Designated initializers provide safer and more readable code, especially
in their much stricter C++ version. So use an #ifdef to restore them in
SYS_INIT_NAMED() thanks to a small braces difference between C and C++.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2024-03-12 15:12:37 -05:00
Christopher Friedt
cdc36d090c posix: sysconf: add a "small" implementation option
Previously, sysconf() was only available as a macro (i.e. the
"extra-small" option).

This has the advantage of being compile-time constant, and
optimized for both space and speed. One disadvantage is that
querying an `_SC_` value that was invalid or unsupported
would result in a compile error.

Provide a "small" implementation of sysconf() (via Kconfig
choice) as a normal addressable function.

Signed-off-by: Christopher Friedt <cfriedt@meta.com>
2024-03-12 17:57:11 +00:00
Emil Gydesen
fa6a7c1b77 Bluetooth: CAP: Commander change microphone gain procedure
Adds the CAP Commander Change Microphone Gain procedure.
This procedure changes the microphone gain on one or more
CAP Acceptors.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-03-12 17:56:09 +00:00
Gaetan Perrot
8336d8b1e1 kernel: api: sys_slist find zephyrproject-rtos#65973
add a function to find a node in a slist.

signed-off-by: Gaetan Perrot <gaetanperrotpro@gmail.com>
2024-03-12 13:46:29 -04:00
Mikhail Siomin
877b10bef1 drivers: mcux: flexio: Added generic MCUX FlexIO driver
Added FlexIO driver that distributes hardware resources
between interfaces using them.

Signed-off-by: Mikhail Siomin <victorovich.01@mail.ru>
2024-03-12 14:00:45 +01:00
Mikhail Siomin
b12e8cd2b0 clock: nxp_imx: Added clock control support for FlexIO
Added clock control support for flexIO for i.MX series.

Signed-off-by: Mikhail Siomin <victorovich.01@mail.ru>
2024-03-12 14:00:45 +01:00
Lyle Zhu
cb3d1c9ee9 Bluetooth: RFCOMM: Add data sent cb for RFCOMM
Currently, the upper layer cannot know
whether the data is successfully sent
through DLC.

Add a field "sent" for RFCOMM DLC ops.
Notify upper-layer of the sending
result through the field "sent".

Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
2024-03-12 09:45:27 +00:00
Henrik Brix Andersen
c769da9e55 drivers: can: add can_get_min_bitrate() API function
Add a new CAN controller API function can_get_min_bitrate() for getting the
minimum supported bitrate of a CAN controller/transceiver combination.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2024-03-12 10:43:36 +01:00
Henrik Brix Andersen
621515ccf7 drivers: can: sja1000: allow front-ends to specify minimum bitrate
Allow frontend drivers based on the SJA1000 backend to specify a minimum
supported bitrate.

The ESP32 TWAI supports bitrates from 25kbit/s to 1Mbit/s.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2024-03-12 10:43:36 +01:00
Henrik Brix Andersen
6d35ec718f drivers: can: add support for specifying minimum supported CAN bitrate
Add support for specifying the minimum bitrate supported by a CAN
controller in CAN_DT_DRIVER_CONFIG_GET() and
CAN_DT_DRIVER_CONFIG_INST_GET().

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2024-03-12 10:43:36 +01:00
Henrik Brix Andersen
653387446e devicetree: can: add support for getting CAN transceiver minimum bitrate
Add support for getting the minimum supported bitrate of a CAN transceiver.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2024-03-12 10:43:36 +01:00
Benedikt Schmidt
b47c66e3f2 drivers: adc: implement voltage biasing for ADS114s08
Implement voltage biasing on the inputs of the ADC ADS114s08.

Signed-off-by: Benedikt Schmidt <benedikt.schmidt@embedded-solutions.at>
2024-03-11 19:34:34 -04:00
Robert Lubos
5bb97a112d net: telnet: Improve command processing
Current TELNET implementation wrongly assumed that if the command is
present, it will always be included at the beginning of the packet/data
buffer. Such assumptions however are not valid for STREAM sockets,
where the actual stream data could be fragmented in any way.

Therefore, the command parsing needed rework, so that we analyze each
byte received for the command escape code, and once received we enter
"command parsing" mode. Once no more commands are identified in a data
streak, the command bytes are removed from the data buffer before the
buffer is provided to the shell subsystem for processing.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2024-03-11 15:09:32 -05:00
Robert Lubos
9e2e234003 net: telnet: Switch TELNET shell backend to use sockets
Rework TELNET shell backend to use socket API for communication and
socket service library for socket monitoring.

Additionally, rework the TX part so that non-blocking TX is used when
sending from the system work queue. In case transfer is not possible at
the moment, the TX work is rescheduled instead of blocking the system
work queue.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2024-03-11 15:09:32 -05:00
Henrik Brix Andersen
afc7c20d5a drivers: can: fix can_get_core_clock() API description
The can_get_core_clock() API function returns the core clock rate of the
CAN controller, which provides the minimum time quantum (mtq). This clock
can be further divided by the CAN clock prescaler, providing the time
quantum (tq).

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2024-03-11 17:24:54 +01:00
Maksim Salau
a9c2d81bd0 drivers: adc: add ADC_DT_SPEC_*_BY_NAME() macros
The commit adds macros to get ADC io-channel information
from devicetree by name.

Signed-off-by: Maksim Salau <maksim.salau@gmail.com>
2024-03-11 17:24:40 +01:00
Jukka Rissanen
b65b6a8208 posix: socket: Add missing recvmsg()
The sys/socket.h was missing recently added recvmsg() call
to net/socket.h

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-03-11 15:17:11 +00:00
Gaetan Perrot
6badcad883 posix: Implement getmsg and getpmsg
`getmsg()` and `getpmsg()` are required
as part of _XOPEN_STREAMS Option Group.

signed-off-by: Gaetan Perrot <gaetanperrotpro@gmail.com>
2024-03-11 14:25:26 +01:00
Nithin Ramesh Myliattil
6ce38c1aa7 bluetooth: id: fix adv sets with same id use different RPA
The fix is to check if any of the adv set's rpa expired
callback returns false, then all adv sets continues with
the old RPA.

Note: Fix is applicable only to adv sets which shares the
same id.

Signed-off-by: Nithin Ramesh Myliattil <niym@demant.com>
2024-03-11 14:24:41 +01:00
cyliang tw
e22958ceaf soc: nuvoton: numaker: add support for m2l31x series
Add initial support for nuvoton numaker m2l31x SoC series
including basic init.

Signed-off-by: cyliang tw <cyliang@nuvoton.com>
2024-03-11 14:22:55 +01:00
Florian La Roche
28107ae8ce logging: fix typo in include file log_msg.h
fix typo in include file log_msg.h

Signed-off-by: Florian La Roche <Florian.LaRoche@gmail.com>
2024-03-11 07:56:52 -04:00
Aleksandr Khromykh
aa87ed5d8a Bluetooth: Mesh: make models metadata const
Commit adds const qualifier to models metadata.
Specification claims: Composition Metadata Page 0
shall not change during a term of a node on the network.

Signed-off-by: Aleksandr Khromykh <aleksandr.khromykh@nordicsemi.no>
2024-03-11 09:26:12 +01:00
Emil Gydesen
913ca370c7 Bluetooth: BAP: Add input validation for bt_bap_ep_get_info
The function did not have a NULL check for the parameters,
and thus did not fail correctly on invalid input.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-03-09 16:13:24 +01:00
Jukka Rissanen
7072e75162 net: dhcpv4: Network interface netmask was set too early
When we receive the subnet mask option from the server, we
cannot yet set the netmask to the network interface as the
mask is tied to the IP address we received from the server.
We need to delay the setting of netmask until we have added
the requested IP address to the interface.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-03-08 18:04:35 +01:00
Fin Maaß
2b23d1f3f1 log: net: Add log_backend_net_start function
Adds a function to start log_backend_net

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2024-03-08 15:18:30 +00:00
Fin Maaß
6e12b0210f log: net: move log_backend_net_get() to header
This moves the declaration of log_backend_net_get() to
zephyr/logging/log_backend_net.h

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2024-03-08 15:18:30 +00:00
Fin Maaß
7bc4ea1e2f log: net: add option to set server ip with struct sockaddr
Adds a function to set the syslog server ip with a struct sockaddr,
so that it can be set without a string.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2024-03-08 15:18:30 +00:00
Lukasz Madej
e6d7e812b5 charger: add charger status and online change notifiers
Some applications might be intersted in notification about charger
status or charger online updates so they can avoid polling.
Add new properties allowing to register such notifications.

Signed-off-by: Lukasz Madej <l.madej@grinn-global.com>
2024-03-08 09:38:03 +01:00
Daniel Leung
3fa291690f xtensa: use CONFIG_PRIVILEGED_STACK_SIZE for stack size
Instead of using CONFIG_MMU_PAGE_SIZE for size of the privileged
stack, use the actual kconfig CONFIG_PRIVILEGED_STACK_SIZE.
This allows for changing the size of privileged stack, and
also aligns to the usage of CONFIG_PRIVILEGED_STACK_SIZE.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2024-03-08 09:37:36 +01:00
Daniel Leung
9f4330f365 x86: use CONFIG_PRIVILEGED_STACK_SIZE for stack size
Instead of using CONFIG_MMU_PAGE_SIZE for size of the privileged
stack, use the actual kconfig CONFIG_PRIVILEGED_STACK_SIZE.
This allows for changing the size of privileged stack, and
also aligns to the usage of CONFIG_PRIVILEGED_STACK_SIZE.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2024-03-08 09:37:36 +01:00