Purpose is to add ad3552r AXI DAC (fpga-based) support. The "ad3552r" AXI IP, a variant of the generic "DAC" AXI IP, has been created to reach the maximum speed (33MUPS) supported from the ad3552r. To obtain the maximum transfer rate, the custom module has been implemented with a QSPI interface with DDR mode. The design is actually using the DAC backend since the register map is the same of the generic DAC IP, except for some customized bitfields. For this reason, a new "compatible" has been added in adi-axi-dac.c. Also, backend has been extended with all the needed functions for this use case, keeping the names gneric. The following patch is actually applying to linux-iio/testing. --- Changes in v2: - use unsigned int on bus_reg_read/write - add a compatible in axi-dac backend for the ad3552r DAC IP - minor code alignment fixes - fix a return value not checked - change devicetree structure setting ad3552r-axi as a backend subnode - add synchronous_mode_available in the ABI doc Changes in v3: - changing AXI backend approach using a dac ip compatible - fdt bindings updates accordingly - fdt, ad3552r device must be a subnode of the backend - allow probe of child devices - passing QSPI bus access function by platform data - move synchronous mode as a fdt parameter - reorganizing defines in proper patches - fix make dt_binding_check errors - fix ad3552r maximum SPI speed - fix samplerate calulcation - minor code style fixes Signed-off-by: Angelo Dureghello <adureghello@xxxxxxxxxxxx> --- Angelo Dureghello (10): iio: backend: adi-axi-dac: fix wrong register bitfield dt-bindings: iio: dac: axi-dac: add ad3552r axi variant dt-bindings: iio: dac: ad3552r: fix maximum spi speed dt-bindings: iio: dac: ad3552r: add io-backend support iio: backend: extend features iio: backend: adi-axi-dac: extend features iio: dac: ad3552r: changes to use FIELD_PREP iio: dac: ad3552r: extract common code (no changes in behavior intended) iio: dac: ad3552r: add axi platform driver iio: backend: adi-axi-dac: add registering of child fdt node .../devicetree/bindings/iio/dac/adi,ad3552r.yaml | 44 +- .../devicetree/bindings/iio/dac/adi,axi-dac.yaml | 40 +- drivers/iio/dac/Kconfig | 11 + drivers/iio/dac/Makefile | 3 +- drivers/iio/dac/ad3552r-axi.c | 567 +++++++++++++++++++++ drivers/iio/dac/ad3552r-common.c | 173 +++++++ drivers/iio/dac/ad3552r.c | 451 +++------------- drivers/iio/dac/ad3552r.h | 199 ++++++++ drivers/iio/dac/adi-axi-dac.c | 328 +++++++++++- drivers/iio/industrialio-backend.c | 111 ++++ include/linux/iio/backend.h | 23 + include/linux/platform_data/ad3552r-axi.h | 18 + 12 files changed, 1572 insertions(+), 396 deletions(-) --- base-commit: 4ff29e5af68e081473240420d5ba8fe1c410239f change-id: 20240919-wip-bl-ad3552r-axi-v0-iio-testing-79937010e1cf Best regards, -- o/ QW5nZWxvIER1cmVnaGVsbG8= www.kernel-space.org e: angelo at kernel-space.org c: +39 388 8550663