Move power configuration from the device init function into the
`DISK_IOCTL_CTRL_INIT` and `DISK_IOCTL_CTRL_DEINIT` handlers. If
`pwr-gpios` is defined, this ensures that the card is not powered up
until requested, and enables power down the card when not in use.
This behaviour matches the implementation for `sdhc_spi`.
Signed-off-by: Jordan Yates <jordan@embeint.com>
Provide a pointer to the first element of the clock list explicitly (as
done by `stm32_sdmmc_clock_enable`), instead of a pointer to the list.
Signed-off-by: Jordan Yates <jordan@embeint.com>
Limit RX FIFO size allocation to a percentage of the total
SPRAM available, to cap allocation according to memory size.
Signed-off-by: Raffael Rostagno <raffael.rostagno@espressif.com>
Disable D+ pull-up on core disable to make sure that device does not
indicate its presence to host before the stack is ready (software
initializes controller and clears SftDiscon bit).
Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
This follows change of ethos-u core driver (hal_ethos_u) which
removes cache flush/invalidate mask function ethosu_set_basep_cache_mask.
Signed-off-by: Chun-Chieh Li <ccli8@nuvoton.com>
Callbacks now take a result parameter which may, if the callback was
linkd to by a previous submissions, have the result code from the last
submission.
Additionally the userdata is now const by default making it easier to
use the device pointer as the userdata which is very common.
Signed-off-by: Tom Burdick <thomas.burdick@intel.com>
Add power management state validation in dw_dma_get_status() to ensure
the device is in active state before attempting to read DMA status.
Returns -EINVAL if device is not active, preventing potential issues
when accessing hardware registers while device is suspended.
Signed-off-by: Adrian Bonislawski <adrian.bonislawski@intel.com>
Add the option to specify an alternate ADC gain value to use if the
initial measurement saturates the range. This enables higher data
resolutions when the values are small compared to the maximum signal
values, while still supporting the maximum.
As a concrete example, measuring charge currents from a small solar
panel (0 - 50mA), while also supporting high USB charge currents
(up to 1A).
Signed-off-by: Jordan Yates <jordan@embeint.com>
Fix missing shift values in `sensor_three_axis_data` when performing
one-shot reads on SENSOR_CHAN_ACCEL_XYZ and SENSOR_CHAN_GYRO_XYZ
Signed-off-by: Anthony Williams <anthony289478@gmail.com>
Supported receiving more types frames. One was TX timestamp response
frame and the other one is RX timestamped frame which were for switch
port.
Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
PTP clock may be enabled per Ethernet port. Especially pseudo port for
switch management does not need PTP clock.
Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
According to the LIS2DU12 datasheet (p.30), the device must be
inpower-down mode before executing a software reset.
Entering power-down requires setting the ODR field to 0x000.
This commit adds the missing call to set ODR=0x000 before issuing the
reset. Without this step, the sensor does not recover after a controller
reset and only resumes operation after a full power cycle.
Signed-off-by: Jan Kablitz <jan.kablitz@8tronix.de>
Relocate private reboot function to allow ODR configuration before
execution. This will ensure proper power-down sequence prior to software
reset.
Signed-off-by: Jan Kablitz <jan.kablitz@8tronix.de>
Add a driver for the VIRTIO Ethernet device.
This is a minimal driver which sets a MAC address and transmits packets,
but does not support any extra features like the control channel or
checksum offloading.
Confirmed to work with the networking subsystem samples. For example, the
zperf sample shows a result of 85 Mbps download and 14 Mbps upload.
Signed-off-by: Jakub Klimczak <jklimczak@internships.antmicro.com>
Enables bbram driver for motorola, mc146818 under its MFD
to access the RAM of the RTC.
Signed-off-by: Anisetti Avinash Krishna <anisetti.avinash.krishna@intel.com>
Enabled Motorola, mc146818 MFD, which implements RTC
read/write operations and prevents data corruption
by synchronizing these operations.
Signed-off-by: Anisetti Avinash Krishna <anisetti.avinash.krishna@intel.com>
The UDC stack assumes that 'halt' on control endpoints is automatically
cleared by device drivers and never calls udc_ep_clear_halt() for such
endpoints. In practice, most controllers do perform this automatic clear
in hardware, but this requires special handling in udc_ep_set_halt() for
control endpoints (EP0), as setting the 'halted' bit on such endpoints will
lead to the software getting out-of-sync with the hardware.
Update the UDC skeleton driver to handle this edge case and add a comment
documenting the stack's behavior, along with the hardware behavior expected
by the code added to the skeleton driver for it to be functional.
Co-authored-by: Johann Fischer <johann.fischer@nordicsemi.no>
Signed-off-by: Mathieu CHOPLAIN <mathieu.choplain-ext@st.com>
Explicitly configure retention mode when powering up HPSRAM banks to
ensure consistent behavior across hardware platforms.
After D3 power state transitions, the retention mode configuration can
become undefined due to hardware reset. This causes test failures in NVL
FPGA testing environment where the hardware strictly enforces retention
mode settings.
The fix ensures retention mode is properly set in two locations:
- sys_mm_drv_hpsram_pwr(): Configure retention mode for all bank
power-up operations
- adsp_mm_restore_context(): Explicitly set retention mode during
D3->D0 restore sequence after each bank is powered up
Signed-off-by: Tomasz Leman <tomasz.m.leman@intel.com>
The SAMC21 has a different revision of the DAC peripheral.
This change adds an ifdef to handle the changed SYNCBUSY register.
Signed-off-by: Stefan Giroux <stefan.g@feniex.com>
added logic to determine the direction of USB transfers for non-setup
packets using the endpoint direction. This ensures proper handling of
USB_IN and USB_OUT directions.
Signed-off-by: Richard Yim <richardyim@ami.com>
The timer is enabled before comparison value is set, which can lead to
unexpected behavior if the registers contain uninitialized values.
Should call arm_arch_timer_enable() after arm_arch_timer_set_compare().
Signed-off-by: Kunihiko Hayashi <hayashi.kunihiko@socionext.com>
Plan to restructure eth_stm32_hal into two files, eth_stm32_v1
and eth_stm32_v2, while retaining the git history of v2.
Signed-off-by: WenBin Zhang <freey7955@gmail.com>
Split the codes of v1 and v2.
V1 supports F1/F2, while v2 supports F4/F7/H5/H7/N6.
This makes it easier to understand and add new functions.
Signed-off-by: WenBin Zhang <freey7955@gmail.com>
Add support for the Renesas RA Direct Memory Access Controller,
including driver source files, Kconfig options, and DTS bindings.
- Add initial implementation of the RA DMAC driver
- Add dedicated Kconfig and CMake integration
- Provide Devicetree bindings for the RA DMAC
- Update module Kconfig to include the new driver
This enables DMA functionality on Renesas RA series MCUs.
Signed-off-by: Khanh Nguyen <khanh.nguyen.wz@bp.renesas.com>
MAX32 UART's "almost empty" fires when the FIFO gets down to one byte, but
when sending just one byte, no interrupt is raised, resulting in stalled
TX. Use a timer to ensure the ISR is invoked and TX processing continues in
that scenario.
Signed-off-by: Pete Johanson <pete.johanson@analog.com>
Some applications need to throttle RRAM writes to handle peak current
management.
Add CONFIG_NRF_RRAM_THROTTLING_DATA_BLOCK which defines the maximum
chunk length that can be written at once.
Add CONFIG_NRF_RRAM_THROTTLING_DELAY which configures the sleep delay in
microseconds after each write.
Signed-off-by: Riadh Ghaddab <riadh.ghaddab@nordicsemi.no>
The jedec-id cannot be read after flash device is set to octal mode.
Fixed by moving the jedec-id comparison to
flash_flexspi_nor_check_jedec() which already reads the jedec-id when
flash device is still in single spi mode.
Signed-off-by: Andre Heinemans <andre.heinemans@nxp.com>
This adjust the MAC CONFIGURATION register settings to 10MBit/s if needed.
The reduction is needed for 10MBit only PHYs.
Signed-off-by: Adib Taraben <theadib@gmail.com>
Forward get/set selection to the camera source and update the driver's
video_format on set so buffer sizing and streaming follow the selected
region.
Signed-off-by: Armin Kessler <ake@espros.com>
Add I2C_TARGET_ALLOW_POWER_SAVING config. Enable this config makes I2C
target device can enter Doze/Deep doze states while the bus is idle.
Ongoing transfers will block low-power entry until they are completed,
ensuring correct communication while still reducing overall power
consumption.
Signed-off-by: Tim Lin <tim2.lin@ite.corp-partner.google.com>
DSA is part of Ethernet and will utilize more Ethernet definitions for
more features support. So, it's proper to let DSA header include
Ethernet header with moving some DSA definiton from DSA header to
Ethernet header and adding DSA header including in c files using DSA
definition.
Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>