Commit graph

100734 commits

Author SHA1 Message Date
Declan Snyder
a097cdc4fe soc: nxp: Centralize flexspi related configuration
Currently this code related to how to configure the
flash size and address when using flexspi to XIP is copy
pasted in all sort of places and ways all over the tree,
let's clean this up and have single point of control over
this configuration.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-08-22 09:14:24 +02:00
Declan Snyder
6300dc6aa7 soc: nxp: mcx: Do not use family level config
Move all dependencies of the family config to series level,
and put a disclaimer saying not to use the family config.

Change all occurrences of the family config in code to the
MCXNX4X series config.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-08-22 09:14:24 +02:00
Declan Snyder
3c5df36dda soc: nxp: Move flexspi log level change to driver
Single point of control over this kconfig's effect.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-08-22 09:14:24 +02:00
Declan Snyder
57d777b640 drivers: flash/memc: Source logging kconfig last
Some flash/memc drivers like flexspi will want to default the
value of the log level to off to avoid RWW hazard while XIP,
to do this, the logging template must be sourced after the driver
kconfig files so that the default value from the driver is able
to be checked, since logging template introduces an unconditional
default otherwise.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-08-22 09:14:24 +02:00
Declan Snyder
1d3864addf soc: nxp: Remove RT1061 and RT1051 refs
NXP is not supporting these derivative parts in the zephyr upstream,
these references to them should therefore be removed in order to avoid
confusion.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-08-22 09:14:24 +02:00
Declan Snyder
f6bfedf114 soc: nxp: imxrt: Clang format flexspi_nor_config.h
Check compliance is not allowing changes to this file
without running clang-format.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-08-22 09:14:24 +02:00
Declan Snyder
9d9d2f8178 soc: nxp: mcx: Fix Kconfig files and MFD config
The Kconfig defaults should be in Kconfig.defconfig.

MFD should not be made dependent on the LP flexcomm being
enabled, since MFD can be for other things than just flexcomm.
Change from depends on to an if.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-08-22 09:14:24 +02:00
Declan Snyder
5360c57dc4 soc: nxp: Do not change driver init priorities
Doesn't seem like there is any reason to be changing the
serial and ADC driver init priorities in the SOC defconfigs.
By default, clock control has priority 30, dma has priority 40,
and serial/adc have priority 50. This seems already to be the order
that is needed, and the original goal of these overrides, which
don't seem necessary anymore.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-08-22 09:14:24 +02:00
Declan Snyder
5d954917bd soc: nxp: Move kinetis pinctrl to include/
There are some SOCs which use the same pinctrl
device, but are not really overall that similar to the kinetis
family of SOCs, so prepare to reuse this code by other SOC families.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-08-22 09:14:24 +02:00
Declan Snyder
e2d3fe91fd soc: imxrt118x: Cleaning up kconfigs
Moving RT118x kconfigs to series level instead of family level,
and cleaning up redundant declarations, and adding missing
HAS_MCUX_FLEXSPI selection.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-08-22 09:14:24 +02:00
Pisit Sawangvonganan
6718ba6841 drivers: gpio: renesas_ra_ioport: improve device instantiation macro
Introduced `GPIO_DEVICE_INIT_RA_IF_OKAY` which utilizes `COND_CODE_1`
to reduce the chain of #if DT_NODE_HAS_STATUS(...) #endif

Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
2024-08-22 09:12:52 +02:00
Simon Hein
e37e3d5a85 doc: coding guidelines: Refactor the guidelines rule table
Refactor the guidelines rule table and add a zephyr rule number
to make it more clear that the coding guideline rules are a
subset of the MISRA-C:2012 rules.

Signed-off-by: Simon Hein <Shein@baumer.com>
2024-08-22 09:12:23 +02:00
Tom Burdick
f880b0164b i2c: Fix build failure with i2c_mcux_rtio driver
Build was failing due to const variable being passed as function param
accepting non-const variable discarding const qualifier. Explicitly cast
to fix the build issue.

Signed-off-by: Tom Burdick <thomas.burdick@intel.com>
2024-08-22 09:10:52 +02:00
Laurentiu Mihalcea
e0be5801cd drivers: dai: esai: don't reset ESAI on init
The ESAI is already reset during the config_set() function
so no need to also reset it during init().

Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
2024-08-22 09:10:18 +02:00
Fabio Baltieri
fba0a47b0e input: pmw3610: add soft reset when no reset pin is available
The reset pin on the chip is optional, add a soft reset call when the
reset pin is not specified for the device.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2024-08-21 21:06:50 -04:00
Flavio Ceolin
f0c053c0ad doc: security: Disclose CVE-2024-4785
Disclose information about published CVE.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2024-08-21 21:06:38 -04:00
Yong Cong Sin
fe94d4354a libc: common: implement multiple time functions
Implemented the following:
- `asctime_r()`
- `asctime()`
- `localtime()`
- `localtime_r()`
- `ctime()`
- `ctime_r()`

Specifically:
- the implementation of `localtime()` & `localtime_r()` simply
  wraps around the gmtime() & gmtime_r() functions, the
  results are always expressed as UTC.
- `ctime()` is equivalent to `asctime(localtime(clock))`, it
  inherits the limitation of `localtime()` as well, which only
  supports UTC results currently.

Added tests for these newly implemented functions.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
Signed-off-by: Yong Cong Sin <yongcong.sin@gmail.com>
2024-08-21 16:59:15 -04:00
Yong Cong Sin
5978e5231e lib: posix: update option group of readdir_r()
`readdir_r()` belongs to the following option group

POSIX_FILE_SYSTEM_R: Thread-Safe File System

Create a new Kconfig `CONFIG_POSIX_FILE_SYSTEM_R` to compile
it.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
Signed-off-by: Yong Cong Sin <yongcong.sin@gmail.com>
2024-08-21 16:59:15 -04:00
TOKITA Hiroshi
eb675eb281 scripts: west_commands: completion: zsh: Add minimum support for sdk
Add minimum support for the `west sdk` command.
This only provides completion for the `sdk` command itself.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2024-08-21 16:54:56 -04:00
TOKITA Hiroshi
85ffd1e031 scripts: west_commands: completion: fash: Add support for west sdk
Add a feature for completion of the `west sdk` command.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2024-08-21 16:54:56 -04:00
TOKITA Hiroshi
af5850d44a scripts: west_commands: completion: bash: Add support for west sdk
Add a feature for completion of the `west sdk` command.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2024-08-21 16:54:56 -04:00
TOKITA Hiroshi
b68071dc71 commands: add the 'sdk' command to manage SDK.
This command can list and install SDK.

Run 'west sdk install' to install the SDK.
Run without any parameter, installing
specified by SDK_VERSION in the source tree.
'west sdk' to show installed SDK information.

This command is just a wrapper for SDK's setup command,
but it simplifies the installation process. It will be a good
improvement for onboarding first-time users.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2024-08-21 16:54:56 -04:00
Jakub Topic
b824e41bf3 drivers: rtc: rv3028: adjust timing of EEPROM requests
Removes calling k_busy_wait() and uses k_msleep().

Updates polling rate of EEPROM busy status after read request to 1 ms, as
recommended by the app note.

Signed-off-by: Jakub Topic <jakub.topic@anitra.cz>
2024-08-21 16:51:02 -04:00
Jakub Topic
7ff72ee55e drivers: rtc: rv3028: fix minutes alarm
Use correct value for Minutes Alarm register when disabling this alarm.

Signed-off-by: Jakub Topic <jakub.topic@anitra.cz>
2024-08-21 16:51:02 -04:00
Jonathan Rico
0b3c67c31b Bluetooth: audio: Make unit tests compile
The tests manually include sources that are normally conditionally
included (ie based on kconfig values) in the stack.

The tests should be fixed by the original authors.
For now, force-on the hidden kconfig that enables the log options.

Signed-off-by: Jonathan Rico <jonathan.rico@nordicsemi.no>
2024-08-21 16:44:44 -04:00
Jonathan Rico
4bdca17e21 Bluetooth: OTS: Use proper kconfig log option
`OTS_CLIENT=y` and `OTS=n` is a valid config.

Since the logs weren't conditionally included, this flew under the radar
for a while.

Signed-off-by: Jonathan Rico <jonathan.rico@nordicsemi.no>
2024-08-21 16:44:44 -04:00
Jonathan Rico
3324eecbae Bluetooth: Re-organize logging Kconfig options
- got rid of "Others" menu
- JK I made a new one: "Common"
- moved all host-related opts to "Host" instead of "Others"
- moved all audio-related opts behind `if BT_AUDIO`
- moved only controller kconfig to controller/Kconfig.ll_sw_split
  - it had a dependency there already

Signed-off-by: Jonathan Rico <jonathan.rico@nordicsemi.no>
2024-08-21 16:44:44 -04:00
Jonathan Rico
f7631d4b4a Bluetooth: Conditionally include logging Kconfigs
Having all the configs be visible by default clutters the menuconfig
view. Make them visible only when the corresponding subsys or module is
enabled.

Signed-off-by: Jonathan Rico <jonathan.rico@nordicsemi.no>
2024-08-21 16:44:44 -04:00
Fin Maaß
807a726a7f net: config: add missing include
this adds a missing include of zephyr/net/net_if.h

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2024-08-21 16:44:06 -04:00
Mathieu Choplain
a304f98ac1 doc: Coding guidelines: use fixed title for reference to Bluetooth APIs
Commit 698a0c3193 changed the bluetooth_api
section title, which made the reference in the Coding guidelines turn into
"API", which is confusing.

Use a fixed title for that reference to fix the issue.

Signed-off-by: Mathieu Choplain <mathieu.choplain@st.com>
2024-08-21 16:43:52 -04:00
Pieter De Gendt
8fcccf1aad scripts: ci: Fix clang-format compliance on Windows
Clang-format installs an exe instead of a python script.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2024-08-21 18:29:24 +01:00
Szymon Janc
6d19bcf333 tests: bluetooth: tester: Fix user_data size in pools
There was hardcoded value for user_data which is no longer valid.
Use proper CONFIG_BT_CONN_TX_USER_DATA_SIZE for that.

Signed-off-by: Szymon Janc <szymon.janc@codecoup.pl>
2024-08-21 18:27:37 +01:00
Armando Visconti
45ae08a379 modules/hal_st: Align sensor drivers to stmemsc HAL i/f v2.6
Align all sensor drivers that are using stmemsc (STdC) HAL i/f
to new APIs of stmemsc v2.6

Requires https://github.com/zephyrproject-rtos/hal_st/pull/21

Signed-off-by: Armando Visconti <armando.visconti@st.com>
2024-08-21 18:27:28 +01:00
Armando Visconti
42da38b50f tests: sensors: build_all: fix warnings on i2c
Fix warnings generated when performing sensor drivers build test
due to typos in i2c DT definition.

Signed-off-by: Armando Visconti <armando.visconti@st.com>
2024-08-21 18:27:28 +01:00
Jukka Rissanen
8284ea7b11 net: shell: Move bridge shell under net shell
All the network related shell activities should be under
network shell so moving it to "net bridge ..." command.
Add this information to migration guide.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-08-21 18:27:14 +01:00
Simon Hein
56a691078e doc: doc generation: remove breathe references
Remove the references to the breathe extension in the
Schematic of the documentation build process graph and
the filtering expected warnings section.

Signed-off-by: Simon Hein <Shein@baumer.com>
2024-08-21 18:27:04 +01:00
Jordan Yates
b3a4b15e4b sdhc: sdhc_spi: handle PM on SPI bus
Handle SPI buses that have device runtime PM enabled.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-08-21 18:26:37 +01:00
Johan Hedberg
48c05bb361 doc: bluetooth: Fix external web page references
The generated HTML was broken, even though the rst files themselves
contained the correct URLs. Update to a different format which should
generate the right output.

Signed-off-by: Johan Hedberg <johan.hedberg@silabs.com>
2024-08-21 18:26:15 +01:00
Felipe Neves
3d39644a2c boards: witte_technology: linum: add initial support
To the Linum board from Witte Technology based on STM32H753xx.

Signed-off-by: Felipe Neves <ryukokki.felipe@gmail.com>
2024-08-21 18:26:07 +01:00
Mark Wang
0c0c420424 drivers: udc: mcux: set high_bandwidth
set high_bandwidth and use the cfg->mps to set
ep_init.maxPacketSize because NXP MCUX controller
driver supports additional transaction bits in
maxPacketSize.

Signed-off-by: Mark Wang <yichang.wang@nxp.com>
2024-08-21 18:25:30 +01:00
Johann Fischer
8617e46849 drivers: udc: do not use the MPS value directly for the endpoint size
Instead, use the helper to get the size field from the MPS value.
MPS value may contain information about additional transaction
per microframe (bits 12..11).

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2024-08-21 18:25:30 +01:00
Tomasz Moń
07bd625196 drivers: udc_dwc2: Support High-Bandwidth endpoints
Make driver aware of High-Bandwidth endpoints both in Completer and
Buffer DMA mode. In Completer mode TxFIFO must be able to hold all
packets for microframe, while in Buffer DMA mode space enough for two
packets is sufficient.

Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
2024-08-21 18:25:30 +01:00
Tomasz Moń
07ea4aa155 drivers: udc_dwc2: Allow larger TxFIFO writes
DMA is capable of packetizing transfers on its own and the driver
doesn't need to check available TxFIFO size when scheduling DMA
transfer.

Split packets on DWORD boundary when writing more than one packet to
TxFIFO in completer mode.

Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
2024-08-21 18:25:30 +01:00
Tomasz Moń
b7664f27c8 usb: device_next: Make stack High-Bandwidth aware
Add macros for converting between Max Packet Size and total payload
length. Allow drivers specify whether endpoint supports high-bandwidth
interrupt and high-bandwidth isochronous transfers.

Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
2024-08-21 18:25:30 +01:00
Tomasz Moń
e333739f3a usb: device_next: hid: Simplify MPS less than 65 detection
Use COND_CODE_1() instead of UTIL_AND() to make it possible to only
define the HID_MPS_LESS_65_ macros up to value 64.

Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
2024-08-21 18:25:30 +01:00
Tomasz Moń
60835aa393 usb: Add missing wMaxPacketSize endian conversions
wMaxPacketSize in endpoint descriptor is stored in little-endian order,
but the mps parameter passed to functions is in host order.

Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
2024-08-21 18:25:30 +01:00
Fin Maaß
b7ab025bfd shell: backends: uart: add option to force tx blocking
This adds a kconfig option to force
tx blocking on serial. This way only rx
will use the interrupt.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2024-08-21 18:25:14 +01:00
Tu Nguyen Van
34206f5505 boards: nxp: s32z2xxdc2: add Flexcan support for s32z2xxdc2
Enable Flexcan support on s32z2xxdc2 boards

Signed-off-by: Tu Nguyen Van <tu.nguyenvan@nxp.com>
2024-08-21 11:03:44 +02:00
Tu Nguyen Van
ee6620e15f dts: arm: nxp: add Flexcan support for S32Z27x
Add FlexCan nodes to S32Z27x devices

Signed-off-by: Tu Nguyen Van <tu.nguyenvan@nxp.com>
2024-08-21 11:03:44 +02:00
Tu Nguyen Van
ac056bbab9 dts: arm: nxp: rename can node to canxl node
To prepare for supporting flexcan, can node should be
renamed to canxl to support both flexcan and canxl

Signed-off-by: Tu Nguyen Van <tu.nguyenvan@nxp.com>
2024-08-21 11:03:44 +02:00