lede/target/linux/phytium/files-5.10/Documentation/devicetree/bindings/gpio/phytium,gpio.yaml
HunZI a462d2b757
target: add phytium support (#11798)
* target: add phytium support

* kernel/video: add phytium platform ARM GPU support

* config: add EFI support to phytium armv8

* target: phytium: remove rtl8821cs driver

* target: phytium: refresh dts
2024-01-18 15:16:24 +08:00

114 lines
2.3 KiB
YAML
Executable File

# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/gpio/phytium,gpio.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Phytium GPIO controller
description: |
Phytium GPIO controllers have one or two configurable ports, each of which
are intended to be represented as child nodes with the generic GPIO-controller
properties as desribed in this bindings file.
maintainers:
- Chen Baozi <chenbaozi@phytium.com.cn>
properties:
$nodename:
pattern: "^gpio@[0-9a-f]+$"
compatible:
const: phytium,gpio
reg:
maxItems: 1
gpio-controller: true
"#address-cells":
const: 1
"#size-cells":
const: 0
'#gpio-cells':
const: 2
interrupts:
description: |
The interrupts to the parent controller raised when GPIOs generate
the interrupts. If the controller provides one combined interrupt
for all GPIOs, specify a single interrupt. If the controller provides
one interrupt for each GPIO, provide a list of interrupts that
correspond to each of the GPIO pins.
minItems: 1
maxItems: 32
interrupt-controller: true
'#interrupt-cells':
const: 2
patternProperties:
"^gpio-(port|controller)@[0-9a-f]+$":
type: object
properties:
compatible:
const: phytium,gpio-port
reg:
maxItems: 1
nr-gpios:
description: The number of GPIO pins exported by the port.
default: 32
minimum: 1
maximum: 32
required:
- compatible
- reg
- gpio-controller
- '#gpio-cells'
dependencies:
interrupt-controller: [ interrupts ]
additionalProperties: false
additionalProperties: false
required:
- compatible
- reg
- "#address-cells"
- "#size-cells"
examples:
- |
gpio: gpio@28004000 {
compatible = "phytium,gpio";
reg = <0x0 0x28004000 0x0 0x1000>;
gpio-controller;
#gpio-cells = <2>;
#address-cells = <1>;
#size-cells = <0>;
interrupts = <GIC_SPI 10 IRQ_TYPE_LEVEL_HIGH>;
interrupt-controller;
#interrupt-cells = <2>;
porta: gpio-port@0 {
compatible = "phytium,gpio-port";
reg = <0>;
nr-gpios = <8>;
};
portb: gpio-port@1 {
compatible = "phytium,gpio-port";
reg = <1>;
nr-gpios = <8>;
};
};
...