[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20231213090910.25410-1-mike.looijmans@topic.nl>
Date: Wed, 13 Dec 2023 10:09:09 +0100
From: Mike Looijmans <mike.looijmans@...ic.nl>
To: devicetree@...r.kernel.org, linux-iio@...r.kernel.org
CC: Mike Looijmans <mike.looijmans@...ic.nl>,
Conor Dooley <conor+dt@...nel.org>,
Jonathan Cameron <jic23@...nel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>,
Lars-Peter Clausen <lars@...afoo.de>,
Rob Herring <robh+dt@...nel.org>, linux-kernel@...r.kernel.org
Subject: [PATCH 1/2] dt-bindings: iio: spi-dac: Add driver for SPI shift register DACs
Add a driver for generic serial shift register DACs like TI DAC714.
Signed-off-by: Mike Looijmans <mike.looijmans@...ic.nl>
---
.../devicetree/bindings/iio/dac/spidac.yaml | 69 +++++++++++++++++++
1 file changed, 69 insertions(+)
create mode 100644 Documentation/devicetree/bindings/iio/dac/spidac.yaml
diff --git a/Documentation/devicetree/bindings/iio/dac/spidac.yaml b/Documentation/devicetree/bindings/iio/dac/spidac.yaml
new file mode 100644
index 000000000000..be98da728594
--- /dev/null
+++ b/Documentation/devicetree/bindings/iio/dac/spidac.yaml
@@ -0,0 +1,69 @@
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/iio/dac/spidac.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Generic "shift register" SPI DAC
+
+description:
+ Supports simple SPI "shift register" DACs, like TI's DAC714. These DACs have
+ no control registers or commands, they just use a clock and serial data to
+ shift in a raw DAC value. Multiple DACs can be daisy-chained together.
+
+maintainers:
+ - Mike Looijmans <mike.looijmans@...ic.nl>
+
+properties:
+ compatible:
+ enum:
+ - spi-dac
+ - ti,dac714
+
+ reg:
+ maxItems: 1
+
+ ldac-gpios:
+ description:
+ LDAC pin to be used as a hardware trigger to update the DAC outputs. Not
+ needed when the DACs use the chip select to update their output.
+ maxItems: 1
+
+ reset-gpios:
+ description:
+ Optional reset pin that resets all DACs.
+ maxItems: 1
+
+ num-channels:
+ description:
+ Number of channels (usually the number of DAC chips in series)
+ $ref: /schemas/types.yaml#/definitions/uint32
+
+ bits-per-channel:
+ description:
+ Number of bits for each DAC output.
+ $ref: /schemas/types.yaml#/definitions/uint32
+
+required:
+ - compatible
+ - reg
+
+allOf:
+ - $ref: /schemas/spi/spi-peripheral-props.yaml#
+
+unevaluatedProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/gpio/gpio.h>
+ spi {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ dac@1 {
+ compatible = "spidac";
+ reg = <0x1>;
+ ldac-gpios = <&gpio 42 GPIO_ACTIVE_LOW>;
+ };
+ };
+...
--
2.34.1
Met vriendelijke groet / kind regards,
Mike Looijmans
System Expert
TOPIC Embedded Products B.V.
Materiaalweg 4, 5681 RJ Best
The Netherlands
T: +31 (0) 499 33 69 69
E: mike.looijmans@...ic.nl
W: www.topic.nl
Please consider the environment before printing this e-mail
Powered by blists - more mailing lists