xref: /OK3568_Linux_fs/kernel/Documentation/devicetree/bindings/iio/imu/adi,adis16480.txt (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593Smuzhiyun
2*4882a593SmuzhiyunAnalog Devices ADIS16480 and similar IMUs
3*4882a593Smuzhiyun
4*4882a593SmuzhiyunRequired properties for the ADIS16480:
5*4882a593Smuzhiyun
6*4882a593Smuzhiyun- compatible: Must be one of
7*4882a593Smuzhiyun	* "adi,adis16375"
8*4882a593Smuzhiyun	* "adi,adis16480"
9*4882a593Smuzhiyun	* "adi,adis16485"
10*4882a593Smuzhiyun	* "adi,adis16488"
11*4882a593Smuzhiyun	* "adi,adis16490"
12*4882a593Smuzhiyun	* "adi,adis16495-1"
13*4882a593Smuzhiyun	* "adi,adis16495-2"
14*4882a593Smuzhiyun	* "adi,adis16495-3"
15*4882a593Smuzhiyun	* "adi,adis16497-1"
16*4882a593Smuzhiyun	* "adi,adis16497-2"
17*4882a593Smuzhiyun	* "adi,adis16497-3"
18*4882a593Smuzhiyun- reg: SPI chip select number for the device
19*4882a593Smuzhiyun- spi-max-frequency: Max SPI frequency to use
20*4882a593Smuzhiyun	see: Documentation/devicetree/bindings/spi/spi-bus.txt
21*4882a593Smuzhiyun- spi-cpha: See Documentation/devicetree/bindings/spi/spi-bus.txt
22*4882a593Smuzhiyun- spi-cpol: See Documentation/devicetree/bindings/spi/spi-bus.txt
23*4882a593Smuzhiyun- interrupts: interrupt mapping for IRQ, accepted values are:
24*4882a593Smuzhiyun	* IRQF_TRIGGER_RISING
25*4882a593Smuzhiyun	* IRQF_TRIGGER_FALLING
26*4882a593Smuzhiyun
27*4882a593SmuzhiyunOptional properties:
28*4882a593Smuzhiyun
29*4882a593Smuzhiyun- interrupt-names: Data ready line selection. Valid values are:
30*4882a593Smuzhiyun	* DIO1
31*4882a593Smuzhiyun	* DIO2
32*4882a593Smuzhiyun	* DIO3
33*4882a593Smuzhiyun	* DIO4
34*4882a593Smuzhiyun	If this field is left empty, DIO1 is assigned as default data ready
35*4882a593Smuzhiyun	signal.
36*4882a593Smuzhiyun- reset-gpios: must be the device tree identifier of the RESET pin. As the line
37*4882a593Smuzhiyun	is active low, it should be marked GPIO_ACTIVE_LOW.
38*4882a593Smuzhiyun- clocks: phandle to the external clock. Should be set according to
39*4882a593Smuzhiyun	"clock-names".
40*4882a593Smuzhiyun	If this field is left empty together with the "clock-names" field, then
41*4882a593Smuzhiyun	the internal clock is used.
42*4882a593Smuzhiyun- clock-names: The name of the external clock to be used. Valid values are:
43*4882a593Smuzhiyun	* sync: In sync mode, the internal clock is disabled and the frequency
44*4882a593Smuzhiyun		of the external clock signal establishes therate of data
45*4882a593Smuzhiyun		collection and processing. See Fig 14 and 15 in the datasheet.
46*4882a593Smuzhiyun		The clock-frequency must be:
47*4882a593Smuzhiyun		* 3000 to 4500 Hz for adis1649x devices.
48*4882a593Smuzhiyun		* 700 to 2400 Hz for adis1648x devices.
49*4882a593Smuzhiyun	* pps: In Pulse Per Second (PPS) Mode, the rate of data collection and
50*4882a593Smuzhiyun	       production is equal to the product of the external clock
51*4882a593Smuzhiyun	       frequency and the scale factor in the SYNC_SCALE register, see
52*4882a593Smuzhiyun	       Table 154 in the datasheet.
53*4882a593Smuzhiyun	       The clock-frequency must be:
54*4882a593Smuzhiyun	       * 1 to 128 Hz for adis1649x devices.
55*4882a593Smuzhiyun	       * This mode is not supported by adis1648x devices.
56*4882a593Smuzhiyun	If this field is left empty together with the "clocks" field, then the
57*4882a593Smuzhiyun	internal clock is used.
58*4882a593Smuzhiyun- adi,ext-clk-pin: The DIOx line to be used as an external clock input.
59*4882a593Smuzhiyun	Valid values are:
60*4882a593Smuzhiyun	* DIO1
61*4882a593Smuzhiyun	* DIO2
62*4882a593Smuzhiyun	* DIO3
63*4882a593Smuzhiyun	* DIO4
64*4882a593Smuzhiyun	Each DIOx pin supports only one function at a time (data ready line
65*4882a593Smuzhiyun	selection or external clock input). When a single pin has two
66*4882a593Smuzhiyun	two assignments, the enable bit for the lower priority function
67*4882a593Smuzhiyun	automatically resets to zero (disabling the lower priority function).
68*4882a593Smuzhiyun	Data ready has highest priority.
69*4882a593Smuzhiyun	If this field is left empty, DIO2 is assigned as default external clock
70*4882a593Smuzhiyun	input pin.
71*4882a593Smuzhiyun
72*4882a593SmuzhiyunExample:
73*4882a593Smuzhiyun
74*4882a593Smuzhiyun	imu@0 {
75*4882a593Smuzhiyun		compatible = "adi,adis16495-1";
76*4882a593Smuzhiyun		reg = <0>;
77*4882a593Smuzhiyun		spi-max-frequency = <3200000>;
78*4882a593Smuzhiyun		spi-cpol;
79*4882a593Smuzhiyun		spi-cpha;
80*4882a593Smuzhiyun		interrupts = <25 IRQF_TRIGGER_FALLING>;
81*4882a593Smuzhiyun		interrupt-parent = <&gpio>;
82*4882a593Smuzhiyun		interrupt-names = "DIO2";
83*4882a593Smuzhiyun		clocks = <&adis16495_sync>;
84*4882a593Smuzhiyun		clock-names = "sync";
85*4882a593Smuzhiyun		adi,ext-clk-pin = "DIO1";
86*4882a593Smuzhiyun	};
87