Commit Graph

99400 Commits

Author SHA1 Message Date
Benjamin Cabé 45e51c08ab doc: fixed :c:enum: used in lieu of :c:enumerator:
While Breathe seems to not care,  the proper role to reference an
enumerator is :c:enumerator:

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-08-01 09:14:38 +01:00
Benjamin Cabé b7166032cc doc: misc fixes to C domain types
Breathe is not very strict about the types used to reference C domain
objects (ex. referencing a struct using `:c:type:` would work, and vice
versa) but other tooling might be. This commit fixes some of such
incorrectly documented elements.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-08-01 09:14:38 +01:00
Benjamin Cabé 8e6b44ce66 doc: net: fix Sphinx C domain roles usage
use the proper types/syntax for referencing C elements from Networking
docs

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-08-01 09:14:26 +01:00
Felipe Neves 804db65928 drivers: input: cst816s: read the gesture-ID register
And report the gestures as specific device  event type
to the input subsystem.

Signed-off-by: Felipe Neves <ryukokki.felipe@gmail.com>
2024-08-01 09:14:19 +01:00
Felipe Neves acaee9f019 dt-bindings: input: introduce INPUT_EV_DEVICE input code
For reporting specific input device events.

Signed-off-by: Felipe Neves <ryukokki.felipe@gmail.com>
2024-08-01 09:14:19 +01:00
Szymon Janc 89b129742d tests: bluetooth: tester: Enable DIS service
Previously autopts was incorrectly using GATT server service to
construct DIS.

Signed-off-by: Szymon Janc <szymon.janc@codecoup.pl>
2024-08-01 09:13:55 +01:00
Kamil Piszczek f9a5699bd8 Bluetooth: DIS: integrate app version into FW revision characteristic
Integrated the application version feature of the build system with
the default configuration of the Bluetooth DIS module and its Firmware
Revision characteristic.

The firmware revision string now defaults to APP_VERSION_TWEAK_STRING
if the application version feature is used in a project. This specific
version format is used to unify version formatting with other parts of
Zephyr like the MCUboot module and its versioning Kconfig:
CONFIG_MCUBOOT_IMGTOOL_SIGN_VERSION

Signed-off-by: Kamil Piszczek <Kamil.Piszczek@nordicsemi.no>
2024-08-01 09:13:39 +01:00
Matt Rodgers 47fbb8512f net: coap_client: allow application to add block2 option to requests
Allow an application to add a Block2 option to an initial request for a
resource. For any subsequent requests as part of a blockwise transfer,
drop the application-added Block2 option since the coap_client must
append a Block2 option with updated NUM and SZX fields based on the
server response.

Signed-off-by: Matt Rodgers <mrodgers@witekio.com>
2024-08-01 09:13:32 +01:00
Chun-Chieh Li ed49d7c5e9 drivers: hwinfo: add numaker m2l31x for device id
Add Nuvoton NuMaker M2L31 series for device id

Signed-off-by: Chun-Chieh Li <ccli8@nuvoton.com>
2024-08-01 09:13:06 +01:00
Gero Schwäricke db1adf4c7e boards: hardkernel: odroid_go: fix PSRAM size
Booting the hello world sample fails with an error on the odroid go:

  I (124) quad_psram: This chip is ESP32-D0WD
  I (124) esp_psram: Found 4MB PSRAM device
  I (124) esp_psram: Speed: 40MHz
  I (125) esp_psram: PSRAM initialized, cache is in normal (1-core) mode.
  SPIRAM size is less than configured size, aborting.
  abort()

The device features only 32 Mbit PSRAM (4 MiB), see

  dts/xtensa/espressif/esp32/esp32_wrover_e_n16r4.dtsi

included from

  boards/hardkernel/odroid_go/odroid_go_procpu.dts

Signed-off-by: Gero Schwäricke <gero.schwaericke@posteo.de>
2024-08-01 09:12:47 +01:00
Nicolas Pitre d3bf90e641 arm64: linker: remove ARM32 remnants
- .glue7, .glue7t, .vfp11_veneer and .v4_bx are ARM32-isms

- ARM64 needs 8-bytes alignment

- remove useless/unsuited comments

Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
2024-08-01 09:12:36 +01:00
Armando Visconti cdce68e4c8 boards: st: sensortile_box_pro: remove hts221 sensor
Remove HTS221 sensor support from sensortile_box_pro as it has been ruled
out from final version. In fact, HTS221 is in the process of being
terminated and is not recommended for new design. The candidate replacement
is SHT40 from Sensirion, which is available also as a DIL24 adapter, which
can be plugged on sensortile_box_pro board.

See SENSEVAL-SHT4XV1:
https://www.st.com/en/partner-products-and-services/senseval-sht4xv1.html

Signed-off-by: Armando Visconti <armando.visconti@st.com>
2024-08-01 09:12:26 +01:00
Joakim Andersson 07c0c59655 samples: stm32: mco: Add example on how to configure MCO
The documentation does not provide any guides on how to configure
the MCO pin, and responsebility is given to the application.

Signed-off-by: Joakim Andersson <joerchan@gmail.com>
2024-08-01 09:12:13 +01:00
Joakim Andersson 7ddcfbdc4a clock_control: Add MCO support for STM32 U5 series
Add microcontroller clock output (MCO) support for the STM32
U5 series of devices.

Signed-off-by: Joakim Andersson <joerchan@gmail.com>
2024-08-01 09:12:13 +01:00
Fabian Blatz 23435de71e drivers: input: cst816s: Configure before enabling interrupts on init
During driver init make sure that the IRQ_CTL field is set before enabling
the interrupts. Fixes the i2c read error on startup.

Signed-off-by: Fabian Blatz <fabianblatz@gmail.com>
2024-08-01 09:12:01 +01:00
Ian Morris f5f7b18db2 boards: shields: Add support for Mikroe BLE TINY Click shield
Add support for the Mikroe BLE TINY Click shield that contains the
Renesas DA14531 Bluetooth LE Module.

Signed-off-by: Ian Morris <ian.d.morris@outlook.com>
2024-08-01 09:11:54 +01:00
Henrik Brix Andersen 9af6ae50f4 usb: device_next: add usbd_device_set_bcd_device()
Add usbd_device_set_bcd_device() for setting the bcdDevice device
descriptor value.

The default bcdDevice is set to the version of Zephyr being used, which may
or may not be what a downstream USB device wants it to be.

Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
2024-08-01 09:11:44 +01:00
Henrik Brix Andersen 196c9635d8 usb: device_next: rename usbd_device_set_bcd()
Rename usbd_device_set_bcd() to usbd_device_set_bcd_usb() to make room for
other BCD encoded values being set.

Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
2024-08-01 09:11:44 +01:00
Francois Ramu 3fb0d0bf80 samples: drivers: jesd216 density expressed in bits
In the sample, print the jesd216_bfp_density is expressed
in bits. add the unit to avoid confusion with the Flash
density expressed in bytes (dw2 entry)
Page size is for programming expressed in bytes, meaning
program execution on bytes basis or here page basis.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2024-08-01 09:11:30 +01:00
Francois Ramu 87af1984f5 drivers: flash: stm32 qspi flash size in dual flash mode
When  QSPI configuration is the dual-flash, the total
flash size and erase size are doubled. This is handled
with a STM32_QSPI_DOUBLE_FLASH factor which doubles
the values of one qspi component.
Note that SFDP table is for ONE flash component.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2024-08-01 09:11:30 +01:00
Fabio Baltieri 600217c52f usb: device_next: hid: move few pointer to a config struct
Some of the fields currently in hid_device_data are constant.

Move them to a const config struct to save some RAM and drop the rest of
the data static initializers to runtime to save some flash as well.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2024-08-01 09:11:17 +01:00
Jacob Winther a564bee106 boards: Add code owner for feather_nrf52840
Add myself as owner for adafruit/feather_nrf52840 as there is
no current owner.

Discussed in PR 76135.

Signed-off-by: Jacob Winther <jacob@9.nz>
2024-08-01 09:11:11 +01:00
Jacob Winther b6ed4ba761 boards: Add Adafruit Feather nrf52840 Sense
Add support for board based on the Express variant.
Board uses uf2 as it has no swd adaptor.

Signed-off-by: Jacob Winther <jacob@9.nz>
2024-08-01 09:11:11 +01:00
Jacob Winther 4e830ec19f boards: rename adafruit_feather
Adafruit feather is a generic name that could match many
boards. Renamed to reflect actual board name:
- Adafruit Feather nrf52840 Express

There are two boards based on the nrf52840, so keeping directory
generic to support additional board defs with mostly shared dts.

Signed-off-by: Jacob Winther <jacob@9.nz>
2024-08-01 09:11:11 +01:00
Francois Ramu 83b3552050 samples: subsys: watchdog task running on the stm32f091 nucleo
Add the configuration with a board overlay to execute
the samples/subsys/task_wdt on the nucleo_f091rc
Adjust the window-watchdog clock to PASS the test.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2024-08-01 09:11:01 +01:00
Francois Ramu ed08755dde dts: arm: stm32 mcu disable the iwdg node in the dtsi
Disable the iwdg node of the stm32f0 and stm32wb devices
in their .dtsi file, like other devices

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2024-08-01 09:11:01 +01:00
Francois Ramu f408184b01 boards: st: stm32h750 disco kit rd/wr the sdram2
Set the Mode Register definition of the SDRAM command Mode
register to 0x230 when programming the CAS_LATENCY
of the external memory mode.
Adjust the delay on read data path.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2024-08-01 09:09:34 +01:00
Fin Maaß f937e548a7 doc: releases: mention change of ethernet driver.
Mention the change of the litex
ethernet driver.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2024-08-01 08:59:37 +01:00
Fin Maaß aeea701b2b dts: bindings: litex: rename eth comatible
Rename it from litex,eth to litex,liteeth
to reflect the new name of the driver.

Zero got removed from the litex
ethernet compatible, as it now supports
multiple instances.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2024-08-01 08:59:37 +01:00
Fin Maaß 239df9ce69 drivers: ethernet: litex: more instances
be able to use multiple instances of the
litex ethernet (liteeth) driver.

add support for vlan.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2024-08-01 08:59:37 +01:00
Fin Maaß 6ba5f6db60 drivers: ethernet: litex: rename driver
For more consistency, rename the liteeth driver to litex.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2024-08-01 08:59:37 +01:00
Fin Maaß 4ab40f442e drivers: intc: litex: add helper for interrupts
add helper for interrupts, so multiple
instances of peripherals work.

this way out-off-tree peripherals are supported.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2024-08-01 08:59:37 +01:00
Grant Ramsay 4a21035aa5 boards: shields: Allow adding source code to shields
Add shield CMakeLists.txt if it exists.
Useful for one-off shields that require C code

Signed-off-by: Grant Ramsay <gramsay@enphaseenergy.com>
2024-08-01 08:57:33 +01:00
Gerard Marull-Paretas b5a3f7532f boards: nrf53*: remove unnecessary TF-M includes
After 6a14a0233b these TF-M includes
should not be necessary.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-08-01 08:56:56 +01:00
Gerard Marull-Paretas d9a5a220b7 samples: s/CONFIG_BOARD_ENABLE_CPUNET/CONFIG_SOC_NRF53_CPUNET_ENABLE/
CONFIG_BOARD_ENABLE_CPUNET is deprecated.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-08-01 08:56:56 +01:00
Gerard Marull-Paretas 7123f142c3 drivers: clock_control: nrf: use SOC_NRF53_CPUNET_ENABLE
Board level option is deprecated.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-08-01 08:56:56 +01:00
Gerard Marull-Paretas 4a1834cef7 boards: nrf53: remove redundant cpunet initialization code
This is now handled at SoC level, avoiding code duplicates.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-08-01 08:56:56 +01:00
Gerard Marull-Paretas 4c84a6f658 soc: nordic: nrf53: introduce deprecated BOARD_ENABLE_CPUNET
So that existing code does not break when this option gets removed from
boards.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-08-01 08:56:56 +01:00
Gerard Marull-Paretas ffe10833ea drivers: bluetooth: hci: nrf53: use nrf_spu_extdomain_set
Instead of hardcoded values and device instances.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-08-01 08:56:56 +01:00
Gerard Marull-Paretas f611fdd6ad soc: nordic: nrf53: add option to enable cpunet
When not using BT, users may want to enable the cpunet core. Until now,
this has been done at board level (so duplicating unnecessary code)
using CONFIG_BOARD_ENABLE_CPUNET. The board-level options were usually
enabled automatically for BT, however, this was unnecessary as BT driver
already takes care of the setup.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-08-01 08:56:56 +01:00
Gerard Marull-Paretas 8bc461ebe0 drivers: bluetooth: hci: nrf53: simplify DEBUG_SETUP code
debug.h module provides dummy implementation when necessary.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-08-01 08:56:56 +01:00
Gerard Marull-Paretas 5a095d42a7 bluetooth: controller: nordic: provide dummy DEBUG_SETUP
So that clients do not have to understand in which situation it is not
defined.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-08-01 08:56:56 +01:00
Gerard Marull-Paretas baad622063 bluetooth: controller: nordic: simplify board guarding
Since HWMv1, we also have CONFIG_$BOARD Kconfig symbols defined, ie, no
SoC/core/variant needed.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-08-01 08:56:56 +01:00
Emil Gydesen 1b83555d4c Samples: Bluetooth: CAP Initiator broadcast support
Add broadcast support to the CAP initiator sample.

This adds new sample-specific Kconfig options to help
select the right Kconfig options based on whether
unicast, broadcast or both is being used.

This also moves common TX functionality
to cap_initiator_tx to reuse the same TX thread
and functionality.

Finally there is a babblesim implemented for
the broadcast. There is not broadcast support for the
CAP acceptor sample yet, so this test only verifies that we
get the TX complete events from the controller.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-08-01 08:53:08 +01:00
Pisit Sawangvonganan 6211de87c0 net: mqtt: improve decoder buffer handling
Improve buffer handling logic to use local variables extensively.

This change reduces the number of pointer dereferences, which leads
to more efficient runtime and helps reduce the code size.

Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
2024-07-31 13:08:28 +02:00
Pisit Sawangvonganan 45282a41c1 net: mqtt: improve encoder buffer handling
Improve buffer handling logic to use local variables extensively.

This change reduces the number of pointer dereferences, which leads
to more efficient runtime and helps reduce the code size.

Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
2024-07-31 13:08:28 +02:00
Robert Lubos 349bf81e00 net: tcp: Keep track of recv window size change since last ACK
Windows TCP stack has a peculiar behavior - when running iperf, it will
fill out the RX window almost entirely, but will not set PSH flag on
packets. In result, our stack would delay the ACK and thus window
update, affecting throughputs heavily.

In order to avoid that, keep track of the most recent window size
reported to the peer, and reduce it when receiving new data. In case the
RX window, as seen from the peer perspective, drops below certain
threshold, and the real RX window is currently empty, send an ACK
immediately when updating window, so that peer can continue
with sending data.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2024-07-31 12:56:52 +02:00
TOKITA Hiroshi e31588fcca tests: kconfig: Add tests for Kconfig arithmetrics
Add tests about kconfig function for arithmetric.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2024-07-31 12:56:25 +02:00
TOKITA Hiroshi f99f862a79 scripts: kconfig: Add integer arithmetic functions
Added functions for integer arithmetic operations
(add, sub, mul, div, mod, inc, dec)

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2024-07-31 12:56:25 +02:00
Rubin Gerritsen a4e43d013c Bluetooth: Samples: Use string printing functions for error codes
When developing Bluetooth applications, you typically run into some errors.
If you are an experienced Bluetooth developer, you would typically know
how to translate the error codes into string representations.
Others might not.

This commit to adds string printing of error codes for all
samples to make them more user-friendly.

Several formatting alternatives were considered. The chosen alternative
balances code readability and FLASH size (with and without string
printing).

Example output from the peripheral_hids sample when the
peer rejects pairing:

```
Bluetooth initialized
Bluetooth authentication callbacks registered.
Advertising successfully started
Connected 5E:67:02:D3:1C:DB (random)
Security failed: 5E:67:02:D3:1C:DB (random) \
level 1 err 6 BT_SECURITY_ERR_PAIR_NOT_ALLOWED
Disconnected from 5E:67:02:D3:1C:DB (random), \
reason 0x13 BT_HCI_ERR_REMOTE_USER_TERM_CONN
```

Other alternatives that were considered:

- Use of parantheses:
```
// strings enabled
Security failed: 5E:67:02:D3:1C:DB (random) level 1 \
err BT_SECURITY_ERR_PAIR_NOT_ALLOWED(6)
Disconnected from 5E:67:02:D3:1C:DB (random), reason \
BT_HCI_ERR_REMOTE_USER_TERM_CONN(0x13)
// strings disabled
Security failed: 5E:67:02:D3:1C:DB (random) level 1 err (6)
Disconnected from 5E:67:02:D3:1C:DB (random), reason (0x13)
```

- Spaces and parantheses:
```
// strings enabled
Security failed: 5E:67:02:D3:1C:DB (random) level 1 \
err BT_SECURITY_ERR_PAIR_NOT_ALLOWED (6)
Disconnected from 5E:67:02:D3:1C:DB (random), \
reason BT_HCI_ERR_REMOTE_USER_TERM_CONN (0x13)
// strings disabled
Security failed: 5E:67:02:D3:1C:DB (random) level 1 err  (6)
Disconnected from 5E:67:02:D3:1C:DB (random), reason  (0x13)
```

- Parantheses around everything:
```
// strings enabled
Security failed: 5E:67:02:D3:1C:DB (random) level 1 \
err (BT_SECURITY_ERR_PAIR_NOT_ALLOWED(6))
Disconnected from 5E:67:02:D3:1C:DB (random), \
reason (BT_HCI_ERR_REMOTE_USER_TERM_CONN(0x13))
// strings disabled
Security failed: 5E:67:02:D3:1C:DB (random) level 1 err ((6))
Disconnected from 5E:67:02:D3:1C:DB (random), reason ((0x13))
```

- Error code first, then string representation:
```
// strings enabled
Security failed: 5E:67:02:D3:1C:DB (random) level 1 \
err 6 (BT_SECURITY_ERR_PAIR_NOT_ALLOWED)
Disconnected from 5E:67:02:D3:1C:DB (random), reason \
0x13 (BT_HCI_ERR_REMOTE_USER_TERM_CONN)
// strings disabled
Security failed: 5E:67:02:D3:1C:DB (random) level 1 err 6 ()
Disconnected from 5E:67:02:D3:1C:DB (random), reason 0x13 ()
```

- Apostrophes around error printing:
```
// strings enabled
Security failed: 5E:67:02:D3:1C:DB (random) level 1 \
err "BT_SECURITY_ERR_PAIR_NOT_ALLOWED (6)"
Disconnected from 5E:67:02:D3:1C:DB (random), reason \
"BT_HCI_ERR_REMOTE_USER_TERM_CONN (0x13)"
// strings disabled
Security failed: 5E:67:02:D3:1C:DB (random) level 1 err " (6)"
Disconnected from 5E:67:02:D3:1C:DB (random), reason " (0x13)"
```

Signed-off-by: Rubin Gerritsen <rubin.gerritsen@nordicsemi.no>
2024-07-31 12:56:11 +02:00