1b97ee269SEmmanuel Vadot# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 2b97ee269SEmmanuel Vadot%YAML 1.2 3b97ee269SEmmanuel Vadot--- 4b97ee269SEmmanuel Vadot$id: http://devicetree.org/schemas/serio/ps2-gpio.yaml# 5b97ee269SEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml# 6b97ee269SEmmanuel Vadot 7*8bab661aSEmmanuel Vadottitle: GPIO based PS/2 8b97ee269SEmmanuel Vadot 9b97ee269SEmmanuel Vadotmaintainers: 10b97ee269SEmmanuel Vadot - Danilo Krummrich <danilokrummrich@dk-develop.de> 11b97ee269SEmmanuel Vadot 12b97ee269SEmmanuel Vadotproperties: 13b97ee269SEmmanuel Vadot compatible: 14b97ee269SEmmanuel Vadot const: ps2-gpio 15b97ee269SEmmanuel Vadot 16b97ee269SEmmanuel Vadot data-gpios: 17b97ee269SEmmanuel Vadot description: 18b97ee269SEmmanuel Vadot the gpio used for the data signal - this should be flagged as 19b97ee269SEmmanuel Vadot active high using open drain with (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN) 20b97ee269SEmmanuel Vadot from <dt-bindings/gpio/gpio.h> since the signal is open drain by 21b97ee269SEmmanuel Vadot definition 22b97ee269SEmmanuel Vadot maxItems: 1 23b97ee269SEmmanuel Vadot 24b97ee269SEmmanuel Vadot clk-gpios: 25b97ee269SEmmanuel Vadot description: 26b97ee269SEmmanuel Vadot the gpio used for the clock signal - this should be flagged as 27b97ee269SEmmanuel Vadot active high using open drain with (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN) 28b97ee269SEmmanuel Vadot from <dt-bindings/gpio/gpio.h> since the signal is open drain by 29b97ee269SEmmanuel Vadot definition 30b97ee269SEmmanuel Vadot maxItems: 1 31b97ee269SEmmanuel Vadot 32b97ee269SEmmanuel Vadot interrupts: 33b97ee269SEmmanuel Vadot description: 34b97ee269SEmmanuel Vadot The given interrupt should trigger on the falling edge of the clock line. 35b97ee269SEmmanuel Vadot maxItems: 1 36b97ee269SEmmanuel Vadot 37b97ee269SEmmanuel Vadot write-enable: 38b97ee269SEmmanuel Vadot type: boolean 39b97ee269SEmmanuel Vadot description: 40b97ee269SEmmanuel Vadot Indicates whether write function is provided to serio device. Possibly 41b97ee269SEmmanuel Vadot providing the write function will not work, because of the tough timing 42b97ee269SEmmanuel Vadot requirements. 43b97ee269SEmmanuel Vadot 44b97ee269SEmmanuel Vadotrequired: 45b97ee269SEmmanuel Vadot - compatible 46b97ee269SEmmanuel Vadot - data-gpios 47b97ee269SEmmanuel Vadot - clk-gpios 48b97ee269SEmmanuel Vadot - interrupts 49b97ee269SEmmanuel Vadot 50b97ee269SEmmanuel VadotadditionalProperties: false 51b97ee269SEmmanuel Vadot 52b97ee269SEmmanuel Vadotexamples: 53b97ee269SEmmanuel Vadot - | 54b97ee269SEmmanuel Vadot #include <dt-bindings/gpio/gpio.h> 55b97ee269SEmmanuel Vadot #include <dt-bindings/interrupt-controller/irq.h> 56b97ee269SEmmanuel Vadot 57b97ee269SEmmanuel Vadot ps2 { 58b97ee269SEmmanuel Vadot compatible = "ps2-gpio"; 59b97ee269SEmmanuel Vadot interrupt-parent = <&gpio>; 60b97ee269SEmmanuel Vadot interrupts = <23 IRQ_TYPE_EDGE_FALLING>; 61b97ee269SEmmanuel Vadot data-gpios = <&gpio 24 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>; 62b97ee269SEmmanuel Vadot clk-gpios = <&gpio 23 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>; 63b97ee269SEmmanuel Vadot write-enable; 64b97ee269SEmmanuel Vadot }; 65