The support for capability IEEE802154_OPENTHREAD_HW_MULTIPLE_CCA is added
to the ieee802154_nrf5 driver.
Signed-off-by: Andrzej Kuroś <andrzej.kuros@nordicsemi.no>
This commit adds extenstion interface that extends ieee802154_radio.h
New OT-specific capability, transmit mode and configuration parameter
is added.
Signed-off-by: Andrzej Kuroś <andrzej.kuros@nordicsemi.no>
The `attr_get` method is added to the ieee802154_radio to allow
reading of driver specific attributes of given device.
The enum `ieee802154_attr` provides common extension pattern
allowing to extend the attribute set.
Accessor function `ieee802154_radio_attr_get` is provided.
Signed-off-by: Andrzej Kuroś <andrzej.kuros@nordicsemi.no>
The ieee802154_tx_mode and ieee802154_config_type types are given
values allowing to extend these types elsewhere.
Signed-off-by: Andrzej Kuroś <andrzej.kuros@nordicsemi.no>
Test that `pm_device_driver_init` puts devices into the appropriate
state depending on the devicetree configuration.
Signed-off-by: Jordan Yates <jordan.yates@data61.csiro.au>
Update the expected power domain behaviour in the tests in line with
the driver implementation changes.
Signed-off-by: Jordan Yates <jordan.yates@data61.csiro.au>
Startup power domains according to the expected final state given the
power supply and PM device runtime support.
Signed-off-by: Jordan Yates <jordan.yates@data61.csiro.au>
Let the driver compile without `PM_DEVICE_POWER_DOMAIN`, in which case
the driver only controls the GPIO, without notifying dependant devices.
Signed-off-by: Jordan Yates <jordan.yates@data61.csiro.au>
Adds a helper function for initializing devices into the expected power
state, through the devices `pm_device_action_cb_t`. This eliminates code
duplication between the init functions and the PM callback.
The expected device states in order of priority are:
* No power applied to device, `OFF`
* `zephyr,pm-device-runtime-auto` enabled, `SUSPEND`
* Otherwise, `ACTIVE`
Signed-off-by: Jordan Yates <jordan.yates@data61.csiro.au>
Implement `gpio_pin_get_config` for the stellaris platform, and by
extension `qemu_cortex_m3`.
Signed-off-by: Jordan Yates <jordan.yates@data61.csiro.au>
Add a sub-priority field to `Z_INIT_ENTRY_SECTION`, which is used to
ensure that multiple drivers running at the same init priority still
run in an order that respects their devicetree dependencies.
This is primarily useful when multiple instances of the same device are
instantiated that can depend on each other, for example power domains
and i2c muxes.
Signed-off-by: Jordan Yates <jordan.yates@data61.csiro.au>
Generate a zero padded variant of `_ORD` that is suitable for use in
linker scripts with the `SORT` property, so that `6` is correctly placed
before `24`, and so on.
Signed-off-by: Jordan Yates <jordan.yates@data61.csiro.au>
The initial goal was to remove sys_clock_timeout_end_calc(). However,
several related issues have been fixed as well.
First this:
int64_t print_interval = sys_clock_timeout_end_calc(K_SECONDS(1));
/* Print log every seconds */
int64_t print_info = print_interval - k_uptime_ticks();
if (print_info <= 0) {
[...]
}
The above condition will simply never be true.
Then there is lots of back-and-forth time conversions using expensive
base-10 divisions for each loop iterations which is likely to impact
performance.
Let's do the time conversion only once outside the loop and track
everything in terms of ticks within the loop. Also the various timeouts
are open-coded based on the absolute uptime tick so to sample it only
once per round. Using sys_timepoint_calc() and sys_timepoint_timeout()
would have introduced additional uptime tick sampling which implies the
overhead of a downstream lock each time for no gain. For those reasons,
open coding those timeouts bears more benefits in this particular case
compared to using the timepoint API.
Then this:
secs = k_ticks_to_ms_ceil32(loop_time) / 1000U;
usecs = k_ticks_to_us_ceil32(loop_time) - secs * USEC_PER_SEC;
The above should round down not up to work accurately. And the usecs
value will become garbage past 1.2 hour of runtime due to overflows.
And no need to clamp the wait period which is on the microsec scale
using the total duration argument being on the millisec scale. That's
yet more loop overhead that can be omitted. The actual duration is
recorded at the end anyway.
Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
This is meant as a substitute for sys_clock_timeout_end_calc()
Current sys_clock_timeout_end_calc() usage opens up many bug
possibilities due to the actual timeout evaluation's open-coded nature.
Issue ##50611 is one example.
- Some users store the returned value in a signed variable, others in
an unsigned one, making the comparison with UINT64_MAX (corresponding
to K_FOREVER) wrong in the signed case.
- Some users compute the difference and store that in a signed variable
to compare against 0 which still doesn't work with K_FOREVER. And when
this difference is used as a timeout argument then the K_FOREVER
nature of the timeout is lost.
- Some users complexify their code by special-casing K_NO_WAIT and
K_FOREVER inline which is bad for both code readability and binary
size.
Let's introduce a better abstraction to deal with absolute timepoints
with an opaque type to be used with a well-defined API.
The word "timeout" was avoided in the naming on purpose as the timeout
namespace is quite crowded already and it is preferable to make a
distinction between relative time periods (timeouts) and absolute time
values (timepoints).
A few stacks are also adjusted as they were too tight on X86.
Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
Enable PXP rotation for LVGL sample. The PXP is configured to
rotate by 0 degrees, so the original image is left untouched.
Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
Enable PXP engine with RT1170 EVK. The PXP is set to rotate by 0
degrees in the LVGL sample, for testing purposes.
Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
Enable display rotation using the NXP pixel pipeline (PXP). The ELCDIF
will only utilize the PXP if a framebuffer equivalent in size to the
screen is provided to display_write. The rotation angle can be
configured via Kconfig at build time.
Fixes#59921
Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
The NXP Pixel pipeline engine (PXP) is a 2D DMA engine capable of
accelerating display rotation, color space conversion, and limited
2D blending operations. This DMA driver only supports rotation of a
framebuffer, via a set of custom dma_slot values. Only DMA channel 0
is supported or utilized.
Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
The new stack zephyr,cdc-acm-uart driver has two separate init path, one
of which kicks in before the USB stack to start buffering log messages.
This generates a false positive in the build time priority checking,
adding a check to ignore that compatible entirely.
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
Updated the driver to support low power mode.
Introduced "enable-low-power" flag in device tree to
control(on/off) low power mode.
If flag added in DTS, during sleep BBLED will switch off the LEDs.
Otherwise BBLED will continue the configured blinking pattern on LEDs.
Signed-off-by: Manimaran A <manimaran.a@microchip.com>
Add g1120b0mipi watch display to shields. This shield is currently
supported with the RT595 and RT1170 EVK. The shield contains a 400x392
circular OLED watch display, with an integrated RM67162 display controller
Note that the touchscreen IC can be driven by the FT5336 driver, with the
following changes:
- the FT3267 reports touch data as inverted from the FT5336, so
LVGL must be made aware of this via CONFIG_LV_Z_POINTER_KSCAN_INVERT_Y
- the FT3267 reports the X and Y coordinates as swapped from the FT5336.
To resolve this, the RM67162 driver reports the display as rotated by
90 degrees.
Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
Add support for resetting controller at boot, and update FT5336
documentation to indicate that the FT3267 IC is also supported by this
driver.
Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
Add support for RM67162 MIPI display controller. This controller
is configured to run in MIPI command/DBI mode, driving a 400x392 OLED
display.
Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
Only set LV_Z_VDB_CUSTOM_SECTION for the RK055HDMIPI4M shield, as it
is only required when using displays that require a large framebuffer.
Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
Fix support for DCS long write command in DSI mcux driver, to enable use
with displays that require this command for full support.
Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
Only setup DPI input from LCDIF if MODE_VIDEO is set, as this
is the the only case where input from the LCDIF would be required to
drive the display. Do not populate the dpi_config structure unless a
reference the the NXP LCDIF device is provided, since this is the output
device providing DPI data.
Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
Fixup support for DCS_LONG_WRITE command in DSI MCUX 2L driver. Since long
DCS commands may benefit from nonblocking I/O, add support for non blocking
transfers to the DSI driver.
This commit also corrects the interrupt number for the RT595, which uses
the DSI_MCUX_2L IP block.
Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
Make DPI mode an optional configuration for the DSI MCUX 2L driver.
DPI mode will only be enabled when the MIPI is attached in video mode,
since this is when DPI formatted packets are expected.
This will enable the DSI driver to also support DBI/command mode, for
displays that use this format.
Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
Add DSI video mode flag to MIPI configuration, to indicate to MIPI
drivers that this display uses video mode and must be refreshed
constantly.
Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
Implement a driver for the PWM controller MAX31790. This driver
also implements the RPM mode of the controller, which can
be accessed via setting pwm_flags_t accordingly to macros
defined in the driver specific header.
Signed-off-by: Benedikt Schmidt <benedikt.schmidt@embedded-solutions.at>
Fix a build error introduced in 9f02eeadf8, the async pointers are only
available when UARTE_ANY_ASYNC is set.
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>