Skip to contentSkip to conversation

staging: iio: ad9832: add devicetree documentation

PATCH In review Marcelo Schmitt 2 participants 3 messages Apr 1, 2019 – Apr 2, 2019

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 4/4 staging: iio: ad9832: add devicetree documentation

Add a devicetree documentation for the ad9832 direct digital synthesizer, waveform generator.

---
 .../bindings/iio/frequency/ad9832.txt         | 26 +++++++++++++++++++
 1 file changed, 26 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/iio/frequency/ad9832.txt
Documentation/devicetree/bindings/iio/frequency/ad9832.txt new file +26 -0
new file mode 100644
index 000000000000..6a35fdff5a48
@@ -0,0 +1,26 @@
+Analog Devices AD9832 Direct Digital Synthesizer, Waveform Generator
+
+Data sheet:
+https://www.analog.com/media/en/technical-documentation/data-sheets/AD9832.pdf
+
+Required properties:
+	- compatible : Must be "adi,ad9832"
+	- reg : SPI chip select number for the device
+	- spi-max-frequency = Max SPI frequency to use (< 25000000)
+	- clocks : The clock reference for the DDS output
+	- clock-names : Must be "mclk"
+
+Optional properties:
+	- avdd-supply:  Definition of the regulator used as analog supply
+	- dvdd-supply : Definition of the regulator used as digital supply
+
+Example:
+	adi9832-dds@0 {
+		compatible = "adi,ad9832";
+		reg = <0>;
+		spi-max-frequency = <25000000>;
+		clocks = <&ad9832_mclk>;
+		clock-names = "mclk";
+		avdd-suppy = <&avdd>;
+		dvdd-suppy = <&dvdd>;
+	};
Signature · 1 line
2.20.1
#1 lore raw
Quoted 17 lines · Marcelo Schmitt

Add a devicetree documentation for the ad9832 direct digital synthesizer, waveform generator.

---
 .../bindings/iio/frequency/ad9832.txt         | 26 +++++++++++++++++++
 1 file changed, 26 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/iio/frequency/ad9832.txt
Documentation/devicetree/bindings/iio/frequency/ad9832.txt new file +1 -0
new file mode 100644
index 000000000000..6a35fdff5a48
@@ -0,0 +1,26 @@
+Analog Devices AD9832 Direct Digital Synthesizer, Waveform Generator

Documentation/devicetree/bindings/iio/frequency/ad9832.txt line 11

Quoted 10 lines
Documentation/devicetree/bindings/iio/frequency/ad9832.txt new file +10 -0
+
+Data sheet:
+https://www.analog.com/media/en/technical-documentation/data-sheets/AD9832.pdf
+
+Required properties:
+       - compatible : Must be "adi,ad9832"
+       - reg : SPI chip select number for the device
+       - spi-max-frequency = Max SPI frequency to use (< 25000000)
+       - clocks : The clock reference for the DDS output
+       - clock-names : Must be "mclk"

It's always a good idea to reference other base dt docs. For SPI you could:

```
For more information on SPI properties, please consult
     Documentation/devicetree/bindings/spi/spi-bus.txt
```

For clock:

```
For more information on clock bindings properties, please consult
     Documentation/devicetree/bindings/clock/clock-bindings.txt
```

For regulator:

```
For more information on regulator bindings properties, please consult
     Documentation/devicetree/bindings/regulator/regulator.txt
```
Quoted 18 lines
Documentation/devicetree/bindings/iio/frequency/ad9832.txt new file +15 -1
+
+Optional properties:
+       - avdd-supply:  Definition of the regulator used as analog supply
+       - dvdd-supply : Definition of the regulator used as digital supply
+
+Example:
+       adi9832-dds@0 {
+               compatible = "adi,ad9832";
+               reg = <0>;
+               spi-max-frequency = <25000000>;
+               clocks = <&ad9832_mclk>;
+               clock-names = "mclk";
+               avdd-suppy = <&avdd>;
+               dvdd-suppy = <&dvdd>;
+       };
--

2.20.1

#2 lore raw
Quoted 44 lines · Alexandru Ardelean
Quoted 17 lines · Marcelo Schmitt

Add a devicetree documentation for the ad9832 direct digital synthesizer, waveform generator.

---
 .../bindings/iio/frequency/ad9832.txt         | 26 +++++++++++++++++++
 1 file changed, 26 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/iio/frequency/ad9832.txt
Documentation/devicetree/bindings/iio/frequency/ad9832.txt new file +1 -0
new file mode 100644
index 000000000000..6a35fdff5a48
@@ -0,0 +1,26 @@
+Analog Devices AD9832 Direct Digital Synthesizer, Waveform Generator

Documentation/devicetree/bindings/iio/frequency/ad9832.txt line 11

Quoted 10 lines
Documentation/devicetree/bindings/iio/frequency/ad9832.txt new file +10 -0
+
+Data sheet:
+https://www.analog.com/media/en/technical-documentation/data-sheets/AD9832.pdf
+
+Required properties:
+       - compatible : Must be "adi,ad9832"
+       - reg : SPI chip select number for the device
+       - spi-max-frequency = Max SPI frequency to use (< 25000000)
+       - clocks : The clock reference for the DDS output
+       - clock-names : Must be "mclk"

It's always a good idea to reference other base dt docs. For SPI you could:

```
For more information on SPI properties, please consult
     Documentation/devicetree/bindings/spi/spi-bus.txt
```

For clock:

```
For more information on clock bindings properties, please consult
     Documentation/devicetree/bindings/clock/clock-bindings.txt
```
Quoted 5 lines

For regulator:

```
For more information on regulator bindings properties, please consult
     Documentation/devicetree/bindings/regulator/regulator.txt
```

Thanks for the advice. I'll have a look at them.

Quoted 19 lines
Quoted 19 lines
Documentation/devicetree/bindings/iio/frequency/ad9832.txt new file +15 -1
+
+Optional properties:
+       - avdd-supply:  Definition of the regulator used as analog supply
+       - dvdd-supply : Definition of the regulator used as digital supply
+
+Example:
+       adi9832-dds@0 {
+               compatible = "adi,ad9832";
+               reg = <0>;
+               spi-max-frequency = <25000000>;
+               clocks = <&ad9832_mclk>;
+               clock-names = "mclk";
+               avdd-suppy = <&avdd>;
+               dvdd-suppy = <&dvdd>;
+       };
--

2.20.1