Fix incorrect TLV (Type-Length-Value) data length calculation for
SSP configuration blob version 3.0. The blob30->size field does not
include auxiliary TLV data appended after the main structure, leading
to incorrect parsing boundaries.
Changes:
- Use the total 'size' parameter instead of blob30->size for v3.0
- Pass size parameter through dai_ssp_parse_aux_data() chain
- Ensures correct parsing of auxiliary data (clocks, sync, DMA controls)
Signed-off-by: Adrian Bonislawski <adrian.bonislawski@intel.com>
Add explicit bespoke_cfg_size parameter to the dai_config_set()
function and its underlying driver API to improve configuration
validation and security.
Changes:
- Add 'size_t size' parameter to dai_driver_api.config_set callback
- Update dai_config_set() inline wrapper to pass size parameter
- Update all DAI driver implementations:
- Intel: SSP, DMIC, HDA, ALH
- NXP: SAI, ESAI, MICFIL
- Add documentation for new size parameter
This change enables drivers to validate the size of bespoke
configuration data, preventing buffer overruns and improving
robustness of the DAI configuration interface.
All existing callers must be updated to pass the size of their
bespoke configuration structures.
Signed-off-by: Adrian Bonislawski <adrian.bonislawski@intel.com>
Add handling for SSP_GTW_DMA_CONFIG_ID (0x1000) TLV type in SSP driver's
auxiliary data parsing functions. This TLV type is explicitly ignored as
it does not require any processing by the driver.
Changes:
- Define SSP_GTW_DMA_CONFIG_ID constant (0x1000) in dai-params-intel-ipc4.h
- Add case handling in dai_ssp_check_aux_data() to validate this TLV
- Add case handling in dai_ssp_parse_tlv() to skip processing of this TLV
This allows SSP configuration blobs containing SSP_GTW_DMA_CONFIG_ID
entries to be parsed successfully without triggering errors
for undefined TLV types.
Signed-off-by: Adrian Bonislawski <adrian.bonislawski@intel.com>
Add a support for Hycon Technology HY4245 fuel gauge driver.
The HY4245 operates with Single and Two Cells Li+ battery cells as a
stand–along battery gauge. The device uses GaugePackTM algorithm, which
mixes Coulomb–Counting and Open–Circuit–Voltage (OCV) measurements with
battery cell characteristics to manage battery gauge, to maintain accurate
battery capacity estimates with compensation for rate, temperature, age
and self–discharge effects.
Signed-off-by: Saravanan Sekar <saravanan@linumiz.com>
- It seems that the mask variants of GPIO functions are not present in
the latest sdk, so replace those with direct register access.
- This was already done in [0], but was reverted due to some hal
problems.
- I am working on a hal update, but since this change does not require a
hal update to work, it would be best to merge this first.
[0]: https://github.com/zephyrproject-rtos/zephyr/pull/83402
Signed-off-by: Ayush Singh <ayush@beagleboard.org>
From testing on STM32F723E-DISCO, it seems necessary to enable OTGHSULPI
clock in addition to USBPHYC when the internal USBPHYC HS PHY is used.
(USBPHYC is found on STM32F723xx, STM32F730Z8 and STM32F730I8 SoCs)
Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
Perform cache operations in thread context when the buffer ownership
changes between USB stack and UDC driver. This offers clearly measurable
throughput increase on Mass Storage when double buffering is enabled.
When endpoint operations are not double buffered the difference is
negligible. The positive side effect is reducing number of operations
performed in interrupt context.
Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
- Currently, ADC driver does not implement any PM related constraints.
Due to this, when using it with PM enabled (example ieee802154, which
enabled PM by default), it will stall the system.
- Similar to pwm driver, disable standby when ADC is sampling. The
variable standby_disabled is just a flag to ensure that we disable (or
enable) standby only when ADC driver selects it. Otherwise, it is
possible to have a condition where ADC enabled PM and ieee802154
disables it.
- This follows what TI SDK ADC driver does [0].
[0]: 507c93efc8/source/ti/drivers/adc/ADCCC26XX.c (L186)
Signed-off-by: Ayush Singh <ayush@beagleboard.org>
Driver did not allow to execute any invalidate all operation.
This operation should not be allowed for data cache as it will lead to
undefined behavior but it is ok to invalidate instruction cache.
Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
Update wakeup source dump function to DBG level. This function will
print and clear wakeup source registers of NXP wifi chips with
CONFIG_WIFI_LOG_LEVEL_DBG enabled. By changing debug level of this file,
user can avoid wakeup source clear.
Signed-off-by: Hui Bai <hui.bai@nxp.com>
Support added for clock control using TISCI for devices using the binding
ti,k2g-sci-clk. This driver relies on the TISCI layer to make calls to the
DMSC core to set and get the clock rate and retrieve clock status.
Signed-off-by: Dave Joseph <d-joseph@ti.com>
Couple of AF_UNSPEC need to be replaced by NET_AF_UNSPEC so that
OpenThread tests will pass.
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
remove mdio_bus_enable/mdio_bus_disable, as they are no
longer needed and make the mdio api simpler.
Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
Removes differentiation between pdl and hal based drivers from device
tree. This differentiation is now done as a Kconfig option.
Signed-off-by: John Batch <john.batch@infineon.com>
Fixing build errors related to reference to an incorrect define.
Adds missing headers to pinctrl_soc.h for Edge platform.
Signed-off-by: John Batch <john.batch@infineon.com>
Fixes the max32 can driver to follow the convention for drivers to
select pin control if they need it.
Signed-off-by: Maureen Helm <maureen.helm@analog.com>
STM32H7 platforms now enable cache management by default.
To ensure data coherency after flash writes, invalidate cache
lines to the region written.
This prevents stale data and ensures proper memory visibility.
Signed-off-by: Fabrice DJIATSA <fabrice.djiatsa-ext@st.com>
If the sensor_value only has an integer part N, this always resulted in q31
value of <N-1>.999999.
As the calculated shift value already uses 'abs(sample.val1) + 1' it is
safe to assume we can't have 100% scaling of this integer part and we can
omit the -1.
Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
Correct clock config info recently modified that should use
STM32_DT_INST_CLOCK_INFO_BY_NAME() macro instead of
STM32_CLOCK_INFO_BY_NAME() macro.
Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
Use a list of ports and FOR_EACH to instantiate GPIO devices instead of
having one line to instantiate each port. This is much shorter and also
makes it easier to add support for new ports, if necessary in the future.
While at it, cover all ports from A to Z since it is now trivial to do so.
Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
It is thus possible to enable CONFIG_UART_USE_RUNTIME_CONFIGURE for
this driver and re-configure a uart device at runtime.
Driver's init function was moved to the bottom of the file for two
reasons: to ease factorization and to follow the common device driver
source structure (usually: the init function is right before the
API structure and the instanciation macros).
Signed-off-by: Tomasz Bursztyka <tobu@bang-olufsen.dk>
Changes the default value of the INPUT_CST816S_INTERRUPT flag to default to
true if the there is a compatible with the irq-gpio property enabled.
Signed-off-by: Fabian Blatz <fabianblatz@gmail.com>
Fixes an issue with an unused function being defined if
CONFIG_DEVICE_DEINIT_SUPPORT was disabled
Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
Fixes an issue with an unused function being defined if
CONFIG_DEVICE_DEINIT_SUPPORT was disabled
Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
add SOC_SERIES_STM32N6X dependency with USE_STM32_HAL_DMA_EX
to enable building applications that use XSPI with DMA
configuration.
Signed-off-by: Fabrice DJIATSA <fabrice.djiatsa-ext@st.com>
Exclude SOC_CY8C6244LQI_S4D92 from UART async API support due to
hardware limitations, similar to SOC_FAMILY_INFINEON_CAT1C.
Signed-off-by: Yurii Lozynskyi <yurii.lozynskyi@infineon.com>
Add a new Kconfig option CONFIG_XEN_SYSCTL_INTERFACE_VERSION that allows
to change the version of the Sysctl interface used by Zephyr to issue
sysctl hypercalls.
For now versions 0x15 is supported.
Signed-off-by: Mykyta Poturai <mykyta_poturai@epam.com>
Signed-off-by: Dmytro Firsov <dmytro_firsov@epam.com>
Add a new Kconfig option CONFIG_XEN_DOMCTL_INTERFACE_VERSION that allows
to change the version of the Domctl interface used by Zephyr to issue
domctl hypercalls. Add compile-time checks to enable or disable certain
Domctl operations based on the selected Domctl interface version.
For now versions 0x15, 0x16, and 0x17 are supported.
Also it required to correctly guard domctl call that were not supported
prior to specified version.
Signed-off-by: Mykyta Poturai <mykyta_poturai@epam.com>
Signed-off-by: Dmytro Firsov <dmytro_firsov@epam.com>
If 0 is passed as domain id to the Xen createdomain hypercall, it will
allocate a new domain id and return it via the domctl structure.
Allow callers to access this new domain id via a pointer arg.
This will allow to create domains without explicitly specifying the
domain id for them.
Signed-off-by: Mykyta Poturai <mykyta_poturai@epam.com>
Signed-off-by: Dmytro Firsov <dmytro_firsov@epam.com>
The size is passed in bytes, not in megabytes. So rename the parameter
to avoid confusion.
Signed-off-by: Mykyta Poturai <mykyta_poturai@epam.com>
Signed-off-by: Dmytro Firsov <dmytro_firsov@epam.com>
Domain control call "XEN_DOMCTL_getvcpuinfo" provides information
about domain's virtual CPU(s). It can be used by Domain-0 services
for gathering statistic and vCPUs current status.
Signed-off-by: Dmytro Semenets <dmytro_semenets@epam.com>
Signed-off-by: Dmytro Firsov <dmytro_firsov@epam.com>
This hypercall can be used get some information about physical machine
and running guests:
- sysctl hypercall "xen_sysctl_getphysinfo" allows read information about
physical machine: number CPUs, memory sizes, hardware capabilities, etc.
- sysctl hypercall "xen_sysctl_getdomaininfolist" returns array of domain
info structures that provide information about particular domain(s).
Signed-off-by: Dmytro Semenets <dmytro_semenets@epam.com>
Signed-off-by: Mykyta Poturai <mykyta_poturai@epam.com>
Signed-off-by: Dmytro Firsov <dmytro_firsov@epam.com>
Xen API contains hypercall, which allows domains to identify Xen
version, that is currently used on the system. It can be used to check
if current version is supported by Zephyr or to change behavior of the
drivers or services.
Signed-off-by: Dmytro Semenets <dmytro_semenets@epam.com>
Signed-off-by: Dmytro Firsov <dmytro_firsov@epam.com>
Add wrappers for following XEN_DMOP_* hypercalls.
These enables Xen device model control path:
dm_op provides operations to create/manage the ioreq server
so guest MMIO accesses are trapped and handled by the hypervisor.
These are guarded by CONFIG_XEN_DMOP.
- dmop
- dmop_create_ioreq_server
XEN_DMOP_create_ioreq_server
- dmop_map_io_range_to_ioreq_server
XEN_DMOP_map_io_range_to_ioreq_server
- dmop_set_ioreq_server_state
XEN_DMOP_set_ioreq_server_state
- dmop_nr_vcpus
XEN_DMOP_nr_vcpus
- dmop_set_irq_level:
XEN_DMOP_set_irq_level
Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
When using an stm32 in a bridge circuit with complementary outputs,
the deadtime needs to be configurable to avoid shoot-thru current
on the circuit. So, the HAL has the configuration in the BDTR init
and use that api access to set the configuration.
Signed-off-by: Charles Hardin <ckhardin@gmail.com>
- Updates Bluetooth driver to include bluetooth firmware for B1 device
revision.
- Changes build behavior to allow building without blobs being fetched
to allow CI to verify build.
- Adds cmake warning if blobs are not present.
Signed-off-by: John Batch <john.batch@infineon.com>
Ensure that x,y/width-height rectangle mentioned in display_read
and display_write are actually part of the framebuffer, otherwise
return an error.
Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
Despite the datasheet stating otherwise, the Pinnacle based trackpads can
have their X/Y data inverted when operating in relative mode, so set those
configs in all modes during init.
Signed-off-by: Peter Johanson <peter@peterjohanson.com>