Commit graph

95513 commits

Author SHA1 Message Date
Johann Fischer 859cc2f1fe samples: usb: add HID keyboard sample
Add HID keyboard sample for the new experimental USB device support.
This is a limited and not fully compliant HID keyboard implementation.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2024-05-14 18:24:45 -04:00
Johann Fischer fce6b20f61 samples: hid-mouse: add support for the new HID implementation
Add support for the new HID implementation.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2024-05-14 18:24:45 -04:00
Johann Fischer c0e8f0d96b usb: device_next: add initial HID device support
Add initial HID device support. Unlike the existing HID implementation,
the new implementation uses a devicetree to instantiate a HID device.
To the user, the HID device appears as a normal Zephyr RTOS device.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2024-05-14 18:24:45 -04:00
Johann Fischer 92fc5316a4 usb: device_next: allow Get Descriptor with recipient interface
If the recipient is not the device then it is probably a
class specific  request where wIndex is the interface
number or endpoing and not the language ID. e.g. HID
Class Get Descriptor request.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2024-05-14 18:24:45 -04:00
Johann Fischer a2c9c65bfa include: usb_hid: remove conditional definition from struct hid_ops
For upcoming HID support in the new device stack and to provide API
backward compatibility, there must be no conditional definitions in the
header.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2024-05-14 18:24:45 -04:00
Declan Snyder 595ee908ba samples: dac: Enable RW612 DAC
Enable RW612 RD board for the DAC sample

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-05-14 18:23:22 -04:00
Declan Snyder 14ef7d2d21 tests: adc: Test RW612 ADC
Enable RW612 RD board to test ADC

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-05-14 18:23:22 -04:00
Declan Snyder 00a205ffba boards: nxp: rd_rw612_bga: Enable GAU DAC/ADC
Enable the GAU analog converters on the RD_RW612_BGA board.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-05-14 18:23:22 -04:00
Declan Snyder 79025c5524 soc: nxp: rw: Support ADC and DAC
Add DT node entries to RW for DAC and ADC.

Support the SOC required initialization of the DAC and ADC on RW.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-05-14 18:23:22 -04:00
Declan Snyder fa990a7639 drivers: dac: Add driver for NXP GAU DAC
Add driver for NXP GAU DAC using MCUX HAL.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-05-14 18:23:22 -04:00
Declan Snyder b9e89ef688 drivers: adc: Add NXP GAU ADC Driver
Add driver for NXP GAU ADC using MCUX HAL.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-05-14 18:23:22 -04:00
Declan Snyder c767ed6e27 dts: bindings: adc: Add NXP GAU ADC binding
Add binding for NXP GAU ADC

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-05-14 18:23:22 -04:00
Declan Snyder f7f80b6cd7 dts: bindings: dac: Add NXP GAU DAC binding
Add binding for NXP GAU DAC

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-05-14 18:23:22 -04:00
Ioannis Karachalios 75a3c5b848 drivers: display: smartbond: Add support for PM
This commit should add all the functionality needed for the DISPLAY
driver to work when PM is enabled.

Signed-off-by: Ioannis Karachalios <ioannis.karachalios.px@renesas.com>
2024-05-14 18:22:54 -04:00
Daniel DeGrasse 9b2ae5d02b boards: nxp: mimxrt1050: enable PXP and apply optimized LVGL settings
Enable PXP on RT1050 EVK, and apply LVGL settings optimized for PXP
support. These settings will enable PXP rotation to function as expected
when using LVGL with the RT1050.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-05-14 18:22:28 -04:00
Daniel DeGrasse 558c2916b9 drivers: display: mcux_elcdif: add additional documentation around PXP
Add additional documentation and warnings around PXP usage. PXP rotation
is only intended to be used when framebuffers passed to the eLCDIF
display driver are equal in size to the screen.

Moreover, PXP rotation is flipped versus LVGL rotation. So a LVGL
rotation of 90 degrees requires the PXP to be set to rotate 270 degrees
to function as expected.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-05-14 18:22:28 -04:00
Daniel DeGrasse 33f90e1eab samples: drivers: memc: support PSRAM on RW612 while using XIP mode
RW612 has one FLEXSPI controller, which is capable of supporting
multiple external devices on one board. However, care must be taken when
configuring the FLEXSPI to use multiple devices, as if the FLEXSPI is
configured incorrectly in XIP mode it will fail to read from the
external flash, and the chip will crash.

Make the following changes to the RW configuration for the MEMC sample,
in order to support executing from flash while accessing PSRAM:
- initialize the FLEXSPI MEMC driver first, before the flash or PSRAM
  drivers are initialized
- force the FLEXSPI MEMC driver to reconfigure the FLEXSPI at boot, so
  we can configure the DQS sampling mode for the PSRAM on port B
- only configure the PSRAM pins during FLEXSPI init, so XIP is not
  disrupted
- configure the flash device at boot. This is required so that the MEMC
  driver will not replace the LUTs programmed in the FLEXSPI by the
  bootrom, as it would otherwise not be aware of their existence.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-05-14 18:21:57 -04:00
Daniel DeGrasse 4f65595b24 drivers: flash: flash_mcux_flexspi_nor: reduce LUT usage
FLEXSPI nor driver uses several LUTs for "scratch" commands during the
SFDP probe phase that are not needed once the flash is configured. Set a
second "end" marker we can use to configure the FLEXSPI MEMC driver, so
that we can indicate the true number of LUTs needed by this driver when
init is completed.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-05-14 18:21:57 -04:00
Daniel DeGrasse ef8b8a2983 drivers: memc: memc_mcux_flexspi_is66wvq8m4: do not reset FLEXSPI
Do not reset the FLEXSPI during init, as this will crash the chip if we
are running the MEMC driver in XIP mode.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-05-14 18:21:57 -04:00
Daniel DeGrasse 372cf92060 drivers: memc: memc_mcux_flexspi: support initializing FLEXSPI when XIP
Add support for initializing the FLEXSPI when using a flash attached to
the FLEXSPI for XIP. This option is guarded behind a Kconfig, as
enabling it is dangerous and requires special care be taken by the user
to ensure that the configuration of pins and FLEXSPI settings will not
break support for reading the attached flash, as this will break XIP
support.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-05-14 18:21:57 -04:00
Daniel DeGrasse c4eac60982 drivers: memc: use custom initialization priority for FLEXSPI
Use custom initialization priority for FLEXSPI MEMC driver. This may be
needed when the MEMC driver must initialize before a flash driver, and
before another MEMC driver (for an attached device, like PSRAM)

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-05-14 18:21:57 -04:00
Daniel DeGrasse ba98dfd976 drivers: memc: memc_mcux_flexspi: correctly handle multi-device usage
When multiple devices are used, the FLEXSPI will place their address
spaces sequentially (based on the chip select port used). Additionally,
each device must use different sections of the FLEXSPI LUT table.

Fix the following calculation issues with multi-device usage:
- correct calculation of LUT sequence indices for AHB commands
- correctly add address and sequence offset when submitting FLEXSPI IP
  transfer

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-05-14 18:21:57 -04:00
Daniel DeGrasse 481462d4a6 drivers: memc: memc_mcux_flexspi: update documentation for flash_config
Update documentation for flash_config memc function, to correctly
reflect usage of the "lut_count" parameter

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-05-14 18:21:57 -04:00
Daniel DeGrasse 53ceae5f58 soc: nxp: rw: use correct mask for FLEXSPI clock setup divider
Mask for FLEXSPI clock divider was being used when setting the FLEXSPI
clock selector value. Correct this to use the mask for the selector
instead of the divider.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-05-14 18:21:57 -04:00
Ayush Kothari 13dfd86616 Driver: Add pin inversion to Esp32 Uart
Additional properties are added to esp32 uart to allow
for signal inversion.

Signed-off-by: Ayush Kothari <ayush@croxel.com>
2024-05-14 18:21:27 -04:00
Johan Hedberg 3032321938 doc: migration-guide-3.7: Mention Bluetooth HCI related changes
Mention the changes to Bluetooth HCI Kconfig options and one
semi-private API (bt_read_static_addr).

Signed-off-by: Johan Hedberg <johan.hedberg@gmail.com>
2024-05-14 18:21:11 -04:00
Johan Hedberg 484fe3f06c Bluetooth: Remove bt_read_static_addr() "hack"
This function was used to shortcut HCI for combined host + controller
builds. It doesn't provide much value and adds complexity to the HCI
driver interface, so just remove it. This means vendor-specific HCI
commands is now the only way for the host to access the same
information.

Signed-off-by: Johan Hedberg <johan.hedberg@gmail.com>
2024-05-14 18:21:11 -04:00
Johan Hedberg 35897ee66c Bluetooth: Kconfig: Get rid of BT_HCI_VS_EVT
Enabling vendor-specific extensions also implies support for vendor
events, so a separate Kconfig option for that is unnecessary.

One small additional thing this requires is the use of the
__maybe_unused annotation, since there's no-longer a single Kconfig
option that the controller hci.c can use to know that the vendor event
helper symbols are needed.

Signed-off-by: Johan Hedberg <johan.hedberg@gmail.com>
2024-05-14 18:21:11 -04:00
Johan Hedberg 18c23daee3 Bluetooth: Kconfig: Merge BT_HCI_VS_EXT into BT_HCI_VS
The naming of these two options was problematic, since it's both of them
are about vendor extensions, even though one has _EXT in the name and
the other doesn't. Just merge one option into the other. This has a
slight overhead on the controller side of enabling some more vendor
features if BT_HCI_VS is enabled, but that should hopefully be
acceptable.

Signed-off-by: Johan Hedberg <johan.hedberg@gmail.com>
2024-05-14 18:21:11 -04:00
Robert Lubos fab2f97364 tests: net: dhcpv6: Reapply LL address on iface up
The test suite assigns LL address to the interface manually, hence need
to reapply it whenever interface goes up.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2024-05-14 18:20:56 -04:00
Robert Lubos 50c523636b net: ipv6: Clear joined flag on all mcast address when operational down
When the network inteface goes operational DOWN (for example cable
unplugged), clear "joined" flag on all registered multicast addresses,
so that MLD report is sent for them when the interface goes back up.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2024-05-14 18:20:56 -04:00
Robert Lubos 3e046626c1 net: ipv6: Rejoin all solicited node mcast addresses
When bringing interface down, all IPv6 multicast addresses are removed
from the interface. However, when the interface was brought back up,
rejoin_ipv6_mcast_groups() would look only for solicited node mcast
addresses already present on the interface. In result, after going back
up, the interface was missing solicited-node mcast addresses for those
unicast addresses, that were already present on the interface when
bringing up.

As net_ipv6_mld_join() does similar checks to skip MLD when not needed,
we can just skip the lookup when rejoining, and use already defined
join_mcast_nodes().

Additionally, check for IPV6 and NO_ND flags on the interface before
attempting to add the address back, those multicast addresses are not
needed if ND is disabled on the interface.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2024-05-14 18:20:56 -04:00
Robert Lubos d48da4cfd1 net: ipv6: Fix missing DAD for link-local address
In case a network interface is brought down and back up, DAD was not
performed for link-local unicast address.

This happens because the logic in the network interface code assumed
that DAD for link-local address is triggered when the address is added,
and it's explicitly omited when looping over IPv6 address. This wasn't
the case however when interface was brought back up, as the address was
already present on the interface, hence DAD skipped.

In Linux, the link-local address is removed from the interface when the
interface is brought down. Such approach solves the issue described,
hence implement it in a similar way in Zephyr.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2024-05-14 18:20:56 -04:00
Carles Cufi ae9096fe62 scripts: compliance: handle multi-line output from pylint
Switch from plain text to JSON output in the pylint compliance check in
order to handle multi-line messages, which were so far being dropped
by the regex.

Fixes #68037.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2024-05-14 18:20:41 -04:00
Dmitrii Golovanov 11de74c11f twister: pytest: Enable recording for Pytest Harness
Extend Pytest Harness to support 'recording' feature to parse
test log by a regular expression and collect as records the same
way as Console Harness do.

Signed-off-by: Dmitrii Golovanov <dmitrii.golovanov@intel.com>
2024-05-14 18:20:12 -04:00
Dmitrii Golovanov 1230640076 twister: Refactor 'recording' feature
Refactor Twister 'recording' feature moving it from Handler class
to TestInstance class and enable it also for other Harness child
classes other than Console.

Signed-off-by: Dmitrii Golovanov <dmitrii.golovanov@intel.com>
2024-05-14 18:20:12 -04:00
Jukka Rissanen 1d7970be04 net: context: Do not check our own ports
There is no need to check our own context when going through
the used ports in the system. This prevents error when binding
in some corner cases.

Fixes #72035

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-05-14 18:19:54 -04:00
Phi Bang Nguyen 97b0ad699e boards: nxp: mixmxrt1170_evk: Separate i2c6 from csi pin muxing
Pin muxing for i2c6 and csi should be separated as i2c is initialized
before csi. Otherwise, i2c6 bus device will not be ready when the
camera sensor on this bus initializes.

Signed-off-by: Phi Bang Nguyen <phibang.nguyen@nxp.com>
2024-05-14 18:19:32 -04:00
Alberto Escolar Piedras c1a39f31b2 driver: uart: native: fix stop_bits/databits mix
Correct a trivial bug and doxygen documentation error
in which data_bits was missused instead of stop_bits.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Signed-off-by: Mateusz Grzywacz <amateusz.grzywacz@gmail.com>
2024-05-14 18:19:11 -04:00
Emil Gydesen 0f5aa8aa81 Bluetooth: Audio: Shell Remove BT_HAS_PRESET_CONTROL_POINT_NOTIFIABLE
Do not enable BT_HAS_PRESET_CONTROL_POINT_NOTIFIABLE as it
depends on EATT which isn't enabled.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-05-14 18:18:36 -04:00
Sylvio Alves ea3e87dd12 boards: waveshare: esp32s3_touch: update appcpu supported peripherals
esp32s3 contains 2 cpus: procpu and appcpu.
appcpu has very limited peripherals support for now.

This updated esp32s3_touch board to list only support peripherals.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2024-05-14 14:01:49 -05:00
Jerzy Kasenberg f2e3d3f951 soc: smartbond: Move PM_DEVICE dependency to soc
For DA1469x if PM config is selected PM_DEVICE must also
be selected for GPIO to work when device enters/exists
deep sleep.

Previously GPIO and regulator drivers selected PM_DEVICE
when PM was enabled.
Now it is moved to SOC instead.

PM_DEVICE selection in GPIO could result in circular dependency
for mcux if MEMC_MCUX_FLEXSPI (which is already dependent on PM_DEVICE)
was to be additionally dependent on GPIO.

Signed-off-by: Jerzy Kasenberg <jerzy.kasenberg@codecoup.pl>
2024-05-14 17:05:03 +02:00
Armin Brauns 08cd15d5b0 boards: stm32f769i_disco: enable USB
This board uses a ULPI PHY to provide HS (USB 2.0) connectivitiy instead of
the internal PHY, which only supports FW (USB 1.x).

Signed-off-by: Armin Brauns <armin.brauns@embedded-solutions.at>
2024-05-14 17:04:49 +02:00
Armin Brauns 74cc85c526 dts: stm32f7: add clock definition for OTG_HS peripheral
This peripheral is also run off the 48MHz clock, just like OTG_FS.

Signed-off-by: Armin Brauns <armin.brauns@embedded-solutions.at>
2024-05-14 17:04:49 +02:00
Armin Brauns 3ca157e76f drivers: usb: stm32: fix logic for USB clock configuration
- If the peripheral is OTG_HS with ULPI, enable the OTG_HS ULPI clock
  - The constant has a slightly different name on stm32h7
- Otherwise, if the peripheral is OTG_HS:
  - Disable the OTG_HS ULPI clock in sleep/low power mode,
  - If the peripheral is OTG_HS with PHYC[1], enable the PHYC clock.
- Otherwise, if the peripheral is OTG_FS[2] on stm32h7, also disable the
  OTG_FS ULPI clock in sleep mode (in the device/ driver, this is done in
  usb_dc_stm32_init()),

[1]: Internal HS PHY in stm32f7x2xx and (some) stm32f730xx
[2]: "OTG_FS" on stm32h7 is really just another OTG_HS peripheral, but
without any way to actually connect a HS PHY

Signed-off-by: Armin Brauns <armin.brauns@embedded-solutions.at>
2024-05-14 17:04:49 +02:00
Bartosz Miller d8bffffda0 tests: drivers: Add more test cases for the i2c driver in controller mode
Extend coverage for the i2c master mode driver
This test suite uses external sensor BME688

Signed-off-by: Bartosz Miller <bartosz.miller@nordicsemi.no>
2024-05-14 17:04:24 +02:00
Tomáš Juřena c8faa1e380 boards: st: Add support for STM32H745I-Disco
Supported features:
- GPIO
- RTC
- PWM
- Ethernet
- UART
- FMC
- QSPI NOR Flash

Signed-off-by: Tomáš Juřena <jurenatomas@gmail.com>
2024-05-14 17:03:17 +02:00
Dominik Ermel 6c2e661da0 samples/littlefs: Fix rcar boards selecting Flash API
The rcar boards use block variant of LittleFS and Disk Access API,
but have been using proj.conf for Flash API based access.
The commit adds section building boards with pro_blk.conf
into sample.yaml, where rcar boards will now be allowed,
and removes redundant configuration lines from board specific
conf files.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2024-05-14 16:54:55 +02:00
Flavio Ceolin d6d3c1098d xtensa: mmu: dup_table does not need parameter
The only page table duplicated is the kernel page table. This function
does not need a parameter.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2024-05-14 15:54:55 +02:00
Flavio Ceolin 0012725d85 xtensa: mmu: Avoid k_mem_domain_default duplication
We can use some extra bits available for SW implementation to
save original permissions and avoid duplicating the kernel page tables
for the default memory domain.

Whe duplicating the page table to a new domain we just ensure
to restore the original map.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2024-05-14 15:54:55 +02:00