Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add ad3530r driver #2680

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
88 changes: 88 additions & 0 deletions Documentation/devicetree/bindings/iio/dac/adi,ad3530r.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/iio/dac/adi,ad3530r.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Analog Devices AD3530R DAC

maintainers:
- Kim Seer Paller <[email protected]>

description: |
The AD3530R/AD3530 are low power, 8-channel, 16-bit, buffered voltage output,
DACs that include a 2.5 V internal reference (disabled by default), and a
gain bit field, resulting in a full-scale output span of 2.5 V (gain
= 1) or 5 V (gain = 2) for a reference voltage of 2.5 V.

properties:
compatible:
enum:
- adi,ad3530r

reg:
maxItems: 1

spi-max-frequency:
maximum: 50000000

vcc-supply:
description: Analog Supply Voltage Input.

ref-supply:
description:
Reference Input/Output. The voltage at the REF pin sets the full-scale
range of all channels. If not provided the internal reference is used and
also provided on the VREF pin.

reset-gpios:
description:
Active low signal that is falling edge sensitive. When it is deasserted,
the digital core initialization is performed and all DAC registers except
the Interface Configuration A register are reset to their default values.
maxItems: 1

ldac-gpios:
description:
LDAC pin to be used as a hardware trigger to update the DAC channels. If
not present, the DAC channels are updated by Software LDAC.
maxItems: 1

adi,double-output-range:
description:
Configure the output range for all channels. If the property is present,
the output will range from 0V to 2Vref. If the property is not
present, the output will range from 0V to Vref.
type: boolean

'#address-cells':
const: 1

'#size-cells':
const: 0

required:
- compatible
- reg
- spi-max-frequency

allOf:
- $ref: /schemas/spi/spi-peripheral-props.yaml#

additionalProperties: false

examples:
- |
spi {
#address-cells = <1>;
#size-cells = <0>;
dac@0 {
compatible = "adi,ad3530r";
reg = <0>;
spi-max-frequency = <1000000>;

vcc-supply = <&vcc>;
ldac-gpios = <&gpio 17 0>;
};
};
...
8 changes: 8 additions & 0 deletions MAINTAINERS
Original file line number Diff line number Diff line change
Expand Up @@ -1168,6 +1168,14 @@ T: git git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net.git
T: git git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next.git
F: drivers/net/amt.c

ANALOG DEVICES INC AD3530R DRIVER
M: Kim Seer Paller <[email protected]>
L: [email protected]
S: Supported
W: https://ez.analog.com/linux-software-drivers
F: Documentation/devicetree/bindings/iio/dac/adi,ad3530r.yaml
F: drivers/iio/dac/ad3530r.c

ANALOG DEVICES INC AD3552R DRIVER
M: Nuno Sá <[email protected]>
L: [email protected]
Expand Down
1 change: 1 addition & 0 deletions drivers/iio/Kconfig.adi
Original file line number Diff line number Diff line change
Expand Up @@ -206,4 +206,5 @@ config IIO_ALL_ADI_DRIVERS
imply LTC2664
imply AD8460
imply MAX77541_ADC
imply AD3530R

10 changes: 10 additions & 0 deletions drivers/iio/dac/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,16 @@

menu "Digital to analog converters"

config AD3530R
tristate "Analog Devices AD3530R DAC driver"
depends on SPI_MASTER
help
Say yes here to build support for Analog Devices AD3530R
Digital to Analog Converter.

To compile this driver as a module, choose M here: the
module will be called ad3530r.

config AD3552R
tristate "Analog Devices AD3552R DAC driver"
depends on SPI_MASTER
Expand Down
1 change: 1 addition & 0 deletions drivers/iio/dac/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
#

# When adding new entries keep the list in alphabetical order
obj-$(CONFIG_AD3530R) += ad3530r.o
obj-$(CONFIG_AD3552R) += ad3552r.o
obj-$(CONFIG_AD5270) += ad5270.o
obj-$(CONFIG_AD5360) += ad5360.o
Expand Down
Loading
Loading