Commit graph

86920 commits

Author SHA1 Message Date
Guennadi Liakhovetski bca88b4b3a llext: fix exporting objects
When exporting a symbol, we need to use "&" explicitly, otherwise
it only works for functions and doesn't work for objects.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2023-11-09 18:21:27 +01:00
Guennadi Liakhovetski 6185da5d71 llext: fix a typo in elf_rel_t 64-bit definition
struct elf64_rela is undefined, use the correct structure name.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2023-11-09 18:21:27 +01:00
Guennadi Liakhovetski f0527b5571 llext: add a weak arch_elf_relocate() stub
The module linking API can be used for shared objects with no
architecture-specific relocation code. Add a weak function for such
cases.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2023-11-09 18:21:27 +01:00
Guennadi Liakhovetski ade72c2b3a llext: remove a superfluous variable initialisation
ret in llext_load() is always assigned before use, remove its
redundant initialisation.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2023-11-09 18:21:27 +01:00
Manuel Argüelles 595a9c11c8 counter: nxp_s32_sys_timer: use instance-based DT macros
At present, many of the NXP S32 shim drivers do not make use of
devicetree instance-based macros because the NXP S32 HAL relies on an
index-based approach, requiring knowledge of the peripheral instance
index during both compilation and runtime, and this index might not
align with the devicetree instance index.

The proposed solution in this patch eliminates this limitation by
determining the peripheral instance index during compilation
through macrobatics and defining the driver's ISR within the shim
driver itself.

Note that for some peripheral instances is needed to redefine the
HAL macros of the peripheral base address, since the naming is not
uniform for all instances.

Signed-off-by: Manuel Argüelles <manuel.arguelles@nxp.com>
2023-11-09 18:21:19 +01:00
Laurentiu Mihalcea 5cdd377316 boards: xtensa: nxp_adsp_imx8(x): Add serial support
This commit introduces all changes necessary for utilizing
the serial interface on i.MX8QM/QXP.

Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
2023-11-09 18:21:05 +01:00
Laurentiu Mihalcea dcddb2e0f7 dts: xtensa: nxp_imx8: Add dummy interrupt controller node
Since the LPUART peripheral DTS binding requires the
"interrupts" property be specified even if it's not going
to be used for now we need to add a dummy interrupt controller
node to make that possible. Logically speaking, this dummy
interrupt controller should be used by peripherals which
can assert interrupts directly routed to the DSP.

Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
2023-11-09 18:21:05 +01:00
Laurentiu Mihalcea 707759bd12 soc: xtensa: imx8: Add pinctrl support
This commit introduces support for pinctrl-related operations
on i.MX8QM/QXP.

Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
2023-11-09 18:21:05 +01:00
Laurentiu Mihalcea ea99578b76 soc: xtensa: imx8: Enable clock control on i.MX8QM/QXP
This commit enables clock control on the i.MX8QM and QXP boards.
This is achieved through the following changes:
	1) The "reg" property is no longer marked as required
	for the "nxp,imx-ccm" binding. This is necessary because
	in the case of i.MX8QM and i.MX8QXP the clock management
	is done through the SCFW, hence there's no need to access
	CCM's MMIO space (not that you could anyways).

	2) The DTS now contains a scu_mu node. This node refers
	to the MU instance used by the DSP to communicate with
	the SCFW.

	3) The CCM driver needs to support the LPUART clocks
	(which will be the only IP that's supported for now)
	and needs to perform an initialization so that the
	NXP HAL driver knows which MU to use to communicate
	with the SCFW.

Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
2023-11-09 18:21:05 +01:00
Laurentiu Mihalcea eb12bae048 soc: xtensa: imx8: Configuration cleanup
As the name suggests, this commit attempts to cleanup some
of the configurations for the i.MX8 series. This cleanup
consists of either relocating the configuration or removing
unnecessary configurations.

As a rule of thumb, SoC-specific configurations have been moved
to Kconfig.series. If the configuration is by default 'y' and
needs to be set to 'n' or it has a numeric value then it has
been moved to Kconfig.defconfig.series. Configurations that
are default 'n' and were also explicitly set to 'n' have been
removed. Also, enabling logging has been moved to the board
level to avoid having to force all boards based on the same
SoC to enable logging.

Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
2023-11-09 18:21:05 +01:00
Laurentiu Mihalcea ad7e858938 soc: xtensa: imx8: memory.h: Cleanup
This commit attempts to clean the memory.h header by doing
the following changes:
	1) Change the include guard to the standard
	ZEPHYR_....
	2) Remove unused macro definitions.

Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
2023-11-09 18:21:05 +01:00
Laurentiu Mihalcea f29d6edece soc: xtensa: imx8: Remove include/soc directory
Since platform.h is a SOF-specific header that's no
longer used there's no point in keeping the include/soc directory.
As such, move memory.h to include/ and modify the linker script
to reflect this location change.

Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
2023-11-09 18:21:05 +01:00
Laurentiu Mihalcea a0ecc05cdf soc: xtensa: imx8: Split generic i.MX8 SoC into i.MX8QXP and i.MX8QM
This commit attempts to split the generic i.MX8 SoC into its
QXP and QM variants. As things are now, the i.MX8 SoC doesn't
have any NXP HAL files to back it up. As a consequence, the
native Zephyr drivers cannot be used.

To solve this issue, the generic i.MX8 has been split into
i.MX8QXP and i.MX8QM, each of them having different NXP HAL
files.

Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
2023-11-09 18:21:05 +01:00
Laurentiu Mihalcea 5e7a9e5e9f manifest: Bump up hal_nxp revision
Bump up hal_nxp revision to contain the
HAL headers for i.MX8QM's and i.MX8QXP's DSP.

Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
2023-11-09 18:21:05 +01:00
Laurentiu Mihalcea d45d323da2 manifest: Bump up hal_xtensa revision
Bump up hal_xtensa revision to contain the overlays
for i.MX8QM and i.MX8QXP.

Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
2023-11-09 18:21:05 +01:00
Yong Cong Sin ffb8f31bff drivers: intc: plic: Use sys IO APIs to access memory-mapped registers
Use arch-specific sys IO APIs to access the memory-mapped
registers to ensure safe memory operations

fixes #62956

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2023-11-09 18:20:43 +01:00
Yong Cong Sin 980fb4b846 drivers: intc: plic: make sense of magic number
Added some defines and helper functions to help with the
arithmetics so that the bit shifts and stuff do not look like
magic number.

Converted manual bit shift/set/unset to use macros provided by
Zephyr.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2023-11-09 18:20:43 +01:00
Yong Cong Sin efd1073ceb tests: build_all: plic: multi instance
Add PLIC multi-instance build-only test.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2023-11-09 18:20:43 +01:00
Yong Cong Sin e538b0e5a6 drivers: plic: support multiple instances for multi-level
Most of the public APIs in `riscv_plic.h`
(except `riscv_plic_get_irq` & `riscv_plic_get_dev`) expect the
`irq` argument to be in Zephyr-encoded format, instead of the
previously `irq_from_level_2`-stripped version. The first level
IRQ is needed by `intc_plic` to differentiate between the
parent interrupt controllers, so that correct ISR offset can be
obtained using the LUT in `sw_isr_common`.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2023-11-09 18:20:43 +01:00
Yong Cong Sin 76a7b3cf1c drivers: intc: plic: initial refactor for multi-instance support
Use a config struct to store per-instance device config during
init and connect the IRQ based on the devicetree instead of
hardcoded value and instance number.

The `get_plic_dev_from_irq` is still a placeholder for now and
always return the first instance.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2023-11-09 18:20:43 +01:00
Anas Nashif b72e5c1f3d MAINTAINERS: more fixes and expansion of coverage
More fixes and new areas that were not covered before.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2023-11-09 11:24:32 -05:00
Emil Lindqvist 8a77ad406f lsm6dsl: add pm suspend and resume to lsm6dsl
This commit implements the suspend and resume
PM API for LSM6DSL accelerometer.

Signed-off-by: Emil Lindqvist <emil@lindq.gr>
2023-11-09 10:04:15 -06:00
Bartosz Bilas 8129307887 drivers: charger: add charger prefix for bq24190
Many (or almost all) drivers contain the specified prefixes
related to the driver subsys so add the missing one for the
BQ24190.

Signed-off-by: Bartosz Bilas <bartosz.bilas@hotmail.com>
2023-11-09 09:57:30 -06:00
Lukasz Majewski 12665a0dc1 driver: eth: Support for lan8651 T1S ETH
This patch set provides support for T1S ethernet device - LAN8651.

For SPI communication the implementation of Open Alliance TC6
specification is used.

The driver implementation focuses mostly on reducing memory footprint,
as the used SoC (STM32G491) for development has only 32 KiB RAM in total.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
2023-11-09 15:35:01 +01:00
Lukasz Majewski 1cef7f3250 driver: eth: Implementation of Open Alliance's TC6 T1S communication
Those files provide generic functions to handle transmission between chip
conforming OA TC6 standard and Zephyr's network stack represented by
struct net_pkt.

The communication is performed via SPI and is focused on reduced memory
footprint (works with SOC equipped with 32 KiB of RAM) and robustness of
operation.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
2023-11-09 15:35:01 +01:00
Declan Snyder 345f079e49 dts: bindings: Fix NXP USB bindings
NXP USB bindings were combined into one binding and using
a property corresponding to HAL enums which is improper use
of devicetree.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2023-11-09 15:34:39 +01:00
Ting Shen c5d3fc10c1 drivers: usb_dc_it82xx2: fix uninitialized variable warning
ep_ctrl and ep_trans_type is not used inside it82xx2_usb_dc_isr, this
triggers a compile warning. Move these variables to a smaller scope.

Signed-off-by: Ting Shen <phoenixshen@google.com>
2023-11-09 15:34:18 +01:00
Ayush Singh dfe1c3a32b drivers: i2c: add gpio_i2c_switch
Add drivers for gpio_i2c_switch which is present in beagleconnect freedom

Signed-off-by: Vaishnav Achath <vaishnav@beagleboard.org>
Signed-off-by: Ayush Singh <ayushdevel1325@gmail.com>
2023-11-09 15:33:54 +01:00
Ayush Singh 2b98b67109 dt-bindings: i2c: Add gpio-i2c-switch
Generic GPIO enabled analog switch to isolate devices from an I2C bus

Signed-off-by: Vaishnav Achath <vaishnav@beagleboard.org>
Signed-off-by: Ayush Singh <ayushdevel1325@gmail.com>
2023-11-09 15:33:54 +01:00
Benjamin Cabé abc334016f doc: pdf: Use single column for the index
The index at the end of the PDF document can contain pretty long strings
that don't fit in the default 2-column layout.
This commit makes the index use a single-column.

Note: this relies on LaTeX package idxlayout which should already be
included in the packages recommended for installation in our
instructions.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2023-11-09 15:33:40 +01:00
Dong Wang 2938856cac west.yml: update hal_intel to latest
It contains changes from ISH code base:
 - Switch IPC/SPI SEDI drivers to use OSXML header files.
 - Enhance SEDI debug functions.
 - I2C and SPI drivers' bug fix and enhancements.

Signed-off-by: Dong Wang <dong.d.wang@intel.com>
2023-11-09 15:33:31 +01:00
Magdalena Kasenberg 35f326b821 bluetooth: leaudio: Termination of PA at Modify Source
From BASS spec:
If the PA_Sync parameter value written by the client is set to a value
of 0x00 (Do not synchronize to PA) and the server is synchronized to
the PA, the server shall stop synchronization with the PA and shall
write a value of 0x00 (Not synchronized to PA) to the PA_Sync_State
field of the Broadcast Receive State characteristic .

Fixes BASS/SR/CP/BV-12-C test case.

Signed-off-by: Magdalena Kasenberg <magdalena.kasenberg@codecoup.pl>
2023-11-09 15:32:32 +01:00
Andy Sinclair 0cbe0298cb drivers: regulator: npm1300: Fixed LDSW GPIO control
The load switch / LDO pin configuration function now
correctly configures the associated GPIO pin.

Signed-off-by: Andy Sinclair <andy.sinclair@nordicsemi.no>
2023-11-09 15:32:17 +01:00
Andy Sinclair 488f56c033 drivers: regulator: npm1300: soft start configuration
Added configuration of soft start functionality

Signed-off-by: Andy Sinclair <andy.sinclair@nordicsemi.no>
2023-11-09 15:32:17 +01:00
Mariano Goluboff 45f664abf5 drivers: console: fix dropped characters when using debug hooks
When using console debug server hooks, not all characters are
processed if the server hook returns non-zero for one character
while there are other characters in the buffer. This is seen
when using a fast console (like USB) where multiple characters
come in before the ISR is called. Fix it by continuing to
process characters instead of returning from the ISR with
characters still in the buffer.

Fixes: #64661

Signed-off-by: Mariano Goluboff <mariano.goluboff@nordicsemi.no>
2023-11-09 15:32:10 +01:00
Daniel DeGrasse 47ce94527a doc: services: pm: fix function prototype for PM device support
Function prototype in PM device implementation documentation had the
incorrect prototype for device power management. Fix this to align
with the correct prototype.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2023-11-09 15:32:01 +01:00
Yong Cong Sin 30940418b3 doc: kconfig: sort devicetree functions alphabetically
Sort these entries alphabetically to make it easier to read.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2023-11-09 15:31:38 +01:00
Yong Cong Sin 4b0fa40c71 doc: kconfig: remove duplicated devicetree function
These devicetree function entries already existed in the doc
since #21133.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2023-11-09 15:31:38 +01:00
Benjamin Cabé 7d3381f9c8 doc: Rename "report an issue" label
Clarify the "Report an issue" label in HTML documentation.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2023-11-09 14:50:21 +01:00
Benjamin Cabé 6cf694a2ad doc: gh_utils: Use MAINTAINERS file to add labels to opened issues
Use get_maintainer.py to add more meaningful labels to issues creates
from a documentation page.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2023-11-09 14:50:21 +01:00
Benjamin Cabé a3ed8f827f doc: gh_utils: Use "doc:" prefix in opened issue title
Not sure why I used square brackets for "[doc]" prefix of the default
Github issue title. Change it to "doc:".

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2023-11-09 14:50:21 +01:00
Benjamin Cabé f6400f17cb doc: gh_utils: Fix incorrect condition for empty string
Page prefix can be an empty string.
Fixed the condition so that it only evaluates to try when prefix is
truly None.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2023-11-09 14:50:21 +01:00
Benjamin Cabé 61dd68a5ee doc: gh_utils: use doc2path method from BuildEnvironment
Use BuildEnvironment to get the path of a document.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2023-11-09 14:50:21 +01:00
Benjamin Cabé cf52afb3fb doc: gh_utils: Remove unnecessary ZEPHYR_BASE config option
Compute ZEPHYR_BASE like other extensions do rather than artificially
pretend it's a config option.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2023-11-09 14:50:21 +01:00
Benjamin Cabé 0f07889bcd doc: gh_utils: add docstring for get_page_prefix
Add documentation to the get_page_prefix method.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2023-11-09 14:50:21 +01:00
Dat Nguyen Duy a39d2dc9d5 drivers: nxp_s32: add missing soc.h inclusion
Some NXP S32 shim drivers are using macros defined in
soc/arm/nxp_s32/*/soc.h but not including soc.h. Those still
can be built because the header file is included indirectly
by some other header files. This is very fragile, it should
be included directly

Signed-off-by: Dat Nguyen Duy <dat.nguyenduy@nxp.com>
2023-11-09 11:23:46 +01:00
Benjamin Cabé df6a9f2d30 doc: css: fix dark theme for gui roles
Fix dark theme issues with guilabel and menuselection roles.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2023-11-09 10:23:31 +00:00
Benjamin Cabé 00758b3e9a doc: gsg: macOS: Use menuselection role
Small tweak to use Sphinx `menuselection` role and make the menu output
more readable.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2023-11-09 10:23:31 +00:00
Bartosz Bilas f409f67db4 tests: drivers: adc: move ad5592-adc node into native_posix.overlay
Remove the `app.overlay` file which has been
wrongly added in ad3c5a2 commit. Instead of that
add the ad5592-adc node into `native_posix.overlay` file.

Signed-off-by: Bartosz Bilas <b.bilas@grinn-global.com>
2023-11-09 11:23:14 +01:00
Declan Snyder 6af171d44b include: net_if: Fix IPV6 prefix struct doc desc
IPv6 Prefix struct doc description is a copy paste error, fix

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2023-11-09 11:22:54 +01:00