Path: blob/master/Documentation/devicetree/bindings/iio/resolver/adi,ad2s1210.yaml
26309 views
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)1%YAML 1.22---3$id: http://devicetree.org/schemas/iio/resolver/adi,ad2s1210.yaml#4$schema: http://devicetree.org/meta-schemas/core.yaml#56title: Analog Devices AD2S1210 Resolver-to-Digital Converter78maintainers:9- Michael Hennerich <michael.hennerich@analog.com>1011description: |12The AD2S1210 is a complete 10-bit to 16-bit resolution tracking13resolver-to-digital converter, integrating an on-board programmable14sinusoidal oscillator that provides sine wave excitation for15resolvers.1617The AD2S1210 allows the user to read the angular position or the18angular velocity data directly from the parallel outputs or through19the serial interface.2021The mode of operation of the communication channel (parallel or serial) is22selected by the A0 and A1 input pins. In normal mode, data is latched by23toggling the SAMPLE line and can then be read directly. In configuration mode,24data is read or written using a register access scheme (address byte with25read/write flag and data byte).2627A1 A0 Result280 0 Normal mode - position output290 1 Normal mode - velocity output301 0 Reserved311 1 Configuration mode3233In normal mode, the resolution of the digital output is selected using34the RES0 and RES1 input pins. In configuration mode, the resolution is35selected by setting the RES0 and RES1 bits in the control register.3637RES1 RES0 Resolution (Bits)380 0 10390 1 12401 0 14411 1 164243Note on SPI connections: The CS line on the AD2S1210 should hard-wired to44logic low and the WR/FSYNC line on the AD2S1210 should be connected to the45SPI CSn output of the SPI controller.4647Datasheet:48https://www.analog.com/media/en/technical-documentation/data-sheets/ad2s1210.pdf4950properties:51compatible:52const: adi,ad2s12105354reg:55maxItems: 15657spi-max-frequency:58maximum: 250000005960spi-cpha: true6162avdd-supply:63description:64A 4.75 to 5.25 V regulator that powers the Analog Supply Voltage (AVDD)65pin.6667dvdd-supply:68description:69A 4.75 to 5.25 V regulator that powers the Digital Supply Voltage (DVDD)70pin.7172vdrive-supply:73description:74A 2.3 to 5.25 V regulator that powers the Logic Power Supply Input75(VDrive) pin.7677clocks:78maxItems: 179description: External oscillator clock (CLKIN).8081reset-gpios:82description:83GPIO connected to the /RESET pin. As the line needs to be low for the84reset to be active, it should be configured as GPIO_ACTIVE_LOW.85maxItems: 18687sample-gpios:88description:89GPIO connected to the /SAMPLE pin. As the line needs to be low to trigger90a sample, it should be configured as GPIO_ACTIVE_LOW.91maxItems: 19293mode-gpios:94description:95GPIO lines connected to the A0 and A1 pins. These pins select the data96transfer mode.97minItems: 298maxItems: 299100resolution-gpios:101description:102GPIO lines connected to the RES0 and RES1 pins. These pins select the103resolution of the digital output. If omitted, it is assumed that the104RES0 and RES1 pins are hard-wired to match the assigned-resolution-bits105property.106minItems: 2107maxItems: 2108109fault-gpios:110description:111GPIO lines connected to the LOT and DOS pins. These pins combined indicate112the type of fault present, if any. As these pins a pulled low to indicate113a fault condition, they should be configured as GPIO_ACTIVE_LOW.114minItems: 2115maxItems: 2116117adi,fixed-mode:118description:119This is used to indicate the selected mode if A0 and A1 are hard-wired120instead of connected to GPIOS (i.e. mode-gpios is omitted).121$ref: /schemas/types.yaml#/definitions/string122enum: [config, velocity, position]123124assigned-resolution-bits:125description:126Resolution of the digital output required by the application. This127determines the precision of the angle and/or the maximum speed that can128be measured. If resolution-gpios is omitted, it is assumed that RES0 and129RES1 are hard-wired to match this value.130enum: [10, 12, 14, 16]131132required:133- compatible134- reg135- spi-cpha136- avdd-supply137- dvdd-supply138- vdrive-supply139- clocks140- sample-gpios141- assigned-resolution-bits142143oneOf:144- required:145- mode-gpios146- required:147- adi,fixed-mode148149allOf:150- $ref: /schemas/spi/spi-peripheral-props.yaml#151152unevaluatedProperties: false153154examples:155- |156#include <dt-bindings/gpio/gpio.h>157158spi {159#address-cells = <1>;160#size-cells = <0>;161162resolver@0 {163compatible = "adi,ad2s1210";164reg = <0>;165spi-max-frequency = <20000000>;166spi-cpha;167avdd-supply = <&avdd_regulator>;168dvdd-supply = <&dvdd_regulator>;169vdrive-supply = <&vdrive_regulator>;170clocks = <&ext_osc>;171sample-gpios = <&gpio0 90 GPIO_ACTIVE_LOW>;172mode-gpios = <&gpio0 86 0>, <&gpio0 87 0>;173resolution-gpios = <&gpio0 88 0>, <&gpio0 89 0>;174assigned-resolution-bits = <16>;175};176};177178179