162306a36Sopenharmony_ci# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 262306a36Sopenharmony_ci%YAML 1.2 362306a36Sopenharmony_ci--- 462306a36Sopenharmony_ci$id: http://devicetree.org/schemas/serio/ps2-gpio.yaml# 562306a36Sopenharmony_ci$schema: http://devicetree.org/meta-schemas/core.yaml# 662306a36Sopenharmony_ci 762306a36Sopenharmony_cititle: GPIO based PS/2 862306a36Sopenharmony_ci 962306a36Sopenharmony_cimaintainers: 1062306a36Sopenharmony_ci - Danilo Krummrich <danilokrummrich@dk-develop.de> 1162306a36Sopenharmony_ci 1262306a36Sopenharmony_ciproperties: 1362306a36Sopenharmony_ci compatible: 1462306a36Sopenharmony_ci const: ps2-gpio 1562306a36Sopenharmony_ci 1662306a36Sopenharmony_ci data-gpios: 1762306a36Sopenharmony_ci description: 1862306a36Sopenharmony_ci the gpio used for the data signal - this should be flagged as 1962306a36Sopenharmony_ci active high using open drain with (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN) 2062306a36Sopenharmony_ci from <dt-bindings/gpio/gpio.h> since the signal is open drain by 2162306a36Sopenharmony_ci definition 2262306a36Sopenharmony_ci maxItems: 1 2362306a36Sopenharmony_ci 2462306a36Sopenharmony_ci clk-gpios: 2562306a36Sopenharmony_ci description: 2662306a36Sopenharmony_ci the gpio used for the clock signal - this should be flagged as 2762306a36Sopenharmony_ci active high using open drain with (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN) 2862306a36Sopenharmony_ci from <dt-bindings/gpio/gpio.h> since the signal is open drain by 2962306a36Sopenharmony_ci definition 3062306a36Sopenharmony_ci maxItems: 1 3162306a36Sopenharmony_ci 3262306a36Sopenharmony_ci interrupts: 3362306a36Sopenharmony_ci description: 3462306a36Sopenharmony_ci The given interrupt should trigger on the falling edge of the clock line. 3562306a36Sopenharmony_ci maxItems: 1 3662306a36Sopenharmony_ci 3762306a36Sopenharmony_ci write-enable: 3862306a36Sopenharmony_ci type: boolean 3962306a36Sopenharmony_ci description: 4062306a36Sopenharmony_ci Indicates whether write function is provided to serio device. Possibly 4162306a36Sopenharmony_ci providing the write function will not work, because of the tough timing 4262306a36Sopenharmony_ci requirements. 4362306a36Sopenharmony_ci 4462306a36Sopenharmony_cirequired: 4562306a36Sopenharmony_ci - compatible 4662306a36Sopenharmony_ci - data-gpios 4762306a36Sopenharmony_ci - clk-gpios 4862306a36Sopenharmony_ci - interrupts 4962306a36Sopenharmony_ci 5062306a36Sopenharmony_ciadditionalProperties: false 5162306a36Sopenharmony_ci 5262306a36Sopenharmony_ciexamples: 5362306a36Sopenharmony_ci - | 5462306a36Sopenharmony_ci #include <dt-bindings/gpio/gpio.h> 5562306a36Sopenharmony_ci #include <dt-bindings/interrupt-controller/irq.h> 5662306a36Sopenharmony_ci 5762306a36Sopenharmony_ci ps2 { 5862306a36Sopenharmony_ci compatible = "ps2-gpio"; 5962306a36Sopenharmony_ci interrupt-parent = <&gpio>; 6062306a36Sopenharmony_ci interrupts = <23 IRQ_TYPE_EDGE_FALLING>; 6162306a36Sopenharmony_ci data-gpios = <&gpio 24 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>; 6262306a36Sopenharmony_ci clk-gpios = <&gpio 23 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>; 6362306a36Sopenharmony_ci write-enable; 6462306a36Sopenharmony_ci }; 65