Commit Graph

81971 Commits

Author SHA1 Message Date
Jordan Yates f0958c62e4 Revert "dts: gen_defines: generate `_ORD_STR_SORTABLE`"
This reverts commit 9b77681473.
2023-07-25 14:17:11 +02:00
Jordan Yates 109fc87737 Revert "init: add sub-priority to internal ordering"
This reverts commit bb590b5b6e.
2023-07-25 14:17:11 +02:00
Jordan Yates 3c1149e058 Revert "tests: kernel: device: test sub-priority"
This reverts commit 01e98fcb5f.
2023-07-25 14:17:11 +02:00
Jordan Yates d63999af6e Revert "gpio: stellaris: implement `gpio_pin_get_config`"
This reverts commit c72577d709.
2023-07-25 14:17:11 +02:00
Jordan Yates 6edab1f050 Revert "pm: device: add driver init helper"
This reverts commit 84016c1cd3.
2023-07-25 14:17:11 +02:00
Jordan Yates f613074283 Revert "power_domain: gpio: compile without `PM_DEVICE_POWER_DOMAIN`"
This reverts commit 1f1217e832.
2023-07-25 14:17:11 +02:00
Jordan Yates 226f1c5e4b Revert "power_domain: gpio: init with `pm_device_driver_init`"
This reverts commit 39b2ec57a0.
2023-07-25 14:17:11 +02:00
Jordan Yates b74efbe59e Revert "tests: pm: update power domain behaviour"
This reverts commit b82bbf5e31.
2023-07-25 14:17:11 +02:00
Jordan Yates d02e49c4f0 Revert "tests: pm: test `pm_device_driver_init`"
This reverts commit a4cfc1eb37.
2023-07-25 14:17:11 +02:00
Robert Lubos 30382daf88 net: wifi_shell: Add user input validation for SSID and PSK
When parsing user input for "wifi connect" and "wifi ap enable"
commands, the SSID and PSK lengths were not verified. It's better to
detect invalid connect/AP enable parameters early, so that help text can
be printed, instead of letting wifi_mgmt command to fail.

For WIFI_SECURITY_TYPE_SAE, follow the Linux convention of limiting the
size to 128 bytes.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2023-07-25 14:16:17 +02:00
Robert Lubos a22f7e777b net: dhcpv4: Accept unicast replies
Some DHCPv4 servers do not respect BROADCAST flag set on DHCP Discover,
replying with unicast packet, making it impossible to obtain DHCP
address by Zephyr in such cases.

RFC1542 chapter 3.1.1 makes the following statement about the BROADCAST
flag:
    This addition to the protocol is a workaround for old host
    implementations.  Such implementations SHOULD be modified so
    that they may receive unicast BOOTREPLY messages, thus making
    use of this workaround unnecessary.  In general, the use of
    this mechanism is discouraged.

Making it clear that being able to process unicast replies from the DHCP
server is not only an optional behavior, but a recommended solution.

Therefore, introduce a support for unicast DHCPv4 in Zephyr. To achieve
this, add additional filtering rule at the IPv4 level - in case DHCPv4
is enabled, there is an active query and the packet is destined for the
DHCPv4 module, let it through for the DHCPv4 module to process,
regardless of the destination IP address.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2023-07-25 14:15:45 +02:00
Andrzej Głąbek 481963489e drivers: wdt_nrfx: Clean up driver instantiation
- use CONFIG_HAS_HW_NRF_* symbols consistently in nRF multi-instance
  drivers when creating particular driver instances
- remove unnecessary hidden Kconfig options that indicated the type of
  peripheral to be used by a given instance (e.g. SPI, SPIM, or SPIS)
  and enabled proper nrfx driver instance; instead, use one option per
  peripheral type and include the corresponding shim driver flavor into
  compilation basing on that option (not the one that enables the nrfx
  driver as it was incorrectly done so far in some cases)

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2023-07-25 13:41:51 +02:00
Andrzej Głąbek f89ca1164c drivers: sensor: qdec_nrfx: Clean up driver instantiation
- use CONFIG_HAS_HW_NRF_* symbols consistently in nRF multi-instance
  drivers when creating particular driver instances
- remove unnecessary hidden Kconfig options that indicated the type of
  peripheral to be used by a given instance (e.g. SPI, SPIM, or SPIS)
  and enabled proper nrfx driver instance; instead, use one option per
  peripheral type and include the corresponding shim driver flavor into
  compilation basing on that option (not the one that enables the nrfx
  driver as it was incorrectly done so far in some cases)

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2023-07-25 13:41:51 +02:00
Andrzej Głąbek aa7d675935 drivers: serial: nrfx: Clean up driver instantiation
- use CONFIG_HAS_HW_NRF_* symbols consistently in nRF multi-instance
  drivers when creating particular driver instances
- remove unnecessary hidden Kconfig options that indicated the type of
  peripheral to be used by a given instance (e.g. SPI, SPIM, or SPIS)
  and enabled proper nrfx driver instance; instead, use one option per
  peripheral type and include the corresponding shim driver flavor into
  compilation basing on that option (not the one that enables the nrfx
  driver as it was incorrectly done so far in some cases)

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2023-07-25 13:41:51 +02:00
Andrzej Głąbek fa609e5844 drivers: spi: nrfx: Clean up driver instantiation
- use CONFIG_HAS_HW_NRF_* symbols consistently in nRF multi-instance
  drivers when creating particular driver instances
- remove unnecessary hidden Kconfig options that indicated the type of
  peripheral to be used by a given instance (e.g. SPI, SPIM, or SPIS)
  and enabled proper nrfx driver instance; instead, use one option per
  peripheral type and include the corresponding shim driver flavor into
  compilation basing on that option (not the one that enables the nrfx
  driver as it was incorrectly done so far in some cases)

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2023-07-25 13:41:51 +02:00
Andrzej Głąbek 8bc0fdaf56 drivers: pwm_nrfx: Clean up driver instantiation
- use CONFIG_HAS_HW_NRF_* symbols consistently in nRF multi-instance
  drivers when creating particular driver instances
- remove unnecessary hidden Kconfig options that indicated the type of
  peripheral to be used by a given instance (e.g. SPI, SPIM, or SPIS)
  and enabled proper nrfx driver instance; instead, use one option per
  peripheral type and include the corresponding shim driver flavor into
  compilation basing on that option (not the one that enables the nrfx
  driver as it was incorrectly done so far in some cases)

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2023-07-25 13:41:51 +02:00
Andrzej Głąbek fb7d40c757 drivers: i2c: nrfx: Clean up driver instantiation
- use CONFIG_HAS_HW_NRF_* symbols consistently in nRF multi-instance
  drivers when creating particular driver instances
- remove unnecessary hidden Kconfig options that indicated the type of
  peripheral to be used by a given instance (e.g. SPI, SPIM, or SPIS)
  and enabled proper nrfx driver instance; instead, use one option per
  peripheral type and include the corresponding shim driver flavor into
  compilation basing on that option (not the one that enables the nrfx
  driver as it was incorrectly done so far in some cases)

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2023-07-25 13:41:51 +02:00
Fabian Blatz e1e4fcc701 input: remove cap1203 kscan-like state report
Previously the driver was retrofitted to the kscan api, handling it as a
input device with one row and three columns. With the move to the input
subsystem each input can have its proper input code instead.

Signed-off-by: Fabian Blatz <fabianblatz@gmail.com>
2023-07-25 11:25:51 +02:00
Fabian Blatz 1d56b8e2aa input: convert cap1203 from kscan
Convert the CAP1203 driver to the input subsystem, add to build_all tests.

Signed-off-by: Fabian Blatz <fabianblatz@gmail.com>
2023-07-25 11:25:51 +02:00
Kacper Dalach 305423ccb8 drivers: clock_control: stm32h5: Add MCO configuration
STM32H5 series lacked support for MCO configuration.
Added SOC_SERIES_STM32H5X to approperiate kconfig MCO source
configurations. Added new MCO sources from H5 series and
updated the clock_stm32_ll_h5.c with MCO configuration.

Signed-off-by: Kacper Dalach <dalachowsky@gmail.com>
2023-07-25 09:22:40 +00:00
Carlo Caione aab07357b7 doc: release: Add DT changes
Add DT changes to the 3.5 release notes.

Signed-off-by: Carlo Caione <ccaione@baylibre.com>
2023-07-25 11:22:10 +02:00
Carlo Caione 15e84cbfac dts: Move to 'zephyr,memory-attr'
Move to 'zephyr,memory-attr' and use the newly introduced helpers.

Signed-off-by: Carlo Caione <ccaione@baylibre.com>
2023-07-25 11:22:10 +02:00
Carlo Caione 7483e43f0c devicetree: Add 'zephyr,memory-attr' and DT helpers
The 'zephyr,memory-region-mpu' property was addede gqas a
convenient way to create and configure MPU regions using information
coming from DT. It has been used a lot since it was introduced so I
guess we can consider it a Zephyr success story ™ .

Unfortunately it has been proved to be a bit limited and with some
important limitations:

1. It was introduced as a property of the compatible
   zephyr,memory-region that is used to create linker regions and
   sections from DT data. This means that we can actually create MPU
   regions only for DT-defined regions and sections.
2. The naming is unfortunate because it is implying that it is used only
   for MPU.
3. It is misplaced being in include/zephyr/linker/devicetree_regions.h
   and still it has nothing to do with the linker at all.
4. It is exporting a function called LINKER_DT_REGION_MPU that again has
   nothing to do with the linker.

Point (1) is also particularly limiting because it is preventing us to
characterize memory regions that are not generated using the
'zephyr,memory-region' compatible, like generic mmio-sram regions.

While we fix all the issues, we also want to extend a bit the range of
usefulness of this property. We are renaming it 'zephyr,memory-attr' and
it is now carrying information about the type of memory the property is
attached to (cacheable, non-cacheable, IO, eXecutable, etc...). The user
can use this property and the DT API coming with it to act on the memory
node it is accompanied by.

We are still providing the DT_MEMORY_ATTR_APPLY() macro that can be used
to create the MPU regions as before, but we are adding also a
DT_MEMORY_ATTR_FOREACH_NODE() macro that can be used to cycle through
the memory nodes and act on those.

Signed-off-by: Carlo Caione <ccaione@baylibre.com>
2023-07-25 11:22:10 +02:00
Jonathan Rico 0a8bbbda4a Bluetooth: adv: add USE_NRPA advertising option
Allows the application to force the use of an NRPA.

This is applied regardless of any other roles running (ie scanner) or
advertising type.

Signed-off-by: Jonathan Rico <jonathan.rico@nordicsemi.no>
Co-authored-by: Aleksander Wasaznik <aleksander.wasaznik@nordicsemi.no>
2023-07-25 10:47:37 +02:00
Benjamin Cabé d379542490 bluetooth: iso: doc: Doxygen cleanup
Added several missing brief descriptions and documented some of the
fields guarded by Kconfig options.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2023-07-25 10:45:36 +02:00
Benjamin Cabé e5d07588ae drivers: sdhc: doc: Document sdhc_host_caps
Add Doxygen comments for SD Host controller capability flags.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2023-07-25 10:45:20 +02:00
Benjamin Cabé b88d52e98f bluetooth: doc: Improve sdp.h Doxygen doc
Grouped some defines together, documented service classes and
attributes, and fixed some missing javadoc-style comments.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2023-07-25 10:45:05 +02:00
Kai Meinhard 25c96b6434 i2c: Added efr32bg22_brd4184a to I2C target tests
Compiling I2C target test for efr32bg22_brd4184a board so
that i2c_gecko.c driver is used in target mode.

Signed-off-by: Kai Meinhard <kaimeinhard@hotmail.de>
2023-07-25 10:44:47 +02:00
Kai Meinhard ea846e12bf i2c: Applied clang-format to i2c_gecko.c
Minor formatting changes in i2c_gecko.c with the
clang-format tool.

Signed-off-by: Kai Meinhard <kaimeinhard@hotmail.de>
2023-07-25 10:44:47 +02:00
Kai Meinhard f345d6d1d8 i2c: add target mode to Silicon Labs Gecko I2C driver
This commits adds the ability to use Silicon Lab chips as an I2C
target. This could be used together with the EEPROM target
driver.

Signed-off-by: Kai Meinhard <kaimeinhard@hotmail.de>
2023-07-25 10:44:47 +02:00
Fabio Baltieri e065e5c600 soc: silabs_exx32: define an empty pm_state_exit_post_ops
Some EFR32 build broke after 3d2194f11e with:

pm.c:152: undefined reference to `pm_state_exit_post_ops'

Add an extra empty function to make this one build again.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2023-07-25 10:43:33 +02:00
Alperen Sener dbb0b30bdd bluetooth: mesh: increase mesh scan window
Increaing mesh scan window in order to reduce the number
of messages colliding into scan window end which happens
every 30ms currently. Increasing the window to 3000ms in
order to improve performance.

Keeping 30ms window only for legacy advertiser support.

Signed-off-by: Alperen Sener <alperen.sener@nordicsemi.no>
2023-07-25 09:23:12 +02:00
Lucas Tamborrino 669407f029 tests: drivers: spi loopback: esp32xx: Use internal loopback
Use pinctrl with internal loopback enabled for ESP32 and ESP32C3.

Signed-off-by: Lucas Tamborrino <lucas.tamborrino@espressif.com>
2023-07-25 09:17:08 +02:00
Paul Fagerburg 6199ecba69 cbprintf: use type instead of name in sizeof
Using `arg + 0` in sizeof causes problems with `void *`, so use the
type name instead, but make sure it's at least `sizeof(int)` because
the variadic expects a minimum of `int` size. This allows deleting
the specialization for `void *`, which the linker wasn't choosing
reliably anyway.

Signed-off-by: Paul Fagerburg <pfagerburg@google.com>
2023-07-25 09:16:59 +02:00
Gerard Marull-Paretas 161d83239a dts: bindings: power: nxp,pdcfg-power: fix YAML formatting
Adjust to the expected YAML formatting (2sp). Issue reported by CI
compliance checks.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2023-07-25 09:16:14 +02:00
Gerard Marull-Paretas e4c43e4cc9 pm: power-states node needs to be a child of cpus
This again aligns with Linux.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2023-07-25 09:16:14 +02:00
Gerard Marull-Paretas 90ed12d3eb dts: arm: nuvoton: move power-states to soc dts files
CPU idle states are not board specific. This patch moves Nuvoton idle
states to the core SoC dts files. Board can always tweak some state
parameters (if needed), but the definition belongs to core SoC dts
files, same as e.g.  peripherals.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2023-07-25 09:16:14 +02:00
Gerard Marull-Paretas 6552250cb6 dts: arm: nxp: move power-states to soc dts files
CPU idle states are not board specific. This patch moves NXP idle states
to the core SoC dts files. Board can always tweak some state parameters
(if needed), but the definition belongs to core SoC dts files, same as
e.g.  peripherals.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2023-07-25 09:16:14 +02:00
Gerard Marull-Paretas 7e8f9c7595 dts: arm: microchip: move power-states to soc dts files
CPU idle states are not board specific. This patch moves Microchip MEC
idle states to the core SoC dts files. Board can always tweak some state
parameters (if needed), but the definition belongs to core SoC dts
files, same as e.g.  peripherals.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2023-07-25 09:16:14 +02:00
Gerard Marull-Paretas 96a121b5ee dts: arm: ti: move power-states to soc dts files
CPU idle states are not board specific. This patch moves TI idle
states to the core SoC dts files. Board can always tweak some state
parameters (if needed), but the definition belongs to core SoC dts
files, same as e.g.  peripherals.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2023-07-25 09:16:14 +02:00
Gerard Marull-Paretas 262aeed339 dts: arm: st: move power-states to soc dts files
CPU idle states are not board specific. This patch moves STM32 idle
states to the core SoC dts files. Board can always tweak some state
parameters (if needed), but the definition belongs to core SoC dts
files, same as e.g.  peripherals.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2023-07-25 09:16:14 +02:00
Gerard Marull-Paretas 5eee169cf0 dts: riscv: espressif: esp32: move power-states to soc dts files
CPU idle states are not board specific. This patch moves ESP32 idle
states to the core SoC dts files. Board can always tweak some state
parameters (if needed), but the definition belongs to core SoC dts
files, same as e.g. peripherals.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2023-07-25 09:16:14 +02:00
Gerard Marull-Paretas c008bf1720 tests: pm: power_states: use cpu0 to define cpu-power-states
There's no need to define a new CPU, we can re-use cpu0 in native_posix.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2023-07-25 09:16:14 +02:00
Bartosz Bilas 06b106a32e MAINTAINERS: Add bbilas as LED collaborator
Add myself as a collaborator for the LED area.

Signed-off-by: Bartosz Bilas <bartosz.bilas@hotmail.com>
2023-07-25 09:15:56 +02:00
Fabio Baltieri e7781626e7 tests: mcumgr: exclude lpcxpresso51u68
The test is failing for lpcxpresso51u68 with:

soc_flash_lpc.c:25:2: error: #error No matching compatible for
soc_flash_lpc.c
   25 | #error No matching compatible for soc_flash_lpc.c
      |  ^~~~~

Add the board to the exclude list, sort the list as well.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2023-07-25 09:15:46 +02:00
Joakim Andersson 648355cb69 tfm: Fix help text for crypto key module functionality
Fix help text for crypto key module functionality, which is included
in the source file of crypto_key_management.c source file.
The crypto_key.c source file contains generic code that is always
included.

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
2023-07-25 09:15:32 +02:00
Grant Ramsay e439b5e56d canbus: isotp: Fix context buffer memory leaks
Ensure context buffers are free'd when errors occur

Signed-off-by: Grant Ramsay <gramsay@enphaseenergy.com>
2023-07-25 09:15:13 +02:00
Sylvio Alves 0439dfa963 west.yml: update hal_espressif to fix Wi-Fi label redeclaration
Fix Wi-Fi build due to label declaration in hal_espressif.

Fixes #59881

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2023-07-25 09:14:45 +02:00
Daniel Leung 287916c71e logging: sys_t/catalog: fix unaligned access
When copying parameters into payload buffer, it is possible
that after copying a string over, the pointer to buffer is
no longer aligned on 4 or 8 bytes. And some toolchains may
decide to treat the copy as aligned since the values being
copied are 4 or 8 bytes. This results in unaligned memory
access and hardware exception. So change the copy to memcpy
to avoid potential unaligned access.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2023-07-25 09:14:17 +02:00
Troels Nilsson 00f3e44689 Bluetooth: Controller: Fix missing endianness conversion in scan_enable
Both duration and period are uint16 and thus require endianness conversion

Signed-off-by: Troels Nilsson <trnn@demant.com>
2023-07-25 09:14:02 +02:00