Skip to content

Commit 05a8a80

Browse files
AKASHI Takahirolinusw
authored andcommitted
gpio: dt-bindings: Add GPIO on top of generic pin control
Traditionally, firmware will provide a GPIO interface or a pin control interface. However, the SCMI protocol provides a generic pin control interface and the GPIO support is built on top of that using the normal pin control interfaces. Potentially, other firmware will adopt a similar generic approach in the future. Document how to configure the GPIO device. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org> Reviewed-by: Linus Walleij <linusw@kernel.org> Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com> Signed-off-by: Linus Walleij <linusw@kernel.org>
1 parent bf1fbd1 commit 05a8a80

1 file changed

Lines changed: 59 additions & 0 deletions

File tree

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
2+
%YAML 1.2
3+
---
4+
$id: http://devicetree.org/schemas/gpio/pin-control-gpio.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+
title: Pin control based generic GPIO controller
8+
9+
description:
10+
The pin control-based GPIO will facilitate a pin controller's ability
11+
to drive electric lines high/low and other generic properties of a
12+
pin controller to perform general-purpose one-bit binary I/O.
13+
14+
maintainers:
15+
- Dan Carpenter <dan.carpenter@linaro.org>
16+
17+
properties:
18+
compatible:
19+
const: scmi-pinctrl-gpio
20+
21+
gpio-controller: true
22+
23+
"#gpio-cells":
24+
const: 2
25+
26+
gpio-line-names: true
27+
28+
gpio-ranges: true
29+
30+
ngpios: true
31+
32+
patternProperties:
33+
"^.+-hog(-[0-9]+)?$":
34+
type: object
35+
36+
required:
37+
- gpio-hog
38+
39+
required:
40+
- compatible
41+
- gpio-controller
42+
- "#gpio-cells"
43+
- gpio-ranges
44+
- ngpios
45+
46+
additionalProperties: false
47+
48+
examples:
49+
- |
50+
gpio {
51+
compatible = "scmi-pinctrl-gpio";
52+
gpio-controller;
53+
#gpio-cells = <2>;
54+
ngpios = <4>;
55+
gpio-line-names = "gpio_5_17", "gpio_5_20", "gpio_5_22", "gpio_2_1";
56+
gpio-ranges = <&scmi_pinctrl 0 30 4>;
57+
pinctrl-names = "default";
58+
pinctrl-0 = <&keys_pins>;
59+
};

0 commit comments

Comments
 (0)