xref: /freebsd/sys/contrib/device-tree/Bindings/media/cec-gpio.txt (revision a90b9d0159070121c221b966469c3e36d912bf82)
1* HDMI CEC GPIO driver
2
3The HDMI CEC GPIO module supports CEC implementations where the CEC line
4is hooked up to a pull-up GPIO line and - optionally - the HPD line is
5hooked up to another GPIO line.
6
7Please note: the maximum voltage for the CEC line is 3.63V, for the HPD and
85V lines it is 5.3V. So you may need some sort of level conversion circuitry
9when connecting them to a GPIO line.
10
11Required properties:
12  - compatible: value must be "cec-gpio".
13  - cec-gpios: gpio that the CEC line is connected to. The line should be
14    tagged as open drain.
15
16If the CEC line is associated with an HDMI receiver/transmitter, then the
17following property is also required:
18
19  - hdmi-phandle - phandle to the HDMI controller, see also cec.txt.
20
21If the CEC line is not associated with an HDMI receiver/transmitter, then
22the following property is optional and can be used for debugging HPD changes:
23
24  - hpd-gpios: gpio that the HPD line is connected to.
25
26This property is optional and can be used for debugging changes on the 5V line:
27
28  - v5-gpios: gpio that the 5V line is connected to.
29
30Example for the Raspberry Pi 3 where the CEC line is connected to
31pin 26 aka BCM7 aka CE1 on the GPIO pin header, the HPD line is
32connected to pin 11 aka BCM17 and the 5V line is connected to pin
3315 aka BCM22 (some level shifter is needed for the HPD and 5V lines!):
34
35#include <dt-bindings/gpio/gpio.h>
36
37cec-gpio {
38	compatible = "cec-gpio";
39	cec-gpios = <&gpio 7 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>;
40	hpd-gpios = <&gpio 17 GPIO_ACTIVE_HIGH>;
41	v5-gpios = <&gpio 22 GPIO_ACTIVE_HIGH>;
42};
43