summaryrefslogtreecommitdiff
path: root/Documentation/devicetree/bindings/gpio/gpio-imx-rpmsg.txt
blob: 25001da92da53a139969b3ad8c843ffd7272314d (plain)
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
Device-Tree bindings for drivers/gpio/gpio-imx-rpmsg.c gpio driver over
rpmsg. On i.mx7ULP PTA PTB are connected on M4 side, so rpmsg gpio driver
needed to get/set gpio status from M4 side by rpmsg.

Required properties:
- compatible : Should be "fsl,imx-rpmsg-gpio".
- port_idx : Specify the GPIO PORT index, PTA:0, PTB:1.
- gpio-controller : Mark the device node as a gpio controller.
- #gpio-cells : Should be two. The first cell is the pin number and
  the second cell is used to specify the gpio polarity:
      0 = active high
      1 = active low
- interrupt-controller: Marks the device node as an interrupt controller.
- #interrupt-cells : Should be 2.  The first cell is the GPIO number.
  The second cell bits[3:0] is used to specify trigger type and level flags:
      1 = low-to-high edge triggered.
      2 = high-to-low edge triggered.
      4 = active high level-sensitive.
      8 = active low level-sensitive.

Note: Each GPIO port should have an alias correctly numbered in "aliases"
node.

Examples:

aliases {
	gpio4 = &rpmsg_gpio0;
	gpio5 = &rpmsg_gpio1;
};

rpmsg_gpio0: rpmsg-gpio0 {
	compatible = "fsl,imx-rpmsg-gpio";
	port_idx = <0>;
	gpio-controller;
	#gpio-cells = <2>;
	#interrupt-cells = <2>;
	interrupt-controller;
	interrupt-parent = <&rpmsg_gpio0>;
	status = "okay";
};

rpmsg_gpio1: rpmsg-gpio1 {
	compatible = "fsl,imx-rpmsg-gpio";
	port_idx = <1>;
	gpio-controller;
	#gpio-cells = <2>;
	#interrupt-cells = <2>;
	interrupt-controller;
	interrupt-parent = <&rpmsg_gpio1>;
	status = "okay";
};

&skeleton_node {
	interrupt-parent = <&rpmsg_gpio1>;
	interrupts = <7 2>;
	wakeup-gpios = <&rpmsg_gpio1 7 GPIO_ACTIVE_LOW>;
};