Commit graph

79755 commits

Author SHA1 Message Date
Benedikt Schmidt e7759b2a8e dts: bindings: adc: Add IDAC current to ADS114S08
Add the IDAC current magnitude property to ADS114S08

Signed-off-by: Benedikt Schmidt <benedikt.schmidt@embedded-solutions.at>
2023-05-27 05:33:52 -04:00
Benedikt Schmidt bb679532f4 dts: bindings: adc: Add configurable current source pin for ADCs
Add a property to the ADC channels which allows the configuration
of the current source pin.

Signed-off-by: Benedikt Schmidt <benedikt.schmidt@embedded-solutions.at>
2023-05-27 05:33:52 -04:00
Tristan Honscheid dc9bd3afe3 sensors: Create sensor trig subcommand
This PR relocates the sensor trigger sample application from the
`sensor_shell` sample to a subcommand in the actual sensor shell. The
subcommand has a UI for enabling a given trigger on a given sensor.
A built-in handler for the data_ready trigger is included that prints
the latest data to the log. Currently, only `SENSOR_TRIG_DATA_READY` is
supported but the groundwork is there to add others. Tested on a
`tdk_robokit1` board.

Signed-off-by: Tristan Honscheid <honscheid@google.com>
2023-05-27 05:33:11 -04:00
Robert Hancock fc73d6a7b9 drivers: gpio: xlnx: run clang-format
Clean up whitespace etc. using clang-format after previous changes. No
functional changes intended.

Signed-off-by: Robert Hancock <robert.hancock@calian.com>
2023-05-26 21:32:23 -04:00
Robert Hancock ca3a3c1783 drivers: gpio: xlnx: Add interrupt support
Added support for interrupt-driven GPIO for this driver if an interrupt
line is defined. Note that interrupt support is optional in the GPIO
core so it may or may not be present.

The core provides a single state change notification whenever any line
changes state on a given bank, so we need to check the states of the
lines ourselves to determine what has actually changed.

Also, the driver treats the first and second GPIO banks as mostly
separate devices, but a single interrupt is shared by both banks, so the
ISR ends up being registered by the first bank which also triggers
handling on the second bank if required.

Signed-off-by: Robert Hancock <robert.hancock@calian.com>
2023-05-26 21:32:23 -04:00
Robert Hancock 1f59cd26be drivers: gpio: xlnx: Fix property reading for second channel
The properties being read for the all-inputs and all-outputs flags in
the driver for the second GPIO channel did not match the ones listed in
the DT schema or the existing device tree files. Fix this.

Signed-off-by: Robert Hancock <robert.hancock@calian.com>
2023-05-26 21:32:23 -04:00
Emilio Benavente 150df95816 tests: drivers: dma: chan_link_transfer: Added LPC55S69 to Testcase
Added the LPC55S69 to the test case file for
dma_channel_chaining test.

Signed-off-by: Emilio Benavente <emilio.benavente@nxp.com>
2023-05-26 17:22:43 -05:00
Emilio Benavente 73b1705eb7 drivers: dma: dma_mcux_lpc: Adjusted dma driver for channel chaining.
Added to the configuration function to enable
channel chaining for the DMA_LPC that utilizes
the total of the SOC OTrig channels.

Signed-off-by: Emilio Benavente <emilio.benavente@nxp.com>
2023-05-26 17:22:43 -05:00
Emilio Benavente 86d63c5cff dts: arm: nxp: lpc55S6X: Added trig bindings for DMA
Added Input/Output trigger mux address's as properties
that can be passed into the DMA driver. This is intended
to send INPUTMUX signals into the DMA.

Signed-off-by: Emilio Benavente <emilio.benavente@nxp.com>
2023-05-26 17:22:43 -05:00
Mahesh Mahadevan 8e1c0ece68 boards: lpcxpresso55s69: Add USB FS support
Add support for the USB FS controller

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2023-05-26 17:53:37 -04:00
Mahesh Mahadevan bfa38b0aeb dts: lpc55S6x: Fix the mapping for USB RAM
Fix the mapping for the USB RAM

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2023-05-26 17:53:37 -04:00
Mahesh Mahadevan 9f4af21c22 dts: lpc55S6x: Add USB FS support
Add support for USB Full speed controller.

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2023-05-26 17:53:37 -04:00
Mahesh Mahadevan 1be4eed85f boards: lpcxpresso55s36: Add USBFS support
1. Add support for USB Full Speed controller.
2. Enable USB VBUS pin via pinctrl.

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2023-05-26 17:53:37 -04:00
Mahesh Mahadevan 83b30f4184 dts: lpc55S3x: Add USB Full speed support
Add support for USB Full Speed

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2023-05-26 17:53:37 -04:00
Mahesh Mahadevan 2924b6ead2 dts: lpc55S3x: Delete uuid region
uuid region is not present on LPC55S36

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2023-05-26 17:53:37 -04:00
Mahesh Mahadevan 0602ef8647 soc: nxp_lpc: Add USBFS support
1. Add support for the USB Full Speed controller
2. Add a Kconfig to specify if a dedicated USB
   RAM is available in the SoC.

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2023-05-26 17:53:37 -04:00
Mahesh Mahadevan d5775ea7ba drivers: usb_dc_mcux: Use CONFIG_USB_DC_NXP_LPCIP3511 define
Use CONFIG_USB_DC_NXP_LPCIP3511 instead of FSL_FEATURE_USB_USB_RAM
as the behaviour variation is based on the SDK driver used and not
if the SoC has a dedicated USB SRAM.

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2023-05-26 17:53:37 -04:00
Mahesh Mahadevan f05bbd09be drivers: usb_dc_mcux: Add Pinctrl defines
Add Pinctrl code

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2023-05-26 17:53:37 -04:00
Mahesh Mahadevan ec5d3b7bff drivers: nxp_usb: Enable USB_DC_HAS_HS_SUPPORT conditionally
Conditionally enable the USB_DC_HAS_HS_SUPPORT as the
USB_DC_NXP_LPCIP3511 controller can have both HS and FS only.

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2023-05-26 17:53:37 -04:00
Anas Nashif a543ba1f4d tests: use integration_platforms where applicable
Use integration_platforms where coverage is provided using one or few
targets instead.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2023-05-26 17:52:02 -04:00
Anas Nashif 04827ba71f tests/samples: use integration_platforms more where it makes sense
Use integration platforms to limit churn and build time in PR CI .

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2023-05-26 17:52:02 -04:00
Andy Ross a08e23f68e kernel/sched: Fix SMP must-wait-for-switch conditions in abort/join
As discovered by Carlo Caione, the k_thread_join code had a case where
it detected it had been called on a thread already marked _THREAD_DEAD
and exited early.  That's not sufficient.  The thread state is mutated
from the thread itself on its exit path.  It may still be running!

Just like the code in z_swap(), we need to spin waiting on the other
CPU to write the switch handle before knowing it's safe to return,
otherwise the calling context might (and did) do something like
immediately k_thread_create() a new thread in the "dead" thread's
struct while it was still running on the other core.

There was also a similar case in k_thread_abort() which had the same
issue: it needs to spin waiting on the other CPU to kill the thread
via the same mechanism.

Fixes #58116

Originally-by: Carlo Caione <ccaione@baylibre.com>
Signed-off-by: Andy Ross <andyross@google.com>
2023-05-26 17:09:35 -04:00
Andy Ross c3046f417a kernel/sched: Use new barrier and spin APIs
The switch_handle field in the thread struct is used as an atomic flag
between CPUs in SMP, and has been known for a long time to technically
require memory barriers for correct operation.  We have an API for
that now, so put them in:

* The code immediately before arch_switch() needs a write barrier to
  ensure that thread state written by the scheduler is seen to happen
  before the outgoing thread is flagged with a valid switch handle.

* The loop in z_sched_switch_spin() needs a read barrier at the end,
  to make sure the calling context doesn't load state from before the
  other CPU stored the switch handle.

Also, that same spot in switch_spin was spinning with interrupts held,
which means it needs a call to arch_spin_relax() to avoid a FPU state
deadlock on some architectures.

Signed-off-by: Andy Ross <andyross@google.com>
2023-05-26 17:09:35 -04:00
Andy Ross b89e427bd6 kernel/sched: Rename/redocument wait_for_switch() -> z_sched_switch_spin()
This trick turns out also to be needed by the abort/join code.
Promote it to a more formal-looking internal API and clean up the
documentation to (hopefully) clarify the exact behavior and better
explain the need.

This is one of the more... enchanted bits of the scheduler, and while
the trick is IMHO pretty clean, it remains a big SMP footgun.

Signed-off-by: Andy Ross <andyross@google.com>
2023-05-26 17:09:35 -04:00
Jamie McCrae d8d119fd9c doc: release: 3.4: Add auxdisplay addition node
Adds a note on unstable auxiliary display support being added,
alongside 3 drivers.

Signed-off-by: Jamie McCrae <spam@helper3000.net>
2023-05-26 23:05:58 +02:00
Jamie McCrae 71e7cf888d doc: api: Add auxdisplay as unstable API
Adds the new auxiliary display peripheral as an unstable API.

Signed-off-by: Jamie McCrae <spam@helper3000.net>
2023-05-26 23:05:58 +02:00
Jamie McCrae 71e10e743c doc: hardware: peripheral: Add auxdisplay documentation
Adds base auxdisplay documentation.

Signed-off-by: Jamie McCrae <spam@helper3000.net>
2023-05-26 23:05:58 +02:00
Jamie McCrae 764da7fff1 samples: driver: Add auxdisplay sample
Adds a simple auxdisplay sample which outputs hello world and the
name of the board. A sample overlay is provided for the
nucleo_f746zg board with a Hitachi HD44780-compatible display.

Signed-off-by: Jamie McCrae <spam@helper3000.net>
2023-05-26 23:05:58 +02:00
Jamie McCrae 579139096c MAINTAINERS: Add self as aux display maintainer
Add myself as auxiliary display maintainer.

Signed-off-by: Jamie McCrae <spam@helper3000.net>
2023-05-26 23:05:58 +02:00
Jamie McCrae b4b691fdd6 CODEOWNERS: Add self as aux display maintainer
Add myself as auxiliary display maintainer.

Signed-off-by: Jamie McCrae <spam@helper3000.net>
2023-05-26 23:05:58 +02:00
Jamie McCrae 212a4857ba drivers: auxdisplay: Add Hitachi HD44780 driver
Adds an auxiliary display driver for Hitachi HD44780-based (and
compatible) LCD displays.

Signed-off-by: Jamie McCrae <spam@helper3000.net>
2023-05-26 23:05:58 +02:00
Jamie McCrae 71c727e92e drivers: auxdisplay: Port Jinghua Display JHD1313 driver
Ports the Jinghua Display JHD1313 LCD (with RGB backlight) driver
to use the new auxdisplay driver interface. This driver is used on
the seeed grove LCD RGB display, and replaces it.

Signed-off-by: Jamie McCrae <spam@helper3000.net>
2023-05-26 23:05:58 +02:00
Jamie McCrae 7d1c79aa8c drivers: auxdisplay: Add noritake itron VFD auxiliary display
Adds the driver for a Noritake Itron VFD auxiliary display.

Signed-off-by: Jamie McCrae <spam@helper3000.net>
2023-05-26 23:05:58 +02:00
Jamie McCrae bdf2e56ce1 drivers: Add auxdisplay (text) interface
Adds the base driver include file and base auxiliary display
dts file.

Signed-off-by: Jamie McCrae <spam@helper3000.net>
2023-05-26 23:05:58 +02:00
Keith Short dfa992c596 twister: Remove newline suffix in BinaryHandler
Update the code that removes newline suffix in BinaryHandler for
compatibility with python 3.8.

Fixes: https://github.com/zephyrproject-rtos/zephyr/issues/58335

Signed-off-by: Keith Short <keithshort@google.com>
2023-05-26 14:59:03 -04:00
Sigvart Hovland 95f82c60e5 clock_control: clock_control_nrf.c: Add size_t to casts from void *
If you compile this code with Clang it will complain about casting a larger
type into a smaller enum.

```C
zephyr/drivers/clock_control/clock_control_nrf.c:120:37:
warning: cast to smaller integer type 'enum clock_control_nrf_type'
from 'clock_control_subsys_t' (aka 'void *') [-Wvoid-pointer-to-enum-cast]
enum clock_control_nrf_type type = (enum clock_control_nrf_type)subsys;
```

Adding `size_t` to the cast removes this issue. Another option could be to
add `-Wno-void-pointer-to-enum-cast` flag to the compile flags.

Signed-off-by: Sigvart Hovland <sigvart.hovland@nordicsemi.no>
2023-05-26 14:58:13 -04:00
Vinayak Kariappa Chettimada c23c5f39e7 Bluetooth: Controller: Cleanup Periodic Adv Channel Map Update
Remove redundant code and cleanup Periodic Advertising
Channel Map Update implementation.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2023-05-26 14:57:22 -04:00
Antoniu Miclaus eda63195f4 drivers: sensor: adxl372: fix software reset delay
The indended value for the delay after the software reset of adxl372 is
1ms. Adjust the value accordingly.

Fixes: a3e7cea
Signed-off-by: Antoniu Miclaus <antoniu.miclaus@analog.com>
2023-05-26 14:56:55 -04:00
Rodrigo Peixoto 1cbcaecac3 doc: zbus: improve suggested uses
Developers may be uncertain about which observer type to use in zbus,
potentially resulting in improper subsystem use. Fix that by adding an
explicit differentiation between the observer's type in the `Suggested
uses` section.

Fixes #58004

Signed-off-by: Rodrigo Peixoto <rodrigopex@gmail.com>
2023-05-26 14:56:28 -04:00
Grzegorz Swiderski 156f36f0d1 boards: Rename .dts -> .dtsi where appropriate
DTS files which are only used as includes should have the proper suffix
according to spec. A .dts file is expected to contain a full devicetree
with a root node and a `/dts-v1/;` tag, at least after preprocessing.

For every board, ensure that the names of DTS includes end with ".dtsi",
and update the relevant references.

Signed-off-by: Grzegorz Swiderski <grzegorz.swiderski@nordicsemi.no>
2023-05-26 14:55:57 -04:00
Abram Early a59c948256 drivers: serial: stm32 uart implements driver enable
Enables the use of the hardware DE pin provided by an stm32 UART using
device tree flags.

Signed-off-by: Abram Early <abram.early@gmail.com>
2023-05-26 14:55:30 -04:00
Declan Snyder dc40131a0e tests: uart_async_api: Support RTXXX
Support mimxrt595_evk_cm33 and mimxrt685_evk_cm33
on the uart_async_api test with a board overlay

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2023-05-26 13:15:24 -05:00
Declan Snyder 9640859623 boards: mimxrtXXX: Add UART DMAs
Add DMA phandles to UART nodes in RT 3 digit EVK
dts files now that the UART ASYNC API is supported
in the mcux flexcomm driver.

Also add the DMA phandles to other platforms with
flexcomm uart and lpc dma enabled by default for
compatibility

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2023-05-26 13:15:24 -05:00
Declan Snyder cf34d2cbdc drivers: uart_mcux_flexcomm: Add ASYNC API
Support ASYNC API on Flexcomm UART

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2023-05-26 13:15:24 -05:00
Declan Snyder 2af408b8fa drivers: dma_mcux_lpc: Fix busy status
Driver should just say the channel is not busy if
it is not setup rather than returning an error.

Also, change the channel index to int8_t rather
than uint32_t since it is being assigned negative
values and that width is more appropriate.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2023-05-26 13:15:24 -05:00
Declan Snyder e9a8389639 drivers: uart_mcux_flexcomm: Clean up
Clean up slashes in init macro to be less messy

Update copyright to reflect recent code changes by NXP

Update outdated driver description comment

Change irq driven api variables naming to be more specific

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2023-05-26 13:15:24 -05:00
Declan Snyder 4f290e6173 drivers: uart_mcux_flexcomm: Simplify init macros
The flexcomm uart mcux driver init macros have a lot
of unnecessary and confusing redundancy, so let's
simplify them.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2023-05-26 13:15:24 -05:00
Fabio Baltieri c56a3615ee driver: npcx: i2c: set a dedicated priority for the port driver
The NPCX I2C controller has a port-controller hierarchy and the driver
is split in two files, with separate device struct and init functions.

These are currently initialized at the same level and priority, so the
actual order depends on what the linker does.

To avoid relying on the linking order, add a dedicated priority option
for the port that is set to go after the normal I2C one by default.

Found this by building with CONFIG_CHECK_INIT_PRIORITIES.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2023-05-26 14:08:12 -04:00
Rajkumar Kanagaraj 138faea796 manifest: TF-M and MbedTLS update
Update manifest to fetch latest TFM and MbedTLS.

Signed-off-by: Rajkumar Kanagaraj <rajkumar.kanagaraj@linaro.org>
2023-05-26 14:00:18 -04:00
Rajkumar Kanagaraj 682dbae203 samples: tfm: Re-commit psa_crypto sample
Adds a refactored version of the psa_crypto sample back,
which was removed as part of the update to TF-M 1.7.0
due to unresolvable (at the time) issues with use of
MbedTLS instances on the S and NS sides.

This sample takes advantage of changes to MbedTLS and
TF-M that were introduced after the TF-M 1.7.0 and MbedTLS
3.3 release, and cherry-picked in Zephyr, allowing for
improved linking of MbedTLS in secure and non-secure
images. PSA API calls on the non-secure side can now be
correctly routed to the secure partition, while X.509
and TLS calls remain on the non-secure/Zephyr side.

Signed-off-by: Rajkumar Kanagaraj <rajkumar.kanagaraj@linaro.org>
2023-05-26 14:00:18 -04:00