Back to home page

OSCL-LXR

 
 

    


0001 # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
0002 %YAML 1.2
0003 ---
0004 $id: http://devicetree.org/schemas/serio/ps2-gpio.yaml#
0005 $schema: http://devicetree.org/meta-schemas/core.yaml#
0006 
0007 title: Bindings for GPIO based PS/2
0008 
0009 maintainers:
0010   - Danilo Krummrich <danilokrummrich@dk-develop.de>
0011 
0012 properties:
0013   compatible:
0014     const: ps2-gpio
0015 
0016   data-gpios:
0017     description:
0018       the gpio used for the data signal - this should be flagged as
0019       active high using open drain with (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)
0020       from <dt-bindings/gpio/gpio.h> since the signal is open drain by
0021       definition
0022     maxItems: 1
0023 
0024   clk-gpios:
0025     description:
0026       the gpio used for the clock signal - this should be flagged as
0027       active high using open drain with (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)
0028       from <dt-bindings/gpio/gpio.h> since the signal is open drain by
0029       definition
0030     maxItems: 1
0031 
0032   interrupts:
0033     description:
0034       The given interrupt should trigger on the falling edge of the clock line.
0035     maxItems: 1
0036 
0037   write-enable:
0038     type: boolean
0039     description:
0040       Indicates whether write function is provided to serio device. Possibly
0041       providing the write function will not work, because of the tough timing
0042       requirements.
0043 
0044 required:
0045   - compatible
0046   - data-gpios
0047   - clk-gpios
0048   - interrupts
0049 
0050 additionalProperties: false
0051 
0052 examples:
0053   - |
0054     #include <dt-bindings/gpio/gpio.h>
0055     #include <dt-bindings/interrupt-controller/irq.h>
0056 
0057     ps2 {
0058         compatible = "ps2-gpio";
0059         interrupt-parent = <&gpio>;
0060         interrupts = <23 IRQ_TYPE_EDGE_FALLING>;
0061         data-gpios = <&gpio 24 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
0062         clk-gpios = <&gpio 23 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
0063         write-enable;
0064     };