Commit Graph

103487 Commits

Author SHA1 Message Date
Joel Hirsbrunner 7454cb984b Devicetree: Devicetree Bindings: Adjust python tests
Adjust existing tests to support the changes and add new tests to test
the newly added feature.

Signed-off-by: Joel Hirsbrunner <jhirsbrunner@baumer.com>
2024-10-15 04:11:36 -04:00
Joel Hirsbrunner 8b02bc9392 Devicetree: Devicetree Bindings: Support enums for array like dt props
It is currently impossible to use enum with any array like type (i.e.
string-array and array, these are the only ones that make sense) in the
devicetree and dt-bindings.
However, there is no such remark in the dt-bindings section of the docs.
Since this is a feature that comes in very handy and is implemented
fairly easily, I adjusted the scripts for this.

It is now possible to do something like this.
```yaml
compatible = "enums"

properties:
  array-enum:
    type: string-array
    enum:
      - bar
      - foo
      - baz
      - zoo
```
```dts
/ {
	enums {
		compatible = "enums";
		array-enum = "foo", "bar";
	};
};
```

Signed-off-by: Joel Hirsbrunner <jhirsbrunner@baumer.com>
2024-10-15 04:11:36 -04:00
Grzegorz Swiderski 85b03949e4 boards: nordic: Flatten shared_ramxx_region nodes
Update the default memory maps for `nrf54h20dk` and `nrf9280pdk` to
remove the `shared_ram20_region` and `shared_ram3x_region` nodes,
because their child nodes no longer need to be grouped together:

  * IPC buffers in RAM20 are statically allocated.
  * DMA buffers in RAM3x have separate access owners.

Signed-off-by: Grzegorz Swiderski <grzegorz.swiderski@nordicsemi.no>
2024-10-15 04:11:21 -04:00
Grzegorz Swiderski 13b1cfa5ec boards: nordic: Align with updated Nordic owned memory bindings
Apply the following changes to `nrf54h20dk` and `nrf9280pdk`:

* Convert `perm-*` properties to the newly introduced `nordic,access`,
  both in board files and tests.

* Redefine shared regions to specify multiple access owners per node,
  and ensure that each such region is reserved by one domain at a time.
  `cpuapp_cpurad_ram0x_region` is only enabled by Radiocore, while
  `cpuapp_cpucell_ram0x_region` is only enabled by Application core.

* Divide `shared_ram3x_region` so that each sub-region is owned by a
  different domain. Their addresses must be rounded down to fit the
  current UICR format.

Signed-off-by: Grzegorz Swiderski <grzegorz.swiderski@nordicsemi.no>
2024-10-15 04:11:21 -04:00
Grzegorz Swiderski 365e9d63d0 dts: bindings: Update Nordic owned memory bindings
This concerns both `nordic,owned-memory` and `nordic,owned-partitions`.

Introduce a property named `nordic,access`, which is meant to replace
the `owner-id` and `perm-*` properties. It allows for describing how
multiple domains should access a single memory region, possibly with
different permissions per owner, but without having to create more than
one DT node for this purpose.

This change is also motivated by updated memory protection requirements
on the nRF54H20, which mandate that a given memory region must only be
reserved by one domain, even if multiple domains can have access to it.
This restriction is now described in the binding itself.

Signed-off-by: Grzegorz Swiderski <grzegorz.swiderski@nordicsemi.no>
2024-10-15 04:11:21 -04:00
Jukka Rissanen c409d106ac samples: net: echo-server: Add websocket console support
Add enablers that can be used to setup websocket console
for this sample.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-10-15 04:11:03 -04:00
Jukka Rissanen 7510e2d940 shell: backend: Create a websocket transport backend
This creates a websocket based shell backend that is used to
implement a websocket console that can be connected using a browser.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-10-15 04:11:03 -04:00
Jukka Rissanen 7408004531 logging: backend: Add websocket backend
Allow logging output to websocket console. Requires that
websocket shell backend and websocket HTTP server support
is also enabled.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-10-15 04:11:03 -04:00
Daniel DeGrasse 20cce995da samples: drivers: video: capture: don't apply format unless needed
Do not apply format setting unless needed. Also, correct the check for
the RGB565 format setting- the zephyr display API treats RGB565 and
BGR565 as big endian, so the format needed here is BGR565.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-10-15 04:10:50 -04:00
Daniel DeGrasse 22cb79d221 samples: video: capture: add support for SMARTDMA
Add support for using the SMARTDMA engine on the FRDM-MCXN947 board with
the video capture sample.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-10-15 04:10:50 -04:00
Daniel DeGrasse a79574f9dc boards: nxp: frdm_mcnx947: add support for SMARTDMA camera engine
Add support for SMARTDMA camera engine, and a OV7670 parallel camera
definition for the frdm_mcnx947 board. This support has been tested with
the video capture sample.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-10-15 04:10:50 -04:00
Daniel DeGrasse 7c3f0f6a34 boards: nxp: frdm_mcn947: add support for LPI2C7
Add support for LPI2C7. This peripheral is used for interfacing with
cameras connected to the J9 header.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-10-15 04:10:50 -04:00
Daniel DeGrasse df448b6fbb dts: arm: nxp: nxp_mcxn94x: add definition for SMARTDMA device
Add definition for SMARTDMA device to the MCXN94x devicetree.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-10-15 04:10:50 -04:00
Daniel DeGrasse d2df15a0e9 drivers: video: video_mcux_smartdma: add SMARTDMA video driver
Add SMARTDMA video driver. This driver uses the SMARTDMA engine as a
parallel camera interface, which can read QVGA frames from a camera
device. Due to SRAM constraints, the video driver divides the camera
stream into multiple horizontal video buffers as it streams them back to
an application.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-10-15 04:10:50 -04:00
Daniel DeGrasse f386cc26fa drivers: video: ov7670: improve resolution init code
Improve resolution init code for OV7670 driver, to properly program the
full set of registers needed to realize a given output resolution. The
settings for these registers are based on those used in the MCUX SDK
driver, which are derived from the resolution register settings given in
the OV7670 programming guide, with a different configuration for the
CLKSRC and DBLV registers used for the input clock.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-10-15 04:10:50 -04:00
Daniel DeGrasse 126306981d drivers: dma: dma_mcux_smartdma: update interface to support custom FW
The SMARTDMA is a programmable DMA engine, and supports custom firmware
in order to run complex DMA operations. Update the driver to increase
the flexibility users have when configuring the SMARTDMA with
custom firmware, and remove the RT500 display firmware specific
definitions and functionality from the driver.

This display setup is now handled from the MIPI DSI driver, since the
firmware used for this case is specific to the MIPI DSI IP.

This change also requires an update to the RT500 devicetree, as the
register definition for the SMARTDMA has changed, so the base address
must as well.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-10-15 04:10:50 -04:00
Daniel DeGrasse 97943295e5 samples: drivers: video: handle line_offset field
Handle line_offset field within video capture sample. Other samples do
not support partial framebuffers and therefore can ignore this field.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-10-15 04:10:50 -04:00
Daniel DeGrasse 561198ac75 drivers: video: handle line_offset field
Since all video drivers in tree use a full frame, their video buffers
will always start at a line_offset of 0 within the frame.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-10-15 04:10:50 -04:00
Daniel DeGrasse 04a007f9fe drivers: video: add line_offset field to video_buffer structure
Add line_offset field to the video_buffer structure. This field
indicates the offset (in horizontal lines) within a frame that a video
buffer starts at. This is useful for video devices that produce or
consume video buffers that constitute a partial frame.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-10-15 04:10:50 -04:00
Daniel DeGrasse 2fb259833f samples: drivers: video: update video samples for min/max line count
Update video samples to use min/max line count capabilities when
allocating video buffers.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-10-15 04:10:50 -04:00
Daniel DeGrasse ec6ffc8b33 drivers: video: update video drivers to handle min/max line count
Update existing video drivers to handle the min/max line count field
within the video_caps structure. All drivers work with full frames
currently, so use the special LINE_COUNT_HEIGHT value to indicate this.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-10-15 04:10:50 -04:00
Daniel DeGrasse f46e5342c4 drivers: video: add min_line_count and max_line_count to video_caps
Add min and max line count to the video_caps structure- these fields can
be used by applications to determine the size of video buffer they need
to allocate for a video endpoint

The min and max line count fields are designed to enable supporting
endpoints that may produce or consume partial frames within each video
buffer, and may support arbitrarily sized video buffers.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-10-15 04:10:50 -04:00
Paweł Czaplewski 217fdf9d24 tests: drivers: i2c: fix I2C registers configuration in i2c.dtsi
Fixed incorrect I2C register definitions in the test file
tests/drivers/build_all/sensor/i2c.dtsi.

Signed-off-by: Paweł Czaplewski <pawel.czaplewski@arrow.com>
2024-10-15 04:10:40 -04:00
Paweł Czaplewski 9fe959857a drivers: sensor: tmp1075: Add tmp1075 sensor driver and sample
TI tmp1075 driver implemented based on tmp108 driver.
The driver initializes the sensor based on the DTS.

Added tmp1075 example overlay file to thermometer sample.
All you need to do to use the sensor is to connect the I2C and
optionally interrupt line.
To see default DTS configuration option inspect `ti,tmp1075.yaml`
bindings file and sensor spec.

Signed-off-by: Paweł Czaplewski <pawel.czaplewski@arrow.com>
2024-10-15 04:10:40 -04:00
Emil Gydesen cd5a9f62bb tests: Bluetooth: CCID: Add unit testing of CCID
Add unit tests of the CCID functions.
To support these new tests, the GATT mocks need to
support dynamic GATT DB so we can add and remove
a service that contains CCIDs.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-10-15 04:10:28 -04:00
Emil Gydesen 203bcf3774 Bluetooth: CCID: Make the CCID API public
Move the CCID header to the include directory
to make it public.

This also compiles the ccid.c file whenver CONFIG_BT_CONN
is enabled, rather than having an additional Kconfig for it,
since the API is now public and may be used by other than
our internal services.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-10-15 04:10:28 -04:00
Emil Gydesen 5f1a573809 Bluetooth: CCID: Improved CCID allocation
Rather than throwing an assert, it will now do a better
check for already-allocated CCIDs and return an error instead.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-10-15 04:10:28 -04:00
Emil Gydesen 7461f3781e Bluetooth: CCID: Rename ccid_get_value to alloc_value
alloc_value is more correct as it does allocate a new
value, rather than just returning/getting a value.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-10-15 04:10:28 -04:00
Adam Dunkels 221199e15b runners: jlink: add support for J-Link tunnels
This adds support for J-Link tunnels, which run on top of an IP network
and therefore uses the -IP option. J-Link tunnels are identified by a
tunnel: prefix instead of a bare IP address. This change checks for the
presence of such a prefix, and choses the -IP transport option if the
tunnel prefix is found.

This has been tested with J-Link Remote Server v7.98g and the SEGGER
tunnel option.

Signed-off-by: Adam Dunkels <adam@dunkels.com>
2024-10-15 04:10:18 -04:00
Bernhard Krämer b4a35d9b10 boards: teensy4: Update config for ethernet
- Updates teensy board configs for use with new `eth_nxp_enet.c` driver
- Remove ethernet configs from teensy40 (4.0 has no ethernet phy)
- Adds a device entry to include `tests/drivers/build_all/ethernet/`

Signed-off-by: Bernhard Krämer <bdkrae@gmail.com>
2024-10-15 04:10:06 -04:00
Bernhard Krämer 6ea04441f9 drivers: ethernet: Add DP83825 phy driver
Includes dt binding

Signed-off-by: Bernhard Krämer <bdkrae@gmail.com>
2024-10-15 04:10:06 -04:00
TOKITA Hiroshi 042a40d0e3 drivers: lora: rylrxxx: Add stdio.h to resolve function prototypes
The source code uses functions from stdio.h,
such as `sprintf()`, but they are not explicitly included
so that we will add it.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2024-10-15 04:09:56 -04:00
TOKITA Hiroshi 1d4c29ab29 drivers: lora: rylrxxx: Fix missing `default y` in LORA_RYLRXXX
The `default y`, which is coupled with
`depends on DT_HAS_REYAX_RYLRXXX_ENABLED` to link the settings with
DeviceTree, which was missing, so I added it.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2024-10-15 04:09:56 -04:00
TOKITA Hiroshi 0ce32c963e tests: drivers: build_all: lora: Add devices build tests
Add build tests for the following devices.

- semtech,sx1262
- semtech,sx1272
- reyax,rylrxxx

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2024-10-15 04:09:56 -04:00
Adrian Warecki 256ab0c919 ace: mm: tlb: Check tlb translation enabled before flushing cache
Before unmapping a memory page, the cache is flushed. If the given memory
page is not mapped, this operation ends with a cpu exception on the
ptl platform. Add check if tlb translation is active before flushing.

Signed-off-by: Adrian Warecki <adrian.warecki@intel.com>
2024-10-15 04:09:49 -04:00
Adrian Warecki 0e9b9b0cf3 ace: mm: tlb: Ignore unmappig error in driver initalization
The sys_mm_drv_unmap_region_initial function is responsible for unmapping
all unused virtual memory during tlb driver initialization. Most addresses
will not have a mapped page. Ignore the error code indicating unmapped
memory that will occur when trying to unmap.

Signed-off-by: Adrian Warecki <adrian.warecki@intel.com>
2024-10-15 04:09:49 -04:00
Declan Snyder 3be548b139 boards: frdm_mcxw71: Enable LPI2C1
Enable LPI2C1 on the frdm_mcxw71 board which is connected to a
FXLS8964AF sensor (no driver for the sensor yet).

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-10-15 04:09:34 -04:00
Declan Snyder 8a104729c4 soc: nxp: mcxw71: Add LPI2C node and clocking
Add LPI2C node and default clocking in soc.c

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-10-15 04:09:34 -04:00
Bjarki Arge Andreasen e933c7eaee boards: nordic: nrf7002dk: re-enable external flash by default
The external flash (mx25r64) was accidentally disabled during
testing. The node should be enabled by default like its spi.

This commit removes the status = "disabled";

Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
2024-10-15 04:09:26 -04:00
Hake Huang 33fe360bfc tests: twister: runner add runner test
add test for platform in extra_args

Signed-off-by: Hake Huang <hake.huang@oss.nxp.com>
2024-10-15 04:09:16 -04:00
Hake Huang c05e4802fb document: twister: update documents for extra_args
now extra_args can support domain settings, add in doc.

Signed-off-by: Hake Huang <hake.huang@oss.nxp.com>
2024-10-15 04:09:16 -04:00
Hake Huang c759068c40 twister: runner: add extra_args supporting platform and soc
like extra_confs, add extr_args filterable by
soc:<arch>:<extra_args> or
platfrom:<platform name>: <extra_args>
simulation:<simulator name>: <extra_args>

which will only apply to given platform or arch

Signed-off-by: Hake Huang <hake.huang@oss.nxp.com>
2024-10-15 04:09:16 -04:00
Krzysztof Chruściński 835dd0b83e logging: Refactor filtering macros
Create a macro that encapsulates all filtering and use it in standard
and hexdump macros.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-10-15 04:09:04 -04:00
Krzysztof Chruściński 6adfd4ba89 logging: Minor cleanup in logging helper macros
Change logging level definitions to just numbers instead of
numbers with unsigned indicator (e.g. 1 instead of 1U). Levels
from Kconfig comes as just numbers and often levels are used
for IS_ENABLED-type of macros where values are concatenated
into tokens and it actually makes the difference if value is
1 or 1U. It allows minor cleanup in the internal macros.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-10-15 04:09:04 -04:00
Declan Snyder 2ab104625e drivers: mdio_nxp_enet: Don't disable IRQ
No real need to be enabling and disabling IRQs, this logic has been
reported to be causing spurious interrupts and strange behavior, we can
just enable the interrupt and switch to interrupt based logic one time
and keep the interrupt enabled at that point.

Also, fix a W1C bug where |= was used instead of = to clear a flag.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-10-15 04:08:30 -04:00
Daniel DeGrasse feb0241536 soc: nxp: lpc55xxx: fix dependencies for SOC_FLASH_MCUX
SOC_FLASH_MCUX has additional dependencies for LPC55xxx CPUs, due to the
fact that the flash should be disabled when executing in nonsecure mode.

Since the merge of HWMv2, this dependency has been set incorrectly at
the SOC level, resulting in the IAP flash driver being enabled when
targeting CPU1, which is incorrect. Fix the Kconfig dependency to
resolve this issue.

Fixes #79576

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-10-15 04:08:15 -04:00
Jukka Rissanen c6aa9e3803 wifi: shell: btm_query: Fix invalid pointer cast
The 11v_btm_query shell command was calling parse_number() using
a pointer to uint8_t. This will cause memory overwrite and possible
crash. Convert to use long temporary value to avoid this.

Fix also the output prints in case of an error.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-10-15 04:07:59 -04:00
Jukka Rissanen 8105f70d7a wifi: shell: Add missing newlines when printing error
The parse_number() did not print newline after error or warning message.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-10-15 04:07:59 -04:00
Jukka Rissanen 32aa1d634e wifi: Refactor wifi-shell to allow external subcommands
Rework the wifi-shell code so that external subcommands can be
bolted into it easily. This means that the commands should be
created using SHELL_SUBCMD_ADD().

Place the various subcommands in alphabetical order to find them
more easily.

Split long lines in order to pass CI checks.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-10-15 04:07:59 -04:00
Erik Sandgren 5f59b35b42 Bluetooth: Host: Fix issue where uninitialized value was used
This change makes sure that when a call to `bt_id_set_scan_own_addr` is
sucessful, i.e., the return value is 0, the `own_addr_type` will
be set by the `bt_id_set_scan_own_addr`.

Not setting the `own_addr_type` in a successful call to
`bt_id_set_scan_own_addr` causes, for example,
the `start_le_scan_ext` method in `scan.c` to use an
uninitialized `own_addr_type`.

Eventually this results in an unexpected failure further down in
`start_le_scan_ext`, when sending HCI command to controller with
an uninitialized `own_addr_type`.

Signed-off-by: Erik Sandgren <erik.sandgren@nordicsemi.no>
2024-10-15 04:07:50 -04:00