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