Commit graph

83892 commits

Author SHA1 Message Date
Hang Fan 3fb434a653 Bluetooth: Shell: Fix bt adv-data command
Fix wrong adv elements length for bt adv-data command

Signed-off-by: Hang Fan <fanhang8@gmail.com>
2023-09-14 08:35:40 +02:00
Laurentiu Mihalcea ff1bb65793 doc: release: 3.5: Add note about shared interrupt support
Add a note that shared interrupts are now supported.

Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
2023-09-14 08:35:12 +02:00
Laurentiu Mihalcea b1111d9de4 doc: interrupts: Document support for shared interrupts
This commit adds the documentation for shared interrupts.

Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
2023-09-14 08:35:12 +02:00
Laurentiu Mihalcea 127696383f tests: kernel: interrupt: Add testcase for shared interrupts
This commit introduces a new testcase for shared interrupts.

Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
2023-09-14 08:35:12 +02:00
Laurentiu Mihalcea b8d487e54b arch: Add support for dynamically disconnecting shared interrupts
This commit provides the users a way to disconnect dynamic
interrupts. This is needed because we don't want to keep
piling up ISR/arg pairs until the number of registrable
clients is reached.

This feature is only relevant for shared and dynamic interrupts.

Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
2023-09-14 08:35:12 +02:00
Laurentiu Mihalcea 02f52503bb arch: Add support for dynamic shared interrupts
This works by overwriting z_isr_install()'s definition
(possible since the symbol is now weak) with our own definiton.

Whenever trying to register a new ISR/arg pair, z_isr_install()
will check to see if the interrupt line is already in use. If it's
not then it will not share the interrupt and will work exactly
as the old z_isr_install(), meaning it will just write the new
ISR/arg pair to _sw_isr_table.

If the interrupt line is already being used by an ISR/arg pair
then that line will become shared, meaning we'll overwrite
_sw_isr_table with our own (z_shared_isr, z_shared_sw_isr_table[irq])
pair.

Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
2023-09-14 08:35:12 +02:00
Laurentiu Mihalcea 30d362dbac arch: common: sw_isr_common: Move table index computing logic to function
Since the shared IRQ code will also use the same logic to compute
the _sw_isr_table index, move the computing logic to a separate
function: z_get_sw_isr_table_idx(), which can be used by other
modules.

Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
2023-09-14 08:35:12 +02:00
Laurentiu Mihalcea 017cf89a83 arch: Add support for static shared interrupts
This commit introduces all the necessary changes for
enabling the usage of shared interrupts.

This works by using a second interrupt table: _shared_sw_isr_table
which keeps track of all of the ISR/arg pairs sharing the same
interrupt line. Whenever a second ISR/arg pair is registered
on the same interrupt line using IRQ_CONNECT(), the entry in
_sw_isr_table will be overwriten by a
(shared_isr, _shared_sw_isr_table[irq]) pair. In turn, shared_isr()
will invoke all of the ISR/arg pairs registered on the same
interrupt line.

This feature only works statically, meaning you can only make use
of shared interrupts using IRQ_CONNECT(). Attempting to dynamically
register a ISR/arg pair will overwrite the hijacked _sw_isr_table
entry.

Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
2023-09-14 08:35:12 +02:00
Martin Jäger ef77fe3402 tests: canbus: isotp: conformance: fix global variable usage
Even though it was leading to the same result, the function should use
its parameter and not the global variable for desired frames.

Signed-off-by: Martin Jäger <martin@libre.solar>
2023-09-14 08:34:09 +02:00
Martin Jäger a816180b16 tests: canbus: isotp: conformance: add mode_check test
Add a test to check error codes if attempting to use ISO-TP with CAN FD
mode even though the controller supports classical CAN only.

Signed-off-by: Martin Jäger <martin@libre.solar>
2023-09-14 08:34:09 +02:00
Grant Ramsay 9e9cbd8ce4 tests: canbus: isotp: conformance: Add tests for CAN-FD support
Allow existing tests to run with CAN-FD.
Add new CAN-FD specific tests.

Signed-off-by: Grant Ramsay <gramsay@enphaseenergy.com>
Signed-off-by: Martin Jäger <martin@libre.solar>
2023-09-14 08:34:09 +02:00
Grant Ramsay 09912b74e9 samples: canbus: isotp: Add support for CAN-FD
Enable this sample to be used with CAN-FD

Signed-off-by: Grant Ramsay <gramsay@enphaseenergy.com>
2023-09-14 08:34:09 +02:00
Grant Ramsay a4383c2fd1 canbus: isotp: add CAN-FD support
ISO-TP CAN-FD support can be enabled at runtime.

Signed-off-by: Grant Ramsay <gramsay@enphaseenergy.com>
Signed-off-by: Martin Jäger <martin@libre.solar>
2023-09-14 08:34:09 +02:00
Pavel Vasilyev 422cfeeb1a doc: Bluetooth: Mesh: Align wording for models instantiation req
According to https://github.com/zephyrproject-rtos/zephyr/pull/61886#issuecomment-1713302331
we need to use "must only" for models that spec states:
`If supported, ... shall be supported by the primary element and shall
not be supported by any secondary element`.

Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>
2023-09-14 08:33:46 +02:00
Jonathan Rico db52d27eb5 scripts: Update CFB font generator
Update CFB font generator so it works with Pillow version 10. They
deprecated some methods, with no direct replacements, so the generated
fonts might be slightly different.

Signed-off-by: Jonathan Rico <jonathan@rico.live>
2023-09-13 14:40:00 -07:00
Daniel Leung 26ffa9f59a doc: picolibc: a few words about building without native support
This adds a few words about using Picolibc without native support
from toolchain, and how to enable this behavior for toolchain.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2023-09-13 17:36:46 -04:00
Daniel Leung b21d35d357 libc: picolibc: disable prompt for PICOLIBC_USE_MODULE...
...when toolchain does not have native picolibc support.
Without native support, picolibc needs to be built from
the module. Disabling the prompt means this kconfig
takes on whatever default value specified, which is
to build source from module when there is no native
support.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2023-09-13 17:36:46 -04:00
Daniel Leung 01dd2f0897 libc: picolibc: extend support beyond Zephyr SDK
The picolibc kconfigs were tied to ZEPHYR_TOOLCHAIN_VARIANT
and it only supported the Zephyr SDK, which is the only
toolchain having picolibc built-in at the moment. This
commit generalizes that to use TOOLCHAIN_HAS_PICOLIBC
cmake variable the same way as newlib: TOOLCHAIN_HAS_NEWLIB.
This provides the ability for other toolchains to declare
their support for picolibc.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2023-09-13 17:36:46 -04:00
Daniel Leung 718a219bf1 cmake: expose TOOLCHAIN_HAS_PICOLIBC to kconfig
This mirrors TOOLCHAIN_HAS_NEWLIB to picolibc so the cmake
variable TOOLCHAIN_HAS_PICOLIBC can be used in kconfig.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2023-09-13 17:36:46 -04:00
Yuval Peress 23d051537b rtio: Simplify the mempool handling
It's not necessary to cache the block size, instead it can be computed
from blk_sz_shift

Signed-off-by: Yuval Peress <peress@google.com>
2023-09-13 17:34:47 -04:00
Ricardo Rivera-Matos 4c04f4488a dts: regulator: Fix reoccurring typo in properties
Corrects 'propably' to 'probably' in the regulator devicetree
bindings.

Signed-off-by: Ricardo Rivera-Matos <ricardo.rivera-matos@cirrus.com>
2023-09-13 17:34:27 -04:00
Andrei Emeltchenko c709b3d97f samples: Using zephyr:code-samples for smbus and edac
Using zephyr:code-sample:: for SMBus and EDAC samples docs.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2023-09-13 17:32:52 -04:00
Andrei Emeltchenko c16218e3eb tests: ibecc: Update IBECC test README
Use :menuselection: for BIOS menu selection rendering.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2023-09-13 17:32:52 -04:00
Andrei Emeltchenko 1a98315044 docs: qemu_x86: Update UEFI boot documentation
Update UEFI boot documentation since after commit 75cb6e6498 UEFI boot
sample was moved from hello_world app to special uefi boot test.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2023-09-13 17:32:52 -04:00
Andrei Emeltchenko 05afc13f5f samples: smbus: Update documentation
Update README.rst for smbus sample.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2023-09-13 17:32:52 -04:00
Andrei Emeltchenko ed61709405 samples: edac: Correct README
Correct build and run instructions.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2023-09-13 17:32:52 -04:00
Andrei Emeltchenko 8ac4b248c1 doc: west: Remove empty Footnotes rubric
Remove empty rubric. Cross-linking markups are not included in
Footnotes.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2023-09-13 17:32:52 -04:00
Benjamin Cabé 2fd989f16d ci: bump zephyrproject-rtos/action-first-interaction v1.1.1-zephyr-4
A recent fix in zephyrproject-rtos/action-first-interaction/pull/5 is
now making the bot's comments on PR be actual comments, not PR
"review comments".

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2023-09-13 17:32:38 -04:00
Pieter De Gendt 64708f0200 devicetree: fix DT_FOREACH_PROP_ELEM_SEP doxygen example
Remove a duplicate line from the code sample.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2023-09-13 14:26:49 -07:00
TOKITA Hiroshi 9fcfb31c82 drivers: display: ssd1306: Support connecting SPI and I2C at the same
Support connecting different display for each SPI and I2C
at the same time.

In a case like DTS below.

```
&spi1 {
        ssd1306_spi: ssd1306@0 {
		compatible = "solomon,ssd1306fb";
                ...
        };

};

&i2c0 {
        ssd1306_i2c: ssd1306@3c {
		compatible = "solomon,ssd1306fb";
		...
	};
};
```

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2023-09-13 14:23:24 -07:00
TOKITA Hiroshi 2f7e822705 drivers: display: ssd1306: determin sh1106 by dts compatibility
Determine sh1106 from the `compatibility` value instead of
the SSD1306_CONTROLLER_TYPE setting.

Change the settings in `boards/shields/ssd1306/sh1106_128x64.overlay`
to follow this change.
Remove the SSD1306_CONTROLLER_TYPE from its Kconfig.defconfig,
and set the `compatibility` to `sinowealth,sh1106`.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2023-09-13 14:23:24 -07:00
TOKITA Hiroshi 91d750ea94 drivers: display: ssd1306: replace SSD1306_REVERSE_MODE by property
When multiple devices are connected, the SSD1306_REVERSE_MODE setting
cannot switch for each device.
Add an equivalent setting to the devicetree properties to replace it.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2023-09-13 14:23:24 -07:00
TOKITA Hiroshi 237c2aaa79 drivers: display: ssd1306: add dts properties to ssd1306_config
Store properties defined in dts in ssd1306_config's fields.
And replace code that uses DT_INST_PROP (0, ...) by config properties.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2023-09-13 14:23:24 -07:00
TOKITA Hiroshi 87209984f3 devicetree: rename and publish DT_COMPAT_ON_BUS_INTERNAL
Rename `DT_COMPAT_ON_BUS_INTERNAL` to
`DT_HAS_COMPAT_ON_BUS_STATUS_OKAY` to make it a public DT API.

It is helpful for code that handles multiple DT_DRV_COMPAT in one file,
such as in the following cases.

```
 #if (DT_HAS_COMPAT_ON_BUS_STATUS_OKAY(some_sensor, i2c) || \
      DT_HAS_COMPAT_ON_BUS_STATUS_OKAY(another_sensor, i2c)
 ...
 #endif

 #define DT_DRV_COMPAT some_sensor
 DT_INST_FOREACH_STATUS_OKAY(DEFINE_SOME_SENSOR)

 #undef DT_DRV_COMPAT
 #define DT_DRV_COMPAT another_sensor
 DT_INST_FOREACH_STATUS_OKAY(DEFINE_ANOTHER_SENSOR)
```

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2023-09-13 14:23:24 -07:00
Théo Battrel 45e66de58f west: Add fish shell completion
Add west completion for fish shell.

Update others files to include the support for fish shell.

Signed-off-by: Théo Battrel <theo.util@protonmail.ch>
2023-09-13 12:51:22 -07:00
Piotr Narajowski 38c9181642 bluetooth: tester: Service init
VCS and AICS service init will be handled in auto-pts

Signed-off-by: Piotr Narajowski <piotr.narajowski@codecoup.pl>
2023-09-13 17:23:13 +02:00
Sylvio Alves a6756c36e9 samples: wifi: esp32s2_saola: reduce RAM usage
This modification frees up around ~10kB of RAM and make sample code
working again.

1) Reduced net packet size and count.
2) Increase Wi-Fi heap to avoid memory allocation failure.
3) Keep log as minimal.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2023-09-13 17:00:28 +02:00
Marko Sagadin 5f0bb1d277 samples: drivers: uart: native tty: Add native_sim overlay
Also include it in the twister tests.

Signed-off-by: Marko Sagadin <marko.sagadin42@gmail.com>
2023-09-13 16:36:43 +02:00
Marko Sagadin 3d5e660903 drivers: serial: native tty: Split in top and bottom
Split the native tty serial driver in a top and bottom to enable using it
with embedded libCs.

Signed-off-by: Marko Sagadin <marko.sagadin42@gmail.com>
2023-09-13 16:36:43 +02:00
Daniel DeGrasse 11f6f2f7e8 samples: subsys: display: Add RK055HDMIPI4M shield testcase to LVGL
Add RK055HDMIPI4M specific testcase to LVGL. This allows LVGL to be
verified on the RT1170 and RT595 EVKs from NXP, which support LVGL using
this shield.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2023-09-13 16:36:10 +02:00
Jeppe Odgaard 30a2326d0b drivers: sensor: qdec_mcux: update phase bit in register
Update single phase bit in register when changing data->qdec_config.
Otherwise the changed settings has no effect.

Signed-off-by: Jeppe Odgaard <jeppe.odgaard@prevas.dk>
2023-09-13 16:35:07 +02:00
Keith Packard 8084ea55b7 boards/arc/qemu_arc: Disable use of branch delay slots
I spent several hours debugging a weird stack pointer corruption bug and
discovered that QEMU appears to mess up register contents when an interrupt
fires during the execution of a branch with a delay slot.

Instead of trying to fix qemu, let's just tell the compiler to not generate
code that uses the branch instructions with delay slots.

Closes: #60071

Signed-off-by: Keith Packard <keithp@keithp.com>
2023-09-13 16:34:53 +02:00
Ryan McClelland 10b85602e6 drivers: i3c: fix cdns-i3c builds with I3C_USE_IBI=n
The Cadence I3C was not building with CONFIG_I3C_USE_IBI, this fixes
the build and will give a small code size reduction when enabled.

Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
2023-09-13 16:32:55 +02:00
Manimaran A 9b6c933678 drivers: mchp: kscan: low power mode enabled
KSCAN driver updated to support low power feature

Signed-off-by: Manimaran A <manimaran.a@microchip.com>
2023-09-13 16:32:37 +02:00
Manimaran A dd97ed1307 drivers: mchp: kscan: dts update for low power mode
pinctrl and dts updated to support low power feature

Signed-off-by: Manimaran A <manimaran.a@microchip.com>
2023-09-13 16:32:37 +02:00
Marcin Niestroj f15e7c5909 soc: arm: st: set SWO reference frequency based on 'rcc'
Configure SWO reference frequency to be the same as
CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC. This should make all ST boards ready to
be used with SWO, without configuring any other devicetree property.

Tested with NUCLEO-L476RG and NUCLEO-H563ZI.

Signed-off-by: Marcin Niestroj <m.niestroj@emb.dev>
2023-09-13 16:29:56 +02:00
Marcin Niestroj a9fbcd2785 logging: swo: add Kconfig option for SWO reference frequency
SWO reference frequency was set based on `swo-ref-frequency` under `itm`
nodelabel or `/cpus/cpu@0/clock-frequency` property. Not all platforms
configure those.

All ST devices configure CPU frequency in `clock-frequency` under `rcc`
nodelabel. Configuring the same value for each board in
`/cpus/cpu@0/clock-frequency` would be one way to make SWO work out of the
box. There is lots of copy-pasting involved in this, which makes this very
error-prone.

Introduce Kconfig option, which will default to values configured in `itm`
or `/cpus/cpu@0`. The main advantage will be for platforms like ST, where
CPU clock frequency is already configured in another place. Thsoe could
override default value in SoC, board or any other platform specific layer.

Signed-off-by: Marcin Niestroj <m.niestroj@emb.dev>
2023-09-13 16:29:56 +02:00
Ryan McClelland 1b63e49b3f drivers: i3c: cdns: fix transfers while not idle
If a transfer happen in rapid sucession. It was possible for
the core to not be ready to accept another command. Poll on
the idle status bit until the core is ready to accept new data.

Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
2023-09-13 16:28:55 +02:00
Ryan McClelland 696acc78e0 drivers: i3c: cdns: fix reading error after transfer
Due to a bug, after a completed transfer happen. Only the first
command response error was read. This fixes the issue so all
commands are read for if an error occurred.

Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
2023-09-13 16:28:55 +02:00
Benjamin Lemouzy 75bc80d86f drivers: audio: tas6422dac: add driver
Add Texas Instruments TAS6422 DAC driver.

Signed-off-by: Benjamin Lemouzy <blemouzy@centralp.fr>
2023-09-13 16:27:11 +02:00