Use controller/peripheral and SDO/SDI terminology in the remaining
SPI-using drivers (audio, auxdisplay, bluetooth HCI, dac, eeprom,
ethernet, flash, fpga, gpio, haptics, hdlc_rcp_if, ieee802154,
input, led, led_strip, lora, mfd, misc, mux, rtc, sdhc, stepper,
video, watchdog, wifi) and the ec_host_cmd SPI STM32 backend,
following coding guideline rule A.2: switch to
SPI_OP_MODE_CONTROLLER/PERIPHERAL and SPI_SDO_OVERRUN_DT, rename
Zephyr-owned identifiers (the HCI SPI header buffers, the winc1500
bus wrapper transfer parameters), and update comments, log messages
and Kconfig help prose.
Vendor and out-of-scope identifiers keep their names: STM32
LL_SPI_MODE_SLAVE in the ec_host_cmd backend, the ATWINC1500 SDK I2C
SLAVE_ADDRESS definition, and the I2S codec clock-role variable in
tlv320aic26.
Assisted-by: Claude:fable-5
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Two-line copyright notices were wrapped in the SPDX "<text>...</text>"
construct, which is only valid in an SPDX document, not a file header.
The REUSE tool then folds the literal "<text>" into the holder name
and drops the second line from the SBOM.
Remove the markers and tag the continuation line. Holder, year and
e-mail are left unchanged; only the syntax is fixed.
Signed-off-by: Parthiban Nallathambi <parthiban@linumiz.com>
Add a DAC driver for the 10-bit, 30Msps DAC inside the PSC3 series'
HPPASS CSG. Each instance represents a single DAC inside a CSG slice.
This driver implements the Zephyr DAC API in direct-write only mode (no
LUT or slope generation). The driver handles DAC configuration and
output settings, as well as interrupt handling for the DAC interrupt.
The driver provides for deglitch properties (see TRM reference for
details) and sets an (optional) initial value for the DAC output.
Assisted-by: Github Copilot:claude-opus-4.7
Signed-off-by: John Batch <john.batch@infineon.com>
The init sanity check on the DAC_RES status field logged an error but
returned ret, which the preceding successful status read had set to
0, so a failed identity check still reported successful init. Return
-EIO.
Assisted-by: Claude:fable-5
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
The syscall handler functions forward parameters with identical casts
that are redundant since the variables already have those types. Drop
the casts to let the compiler type-check the arguments unobstructed.
Signed-off-by: Flavio Ceolin <flavio@hubble.com>
Enable the following G1 DAC Kconfig options by default for
Microchip SAM D5x/E5x devices:
- DAC_MCHP_G1_REFRESH
- DAC_MCHP_G1_EXTERNAL_FILTER
- DAC_MCHP_G1_OVERSAMPLING_RATIO
These Kconfig symbols were introduced during the addition
of DAC driver support for PIC32CX SG family devices, but
the default enablement for SAM D5x/E5x devices was missed.
Signed-off-by: Arunprasath P <arunprasath.p@microchip.com>
The DACC_MR_ONE bit has to be set to one in the DAC driver
but it only applies to SAM4S and SAM4E.
SAM3S and SAM3X, SAM3A do on have this bit.
Signed-off-by: Eve Redero <eve.redero@gmail.com>
Implement a common function to validate a DAC channel ID (and translate
it to an "index" value, ultimately used to obtain the LL channel value).
Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
The number of channels supported by an instance is a fixed value so it
can be saved in the instance configuration instead of the instance data.
Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
Update AD5529R_PRODUCT_ID from 0x4140 to 0x414A to match the
released datasheet (Rev. 0) PRODUCT_ID_L register reset value.
Signed-off-by: Radu Ciobanu <Radu-rares.Ciobanu@analog.com>
Use min/max DT properties for ADC nchannels DT properties to factorize
documentation and build time check of the property values against its
valid range.
Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
Corrected PSE84 autanalog DAC index calculation. The DAC index is
contiguous and starts from dac0 instance. The previous implementation
was depending on the DT_NODE_CHILD_IDX, which returns the position
among all autanalog siblings (CTB, PTC, DAC, SAR, PRB). Therefore
it was returning an incorrect DAC index.
Signed-off-by: Richard Mc Sweeney <Richard.McSweeney@infineon.com>
The TI DAC43608 has 8 bit resolution, the DAC53608 has 10 bit
resolution. According to the datasheet from Texax Instruments,
the MSB of DACn_DATA must be left aligned.
This fix aligns the data correctly, allowing the DAC value to
be set to 100% and not only 25% max for the DAC43608.
Signed-off-by: Stephan Gatzka <stephan.gatzka@gmail.com>
Added autonomous analog CTDAC for PSE84 device.
This implementation uses the autonomous controller (MFD)
that is shared with other autanalog drivers.
The CTDAC stands for Continuous Time DAC. It is a programmable DAC
residing inside the autonomous (aut) analog subsystem. It is
controlled using the autonomous controller (AC), which is a
programmable state machine. The AC is shared across all autonomous
analog peripherals including the SAR, PRB, PTComp, CTB, and CTDAC.
The DAC output can either be software controlled or be driven
through the AC hardware by loading through an internal LUT memory.
AC MFD references the DAC configuration, and brings together all
other autanalog peripherals into a single AC setup for the application.
Assisted-by: Claude:claude-opus-4.6
Signed-off-by: Richard Mc Sweeney <Richard.McSweeney@infineon.com>
Select the internal 4.096V reference during init. The REF_SEL register
defaults to external, causing 0V output when no external reference is
connected.
Signed-off-by: Radu Ciobanu <Radu-rares.Ciobanu@analog.com>
Add DAC driver for the Analog Devices AD5529R 16-channel, 16-bit
voltage output DAC. The driver supports multiple output voltage
ranges, SPI communication, and optional reset/LDAC/clear GPIOs.
Signed-off-by: Robert Budai <robert.budai@analog.com>
Co-authored-by: Radu Ciobanu <raduciobanu096@gmail.com>
Add support for the DAC module on TI’s MSPM0 G-Series MCUs. The DAC
supports 8-bit and 12-bit resolution.
Signed-off-by: Santhosh Charles <santhosh@linumiz.com>
For use in tests where the existing "vnd,dac" driver doesn't work as it
returns error codes for all API functions. The approach is mimicked from
the adc-emul driver.
Signed-off-by: Henrik Lindblom <henrik.lindblom@vaisala.com>
Adapt all Espressif SoC and driver code to the updated
hal_espressif module synced with IDF master branch.
Main changes:
- clock control: delegate peripheral clock gating to HAL
layer using new clock/reset APIs
- SPI/GDMA: adapt to restructured DMA HAL with new channel
allocation and configuration interfaces
- ethernet: add RMII clock configuration and PHY management
- GPIO: simplify using direct HAL function calls
- flash: adapt to updated SPI flash HAL interfaces
- linker scripts: update IRAM/DRAM mappings for new HAL
object files
- DTS: fix ESP32-S2 PSRAM dcache1 address to match actual
MMU mapping region (0x3f800000 DRAM1 instead of 0x3f500000
DPORT which lacks 8-bit access capability)
- west.yml: update hal_espressif revision
Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
Add shared code in 'dac_dacx311.c' and configuration files.
Support power mode bits via configuration.
Signed-off-by: Andreas Wolf <awolf002@gmail.com>
If the clock device (i.e., RCC) failed to initialize, we have bigger
problems than trying to call clock_control_{off,on,configure} on it.
Don't bother checking to save some footprint.
Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
Most drivers for Series 2 depend on clock control, but didn't
declare it. Enable clock control by default for Series 2 SoCs.
Signed-off-by: Aksel Skauge Mellbye <aksel.mellbye@silabs.com>
Use the "zephyr-keep-sorted-start/stop" comment to have CI check
the alphabetical order of includes, to help reducing the chance
of conflicts while contributing drivers.
Signed-off-by: Josuah Demangeon <me@josuah.net>
Use STM32_CLOCK_INFO(), STM32_DT_INST_CLOCK_INFO(),
STM32_CLOCK_INFO_BY_NAME() and STM32_DT_INST_CLOCK_INFO_BY_NAME()
helper macros in STM32 drivers.
Using these macros ensure the clock division factor is properly
populated according to DT information. Prior these changes some
drivers only got the bus and bits position information and missed
the clock division information which is fine only when this division
factor information is 0.
Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
The Analog Device AD5601, AD5611, and AD5621 devices are 8, 10 and 12
bits DAC respectively.
These devices use a 16 bits SPI communication protocol.
The 2 first bit encode the low power mode (this driver do not use the
low power mode, it always run in the 'normal' mode).
The next 14 bits contain the left aligned value. The 2, 4, or 6
remaining bits (depending on the resolution) are set to 0.
Signed-off-by: Mickael Bosch <mickael.bosch@linux.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 support for selecting channels A, B, both together, and all channels
on the AD5686 DAC driver. This improves flexibility for multi-channel
DAC applications.
Signed-off-by: Aditya Ganesh <adga5133@colorado.edu>
This implements the DAC driver for silabs VDAC peripherals
using the silabs,vdac compatible binding.
Signed-off-by: Bastien Beauchamp <bastien.beauchamp@silabs.com>
Added driver and binding file for samd5x dac peripheral, the already
implemented dac_sam0.c lacks the configuration registers for this
microcontroller family and is fixed to only have one dac channel output,
also, the code gets too bulky when adding the samd5x dac configuration
using preprocessor directives that’s why I moved the implementation to its
own file.
Added dac to the supported list of same54_xpro.yaml, fixed Kconfig.samd5x
help spacing, added board defines to test_dac.c and test it out with
twister script on board.
Signed-off-by: Rafael Aldo Hernández Luna <aldo.hernandez@daikincomfort.com>
Change license owner to Prevas due to initially wrong owner due to company
mix-up during co-development.
Signed-off-by: Jeppe Odgaard <jeppe.odgaard@prevas.dk>
Fix channel ID check in dac_esp32_channel_setup as it was allowing to
set up a channel with ID greater than the number of channels.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Initial DAC driver for TI DAC161S997. This is a 1 channel 16 bit
DAC designed for 4-20 mA loops.
Signed-off-by: Jeppe Odgaard <jeppe.odgaard@prevas.dk>