ASoC: adau1977: convert text binding to yaml format

This change converts the old device-tree binding for ADAU1977 from text
format to the new yaml format.

Signed-off-by: Alexandru Ardelean <alexandru.ardelean@analog.com>
Reviewed-by: Rob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/20201110084754.46756-1-alexandru.ardelean@analog.com
Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
Alexandru Ardelean 2020-11-10 10:47:54 +02:00 committed by Mark Brown
parent 4fb87241e5
commit f077770b26
No known key found for this signature in database
GPG Key ID: 24D68B725D5487D0
2 changed files with 92 additions and 61 deletions

View File

@ -1,61 +0,0 @@
Analog Devices ADAU1977/ADAU1978/ADAU1979
Datasheets:
https://www.analog.com/media/en/technical-documentation/data-sheets/ADAU1977.pdf
https://www.analog.com/media/en/technical-documentation/data-sheets/ADAU1978.pdf
https://www.analog.com/media/en/technical-documentation/data-sheets/ADAU1979.pdf
This driver supports both the I2C and SPI bus.
Required properties:
- compatible: Should contain one of the following:
"adi,adau1977"
"adi,adau1978"
"adi,adau1979"
- AVDD-supply: analog power supply for the device, please consult
Documentation/devicetree/bindings/regulator/regulator.txt
Optional properties:
- reset-gpios: the reset pin for the chip, for more details consult
Documentation/devicetree/bindings/gpio/gpio.txt
- DVDD-supply: supply voltage for the digital core, please consult
Documentation/devicetree/bindings/regulator/regulator.txt
- adi,micbias: configures the voltage setting for the MICBIAS pin.
Select 0/1/2/3/4/5/6/7/8 to specify MICBIAS voltage
5V/5.5V/6V/6.5V/7V/7.5V/8V/8.5V/9V
If not specified the default value will be "7" meaning 8.5 Volts.
This property is only valid for the ADAU1977
For required properties on SPI, please consult
Documentation/devicetree/bindings/spi/spi-bus.txt
Required properties on I2C:
- reg: The i2c address. Value depends on the state of ADDR0
and ADDR1, as wired in hardware.
Examples:
adau1977_spi: adau1977@0 {
compatible = "adi,adau1977";
spi-max-frequency = <600000>;
AVDD-supply = <&regulator>;
DVDD-supply = <&regulator_digital>;
adi,micbias = <3>;
reset-gpios = <&gpio 10 GPIO_ACTIVE_LOW>;
};
adau1977_i2c: adau1977@11 {
compatible = "adi,adau1977";
reg = <0x11>;
AVDD-supply = <&regulator>;
DVDD-supply = <&regulator_digital>;
reset-gpios = <&gpio 10 GPIO_ACTIVE_LOW>;
};

View File

@ -0,0 +1,92 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/sound/adi,adau1977.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Analog Devices ADAU1977/ADAU1978/ADAU1979 Quad ADC with Diagnostics
maintainers:
- Lars-Peter Clausen <lars@metafoo.de>
- Bogdan Togorean <bogdan.togorean@analog.com>
description: |
Analog Devices ADAU1977 and similar quad ADC with Diagnostics
https://www.analog.com/media/en/technical-documentation/data-sheets/ADAU1977.pdf
https://www.analog.com/media/en/technical-documentation/data-sheets/ADAU1978.pdf
https://www.analog.com/media/en/technical-documentation/data-sheets/ADAU1979.pdf
properties:
compatible:
enum:
- adi,adau1977
- adi,adau1978
- adi,adau1979
reg:
maxItems: 1
"#sound-dai-cells":
const: 0
reset-gpios:
maxItems: 1
spi-max-frequency: true
AVDD-supply:
description: Analog power support for the device.
DVDD-supply:
description: Supply voltage for digital core.
adi,micbias:
description: |
Configures the voltage setting for the MICBIAS pin.
$ref: /schemas/types.yaml#/definitions/uint32
enum: [0, 1, 2, 3, 4, 5, 6, 7, 8]
default: 7
required:
- reg
- compatible
- AVDD-supply
additionalProperties: false
examples:
- |
#include <dt-bindings/gpio/gpio.h>
spi {
#address-cells = <1>;
#size-cells = <0>;
adau1977_spi: adau1977@0 {
compatible = "adi,adau1977";
reg = <0>;
spi-max-frequency = <600000>;
AVDD-supply = <&regulator>;
DVDD-supply = <&regulator_digital>;
reset-gpios = <&gpio 10 GPIO_ACTIVE_LOW>;
adi,micbias = <3>;
};
};
- |
#include <dt-bindings/gpio/gpio.h>
i2c {
#address-cells = <1>;
#size-cells = <0>;
adau1977_i2c: adau1977@11 {
compatible = "adi,adau1977";
reg = <0x11>;
AVDD-supply = <&regulator>;
DVDD-supply = <&regulator_digital>;
reset-gpios = <&gpio 10 GPIO_ACTIVE_LOW>;
};
};