-
Notifications
You must be signed in to change notification settings - Fork 103
/
digi,mca-ioexp.txt
69 lines (52 loc) · 1.83 KB
/
digi,mca-ioexp.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
* Digi I/O Expander
The I/O Expander consists of a group of sub-devices (I2C Only):
Device Description
------ ------------
adc ADC channels (multiplexed with IOs)
gpio IO pins (multiplexed with ADCs)
======
Required properties:
- compatible : Should be "digi,mca_ioexp"
- reg : Specifies the I2C slave address (this defaults to 0x6e but it can be
modified to match the chip's OTP settings).
- interrupt-parent : Specifies the reference to the interrupt controller for
the I/O Expander.
- interrupts : IRQ line information.
- interrupt-controller
Optional properties:
- restore-config-on-resume : Read configuration registers before going to sleep
and write them back on resume, allowing the I/O Expander to be powered off.
This also disables the IRQ of this device which means that it will not be
available as a wake-up source.
Sub-nodes:
- adc : This node defines settings for the ADC channels associated with the
I/O Expander. Refer to binding at:
"Documentation/devicetree/bindings/iio/adc/digi,mca-adc.txt"
- gpio : This node defines settings for the GPIO pins associated with the I/O
Expander.
Refer to binding at:
"Documentation/devicetree/bindings/gpio/gpio-mca.txt"
Example:
mca_ioexp: mca_io@6e {
compatible = "digi,mca_ioexp";
reg = <0x6e>;
interrupt-parent = <&mca_gpio>;
interrupts = <0 IRQ_TYPE_EDGE_FALLING>;
status = "okay";
interrupt-controller;
#interrupt-cells = <2>;
pinctrl-names = "default";
restore-config-on-resume;
mca_ioexp_gpio: gpio {
compatible = "digi,mca-ioexp-gpio";
gpio-controller;
#gpio-cells = <2>;
interrupt-parent = <&mca_ioexp>;
interrupt-controller;
#interrupt-cells = <2>;
};
mca_ioexp_adc: adc {
compatible = "digi,mca-ioexp-adc";
digi,adc-vref = <3300000>;
};
};