Commit Graph

101347 Commits

Author SHA1 Message Date
Filip Kokosinski 41f74492a7 tests: drivers.gpio.1pin: re-enable hifive1
This commit removes the `hifive1` board from the `platform_exclude` list
for the `drivers.gpio.1pin` pin.

The root cause for why this platform was disabled was fixed in the recent
Renode version upgrade in the CI image.

Fixes #69350.

Signed-off-by: Filip Kokosinski <fkokosinski@antmicro.com>
2024-09-06 11:26:35 -04:00
Vinayak Kariappa Chettimada 34b6b3d9eb Bluetooth: Controller: Support FAKE_ENTROPY_NATIVE_POSIX
Add support for use of FAKE_ENTROPY_NATIVE_POSIX as entropy
driver for the Controller on BOARD_NRF54L15BSIM.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2024-09-06 11:26:19 -04:00
Adam Wojasinski 7e3580070f llext: Add filesystem based testcase to llext test suite
Extend tests with case where extension is copied from RAM buffer
into filesystem and then loaded from filesystem.

Signed-off-by: Adam Wojasinski <awojasinski@baylibre.com>
2024-09-06 11:26:09 -04:00
Adam Wojasinski 420891cedb llext: Add shell command for loading LLEXT from a filesystem
This patch extends LLEXT shell commands with support for loading
LLEXT from a filesystem. Use of the command requires absolute path
to the llext file.

Example use:
`llext load_llext hello_world /lfs/hello_world.llext`

Signed-off-by: Adam Wojasinski <awojasinski@baylibre.com>
2024-09-06 11:26:09 -04:00
Adam Wojasinski fc114e85dd llext: Add filesystem based extension loader
Added loader allowing to load extensions stored in a filesystem.

Signed-off-by: Adam Wojasinski <awojasinski@baylibre.com>
2024-09-06 11:26:09 -04:00
Adam Wojasinski 93ffeced6a llext: Add new methods to loader API
Introducing `llext_prepare()` and `llext_finalize()` APIs
that are invoked and the beginning and the end of the `llext_load()`
function.

The purpose of these functions is to bring possibility of initializing
loader before it is used and uninitialize or clean up when
it is no longer needed. Both functions are optional.

The buffer loader has been aligned to methods introduced in the patch.

Signed-off-by: Adam Wojasinski <awojasinski@baylibre.com>
2024-09-06 11:26:09 -04:00
Nicolas Pitre b5addc808a llext: adjust memory permissions on MMU systems
By default, normal memory is set readable+writable and not executable.
Adjust those permissions according to each region:

	LLEXT_MEM_TEXT                  --> K_MEM_PERM_EXEC
	LLEXT_MEM_DATA, LLEXT_MEM_BSS   --> K_MEM_PERM_RW
	LLEXT_MEM_RODATA                --> K_MEM_PERM_RO aka 0

This must be done only at the end of an LLEXT load operation as memory
needs to remain RW for reloc processing, etc.

And while at it, flush/invalidate the cache accordingly.

Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
2024-09-06 11:25:54 -04:00
Nicolas Pitre c692136f21 mmu: introduce k_mem_update_flags()
It is sometimes necessary to modify/update memory permissions on some
pages, especially with LLEXT where some allocated segments have to be
executable.

Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
2024-09-06 11:25:54 -04:00
Erwan Gouriou 16b194a067 boards: stm32: Remove explicit CLOCK_CONTROL setting
`CLOCK_CONTROL` subsystem being selected directly at family level,
remove it from individual board configurations.

Signed-off-by: Erwan Gouriou <erwan.gouriou@st.com>
2024-09-06 11:25:43 -04:00
Erwan Gouriou 0e30625eec drivers: clock_control: stm32: Default driver selection out of soc
Rather setting the driver default in soc, make it directly at symbol
level rather than soc and clean up redundant `select` occurrences.

Signed-off-by: Erwan Gouriou <erwan.gouriou@st.com>
2024-09-06 11:25:43 -04:00
Erwan Gouriou 1483396157 soc: stm32: Select CLOCK_CONTROL by default for whole family
CLOCK_CONTROL subsystem is expected to be enabled systematically on all
STM32 devices.
Make it a series default.

Signed-off-by: Erwan Gouriou <erwan.gouriou@st.com>
2024-09-06 11:25:43 -04:00
Ryan McClelland 82f8c3e3c5 drivers: i3c: shell: add cmd for enttm
Add a shell command for the i3c ccc enttm.

Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
2024-09-06 11:25:24 -04:00
Ryan McClelland b4d9c9dea6 drivers: i3c: add ccc enttm
Add helper function for the i3c ccc enttm

Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
2024-09-06 11:25:24 -04:00
Ryan McClelland f32ad971cd drivers: i3c: shell: add i3c ccc entas
Add shell commands for the i3c ccc entas0, entas1, entas2, and entas3.

Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
2024-09-06 11:24:40 -04:00
Ryan McClelland 9d2dd99ee8 drivers: i3c: add i3c ccc entas
Add helper functions for the I3C CCC ENTAS0, ENTAS1, ENTAS2, and
ENTAS3.

Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
2024-09-06 11:24:40 -04:00
Daniel DeGrasse 4658ed5652 drivers: input: input_gt911: fix OOB buffer write to touch points array
GT911 driver was reading an additional touch point into the stack
defined touch point array, causing an out-of-bounds write on the stack.
Fix this issue by adjusting the limit on the for loop, and add a note
to the driver as to why we don't need to validate the number of points
reported for future developers

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-09-06 10:13:14 -05:00
Maochen Wang 8562ae6155 hostap: fix SAP UDP RX low throughput in 5GHz
The default Max A-MPDU length is 8191 shown in the VHT Cap Info from
SAP's beacon/Assoc response, and this length is read from
hapd->iface->conf->vht_capab. It will lead to the AMPDU only contains
5 packets and the throughput is only 60Mbps for 1x1 HE case in 5GHz.
Change the default vht_capab to VHT_CAP_MAX_A_MPDU_LENGTH_EXPONENT_MAX
(1048575), and the throughput can be increased to 83Mbps.

Signed-off-by: Maochen Wang <maochen.wang@nxp.com>
2024-09-06 10:07:07 -05:00
Sean Nyekjaer d218a2d73e soc: nordic: nrf52: fix used define for enabling DCDC converter
Use the correct define for checking if the DCDC converter shall be
enabled.

This resolves the opposite behavior where boards that enable the DCDC
converter uses the LDO and boards where LDO is used they enable the
DCDC.

Fixes: e189fb0720 ("soc: nordic: nrf52: add support for DT-based
regulators config")
Signed-off-by: Sean Nyekjaer <sean@geanix.com>
2024-09-06 10:05:07 -05:00
Luca Arato 13eb7a1ee2 net: config: Fix sntp clock init Kconfig depends
Changed NET_CONFIG_CLOCK_SNTP_INIT depends on to require
POSIX_TIMERS instead of the deprecated POSIX_CLOCK

Signed-off-by: Luca Arato <luca.arato@secomind.com>
2024-09-06 10:01:22 -05:00
Lukas Gehreke f0c8693931 drivers: usb_dc_rpi_pico: Fixed connected handling
A connected state was reported as a disconnected state.
This led to wrong reports of the connected state to all systems
relying on it.

Signed-off-by: Lukas Gehreke <lk.gehreke@gmail.com>
2024-09-06 09:59:43 -05:00
Jukka Rissanen 6162bf91bf net: http_server: Clarify the host parameter in service define
Clarify the HTTP service definition so that the host parameter can
be set as NULL in which case the server will listen all addresses.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-09-06 09:58:50 -05:00
Jukka Rissanen 5e7d730274 samples: net: http_server: Create service binding to all addresses
Allow user to listen all IP addresses instead of hard coded one.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-09-06 09:58:50 -05:00
Jukka Rissanen 5480960fcf net: http_server: Turn off V6ONLY if IPv4-to-IPv6 mapping is enabled
Without this it is not possible to serve both IPv6 and IPv4
connections if service host is NULL.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-09-06 09:58:50 -05:00
Jukka Rissanen 3949873886 net: http_server: Allow service to be created with NULL host
Allow NULL host parameter when creating HTTP service. This means
that the socket is created without specifying binding address.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-09-06 09:58:50 -05:00
Benjamin Cabé 7e20a86e6a doc: samples: Improve code sample list styling
Make lists of code samples more compact (a lot of vertical real estate was
being wasted) and more visually appealing.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-09-06 09:56:13 -05:00
Benjamin Cabé 34982bb00b doc: samples: use :zephyr-app: for in-tree samples
The zephyr-app-commands directive can output a helpful hint to the user
when they are trying to build a sample that is in the Zephyr tree,
telling them to ensure they are in the root folder of the Zephyr repo.

Update all doc pages that were using :app: instead of :zephyr-app: so
that the hint is displayed.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-09-05 17:18:05 -04:00
Benjamin Cabé 0d25e30de6 samples: subsys: use zephyr:code-sample directive
Adds missing code-sample directive to the remaining samples in
`samples/subsys` that didn't use it yet in preparation for upcoming
changes to the Zephyr documentation that will be leveraging the provided
description and metadata.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-09-05 17:13:17 -04:00
Benjamin Cabé b23f43c096 doc: generation: fix link to zephyr.tag
This link probably never worked. This commit fixes the relative
URL to properly point to where Doxygen docs live.

Fixes #78016.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-09-05 17:12:32 -04:00
Santosh Male 3e0b068fff SOC: Updated MAX IRQ num supported by Aglex5
Agilex5 device supports maximum of 274 interrupts which includes XMAC
interrupts as well.

Signed-off-by: Santosh Male <santosh.male@intel.com>
2024-09-05 17:03:05 -04:00
Santosh Male 60fa3181c6 CODEOWNERS: Updated coder owners file
Added smale-12048867 as code owner for dwc_xgmac ethernet controller
driver.

Signed-off-by: Santosh Male <santosh.male@intel.com>
2024-09-05 17:03:05 -04:00
Santosh Male 36a7a12c4e Samples: Enabled Network Shell with XGMAC ethernet.
Enabled Network shell and Ethernet L2 interface
with XGMAC driver in CLI application
Enabled MDIO shelll with dwcxgmac mdio driver.
Enabled TCP and  UDP over IPV4.

Added intel_socfpga socdk support for echo_client and
echo_server sample applications.

Signed-off-by: Santosh Male <santosh.male@intel.com>
2024-09-05 17:03:05 -04:00
Santosh Male bd4defccd1 boards: arm64: Added board dts files
Updated board dts files for socdk and simics vp
with XGMAC and network configuration.

Signed-off-by: Santosh Male <santosh.male@intel.com>
2024-09-05 17:03:05 -04:00
Santosh Male 81b58ac35b dts: Added dwcxgmac dt nodes in soc dtsi file
Added XGMAC0, XGMAC1, XGMAC2 device nodes in
intel_socfpga_agilex5 dts file with default
parameter values and  default device node status
as 'disabled'.

Signed-off-by: Santosh Male <santosh.male@intel.com>
2024-09-05 17:03:05 -04:00
Santosh Male 8467c10447 drivers: ethernet: dwc_xgmac: Added dwc-xgmac
ethernet driver

This driver is capable of supporting basic features
of synposys dwc-xgmac ethernet MAC IP. Basic features
includes,
1. Tx and Rx, multiple Tx and Rx DMA channels, multiple
   Tx and Rx queues
2. Check Sum Offloading on Tx and Rx for IPv4, IPv6,
   TCP, UDP and ICMP packets
3. 10M/100M/1G speeds, Autonegotiation, Link speed
   configuration, Promiscuous mode, Full/Half
   duplex configuration
4. Added source files for synopsys dwc xgmac mdio driver.
   synopsys dwc xgmac mdio driver fetures includes:
   It supports clause 22 of IEEE 802.3 for ethernet PHY devices
   management.
5. Extended mdio shell support for dwcxgmac mdio driver.

Signed-off-by: Santosh Male <santosh.male@intel.com>
2024-09-05 17:03:05 -04:00
Emil Gydesen c82adf5db6 tests: Bluetooth: BAP: Use fallbacks for bcast bsim tests
Use fallbacks in codec cfg functions in the BAP broadcast
babblesim tests to avoid unnecessary noise in the logs of
the tests.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-09-05 17:02:47 -04:00
Emil Gydesen fcdfdae95b Bluetooth: Audio: Add to_str functions for some assigned numbers
Add to_str functions for context, parental rating, active state,
codec cap freq, codec cap frame duration,
codec cap channel count and location.

The remaining values are just numeric values and does not
need a to_str function.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-09-05 17:02:41 -04:00
Dominik Chat 518de763a6 dts: nordic: nrf5340: Change nRF5340 IPC backend to icbmsg
Change the default IPC backend of nRF5340 to icbmsg.

Signed-off-by: Dominik Chat <dominik.chat@nordicsemi.no>
2024-09-05 17:02:31 -04:00
Cla Mattia Galliard 3552609a08 doc: kernel: fix k_poll example
Fix `k_poll()` loop example by using separate `if` blocks instead of
`if`-`else`-chain to ensure all events are handled, even if multiple are
active at the same time.

Signed-off-by: Cla Mattia Galliard <cla-mattia.galliard@zuehlke.com>
2024-09-05 17:02:18 -04:00
Michal Smola 33407bfcd6 boards: frdm_mcxc242: Add basic support for board
Add basic support for NXP frdm_mcxc242 board.

Signed-off-by: Michal Smola <michal.smola@nxp.com>
2024-09-05 17:01:33 -04:00
Michal Smola dd052055d8 soc: nxp mcxc: Add support for NXP MCXC series
Add initial suport for NXP MCXC series

Signed-off-by: Michal Smola <michal.smola@nxp.com>
2024-09-05 17:01:33 -04:00
Michal Smola 427876604f dts: mcxc: Add initial support for NXP MCXC socs
Add initial support for NXP MCXC socs.

Signed-off-by: Michal Smola <michal.smola@nxp.com>
2024-09-05 17:01:33 -04:00
Michal Smola 88f838b0d2 drivers: uart: Fix build error for lpuart without modem support
LPUART without modem support is used in some NXP socs. Build error
occurs for such socs because of accessing unavailable register.
Fix it by adding #if directive for checking modem support availability.

Signed-off-by: Michal Smola <michal.smola@nxp.com>
2024-09-05 17:01:33 -04:00
Michal Smola ecf6e347f8 include: dt-bindings: kinetis sim: Add clock sources definitions
Add OSCERCLK, MCGIRCLK, and MCGPCLK clock sources definitions
to the kinetis_sim.h in include dt-bindings.

Signed-off-by: Michal Smola <michal.smola@nxp.com>
2024-09-05 17:01:33 -04:00
Michal Smola 5ddde693f5 dts: bindings: Add binding for NXP mcxc oscillator
Devicetree binding for NXP mcxc oscillator is not available.
Add the binding to be able to configure the oscillator in devicetree.

Signed-off-by: Michal Smola <michal.smola@nxp.com>
2024-09-05 17:01:33 -04:00
Michal Smola d913f6cc9f dts: bindings: kinetis-ftfa: Add configuration properties
Add configuration settings for the FOPT, FSEC, and flash configuration
offset to the FTFA module binding.

Signed-off-by: Michal Smola <michal.smola@nxp.com>
2024-09-05 17:01:33 -04:00
Michal Smola 5a6b339046 dts: bindings: nxp kinetis mcg: Add optional frequency dividers
fcrdiv and lircdiv2 dividers properties are not configurable in device
tree. Add the properties.

Signed-off-by: Michal Smola <michal.smola@nxp.com>
2024-09-05 17:01:33 -04:00
Fabian Pflug cdfab15b99 charger: bq25180: Add threshold voltage for precharge
Charging a battery has three phases (compare Figure 8-2 in
https://www.ti.com/lit/ds/symlink/bq25180.pdf)

First is a pre-charge phase, then a constant current, then a constant
voltage phase.
During the pre-charge phase, the battery is only charged with a very low
current, to not damage the cells, because they are below a threshold,
that is considered healthy for the battery and need to be brought back
up to a healthy voltage.

Signed-off-by: Fabian Pflug <fabian.pflug@grandcentrix.net>
2024-09-05 17:01:05 -04:00
Fabian Pflug 6b2442244d charger: bq25180: add support for recharge voltage threshold
The battery charger will stop charging the battery if it believes,
that is is completely charged. If the battery drops below a certain
voltage threshold, then the battery charger starts charging the
battery again.

For the bq25180 the threshold can only be one of either 100mV or
200mV below the VSET voltage.

See table 8-16 Bit 5 in https://www.ti.com/lit/ds/symlink/bq25180.pdf

Signed-off-by: Fabian Pflug <fabian.pflug@grandcentrix.net>
2024-09-05 17:01:05 -04:00
Fabian Pflug f698832410 charger: bq25180: add control for battery charge limit
The linear battery charger will charge the connected battery up
to a specific voltage. This is different depending on the chemistry
of the battery. Most LiPo Batteries have a nominal voltage of 4.2V,
which is why the default voltage of the bq25180 is 4.2V.

Signed-off-by: Fabian Pflug <fabian.pflug@grandcentrix.net>
2024-09-05 17:01:05 -04:00
Federico Di Gregorio d5447a310e boards: opta: initial support for M7 core
Features enabled by this commit:

* M7 core available with or without the Arduino MCU-based bootloader by
  correctly initializing the external clock source.
* All LEDs, relays and the user button are mapped into the device tree
  (samples/common/blinky works out of the box).
* USB can be used in ACM mode (samples/subsys/usb/cdc_acm works without
  changes). The default Zephyr console is configured to use cdc_acm_uart0
  that in turn is assigned to the only USB port available.

Also enable USB stack to make sure that the console is available by default
and twister builds don't fail with missing device and added the default USB
vendor (0x35d1 Finder SpA) and product (0x0164) numbers to match the ones
used in the original product.

Signed-off-by: Federico Di Gregorio <fog@dndg.it>
2024-09-05 17:00:49 -04:00